From 759d894ad28c934c78107c4db16f26d62740ebf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Thu, 14 Nov 2024 14:49:56 +0100 Subject: [PATCH 01/27] Update translations (#4355) --- .../participant-detail-view.component.html | 7 ++-- .../participant-list.component.html | 2 +- .../meeting-settings-definitions.ts | 6 ++-- .../organization-settings.component.html | 2 +- client/src/assets/i18n/de.po | 32 ++++++++++++------- client/src/assets/i18n/template-en.pot | 28 +++++++++++----- 6 files changed, 49 insertions(+), 28 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html index 5fba5509bb..0442a70c00 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.html @@ -279,8 +279,7 @@

{{ 'Voting right delegated to (proxy)' | translate }}

@if (showVoteDelegations && user!.vote_delegations_from().length > 0) {

- {{ 'Voting right received from ' | translate }}{{ user!.vote_delegations_from().length - }}{{ ' principals' | translate }} + {{ 'Principals' | translate }}

{{ 'Comment' | translate }} @if (isAllowed('seeSensitiveData')) { - {{ user!.isLockedOutOfMeeting() ? 'visibility_off' : 'check_box_outline_blank' }} + {{ user!.isLockedOutOfMeeting() ? 'visibility_off' : '' }} - {{ (user?.isLockedOutOfMeeting() ? 'Is locked out' : 'Is not locked out') | translate }} + {{ (user?.isLockedOutOfMeeting() ? 'Is locked out' : '') | translate }} }
diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html index d57e472f28..af39fed402 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html @@ -80,7 +80,7 @@

{{ 'Participants' | translate }}

@if (isInPolldefaultGroup(user)) { {{ 'Vote weight' | translate }}: {{ user.vote_weight() }} @if (user.hasVoteRightFromOthers()) { - + {{ sumOfDelegatedVoteWeight(user) }} {{ ' from delegated votes' | translate }} + + {{ sumOfDelegatedVoteWeight(user) }} {{ 'from delegated votes' | translate }} } } diff --git a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts index b19ee5ef25..2647b28af6 100644 --- a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts +++ b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts @@ -1006,14 +1006,16 @@ export const meetingSettings: SettingsGroup[] = fillInSettingsDefaults([ { key: `users_email_subject`, label: _(`Email subject`), - helpText: _(`You can use {event_name} and {username} as placeholder.`) + helpText: _( + `Possible placeholders for email subject and body: {title}, {first_name}, {last_name}, {groups}, {structure_levels}, {event_name}, {url}, {username} and {password}` + ) }, { key: `users_email_body`, label: _(`Email body`), type: `text`, helpText: _( - `Use these placeholders: {name}, {event_name}, {url}, {username}, {password}. The url referrs to the system url.` + `Possible placeholders for email subject and body: {title}, {first_name}, {last_name}, {groups}, {structure_levels}, {event_name}, {url}, {username} and {password}` ) } ] diff --git a/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.html b/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.html index bd7a6f81ba..1e30f05c00 100644 --- a/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.html +++ b/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.html @@ -107,7 +107,7 @@

{{ 'Superadmin settings' | translate }}

- {{ 'Meetings can be public' | translate }} + {{ 'Enable public meetings' | translate }}
diff --git a/client/src/assets/i18n/de.po b/client/src/assets/i18n/de.po index c62c261670..eddddf6d77 100644 --- a/client/src/assets/i18n/de.po +++ b/client/src/assets/i18n/de.po @@ -830,10 +830,10 @@ msgid "Ballot reset" msgstr "Wahlgang zurückgesetzt" msgid "Ballot started" -msgstr "Wahlgang gestarted" +msgstr "Wahlgang gestartet" msgid "Ballot stopped" -msgstr "Wahlgeang beendet" +msgstr "Wahlgang beendet" msgid "Ballot stopped/published" msgstr "Wahlgang beendet/veröffentlicht" @@ -2059,6 +2059,9 @@ msgstr "Geschäftsordnungsanträge aktivieren" msgid "Enable point of orders for other participants" msgstr "Stellen eines GO-Antrags für andere Teilnehmende erlauben" +msgid "Enable public meetings" +msgstr "Öffentliche Veranstaltungen aktivieren" + msgid "Enable specifications and ranking for possible motions" msgstr "Vorgaben und Reihung für mögliche GO-Anträge aktivieren" @@ -3951,6 +3954,15 @@ msgstr "GO-Antrag" msgid "Polls" msgstr "Umfragen" +msgid "" +"Possible placeholders for email subject and body: {title}, {first_name}, " +"{last_name}, {groups}, {structure_levels}, {event_name}, {url}, {username} " +"and {password}" +msgstr "" +"Mögliche Platzhalter für E-Mail-Betreff und -Inhalt: {title}, {first_name}, " +"{last_name}, {groups}, {structure_levels}, {event_name}, {url}, {username} " +"und {password}" + msgid "Possible points of order" msgstr "Mögliche GO-Anträge" @@ -5347,13 +5359,6 @@ msgstr "Farbe verwenden" msgid "Use the following custom number" msgstr "Verwende die folgende benutzerdefinierte Anzahl" -msgid "" -"Use these placeholders: {name}, {event_name}, {url}, {username}, {password}." -" The url referrs to the system url." -msgstr "" -"Verwendbare Platzhalter: {name}, {event_name}, {url}, {username}, " -"{password}. Die URL bezieht sich auf die System-URL." - msgid "Used for WLAN QRCode projection." msgstr "Wird für die Projektion des WLAN-QR-Codes verwendet." @@ -5479,6 +5484,9 @@ msgstr "Stimmrecht für" msgid "Voting right received from (principals)" msgstr "Stimmrecht erhalten von (Vollmachtgeber*in)" +msgid "Voting rights" +msgstr "Stimmrechte" + msgid "Voting started" msgstr "Abstimmung gestartet" @@ -5667,9 +5675,6 @@ msgstr "" msgid "You can only anonymize named polls." msgstr "Sie können nur namentliche Stimmabgaben anonymisieren." -msgid "You can use {event_name} and {username} as placeholder." -msgstr "Sie können {event_name} und {username} als Platzhalter verwenden." - msgid "" "You cannot change the recommendation of motions in different workflows!" msgstr "" @@ -5890,6 +5895,9 @@ msgstr "weiblich" msgid "finished (unpublished)" msgstr "abgeschlossen (unveröffentlicht)" +msgid "from delegated votes" +msgstr "aus Stimmrechtsübertragungen" + msgid "fullscreen" msgstr "Vollbild" diff --git a/client/src/assets/i18n/template-en.pot b/client/src/assets/i18n/template-en.pot index 013d25c8ab..08a0bb8eb6 100644 --- a/client/src/assets/i18n/template-en.pot +++ b/client/src/assets/i18n/template-en.pot @@ -1994,6 +1994,10 @@ msgstr "" msgid "Enable point of orders for other participants" msgstr "" +#: /app/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.html +msgid "Enable public meetings" +msgstr "" + msgid "Enable specifications and ranking for possible motions" msgstr "" @@ -3941,6 +3945,13 @@ msgstr "" msgid "Polls" msgstr "" +#: /app/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts +msgid "" +"Possible placeholders for email subject and body: {title}, {first_name}, " +"{last_name}, {groups}, {structure_levels}, {event_name}, {url}, {username} " +"and {password}" +msgstr "" + msgid "Possible points of order" msgstr "" @@ -5323,11 +5334,6 @@ msgstr "" msgid "Use the following custom number" msgstr "" -msgid "" -"Use these placeholders: {name}, {event_name}, {url}, {username}, " -"{password}. The url referrs to the system url." -msgstr "" - msgid "Used for WLAN QRCode projection." msgstr "" @@ -5450,6 +5456,11 @@ msgstr "" msgid "Voting right received from (principals)" msgstr "" +#: /app/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +#: /app/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +msgid "Voting rights" +msgstr "" + msgid "Voting started" msgstr "" @@ -5623,9 +5634,6 @@ msgstr "" msgid "You can only anonymize named polls." msgstr "" -msgid "You can use {event_name} and {username} as placeholder." -msgstr "" - msgid "You cannot change the recommendation of motions in different workflows!" msgstr "" @@ -5832,6 +5840,10 @@ msgstr "" msgid "finished (unpublished)" msgstr "" +#: /app/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.html +msgid "from delegated votes" +msgstr "" + msgid "fullscreen" msgstr "" From 4b3635c18be5b1bda8cdca9b266ad73c7b779e6e Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Fri, 15 Nov 2024 08:31:55 +0100 Subject: [PATCH 02/27] Move IdField and fieldset next to each other (#4352) --- .../meetings/pages/agenda/agenda.subscription.ts | 8 ++++---- .../pages/mediafiles/mediafiles.subscription.ts | 2 +- .../meetings/pages/motions/motions.subscription.ts | 8 ++++---- .../participants/participants.subscription.ts | 4 ++-- .../pages/projectors/projectors.subscription.ts | 14 +++++++------- .../services/active-meeting.subscription.ts | 4 ++-- .../organization/organization.subscription.ts | 4 ++-- .../pages/accounts/accounts.subscription.ts | 4 ++-- .../organization-tags.subscription.ts | 2 +- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/agenda/agenda.subscription.ts b/client/src/app/site/pages/meetings/pages/agenda/agenda.subscription.ts index 9aa9056fbd..410441fb84 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/agenda.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/agenda.subscription.ts @@ -128,13 +128,13 @@ export const listOfSpeakersSpeakerCountSubscription = { follow: [ { idField: `speaker_ids`, + fieldset: [`begin_time`, `end_time`], follow: [ { idField: `point_of_order_category_id`, fieldset: FULL_FIELDSET } - ], - fieldset: [`begin_time`, `end_time`] + ] } ] }; @@ -151,11 +151,11 @@ export const getListOfSpeakersDetailSubscriptionConfig: SubscriptionConfigGenera follow: [ { idField: `meeting_user_id`, + fieldset: [`number`, `vote_weight`], follow: [ { idField: `user_id`, ...UserFieldsets.FullNameSubscription }, { idField: `structure_level_ids`, fieldset: [`name`] } - ], - fieldset: [`number`, `vote_weight`] + ] }, { idField: `structure_level_list_of_speakers_id`, diff --git a/client/src/app/site/pages/meetings/pages/mediafiles/mediafiles.subscription.ts b/client/src/app/site/pages/meetings/pages/mediafiles/mediafiles.subscription.ts index 20573b4f5d..8d028f95cb 100644 --- a/client/src/app/site/pages/meetings/pages/mediafiles/mediafiles.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/mediafiles/mediafiles.subscription.ts @@ -43,7 +43,7 @@ export const getMediafilesListMinimalSubscriptionConfig: SubscriptionConfigGener modelRequest: { viewModelCtor: ViewMeeting, ids: [id], - follow: [`mediafile_ids`, `meeting_mediafile_ids`] + follow: [{ idField: `mediafile_ids` }, { idField: `meeting_mediafile_ids` }] }, subscriptionName: MEDIAFILES_LIST_MINIMAL_SUBSCRIPTION }); diff --git a/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts b/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts index 2bdbb50b76..d2d08e86bd 100644 --- a/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/motions/motions.subscription.ts @@ -119,12 +119,12 @@ export const getMotionWorkflowDetailSubscriptionConfig: SubscriptionConfigGenera modelRequest: { ids: [id], viewModelCtor: ViewMotionWorkflow, + fieldset: [], follow: [ { idField: `state_ids` } - ], - fieldset: `` + ] }, subscriptionName: MOTION_WORKFLOW_DETAIL_SUBSCRIPTION }); @@ -189,13 +189,13 @@ export const getMotionDetailSubscriptionConfig: SubscriptionConfigGenerator = (. { idField: `comment_ids`, fieldset: FULL_FIELDSET }, { idField: `supporter_meeting_user_ids`, + fieldset: `participantListMinimal`, follow: [ { idField: `user_id`, fieldset: `participantList` } - ], - fieldset: `participantListMinimal` + ] } ], fieldset: [ diff --git a/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts b/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts index 66709e2d1d..e27715331f 100644 --- a/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/participants/participants.subscription.ts @@ -37,8 +37,8 @@ export const getParticipantVoteInfoSubscriptionConfig: SubscriptionConfigGenerat }, { idField: `vote_delegated_to_id`, - follow: [{ idField: `user_id`, fieldset: [`is_present_in_meeting_ids`] }], - fieldset: [`meeting_id`] + fieldset: [`meeting_id`], + follow: [{ idField: `user_id`, fieldset: [`is_present_in_meeting_ids`] }] } ] } diff --git a/client/src/app/site/pages/meetings/pages/projectors/projectors.subscription.ts b/client/src/app/site/pages/meetings/pages/projectors/projectors.subscription.ts index b7a3917aed..7de8451119 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/projectors.subscription.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/projectors.subscription.ts @@ -24,6 +24,7 @@ export const getProjectorListSubscriptionConfig: SubscriptionConfigGenerator = ( modelRequest: { viewModelCtor: ViewMeeting, ids: [id], + additionalFields: [`reference_projector_id`], follow: [ { idField: `projector_ids`, @@ -61,14 +62,13 @@ export const getProjectorListSubscriptionConfig: SubscriptionConfigGenerator = ( } ] }, - `projector_countdown_ids`, - `projector_message_ids`, - ...MEETING_DEFAULT_PROJECTOR_IDS_KEYS, + { idField: `projector_countdown_ids` }, + { idField: `projector_message_ids` }, { idField: `speaker_ids`, additionalFields: [`meeting_user_id`] }, - `list_of_speakers_ids`, - { idField: `agenda_item_ids`, fieldset: [`item_number`, `content_object_id`] } - ], - additionalFields: [`reference_projector_id`] + { idField: `list_of_speakers_ids` }, + { idField: `agenda_item_ids`, fieldset: [`item_number`, `content_object_id`] }, + ...MEETING_DEFAULT_PROJECTOR_IDS_KEYS + ] }, subscriptionName: PROJECTOR_LIST_SUBSCRIPTION }); diff --git a/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts b/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts index f367190409..e9b6321a0b 100644 --- a/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts +++ b/client/src/app/site/pages/meetings/services/active-meeting.subscription.ts @@ -54,14 +54,14 @@ export function getActiveMeetingSubscriptionConfig(id: Id, settingsKeys: string[ }, // TODO: Remove and count unread messages by chat_group_ids/chat_message_ids { idField: `poll_ids`, + fieldset: [`title`, `state`, `entitled_group_ids`], follow: [ { idField: `content_object_id`, fieldset: [`title`], follow: [{ idField: `agenda_item_id`, fieldset: [`item_number`, `content_object_id`] }] } - ], - fieldset: [`title`, `state`, `entitled_group_ids`] + ] }, { idField: `point_of_order_category_ids`, diff --git a/client/src/app/site/pages/organization/organization.subscription.ts b/client/src/app/site/pages/organization/organization.subscription.ts index f4748dca32..2d633a8e89 100644 --- a/client/src/app/site/pages/organization/organization.subscription.ts +++ b/client/src/app/site/pages/organization/organization.subscription.ts @@ -56,11 +56,11 @@ function getMeetingListFollowConfig( ): any { return { idField: idField, + fieldset: `list`, follow: [ { idField: `committee_id`, fieldset: `name` }, { idField: `organization_tag_ids`, fieldset: FULL_FIELDSET } - ], - fieldset: `list` + ] }; } diff --git a/client/src/app/site/pages/organization/pages/accounts/accounts.subscription.ts b/client/src/app/site/pages/organization/pages/accounts/accounts.subscription.ts index 05a6e96736..37d31e8cb4 100644 --- a/client/src/app/site/pages/organization/pages/accounts/accounts.subscription.ts +++ b/client/src/app/site/pages/organization/pages/accounts/accounts.subscription.ts @@ -16,8 +16,8 @@ export const getAccountDetailSubscriptionConfig: SubscriptionConfigGenerator = ( { idField: `committee_ids`, fieldset: [`name`, `manager_ids`] }, { idField: `meeting_ids`, - follow: [{ idField: `group_ids`, fieldset: [`name`], isFullList: false }], - fieldset: [`name`, `committee_id`] + fieldset: [`name`, `committee_id`], + follow: [{ idField: `group_ids`, fieldset: [`name`], isFullList: false }] }, { idField: `gender_id`, fieldset: [`name`] } ] diff --git a/client/src/app/site/pages/organization/pages/organization-tags/organization-tags.subscription.ts b/client/src/app/site/pages/organization/pages/organization-tags/organization-tags.subscription.ts index 17082e45aa..86b233b8e3 100644 --- a/client/src/app/site/pages/organization/pages/organization-tags/organization-tags.subscription.ts +++ b/client/src/app/site/pages/organization/pages/organization-tags/organization-tags.subscription.ts @@ -9,6 +9,6 @@ export const getOrganizationTagListSubscriptionConfig: SubscriptionConfigGenerat modelRequest: { viewModelCtor: ViewOrganization, ids: [ORGANIZATION_ID], - follow: [`organization_tag_ids`] + follow: [{ idField: `organization_tag_ids` }] } }); From e67947604959b0aec8dc83674ad719d62de5f197 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Fri, 15 Nov 2024 11:49:47 +0100 Subject: [PATCH 03/27] Fix projection flicker on data change (#4351) --- .../components/projector/projector.component.html | 2 +- .../components/projector/projector.component.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html b/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html index cb4fac75e9..e6a66668fe 100644 --- a/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html +++ b/client/src/app/site/pages/meetings/modules/projector/components/projector/projector.component.html @@ -44,7 +44,7 @@ @if (projector!.show_clock) { } - @for (slide of slides | async; track slide) { + @for (slide of slides | async; track slide.id) {
[]> = new Observable[]>(); + public slides: Observable<(SlideData & { id: Id })[]> = new Observable< + (SlideData & { id: Id })[] + >(); /** * Info about if the user is offline. @@ -160,13 +162,14 @@ export class ProjectorComponent extends BaseUiComponent implements OnDestroy { (projector?.current_projections || []).map( projection => ({ + id: projection.id, collection: projection.content?.collection, data: projection.content, stable: !!projection.stable, type: projection.type || ``, options: projection.options || {}, ...(!!projection.content?.[`error`] && { error: projection.content[`error`] }) - }) as SlideData + }) as SlideData & { id: Id } ) ) ) From ed784a4a7da26d857aa5a3aa854856480673549c Mon Sep 17 00:00:00 2001 From: anbebe <58171814+anbebe@users.noreply.github.com> Date: Fri, 15 Nov 2024 11:53:27 +0100 Subject: [PATCH 04/27] Fix motion favorite icon for public access users (#4353) --- .../motion-manage-title/motion-manage-title.component.html | 1 + .../motion-manage-title/motion-manage-title.component.ts | 3 +++ .../components/motion-view/motion-view.component.html | 1 + 3 files changed, 5 insertions(+) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.html index ee6d55df7e..68330239c0 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.html @@ -26,6 +26,7 @@ class="primary-accent-by-theme" mat-icon-button matTooltipPosition="right" + [hidden]="publicAccess" matTooltip="{{ 'Mark as personal favorite' | translate }}" (click)="setFavorite(!isFavorite)" > diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.ts index ab5cbe55cb..d84f844229 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-manage-title/motion-manage-title.component.ts @@ -31,6 +31,9 @@ export class MotionManageTitleComponent extends BaseMotionDetailChildComponent { return this._changeRecoMode; } + @Input() + public publicAccess: boolean; + @Output() public updateCrMode = new EventEmitter(); diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-view/motion-view.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-view/motion-view.component.html index 17c53385cd..15da866340 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-view/motion-view.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-view/motion-view.component.html @@ -140,6 +140,7 @@

From 1a84c60a7a77216ccb0df868126f9d84d20d21ae Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Fri, 15 Nov 2024 12:38:55 +0100 Subject: [PATCH 05/27] Improve empty reason detection and clean empty `p` tags in os-editor if text empty (#4354) --- .../components/motion-content/motion-content.component.html | 2 +- .../components/motion-content/motion-content.component.ts | 4 ++++ .../ui/modules/editor/components/editor/editor.component.ts | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.html index 39c4a0bc59..3f2ce3d65a 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.html @@ -55,7 +55,7 @@
- @if (motion.reason) { + @if (showReason) {

{{ 'Reason' | translate }}

diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.ts index ee17a34d5e..ef7a0d8150 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-view/components/motion-content/motion-content.component.ts @@ -73,6 +73,10 @@ export class MotionContentComponent extends BaseMotionDetailChildComponent { return this.motion.showPreamble; } + public get showReason(): boolean { + return !!this.motion.reason?.replace(/

/, ``).replace(/<\/p>/, ``).trim(); + } + public get canChangeMetadata(): boolean { return this.perms.isAllowed(`change_metadata`, this.motion); } diff --git a/client/src/app/ui/modules/editor/components/editor/editor.component.ts b/client/src/app/ui/modules/editor/components/editor/editor.component.ts index ab64af22e2..65b24776cf 100644 --- a/client/src/app/ui/modules/editor/components/editor/editor.component.ts +++ b/client/src/app/ui/modules/editor/components/editor/editor.component.ts @@ -437,6 +437,10 @@ export class EditorComponent extends BaseFormControlComponent implements unwrapNode(listParagraphs.item(i)); } + if (!this.editor.getText()) { + return ``; + } + return dom.body.innerHTML; } } From 9b905d7b3b1f1a718b4974603f117742dc61c2a6 Mon Sep 17 00:00:00 2001 From: anbebe <58171814+anbebe@users.noreply.github.com> Date: Mon, 18 Nov 2024 09:36:23 +0100 Subject: [PATCH 06/27] Add warning text for public access setting (#4350) --- ...ting-settings-group-detail-field.component.html | 9 ++++++++- ...eeting-settings-group-detail-field.component.ts | 12 ++++++++++++ .../meeting-settings-definitions.ts | 14 +++++++++++++- 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html index 34cee03cea..19f56cb608 100644 --- a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html +++ b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html @@ -95,7 +95,14 @@

{{ setting.label | translate }} @if (setting.helpText) { - {{ setting.helpText | translate }} + + {{ setting.helpText | translate }} + + } + @if (getWarning()) { + + {{ setting.warnText | translate }} + } @if (error) {
{{ error }}
diff --git a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts index 79b76f94be..7c3d0b6772 100644 --- a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts +++ b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts @@ -274,6 +274,18 @@ export class MeetingSettingsGroupDetailFieldComponent extends BaseComponent impl this.cd.detach(); } + /** + * Checks if a warning should be given + * + */ + public getWarning(): boolean { + if (this.setting.warn) { + return this.setting.warn(this.orgaSettings); + } else { + return false; + } + } + public getRestrictedValue(value: T): T { if (this.setting.restrictionFn) { return this.setting.restrictionFn(this.orgaSettings, value); diff --git a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts index 2647b28af6..d5fdb3775f 100644 --- a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts +++ b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts @@ -60,6 +60,7 @@ export interface SettingsInput { // alternative to `choices`; overwrites `choices` if both are given choicesFunc?: ChoicesFunctionDefinition; helpText?: string; // default: "" + warnText?: string; // default: "" indentation?: number; // default: 0. Indents the input field by the given amount to simulate nested settings validators?: ValidatorFn[]; // default: [] automaticChangesSetting?: SettingsItemAutomaticChangeSetting; @@ -88,6 +89,13 @@ export interface SettingsInput { * @returns whether to disable the setting or not */ forbidden?: (meetingView: ViewMeeting) => boolean; + /** + * A function to conditionally give a warning depending on used organization's settings + * + * @param orgaSettings: The `OrganizationSettingsService` has to be passed, because it is not injected in the + * settings definitions + */ + warn?: (orgaSettings: OrganizationSettingsService) => boolean; hide?: boolean; // Hide the setting in the settings view } @@ -207,7 +215,11 @@ export const meetingSettings: SettingsGroup[] = fillInSettingsDefaults([ type: `boolean`, helpText: _( `Enables public access to this meeting without login data. Permissions can be set after activation in the new group 'Public'.` - ) + ), + warnText: _( + `The public access setting is deactivated for the organization. Please contact your admins or hosting providers to activate the setting.` + ), + warn: orgaSettings => !orgaSettings.instant(`enable_anonymous`) } ] }, From 05b33aa6f9f69cdc5ce95d607e999d5459953afb Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Mon, 18 Nov 2024 10:41:02 +0100 Subject: [PATCH 07/27] Fix concurrent autoupdate single requests (#4344) --- .../app/site/services/auth-check.service.ts | 2 +- .../autoupdate-communication.service.ts | 10 +++++++--- .../services/autoupdate/autoupdate.service.ts | 20 ++++++++++++++----- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/client/src/app/site/services/auth-check.service.ts b/client/src/app/site/services/auth-check.service.ts index 36c42aab37..8514bd9ff6 100644 --- a/client/src/app/site/services/auth-check.service.ts +++ b/client/src/app/site/services/auth-check.service.ts @@ -97,7 +97,7 @@ export class AuthCheckService { if (typeof info === `string`) { meetingIdString = this.osRouter.getMeetingId(info); } - if (Number.isNaN(Number(meetingIdString))) { + if (Number.isNaN(Number(meetingIdString)) || +meetingIdString <= 0) { return false; } await this.fetchMeetingIfNotExists(+meetingIdString); diff --git a/client/src/app/site/services/autoupdate/autoupdate-communication.service.ts b/client/src/app/site/services/autoupdate/autoupdate-communication.service.ts index 8d00f2e86f..c0ae037ec0 100644 --- a/client/src/app/site/services/autoupdate/autoupdate-communication.service.ts +++ b/client/src/app/site/services/autoupdate/autoupdate-communication.service.ts @@ -36,7 +36,7 @@ import { SUBSCRIPTION_SUFFIX } from '../model-request.service'; }) export class AutoupdateCommunicationService { private autoupdateDataObservable: Observable; - private openResolvers = new Map) => void>(); + private openResolvers = new Map) => void)[]>(); private endpointName: string; private autoupdateEndpointStatus: 'healthy' | 'unhealthy' = `healthy`; private unhealtyTimeout: any; @@ -130,7 +130,11 @@ export class AutoupdateCommunicationService { public open(streamId: Id | null, description: string, request: ModelRequest, params = {}): Promise { return new Promise((resolve, reject) => { const requestHash = djb2hash(JSON.stringify(request)); - this.openResolvers.set(requestHash, resolve); + if (this.openResolvers.has(requestHash)) { + this.openResolvers.get(requestHash).push(resolve); + } else { + this.openResolvers.set(requestHash, [resolve]); + } this.sharedWorker .sendMessage(`autoupdate`, { action: `open`, @@ -298,7 +302,7 @@ export class AutoupdateCommunicationService { return; } - this.openResolvers.get(data.content.requestHash)(data.content?.streamId); + this.openResolvers.get(data.content.requestHash).forEach(r => r(data.content?.streamId)); this.openResolvers.delete(data.content.requestHash); } diff --git a/client/src/app/site/services/autoupdate/autoupdate.service.ts b/client/src/app/site/services/autoupdate/autoupdate.service.ts index d8644f9c7f..58556c129a 100644 --- a/client/src/app/site/services/autoupdate/autoupdate.service.ts +++ b/client/src/app/site/services/autoupdate/autoupdate.service.ts @@ -71,7 +71,7 @@ export class AutoupdateService { private _activeRequestObjects: AutoupdateSubscriptionMap = {}; private _mutex = new Mutex(); private _currentQueryParams: QueryParams | null = null; - private _resolveDataReceived: ((value: ModelData) => void)[] = []; + private _resolveDataReceived: { [key: number]: ((value: ModelData) => void)[] } = []; public constructor( private httpEndpointService: HttpStreamEndpointService, @@ -224,8 +224,13 @@ export class AutoupdateService { ); let rejectReceivedData: any; + let resolveIdx: number; const receivedData = new Promise((resolve, reject) => { - this._resolveDataReceived[id] = resolve; + if (this._resolveDataReceived[id]) { + resolveIdx = this._resolveDataReceived[id].push(resolve) - 1; + } else { + this._resolveDataReceived[id] = [resolve]; + } rejectReceivedData = reject; }); receivedData.catch((e: Error) => { @@ -238,9 +243,9 @@ export class AutoupdateService { close: (): void => { this.communication.close(id); delete this._activeRequestObjects[id]; - if (this._resolveDataReceived[id]) { + if (this._resolveDataReceived[id] && this._resolveDataReceived[id][resolveIdx]) { rejectReceivedData(new Error(`Connection canceled`)); - delete this._resolveDataReceived[id]; + delete this._resolveDataReceived[id][resolveIdx]; } console.debug(`[autoupdate] stream closed:`, description); @@ -323,7 +328,12 @@ export class AutoupdateService { this.communication.cleanupCollections(requestId, deletedModels); if (this._resolveDataReceived[requestId]) { - this._resolveDataReceived[requestId](modelData); + for (let i = 0; i < this._resolveDataReceived[requestId].length; i++) { + if (this._resolveDataReceived[requestId][i]) { + this._resolveDataReceived[requestId][i](modelData); + delete this._resolveDataReceived[requestId][i]; + } + } delete this._resolveDataReceived[requestId]; } } From 0c4ec2a25021b4c056590e9d1e3c25810d25136f Mon Sep 17 00:00:00 2001 From: Viktoriia Krasnovyd <114735598+vkrasnovyd@users.noreply.github.com> Date: Mon, 18 Nov 2024 11:58:27 +0100 Subject: [PATCH 08/27] Fix time menu click area (#4125) --- .../speaking-times.component.scss | 36 ++++++++++++++----- .../autopilot/autopilot.component.scss | 5 +++ 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.scss b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.scss index 9bfa685e8a..e5efc1c71e 100644 --- a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.scss +++ b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.scss @@ -1,23 +1,43 @@ +@import 'src/assets/styles/variables.scss'; + .structure-level-list { - display: flex; - flex-wrap: wrap; + $auto-sizing: auto-fill; + $column-min-width: 186px; + justify-content: start; padding: 8px 25px 0 25px; + display: grid; + column-gap: 16px; + grid-template-columns: repeat($auto-sizing, minmax($column-min-width, max-content)); + + @media (max-width: 1383px) { + $auto-sizing: auto-fit; + } + + @include phone { + $column-min-width: 159px; + padding: 0; + margin-right: -20px; + column-gap: 5px; + } + .structure-level { - min-width: 33%; margin-bottom: 16px; display: flex; flex-direction: row; justify-content: end; + width: min(222px, 100%); - .structure-level-content { - width: 100%; + @include phone { + width: min(186px, 100%); + } + .structure-level-content { .structure-level-color { height: 3px; background-color: transparent; - margin-left: 10%; - width: calc(100% - margin-left); + margin-right: 0; + width: 111px; border-width: 0; border-radius: 7px; } @@ -32,11 +52,11 @@ .structure-level-name { line-height: 1; text-align: right; + word-break: break-word; } } .icon-less-space-to-left { - width: 25px; margin-top: 12px; } } diff --git a/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss b/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss index dbd5b3e805..5b92fdc1b2 100644 --- a/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss +++ b/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot/autopilot.component.scss @@ -36,4 +36,9 @@ max-width: 1320px; } } + @media (min-width: 1050px) and (max-width: 1440px) { + .col-right { + max-width: 304px; + } + } } From af83540470b712d632a79083214dc3101edd8d9c Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Mon, 18 Nov 2024 12:01:32 +0100 Subject: [PATCH 09/27] Fix display of amendment from amendment (#4312) --- .../amendment-create-wizard.component.html | 14 +++++++++----- .../amendment-create-wizard.component.scss | 4 ++++ .../amendment-create-wizard.component.ts | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html index 1e3495d74f..b716d9a1fd 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.html @@ -68,15 +68,19 @@

{{ 'New amendment' | translate }}

}
- @if (paragraph.lineFrom >= paragraph.lineTo) { + @let currentParagraphLineFrom = + isAmendmentOfAmendment ? diffedParagraphs[i].lineFrom : paragraph.lineFrom; + @let currentParagraphLineTo = + isAmendmentOfAmendment ? diffedParagraphs[i].lineTo : paragraph.lineTo; + @if (currentParagraphLineFrom >= currentParagraphLineTo) { - {{ 'Line' | translate }} {{ paragraph.lineFrom }}: + {{ 'Line' | translate }} {{ currentParagraphLineFrom }}: } - @if (paragraph.lineFrom < paragraph.lineTo) { + @if (currentParagraphLineFrom < currentParagraphLineTo) { - {{ 'Line' | translate }} {{ paragraph.lineFrom }} - - {{ paragraph.lineTo }}: + {{ 'Line' | translate }} {{ currentParagraphLineFrom }} - + {{ currentParagraphLineTo }}: }
diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss index f753416445..ef15fd4d99 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.scss @@ -25,6 +25,10 @@ } .paragraph-text { flex: 1; + + .insert { + text-decoration: underline !important; + } } } diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts index 7d14f84fff..c7f0e6b060 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/amendment-create-wizard/amendment-create-wizard.component.ts @@ -46,7 +46,7 @@ export class AmendmentCreateWizardComponent extends BaseMeetingComponent impleme /** * determine if we are in the amendment of amendment mode */ - private isAmendmentOfAmendment = false; + public isAmendmentOfAmendment = false; /** * Change recommendation content. From cf7d018079673be13dac16a0cb5c7eb051052151 Mon Sep 17 00:00:00 2001 From: anbebe <58171814+anbebe@users.noreply.github.com> Date: Mon, 18 Nov 2024 13:24:54 +0100 Subject: [PATCH 10/27] Fixed login buttons positioning (#4357) --- .../components/login-mask/login-mask.component.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.html b/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.html index de09a93398..6f548a64d9 100644 --- a/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.html +++ b/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.html @@ -40,15 +40,13 @@

> {{ samlLoginButtonText || 'SAML Login' | translate }} -
@if (guestsEnabled) { } -
Date: Wed, 20 Nov 2024 09:27:02 +0100 Subject: [PATCH 11/27] Bump the ngx-translate group in /client with 2 updates (#4315) --- client/cli/generate-settings-defaults.ts | 2 +- client/package-lock.json | 55 +++++-------- client/package.json | 5 +- .../definitions/meeting-settings-defaults.ts | 2 +- .../domain/definitions/permission.config.ts | 2 +- .../app/domain/models/agenda/agenda-item.ts | 2 +- .../models/mediafiles/mediafile.constants.ts | 2 +- .../app/domain/models/poll/poll-constants.ts | 2 +- .../models/projector/projection-default.ts | 2 +- .../app/domain/models/users/user.constants.ts | 2 +- client/src/app/domain/models/users/user.ts | 2 +- .../gateways/error-mapping/error-map-utils.ts | 2 +- .../poll-candidate-list-repository.service.ts | 2 +- .../structure-level-repository.service.ts | 2 +- .../errors/prevented-in-demo.error.ts | 2 +- .../infrastructure/errors/process.error.ts | 2 +- .../utils/import/import-step.ts | 2 +- .../utils/import/json-import-file-utils.ts | 2 +- .../openslides-main.component.ts | 13 ++- .../account-button.component.ts | 2 +- .../global-search/global-search.component.ts | 2 +- .../services/voting-banner.service.ts | 2 +- .../translations/marked-translations.ts | 2 +- .../openslides-translation.module.ts | 61 +++++--------- .../openslides-translation.service.ts | 82 ------------------- .../translations/translation-parser.ts | 60 -------------- .../translation-pruning-loader.ts | 38 +++++++-- .../services/user-delete-dialog.service.ts | 2 +- .../definitions/index.ts | 2 +- .../login-mask/login-mask.component.ts | 2 +- .../detail-view/detail-view.component.ts | 2 +- .../base-poll-vote.component.ts | 2 +- .../poll-key-verbose/poll-key-verbose.pipe.ts | 2 +- .../services/entitled-user-filter.service.ts | 2 +- .../services/voting.service/voting.service.ts | 2 +- .../components/poll-slide.component.ts | 2 +- .../modules/slides/definitions/slides.ts | 2 +- .../modules/projector/projector.module.ts | 4 +- .../topics/definitions/topics.constants.ts | 2 +- .../topic-poll-dialog.component.ts | 2 +- .../topic-poll-vote.component.ts | 2 +- .../modules/topic-poll/definitions/index.ts | 2 +- .../topic-import.service.ts | 2 +- .../agenda-item-list.component.ts | 2 +- .../agenda-item-filter.service.ts | 2 +- .../pages/assignments/definitions/index.ts | 2 +- .../assignment-poll-vote.component.ts | 2 +- .../assignment-poll/definitions/index.ts | 2 +- .../services/assignment-poll.service.ts | 2 +- .../view-models/view-assignment.ts | 2 +- .../autopilot-settings.component.ts | 2 +- .../action-bar/action-bar.component.ts | 2 +- .../components/call/call.component.ts | 2 +- .../video-player/video-player.component.ts | 2 +- .../services/interaction-receive.service.ts | 2 +- .../operator-media-permission.service.ts | 2 +- ...g-settings-group-detail-field.component.ts | 2 +- .../meeting-settings-group-list.component.ts | 4 +- .../services/motion-multiselect.service.ts | 2 +- .../motion-poll-dialog.component.ts | 2 +- .../modules/motion-poll/definitions/index.ts | 2 +- .../comment-section-list.component.ts | 2 +- ...-change-recommendation-dialog.component.ts | 2 +- .../workflow-detail.component.ts | 2 +- .../motion-xlsx-export.service.ts | 2 +- .../motion-list-base-sort.service.ts | 2 +- .../motion-list-filter.service.ts | 2 +- .../pages/motions/view-models/view-motion.ts | 2 +- .../speaker-csv-export.service.ts | 2 +- .../participant-detail-view.component.ts | 2 +- .../participant-import.service.ts | 2 +- .../participant-list.component.ts | 2 +- .../participant-list-filter.service.ts | 2 +- .../participant-list-sort.service.ts | 2 +- .../participant-presence.component.ts | 2 +- ...participant-speaker-list-filter.service.ts | 2 +- .../participant-speaker-list-sort.service.ts | 2 +- .../pages/polls/view-models/view-option.ts | 2 +- .../projector-edit-dialog.component.ts | 2 +- .../projector-detail.component.ts | 2 +- .../current-speaker-chyron-slide.service.ts | 2 +- .../projector-list-entry.component.ts | 2 +- .../view-models/view-projector-countdown.ts | 2 +- .../meeting-settings-definitions.ts | 2 +- .../account-add-to-meetings.component.ts | 2 +- .../account-detail.component.ts | 2 +- .../pages/account-import/definitions/index.ts | 2 +- .../account-import.service.ts | 2 +- .../account-list/account-list.component.ts | 2 +- .../account-sort.service.ts | 2 +- .../common/account-controller.service.ts | 2 +- .../services/common/account-filter.service.ts | 2 +- .../committee-detail-edit.component.ts | 2 +- .../meeting-edit/meeting-edit.component.ts | 2 +- .../committee-import/definitions/index.ts | 2 +- .../committee-import.service.ts | 2 +- .../committee-list.component.ts | 2 +- .../committee-filter.service.ts | 2 +- .../committee-sort.service.ts | 2 +- .../theme-list/theme-list.component.ts | 2 +- .../meeting-list/meeting-list.component.ts | 2 +- .../services/meeting-export.service.ts | 2 +- .../meeting-list-filter.service.ts | 2 +- .../meeting-list-sort.service.ts | 2 +- .../organization-statistics.component.ts | 2 +- .../organization-settings.component.ts | 2 +- .../services/autoupdate/autoupdate.service.ts | 2 +- .../services/connection-status.service.ts | 2 +- .../file-list/file-list.component.ts | 2 +- .../import-list/import-list.component.ts | 2 +- .../backend-import-list.component.ts | 2 +- .../base-search-selector.component.ts | 2 +- .../components/spinner/spinner.component.ts | 2 +- 113 files changed, 189 insertions(+), 341 deletions(-) delete mode 100644 client/src/app/site/modules/translations/openslides-translation.service.ts delete mode 100644 client/src/app/site/modules/translations/translation-parser.ts diff --git a/client/cli/generate-settings-defaults.ts b/client/cli/generate-settings-defaults.ts index 80bad33fbd..60c1d79aaf 100644 --- a/client/cli/generate-settings-defaults.ts +++ b/client/cli/generate-settings-defaults.ts @@ -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 } = { diff --git a/client/package-lock.json b/client/package-lock.json index 1c40b2bf2b..a133d670c6 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -23,8 +23,8 @@ "@angular/service-worker": "^18.2.11", "@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", @@ -81,7 +81,6 @@ "@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", "@types/file-saver": "^2.0.7", "@types/jasmine": "~5.1.4", "@types/js-yaml": "^4.0.9", @@ -2680,19 +2679,6 @@ "node": ">=0.1.90" } }, - "node_modules/@colsen1991/ngx-translate-extract-marker": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@colsen1991/ngx-translate-extract-marker/-/ngx-translate-extract-marker-3.0.1.tgz", - "integrity": "sha512-faQeH8zTKB8U+7kdsL54Mj48uJuMKhZ0/t2qONrxyBE5GwWGWxTf778cBi4UR23nOmBzo8A2fyEXCY0gtdkOVQ==", - "dev": true, - "dependencies": { - "tslib": "^2.3.0" - }, - "peerDependencies": { - "@angular/common": ">=14.2.0", - "@angular/core": ">=14.2.0" - } - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -4119,30 +4105,27 @@ } }, "node_modules/@ngx-translate/core": { - "version": "15.0.0", - "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-15.0.0.tgz", - "integrity": "sha512-Am5uiuR0bOOxyoercDnAA3rJVizo4RRqJHo8N3RqJ+XfzVP/I845yEnMADykOHvM6HkVm4SZSnJBOiz0Anx5BA==", - "engines": { - "node": "^16.13.0 || >=18.10.0" + "version": "16.0.3", + "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-16.0.3.tgz", + "integrity": "sha512-UPse66z9tRUmIpeorYodXBQY6O4foUmj9jy9cCuuja7lqdOwRBWPzCWqc+qYIXv5L2QoqZdxgHtqoUz+Q9weSA==", + "dependencies": { + "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/common": ">=16.0.0", - "@angular/core": ">=16.0.0", - "rxjs": "^6.5.5 || ^7.4.0" + "@angular/common": ">=16", + "@angular/core": ">=16" } }, "node_modules/@ngx-translate/http-loader": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/@ngx-translate/http-loader/-/http-loader-8.0.0.tgz", - "integrity": "sha512-SFMsdUcmHF5OdZkL1CHEoSAwbP5EbAOPTLLboOCRRoOg21P4GJx+51jxGdJeGve6LSKLf4Pay7BkTwmE6vxYlg==", - "engines": { - "node": "^16.13.0 || >=18.10.0" + "version": "16.0.0", + "resolved": "https://registry.npmjs.org/@ngx-translate/http-loader/-/http-loader-16.0.0.tgz", + "integrity": "sha512-l3okOHGVxZ1Bm55OpakSfXvI2yYmVmhYqgwGU4aIQIRUqpkBCrSDZnmrHTcZfsGJzXKB5E2D2rko9i28gBijmA==", + "dependencies": { + "tslib": "^2.3.0" }, "peerDependencies": { - "@angular/common": ">=16.0.0", - "@angular/core": ">=16.0.0", - "@ngx-translate/core": ">=15.0.0", - "rxjs": "^6.5.5 || ^7.4.0" + "@angular/common": ">=16", + "@angular/core": ">=16" } }, "node_modules/@nodelib/fs.scandir": { @@ -6296,9 +6279,9 @@ "dev": true }, "node_modules/@vendure/ngx-translate-extract": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@vendure/ngx-translate-extract/-/ngx-translate-extract-9.2.1.tgz", - "integrity": "sha512-3empvzbVC0MY9hXlqU6wXYQuy4L5UIDDqChATzfagdP7bazyZRhLN2Wes7RmOtucXotB1VFgjZ7Fbbp0Tepxiw==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/@vendure/ngx-translate-extract/-/ngx-translate-extract-9.3.0.tgz", + "integrity": "sha512-2cm0LUAtWtdXITdbjfTCiQgMCi8yozQuMcH/cuqH3VNNsQFs3fSX3gp14sFmMlmiwZ7repPIOcD5uv+gCzb5xA==", "dev": true, "dependencies": { "@phenomnomnominal/tsquery": "^6.1.3", diff --git a/client/package.json b/client/package.json index c75c49956e..5495e1cf40 100644 --- a/client/package.json +++ b/client/package.json @@ -50,8 +50,8 @@ "@angular/service-worker": "^18.2.11", "@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", @@ -108,7 +108,6 @@ "@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", "@types/file-saver": "^2.0.7", "@types/jasmine": "~5.1.4", "@types/js-yaml": "^4.0.9", diff --git a/client/src/app/domain/definitions/meeting-settings-defaults.ts b/client/src/app/domain/definitions/meeting-settings-defaults.ts index 73a0100c2b..6850103d71 100644 --- a/client/src/app/domain/definitions/meeting-settings-defaults.ts +++ b/client/src/app/domain/definitions/meeting-settings-defaults.ts @@ -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`, diff --git a/client/src/app/domain/definitions/permission.config.ts b/client/src/app/domain/definitions/permission.config.ts index 38b8cd94fc..1ce0c64430 100644 --- a/client/src/app/domain/definitions/permission.config.ts +++ b/client/src/app/domain/definitions/permission.config.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { Permission } from './permission'; diff --git a/client/src/app/domain/models/agenda/agenda-item.ts b/client/src/app/domain/models/agenda/agenda-item.ts index 6caeaf72cc..6388ee9074 100644 --- a/client/src/app/domain/models/agenda/agenda-item.ts +++ b/client/src/app/domain/models/agenda/agenda-item.ts @@ -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'; diff --git a/client/src/app/domain/models/mediafiles/mediafile.constants.ts b/client/src/app/domain/models/mediafiles/mediafile.constants.ts index 37d24523f3..d23cfd06f6 100644 --- a/client/src/app/domain/models/mediafiles/mediafile.constants.ts +++ b/client/src/app/domain/models/mediafiles/mediafile.constants.ts @@ -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`), diff --git a/client/src/app/domain/models/poll/poll-constants.ts b/client/src/app/domain/models/poll/poll-constants.ts index 053e695478..88ae61658f 100644 --- a/client/src/app/domain/models/poll/poll-constants.ts +++ b/client/src/app/domain/models/poll/poll-constants.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { OptionDataKey, PollDataKey } from './generic-poll'; diff --git a/client/src/app/domain/models/projector/projection-default.ts b/client/src/app/domain/models/projector/projection-default.ts index 52fa02d371..2efc01a062 100644 --- a/client/src/app/domain/models/projector/projection-default.ts +++ b/client/src/app/domain/models/projector/projection-default.ts @@ -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`, diff --git a/client/src/app/domain/models/users/user.constants.ts b/client/src/app/domain/models/users/user.constants.ts index aac477bdea..b7c45a2559 100644 --- a/client/src/app/domain/models/users/user.constants.ts +++ b/client/src/app/domain/models/users/user.constants.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { User } from './user'; diff --git a/client/src/app/domain/models/users/user.ts b/client/src/app/domain/models/users/user.ts index 4389fdd324..3ed468de04 100644 --- a/client/src/app/domain/models/users/user.ts +++ b/client/src/app/domain/models/users/user.ts @@ -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'; diff --git a/client/src/app/gateways/error-mapping/error-map-utils.ts b/client/src/app/gateways/error-mapping/error-map-utils.ts index 0d8fe5670d..9e3ac60c4b 100644 --- a/client/src/app/gateways/error-mapping/error-map-utils.ts +++ b/client/src/app/gateways/error-mapping/error-map-utils.ts @@ -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'; diff --git a/client/src/app/gateways/repositories/poll-candidate-lists/poll-candidate-list/poll-candidate-list-repository.service.ts b/client/src/app/gateways/repositories/poll-candidate-lists/poll-candidate-list/poll-candidate-list-repository.service.ts index a51f05c1ed..f3a59a1e0b 100644 --- a/client/src/app/gateways/repositories/poll-candidate-lists/poll-candidate-list/poll-candidate-list-repository.service.ts +++ b/client/src/app/gateways/repositories/poll-candidate-lists/poll-candidate-list/poll-candidate-list-repository.service.ts @@ -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'; diff --git a/client/src/app/gateways/repositories/structure-levels/structure-level-repository.service.ts b/client/src/app/gateways/repositories/structure-levels/structure-level-repository.service.ts index c139b63a14..52af59d5c5 100644 --- a/client/src/app/gateways/repositories/structure-levels/structure-level-repository.service.ts +++ b/client/src/app/gateways/repositories/structure-levels/structure-level-repository.service.ts @@ -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'; diff --git a/client/src/app/infrastructure/errors/prevented-in-demo.error.ts b/client/src/app/infrastructure/errors/prevented-in-demo.error.ts index 316428c5f4..2fd8f047b0 100644 --- a/client/src/app/infrastructure/errors/prevented-in-demo.error.ts +++ b/client/src/app/infrastructure/errors/prevented-in-demo.error.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; /** * Define custom error classes here diff --git a/client/src/app/infrastructure/errors/process.error.ts b/client/src/app/infrastructure/errors/process.error.ts index 6cd0ebe208..6f94b5da59 100644 --- a/client/src/app/infrastructure/errors/process.error.ts +++ b/client/src/app/infrastructure/errors/process.error.ts @@ -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; diff --git a/client/src/app/infrastructure/utils/import/import-step.ts b/client/src/app/infrastructure/utils/import/import-step.ts index 61d40144be..8addcdf2f7 100644 --- a/client/src/app/infrastructure/utils/import/import-step.ts +++ b/client/src/app/infrastructure/utils/import/import-step.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; export enum ImportStepPhase { ENQUEUED, diff --git a/client/src/app/infrastructure/utils/import/json-import-file-utils.ts b/client/src/app/infrastructure/utils/import/json-import-file-utils.ts index 9ac39559e1..ae90bbc91f 100644 --- a/client/src/app/infrastructure/utils/import/json-import-file-utils.ts +++ b/client/src/app/infrastructure/utils/import/json-import-file-utils.ts @@ -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'; diff --git a/client/src/app/openslides-main-module/components/openslides-main/openslides-main.component.ts b/client/src/app/openslides-main-module/components/openslides-main/openslides-main.component.ts index f23643a952..164d397e55 100644 --- a/client/src/app/openslides-main-module/components/openslides-main/openslides-main.component.ts +++ b/client/src/app/openslides-main-module/components/openslides-main/openslides-main.component.ts @@ -14,6 +14,7 @@ import { overloadJsFunctions } from 'src/app/infrastructure/utils/overload-js-fu import { Deferred } from 'src/app/infrastructure/utils/promises'; import { BaseViewModel } from 'src/app/site/base/base-view-model'; import { UpdateService } from 'src/app/site/modules/site-wrapper/services/update.service'; +import { CustomTranslationService } from 'src/app/site/modules/translations/custom-translation.service'; import { LifecycleService } from 'src/app/site/services/lifecycle.service'; import { OpenSlidesService } from 'src/app/site/services/openslides.service'; import { OpenSlidesStatusService } from 'src/app/site/services/openslides-status.service'; @@ -40,6 +41,7 @@ export class OpenSlidesMainComponent implements OnInit { private domSanitizer: DomSanitizer, private openslidesStatus: OpenSlidesStatusService, private matIconRegistry: MatIconRegistry, + private ctService: CustomTranslationService, private translate: TranslateService, private storageService: StorageService, private config: DateFnsConfigurationService, @@ -57,13 +59,13 @@ export class OpenSlidesMainComponent implements OnInit { private loadTranslation(): void { // manually add the supported languages this.translate.addLangs(Object.keys(availableTranslations)); - // this language will be used as a fallback when a translation isn't found in the current language - this.translate.setDefaultLang(`en`); // get the browsers default language const browserLang = this.translate.getBrowserLang() as string; + let currentLang = `en`; // get language set in local storage this.storageService.get(CURRENT_LANGUAGE_STORAGE_KEY).then(lang => { + currentLang = lang as string; if (lang && this.translate.getLangs().includes(lang as string)) { this.translate.use(lang as string); } else { @@ -83,6 +85,13 @@ export class OpenSlidesMainComponent implements OnInit { // update date-fns locale this.updateLocaleByName(event.lang); + + currentLang = event.lang; + }); + + this.ctService.customTranslationSubject.subscribe(() => { + this.translate.reloadLang(`en`); + this.translate.reloadLang(currentLang); }); } diff --git a/client/src/app/site/modules/global-headbar/components/account-button/account-button.component.ts b/client/src/app/site/modules/global-headbar/components/account-button/account-button.component.ts index a3854feef7..b46c1c956d 100644 --- a/client/src/app/site/modules/global-headbar/components/account-button/account-button.component.ts +++ b/client/src/app/site/modules/global-headbar/components/account-button/account-button.component.ts @@ -114,7 +114,7 @@ export class AccountButtonComponent extends BaseUiComponent implements OnInit { } public selectLanguage(abbreviation: string): void { - this.translate.use(abbreviation).subscribe(); + this.translate.use(abbreviation); } public toggleOperatorPresence(): void { diff --git a/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts b/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts index 4c6ae8678c..4316b20535 100644 --- a/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts +++ b/client/src/app/site/modules/global-headbar/components/global-search/global-search.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnDestroy } from '@angular/core'; import { FormBuilder } from '@angular/forms'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { pairwise, startWith, Subscription } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; import { Permission } from 'src/app/domain/definitions/permission'; diff --git a/client/src/app/site/modules/site-wrapper/services/voting-banner.service.ts b/client/src/app/site/modules/site-wrapper/services/voting-banner.service.ts index cd18fb0361..8f9194b696 100644 --- a/client/src/app/site/modules/site-wrapper/services/voting-banner.service.ts +++ b/client/src/app/site/modules/site-wrapper/services/voting-banner.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { combineLatest, distinctUntilChanged, Subscription } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/modules/translations/marked-translations.ts b/client/src/app/site/modules/translations/marked-translations.ts index df3c34c088..1d163ab9d8 100644 --- a/client/src/app/site/modules/translations/marked-translations.ts +++ b/client/src/app/site/modules/translations/marked-translations.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; /** * Add strings here that require translations but have never been declared diff --git a/client/src/app/site/modules/translations/openslides-translation.module.ts b/client/src/app/site/modules/translations/openslides-translation.module.ts index 83d24c7a4f..745b042c80 100644 --- a/client/src/app/site/modules/translations/openslides-translation.module.ts +++ b/client/src/app/site/modules/translations/openslides-translation.module.ts @@ -1,58 +1,35 @@ import { HttpClient } from '@angular/common/http'; import { ModuleWithProviders, NgModule } from '@angular/core'; -import { - FakeMissingTranslationHandler, - MissingTranslationHandler, - TranslateCompiler, - TranslateFakeCompiler, - TranslateLoader, - TranslateModule, - TranslateParser, - TranslatePipe, - TranslateService, - TranslateStore, - USE_DEFAULT_LANG, - USE_STORE -} from '@ngx-translate/core'; +import { TranslateDirective, TranslateLoader, TranslateModule, TranslatePipe } from '@ngx-translate/core'; -import { OpenSlidesTranslationService } from './openslides-translation.service'; -import { OpenSlidesTranslateParser } from './translation-parser'; +import { CustomTranslationService } from './custom-translation.service'; import { PruningTranslationLoader } from './translation-pruning-loader'; @NgModule({ imports: [TranslateModule], - exports: [TranslatePipe] + exports: [TranslatePipe, TranslateDirective] }) export class OpenSlidesTranslationModule { public static forRoot(): ModuleWithProviders { - return { - ngModule: TranslateModule, - providers: [ - { provide: TranslateLoader, useClass: PruningTranslationLoader, deps: [HttpClient] }, - { provide: TranslateCompiler, useClass: TranslateFakeCompiler }, - { provide: TranslateParser, useClass: OpenSlidesTranslateParser }, - { provide: MissingTranslationHandler, useClass: FakeMissingTranslationHandler }, - TranslateStore, - { provide: USE_STORE, useValue: false }, - { provide: USE_DEFAULT_LANG, useValue: true }, - { provide: TranslateService, useClass: OpenSlidesTranslationService } - ] - }; + return TranslateModule.forRoot({ + defaultLanguage: `en`, + loader: { + provide: TranslateLoader, + useClass: PruningTranslationLoader, + deps: [CustomTranslationService, HttpClient] + } + }); } // no config store for child. public static forChild(): ModuleWithProviders { - return { - ngModule: TranslateModule, - providers: [ - { provide: TranslateLoader, useClass: PruningTranslationLoader, deps: [HttpClient] }, - { provide: TranslateCompiler, useClass: TranslateFakeCompiler }, - { provide: TranslateParser, useClass: OpenSlidesTranslateParser }, - { provide: MissingTranslationHandler, useClass: FakeMissingTranslationHandler }, - { provide: USE_STORE, useValue: false }, - { provide: USE_DEFAULT_LANG, useValue: true }, - { provide: TranslateService, useClass: OpenSlidesTranslationService } - ] - }; + return TranslateModule.forChild({ + defaultLanguage: `en`, + loader: { + provide: TranslateLoader, + useClass: PruningTranslationLoader, + deps: [CustomTranslationService, HttpClient] + } + }); } } diff --git a/client/src/app/site/modules/translations/openslides-translation.service.ts b/client/src/app/site/modules/translations/openslides-translation.service.ts deleted file mode 100644 index c426827064..0000000000 --- a/client/src/app/site/modules/translations/openslides-translation.service.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { Inject, Injectable } from '@angular/core'; -import { - MissingTranslationHandler, - TranslateCompiler, - TranslateLoader, - TranslateParser, - TranslateService, - TranslateStore, - USE_DEFAULT_LANG, - USE_STORE -} from '@ngx-translate/core'; -import { Observable, of } from 'rxjs'; - -/** - * Custom translate service. Wraps the get, stream and instant method not to throw an error, if null or undefined - * is passed as keys to them. This happens, if yet not resolved properties should be translated in the templates. - * Returns empty strings instead. - */ -@Injectable() -export class OpenSlidesTranslationService extends TranslateService { - /** - * See the ngx-translate TranslateService for docs. - * - * @param store - * @param currentLoader - * @param compiler - * @param parser - * @param missingTranslationHandler - * @param useDefaultLang - * @param isolate - */ - public constructor( - store: TranslateStore, - currentLoader: TranslateLoader, - compiler: TranslateCompiler, - parser: TranslateParser, - missingTranslationHandler: MissingTranslationHandler, - @Inject(USE_DEFAULT_LANG) useDefaultLang = true, - @Inject(USE_STORE) isolate = false - ) { - super(store, currentLoader, compiler, parser, missingTranslationHandler, useDefaultLang, isolate, true, `en`); - } - - /** - * Uses the original get function and returns an empty string instead of throwing an error. - * - * @override - */ - public override get(key: string | string[], interpolateParams?: unknown): Observable { - try { - return super.get(key, interpolateParams); - } catch { - return of(``); - } - } - - /** - * Uses the original key function and returns an empty string instead of throwing an error. - * - * @override - */ - public override stream(key: string | string[], interpolateParams?: unknown): Observable { - try { - return super.stream(key, interpolateParams); - } catch { - return of(``); - } - } - - /** - * Uses the original instant function and returns an empty string instead of throwing an error. - * - * @override - */ - public override instant(key: string | string[], interpolateParams?: unknown): string | any { - try { - return super.instant(key, interpolateParams); - } catch { - return ``; - } - } -} diff --git a/client/src/app/site/modules/translations/translation-parser.ts b/client/src/app/site/modules/translations/translation-parser.ts deleted file mode 100644 index 54126b5902..0000000000 --- a/client/src/app/site/modules/translations/translation-parser.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Injectable } from '@angular/core'; -import { TranslateDefaultParser, TranslateStore } from '@ngx-translate/core'; - -import { CustomTranslation, CustomTranslationService } from './custom-translation.service'; - -/** - * Custom translate parser. Intercepts and use custom translations from the organization settings service. - */ -@Injectable() -export class OpenSlidesTranslateParser extends TranslateDefaultParser { - /** - * Saves the custom translations retrieved from the config service - */ - private customTranslations: CustomTranslation = {}; - - /** - * Subscribes to the custom translations and watches for updated custom translations. - */ - public constructor( - ctService: CustomTranslationService, - private translateStore: TranslateStore - ) { - super(); - - ctService.customTranslationSubject.subscribe(ct => { - if (!ct) { - ct = {}; - } - this.customTranslations = ct; - // trigger reload of all languages. This does not hurt performance, - // in fact the directives and pipes just listen to the selected language. - this.translateStore.langs.forEach(lang => { - this.translateStore.onTranslationChange.emit({ - lang, - translations: this.translateStore.translations[lang] - }); - }); - }); - } - - /** - * Here, we actually intercept getting translations. This method is called from the - * TranslateService trying to retrieve a translation to the key. - * - * Here, the translation is searched and then overwritten by our custom translations, if - * the value exist. - * - * @param target The translation dict - * @param key The key to find the translation - */ - public override getValue(target: any, key: string): any { - const translation = super.getValue(target, key); - const customTranslationsKey = translation || key; // use the original string if no translation was found - if (customTranslationsKey && this.customTranslations.hasOwnProperty(customTranslationsKey)) { - return this.customTranslations[customTranslationsKey]; - } else { - return translation; - } - } -} diff --git a/client/src/app/site/modules/translations/translation-pruning-loader.ts b/client/src/app/site/modules/translations/translation-pruning-loader.ts index 4823b9ad02..cfdd7f4c88 100644 --- a/client/src/app/site/modules/translations/translation-pruning-loader.ts +++ b/client/src/app/site/modules/translations/translation-pruning-loader.ts @@ -1,8 +1,10 @@ import { HttpClient } from '@angular/common/http'; import { TranslateLoader } from '@ngx-translate/core'; import pofile from 'pofile'; -import { Observable, of } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { combineLatest, Observable } from 'rxjs'; +import { first, map } from 'rxjs/operators'; + +import { CustomTranslationService } from './custom-translation.service'; /** * Translation loader that replaces empty strings with nothing. @@ -28,7 +30,10 @@ export class PruningTranslationLoader implements TranslateLoader { * * @param http httpClient to load the translation files. */ - public constructor(private http: HttpClient) {} + public constructor( + private ctService: CustomTranslationService, + private http: HttpClient + ) {} /** * Loads a language file, stores the content, give it to the process function. @@ -36,12 +41,29 @@ export class PruningTranslationLoader implements TranslateLoader { */ public getTranslation(lang: string): Observable { if (lang != this.defaultLanguage) { - return this.http - .get(`${this.prefix}${lang}${this.suffix}`, { responseType: `text` }) - .pipe(map((content: string) => this.parse(content))); - } else { - return of({}); + return combineLatest([ + this.http + .get(`${this.prefix}${lang}${this.suffix}`, { responseType: `text` }) + .pipe(map((content: string) => this.parse(content))), + this.ctService.customTranslationSubject + ]).pipe( + map(([t, ct]) => { + if (ct) { + for (const k of Object.keys(t)) { + t[k] = ct[t[k]] || t[k]; + } + } + + return t; + }), + first() + ); } + + return this.ctService.customTranslationSubject.pipe( + map(ct => ct || {}), + first() + ); } private parse(content: string): any { diff --git a/client/src/app/site/modules/user-components/services/user-delete-dialog.service.ts b/client/src/app/site/modules/user-components/services/user-delete-dialog.service.ts index cfabbf006c..0fb42096aa 100644 --- a/client/src/app/site/modules/user-components/services/user-delete-dialog.service.ts +++ b/client/src/app/site/modules/user-components/services/user-delete-dialog.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { GetUserRelatedModelsPresenterResult, GetUserRelatedModelsPresenterService diff --git a/client/src/app/site/modules/wait-for-action-dialog/definitions/index.ts b/client/src/app/site/modules/wait-for-action-dialog/definitions/index.ts index ec29d049e6..6c418008d2 100644 --- a/client/src/app/site/modules/wait-for-action-dialog/definitions/index.ts +++ b/client/src/app/site/modules/wait-for-action-dialog/definitions/index.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; export interface WaitForActionData { workerId: number; diff --git a/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.ts b/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.ts index a8eecb1840..123f30fba3 100644 --- a/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.ts +++ b/client/src/app/site/pages/login/pages/login-mask/components/login-mask/login-mask.component.ts @@ -1,7 +1,7 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { filter, Observable, Subscription } from 'rxjs'; import { Meeting } from 'src/app/domain/models/meetings/meeting'; diff --git a/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts b/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts index 6a36959d8a..57da169c2e 100644 --- a/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts +++ b/client/src/app/site/pages/meetings/modules/meetings-component-collector/detail-view/components/detail-view/detail-view.component.ts @@ -8,7 +8,7 @@ import { Output } from '@angular/core'; import { ActivatedRoute, Router } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { Subscription } from 'rxjs'; import { Collection, Id } from 'src/app/domain/definitions/key-types'; import { ActiveMeetingService } from 'src/app/site/pages/meetings/services/active-meeting.service'; diff --git a/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.ts b/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.ts index d42b7e2afb..b282cd36c3 100644 --- a/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.ts +++ b/client/src/app/site/pages/meetings/modules/poll/components/base-poll-vote/base-poll-vote.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectorRef, Directive, inject, Input, OnInit } from '@angular/core'; import { UntypedFormControl, Validators } from '@angular/forms'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest, debounceTime, distinctUntilChanged, Observable, Subscription } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; import { diff --git a/client/src/app/site/pages/meetings/modules/poll/pipes/poll-key-verbose/poll-key-verbose.pipe.ts b/client/src/app/site/pages/meetings/modules/poll/pipes/poll-key-verbose/poll-key-verbose.pipe.ts index 06b47d3fe7..cc2b94d075 100644 --- a/client/src/app/site/pages/meetings/modules/poll/pipes/poll-key-verbose/poll-key-verbose.pipe.ts +++ b/client/src/app/site/pages/meetings/modules/poll/pipes/poll-key-verbose/poll-key-verbose.pipe.ts @@ -1,5 +1,5 @@ import { Pipe, PipeTransform } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; const PollValues: any = { votesvalid: `Valid votes`, diff --git a/client/src/app/site/pages/meetings/modules/poll/services/entitled-user-filter.service.ts b/client/src/app/site/pages/meetings/modules/poll/services/entitled-user-filter.service.ts index 083f2b45af..2b4d6e4cc7 100644 --- a/client/src/app/site/pages/meetings/modules/poll/services/entitled-user-filter.service.ts +++ b/client/src/app/site/pages/meetings/modules/poll/services/entitled-user-filter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseFilterListService, OsFilter } from 'src/app/site/base/base-filter.service'; import { ActiveFiltersService } from 'src/app/site/services/active-filters.service'; diff --git a/client/src/app/site/pages/meetings/modules/poll/services/voting.service/voting.service.ts b/client/src/app/site/pages/meetings/modules/poll/services/voting.service/voting.service.ts index fe14ce786c..b894002f2c 100644 --- a/client/src/app/site/pages/meetings/modules/poll/services/voting.service/voting.service.ts +++ b/client/src/app/site/pages/meetings/modules/poll/services/voting.service/voting.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { PollState, PollType } from 'src/app/domain/models/poll/poll-constants'; import { ViewPoll } from 'src/app/site/pages/meetings/pages/polls'; import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user'; diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/poll-slide/components/poll-slide.component.ts b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/poll-slide/components/poll-slide.component.ts index 51ddd0ab22..7925bc6a97 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/poll-slide/components/poll-slide.component.ts +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/components/poll-slide/components/poll-slide.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { of } from 'rxjs'; import { OptionData, OptionTitle, PollData } from 'src/app/domain/models/poll/generic-poll'; import { PollClassType, PollState } from 'src/app/domain/models/poll/poll-constants'; diff --git a/client/src/app/site/pages/meetings/modules/projector/modules/slides/definitions/slides.ts b/client/src/app/site/pages/meetings/modules/projector/modules/slides/definitions/slides.ts index 89f487daaf..81cfc6d87a 100644 --- a/client/src/app/site/pages/meetings/modules/projector/modules/slides/definitions/slides.ts +++ b/client/src/app/site/pages/meetings/modules/projector/modules/slides/definitions/slides.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { MeetingProjectionType } from 'src/app/gateways/repositories/meeting-repository.service'; import { SlideManifest } from './slide-manifest'; diff --git a/client/src/app/site/pages/meetings/modules/projector/projector.module.ts b/client/src/app/site/pages/meetings/modules/projector/projector.module.ts index b2888e3d8a..0765e30af6 100644 --- a/client/src/app/site/pages/meetings/modules/projector/projector.module.ts +++ b/client/src/app/site/pages/meetings/modules/projector/projector.module.ts @@ -1,7 +1,7 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { MatIconModule } from '@angular/material/icon'; -import { TranslateModule } from '@ngx-translate/core'; +import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations'; import { DirectivesModule } from 'src/app/ui/directives'; import { TopicPollServiceModule } from '../../pages/agenda/modules/topics/modules/topic-poll/services/topic-poll-service.module'; @@ -27,7 +27,7 @@ const EXPORTED_MODULES = [CountdownTimeModule]; AssignmentPollServiceModule, MotionPollServiceModule, TopicPollServiceModule, - TranslateModule + OpenSlidesTranslationModule.forChild() ] }) export class ProjectorModule {} diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/definitions/topics.constants.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/definitions/topics.constants.ts index 73efa65894..df8900d9f4 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/definitions/topics.constants.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/definitions/topics.constants.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; export const topicHeadersAndVerboseNames = { title: _(`Title`), diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-dialog/topic-poll-dialog.component.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-dialog/topic-poll-dialog.component.ts index a26f8b3b10..7d6520278e 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-dialog/topic-poll-dialog.component.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-dialog/topic-poll-dialog.component.ts @@ -1,7 +1,7 @@ import { AfterViewInit, Component, ElementRef, Inject, QueryList, ViewChild, ViewChildren } from '@angular/core'; import { Validators } from '@angular/forms'; import { MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BehaviorSubject } from 'rxjs'; import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; import { Selectable } from 'src/app/domain/interfaces'; diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-vote/topic-poll-vote.component.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-vote/topic-poll-vote.component.ts index 915fcd45bb..a891de2013 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-vote/topic-poll-vote.component.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/components/topic-poll-vote/topic-poll-vote.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { VoteValue } from 'src/app/domain/models/poll'; import { BasePollVoteComponent, diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/definitions/index.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/definitions/index.ts index e738843b03..5e9a6d8d99 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/definitions/index.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/modules/topic-poll/definitions/index.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; export type TopicPollMethodKey = keyof typeof TopicPollMethodVerbose; diff --git a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/pages/topic-import/services/topic-import.service/topic-import.service.ts b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/pages/topic-import/services/topic-import.service/topic-import.service.ts index a488c51134..2911d04fe9 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/modules/topics/pages/topic-import/services/topic-import.service/topic-import.service.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/modules/topics/pages/topic-import/services/topic-import.service/topic-import.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { AgendaItemType } from 'src/app/domain/models/agenda/agenda-item'; import { TopicRepositoryService } from 'src/app/gateways/repositories/topics/topic-repository.service'; import { BaseBackendImportService } from 'src/app/site/base/base-import.service/base-backend-import.service'; diff --git a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/components/agenda-item-list/agenda-item-list.component.ts b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/components/agenda-item-list/agenda-item-list.component.ts index 6581d3975c..744437ceae 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/components/agenda-item-list/agenda-item-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/components/agenda-item-list/agenda-item-list.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute, NavigationExtras } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { map, Observable } from 'rxjs'; import { Permission } from 'src/app/domain/definitions/permission'; diff --git a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/services/agenda-item-filter.service/agenda-item-filter.service.ts b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/services/agenda-item-filter.service/agenda-item-filter.service.ts index 633563f5ee..5bcb66ae41 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/services/agenda-item-filter.service/agenda-item-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/pages/agenda-item-list/services/agenda-item-filter.service/agenda-item-filter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { ItemTypeChoices } from 'src/app/domain/models/agenda/agenda-item'; import { Assignment } from 'src/app/domain/models/assignments/assignment'; diff --git a/client/src/app/site/pages/meetings/pages/assignments/definitions/index.ts b/client/src/app/site/pages/meetings/pages/assignments/definitions/index.ts index 5a1fad2d4b..23d8afe122 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/definitions/index.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/definitions/index.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { AssignmentPhase } from 'src/app/domain/models/assignments/assignment-phase'; /** diff --git a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-vote/assignment-poll-vote.component.ts b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-vote/assignment-poll-vote.component.ts index 1d8c1ddab4..e4aeb6444a 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-vote/assignment-poll-vote.component.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/components/assignment-poll-vote/assignment-poll-vote.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { PollMethod } from 'src/app/domain/models/poll/poll-constants'; import { VoteValue } from 'src/app/domain/models/poll/vote-constants'; import { diff --git a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/definitions/index.ts b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/definitions/index.ts index 1649b238ad..ba9721e2c1 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/definitions/index.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/definitions/index.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; export type AssignmentPollMethodKey = keyof typeof AssignmentPollMethodVerbose; diff --git a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts index 74c60c05d9..fb461357e9 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/modules/assignment-poll/services/assignment-poll.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Assignment } from 'src/app/domain/models/assignments/assignment'; import { PollPercentBaseVerboseKey, PollTypeVerboseKey } from 'src/app/domain/models/poll'; diff --git a/client/src/app/site/pages/meetings/pages/assignments/view-models/view-assignment.ts b/client/src/app/site/pages/meetings/pages/assignments/view-models/view-assignment.ts index a49f03c1c4..4988feabe4 100644 --- a/client/src/app/site/pages/meetings/pages/assignments/view-models/view-assignment.ts +++ b/client/src/app/site/pages/meetings/pages/assignments/view-models/view-assignment.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { HasSequentialNumber } from 'src/app/domain/interfaces'; import { Assignment } from 'src/app/domain/models/assignments/assignment'; import { PROJECTIONDEFAULT, ProjectiondefaultValue } from 'src/app/domain/models/projector/projection-default'; diff --git a/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot-settings/autopilot-settings.component.ts b/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot-settings/autopilot-settings.component.ts index e23383506d..7fe458325c 100644 --- a/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot-settings/autopilot-settings.component.ts +++ b/client/src/app/site/pages/meetings/pages/autopilot/components/autopilot-settings/autopilot-settings.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit } from '@angular/core'; import { MatDialogRef } from '@angular/material/dialog'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { first } from 'rxjs'; import { BaseMeetingComponent } from '../../../../base/base-meeting.component'; diff --git a/client/src/app/site/pages/meetings/pages/interaction/modules/action-bar/components/action-bar/action-bar.component.ts b/client/src/app/site/pages/meetings/pages/interaction/modules/action-bar/components/action-bar/action-bar.component.ts index 83049aa9a4..566f2b312d 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/modules/action-bar/components/action-bar/action-bar.component.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/modules/action-bar/components/action-bar/action-bar.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { combineLatest, map, Observable } from 'rxjs'; import { fadeInAnim, fadeInOutAnim } from 'src/app/infrastructure/animations'; diff --git a/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/call/call.component.ts b/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/call/call.component.ts index a424cc98d9..cb7650f80b 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/call/call.component.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/call/call.component.ts @@ -10,7 +10,7 @@ import { OnInit, Output } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { BaseMeetingComponent } from 'src/app/site/pages/meetings/base/base-meeting.component'; diff --git a/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/video-player/video-player.component.ts b/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/video-player/video-player.component.ts index ab2d1b8cd8..25b5677bb7 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/video-player/video-player.component.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/modules/interaction-container/components/video-player/video-player.component.ts @@ -11,7 +11,7 @@ import { ViewChild, ViewEncapsulation } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { catchError, firstValueFrom, map, of } from 'rxjs'; import { ajax, AjaxResponse } from 'rxjs/ajax'; import { MeetingSettingsService } from 'src/app/site/pages/meetings/services/meeting-settings.service'; diff --git a/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts b/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts index 1f02ea2711..e9b6b20420 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/services/interaction-receive.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest, diff --git a/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts b/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts index 5c510c328c..1dbd7001c0 100644 --- a/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts +++ b/client/src/app/site/pages/meetings/pages/interaction/services/operator-media-permission.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { SpinnerService } from 'src/app/site/modules/global-spinner'; diff --git a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts index 7c3d0b6772..bd0dbe1146 100644 --- a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts +++ b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.ts @@ -10,7 +10,7 @@ import { ViewEncapsulation } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { fromUnixTime, getHours, getMinutes, getUnixTime, setHours, setMinutes } from 'date-fns'; import { distinctUntilChanged, filter, map, Observable } from 'rxjs'; diff --git a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-list/components/meeting-settings-group-list/meeting-settings-group-list.component.ts b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-list/components/meeting-settings-group-list/meeting-settings-group-list.component.ts index ba1abcd61d..052b80ef78 100644 --- a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-list/components/meeting-settings-group-list/meeting-settings-group-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-list/components/meeting-settings-group-list/meeting-settings-group-list.component.ts @@ -32,10 +32,10 @@ export class MeetingSettingsGroupListComponent extends BaseMeetingComponent { * Resets every config for all registered group. */ public async resetAll(): Promise { - const title = this.translate.instant( + const title = this.translate.instant([ `Are you sure you want to reset all options to default settings?`, `Changes of all settings group will be lost!` - ); + ]); if (await this.promptDialog.open(title)) { await this.meetingRepo.update(this.getDefaultValues(), { meeting: this.activeMeeting! }); } diff --git a/client/src/app/site/pages/meetings/pages/motions/components/motion-multiselect/services/motion-multiselect.service.ts b/client/src/app/site/pages/meetings/pages/motions/components/motion-multiselect/services/motion-multiselect.service.ts index 58efa5f3d7..eecea5a409 100644 --- a/client/src/app/site/pages/meetings/pages/motions/components/motion-multiselect/services/motion-multiselect.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/components/motion-multiselect/services/motion-multiselect.service.ts @@ -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 { Id, Ids } from 'src/app/domain/definitions/key-types'; import { Identifiable } from 'src/app/domain/interfaces'; diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll-dialog/motion-poll-dialog.component.ts b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll-dialog/motion-poll-dialog.component.ts index a4b51bb5d2..50d0fb74ff 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll-dialog/motion-poll-dialog.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/components/motion-poll-dialog/motion-poll-dialog.component.ts @@ -1,6 +1,6 @@ import { AfterViewInit, Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA } from '@angular/material/dialog'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseModel } from 'src/app/domain/models/base/base-model'; import { PollPercentBaseVerbose, VoteValue } from 'src/app/domain/models/poll'; import { BasePollDialogComponent } from 'src/app/site/pages/meetings/modules/poll/base/base-poll-dialog.component'; diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/definitions/index.ts b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/definitions/index.ts index cf241aab85..86ba1418b8 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/definitions/index.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/motion-poll/definitions/index.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; export const MotionPollMethodVerbose = { YN: _(`Yes/No`), diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/comments/components/comment-section-list/comment-section-list.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/comments/components/comment-section-list/comment-section-list.component.ts index 44f32037ed..500f90123e 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/comments/components/comment-section-list/comment-section-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/comments/components/comment-section-list/comment-section-list.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit, TemplateRef, ViewChild } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { Identifiable } from 'src/app/domain/interfaces'; diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/modules/motion-change-recommendation-dialog/components/motion-content-change-recommendation-dialog/motion-content-change-recommendation-dialog.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/modules/motion-change-recommendation-dialog/components/motion-content-change-recommendation-dialog/motion-content-change-recommendation-dialog.component.ts index 355cc07b7e..02af481542 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/modules/motion-change-recommendation-dialog/components/motion-content-change-recommendation-dialog/motion-content-change-recommendation-dialog.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/modules/motion-change-recommendation-dialog/components/motion-content-change-recommendation-dialog/motion-content-change-recommendation-dialog.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; import { Validators } from '@angular/forms'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { ModificationType } from 'src/app/domain/models/motions/motions.constants'; import { LineRange } from '../../../../../../definitions/index'; diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/workflows/components/workflow-detail/workflow-detail.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/workflows/components/workflow-detail/workflow-detail.component.ts index 60e7946289..68e2dc0caf 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/workflows/components/workflow-detail/workflow-detail.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/workflows/components/workflow-detail/workflow-detail.component.ts @@ -2,7 +2,7 @@ import { ChangeDetectorRef, Component, TemplateRef, ViewChild } from '@angular/c import { MatCheckboxChange } from '@angular/material/checkbox'; import { MatDialog } from '@angular/material/dialog'; import { MatTableDataSource } from '@angular/material/table'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts index ce89c9579f..df645ffeb2 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/export/motion-xlsx-export.service/motion-xlsx-export.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Workbook } from 'exceljs'; import { Ids } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-base-sort.service/motion-list-base-sort.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-base-sort.service/motion-list-base-sort.service.ts index 09bb6520f8..65cb203cfa 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-base-sort.service/motion-list-base-sort.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-base-sort.service/motion-list-base-sort.service.ts @@ -1,5 +1,5 @@ import { Directive, inject, ProviderToken } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { BaseRepository } from 'src/app/gateways/repositories/base-repository'; import { MotionRepositoryService } from 'src/app/gateways/repositories/motions'; diff --git a/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-filter.service/motion-list-filter.service.ts b/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-filter.service/motion-list-filter.service.ts index 56f5f8c97a..fb461b5078 100644 --- a/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-filter.service/motion-list-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/services/list/motion-list-filter.service/motion-list-filter.service.ts @@ -1,5 +1,5 @@ import { inject, Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Id } from 'src/app/domain/definitions/key-types'; import { Permission } from 'src/app/domain/definitions/permission'; diff --git a/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts b/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts index 1bb761bd2e..008a03d824 100644 --- a/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts +++ b/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { MeetingSettingsService } from 'src/app/site/pages/meetings/services/meeting-settings.service'; import { ProjectionBuildDescriptor } from 'src/app/site/pages/meetings/view-models/projection-build-descriptor'; diff --git a/client/src/app/site/pages/meetings/pages/participants/export/speaker-csv-export.service/speaker-csv-export.service.ts b/client/src/app/site/pages/meetings/pages/participants/export/speaker-csv-export.service/speaker-csv-export.service.ts index a0615f1c86..c5fc835def 100644 --- a/client/src/app/site/pages/meetings/pages/participants/export/speaker-csv-export.service/speaker-csv-export.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/export/speaker-csv-export.service/speaker-csv-export.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { format, fromUnixTime } from 'date-fns'; import { DateFnsConfigurationService } from 'ngx-date-fns'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts index 7496fe7dd4..afc74d7d42 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ViewChild } from '@angular/core'; import { Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest, Observable } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-import/services/participant-import.service/participant-import.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-import/services/participant-import.service/participant-import.service.ts index 7eb7ec1174..4cb02a9f24 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-import/services/participant-import.service/participant-import.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-import/services/participant-import.service/participant-import.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseBackendImportService } from 'src/app/site/base/base-import.service/base-backend-import.service'; import { ParticipantControllerService } from 'src/app/site/pages/meetings/pages/participants/services/common/participant-controller.service/participant-controller.service'; import { ActiveMeetingIdService } from 'src/app/site/pages/meetings/services/active-meeting-id.service'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts index 4d02189b6c..3716791003 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/components/participant-list/participant-list.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { firstValueFrom, map, Observable } from 'rxjs'; import { Ids } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts index 06570992fa..5aa63a22a1 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-filter/participant-list-filter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { Permission } from 'src/app/domain/definitions/permission'; import { OsFilter, OsHideFilterSetting } from 'src/app/site/base/base-filter.service'; import { BaseMeetingFilterListService } from 'src/app/site/pages/meetings/base/base-meeting-filter-list.service'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts index a9d94e00db..0fba88edb2 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-list/services/participant-list-sort/participant-list-sort.service.ts @@ -1,5 +1,5 @@ import { Injectable, ProviderToken } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { Permission } from 'src/app/domain/definitions/permission'; import { BaseRepository } from 'src/app/gateways/repositories/base-repository'; import { UserRepositoryService } from 'src/app/gateways/repositories/users'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-presence/components/participant-presence/participant-presence.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-presence/components/participant-presence/participant-presence.component.ts index 0341b5a2e4..a60e9d86c1 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-presence/components/participant-presence/participant-presence.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-presence/components/participant-presence/participant-presence.component.ts @@ -1,6 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { ParticipantControllerService } from 'src/app/site/pages/meetings/pages/participants/services/common/participant-controller.service/participant-controller.service'; import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts index 72c0419d65..c9ec03d851 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-filter.service/participant-speaker-list-filter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { SpeechState } from 'src/app/domain/models/speakers/speech-state'; import { GENDER_FITLERABLE, GENDERS } from 'src/app/domain/models/users/user'; import { OsFilter, OsHideFilterSetting } from 'src/app/site/base/base-filter.service'; diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts index e14b121517..ce5e4d7ec2 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-speaker-list/services/participant-speaker-list-sort.service/participant-speaker-list-sort.service.ts @@ -1,5 +1,5 @@ import { Injectable, ProviderToken } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseRepository } from 'src/app/gateways/repositories/base-repository'; import { SpeakerRepositoryService } from 'src/app/gateways/repositories/speakers/speaker-repository.service'; import { BaseSortListService, OsSortingOption } from 'src/app/site/base/base-sort.service'; diff --git a/client/src/app/site/pages/meetings/pages/polls/view-models/view-option.ts b/client/src/app/site/pages/meetings/pages/polls/view-models/view-option.ts index f912db313e..49c1a7c3d8 100644 --- a/client/src/app/site/pages/meetings/pages/polls/view-models/view-option.ts +++ b/client/src/app/site/pages/meetings/pages/polls/view-models/view-option.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { OptionData, OptionTitle } from '../../../../../../domain/models/poll/generic-poll'; import { Option } from '../../../../../../domain/models/poll/option'; diff --git a/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts b/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts index 6efdd4d94a..f8d71af13e 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/components/projector-edit-dialog/components/projector-edit-dialog/projector-edit-dialog.component.ts @@ -9,7 +9,7 @@ import { } from '@angular/core'; import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { auditTime } from 'rxjs'; import { diff --git a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.ts b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.ts index 021d231bc4..28a7e656dc 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/components/projector-detail/projector-detail.component.ts @@ -1,7 +1,7 @@ import { CdkDragDrop, moveItemInArray } from '@angular/cdk/drag-drop'; import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, combineLatest, Observable, switchMap } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts index a9b89166bd..cbbb561289 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-detail/services/current-speaker-chyron-slide.service/current-speaker-chyron-slide.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { PROJECTIONDEFAULT } from 'src/app/domain/models/projector/projection-default'; import { MeetingProjectionType } from 'src/app/gateways/repositories/meeting-repository.service'; diff --git a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-list/components/projector-list-entry/projector-list-entry.component.ts b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-list/components/projector-list-entry/projector-list-entry.component.ts index 69407354e2..f2fb0f97bd 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/modules/projector-list/components/projector-list-entry/projector-list-entry.component.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/modules/projector-list/components/projector-list-entry/projector-list-entry.component.ts @@ -1,5 +1,5 @@ import { Component, Input, ViewEncapsulation } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { firstValueFrom } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/meetings/pages/projectors/view-models/view-projector-countdown.ts b/client/src/app/site/pages/meetings/pages/projectors/view-models/view-projector-countdown.ts index 5ad2ac0ded..5ea7434c94 100644 --- a/client/src/app/site/pages/meetings/pages/projectors/view-models/view-projector-countdown.ts +++ b/client/src/app/site/pages/meetings/pages/projectors/view-models/view-projector-countdown.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting'; import { diff --git a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts index d5fdb3775f..a68efd642e 100644 --- a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts +++ b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts @@ -1,5 +1,5 @@ import { ValidatorFn, Validators } from '@angular/forms'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { AgendaItemType } from 'src/app/domain/models/agenda/agenda-item'; import { Settings } from 'src/app/domain/models/meetings/meeting'; import { MotionWorkflow } from 'src/app/domain/models/motions/motion-workflow'; diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-add-to-meetings/account-add-to-meetings.component.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-add-to-meetings/account-add-to-meetings.component.ts index 58395d4c6e..09c19168e1 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-add-to-meetings/account-add-to-meetings.component.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-add-to-meetings/account-add-to-meetings.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { UntypedFormBuilder, Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, map, Observable } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts index dc6c9b7df6..214053e07f 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-detail/components/account-detail/account-detail.component.ts @@ -2,7 +2,7 @@ import { KeyValue } from '@angular/common'; import { Component, OnInit, ViewChild } from '@angular/core'; import { Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Id } from 'src/app/domain/definitions/key-types'; import { getOmlVerboseName, OML, OMLMapping } from 'src/app/domain/definitions/organization-permission'; diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-import/definitions/index.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-import/definitions/index.ts index a4b9dae215..b79c05496c 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-import/definitions/index.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-import/definitions/index.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { User } from 'src/app/domain/models/users/user'; import { userHeadersAndVerboseNames } from 'src/app/domain/models/users/user.constants'; diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-import/services/account-import.service/account-import.service.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-import/services/account-import.service/account-import.service.ts index f5b7ab35ca..e5cf732e73 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-import/services/account-import.service/account-import.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-import/services/account-import.service/account-import.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseBackendImportService } from 'src/app/site/base/base-import.service/base-backend-import.service'; import { ImportServiceCollectorService } from 'src/app/site/services/import-service-collector.service'; import { BackendImportRawPreview } from 'src/app/ui/modules/import-list/definitions/backend-import-preview'; diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts index 72553dc781..214eec4379 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/components/account-list/account-list.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { MatDialog } from '@angular/material/dialog'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { firstValueFrom, map, Observable } from 'rxjs'; import { getOmlVerboseName, OML } from 'src/app/domain/definitions/organization-permission'; diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts index a4351d3e94..a108cbca5f 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/account-list/services/account-list-sort.service/account-sort.service.ts @@ -1,5 +1,5 @@ import { Injectable, ProviderToken } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseRepository } from 'src/app/gateways/repositories/base-repository'; import { UserRepositoryService } from 'src/app/gateways/repositories/users'; import { BaseSortListService, OsSortingOption } from 'src/app/site/base/base-sort.service'; diff --git a/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts b/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts index 5ca6a1a5dc..c5f9470061 100644 --- a/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/services/common/account-controller.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { firstValueFrom, map, Observable } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; import { OML } from 'src/app/domain/definitions/organization-permission'; diff --git a/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts b/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts index 4ee1462367..aec2f1fc1e 100644 --- a/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts +++ b/client/src/app/site/pages/organization/pages/accounts/services/common/account-filter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { map, Observable, Subscription } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; import { OML } from 'src/app/domain/definitions/organization-permission'; diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-edit/components/committee-detail-edit/committee-detail-edit.component.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-edit/components/committee-detail-edit/committee-detail-edit.component.ts index 9d3d85f670..46dd95f5f4 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-edit/components/committee-detail-edit/committee-detail-edit.component.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-edit/components/committee-detail-edit/committee-detail-edit.component.ts @@ -1,7 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { map, OperatorFunction } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-meeting/components/meeting-edit/meeting-edit.component.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-meeting/components/meeting-edit/meeting-edit.component.ts index 7a99da3109..8b3aba6e45 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-meeting/components/meeting-edit/meeting-edit.component.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-detail/modules/committee-detail-meeting/components/meeting-edit/meeting-edit.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core'; import { AbstractControl, UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { map, Observable } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-import/definitions/index.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-import/definitions/index.ts index 1e57e56f92..efa96a2244 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-import/definitions/index.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-import/definitions/index.ts @@ -1,4 +1,4 @@ -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; export const committeeHeadersAndVerboseNames = { name: _(`Title`), diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-import/services/committee-import.service/committee-import.service.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-import/services/committee-import.service/committee-import.service.ts index cfcd8c84d4..6524f8d518 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-import/services/committee-import.service/committee-import.service.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-import/services/committee-import.service/committee-import.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { CsvExportForBackendService } from 'src/app/gateways/export/csv-export.service/csv-export-for-backend.service'; import { BaseBackendImportService } from 'src/app/site/base/base-import.service/base-backend-import.service'; import { ImportServiceCollectorService } from 'src/app/site/services/import-service-collector.service'; diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/components/committee-list/committee-list.component.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/components/committee-list/committee-list.component.ts index bdc18065a4..c628c27651 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/components/committee-list/committee-list.component.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/components/committee-list/committee-list.component.ts @@ -1,6 +1,6 @@ import { Component } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { Action } from 'src/app/gateways/actions'; import { BaseListViewComponent } from 'src/app/site/base/base-list-view.component'; diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-filter.service/committee-filter.service.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-filter.service/committee-filter.service.ts index 8c4b82b6b2..7f4eae321f 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-filter.service/committee-filter.service.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-filter.service/committee-filter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseFilterListService, OsFilter } from 'src/app/site/base/base-filter.service'; import { OrganizationTagControllerService } from 'src/app/site/pages/organization/pages/organization-tags/services/organization-tag-controller.service'; import { ActiveFiltersService } from 'src/app/site/services/active-filters.service'; diff --git a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-sort.service/committee-sort.service.ts b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-sort.service/committee-sort.service.ts index a72d06c7e8..924d27f7a9 100644 --- a/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-sort.service/committee-sort.service.ts +++ b/client/src/app/site/pages/organization/pages/committees/pages/committee-list/services/committee-list-sort.service/committee-sort.service.ts @@ -1,5 +1,5 @@ import { Injectable, ProviderToken } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseRepository } from 'src/app/gateways/repositories/base-repository'; import { CommitteeRepositoryService } from 'src/app/gateways/repositories/committee-repository.service'; import { BaseSortListService, OsSortingOption } from 'src/app/site/base/base-sort.service'; diff --git a/client/src/app/site/pages/organization/pages/designs/pages/theme-list/components/theme-list/theme-list.component.ts b/client/src/app/site/pages/organization/pages/designs/pages/theme-list/components/theme-list/theme-list.component.ts index e910b8e1da..b459be8c7a 100644 --- a/client/src/app/site/pages/organization/pages/designs/pages/theme-list/components/theme-list/theme-list.component.ts +++ b/client/src/app/site/pages/organization/pages/designs/pages/theme-list/components/theme-list/theme-list.component.ts @@ -1,5 +1,5 @@ import { Component } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { firstValueFrom } from 'rxjs'; import { BaseListViewComponent } from 'src/app/site/base/base-list-view.component'; diff --git a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/components/meeting-list/meeting-list.component.ts b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/components/meeting-list/meeting-list.component.ts index eadb8e21c8..bd10847efd 100644 --- a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/components/meeting-list/meeting-list.component.ts +++ b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/components/meeting-list/meeting-list.component.ts @@ -1,5 +1,5 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { OML } from 'src/app/domain/definitions/organization-permission'; import { BaseListViewComponent } from 'src/app/site/base/base-list-view.component'; diff --git a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-export.service.ts b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-export.service.ts index eae9416460..66cbd491b2 100644 --- a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-export.service.ts +++ b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-export.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { CsvColumnDefinitionProperty, CsvColumnsDefinition } from 'src/app/gateways/export/csv-export.service'; import { CsvExportForBackendService } from 'src/app/gateways/export/csv-export.service/csv-export-for-backend.service'; diff --git a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-filter/meeting-list-filter.service.ts b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-filter/meeting-list-filter.service.ts index d3a89dffa9..6b7de10b94 100644 --- a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-filter/meeting-list-filter.service.ts +++ b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-filter/meeting-list-filter.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { OML } from 'src/app/domain/definitions/organization-permission'; import { BaseFilterListService, OsFilter } from 'src/app/site/base/base-filter.service'; import { RelatedTime, ViewMeeting } from 'src/app/site/pages/meetings/view-models/view-meeting'; diff --git a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-sort/meeting-list-sort.service.ts b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-sort/meeting-list-sort.service.ts index 789904e552..73447c8b98 100644 --- a/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-sort/meeting-list-sort.service.ts +++ b/client/src/app/site/pages/organization/pages/orga-meetings/pages/meeting-list/services/meeting-list-sort/meeting-list-sort.service.ts @@ -1,5 +1,5 @@ import { Injectable, ProviderToken } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BaseRepository } from 'src/app/gateways/repositories/base-repository'; import { MeetingRepositoryService } from 'src/app/gateways/repositories/meeting-repository.service'; import { BaseSortListService, OsSortingOption } from 'src/app/site/base/base-sort.service'; diff --git a/client/src/app/site/pages/organization/pages/organization-info/components/organization-statistics/organization-statistics.component.ts b/client/src/app/site/pages/organization/pages/organization-info/components/organization-statistics/organization-statistics.component.ts index 4d6ea2e620..0192182f9a 100644 --- a/client/src/app/site/pages/organization/pages/organization-info/components/organization-statistics/organization-statistics.component.ts +++ b/client/src/app/site/pages/organization/pages/organization-info/components/organization-statistics/organization-statistics.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { Observable } from 'rxjs'; import { BaseComponent } from 'src/app/site/base/base.component'; import { OrganizationService } from 'src/app/site/pages/organization/services/organization.service'; diff --git a/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.ts b/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.ts index 02331241a9..2af0945116 100644 --- a/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.ts +++ b/client/src/app/site/pages/organization/pages/settings/modules/settings-detail/components/organization-settings/organization-settings.component.ts @@ -1,6 +1,6 @@ import { ChangeDetectionStrategy, Component } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { availableTranslations } from 'src/app/domain/definitions/languages'; import { objectToFormattedString } from 'src/app/infrastructure/utils'; diff --git a/client/src/app/site/services/autoupdate/autoupdate.service.ts b/client/src/app/site/services/autoupdate/autoupdate.service.ts index 58556c129a..22db1009a9 100644 --- a/client/src/app/site/services/autoupdate/autoupdate.service.ts +++ b/client/src/app/site/services/autoupdate/autoupdate.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { ModelRequest } from 'src/app/domain/interfaces/model-request'; import { StorageService } from 'src/app/gateways/storage.service'; diff --git a/client/src/app/site/services/connection-status.service.ts b/client/src/app/site/services/connection-status.service.ts index 5fc4a97f35..4b7d44e923 100644 --- a/client/src/app/site/services/connection-status.service.ts +++ b/client/src/app/site/services/connection-status.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BehaviorSubject, filter, firstValueFrom, fromEvent, map, Observable } from 'rxjs'; import { BannerDefinition, BannerService } from '../modules/site-wrapper/services/banner.service'; diff --git a/client/src/app/ui/modules/file-list/components/file-list/file-list.component.ts b/client/src/app/ui/modules/file-list/components/file-list/file-list.component.ts index 334cca60b8..7c2fa1aea5 100644 --- a/client/src/app/ui/modules/file-list/components/file-list/file-list.component.ts +++ b/client/src/app/ui/modules/file-list/components/file-list/file-list.component.ts @@ -12,7 +12,7 @@ import { } from '@angular/core'; import { UntypedFormBuilder, UntypedFormGroup, Validators } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { BehaviorSubject, Observable } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; diff --git a/client/src/app/ui/modules/import-list/components/import-list/import-list.component.ts b/client/src/app/ui/modules/import-list/components/import-list/import-list.component.ts index af2a0c3ba0..f203c805e4 100644 --- a/client/src/app/ui/modules/import-list/components/import-list/import-list.component.ts +++ b/client/src/app/ui/modules/import-list/components/import-list/import-list.component.ts @@ -16,7 +16,7 @@ import { import { MatDialog } from '@angular/material/dialog'; import { MatSelectChange } from '@angular/material/select'; import { MatTabChangeEvent } from '@angular/material/tabs'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { auditTime, distinctUntilChanged, firstValueFrom, map, Observable, of } from 'rxjs'; import { Identifiable } from 'src/app/domain/interfaces'; import { ImportModel } from 'src/app/infrastructure/utils/import/import-model'; diff --git a/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts b/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts index eee47530d5..36d94ca0ad 100644 --- a/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts +++ b/client/src/app/ui/modules/import-list/components/via-backend-import-list/backend-import-list.component.ts @@ -16,7 +16,7 @@ import { import { MatDialog } from '@angular/material/dialog'; import { MatSelectChange } from '@angular/material/select'; import { MatTabChangeEvent } from '@angular/material/tabs'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { TranslateService } from '@ngx-translate/core'; import { delay, firstValueFrom, map, Observable, of } from 'rxjs'; import { infoDialogSettings } from 'src/app/infrastructure/utils/dialog-settings'; diff --git a/client/src/app/ui/modules/search-selector/components/base-search-selector/base-search-selector.component.ts b/client/src/app/ui/modules/search-selector/components/base-search-selector/base-search-selector.component.ts index 47225e81d1..2df62caf14 100644 --- a/client/src/app/ui/modules/search-selector/components/base-search-selector/base-search-selector.component.ts +++ b/client/src/app/ui/modules/search-selector/components/base-search-selector/base-search-selector.component.ts @@ -14,7 +14,7 @@ import { OnInit } from '@angular/core'; import { UntypedFormControl } from '@angular/forms'; import { MatOption, MatOptionSelectionChange } from '@angular/material/core'; import { MatSelect } from '@angular/material/select'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; import { BehaviorSubject, debounceTime, distinctUntilChanged, Observable, Subscription } from 'rxjs'; import { Id } from 'src/app/domain/definitions/key-types'; import { Selectable } from 'src/app/domain/interfaces/selectable'; diff --git a/client/src/app/ui/modules/spinner/components/spinner/spinner.component.ts b/client/src/app/ui/modules/spinner/components/spinner/spinner.component.ts index 06fc0fa6f2..df653b56f0 100644 --- a/client/src/app/ui/modules/spinner/components/spinner/spinner.component.ts +++ b/client/src/app/ui/modules/spinner/components/spinner/spinner.component.ts @@ -1,5 +1,5 @@ import { Component, Input } from '@angular/core'; -import { marker as _ } from '@colsen1991/ngx-translate-extract-marker'; +import { _ } from '@ngx-translate/core'; /** * Component for the global spinner. From 40a5753ae7fae911acb6f9163b010c06ec852893 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Wed, 20 Nov 2024 10:00:39 +0100 Subject: [PATCH 12/27] Allow to add agenda item if perm agenda can manage (#4365) --- .../motion-form/motion-form.component.html | 17 ++++++++--------- .../motion-form/motion-form.component.ts | 18 ++++++++++++++---- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html index 810de57fc4..637aba3c93 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.html @@ -164,16 +164,15 @@

>

- + @if (newMotion && canManageAgenda) { + +
+ +
+ } @if (canChangeMetadata) { - @if (newMotion) { -
- -
- } - @if (minSupporters) {
diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts index 921ae0e65c..60e9cb1ba4 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-detail/pages/motion-form/components/motion-form/motion-form.component.ts @@ -62,6 +62,8 @@ interface MotionFormFields { type MotionFormControlsConfig = { [key in keyof MotionFormFields]?: any } & { [key in keyof Motion]?: any } & { supporter_ids?: any; attachment_mediafile_ids?: any; + agenda_create?: any; + agenda_type?: any; }; @Component({ @@ -295,6 +297,7 @@ export class MotionFormComponent extends BaseMeetingComponent implements OnInit */ public async createMotion(newMotionValues: Partial): Promise { try { + this.cleanAgendaIfNoPerm(newMotionValues); let response: HasSequentialNumber; if (this._parentId) { response = await this.amendmentRepo.createTextBased({ @@ -446,6 +449,7 @@ export class MotionFormComponent extends BaseMeetingComponent implements OnInit } private async updateMotion(newMotionValues: any, motion: ViewMotion): Promise { + this.cleanAgendaIfNoPerm(newMotionValues); try { await this.motionController.update(newMotionValues, motion).resolve(); } catch (e) { @@ -453,6 +457,14 @@ export class MotionFormComponent extends BaseMeetingComponent implements OnInit } } + private cleanAgendaIfNoPerm(newMotionValues: any): void { + if (!this.canManageAgenda) { + delete newMotionValues[`agenda_create`]; + delete newMotionValues[`agenda_type`]; + delete newMotionValues[`agenda_parent_id`]; + } + } + private async ensureParentIsAvailable(parentId: Id): Promise { let motion: ViewMotion = this.motionController.getViewModel(parentId); if (!motion || motion.text === undefined) { @@ -593,10 +605,8 @@ export class MotionFormComponent extends BaseMeetingComponent implements OnInit isUniqueAmong(this._motionNumbersSubject, (a, b) => a === b, [``, null, undefined]) ] }), - ...(this.canManageAgenda && { - agenda_create: [``], - agenda_type: [``] - }) + agenda_create: [``], + agenda_type: [``] }; return this.fb.group(motionFormControls); From 39adbaebc1d532962f8b8b545ea5cbb721a13cb3 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Wed, 20 Nov 2024 10:46:33 +0100 Subject: [PATCH 13/27] Dependabot ignore angular major updates (#4369) --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6c67af2187..78524dea55 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -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: "/" From 8bb0a72721feadf91f5c3414abce1f820fb8e271 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:51:43 +0100 Subject: [PATCH 14/27] Bump @vendure/ngx-translate-extract from 9.3.0 to 9.3.1 in /client (#4374) --- client/package-lock.json | 8 ++++---- client/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index a133d670c6..740e7628a5 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -91,7 +91,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", @@ -6279,9 +6279,9 @@ "dev": true }, "node_modules/@vendure/ngx-translate-extract": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@vendure/ngx-translate-extract/-/ngx-translate-extract-9.3.0.tgz", - "integrity": "sha512-2cm0LUAtWtdXITdbjfTCiQgMCi8yozQuMcH/cuqH3VNNsQFs3fSX3gp14sFmMlmiwZ7repPIOcD5uv+gCzb5xA==", + "version": "9.3.1", + "resolved": "https://registry.npmjs.org/@vendure/ngx-translate-extract/-/ngx-translate-extract-9.3.1.tgz", + "integrity": "sha512-V81lW469gVng1OeLuFk9n06NmuKcWFsfImE4eGQIijBU4lJTDbZkcv6DpZ7SyGZOqCWwM6tWbA2V+w0zeBh4Lg==", "dev": true, "dependencies": { "@phenomnomnominal/tsquery": "^6.1.3", diff --git a/client/package.json b/client/package.json index 5495e1cf40..9b41c9afd1 100644 --- a/client/package.json +++ b/client/package.json @@ -118,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", From 4e9713776e3d3127d37d8af1b68a0135e5e74158 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 14:03:53 +0100 Subject: [PATCH 15/27] Bump the angular group across 1 directory with 15 updates (#4375) --- client/package-lock.json | 258 +++++++++++++++++++-------------------- client/package.json | 30 ++--- 2 files changed, 144 insertions(+), 144 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 740e7628a5..4b207d4287 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -9,18 +9,18 @@ "version": "4.1.x-dev", "license": "MIT", "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": "^16.0.3", @@ -73,14 +73,14 @@ "zone.js": "^0.14.10" }, "devDependencies": { - "@angular-devkit/build-angular": "^18.2.11", + "@angular-devkit/build-angular": "^18.2.12", "@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", + "@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", @@ -128,12 +128,12 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1802.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1802.11.tgz", - "integrity": "sha512-p+XIc/j51aI83ExNdeZwvkm1F4wkuKMGUUoj0MVUUi5E6NoiMlXYm6uU8+HbRvPBzGy5+3KOiGp3Fks0UmDSAA==", + "version": "0.1802.12", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1802.12.tgz", + "integrity": "sha512-bepVb2/GtJppYKaeW8yTGE6egmoWZ7zagFDsmBdbF+BYp+HmeoPsclARcdryBPVq68zedyTRdvhWSUTbw1AYuw==", "dev": true, "dependencies": { - "@angular-devkit/core": "18.2.11", + "@angular-devkit/core": "18.2.12", "rxjs": "7.8.1" }, "engines": { @@ -143,16 +143,16 @@ } }, "node_modules/@angular-devkit/build-angular": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-18.2.11.tgz", - "integrity": "sha512-09Ln3NAdlMw/wMLgnwYU5VgWV5TPBEHolZUIvE9D8b6SFWBCowk3B3RWeAMgg7Peuf9SKwqQHBz2b1C7RTP/8g==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-angular/-/build-angular-18.2.12.tgz", + "integrity": "sha512-quVUi7eqTq9OHumQFNl9Y8t2opm8miu4rlYnuF6rbujmmBDvdUvR6trFChueRczl2p5HWqTOr6NPoDGQm8AyNw==", "dev": true, "dependencies": { "@ampproject/remapping": "2.3.0", - "@angular-devkit/architect": "0.1802.11", - "@angular-devkit/build-webpack": "0.1802.11", - "@angular-devkit/core": "18.2.11", - "@angular/build": "18.2.11", + "@angular-devkit/architect": "0.1802.12", + "@angular-devkit/build-webpack": "0.1802.12", + "@angular-devkit/core": "18.2.12", + "@angular/build": "18.2.12", "@babel/core": "7.25.2", "@babel/generator": "7.25.0", "@babel/helper-annotate-as-pure": "7.24.7", @@ -163,7 +163,7 @@ "@babel/preset-env": "7.25.3", "@babel/runtime": "7.25.0", "@discoveryjs/json-ext": "0.6.1", - "@ngtools/webpack": "18.2.11", + "@ngtools/webpack": "18.2.12", "@vitejs/plugin-basic-ssl": "1.1.0", "ansi-colors": "4.1.3", "autoprefixer": "10.4.20", @@ -316,12 +316,12 @@ } }, "node_modules/@angular-devkit/build-webpack": { - "version": "0.1802.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1802.11.tgz", - "integrity": "sha512-G76rNsyn1iQk7qjyr+K4rnDzfalmEswmwXQorypSDGaHYzIDY1SZXMoP4225WMq5fJNBOJrk82FA0PSfnPE+zQ==", + "version": "0.1802.12", + "resolved": "https://registry.npmjs.org/@angular-devkit/build-webpack/-/build-webpack-0.1802.12.tgz", + "integrity": "sha512-0Z3fdbZVRnjYWE2/VYyfy+uieY+6YZyEp4ylzklVkc+fmLNsnz4Zw6cK1LzzcBqAwKIyh1IdW20Cg7o8b0sONA==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1802.11", + "@angular-devkit/architect": "0.1802.12", "rxjs": "7.8.1" }, "engines": { @@ -335,9 +335,9 @@ } }, "node_modules/@angular-devkit/core": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-18.2.11.tgz", - "integrity": "sha512-H9P1shRGigORWJHUY2BRa2YurT+DVminrhuaYHsbhXBRsPmgB2Dx/30YLTnC1s5XmR9QIRUCsg/d3kyT1wd5Zg==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-18.2.12.tgz", + "integrity": "sha512-NtB6ypsaDyPE6/fqWOdfTmACs+yK5RqfH5tStEzWFeeDsIEDYKsJ06ypuRep7qTjYus5Rmttk0Ds+cFgz8JdUQ==", "dev": true, "dependencies": { "ajv": "8.17.1", @@ -391,12 +391,12 @@ } }, "node_modules/@angular-devkit/schematics": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-18.2.11.tgz", - "integrity": "sha512-efRK3FotTFp4KD5u42jWfXpHUALXB9kJNsWiB4wEImKFH6CN+vjBspJQuLqk2oeBFh/7D2qRMc5P+2tZHM5hdw==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-18.2.12.tgz", + "integrity": "sha512-mMea9txHbnCX5lXLHlo0RAgfhFHDio45/jMsREM2PA8UtVf2S8ltXz7ZwUrUyMQRv8vaSfn4ijDstF4hDMnRgQ==", "dev": true, "dependencies": { - "@angular-devkit/core": "18.2.11", + "@angular-devkit/core": "18.2.12", "jsonc-parser": "3.3.1", "magic-string": "0.30.11", "ora": "5.4.1", @@ -533,9 +533,9 @@ } }, "node_modules/@angular/animations": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-18.2.11.tgz", - "integrity": "sha512-ghgXa2VhtyJJnTMuH2NYxCMsveQbZno44AZGygPqrcW8UQMQe9GulFaTXCH5s6/so2CLy2ZviIwSZQRgK0ZlDw==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-18.2.12.tgz", + "integrity": "sha512-XcWH/VFQ1Rddhdqi/iU8lW3Qg96yVx1NPfrO5lhcSSvVUzYWTZ5r+jh3GqYqUgPWyEp1Kpw3FLsOgVcGcBWQkQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -543,17 +543,17 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/core": "18.2.11" + "@angular/core": "18.2.12" } }, "node_modules/@angular/build": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/build/-/build-18.2.11.tgz", - "integrity": "sha512-AgirvSCmqUKiDE3C0rl3JA68OkOqQWDKUvjqRHXCkhxldLVOVoeIl87+jBYK/v9gcmk+K+ju+5wbGEfu1FjhiQ==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/build/-/build-18.2.12.tgz", + "integrity": "sha512-4Ohz+OSILoL+cCAQ4UTiCT5v6pctu3fXNoNpTEUK46OmxELk9jDITO5rNyNS7TxBn9wY69kjX5VcDf7MenquFQ==", "dev": true, "dependencies": { "@ampproject/remapping": "2.3.0", - "@angular-devkit/architect": "0.1802.11", + "@angular-devkit/architect": "0.1802.12", "@babel/core": "7.25.2", "@babel/helper-annotate-as-pure": "7.24.7", "@babel/helper-split-export-declaration": "7.24.7", @@ -644,9 +644,9 @@ } }, "node_modules/@angular/cdk": { - "version": "18.2.12", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-18.2.12.tgz", - "integrity": "sha512-FOklA6KatPtb0yO0doRhBI/UVY23A8ZhOSws5VuZTQl/6r/jXEXGV9n5JQj4rm8t/6IrReO55hdyw9XfHfZFjQ==", + "version": "18.2.14", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-18.2.14.tgz", + "integrity": "sha512-vDyOh1lwjfVk9OqoroZAP8pf3xxKUvyl+TVR8nJxL4c5fOfUFkD7l94HaanqKSRwJcI2xiztuu92IVoHn8T33Q==", "dependencies": { "tslib": "^2.3.0" }, @@ -660,17 +660,17 @@ } }, "node_modules/@angular/cli": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-18.2.11.tgz", - "integrity": "sha512-0JI1xjOLRemBPjdT/yVlabxc3Zkjqa/lhvVxxVC1XhKoW7yGxIGwNrQ4pka4CcQtCuktO6KPMmTGIu8YgC3cpw==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-18.2.12.tgz", + "integrity": "sha512-xhuZ/b7IhqNw1MgXf+arWf4x+GfUSt/IwbdWU4+CO8A7h0Y46zQywouP/KUK3cMQZfVdHdciTBvlpF3vFacA6Q==", "dev": true, "dependencies": { - "@angular-devkit/architect": "0.1802.11", - "@angular-devkit/core": "18.2.11", - "@angular-devkit/schematics": "18.2.11", + "@angular-devkit/architect": "0.1802.12", + "@angular-devkit/core": "18.2.12", + "@angular-devkit/schematics": "18.2.12", "@inquirer/prompts": "5.3.8", "@listr2/prompt-adapter-inquirer": "2.0.15", - "@schematics/angular": "18.2.11", + "@schematics/angular": "18.2.12", "@yarnpkg/lockfile": "1.1.0", "ini": "4.1.3", "jsonc-parser": "3.3.1", @@ -693,9 +693,9 @@ } }, "node_modules/@angular/common": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-18.2.11.tgz", - "integrity": "sha512-bamJeISl2zUlvjPYebQWazUjhjXU9nrot42cQJng94SkvNENT9LTWfPYgc+Bd972Kg+31jG4H41rgFNs7zySmw==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-18.2.12.tgz", + "integrity": "sha512-gI5o8Bccsi8ow8Wk2vG4Tw/Rw9LoHEA9j8+qHKNR/55SCBsz68Syg310dSyxy+sApJO2WiqIadr5VP36dlSUFw==", "dependencies": { "tslib": "^2.3.0" }, @@ -703,14 +703,14 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/core": "18.2.11", + "@angular/core": "18.2.12", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/compiler": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-18.2.11.tgz", - "integrity": "sha512-PSVL1YXUhTzkgJNYXiWk9eAZxNV6laQJRGdj9++C1q9m2S9/GlehZGzkt5GtC5rlUweJucCNvBC1+2D5FAt9vA==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-18.2.12.tgz", + "integrity": "sha512-D5d5dLrjQal5DbAXJJNSsCC3UxzjOI2wbc+Iv+LOpRM1gpNwuYfZMX5W7cj62Ce4G2++78CJSppdKBp8D4HErQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -718,7 +718,7 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/core": "18.2.11" + "@angular/core": "18.2.12" }, "peerDependenciesMeta": { "@angular/core": { @@ -727,9 +727,9 @@ } }, "node_modules/@angular/compiler-cli": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-18.2.11.tgz", - "integrity": "sha512-YJlAOiXZUYP6/RK9isu5AOucmNZhFB9lpY/beMzkkWgDku+va8szm4BZbLJFz176IUteyLWF3IP4aE7P9OBlXw==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-18.2.12.tgz", + "integrity": "sha512-IWimTNq5Q+i2Wxev6HLqnN4iYbPvLz04W1BBycT1LfGUsHcjFYLuUqbeUzHbk2snmBAzXkixgVpo8SF6P4Y5Pg==", "dev": true, "dependencies": { "@babel/core": "7.25.2", @@ -750,7 +750,7 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/compiler": "18.2.11", + "@angular/compiler": "18.2.12", "typescript": ">=5.4 <5.6" } }, @@ -783,9 +783,9 @@ } }, "node_modules/@angular/core": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-18.2.11.tgz", - "integrity": "sha512-/AGAFyZN8KR+kW5FUFCCBCj3qHyDDum7G0lJe5otrT9AqF6+g7PjF8yLha/6wPkJG7ri5xGLhini1sEivVeq/g==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-18.2.12.tgz", + "integrity": "sha512-wCf/OObwS6bpM60rk6bpMpCRGp0DlMLB1WNAMtfcaPNyqimVV5Bm98mWRhkOuRyvU3fU7iHhM/10ePVaoyu9+A==", "dependencies": { "tslib": "^2.3.0" }, @@ -798,9 +798,9 @@ } }, "node_modules/@angular/forms": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-18.2.11.tgz", - "integrity": "sha512-QjxayOxDTqsTJGBzfWd3nms1LZIXj2f1+wIPxxUNXyNS5ZaM7hBWkz2BTFYeewlD/HdNj0alNVCYK3M8ElLWYw==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-18.2.12.tgz", + "integrity": "sha512-FsukBJEU6jfAmht7TrODTkct/o4iwCZvGozuThOp0tYUPD/E1rZZzuKjEyTnT5Azpfkf0Wqx1nmpz80cczELOQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -808,22 +808,22 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/common": "18.2.11", - "@angular/core": "18.2.11", - "@angular/platform-browser": "18.2.11", + "@angular/common": "18.2.12", + "@angular/core": "18.2.12", + "@angular/platform-browser": "18.2.12", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/material": { - "version": "18.2.12", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-18.2.12.tgz", - "integrity": "sha512-5q8Os6i3D1e3qN+RqP95UgIR+Kx3goncSSYDeT6yPNrdrcqcWdyDPXGK6UsZqTTx/CJee/I7ZxgVVK1YDoVASQ==", + "version": "18.2.14", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-18.2.14.tgz", + "integrity": "sha512-28pxzJP49Mymt664WnCtPkKeg7kXUsQKTKGf/Kl95rNTEdTJLbnlcc8wV0rT0yQNR7kXgpfBnG7h0ETLv/iu5Q==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/animations": "^18.0.0 || ^19.0.0", - "@angular/cdk": "18.2.12", + "@angular/cdk": "18.2.14", "@angular/common": "^18.0.0 || ^19.0.0", "@angular/core": "^18.0.0 || ^19.0.0", "@angular/forms": "^18.0.0 || ^19.0.0", @@ -832,22 +832,22 @@ } }, "node_modules/@angular/material-date-fns-adapter": { - "version": "18.2.12", - "resolved": "https://registry.npmjs.org/@angular/material-date-fns-adapter/-/material-date-fns-adapter-18.2.12.tgz", - "integrity": "sha512-Rb9CaHA6RAKWFKKA7yiYLKSmH3kNats3ovFJ/7kTIZy65D0k9nqtSXidiDaCcWMazcLxtF8sgvR2gZuv0B/9bg==", + "version": "18.2.14", + "resolved": "https://registry.npmjs.org/@angular/material-date-fns-adapter/-/material-date-fns-adapter-18.2.14.tgz", + "integrity": "sha512-ZBT12ctSo3jg8cYPpMawK13TbsH6et1FaklbB7cRhI3mB5cOojVmrthfo93vP5Q6NoN3bOd0m+Za0jVH+l2N/w==", "dependencies": { "tslib": "^2.3.0" }, "peerDependencies": { "@angular/core": "^18.0.0 || ^19.0.0", - "@angular/material": "18.2.12", + "@angular/material": "18.2.14", "date-fns": ">2.20.0 <4.0" } }, "node_modules/@angular/platform-browser": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-18.2.11.tgz", - "integrity": "sha512-bzcP0QdPT/ncTxOx0t7901z5m0wDmkraTo/es4g8reV6VK9Ptv0QDuD8aDvrHh7sLCX5VgwDF9ohc6S2TpYUCA==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-18.2.12.tgz", + "integrity": "sha512-DRSMznuxuecrs+v5BRyd60/R4vjkQtuYUEPfzdo+rqxM83Dmr3PGtnqPRgd5oAFUbATxf02hQXijRD27K7rZRg==", "dependencies": { "tslib": "^2.3.0" }, @@ -855,9 +855,9 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/animations": "18.2.11", - "@angular/common": "18.2.11", - "@angular/core": "18.2.11" + "@angular/animations": "18.2.12", + "@angular/common": "18.2.12", + "@angular/core": "18.2.12" }, "peerDependenciesMeta": { "@angular/animations": { @@ -866,9 +866,9 @@ } }, "node_modules/@angular/platform-browser-dynamic": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-18.2.11.tgz", - "integrity": "sha512-a30U4ZdTZSvL17xWwOq6xh9ToCDP2K7/j1HTJFREObbuAtZTa/6IVgBUM6oOMNQ43kHkT6Mr9Emkgf9iGtWwfw==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-18.2.12.tgz", + "integrity": "sha512-dv1QEjYpcFno6+oUeGEDRWpB5g2Ufb0XkUbLJQIgrOk1Qbyzb8tmpDpTjok8jcKdquigMRWolr6Y1EOicfRlLw==", "dependencies": { "tslib": "^2.3.0" }, @@ -876,16 +876,16 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/common": "18.2.11", - "@angular/compiler": "18.2.11", - "@angular/core": "18.2.11", - "@angular/platform-browser": "18.2.11" + "@angular/common": "18.2.12", + "@angular/compiler": "18.2.12", + "@angular/core": "18.2.12", + "@angular/platform-browser": "18.2.12" } }, "node_modules/@angular/router": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-18.2.11.tgz", - "integrity": "sha512-xh4+t4pNBWxeH1a6GIoEGVSRZO4NDKK8q6b+AzB5GBgKsYgOz2lc74RXIPA//pK3aHrS9qD4sJLlodwgE/1+bA==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-18.2.12.tgz", + "integrity": "sha512-cz/1YWOZadAT35PPPYmpK3HSzKOE56nlUHue5bFkw73VSZr2iBn03ALLpd9YKzWgRmx3y7DqnlQtCkDu9JPGKQ==", "dependencies": { "tslib": "^2.3.0" }, @@ -893,16 +893,16 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/common": "18.2.11", - "@angular/core": "18.2.11", - "@angular/platform-browser": "18.2.11", + "@angular/common": "18.2.12", + "@angular/core": "18.2.12", + "@angular/platform-browser": "18.2.12", "rxjs": "^6.5.3 || ^7.4.0" } }, "node_modules/@angular/service-worker": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-18.2.11.tgz", - "integrity": "sha512-FZ1yHCAmmbg+NYNFtvrZE8RzgsSnWgsL2ef+mvlfC/fxyu4pyoZT4+ZshwN7k55L++6M/RgdV7cZevPN4qGNrA==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@angular/service-worker/-/service-worker-18.2.12.tgz", + "integrity": "sha512-rgztA+Eduo69y6cvSDtAXC5lMTWjgowSSreiyM4ssyjwd8vD6h2TZp/3slr8Tt6+Lh9J4bK+UdcqMIjIdDxwSw==", "dependencies": { "tslib": "^2.3.0" }, @@ -913,8 +913,8 @@ "node": "^18.19.1 || ^20.11.1 || >=22.0.0" }, "peerDependencies": { - "@angular/common": "18.2.11", - "@angular/core": "18.2.11" + "@angular/common": "18.2.12", + "@angular/core": "18.2.12" } }, "node_modules/@babel/code-frame": { @@ -4072,9 +4072,9 @@ ] }, "node_modules/@ngtools/webpack": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-18.2.11.tgz", - "integrity": "sha512-iTdUGJ5O7yMm1DyCzyoMDMxBJ68emUSSXPWbQzEEdcqmtifRebn+VAq4vHN8OmtGM1mtuKeLEsbiZP8ywrw7Ug==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-18.2.12.tgz", + "integrity": "sha512-FFJAwtWbtpncMOVNuULPBwFJB7GSjiUwO93eGTzRp8O4EPQ8lCQeFbezQm/NP34+T0+GBLGzPSuQT+muob8YKw==", "dev": true, "engines": { "node": "^18.19.1 || ^20.11.1 || >=22.0.0", @@ -4678,13 +4678,13 @@ ] }, "node_modules/@schematics/angular": { - "version": "18.2.11", - "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-18.2.11.tgz", - "integrity": "sha512-jT54mc9+hPOwie9bji/g2krVuK1kkNh2PNFGwfgCg3Ofmt3hcyOBai1DKuot5uLTX4VCCbvfwiVR/hJniQl2SA==", + "version": "18.2.12", + "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-18.2.12.tgz", + "integrity": "sha512-sIoeipsisK5eTLW3XuNZYcal83AfslBbgI7LnV+3VrXwpasKPGHwo2ZdwhCd2IXAkuJ02Iyu7MyV0aQRM9i/3g==", "dev": true, "dependencies": { - "@angular-devkit/core": "18.2.11", - "@angular-devkit/schematics": "18.2.11", + "@angular-devkit/core": "18.2.12", + "@angular-devkit/schematics": "18.2.12", "jsonc-parser": "3.3.1" }, "engines": { @@ -7233,9 +7233,9 @@ "dev": true }, "node_modules/bonjour-service": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.2.1.tgz", - "integrity": "sha512-oSzCS2zV14bh2kji6vNe7vrpJYCHGvcZnlffFQ1MEoX/WOeQ/teD8SYWKR942OI3INjq8OMNJlbPK5LLLUxFDw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.3.0.tgz", + "integrity": "sha512-3YuAUiSkWykd+2Azjgyxei8OWf8thdn8AITIog2M4UICzoqfjlqr64WIjEXZllf/W6vK1goqleSR6brGomxQqA==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.3", @@ -13383,9 +13383,9 @@ } }, "node_modules/node-gyp-build": { - "version": "4.8.2", - "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.2.tgz", - "integrity": "sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==", + "version": "4.8.4", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.8.4.tgz", + "integrity": "sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==", "dev": true, "optional": true, "bin": { @@ -14008,9 +14008,9 @@ } }, "node_modules/p-retry": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.0.tgz", - "integrity": "sha512-JA6nkq6hKyWLLasXQXUrO4z8BUZGUt/LjlJxx8Gb2+2ntodU/SS63YZ8b0LUTbQ8ZB9iwOfhEPhg4ykKnn2KsA==", + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/p-retry/-/p-retry-6.2.1.tgz", + "integrity": "sha512-hEt02O4hUct5wtwg4H4KcWgDdm+l1bOaEy/hWzd8xtXB9BqxTWBBhb+2ImAtH4Cv4rPjV76xN3Zumqk3k3AhhQ==", "dev": true, "dependencies": { "@types/retry": "0.12.2", @@ -17940,9 +17940,9 @@ } }, "node_modules/vite/node_modules/postcss": { - "version": "8.4.48", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.48.tgz", - "integrity": "sha512-GCRK8F6+Dl7xYniR5a4FYbpBzU8XnZVeowqsQFYdcXuSbChgiks7qybSkbvnaeqv0G0B+dd9/jJgH8kkLDQeEA==", + "version": "8.4.49", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.49.tgz", + "integrity": "sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==", "dev": true, "funding": [ { diff --git a/client/package.json b/client/package.json index 9b41c9afd1..63b80d11b2 100644 --- a/client/package.json +++ b/client/package.json @@ -36,18 +36,18 @@ "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": "^16.0.3", @@ -100,14 +100,14 @@ "zone.js": "^0.14.10" }, "devDependencies": { - "@angular-devkit/build-angular": "^18.2.11", + "@angular-devkit/build-angular": "^18.2.12", "@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", + "@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", From 1d1cb084c76a9dfd0e4e78a0ee655d8447211f17 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Thu, 21 Nov 2024 17:34:52 +0100 Subject: [PATCH 16/27] Add line numbers to empty paragraphs (#4343) --- .../line-numbering.service/line-numbering.service.spec.ts | 8 ++++++++ .../line-numbering.service/line-numbering.service.ts | 6 ++++++ client/src/assets/styles/tiptap.scss | 4 ++++ 3 files changed, 18 insertions(+) diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.spec.ts b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.spec.ts index 20ab9ae49b..336420233b 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.spec.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.spec.ts @@ -552,6 +552,14 @@ describe(`LineNumberingService`, () => { } )); + it(`counts empty paragraphs`, inject([LineNumberingService], (service: LineNumberingService) => { + const inHtml = `

Test 123

`; + const outHtml = service.insertLineNumbers({ html: inHtml, lineLength: 80, firstLine: 1 }); + expect(outHtml).toBe(`

` + noMarkup(1) + `

` + noMarkup(2) + `Test 123

`); + expect(service.stripLineNumbers(outHtml)).toBe(inHtml); + expect(service.insertLineBreaksWithoutNumbers(outHtml, 80)).toBe(outHtml); + })); + it(`does not fail in a weird case`, inject([LineNumberingService], (service: LineNumberingService) => { const inHtml = `seid Noch

Test 123

`; const outHtml = service.insertLineNumbers({ html: inHtml, lineLength: 80, firstLine: 1 }); diff --git a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.ts b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.ts index 2eecae47a2..55f7025175 100644 --- a/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.ts +++ b/client/src/app/site/pages/meetings/pages/motions/modules/change-recommendations/services/line-numbering.service/line-numbering.service.ts @@ -752,6 +752,12 @@ export class LineNumberingService { return element; } else if (isInlineElement(element)) { return this.insertLineNumbersToInlineNode(element, length, highlight); + } else if (element.tagName === `P` && !element.childNodes.length && this.currentLineNumber !== null) { + const lineNumber = this.createLineNumber(); + if (lineNumber) { + element.appendChild(lineNumber); + } + return element; } else { const newLength = this.calcBlockNodeLength(element, length); return this.insertLineNumbersToBlockNode(element, newLength, highlight); diff --git a/client/src/assets/styles/tiptap.scss b/client/src/assets/styles/tiptap.scss index c8d57aa250..e500e69925 100644 --- a/client/src/assets/styles/tiptap.scss +++ b/client/src/assets/styles/tiptap.scss @@ -7,4 +7,8 @@ & li > p:last-of-type { margin-bottom: 0; } + p:after { + content: ''; + display: inline-block; + } } From 3c913cbefcfad3826614954c99f6cd7754a7efad Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Fri, 22 Nov 2024 09:11:26 +0100 Subject: [PATCH 17/27] Remove motion-import, BaseImportService, BaseImportListComponent (#4377) --- .../site/base/base-import-list.component.ts | 59 -- .../base-import.service.ts | 797 ------------------ .../pages/motions/motions-routing.module.ts | 6 - .../motion-import-list.component.html | 16 - .../motion-import-list.component.scss | 4 - .../motion-import-list.component.spec.ts | 24 - .../motion-import-list.component.ts | 37 - .../import/category-import-helper.ts | 99 --- .../import/motion-block-import-helper.ts | 68 -- .../motion-import/import/tag-import-helper.ts | 68 -- .../motion-import-routing.module.ts | 12 - .../motion-import/motion-import.module.ts | 22 - .../services/motion-import.service.spec.ts | 16 - .../services/motion-import.service.ts | 113 --- .../services/motions-import-service.module.ts | 9 - .../motion-list/motion-list.component.html | 9 - 16 files changed, 1359 deletions(-) delete mode 100644 client/src/app/site/base/base-import-list.component.ts delete mode 100644 client/src/app/site/base/base-import.service/base-import.service.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.html delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.scss delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.spec.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/category-import-helper.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/motion-block-import-helper.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/tag-import-helper.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import-routing.module.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import.module.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.spec.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.ts delete mode 100644 client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motions-import-service.module.ts diff --git a/client/src/app/site/base/base-import-list.component.ts b/client/src/app/site/base/base-import-list.component.ts deleted file mode 100644 index 713c79476c..0000000000 --- a/client/src/app/site/base/base-import-list.component.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Directive, OnInit } from '@angular/core'; -import { auditTime, distinctUntilChanged } from 'rxjs'; -import { BaseComponent } from 'src/app/site/base/base.component'; - -import { Identifiable } from '../../domain/interfaces'; -import { getLongPreview, getShortPreview } from '../../infrastructure/utils'; -import { BaseImportService } from './base-import.service'; - -@Directive() -export abstract class BaseImportListComponent extends BaseComponent implements OnInit { - /** - * Helper function for previews - */ - public getLongPreview = getLongPreview; - - /** - * Helper function for previews - */ - public getShortPreview = getShortPreview; - - /** - * Switch that turns true if a file has been selected in the input - */ - public get canImport(): boolean { - return this._hasFile && this._modelsToCreateAmount > 0; - } - - private _hasFile = false; - private _modelsToCreateAmount = 0; - - public constructor(protected importer: BaseImportService) { - super(); - } - - public ngOnInit(): void { - this.initTable(); - } - - /** - * Initializes the table - */ - public initTable(): void { - const entryObservable = this.importer.getNewEntriesObservable(); - this.subscriptions.push( - entryObservable.pipe(distinctUntilChanged(), auditTime(100)).subscribe(newEntries => { - this._hasFile = newEntries.length > 0; - this._modelsToCreateAmount = newEntries.length; - }) - ); - } - - /** - * Triggers the importer's import - * - */ - public async doImport(): Promise { - await this.importer.doImport(); - } -} diff --git a/client/src/app/site/base/base-import.service/base-import.service.ts b/client/src/app/site/base/base-import.service/base-import.service.ts deleted file mode 100644 index 69547d1650..0000000000 --- a/client/src/app/site/base/base-import.service/base-import.service.ts +++ /dev/null @@ -1,797 +0,0 @@ -import { Directive, EventEmitter } from '@angular/core'; -import { MatSnackBar } from '@angular/material/snack-bar'; -import { TranslateService } from '@ngx-translate/core'; -import { Papa, ParseConfig } from 'ngx-papaparse'; -import { BehaviorSubject, map, Observable } from 'rxjs'; - -import { Identifiable } from '../../../domain/interfaces'; -import { - AdditionalImportHandler, - BaseAdditionalImportHandler -} from '../../../infrastructure/utils/import/base-additional-import-handler'; -import { - AfterImportHandler, - BaseAfterImportHandler -} from '../../../infrastructure/utils/import/base-after-import-handler'; -import { - BaseBeforeImportHandler, - BeforeImportHandler -} from '../../../infrastructure/utils/import/base-before-import-handler'; -import { ImportHandler } from '../../../infrastructure/utils/import/base-import-handler'; -import { - BaseMainImportHandler, - MainImportHandler -} from '../../../infrastructure/utils/import/base-main-import-handler'; -import { ImportModel } from '../../../infrastructure/utils/import/import-model'; -import { ImportStep, ImportStepPhase } from '../../../infrastructure/utils/import/import-step'; -import { - CsvJsonMapping, - CsvValueParsingConfig, - DUPLICATE_IMPORT_ERROR, - FileReaderProgressEvent, - hasBeforeFindAction, - ImportConfig, - ImportCSVPreview, - RawImportModel, - ValueLabelCombination -} from '../../../infrastructure/utils/import/import-utils'; -import { - StaticAdditionalImportHandler, - StaticAdditionalImportHandlerConfig -} from '../../../infrastructure/utils/import/static-additional-import-handler'; -import { - StaticAfterImportConfig, - StaticAfterImportHandler -} from '../../../infrastructure/utils/import/static-after-import-handler'; -import { StaticBeforeImportConfig } from '../../../infrastructure/utils/import/static-before-import-config'; -import { StaticBeforeImportHandler } from '../../../infrastructure/utils/import/static-before-import-handler'; -import { - StaticMainImportConfig, - StaticMainImportHandler -} from '../../../infrastructure/utils/import/static-main-import-handler'; -import { ImportService } from '../../../ui/base/import-service'; -import { ImportServiceCollectorService } from '../../services/import-service-collector.service'; - -@Directive() -export abstract class BaseImportService implements ImportService { - public chunkSize = 100; - - /** - * List of possible errors and their verbose explanation - */ - public errorList: { [errorKey: string]: string } = {}; - - /** - * The headers expected in the CSV matching import properties (in order) - */ - public expectedHeaders: string[] = []; - - /** - * The minimimal number of header entries needed to successfully create an entry - */ - public requiredHeaderLength = 2; - - /** - * The used column separator. If left on an empty string (default), - * the papaparse parser will automatically decide on separators. - */ - public columnSeparator = ``; - - /** - * The used text separator. - */ - public textSeparator = `"`; - - /** - * The encoding used by the FileReader object. - */ - public encoding = `utf-8`; - - public get currentImportPhaseObservable(): Observable { - return this._currentImportPhaseSubject; - } - - public get isImportValidObservable(): Observable { - return this._isImportValidSubject; - } - - /** - * List of possible encodings and their label. values should be values accepted - * by the FileReader API - */ - public encodings: ValueLabelCombination[] = [ - { value: `utf-8`, label: `UTF 8 - Unicode` }, - { value: `iso-8859-1`, label: `ISO 8859-1 - West European` }, - { value: `iso-8859-15`, label: `ISO 8859-15 - West European (with €)` } - ]; - - /** - * List of possible column separators to pass on to papaParse - */ - public columnSeparators: ValueLabelCombination[] = [ - { label: `Comma`, value: `,` }, - { label: `Semicolon`, value: `;` }, - { label: `Automatic`, value: `` } - ]; - - /** - * List of possible text separators to pass on to papaParse. Note that - * it cannot automatically detect textseparators (value must not be an empty string) - */ - public textSeparators: ValueLabelCombination[] = [ - { label: `Double quotes (")`, value: `"` }, - { label: `Single quotes (')`, value: `'` }, - { label: `Gravis (\`)`, value: `\`` } - ]; - - /** - * Emits an error string to display if a file import cannot be done - */ - public errorEvent = new EventEmitter(); - - /** - * Returns a summary on actions that will be taken/not taken. - */ - public get summary(): ImportCSVPreview { - if (!this._preview) { - this.updatePreview(); - } - return this._preview!; - } - - public get importingStepsObservable(): Observable { - return this._importingStepsSubject; - } - - public get leftReceivedHeaders(): string[] { - return this._lostHeaders.received; - } - - public get leftExpectedHeaders(): { [key: string]: string } { - return this._lostHeaders.expected; - } - - public get headerValues(): { [header: string]: string } { - return this._mapReceivedExpectedHeaders; - } - - public get rawFileObservable(): Observable { - return this._rawFileSubject; - } - - private get importModels(): ImportModel[] { - return Object.values(this._newEntries.value); - } - - /** - * BehaviorSubject for displaying a preview for the currently selected entries - */ - private readonly _newEntries = new BehaviorSubject<{ [importTrackId: number]: ImportModel }>({}); - - /** - * storing the summary preview for the import, to avoid recalculating it - * at each display change. - */ - private _preview: ImportCSVPreview | null = null; - - private _beforeImportHandler: { [key: string]: { mainHandler: BeforeImportHandler } } = {}; - private _afterImportHandler: { - [key: string]: { mainHandler: AfterImportHandler; additionalHandlers: AdditionalImportHandler[] }; - } = {}; - - private _otherMainImportHelper: MainImportHandler[] = []; - - private _modelHeadersAndVerboseNames: { [key: string]: string } = {}; - - private _getDuplicatesFn: - | ((entry: RawImportModel) => Partial[] | Promise[]>) - | undefined; - - protected readonly translate: TranslateService = this.importServiceCollector.translate; - protected readonly matSnackbar: MatSnackBar = this.importServiceCollector.matSnackBar; - - /** - * The last parsed file object (may be reparsed with new encoding, thus kept in memory) - */ - private _rawFile: File | null = null; - - private _rawFileSubject = new BehaviorSubject(null); - - /** - * FileReader object for file import - */ - private _reader = new FileReader(); - - private _importingStepsSubject = new BehaviorSubject([]); - private _currentImportPhaseSubject = new BehaviorSubject(ImportStepPhase.ENQUEUED); - private _isImportValidSubject = new BehaviorSubject(false); - - /** - * the list of parsed models that have been extracted from the opened file - */ - private _csvLines: { [header: string]: string }[] = []; - private _receivedHeaders: string[] = []; - private _mapReceivedExpectedHeaders: { [expectedHeader: string]: string } = {}; - private _requiredFields: (keyof MainModel)[] = []; - private _lostHeaders: { expected: { [header: string]: string }; received: string[] } = { - expected: {}, - received: [] - }; - - private _selfImportHelper: MainImportHandler | null = null; - - private readonly _papa: Papa = this.importServiceCollector.papa; - - /** - * Constructor. Creates a fileReader to subscribe to it for incoming parsed - * strings - */ - public constructor(private importServiceCollector: ImportServiceCollectorService) { - this._reader.onload = (event: FileReaderProgressEvent): void => { - this.parseInput(event.target?.result as string); - }; - this.init(); - } - - /** - * Parses the data input. Expects a string as returned by via a File.readAsText() operation - * - * @param file - */ - public parseInput(file: string): void { - this.init(); - this.clearPreview(); - const papaConfig: ParseConfig = { - header: true, - skipEmptyLines: `greedy`, - quoteChar: this.textSeparator - }; - if (this.columnSeparator) { - papaConfig.delimiter = this.columnSeparator; - } - const result = this._papa.parse(file, papaConfig); - this._csvLines = result.data; - this.parseCsvLines(); - } - - public clearFile(): void { - this.setParsedEntries({}); - this._rawFile = null; - this._rawFileSubject.next(null); - } - - public addLines(...lines: { [header: string]: any }[]): void { - for (const line of lines) { - this._csvLines.push(line); - } - this.parseCsvLines(); - } - - /** - * counts the amount of duplicates that have no decision on the action to - * be taken - */ - public updatePreview(): void { - const summary = { - total: 0, - new: 0, - duplicates: 0, - errors: 0, - done: 0 - }; - this.importModels.forEach(entry => { - summary.total += 1; - if (entry.status === `done`) { - summary.done += 1; - return; - } else if (entry.status === `error` && !entry.hasDuplicates) { - // errors that are not due to duplicates - summary.errors += 1; - return; - } else if (entry.hasDuplicates) { - summary.duplicates += 1; - return; - } else if (entry.status === `new`) { - summary.new += 1; - } - }); - this._preview = summary; - } - - public updateSummary(): void { - this._importingStepsSubject.next(this.getEveryImportHandler()); - } - - /** - * a subscribable representation of the new items to be imported - * - * @returns an observable BehaviorSubject - */ - public getNewEntriesObservable(): Observable[]> { - return this._newEntries.pipe(map(value => Object.values(value))); - } - - /** - * Handler after a file was selected. Basic checking for type, then hand - * over to parsing - * - * @param event type is Event, but has target.files, which typescript doesn't seem to recognize - */ - public onSelectFile(event: any): void { - if (event.target.files && event.target.files.length === 1) { - this._rawFile = event.target.files[0]; - this._rawFileSubject.next(this._rawFile); - this.readFile(); - } - } - - /** - * Rereads the (previously selected) file, if present. Thought to be triggered - * by parameter changes on encoding, column, text separators - */ - public refreshFile(): void { - if (this._rawFile) { - this.readFile(); - } - } - - /** - * Resets the data and preview (triggered upon selecting an invalid file) - */ - public clearPreview(): void { - this.getEveryImportHandler().forEach(handler => handler.doCleanup()); - this.setNextEntries({}); - this._lostHeaders = { expected: {}, received: [] }; - this._preview = null; - this._currentImportPhaseSubject.next(ImportStepPhase.ENQUEUED); - this._isImportValidSubject.next(false); - } - - /** - * set a list of short names for error, indicating which column failed - */ - private getVerboseError(error: string): string { - return this.errorList[error] ?? error; - } - - /** - * Get an extended error description. - * - * @param error - * @returns the extended error desription for that error - */ - public verbose(error: string): string { - return this.errorList[error] || error; - } - - /** - * Queries if a given error is present in the given entry - * - * @param entry the entry to check for the error. - * @param error The error to check for - * @returns true if the error is present - */ - public hasError(entry: ImportModel, error: string): boolean { - return entry.errors.includes(error); - } - - /** - * Executing the import. Creates all secondary data, maps the newly created - * secondary data to the new entries, then creates all entries without errors - * by submitting them to the server. The entries will receive the status - * 'done' on success. - */ - public async doImport(): Promise { - this._currentImportPhaseSubject.next(ImportStepPhase.PENDING); - await this.doBeforeImport(); - - for (const handler of this.getEveryMainImportHandler()) { - handler.startImport(); - await handler.doImport(); - handler.finishImport(); - } - - await this.doAfterImport(); - - this._currentImportPhaseSubject.next(ImportStepPhase.FINISHED); - this.updatePreview(); - } - - private async doBeforeImport(): Promise { - for (const { mainHandler } of Object.values(this._beforeImportHandler)) { - await mainHandler.doImport(); - } - } - - private async doAfterImport(): Promise { - for (const { mainHandler, additionalHandlers } of Object.values(this._afterImportHandler)) { - await mainHandler.doImport(); - for (const handler of additionalHandlers) { - handler.pipeImportedSideModels(mainHandler.getModelsToCreate()); - await handler.doImport(); - } - } - } - - public setNewHeaderValue(updateMapReceivedExpectedHeaders: { [headerKey: string]: string }): void { - for (const headerKey of Object.keys(updateMapReceivedExpectedHeaders)) { - this._mapReceivedExpectedHeaders[headerKey] = updateMapReceivedExpectedHeaders[headerKey]; - delete this._lostHeaders.expected[headerKey]; - this.leftReceivedHeaders.splice( - this.leftReceivedHeaders.findIndex(header => header === updateMapReceivedExpectedHeaders[headerKey]), - 1 - ); - } - this.checkImportValidness(); - this.propagateNextNewEntries(); - } - - private setNextEntries(nextEntries: { [importTrackId: number]: ImportModel }): void { - this._newEntries.next(nextEntries); - this.updatePreview(); - } - - /** - * A helper function to specify import-helpers for `ToCreate`. - * Should be overriden to specify the import-helpers. - * - * @returns A map containing import-helpers for specific attributes of `ToCreate`. - */ - protected getBeforeImportHelpers(): { [key: string]: BeforeImportHandler } { - return {}; - } - - protected pipeParseValue(_value: string, _header: keyof MainModel): any {} - - protected registerBeforeImportHandler( - header: string, - handler: StaticBeforeImportConfig | BaseBeforeImportHandler - ): void { - if (handler instanceof BaseBeforeImportHandler) { - this._beforeImportHandler[header] = { mainHandler: handler }; - } else { - this._beforeImportHandler[header] = { - mainHandler: new StaticBeforeImportHandler(handler, key => this.translate.instant(key)) - }; - } - } - - protected registerAfterImportHandler( - header: string, - handler: StaticAfterImportConfig | BaseAfterImportHandler, - additionalHandlers?: ( - | StaticAdditionalImportHandlerConfig - | BaseAdditionalImportHandler - )[] - ): void { - const getAfterImportHandler = ( - _handler: - | StaticAdditionalImportHandlerConfig - | BaseAdditionalImportHandler - ): BaseAdditionalImportHandler => { - if (_handler instanceof BaseAdditionalImportHandler) { - return _handler; - } else { - return new StaticAdditionalImportHandler({ - ..._handler, - translateFn: key => this.translate.instant(key) - }); - } - }; - const _additionalHandlers = (additionalHandlers ?? []).map(_handler => getAfterImportHandler(_handler)); - if (handler instanceof BaseAfterImportHandler) { - this._afterImportHandler[header] = { mainHandler: handler, additionalHandlers: _additionalHandlers }; - } else { - this._afterImportHandler[header] = { - mainHandler: new StaticAfterImportHandler( - handler, - header as keyof MainModel, - toTranslate => this.translate.instant(toTranslate) - ), - additionalHandlers: _additionalHandlers - }; - } - } - - protected registerMainImportHandler( - handler: StaticMainImportConfig | BaseMainImportHandler - ): void { - if (handler instanceof BaseMainImportHandler) { - this._otherMainImportHelper.push(handler); - } else { - this._otherMainImportHelper.push( - new StaticMainImportHandler({ - translateFn: (key): string => this.translate.instant(key), - resolveEntryFn: (importModel): MainModel => this.resolveEntry(importModel), - ...handler - }) - ); - } - } - - protected async onCreateImportModel(input: RawImportModel): Promise> { - if (!this._getDuplicatesFn) { - throw new Error(`No function to check for duplicates defined`); - } - const duplicates = await this._getDuplicatesFn(input); - const hasDuplicates = duplicates.length > 0; - const entry: ImportModel = new ImportModel({ - model: input.model as MainModel, - id: input.id, - hasDuplicates, - duplicates - }); - return entry; - } - - /** - * This function pipes received rows from a csv file already mapped to their internal used data structure. - * This is done, before import models are created from those rows. Thus, this function facilitates to decide - * how import models are created depending on the rows in the csv file. - * - * @param _entries - */ - protected async onBeforeCreatingImportModels(_entries: RawImportModel[]): Promise {} - - private async createImportModel( - input: RawImportModel, - errors: string[] = [] - ): Promise> { - const nextEntry = await this.onCreateImportModel(input); - if (nextEntry.hasDuplicates) { - errors.push(DUPLICATE_IMPORT_ERROR); - } - if (errors.length) { - nextEntry.errors = errors.map(error => this.getVerboseError(error)); - nextEntry.status = `error`; - } - return nextEntry; - } - - /** - * Maps the value in one csv line for every header to the header, which is later used for models that will be created or updated. - * These headers are specified in `_mapReceivedExpectedHeader`. - * - * @param line a csv line - * - * @returns an object which has the headers of the models used internal - */ - private createRawImportModel(line: CsvJsonMapping, index: number): RawImportModel { - const rawObject = Object.keys(this._mapReceivedExpectedHeaders).mapToObject(expectedHeader => { - const receivedHeader = this._mapReceivedExpectedHeaders[expectedHeader]; - return { [expectedHeader]: line[receivedHeader] }; - }); - return { - id: index, - model: rawObject as MainModel - }; - } - - private parseCsvLines(): void { - this._receivedHeaders = Object.keys(this._csvLines[0]); - const isValid = this.checkHeaderLength(); - this.checkReceivedHeaders(); - if (!isValid) { - return; - } - this.propagateNextNewEntries(); - this.updateSummary(); - } - - /** - * parses pre-prepared entries (e.g. from a textarea) instead of a csv structure - * - * @param entries: an array of prepared newEntry objects - */ - private setParsedEntries(entries: { [importTrackId: number]: ImportModel }): void { - this.clearPreview(); - if (!entries) { - return; - } - this.setNextEntries(entries); - } - - /** - * Maps incoming data of probably manual typed headers and values into headers, used by the rest of an import - * process. - * - * @param line An incoming header <-> value map - * @param importTrackId The number of an import object - * - * @returns A new model which values are linked to any helpers if needed. - */ - private mapData(importModel: ImportModel): void { - const rawObject = importModel.model; - const errors = []; - for (const expectedHeader of Object.keys(this._mapReceivedExpectedHeaders)) { - const handler = this._beforeImportHandler[expectedHeader] || this._afterImportHandler[expectedHeader]; - const csvValue = rawObject[expectedHeader as keyof MainModel] as any; - try { - const value = this.parseCsvValue(csvValue, { - header: expectedHeader as keyof MainModel, - importModel: importModel, - importFindHandler: handler?.mainHandler, - allImportModels: this.importModels - }); - rawObject[expectedHeader as keyof MainModel] = value; - } catch (e) { - console.debug(`Error while parsing ${expectedHeader}\n`, e); - errors.push((e as any).message); - rawObject[expectedHeader as keyof MainModel] = csvValue; - } - } - importModel.errors = importModel.errors.concat(errors); - } - - private init(): void { - const config = this.getConfig(); - this.expectedHeaders = Object.keys(config.modelHeadersAndVerboseNames); - this._modelHeadersAndVerboseNames = config.modelHeadersAndVerboseNames; - this._getDuplicatesFn = config.getDuplicatesFn; - this._requiredFields = config.requiredFields || []; - this.initializeImportHelpers(); - } - - private getSelfImportHelper(): MainImportHandler { - return this._selfImportHelper!; - } - - private initializeImportHelpers(): void { - const { createFn, updateFn, getDuplicatesFn, verboseNameFn, shouldCreateModelFn } = this.getConfig(); - const handlers = Object.entries(this.getBeforeImportHelpers()).mapToObject(([key, value]) => ({ - [key]: { mainHandler: value } - })); - this._beforeImportHandler = { ...this._beforeImportHandler, ...handlers }; - this._selfImportHelper = new StaticMainImportHandler({ - verboseNameFn, - getDuplicatesFn, - shouldCreateModelFn, - createFn, - updateFn, - translateFn: (key): string => this.translate.instant(key), - resolveEntryFn: (importModel): MainModel => this.resolveEntry(importModel) - }); - this.updateSummary(); - } - - private resolveEntry(entry: ImportModel): MainModel { - let model = { ...entry.newEntry } as MainModel; - for (const key of Object.keys(this._beforeImportHandler)) { - const { mainHandler: handler } = this._beforeImportHandler[key]; - const result = handler.doResolve(model, key); - model = result.model; - if (result.unresolvedModels) { - entry.errors = (entry.errors ?? []).concat(this.getVerboseError(result.verboseName as string)); - this.updatePreview(); - break; - } - } - for (const key of Object.keys(this._afterImportHandler)) { - delete model[key as keyof MainModel]; - } - return model; - } - - private parseCsvValue(value: string, config: CsvValueParsingConfig): any { - if (config.importFindHandler) { - const { importModel, allImportModels } = config; - return config.importFindHandler.findByName(value, { importModel, allImportModels }); - } - value = this.pipeParseValue(value, config.header) ?? value; - return value; - } - - /** - * reads the _rawFile - */ - private readFile(): void { - if (this._rawFile) { - this._reader.readAsText(this._rawFile, this.encoding); - } - } - - /** - * Checks the first line of the csv (the header) for consistency (length) - * - * @returns true if the line has at least the minimum amount of columns - */ - private checkHeaderLength(): boolean { - const snackbarDuration = 3000; - if (this._receivedHeaders.length < this.requiredHeaderLength) { - this.matSnackbar.open(this.translate.instant(`The file has too few columns to be parsed properly.`), ``, { - duration: snackbarDuration - }); - - this.clearPreview(); - return false; - } else if (this._receivedHeaders.length < this.expectedHeaders.length) { - this.matSnackbar.open( - this.translate.instant(`The file seems to have some ommitted columns. They will be considered empty.`), - ``, - { duration: snackbarDuration } - ); - } else if (this._receivedHeaders.length > this.expectedHeaders.length) { - this.matSnackbar.open( - this.translate.instant(`The file seems to have additional columns. They will be ignored.`), - ``, - { duration: snackbarDuration } - ); - } - return true; - } - - private checkReceivedHeaders(): void { - const leftReceivedHeaders = [...this._receivedHeaders]; - const expectedHeaders = [...this.expectedHeaders]; - while (expectedHeaders.length > 0) { - const toExpected = expectedHeaders.shift() as string; - const nextHeader = this._modelHeadersAndVerboseNames[toExpected]; - const nextHeaderTranslated = this.translate.instant(nextHeader); - let index = leftReceivedHeaders.findIndex(header => header === nextHeaderTranslated); - if (index > -1) { - this._mapReceivedExpectedHeaders[toExpected] = nextHeaderTranslated; - leftReceivedHeaders.splice(index, 1); - continue; - } - index = leftReceivedHeaders.findIndex(header => header === nextHeader); - if (index > -1) { - this._mapReceivedExpectedHeaders[toExpected] = nextHeader; - leftReceivedHeaders.splice(index, 1); - continue; - } - this._mapReceivedExpectedHeaders[toExpected] = toExpected; - this._lostHeaders.expected[toExpected] = nextHeaderTranslated; - } - this._lostHeaders.received = leftReceivedHeaders; - this.checkImportValidness(); - } - - private checkImportValidness(): void { - const requiredFulfilled = this._requiredFields.every( - field => !Object.keys(this._lostHeaders.expected).includes(field as string) - ); - const validModels = this.importModels.some(importModel => !importModel.errors.length); - this._isImportValidSubject.next(requiredFulfilled && validModels); - } - - private async propagateNextNewEntries(): Promise { - const rawEntries = this._csvLines.map((line, i) => this.createRawImportModel(line, i + 1)); - await this.onBeforeCreatingImportModels(rawEntries); - for (const entry of rawEntries) { - const nextEntry = await this.createImportModel(entry); - this.pushNextNewEntry(nextEntry); - } - for (const importHandler of this.getEveryImportHandler()) { - if (hasBeforeFindAction(importHandler)) { - await importHandler.onBeforeFind(this.importModels); - } - } - this.importModels.forEach(importModel => this.mapData(importModel)); - for (const importHandler of this.getEveryImportHandler()) { - importHandler.pipeModels(this.importModels); - } - this.checkImportValidness(); - } - - private pushNextNewEntry(nextEntry: ImportModel): void { - const oldEntries = this._newEntries.value; - oldEntries[nextEntry.id] = nextEntry; - this.setNextEntries(oldEntries); - } - - private getEveryImportHandler(): ImportHandler[] { - const beforeImportHandlers = Object.values(this._beforeImportHandler).map(({ mainHandler }) => mainHandler); - const afterImportHandlers = Object.values(this._afterImportHandler).flatMap( - ({ mainHandler, additionalHandlers }) => [mainHandler, ...additionalHandlers] - ); - return [...beforeImportHandlers, ...this.getEveryMainImportHandler(), ...afterImportHandlers]; - } - - private getEveryMainImportHandler(): MainImportHandler[] { - return [this.getSelfImportHelper(), ...this._otherMainImportHelper]; - } - - // Abstract methods - public abstract downloadCsvExample(): void; - protected abstract getConfig(): ImportConfig; -} diff --git a/client/src/app/site/pages/meetings/pages/motions/motions-routing.module.ts b/client/src/app/site/pages/meetings/pages/motions/motions-routing.module.ts index a4f1bc2de1..ae23ee32ba 100644 --- a/client/src/app/site/pages/meetings/pages/motions/motions-routing.module.ts +++ b/client/src/app/site/pages/meetings/pages/motions/motions-routing.module.ts @@ -50,12 +50,6 @@ const routes: Routes = [ loadChildren: () => import(`./pages/motion-polls/motion-polls.module`).then(m => m.MotionPollsModule), data: { meetingPermissions: [Permission.motionCanSee] } }, - { - path: `import`, - loadChildren: () => - import(`./pages/motion-import/motion-import.module`).then(m => m.MotionImportModule), - data: { meetingPermissions: [Permission.motionCanManage] } - }, { path: `call-list`, loadChildren: () => diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.html deleted file mode 100644 index 6e8bcbf576..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.html +++ /dev/null @@ -1,16 +0,0 @@ - - -
-

{{ 'Import motions' | translate }}

-
- - - @if (canImport) { - - } - -
- - diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.scss b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.scss deleted file mode 100644 index b1d5af99de..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.scss +++ /dev/null @@ -1,4 +0,0 @@ -.flex-wrap { - display: flex; - flex-wrap: wrap; -} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.spec.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.spec.ts deleted file mode 100644 index d27b5b52d7..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.spec.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { ComponentFixture, TestBed } from '@angular/core/testing'; - -import { MotionImportListComponent } from './motion-import-list.component'; - -xdescribe(`MotionImportListComponent`, () => { - let component: MotionImportListComponent; - let fixture: ComponentFixture; - - beforeEach(async () => { - await TestBed.configureTestingModule({ - declarations: [MotionImportListComponent] - }).compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(MotionImportListComponent); - component = fixture.componentInstance; - fixture.detectChanges(); - }); - - it(`should create`, () => { - expect(component).toBeTruthy(); - }); -}); diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.ts deleted file mode 100644 index 6aa893cea3..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/components/motion-import-list/motion-import-list.component.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { Component } from '@angular/core'; -import { TranslateService } from '@ngx-translate/core'; -import { BaseImportListComponent } from 'src/app/site/base/base-import-list.component'; -import { ViewMotion } from 'src/app/site/pages/meetings/pages/motions'; -import { ImportListHeaderDefinition } from 'src/app/ui/modules/import-list'; - -import { getVerboseNameOfMotionProperty, motionExpectedHeaders } from '../../../../services/export/definitions'; -import { MotionImportService } from '../../services/motion-import.service'; - -@Component({ - selector: `os-motion-import-list`, - templateUrl: `./motion-import-list.component.html`, - styleUrls: [`./motion-import-list.component.scss`] -}) -export class MotionImportListComponent extends BaseImportListComponent { - public possibleFields = motionExpectedHeaders.map(header => getVerboseNameOfMotionProperty(header)); - - public get columns(): ImportListHeaderDefinition[] { - return motionExpectedHeaders.map(header => ({ - property: `newEntry.${header}`, - label: this.translate.instant(getVerboseNameOfMotionProperty(header)), - isTableColumn: true, - isRequired: header === `title` || header === `text` - })); - } - - public constructor( - protected override translate: TranslateService, - public override importer: MotionImportService - ) { - super(importer); - } - - public getVerboseName(property: keyof ViewMotion): string { - return getVerboseNameOfMotionProperty(property); - } -} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/category-import-helper.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/category-import-helper.ts deleted file mode 100644 index 1ef1fbd705..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/category-import-helper.ts +++ /dev/null @@ -1,99 +0,0 @@ -import { TranslateService } from '@ngx-translate/core'; -import { MotionCategory } from 'src/app/domain/models/motions'; -import { BaseBeforeImportHandler } from 'src/app/infrastructure/utils/import/base-before-import-handler'; -import { CsvMapping, ImportResolveInformation } from 'src/app/infrastructure/utils/import/import-utils'; - -import { MotionCategoryControllerService } from '../../../modules/categories/services'; -import { ViewMotion } from '../../../view-models'; - -export class CategoryImportHelper extends BaseBeforeImportHandler { - public constructor( - private repo: MotionCategoryControllerService, - private translate: TranslateService - ) { - super({ - idProperty: `category_id`, - translateFn: translate.instant, - repo - }); - } - - public override findByName(name: string): CsvMapping { - const category = this.splitCategoryString(name); - if (!category.name) { - return null; - } - const existingCategory = this.repo.getViewModelList().find(cat => { - if (category.prefix && cat.prefix !== category.prefix) { - return false; - } - if (this.translate.instant(cat.name) === this.translate.instant(category.name)) { - return true; - } - return false; - }); - if (existingCategory) { - return { - name: existingCategory.prefixedName, - id: existingCategory.id - }; - } else { - if (!this.modelsToCreate.find(newCat => newCat.name === name)) { - this.modelsToCreate.push({ name } as any); - } - return { name }; - } - } - - public doResolve(item: ViewMotion, propertyName: string): ImportResolveInformation { - let property = item[propertyName]; - const result = { - model: item, - unresolvedModels: 0, - verboseName: `Category` - }; - if (!property) { - return result; - } - if (property.id) { - item.category_id = property.id; - return result; - } - const newCategory = this.modelsToCreate.find(category => category.name === property.name); - if (newCategory) { - property = newCategory; - item.category_id = newCategory.id; - return result; - } else { - ++result.unresolvedModels; - return result; - } - } - - protected override doTransformModels(models: CsvMapping[]): CsvMapping[] { - return models.map(category => this.splitCategoryString(category.name)); - } - - /** - * Helper to separate a category string from its' prefix. Assumes that a prefix is no longer - * than 5 chars and separated by a ' - ' - * - * @param categoryString the string to parse - * @returns an object with .prefix and .name strings - */ - private splitCategoryString(categoryString: string): { prefix: string; name: string } { - let prefixSeparator = ` - `; - if (categoryString.startsWith(prefixSeparator)) { - prefixSeparator = prefixSeparator.substring(1); - } - categoryString = categoryString.trim(); - let prefix = ``; - const separatorIndex = categoryString.indexOf(prefixSeparator); - - if (separatorIndex >= 0 && separatorIndex < 6) { - prefix = categoryString.substring(0, separatorIndex); - categoryString = categoryString.substring(separatorIndex + prefixSeparator.length); - } - return { prefix, name: categoryString }; - } -} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/motion-block-import-helper.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/motion-block-import-helper.ts deleted file mode 100644 index a1afa81b53..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/motion-block-import-helper.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { TranslateService } from '@ngx-translate/core'; -import { MotionBlock } from 'src/app/domain/models/motions'; -import { BaseBeforeImportHandler } from 'src/app/infrastructure/utils/import/base-before-import-handler'; -import { CsvMapping, ImportResolveInformation } from 'src/app/infrastructure/utils/import/import-utils'; - -import { MotionBlockControllerService } from '../../../modules/motion-blocks/services'; -import { ViewMotion } from '../../../view-models'; - -export class MotionBlockImportHelper extends BaseBeforeImportHandler { - public constructor( - private repo: MotionBlockControllerService, - private translate: TranslateService - ) { - super({ - idProperty: `block_id`, - translateFn: translate.instant, - repo - }); - } - - public doResolve(item: ViewMotion, propertyName: string): ImportResolveInformation { - const result: ImportResolveInformation = { - model: item, - unresolvedModels: 0, - verboseName: `Motion block` - }; - let property = item[propertyName]; - if (!property) { - return result; - } - if (property.id) { - item.block_id = property.id; - return result; - } - const newBlock = this.modelsToCreate.find(newMotionBlock => newMotionBlock.name === property.name); - if (newBlock) { - property = newBlock; - item.block_id = newBlock.id; - return result; - } else { - ++result.unresolvedModels; - return result; - } - } - - public override findByName(name: string): CsvMapping { - if (!name) { - return null; - } - name = name.trim(); - let existingBlocks = this.repo.getMotionBlocksByTitle(name); - if (!existingBlocks.length) { - existingBlocks = this.repo.getMotionBlocksByTitle(this.translate.instant(name)); - } - if (existingBlocks.length) { - return { id: existingBlocks[0].id, name: existingBlocks[0].title }; - } else { - if (!this.modelsToCreate.find(newBlock => newBlock.name === name)) { - this.modelsToCreate.push({ name } as any); - } - return { name }; - } - } - - protected override doTransformModels(models: CsvMapping[]): CsvMapping[] { - return models.map(model => ({ title: model.name })); - } -} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/tag-import-helper.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/tag-import-helper.ts deleted file mode 100644 index efc1e192a7..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/import/tag-import-helper.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { Ids } from 'src/app/domain/definitions/key-types'; -import { Tag } from 'src/app/domain/models/tag/tag'; -import { BaseBeforeImportHandler } from 'src/app/infrastructure/utils/import/base-before-import-handler'; -import { CsvMapping, ImportResolveInformation } from 'src/app/infrastructure/utils/import/import-utils'; - -import { TagControllerService } from '../../../modules/tags/services'; -import { ViewMotion } from '../../../view-models'; - -export class TagImportHelper extends BaseBeforeImportHandler { - public constructor(private repo: TagControllerService) { - super({ - idProperty: `tag_ids`, - translateFn: value => value, - repo - }); - } - - public override findByName(name: string): CsvMapping[] { - const result: CsvMapping[] = []; - if (!name) { - return result; - } - - const tagArray = this.filterValidNames(name.split(`,`)); - for (let tag of tagArray) { - tag = tag.trim(); - const existingTag = this.repo.getViewModelList().find(tagInRepo => tagInRepo.name === tag); - if (existingTag) { - result.push({ id: existingTag.id, name: existingTag.name }); - continue; - } - if (!this.modelsToCreate.find(entry => entry.name === tag)) { - this.modelsToCreate.push({ name: tag } as any); - } - result.push({ name: tag }); - } - return result; - } - - public doResolve(item: ViewMotion, propertyName: string): ImportResolveInformation { - const property = item[propertyName]; - const ids: Ids = []; - const result: ImportResolveInformation = { - model: item, - unresolvedModels: 0, - verboseName: `Tags` - }; - for (const tag of property) { - if (tag.id) { - ids.push(tag.id); - continue; - } - if (!this.modelsToCreate.length) { - ++result.unresolvedModels; - continue; - } - const mapped = this.modelsToCreate.find(t => t.name === tag.name); - if (mapped) { - tag.id = mapped.id; - ids.push(mapped.id); - } else { - ++result.unresolvedModels; - } - } - item.tag_ids = ids; - return result; - } -} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import-routing.module.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import-routing.module.ts deleted file mode 100644 index e8892befc3..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import-routing.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { NgModule } from '@angular/core'; -import { RouterModule, Routes } from '@angular/router'; - -import { MotionImportListComponent } from './components/motion-import-list/motion-import-list.component'; - -const routes: Routes = [{ path: ``, component: MotionImportListComponent, pathMatch: `full` }]; - -@NgModule({ - imports: [RouterModule.forChild(routes)], - exports: [RouterModule] -}) -export class MotionImportRoutingModule {} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import.module.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import.module.ts deleted file mode 100644 index 49d0d38c59..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/motion-import.module.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { CommonModule } from '@angular/common'; -import { NgModule } from '@angular/core'; -import { OpenSlidesTranslationModule } from 'src/app/site/modules/translations'; -import { HeadBarModule } from 'src/app/ui/modules/head-bar'; -import { ImportListModule } from 'src/app/ui/modules/import-list'; - -import { MotionImportListComponent } from './components/motion-import-list/motion-import-list.component'; -import { MotionImportRoutingModule } from './motion-import-routing.module'; -import { MotionsImportServiceModule } from './services/motions-import-service.module'; - -@NgModule({ - declarations: [MotionImportListComponent], - imports: [ - CommonModule, - MotionImportRoutingModule, - HeadBarModule, - MotionsImportServiceModule, - ImportListModule, - OpenSlidesTranslationModule.forChild() - ] -}) -export class MotionImportModule {} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.spec.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.spec.ts deleted file mode 100644 index 5a413a1f1c..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.spec.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { TestBed } from '@angular/core/testing'; - -import { MotionImportService } from './motion-import.service'; - -xdescribe(`MotionImportService`, () => { - let service: MotionImportService; - - beforeEach(() => { - TestBed.configureTestingModule({}); - service = TestBed.inject(MotionImportService); - }); - - it(`should be created`, () => { - expect(service).toBeTruthy(); - }); -}); diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.ts deleted file mode 100644 index f5477d9de3..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motion-import.service.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { Injectable } from '@angular/core'; -import { Motion } from 'src/app/domain/models/motions/motion'; -import { BeforeImportHandler } from 'src/app/infrastructure/utils/import/base-before-import-handler'; -import { ImportConfig } from 'src/app/infrastructure/utils/import/import-utils'; -import { UserImportHelper } from 'src/app/infrastructure/utils/import/users'; -import { BaseImportService } from 'src/app/site/base/base-import.service'; -import { MotionControllerService } from 'src/app/site/pages/meetings/pages/motions/services/common/motion-controller.service'; -import { ParticipantControllerService } from 'src/app/site/pages/meetings/pages/participants/services/common/participant-controller.service'; -import { ImportServiceCollectorService } from 'src/app/site/services/import-service-collector.service'; - -import { MotionCategoryControllerService } from '../../../modules/categories/services/motion-category-controller.service'; -import { MotionBlockControllerService } from '../../../modules/motion-blocks/services/motion-block-controller.service'; -import { TagControllerService } from '../../../modules/tags/services'; -import { getMotionExportHeadersAndVerboseNames } from '../../../services/export/definitions'; -import { MotionCsvExportService } from '../../../services/export/motion-csv-export.service'; -import { ViewMotion } from '../../../view-models'; -import { CategoryImportHelper } from '../import/category-import-helper'; -import { MotionBlockImportHelper } from '../import/motion-block-import-helper'; -import { TagImportHelper } from '../import/tag-import-helper'; -import { MotionsImportServiceModule } from './motions-import-service.module'; - -const CATEGORY_PROPERTY = `category`; -const MOTION_BLOCK_PROPERTY = `motion_block`; -const TAG_PROPERTY = `tags`; -const TEXT_PROPERTY = `text`; -const SUBMITTER_PROPERTY = `submitters`; -const SUPPORTER_PROPERTY = `supporters`; - -@Injectable({ - providedIn: MotionsImportServiceModule -}) -export class MotionImportService extends BaseImportService { - /** - * List of possible errors and their verbose explanation - */ - public override readonly errorList = { - MotionBlock: `Could not resolve the motion block`, - Category: `Could not resolve the category`, - Submitters: `Could not resolve the submitters`, - Tags: `Could not resolve the tags`, - Title: `A title is required`, - Text: `A content in the 'text' column is required`, - Duplicates: `A motion with this number already exists.` - }; - - /** - * The minimimal number of header entries needed to successfully create an entry - */ - public override readonly requiredHeaderLength = 3; - - /** - * Constructor. Defines the headers expected and calls the abstract class - * @param repo: The repository for motions. - * @param categoryRepo Repository to fetch pre-existing categories - * @param motionBlockRepo Repository to fetch pre-existing motionBlocks - * @param userRepo Repository to query/ create users - */ - public constructor( - serviceCollector: ImportServiceCollectorService, - private repo: MotionControllerService, - private categoryRepo: MotionCategoryControllerService, - private motionBlockRepo: MotionBlockControllerService, - private userRepo: ParticipantControllerService, - private tagRepo: TagControllerService, - private exporter: MotionCsvExportService - ) { - super(serviceCollector); - } - - public downloadCsvExample(): void { - this.exporter.exportDummyMotion(); - } - - protected getConfig(): ImportConfig { - return { - modelHeadersAndVerboseNames: getMotionExportHeadersAndVerboseNames(), - verboseNameFn: plural => this.repo.getVerboseName(plural), - getDuplicatesFn: (entry: Partial) => - this.repo.getViewModelList().filter(motion => motion.number === entry.number), - createFn: (entries: Motion[]) => this.repo.create(...entries) - }; - } - - protected override getBeforeImportHelpers(): { [key: string]: BeforeImportHandler } { - return { - [MOTION_BLOCK_PROPERTY]: new MotionBlockImportHelper(this.motionBlockRepo, this.translate), - [CATEGORY_PROPERTY]: new CategoryImportHelper(this.categoryRepo, this.translate), - [TAG_PROPERTY]: new TagImportHelper(this.tagRepo), - [SUBMITTER_PROPERTY]: new UserImportHelper({ - repo: this.userRepo, - verboseName: `Submitters`, - property: `submitter_ids`, - importedAs: SUBMITTER_PROPERTY - }), - [SUPPORTER_PROPERTY]: new UserImportHelper({ - repo: this.userRepo, - verboseName: `Supporters`, - property: `supporter_ids`, - importedAs: SUPPORTER_PROPERTY - }) - }; - } - - protected override pipeParseValue(value: string, header: keyof ViewMotion): any { - if (header === TEXT_PROPERTY && value) { - const isSurroundedByHTMLTags = /^<\w+[^>]*>[\w\W]*?<\/\w>$/.test(value); - - if (!isSurroundedByHTMLTags) { - return `

${value.replace(/\n([ \t]*\n)+/g, `

`).replace(/\n/g, `
`)}

`; - } - } - } -} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motions-import-service.module.ts b/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motions-import-service.module.ts deleted file mode 100644 index 19d62572b4..0000000000 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-import/services/motions-import-service.module.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { NgModule } from '@angular/core'; - -import { ParticipantCommonServiceModule } from '../../../../participants/services/common/participant-common-service.module'; -import { MotionsExportModule } from '../../../services/export/motions-export.module'; - -@NgModule({ - imports: [ParticipantCommonServiceModule, MotionsExportModule] -}) -export class MotionsImportServiceModule {} diff --git a/client/src/app/site/pages/meetings/pages/motions/pages/motion-list/components/motion-list/motion-list.component.html b/client/src/app/site/pages/meetings/pages/motions/pages/motion-list/components/motion-list/motion-list.component.html index bc58bd7eae..10cf9a3c48 100644 --- a/client/src/app/site/pages/meetings/pages/motions/pages/motion-list/components/motion-list/motion-list.component.html +++ b/client/src/app/site/pages/meetings/pages/motions/pages/motion-list/components/motion-list/motion-list.component.html @@ -511,15 +511,6 @@

{{ 'Motions' | translate }}

{{ 'Export' | translate }} } - - @if (perms.isAllowed('manage')) { -
- -
- }
From d223a9c5c086df121217f4f1e6f8f60c64de621e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 09:33:11 +0100 Subject: [PATCH 18/27] Bump the angular-eslint group in /client with 5 updates (#4371) --- client/package-lock.json | 113 +++++++++++++++++++-------------------- client/package.json | 10 ++-- 2 files changed, 59 insertions(+), 64 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 4b207d4287..72cbbab04c 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -74,11 +74,11 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^18.2.12", - "@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-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", @@ -409,9 +409,9 @@ } }, "node_modules/@angular-eslint/builder": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-18.4.0.tgz", - "integrity": "sha512-FOzGHX/nHSV1wSduSsabsx3aqC1nfde0opEpEDSOJhxExDxKCwoS1XPy1aERGyKip4ZVA6phC3dLtoBH3QMkVQ==", + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-18.4.1.tgz", + "integrity": "sha512-Ofkwd9Rg52K+AgvnV1RXYXVBGJvl5jD7+4dqwoprqXG7YKNTdHy5vqNZ5XDSMb26qjoZF7JC+IKruKFaON/ZaA==", "dev": true, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", @@ -419,19 +419,19 @@ } }, "node_modules/@angular-eslint/bundled-angular-compiler": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-18.4.0.tgz", - "integrity": "sha512-HlFHt2qgdd+jqyVIkCXmrjHauXo/XY3Rp0UNabk83ejGi/raM/6lEFI7iFWzHxLyiAKk4OgGI5W26giSQw991A==", + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-18.4.1.tgz", + "integrity": "sha512-gCQC0mgBO1bwHDXL9CUgHW+Rf1XGZCLAopoXnggwxGkBCx+oww507t+jrSOxdh+4OTKU4ZfmbtWd7Y8AeXns8w==", "dev": true }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-18.4.0.tgz", - "integrity": "sha512-Saz9lkWPN3da7ZKW17UsOSN7DeY+TPh+wz/6GCNZCh67Uw2wvMC9agb+4hgpZNXYCP5+u7erqzxQmBoWnS/A+A==", + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-18.4.1.tgz", + "integrity": "sha512-FoHwj+AFo8ONKb8wEK5qpo6uefuyklZlDqErJxeC3fpNIJzDe8PWBcJsuZt7Wwm/HeggWgt0Au6h+3IEa0V3BQ==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.0", - "@angular-eslint/utils": "18.4.0" + "@angular-eslint/bundled-angular-compiler": "18.4.1", + "@angular-eslint/utils": "18.4.1" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -440,13 +440,13 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-18.4.0.tgz", - "integrity": "sha512-n3uZFCy76DnggPqjSVFV3gYD1ik7jCG28o2/HO4kobcMNKnwW8XAlFUagQ4TipNQh7fQiAefsEqvv2quMsYDVw==", + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-18.4.1.tgz", + "integrity": "sha512-sofnKpi6wOZ6avVfYYqB7sCgGgWF2HgCZfW+IAp1MtVD2FBa1zTSbbfIZ1I8Akpd22UXa4LKJd0TLwm5XHHkiQ==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.0", - "@angular-eslint/utils": "18.4.0", + "@angular-eslint/bundled-angular-compiler": "18.4.1", + "@angular-eslint/utils": "18.4.1", "aria-query": "5.3.2", "axobject-query": "4.1.0" }, @@ -457,43 +457,15 @@ "typescript": "*" } }, - "node_modules/@angular-eslint/eslint-plugin-template/node_modules/@angular-eslint/utils": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-18.4.0.tgz", - "integrity": "sha512-At1yS8GRviGBoaupiQwEOL4/IcZJCE/+2vpXdItMWPGB1HWetxlKAUZTMmIBX/r5Z7CoXxl+LbqpGhrhyzIQAg==", - "dev": true, - "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.0" - }, - "peerDependencies": { - "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": "*" - } - }, - "node_modules/@angular-eslint/eslint-plugin/node_modules/@angular-eslint/utils": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-18.4.0.tgz", - "integrity": "sha512-At1yS8GRviGBoaupiQwEOL4/IcZJCE/+2vpXdItMWPGB1HWetxlKAUZTMmIBX/r5Z7CoXxl+LbqpGhrhyzIQAg==", - "dev": true, - "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.0" - }, - "peerDependencies": { - "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", - "eslint": "^8.57.0 || ^9.0.0", - "typescript": "*" - } - }, "node_modules/@angular-eslint/schematics": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-18.4.0.tgz", - "integrity": "sha512-ssqe+0YCfekbWIXNdCrHfoPK/bPZAWybs0Bn/b99dfd8h8uyXkERo9AzIOx4Uyj/08SkP9aPL/0uOOEHDsRGwQ==", + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-18.4.1.tgz", + "integrity": "sha512-1+gGodwh+UevtEx9mzZbzP1uY/9NAGEbsn8jisG1TEPDby2wKScQj6U6JwGxoW/Dd/4SIeSdilruZPALkqha7g==", "dev": true, "dependencies": { - "@angular-eslint/eslint-plugin": "18.4.0", - "@angular-eslint/eslint-plugin-template": "18.4.0", - "ignore": "5.3.2", + "@angular-eslint/eslint-plugin": "18.4.1", + "@angular-eslint/eslint-plugin-template": "18.4.1", + "ignore": "6.0.2", "semver": "7.6.3", "strip-json-comments": "3.1.1" }, @@ -502,13 +474,22 @@ "@angular-devkit/schematics": ">= 18.0.0 < 19.0.0" } }, + "node_modules/@angular-eslint/schematics/node_modules/ignore": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, "node_modules/@angular-eslint/template-parser": { - "version": "18.4.0", - "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-18.4.0.tgz", - "integrity": "sha512-VTep3Xd3IOaRIPL+JN/TV4/2DqUPbjtF3TNY15diD/llnrEhqFnmsvMihexbQyTqzOG+zU554oK44YfvAtHOrw==", + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-18.4.1.tgz", + "integrity": "sha512-LsStXVyso/89gQU5eiJebB/b1j+wrRtTLjk+ODVUTa7NGCCT7B7xI6ToTchkBEpSTHLT9pEQXHsHer3FymsQRQ==", "dev": true, "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.0", + "@angular-eslint/bundled-angular-compiler": "18.4.1", "eslint-scope": "^8.0.2" }, "peerDependencies": { @@ -532,6 +513,20 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@angular-eslint/utils": { + "version": "18.4.1", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-18.4.1.tgz", + "integrity": "sha512-F5UGE1J/CRmTbl8vjexQRwRglNqnJwdXCUejaG+qlGssSHoWcRB+ubbR/na3PdnzeJdBE6DkLYElXnOQZ6YKfg==", + "dev": true, + "dependencies": { + "@angular-eslint/bundled-angular-compiler": "18.4.1" + }, + "peerDependencies": { + "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", + "eslint": "^8.57.0 || ^9.0.0", + "typescript": "*" + } + }, "node_modules/@angular/animations": { "version": "18.2.12", "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-18.2.12.tgz", diff --git a/client/package.json b/client/package.json index 63b80d11b2..83f80a3180 100644 --- a/client/package.json +++ b/client/package.json @@ -101,11 +101,11 @@ }, "devDependencies": { "@angular-devkit/build-angular": "^18.2.12", - "@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-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", From 4442751dbcbf30c2f6ca1a4799dfb836dfd6080e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 10:23:49 +0100 Subject: [PATCH 19/27] Bump the tsparticles group in /client with 4 updates (#4373) --- client/package-lock.json | 348 +++++++++++++++++++-------------------- client/package.json | 8 +- 2 files changed, 178 insertions(+), 178 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 72cbbab04c..a20e798a62 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -42,10 +42,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", @@ -5324,9 +5324,9 @@ } }, "node_modules/@tsparticles/basic": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/basic/-/basic-3.5.0.tgz", - "integrity": "sha512-oty33TxM2aHWrzcwWRic1bQ04KBCdpnvzv8JXEkx5Uyp70vgVegUbtKmwGki3shqKZIt3v2qE4I8NsK6onhLrA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/basic/-/basic-3.6.0.tgz", + "integrity": "sha512-VWSOTCURUFumvSkxm0ol2ZZ5zCJjwppnHKwt1I6TYRQ2PFUBVJsCpiuEHDWvIAGl6/ZQxgrVBBi+J3+J+edMqQ==", "funding": [ { "type": "github", @@ -5342,19 +5342,19 @@ } ], "dependencies": { - "@tsparticles/engine": "^3.5.0", - "@tsparticles/move-base": "^3.5.0", - "@tsparticles/shape-circle": "^3.5.0", - "@tsparticles/updater-color": "^3.5.0", - "@tsparticles/updater-opacity": "^3.5.0", - "@tsparticles/updater-out-modes": "^3.5.0", - "@tsparticles/updater-size": "^3.5.0" + "@tsparticles/engine": "^3.6.0", + "@tsparticles/move-base": "^3.6.0", + "@tsparticles/shape-circle": "^3.6.0", + "@tsparticles/updater-color": "^3.6.0", + "@tsparticles/updater-opacity": "^3.6.0", + "@tsparticles/updater-out-modes": "^3.6.0", + "@tsparticles/updater-size": "^3.6.0" } }, "node_modules/@tsparticles/engine": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/engine/-/engine-3.5.0.tgz", - "integrity": "sha512-RCwrJ2SvSYdhXJ24oUCjSUKEZQ9lXwObOWMvfMC9vS6/bk+Qo0N7Xx8AfumqzP/LebB1YJdlCvuoJMauAon0Pg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/engine/-/engine-3.6.0.tgz", + "integrity": "sha512-iDBD0ZTTtoI5WwZkcjAgMVP2oCK2GkNgO7/Eipsfb8ZWKxtD/niGI14ynVQ31sBzp/weARwTxc4BTpbMeQHCGg==", "funding": [ { "type": "github", @@ -5372,129 +5372,129 @@ "hasInstallScript": true }, "node_modules/@tsparticles/interaction-external-attract": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-attract/-/interaction-external-attract-3.5.0.tgz", - "integrity": "sha512-BQYjoHtq7yaETSvPtzKt93OO9MZ1WuDZj7cFPG+iujNekXiwhLRQ89a+QMcsTrCLx70KLJ7SuTzQL5MT1/kb2Q==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-attract/-/interaction-external-attract-3.6.0.tgz", + "integrity": "sha512-Dz3ekytC8yW8jm8vbFVGolOqf5nUmD+xU8Cj9SuiXwgvfvYOCEHguhnTlloHvw8Cxi/DDSskKvHU3xtSG3QacQ==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-bounce": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-bounce/-/interaction-external-bounce-3.5.0.tgz", - "integrity": "sha512-H/0//dn4zwKes8zWIjolfeokL0VAlj+EkK7LUhznPhPu+Gt+h6aJqPlwC2MdI5Rvcnps8dT7YoCBWBQ4tJH6zg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-bounce/-/interaction-external-bounce-3.6.0.tgz", + "integrity": "sha512-ukuKINpiIx4iO8CBtwvwMWpb1le5fXbP/YtDdcbHpUwya4NvcllSsr+5NEE+0uMjepblVGwvApfua70lLwMlKg==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-bubble": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-bubble/-/interaction-external-bubble-3.5.0.tgz", - "integrity": "sha512-xTS4PQDMC5j9qOAFTC1M9DfBTJl8P8M41ySGtZHnCvVqG0oLlLSw15msniamjXyaoA4tZvBPM6G+GmFdgE9w1A==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-bubble/-/interaction-external-bubble-3.6.0.tgz", + "integrity": "sha512-cIPTy04HScuITwC4lnadElqNEwryP9Q+G1Jy9tGrcbBPIf5PUG9iF7mM9MImXhrPzxBPf39YCQxKdmWoxHlxig==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-connect": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-connect/-/interaction-external-connect-3.5.0.tgz", - "integrity": "sha512-VSpyZ0P8Hu4nq6C917X3tnwEROfGjrm0ivWJmbBv/lFJ9euZ2VeezeITNZNtNvt/hS5vLI8npDetB/wtd994HQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-connect/-/interaction-external-connect-3.6.0.tgz", + "integrity": "sha512-G5Ynn4Crn7dICnAKDHXR2be5ApLPOD048jL4PWU4oe69di0uSnQaiIvCdDsX+ljQZKOxzLsqqOFvvjLoN2uDvw==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-grab": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-grab/-/interaction-external-grab-3.5.0.tgz", - "integrity": "sha512-WOTWSGVerlfJZ9zwq8Eyutq1h0LAr1hI/Fs8j7s5qabZjxPzUBV8rhgghZ/nGrHEiB6j8SW4XMHkN6XR0VM9Ww==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-grab/-/interaction-external-grab-3.6.0.tgz", + "integrity": "sha512-cpMC1BrAkM4rYf4qrwCNMt1ryFDW7B1TaMBAUS9tFv2iaNSio23mRI0js+0UFzhfJEf/ZRKhamM0pubEv95Ujg==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-pause": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-pause/-/interaction-external-pause-3.5.0.tgz", - "integrity": "sha512-Hnj1mBH5X3d3zwTP6R+tYn45uTq5XGLDINhEzl30EAjXK30LQe8/RgE91O4CsMSrlTmouG0OuHYGC3nyrn/dcw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-pause/-/interaction-external-pause-3.6.0.tgz", + "integrity": "sha512-57cIXv+o31xjPCspw+RxDAyn/zsuCY3M3XNGnrLMDZFXO9bRFG6z8DFqQJgr+Boy452bC2w1H/OLsJUe1Jd7Cw==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-push": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-push/-/interaction-external-push-3.5.0.tgz", - "integrity": "sha512-8UNt5lYRhydDJCK7AznR3s1nJj3OCeLcDknARoq7hATdI+G151QAubD9NUUURCZ1GdXpftT5Bh0Bl1YtiZwOhg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-push/-/interaction-external-push-3.6.0.tgz", + "integrity": "sha512-ILILrHLz/rGXlaCa2lTkCKTAUghX3BdWxMCQawoJ1SNSTE8nxnBH+/sMSt/wpd3pp2yUuPsknpdOvJtcqah/xQ==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-remove": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-remove/-/interaction-external-remove-3.5.0.tgz", - "integrity": "sha512-+qiVRnR8xywg++gn8fagwpuQVh0WWKxIMkY6l6lMw9UoXz8L6MUVgvWaT632EVmkrTgM43pZ1m0W3m9aBY9rZw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-remove/-/interaction-external-remove-3.6.0.tgz", + "integrity": "sha512-5LvQdu+AAmOs9Vyb7fL9JxXL09ZBi5JiWhhz4I1QWVSZloOeA85ZR/BCraRRunbgT/LNktET2NZsNudg/LGgPw==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-repulse": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-repulse/-/interaction-external-repulse-3.5.0.tgz", - "integrity": "sha512-lTF7iLqCCQ3AbQSDVTpE3TihoVvI322/5QTqQmwylrrmjbDxGu4Hym4BHK5GqDHOdodOnwU2DWjRF5cRx3aPPg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-repulse/-/interaction-external-repulse-3.6.0.tgz", + "integrity": "sha512-v4jVUV8yz0RWCb9yS1FOgor8ksfb9MhtXvqCgJuIf0vWbux8+BIwWrfomAv8bVajrP0KDxXCjpK6O0Yxp4MHfw==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-external-slow": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-slow/-/interaction-external-slow-3.5.0.tgz", - "integrity": "sha512-KYp1GWbXdnLunFvHJt2YMZMMITebAt0XkzisKoSe+rfvoCbcMGXI2XvDYb0UkGvd8sKTSnHcn7cGH8dhVXXYaQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-external-slow/-/interaction-external-slow-3.6.0.tgz", + "integrity": "sha512-ZehG+0/Gm7qT6H3sdhkBOkD8o+dnQo8gdsSc5bNSacmP8JHVyak+1chrft54O5UYTYjbxJJPm0k/e2vwO57k6w==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-particles-attract": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-particles-attract/-/interaction-particles-attract-3.5.0.tgz", - "integrity": "sha512-ICnT9+9ZxINh5ZijyxjFXOOMC/jNQgOXPe+5MxgK/WYXE8mRbRzsOdaxiS3zK5PSFlqtztn189anDbfqcHDutQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-particles-attract/-/interaction-particles-attract-3.6.0.tgz", + "integrity": "sha512-LeurBClyTa4LySQv8Xc+FSyCQErbc8UaF0GaGXvc0/pqJtKDyGaDDxTLYgphz/WXMeGlVenSmx/bNBGX8lcGCA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-particles-collisions": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-particles-collisions/-/interaction-particles-collisions-3.5.0.tgz", - "integrity": "sha512-KrfyXy4l6nW2z0An2FE4z5R4rEiIONYPcDpkBhWqQK+pyLkHhtGYmqmP7Pb22IC9noFzjOCaR5CNVjWP7B+1vA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-particles-collisions/-/interaction-particles-collisions-3.6.0.tgz", + "integrity": "sha512-bfrL9TNE6huPTm9ZBE5Q+txiteDNZWWDaSwMberQAQZbUqMMwrUFib88QuMdh5kl5Tk2q+/PSAJ24ZzCUmhmKA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/interaction-particles-links": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/interaction-particles-links/-/interaction-particles-links-3.5.0.tgz", - "integrity": "sha512-ZdIixcGcRJMxCq4zxeRAzzbbuN5vVoy3pDDLaO3mnWnfJWywkYZToV0XvOUaHUT2AkUuKa9ZuQKx0LO3z1AO+w==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/interaction-particles-links/-/interaction-particles-links-3.6.0.tgz", + "integrity": "sha512-AXHwWsu88lQoE0sf4YX6CisTNu54cNI6d8fE+psxhxbx/H9tmeVjI4qcziKyWAweWxjTSfx+RYk1NsRVRamVVw==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/move-base": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/move-base/-/move-base-3.5.0.tgz", - "integrity": "sha512-9oDk7zTxyhUCstj3lHTNTiWAgqIBzWa2o1tVQFK63Qwq+/WxzJCSwZOocC9PAHGM1IP6nA4zYJSfjbMBTrUocA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/move-base/-/move-base-3.6.0.tgz", + "integrity": "sha512-g32LGNcTyNekwTJL0UD9pgTImdysRMxiRii7d+KDdzNMjv/OIiWK7Ar069TVtEtmKnXaiVCUmCX4vcTJzflDKA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/move-parallax": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/move-parallax/-/move-parallax-3.5.0.tgz", - "integrity": "sha512-1NC2OGsbdLc5T4uiRqq7i24b9FIhfaLnx4wVtOQjX48jWfy/ZKOdIEYLFKOPHnaMI0MjinJTNXLi9i6zVNCobg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/move-parallax/-/move-parallax-3.6.0.tgz", + "integrity": "sha512-akvJKearGWDPBTxKLPGk8zBVKSfmQiUgdlMOWPj7Pg0vNAr/oVZ6emzr1B35oS6SyUjqPesiEV15ukVQkQhFsA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/plugin-easing-quad": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/plugin-easing-quad/-/plugin-easing-quad-3.5.0.tgz", - "integrity": "sha512-Pd44hTiVlaaeQZwRlP+ih8jKmWuIQdkpPUJS0Qwzeck2nfK01IAflDJoxXxGF53vA8QOrz/K6VdVQJShD8yCsg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/plugin-easing-quad/-/plugin-easing-quad-3.6.0.tgz", + "integrity": "sha512-bCGM+MrvjhB4Xy4kIR7mabGXFt/dD/jxFfjNBX9D241HEkXTgpKviEtY1zjMzOSiYpFmOFISl2CdumQoylda4Q==", "funding": [ { "type": "github", @@ -5510,85 +5510,85 @@ } ], "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/plugin-emitters": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/plugin-emitters/-/plugin-emitters-3.5.0.tgz", - "integrity": "sha512-8Vg6wAPS75ibkukqtTM7yoC+8NnfXBl8xVUUbTaoeQCE0WDWwztboMf5L4pUgWe9WA52ZgFkWtT/mFH5wk5T9g==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/plugin-emitters/-/plugin-emitters-3.6.0.tgz", + "integrity": "sha512-+nzyAPniZJszozKoImMC88IYObujATL5ZmqJlgrx68eaLcwohUmHttWpaC+olMAHcPWx+bLRROSpbu6LSkiu4A==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-circle": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-circle/-/shape-circle-3.5.0.tgz", - "integrity": "sha512-59TmXkeeI6Jzv5vt/D3TkclglabaoEXQi2kbDjSCBK68SXRHzlQu29mSAL41Y5S0Ft5ZJKkAQHX1IqEnm8Hyjg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-circle/-/shape-circle-3.6.0.tgz", + "integrity": "sha512-kOnoKMgK72TD5R179PoblVFX1V7Xy63Bhg8zHEowtZo839SkHygmyBFl1U1o1oz3Ff/5dr1is4qZGJD/6HweQg==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-emoji": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-emoji/-/shape-emoji-3.5.0.tgz", - "integrity": "sha512-cxWHxQxnG5vLDltkoxdo7KS87uKPwQgf4SDWy/WCxW4Psm1TEeeSGYMJPVed+wWPspOKmLb7u8OaEexgE2pHHQ==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-emoji/-/shape-emoji-3.6.0.tgz", + "integrity": "sha512-i3KtxMzlwR7hLipiWjISiGBMCdY+Nx4k2clZsu1LMHS3okpk7yYkO0JkDUIQ8ZPUXQi7M07h42PkY0oyNuc36Q==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-image": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-image/-/shape-image-3.5.0.tgz", - "integrity": "sha512-lWYg7DTv74dSOnXy+4dr7t1/OSuUmxDpIo12Lbxgx/QBN7A5I/HoqbKcs13TSA0RS1hcuMgtti07BcDTEYW3Dw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-image/-/shape-image-3.6.0.tgz", + "integrity": "sha512-m1hW7AFjBsD/SJ3CbiH7QKIted6KOxXaNKXnnkBQpRWKPI9XayYB5NeWBhhxCD4vWynaLpGJT/xiba15ih9COA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-line": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-line/-/shape-line-3.5.0.tgz", - "integrity": "sha512-Qc4jwFEi/VnwmGwQBO/kCJEfNYdKHpeXfrdcqmm9c1B4iYHHDoaXJp6asMTggEfeAWu7fyPaO/7MURiPEqg7Hg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-line/-/shape-line-3.6.0.tgz", + "integrity": "sha512-fGWDsLAwPk8Z9SXUcWVCXD+m4cPWW0s2uuPi5fTD5ypp08J/RjwuZA2l/AGgIWaUrMXCWI5wgD8aXHKnF25rBg==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-polygon": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-polygon/-/shape-polygon-3.5.0.tgz", - "integrity": "sha512-sqYL+YXpnq3nSWcOEGZaJ4Z7Cb7x8M0iORSLpPdNEIvwDKdPczYyQM95D8ep19Pv1CV5L0uRthV36wg7UpnJ9Q==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-polygon/-/shape-polygon-3.6.0.tgz", + "integrity": "sha512-ubxw2XPY3pAphSR2Aq9lOzq60kG09QY0YxAMkxjFp6/3aeLopm9EondIVOb4LsdTUn12thvCtlxuqpt8cjl3Xg==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-square": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-square/-/shape-square-3.5.0.tgz", - "integrity": "sha512-rPHpA4Pzm1W5DIIow+lQS+VS7D2thSBQQbV9eHxb933Wh0/QC3me3w4vovuq7hdtVANhsUVO04n44Gc/2TgHkw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-square/-/shape-square-3.6.0.tgz", + "integrity": "sha512-HSkxmRnlk+N67lm5hgctjLWdaEAAd/XAVXoCD0z6Jtn58Yj/UbmvKqN3n+YXmZGO3dOrKKfJy5mpDJoOo/yHKQ==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-star": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-star/-/shape-star-3.5.0.tgz", - "integrity": "sha512-EDEJc4MYv3UbOeA3wrZjuJVtZ08PdCzzBij3T/7Tp3HUCf/p9XnfHBd/CPR5Mo6X0xpGfrein8UQN9CjGLHwUA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-star/-/shape-star-3.6.0.tgz", + "integrity": "sha512-4UOtrqUgcn8isFbeb58r21HBQubmU84W9R/NwU6rKAB+lmYhmLZMmT5pslRDolYgpSBfugncI2CMPmRFqdKicA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/shape-text": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/shape-text/-/shape-text-3.5.0.tgz", - "integrity": "sha512-HRWC5X702r6Cy0QWnlWbG8BjVZ+TElDOYrwJj9hlpkjb/IVY3YExv9mU2E/nJJRPpejlkibhU6GJo7VoBNjm8Q==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/shape-text/-/shape-text-3.6.0.tgz", + "integrity": "sha512-i2pYeNEeeUHfsxCXCe4wjJjlYGxY9UbyU28cswxcmNIoGdgNKZAZrsTAvgxWy3qENvrooR5mjDLJIa2ZsuVNDQ==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/slim": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/slim/-/slim-3.5.0.tgz", - "integrity": "sha512-CKx3VtzsY0fs/dQc41PYtL3edm1z2sBROTgvz3adwqMyTWkQGnjLQhsM777Ebb6Yjf5Jxu4TzWOBc2HO7Cstkg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/slim/-/slim-3.6.0.tgz", + "integrity": "sha512-qXEPcBFOM2PF2s5cnmoJEW/7bOasFJkMZlNwCHGh8OgL8l2kPvlWUADli32i/pK6g+pXDqFWOERITko4p2BDAQ==", "funding": [ { "type": "github", @@ -5604,88 +5604,88 @@ } ], "dependencies": { - "@tsparticles/basic": "^3.5.0", - "@tsparticles/engine": "^3.5.0", - "@tsparticles/interaction-external-attract": "^3.5.0", - "@tsparticles/interaction-external-bounce": "^3.5.0", - "@tsparticles/interaction-external-bubble": "^3.5.0", - "@tsparticles/interaction-external-connect": "^3.5.0", - "@tsparticles/interaction-external-grab": "^3.5.0", - "@tsparticles/interaction-external-pause": "^3.5.0", - "@tsparticles/interaction-external-push": "^3.5.0", - "@tsparticles/interaction-external-remove": "^3.5.0", - "@tsparticles/interaction-external-repulse": "^3.5.0", - "@tsparticles/interaction-external-slow": "^3.5.0", - "@tsparticles/interaction-particles-attract": "^3.5.0", - "@tsparticles/interaction-particles-collisions": "^3.5.0", - "@tsparticles/interaction-particles-links": "^3.5.0", - "@tsparticles/move-parallax": "^3.5.0", - "@tsparticles/plugin-easing-quad": "^3.5.0", - "@tsparticles/shape-emoji": "^3.5.0", - "@tsparticles/shape-image": "^3.5.0", - "@tsparticles/shape-line": "^3.5.0", - "@tsparticles/shape-polygon": "^3.5.0", - "@tsparticles/shape-square": "^3.5.0", - "@tsparticles/shape-star": "^3.5.0", - "@tsparticles/updater-life": "^3.5.0", - "@tsparticles/updater-rotate": "^3.5.0", - "@tsparticles/updater-stroke-color": "^3.5.0" + "@tsparticles/basic": "^3.6.0", + "@tsparticles/engine": "^3.6.0", + "@tsparticles/interaction-external-attract": "^3.6.0", + "@tsparticles/interaction-external-bounce": "^3.6.0", + "@tsparticles/interaction-external-bubble": "^3.6.0", + "@tsparticles/interaction-external-connect": "^3.6.0", + "@tsparticles/interaction-external-grab": "^3.6.0", + "@tsparticles/interaction-external-pause": "^3.6.0", + "@tsparticles/interaction-external-push": "^3.6.0", + "@tsparticles/interaction-external-remove": "^3.6.0", + "@tsparticles/interaction-external-repulse": "^3.6.0", + "@tsparticles/interaction-external-slow": "^3.6.0", + "@tsparticles/interaction-particles-attract": "^3.6.0", + "@tsparticles/interaction-particles-collisions": "^3.6.0", + "@tsparticles/interaction-particles-links": "^3.6.0", + "@tsparticles/move-parallax": "^3.6.0", + "@tsparticles/plugin-easing-quad": "^3.6.0", + "@tsparticles/shape-emoji": "^3.6.0", + "@tsparticles/shape-image": "^3.6.0", + "@tsparticles/shape-line": "^3.6.0", + "@tsparticles/shape-polygon": "^3.6.0", + "@tsparticles/shape-square": "^3.6.0", + "@tsparticles/shape-star": "^3.6.0", + "@tsparticles/updater-life": "^3.6.0", + "@tsparticles/updater-rotate": "^3.6.0", + "@tsparticles/updater-stroke-color": "^3.6.0" } }, "node_modules/@tsparticles/updater-color": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/updater-color/-/updater-color-3.5.0.tgz", - "integrity": "sha512-TGGgiLixIg37sst2Fj9IV4XbdMwkT6PYanM7qEqyfmv4hJ/RHMQlCznEe6b7OhChQVBg5ov5EMl/BT4/fIWEYw==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/updater-color/-/updater-color-3.6.0.tgz", + "integrity": "sha512-P0Ub1vuA8B9CU2ocRuHTM44vFsYA1cqOrdl/YehAeNsIA1N31jUdiRUYDIrQKj+9I+XbL4eyPf/P94eJIMCfMw==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/updater-life": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/updater-life/-/updater-life-3.5.0.tgz", - "integrity": "sha512-jlMEq16dwN+rZmW/UmLdqaCe4W0NFrVdmXkZV8QWYgu06a+Ucslz337nHYaP89/9rZWpNua/uq1JDjDzaVD5Jg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/updater-life/-/updater-life-3.6.0.tgz", + "integrity": "sha512-srpgYazcd9jH2r3po/Y21ZB+E9fN6N+va9KrLlO52scfA+vh5B8v5/em427O+ZeM2FIJHflkOMfEP3a3fxzpEA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/updater-opacity": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/updater-opacity/-/updater-opacity-3.5.0.tgz", - "integrity": "sha512-T2YfqdIFV/f5VOg1JQsXu6/owdi9g9K2wrJlBfgteo+IboVp6Lcuo4PGAfilWVkWrTdp1Nz4mz39NrLHfOce2g==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/updater-opacity/-/updater-opacity-3.6.0.tgz", + "integrity": "sha512-qlXfEvYrxy/PQwGKkucu5yHA7GEq6cV4SNAyzON1udbwBu3HKeLjUa0xBEyufpZlwnokg45Vtof0C4WrGSgX2w==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/updater-out-modes": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/updater-out-modes/-/updater-out-modes-3.5.0.tgz", - "integrity": "sha512-y6NZe2OSk5SrYdaLwUIQnHICsNEDIdPPJHQ2nAWSvAuPJphlSKjUknc7OaGiFwle6l0OkhWoZZe1rV1ktbw/lA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/updater-out-modes/-/updater-out-modes-3.6.0.tgz", + "integrity": "sha512-ohwKYPw8n4rva+Nm7vXRRA7OUMsSF0xvpXX+rrJ28qUoAjaYntDX/jekPbWiUO1u+0yBdYSqgcKHgO6zUMcYdA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/updater-rotate": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/updater-rotate/-/updater-rotate-3.5.0.tgz", - "integrity": "sha512-j4qPHQd1eUmDoGnIJOsVswHLqtTof1je+b2GTOLB3WIoKmlyUpzQYjVc7PNfLMuCEUubwpZCfcd/vC80VZeWkg==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/updater-rotate/-/updater-rotate-3.6.0.tgz", + "integrity": "sha512-E9S2mZ6Qr6p8xyMqo6WEj9Ixqi7W5OYppd16SfR/bjgUkcZSVHabhpVyEoBFbhsnJn/6rFfmE6i+RPpza7OhcA==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/updater-size": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/updater-size/-/updater-size-3.5.0.tgz", - "integrity": "sha512-TnWlOChBsVZffT2uO0S4ALGSzxT6UAMIVlhGMGFgSeIlktKMqM+dxDGAPrYa1n8IS2dkVGisiXzsV0Ss6Ceu1A==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/updater-size/-/updater-size-3.6.0.tgz", + "integrity": "sha512-XzDC6F6FNBv4PoG1SgQ7wMQuAhjzRwwZetTR8ayUaCBk2cjhhruT4YaLmMBpSyrzVjRdvZ+FOyljejUkCT8R3g==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tsparticles/updater-stroke-color": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/@tsparticles/updater-stroke-color/-/updater-stroke-color-3.5.0.tgz", - "integrity": "sha512-29X1zER+W9IBDv0nTD/jRXnu5rEU7uv7+W1N0B6leBipjAY24sg7Kub2SvXAaBKz6kHHWuCeccBOwIiiTpDqMA==", + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@tsparticles/updater-stroke-color/-/updater-stroke-color-3.6.0.tgz", + "integrity": "sha512-0l1LlWRX6kaXpmi3206gb+SpwHQtsZ0hAjuoDWQBi4B1OGDclxBaTLhrTZG3M41z7MdoMyvW7OgOmITbpc5GQw==", "dependencies": { - "@tsparticles/engine": "^3.5.0" + "@tsparticles/engine": "^3.6.0" } }, "node_modules/@tufjs/canonical-json": { diff --git a/client/package.json b/client/package.json index 83f80a3180..7cafe6484e 100644 --- a/client/package.json +++ b/client/package.json @@ -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", From 7d9be5168597bc162de90438cbd46ea4326003be Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Fri, 22 Nov 2024 10:24:47 +0100 Subject: [PATCH 20/27] Fix wrong interface description of view gender (#4366) --- .../pages/accounts/pages/gender/view-models/view-gender.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/pages/organization/pages/accounts/pages/gender/view-models/view-gender.ts b/client/src/app/site/pages/organization/pages/accounts/pages/gender/view-models/view-gender.ts index 620aa52b40..121daf90c7 100644 --- a/client/src/app/site/pages/organization/pages/accounts/pages/gender/view-models/view-gender.ts +++ b/client/src/app/site/pages/organization/pages/accounts/pages/gender/view-models/view-gender.ts @@ -1,5 +1,5 @@ import { Gender } from 'src/app/domain/models/gender/gender'; -import { BaseViewModel } from 'src/app/site/base/base-view-model'; +import { BaseViewModel, ViewModelRelations } from 'src/app/site/base/base-view-model'; import { ViewUser } from 'src/app/site/pages/meetings/view-models/view-user'; import { ViewOrganization } from 'src/app/site/pages/organization/view-models/view-organization'; @@ -16,4 +16,4 @@ interface IGenderRelations { organization: ViewOrganization; users: ViewUser[]; } -export interface ViewGender extends Gender, IGenderRelations {} +export interface ViewGender extends Gender, ViewModelRelations {} From dd89b62155c314afa26cc1ff0bbd4e25e5e67249 Mon Sep 17 00:00:00 2001 From: Bastian Rihm Date: Mon, 25 Nov 2024 09:46:52 +0100 Subject: [PATCH 21/27] Add option to projection modified final version (#4342) --- .../pages/motions/view-models/view-motion.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts b/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts index 008a03d824..9a4d4a9abe 100644 --- a/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts +++ b/client/src/app/site/pages/meetings/pages/motions/view-models/view-motion.ts @@ -347,17 +347,24 @@ export class ViewMotion extends BaseProjectableViewModel { public override getProjectionBuildDescriptor( meetingSettingsService: MeetingSettingsService ): ProjectionBuildDescriptor { + const choices = [ + { value: `original`, displayName: `Original version` }, + { value: `changed`, displayName: `Changed version` }, + { value: `diff`, displayName: `Diff version` } + ]; + + if (this.modified_final_version) { + choices.push({ value: `modified_final_version`, displayName: `Final version` }); + } else { + choices.push({ value: `agreed`, displayName: `Final version` }); + } + const slideOptions: SlideOptions = [ { key: `mode`, displayName: _(`Which version?`), default: meetingSettingsService.instant(`motions_recommendation_text_mode`)!, - choices: [ - { value: `original`, displayName: `Original version` }, - { value: `changed`, displayName: `Changed version` }, - { value: `diff`, displayName: `Diff version` }, - { value: `agreed`, displayName: `Final version` } - ] + choices } ]; From 857991f42de2ebd1076f2793efc13f31c272c7d3 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 25 Nov 2024 15:37:59 +0100 Subject: [PATCH 22/27] Update saml attr setting formatting function (#4383) --- client/src/app/infrastructure/utils/functions.spec.ts | 11 +++++++++-- client/src/app/infrastructure/utils/functions.ts | 2 +- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/client/src/app/infrastructure/utils/functions.spec.ts b/client/src/app/infrastructure/utils/functions.spec.ts index f6f06a30f4..98bd5040f1 100644 --- a/client/src/app/infrastructure/utils/functions.spec.ts +++ b/client/src/app/infrastructure/utils/functions.spec.ts @@ -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); }); @@ -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`, () => { diff --git a/client/src/app/infrastructure/utils/functions.ts b/client/src/app/infrastructure/utils/functions.ts index 5378655194..e267166e1b 100644 --- a/client/src/app/infrastructure/utils/functions.ts +++ b/client/src/app/infrastructure/utils/functions.ts @@ -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)) { From 4a3435b182133ead34f4f59cef5181fae32c0094 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Mon, 25 Nov 2024 16:31:13 +0100 Subject: [PATCH 23/27] Allow to edit certain users with two meetings (#4205) --- .../get-user-editable-presenter.service.ts | 29 +++++++++++++ client/src/app/gateways/presenter/index.ts | 1 + .../src/app/gateways/presenter/presenter.ts | 1 + .../participant-detail-view.component.ts | 41 +++++++++++++------ client/src/app/site/services/user.service.ts | 28 ++++++++++++- 5 files changed, 85 insertions(+), 15 deletions(-) create mode 100644 client/src/app/gateways/presenter/get-user-editable-presenter.service.ts diff --git a/client/src/app/gateways/presenter/get-user-editable-presenter.service.ts b/client/src/app/gateways/presenter/get-user-editable-presenter.service.ts new file mode 100644 index 0000000000..c86ce587fd --- /dev/null +++ b/client/src/app/gateways/presenter/get-user-editable-presenter.service.ts @@ -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 { + return await this.presenter.call(Presenter.GET_USER_EDITABLE, payload); + } +} diff --git a/client/src/app/gateways/presenter/index.ts b/client/src/app/gateways/presenter/index.ts index 08fa044646..bf6b40338a 100644 --- a/client/src/app/gateways/presenter/index.ts +++ b/client/src/app/gateways/presenter/index.ts @@ -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'; diff --git a/client/src/app/gateways/presenter/presenter.ts b/client/src/app/gateways/presenter/presenter.ts index d7995cbb66..f25eff1d59 100644 --- a/client/src/app/gateways/presenter/presenter.ts +++ b/client/src/app/gateways/presenter/presenter.ts @@ -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`, diff --git a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts index afc74d7d42..93cd1118e6 100644 --- a/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts +++ b/client/src/app/site/pages/meetings/pages/participants/pages/participant-detail/components/participant-detail-view/participant-detail-view.component.ts @@ -23,7 +23,10 @@ import { PromptService } from 'src/app/ui/modules/prompt-dialog'; import { ParticipantPdfExportService } from '../../../../export/participant-pdf-export.service'; import { GroupControllerService } from '../../../../modules'; -import { getParticipantMinimalSubscriptionConfig } from '../../../../participants.subscription'; +import { + getParticipantMinimalSubscriptionConfig, + PARTICIPANT_DETAIL_SUBSCRIPTION +} from '../../../../participants.subscription'; import { areGroupsDiminished } from '../../../participant-list/components/participant-list/participant-list.component'; import { ParticipantListSortService } from '../../../participant-list/services/participant-list-sort/participant-list-sort.service'; import { StructureLevelControllerService } from '../../../structure-levels/services/structure-level-controller.service'; @@ -80,7 +83,11 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent { public get shouldEnableFormControlFn(): (controlName: string) => boolean { return controlName => { const canUpdateUsers = this.isAllowed(`update`); - if (this._isUserInScope || (this.newUser && canUpdateUsers)) { + if (this.newUser && canUpdateUsers) { + return true; + } else if (this._isUserEditable && controlName !== `default_password`) { + return true; + } else if (this._isDefaultPasswordEditable && controlName === `default_password`) { return true; } else if (canUpdateUsers) { return controlName === `is_present` @@ -176,7 +183,7 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent { } public get saveButtonEnabled(): boolean { - return this.isFormValid && !this.isLockedOutAndCanManage; + return this._userFormLoaded && this.isFormValid && !this.isLockedOutAndCanManage; } public get isLockedOutAndCanManage(): boolean { @@ -192,10 +199,12 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent { } private _userId: Id | undefined = undefined; // Not initialized + private _userFormLoaded = false; private _isVoteWeightEnabled = false; private _isVoteDelegationEnabled = false; private _isElectronicVotingEnabled = false; - private _isUserInScope = false; + private _isDefaultPasswordEditable = false; + private _isUserEditable = false; public constructor( protected override translate: TranslateService, @@ -233,7 +242,6 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent { // TODO: Open groups subscription this.groups = this.groupRepo.getViewModelListWithoutSystemGroupsObservable(); - this.disableExpandControl = this.user?.vote_delegations_from().length < 10; } @@ -275,11 +283,9 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent { this.user = user; this.cd.markForCheck(); } - }), - this.operator.operatorUpdated.subscribe( - async () => (this._isUserInScope = await this.userService.hasScopeManagePerms(this._userId!)) - ) + }) ); + this.updateEditable(); } public getRandomPassword(): string { @@ -326,16 +332,19 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent { * @param edit */ public async setEditMode(edit: boolean): Promise { - if (!this.newUser && edit) { - this._isUserInScope = await this.userService.hasScopeManagePerms(this._userId!); - } - this.isEditingSubject.next(edit); // case: abort creation of a new user if (this.newUser && !edit) { this.goToAllUsers(); } + + if (edit) { + await this.modelRequestService.waitSubscriptionReady(PARTICIPANT_DETAIL_SUBSCRIPTION); + setTimeout(() => (this._userFormLoaded = true), 1000); + } else { + this._userFormLoaded = false; + } } /** @@ -478,4 +487,10 @@ export class ParticipantDetailViewComponent extends BaseMeetingComponent { private checkSelectedGroupsCanManage(): boolean { return this.usersGroups.some(group => group.hasPermission(Permission.userCanManage)); } + + private async updateEditable(): Promise { + const allowedFields = await this.userService.isEditable(this._userId, [`first_name`, `default_password`]); + this._isUserEditable = allowedFields.includes(`first_name`); + this._isDefaultPasswordEditable = allowedFields.includes(`default_password`); + } } diff --git a/client/src/app/site/services/user.service.ts b/client/src/app/site/services/user.service.ts index 1586e08e98..8e3bdfec16 100644 --- a/client/src/app/site/services/user.service.ts +++ b/client/src/app/site/services/user.service.ts @@ -2,7 +2,7 @@ import { Injectable } from '@angular/core'; import { Id } from 'src/app/domain/definitions/key-types'; import { CML, OML } from 'src/app/domain/definitions/organization-permission'; import { Permission } from 'src/app/domain/definitions/permission'; -import { GetUserScopePresenterService } from 'src/app/gateways/presenter'; +import { GetUserEditablePresenterService, GetUserScopePresenterService } from 'src/app/gateways/presenter'; import { ActiveMeetingService } from 'src/app/site/pages/meetings/services/active-meeting.service'; import { OperatorService } from 'src/app/site/services/operator.service'; @@ -22,7 +22,8 @@ export class UserService { private activeMeetingService: ActiveMeetingService, private presenter: GetUserScopePresenterService, private operator: OperatorService, - private meetingRepo: MeetingControllerService + private meetingRepo: MeetingControllerService, + private getUserEditablePresenter: GetUserEditablePresenterService ) {} /** @@ -108,4 +109,27 @@ export class UserService { return hasPerms; }); } + + /** + * Check editablity of standard personal info fields of a user + * + * @param userId The id of the user to check + * @param fields string[] of the fields which to check + * + * @returns string[] of the editable fields. + * The editable fields are a sublist of fields. + */ + public async isEditable(userId: Id, fields: string[]): Promise { + const result = await this.getUserEditablePresenter.call({ + user_ids: [userId], + fields: fields + }); + const editableFields = []; + for (const field of fields) { + if (result[`${userId}`][field][0]) { + editableFields.push(field); + } + } + return editableFields; + } } From 3f5227277c1db0eac37c6444dbd8c41a3b6e80f1 Mon Sep 17 00:00:00 2001 From: Ludwig Reiter Date: Thu, 28 Nov 2024 12:06:59 +0100 Subject: [PATCH 24/27] Small layout fixes to meeting setting: public access (#4420) --- .../meeting-settings-group-detail-field.component.html | 6 +++--- .../meeting-settings-definitions.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html index 19f56cb608..307e5235d5 100644 --- a/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html +++ b/client/src/app/site/pages/meetings/pages/meeting-settings/pages/meeting-settings-group-detail/components/meeting-settings-group-detail-field/meeting-settings-group-detail-field.component.html @@ -96,12 +96,12 @@ {{ setting.label | translate }} @if (setting.helpText) { - {{ setting.helpText | translate }} + {{ setting.helpText | translate }} } @if (getWarning()) { - - {{ setting.warnText | translate }} + + {{ setting.warnText | translate }} } @if (error) { diff --git a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts index a68efd642e..c366368f41 100644 --- a/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts +++ b/client/src/app/site/pages/meetings/services/meeting-settings-definition.service/meeting-settings-definitions.ts @@ -217,7 +217,7 @@ export const meetingSettings: SettingsGroup[] = fillInSettingsDefaults([ `Enables public access to this meeting without login data. Permissions can be set after activation in the new group 'Public'.` ), warnText: _( - `The public access setting is deactivated for the organization. Please contact your admins or hosting providers to activate the setting.` + `Note: The public access setting is deactivated for the organization. Please contact your admins or hosting providers to activate the setting.` ), warn: orgaSettings => !orgaSettings.instant(`enable_anonymous`) } From ec3a137c270ea2be2a17fd3c3f91846fb04fe4f1 Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:15:32 +0100 Subject: [PATCH 25/27] Add different style for first break (#4425) --- .../modules/editor/components/editor/editor.component.scss | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/src/app/ui/modules/editor/components/editor/editor.component.scss b/client/src/app/ui/modules/editor/components/editor/editor.component.scss index 78a8012902..9d6f003421 100644 --- a/client/src/app/ui/modules/editor/components/editor/editor.component.scss +++ b/client/src/app/ui/modules/editor/components/editor/editor.component.scss @@ -86,6 +86,12 @@ border: 1px dashed #bbb; } } + p { + br:only-child { + content: ''; + display: inline-block; + } + } @include detail-view-appearance; } From f33538c1f7341f5c76e4ebd71d42cf56fe10122e Mon Sep 17 00:00:00 2001 From: Elblinator <69210919+Elblinator@users.noreply.github.com> Date: Mon, 2 Dec 2024 09:26:02 +0100 Subject: [PATCH 26/27] Fix structure level card in autopilot (right side) (#4421) --- .../speaking-times/speaking-times.component.html | 2 +- .../speaking-times/speaking-times.component.scss | 5 ----- .../components/autopilot/autopilot.component.scss | 12 +++++++++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.html b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.html index 24637d7a65..b774b4d638 100644 --- a/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.html +++ b/client/src/app/site/pages/meetings/modules/list-of-speakers-content/components/speaking-times/speaking-times.component.html @@ -24,7 +24,7 @@