From 62dc4574764d1b970c339742530c9a4649eccaae Mon Sep 17 00:00:00 2001 From: George Date: Mon, 24 Jul 2023 12:53:20 +0300 Subject: [PATCH] CM-355, change modal texts, update common-ui. --- .../dialogs/rss-dialog/rss-dialog.component.html | 5 ++++- .../dialogs/rss-dialog/rss-dialog.component.ts | 8 ++------ apps/red-ui/src/assets/config/config.json | 6 +++--- apps/red-ui/src/assets/i18n/redact/de.json | 6 ++++++ apps/red-ui/src/assets/i18n/redact/en.json | 6 ++++++ apps/red-ui/src/assets/i18n/scm/de.json | 6 ++++++ apps/red-ui/src/assets/i18n/scm/en.json | 12 +++++++++--- libs/common-ui | 2 +- 8 files changed, 37 insertions(+), 14 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html index 58c569cbc..f65d1dbbf 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.html @@ -4,7 +4,10 @@
-
{{ getHeaderCellTranslation(cell) | translate }}
+
{{ 'rss-dialog.table-header.component' | translate }}
+
{{ 'rss-dialog.table-header.value' | translate }}
+
{{ 'rss-dialog.table-header.transformation-rule' | translate }}
+
{{ 'rss-dialog.table-header.annotation-references' | translate }}
{{ entry.key }}
diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts index 6277a31cc..0338e392e 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/rss-dialog/rss-dialog.component.ts @@ -1,4 +1,4 @@ -import { Component, Inject, OnInit, signal } from '@angular/core'; +import { ChangeDetectionStrategy, Component, Inject, OnInit, signal } from '@angular/core'; import { BaseDialogComponent, CircleButtonTypes } from '@iqser/common-ui'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { RssService } from '@services/files/rss.service'; @@ -14,6 +14,7 @@ interface RssData { @Component({ templateUrl: './rss-dialog.component.html', styleUrls: ['./rss-dialog.component.scss'], + changeDetection: ChangeDetectionStrategy.OnPush, }) export class RssDialogComponent extends BaseDialogComponent implements OnInit { readonly circleButtonTypes = CircleButtonTypes; @@ -21,7 +22,6 @@ export class RssDialogComponent extends BaseDialogComponent implements OnInit { readonly openStructuredComponentManagementDialogByDefault = signal( this.userPreferences.getOpenStructuredComponentManagementDialogByDefault(), ); - readonly tableHeaderCells = ['component', 'value', 'transformation-rule', 'annotation-references'] as const; constructor( protected readonly _dialogRef: MatDialogRef, @@ -37,10 +37,6 @@ export class RssDialogComponent extends BaseDialogComponent implements OnInit { await this.#loadData(); } - getHeaderCellTranslation(cell: string) { - return `rss-dialog.table-header.${cell}`; - } - originalOrder = (): number => 0; exportJSON() { diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 772d6e339..280ef08c2 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -2,7 +2,7 @@ "ADMIN_CONTACT_NAME": null, "ADMIN_CONTACT_URL": null, "API_URL": "https://dev-04.iqser.cloud", - "APP_NAME": "RedactManager very very very very long", + "APP_NAME": "DocuMine", "IS_DOCUMINE": true, "AUTO_READ_TIME": 3, "BACKEND_APP_VERSION": "4.4.40", @@ -17,8 +17,8 @@ "SELECTION_MODE": "structural", "MANUAL_BASE_URL": "https://docs.redactmanager.com/preview", "ANNOTATIONS_THRESHOLD": 1000, - "THEME": "redact", - "BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/redact/", + "THEME": "scm", + "BASE_TRANSLATIONS_DIRECTORY": "/assets/i18n/scm/", "AVAILABLE_NOTIFICATIONS_DAYS": 30, "AVAILABLE_OLD_NOTIFICATIONS_MINUTES": 60, "NOTIFICATIONS_THRESHOLD": 1000, diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index c34c882c4..5004a0238 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -2132,6 +2132,12 @@ "undo": "" }, "annotations": "", + "table-header": { + "annotation-references": "", + "component": "", + "transformation-rule": "", + "value": "" + }, "title": "" }, "rules-screen": { diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index e157891c2..47451d760 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -2132,6 +2132,12 @@ "undo": "Undo" }, "annotations": "", + "table-header": { + "annotation-references": "", + "component": "", + "transformation-rule": "", + "value": "" + }, "title": "Structured Component Management" }, "rules-screen": { diff --git a/apps/red-ui/src/assets/i18n/scm/de.json b/apps/red-ui/src/assets/i18n/scm/de.json index d0867eb4d..d0b7d4164 100644 --- a/apps/red-ui/src/assets/i18n/scm/de.json +++ b/apps/red-ui/src/assets/i18n/scm/de.json @@ -2132,6 +2132,12 @@ "undo": "" }, "annotations": "", + "table-header": { + "annotation-references": "", + "component": "", + "transformation-rule": "", + "value": "" + }, "title": "" }, "rules-screen": { diff --git a/apps/red-ui/src/assets/i18n/scm/en.json b/apps/red-ui/src/assets/i18n/scm/en.json index defd5c7b3..f1885e2b9 100644 --- a/apps/red-ui/src/assets/i18n/scm/en.json +++ b/apps/red-ui/src/assets/i18n/scm/en.json @@ -1410,7 +1410,7 @@ "no-data": { "title": "There have been no changes to this page." }, - "open-rss-view": "Open Structured Component Management View", + "open-rss-view": "Open Component View", "quick-nav": { "jump-first": "Jump to first page", "jump-last": "Jump to last page" @@ -1913,7 +1913,7 @@ "form": { "auto-expand-filters-on-action": "Auto expand filters on my actions", "load-all-annotations-warning": "Warning regarding loading all annotations at once in file preview", - "open-structured-view-by-default": "Display structured component management modal by default", + "open-structured-view-by-default": "Display component view by default when opening a document", "show-suggestions-in-preview": "Display suggestions in document preview", "unapproved-suggestions-warning": "Warning regarding unapproved suggestions in document Preview mode" }, @@ -2132,7 +2132,13 @@ "undo": "Undo to: {value}" }, "annotations": "{type} found on {pageCount, plural, one{page} other{pages}} {pages} by rule #{ruleNumber}", - "title": "Structured Component Management" + "table-header": { + "annotation-references": "Annotation references", + "component": "Component", + "transformation-rule": "Transformation rule", + "value": "Value" + }, + "title": "Component View" }, "rules-screen": { "error": { diff --git a/libs/common-ui b/libs/common-ui index d40f83936..7ff786476 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit d40f839365d62af8893cb529020702949ffeca33 +Subproject commit 7ff7864767e693a74ef1e05c8808847f7b4f0841