From 7794129521450d2ac0c0eb15c356861b62c7f8d5 Mon Sep 17 00:00:00 2001 From: Denys Vuika Date: Tue, 6 Jun 2023 15:22:12 +0100 Subject: [PATCH] [ACS-5372] remove old internal plugins (#3257) * [ACS-5372] remove old internal plugins * remove unused i18n keys --- app/src/assets/plugins/app.card-view.json | 21 --- app/src/assets/plugins/app.debug.json | 129 ------------- app/src/assets/plugins/app.metadata.json | 63 ------- app/src/assets/plugins/app.search.json | 170 ------------------ projects/aca-content/assets/i18n/ar.json | 2 - projects/aca-content/assets/i18n/cs.json | 2 - projects/aca-content/assets/i18n/da.json | 2 - projects/aca-content/assets/i18n/de.json | 2 - projects/aca-content/assets/i18n/en.json | 2 - projects/aca-content/assets/i18n/es.json | 2 - projects/aca-content/assets/i18n/fi.json | 2 - projects/aca-content/assets/i18n/fr.json | 2 - projects/aca-content/assets/i18n/it.json | 2 - projects/aca-content/assets/i18n/ja.json | 2 - projects/aca-content/assets/i18n/nb.json | 2 - projects/aca-content/assets/i18n/nl.json | 2 - projects/aca-content/assets/i18n/pl.json | 2 - projects/aca-content/assets/i18n/pt-BR.json | 2 - projects/aca-content/assets/i18n/ru.json | 2 - projects/aca-content/assets/i18n/sv.json | 2 - projects/aca-content/assets/i18n/zh-CN.json | 2 - .../aca-content/src/lib/aca-content.module.ts | 2 - .../document-display-mode.component.spec.ts | 63 ------- .../document-display-mode.component.ts | 74 -------- .../lib/components/toolbar/toolbar.module.ts | 3 - 25 files changed, 559 deletions(-) delete mode 100644 app/src/assets/plugins/app.card-view.json delete mode 100644 app/src/assets/plugins/app.debug.json delete mode 100644 app/src/assets/plugins/app.metadata.json delete mode 100644 app/src/assets/plugins/app.search.json delete mode 100644 projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.spec.ts delete mode 100644 projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.ts diff --git a/app/src/assets/plugins/app.card-view.json b/app/src/assets/plugins/app.card-view.json deleted file mode 100644 index e438dea5be..0000000000 --- a/app/src/assets/plugins/app.card-view.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "../../../../extension.schema.json", - "$id": "app.demo.cardView", - "$name": "app.demo.cardView", - "$version": "1.0.0", - "$vendor": "Hyland Software, Inc. and its affiliates", - "$license": "LGPL-3.0", - "$runtime": "1.5.0", - "$description": "Simple extension that provides Card View toolbar button", - - "features": { - "toolbar": [ - { - "id": "app.toolbar.cardView", - "order": 50, - "type": "custom", - "component": "app.toolbar.cardView" - } - ] - } -} diff --git a/app/src/assets/plugins/app.debug.json b/app/src/assets/plugins/app.debug.json deleted file mode 100644 index 88486a21e3..0000000000 --- a/app/src/assets/plugins/app.debug.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "$schema": "../../../../extension.schema.json", - "$id": "app.debug.plugin", - "$version": "1.0.0", - "$name": "app.debug.plugin", - "$vendor": "Hyland Software, Inc. and its affiliates", - "$license": "LGPL-3.0", - "$runtime": "1.5.0", - "$description": "Plugin for debugging and testing purposes", - - "actions": [ - { - "id": "plugin1.actions.settings", - "type": "NAVIGATE_URL", - "payload": "/settings" - }, - { - "id": "plugin1.actions.info", - "type": "SNACKBAR_INFO", - "payload": "I'm a nice little popup raised by extension." - }, - { - "id": "plugin1.actions.node-name", - "type": "SNACKBAR_INFO", - "payload": "$('Action for ' + context.selection.first.entry.name)" - } - ], - - "features": { - "viewer": { - "openWith": [ - { - "id": "plugin1.viewer.openWith.action1", - "type": "button", - "icon": "build", - "title": "Snackbar", - "actions": { - "click": "plugin1.actions.info" - } - } - ] - }, - "navbar": [ - { - "id": "__app.navbar.primary", - "disabled": true, - "items": [ - { - "id": "app.navbar.personalFiles", - "icon": "extension", - "title": "APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL", - "route": "personal-files" - } - ] - } - ], - "toolbar": [ - { - "disabled": true, - "id": "app.toolbar.createFolder", - "type": "button", - "order": 10, - "title": "APP.NEW_MENU.MENU_ITEMS.CREATE_FOLDER", - "description": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER", - "icon": "create_new_folder", - "actions": { - "click": "CREATE_FOLDER" - }, - "rules": { - "visible": "app.navigation.folder.canCreate" - } - }, - { - "disabled": true, - "id": "app.toolbar.uploadFile", - "order": 11, - "type": "button", - "icon": "file_upload", - "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FILE", - "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES", - "actions": { - "click": "UPLOAD_FILES" - }, - "rules": { - "visible": "app.navigation.folder.canUpload" - } - }, - { - "disabled": true, - "id": "app.toolbar.uploadFolder", - "order": 12, - "type": "button", - "icon": "cloud_upload", - "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FOLDER", - "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS", - "actions": { - "click": "UPLOAD_FOLDER" - }, - "rules": { - "visible": "app.navigation.folder.canUpload" - } - }, - { - "disabled": true, - "id": "plugin1.toolbar.menu1", - "type": "menu", - "icon": "storage", - "order": 300, - "children": [ - { - "id": "plugin1.toolbar.menu1.settings", - "type": "button", - "title": "Settings", - "icon": "settings_applications", - "actions": { - "click": "plugin1.actions.settings" - } - } - ] - }, - { - "disabled": true, - "id": "plugin1.toolbar.separator3", - "order": 301, - "type": "separator" - } - ] - } -} diff --git a/app/src/assets/plugins/app.metadata.json b/app/src/assets/plugins/app.metadata.json deleted file mode 100644 index b678160bd2..0000000000 --- a/app/src/assets/plugins/app.metadata.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "$schema": "../../../../extension.schema.json", - "$id": "app.demo.metadata", - "$name": "metadata-plugin", - "$version": "1.0.0", - "$vendor": "Hyland Software, Inc. and its affiliates", - "$license": "LGPL-3.0", - "$runtime": "1.5.0", - "$description": "metadata card configuration plugin - testing purpose", - - "features": { - "content-metadata-presets": [ - { - "id": "app.content.metadata.custom", - "custom": [ - { - "id": "app.content.metadata.customGroup", - "title": "testing extension props", - "items": [ - { - "id": "app.content.metadata.exifAspect", - "disabled": true - }, - { - "id": "app.content.metadata.exifAspect2", - "aspect": "exif:exif", - "properties": [ - "exif:orientation", - "exif:manufacturer", - "exif:model", - "exif:software" - ] - } - ] - }, - { - "id": "app.content.metadata.customGroup2", - "title": "testing extension props2", - "items": [ - { - "id": "app.content.metadata.exifAspect", - "aspect": "exif:exif", - "properties": [ - "exif:pixelXDimension", - "exif:pixelYDimension", - "exif:dateTimeOriginal" - ] - } - ] - } - ] - }, - { - "id": "app.content.metadata.kitten-images", - "kitten-images": { - "id": "app.content.metadata.kittenAspect", - "custom:aspect": "*", - "exif:exif": [ "exif:pixelXDimension", "exif:pixelYDimension"] - } - } - ] - } -} diff --git a/app/src/assets/plugins/app.search.json b/app/src/assets/plugins/app.search.json deleted file mode 100644 index 4c13765700..0000000000 --- a/app/src/assets/plugins/app.search.json +++ /dev/null @@ -1,170 +0,0 @@ -{ - "$schema": "../../../../extension.schema.json", - "$id": "app.debug-search.plugin", - "$version": "1.0.0", - "$name": "app.debug-search.plugin", - "$vendor": "Hyland Software, Inc. and its affiliates", - "$license": "LGPL-3.0", - "$runtime": "1.5.0", - "$description": "Plugin for debugging and testing purposes", - - "features": { - "search": [ - { - "id": "app.search.example", - "order": 200, - "name": "Extension search (folder)", - "default": true, - "filterWithContains": true, - "aca:fields": ["cm:name", "cm:title", "cm:description", "TEXT", "TAG"], - "include": ["path", "allowableOperations", "properties"], - "sorting": { - "options": [ - { - "key": "score", - "label": "SEARCH.SORT.RELEVANCE", - "type": "SCORE", - "field": "score", - "ascending": false - }, - { - "key": "name", - "label": "SEARCH.SORT.FILENAME", - "type": "FIELD", - "field": "cm:name", - "ascending": true - }, - { - "key": "title", - "label": "SEARCH.SORT.TITLE", - "type": "FIELD", - "field": "cm:title", - "ascending": true - }, - { - "key": "modified", - "label": "SEARCH.SORT.MODIFIED_DATE", - "type": "FIELD", - "field": "cm:modified", - "ascending": true - }, - { - "key": "modifier", - "label": "SEARCH.SORT.MODIFIER", - "type": "FIELD", - "field": "cm:modifier", - "ascending": true - }, - { - "key": "created", - "label": "SEARCH.SORT.CREATE_DATE", - "type": "FIELD", - "field": "cm:created", - "ascending": true - }, - { - "key": "content.sizeInBytes", - "label": "SEARCH.SORT.SIZE", - "type": "FIELD", - "field": "content.size", - "ascending": true - }, - { - "key": "content.mimetype", - "label": "SEARCH.SORT.TYPE", - "type": "FIELD", - "field": "content.mimetype", - "ascending": true - } - ], - "defaults": [ - { - "key": "score", - "type": "SCORE", - "field": "score", - "ascending": false - } - ] - }, - "aca:triggeredOnChange": false, - "resetButton": true, - "filterQueries": [ - { "query": "+TYPE:'cm:folder'" }, - { - "query": "-TYPE:'cm:thumbnail' AND -TYPE:'cm:failedThumbnail' AND -TYPE:'cm:rating'" - }, - { "query": "-cm:creator:System AND -QNAME:comment" }, - { - "query": "-TYPE:'st:site' AND -ASPECT:'st:siteContainer' AND -ASPECT:'sys:hidden'" - }, - { - "query": "-TYPE:'dl:dataList' AND -TYPE:'dl:todoList' AND -TYPE:'dl:issue'" - }, - { "query": "-TYPE:'fm:topic' AND -TYPE:'fm:post'" }, - { "query": "-TYPE:'lnk:link'" }, - { "query": "-PNAME:'0/wiki'" } - ], - "facetQueries": { - "label": "SEARCH.CATEGORIES.MODIFIED_DATE", - "expanded": true, - "queries": [ - { - "label": "SEARCH.FACET_QUERIES.TODAY", - "query": "cm:modified:[TODAY to TODAY]" - }, - { - "label": "SEARCH.FACET_QUERIES.THIS_WEEK", - "query": "cm:modified:[NOW/DAY-7DAYS TO NOW/DAY+1DAY]" - }, - { - "label": "SEARCH.FACET_QUERIES.THIS_MONTH", - "query": "cm:modified:[NOW/DAY-1MONTH TO NOW/DAY+1DAY]" - }, - { - "label": "SEARCH.FACET_QUERIES.LAST_6_MONTHS", - "query": "cm:modified:[NOW/DAY-6MONTHS TO NOW/DAY+1DAY]" - }, - { - "label": "SEARCH.FACET_QUERIES.THIS_YEAR", - "query": "cm:modified:[NOW/DAY-1YEAR TO NOW/DAY+1DAY]" - } - ], - "settings": { - "allowUpdateOnChange": false, - "hideDefaultAction": true - } - }, - "categories": [ - { - "id": "logic", - "name": "SEARCH.CATEGORIES.LOGIC", - "enabled": true, - "component": { - "selector": "logical-filter", - "settings": { - "allowUpdateOnChange": false, - "hideDefaultAction": true, - "field": "cm:name,cm:title,cm:description,TEXT,TAG" - } - } - }, - { - "id": "createdDateRange", - "name": "SEARCH.CATEGORIES.CREATED_DATE", - "enabled": true, - "component": { - "selector": "date-range", - "settings": { - "allowUpdateOnChange": false, - "hideDefaultAction": true, - "field": "cm:created", - "dateFormat": "DD-MMM-YY", - "maxDate": "today" - } - } - } - ] - } - ] - } -} diff --git a/projects/aca-content/assets/i18n/ar.json b/projects/aca-content/assets/i18n/ar.json index 27b416da39..137deb02cf 100644 --- a/projects/aca-content/assets/i18n/ar.json +++ b/projects/aca-content/assets/i18n/ar.json @@ -268,8 +268,6 @@ "LEAVE": "مغادرة المكتبة", "EDIT_OFFLINE": "تحرير دون اتصال بالإنترنت", "EDIT_OFFLINE_CANCEL": "إلغاء التحرير", - "LIST_MODE": "عرض القائمة", - "GALLERY_MODE": "عرض المعرض", "CHANGE_ASPECT": "تحرير الجوانب" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/cs.json b/projects/aca-content/assets/i18n/cs.json index a54754d3a4..4f3e84b219 100644 --- a/projects/aca-content/assets/i18n/cs.json +++ b/projects/aca-content/assets/i18n/cs.json @@ -268,8 +268,6 @@ "LEAVE": "Opustit knihovnu", "EDIT_OFFLINE": "Upravit offline", "EDIT_OFFLINE_CANCEL": "Zrušit úpravu", - "LIST_MODE": "Zobrazit seznam", - "GALLERY_MODE": "Zobrazit galerii", "CHANGE_ASPECT": "Upravit aspekty" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/da.json b/projects/aca-content/assets/i18n/da.json index aabfa2f71c..d2513b4114 100644 --- a/projects/aca-content/assets/i18n/da.json +++ b/projects/aca-content/assets/i18n/da.json @@ -268,8 +268,6 @@ "LEAVE": "Forlad bibliotek", "EDIT_OFFLINE": "Rediger offline", "EDIT_OFFLINE_CANCEL": "Annuller redigering", - "LIST_MODE": "Vis liste", - "GALLERY_MODE": "Vis galleri", "CHANGE_ASPECT": "Rediger udseende" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/de.json b/projects/aca-content/assets/i18n/de.json index 4dc7fb64ce..5ce7e9f93b 100644 --- a/projects/aca-content/assets/i18n/de.json +++ b/projects/aca-content/assets/i18n/de.json @@ -268,8 +268,6 @@ "LEAVE": "Bibliothek verlassen", "EDIT_OFFLINE": "Offline bearbeiten", "EDIT_OFFLINE_CANCEL": "Bearbeitung abbrechen", - "LIST_MODE": "Liste anzeigen", - "GALLERY_MODE": "Galerie anzeigen", "CHANGE_ASPECT": "Aspekte bearbeiten" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/en.json b/projects/aca-content/assets/i18n/en.json index 12ecd8ac15..42db5999df 100644 --- a/projects/aca-content/assets/i18n/en.json +++ b/projects/aca-content/assets/i18n/en.json @@ -268,8 +268,6 @@ "LEAVE": "Leave Library", "EDIT_OFFLINE": "Edit Offline", "EDIT_OFFLINE_CANCEL": "Cancel Editing", - "LIST_MODE": "View list", - "GALLERY_MODE": "View gallery", "CHANGE_ASPECT": "Edit Aspects" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/es.json b/projects/aca-content/assets/i18n/es.json index 50494aaf61..30b6a5ea86 100644 --- a/projects/aca-content/assets/i18n/es.json +++ b/projects/aca-content/assets/i18n/es.json @@ -268,8 +268,6 @@ "LEAVE": "Abandonar biblioteca", "EDIT_OFFLINE": "Editar fuera de línea", "EDIT_OFFLINE_CANCEL": "Cancelar edición", - "LIST_MODE": "Ver lista", - "GALLERY_MODE": "Ver galería", "CHANGE_ASPECT": "Editar aspectos" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/fi.json b/projects/aca-content/assets/i18n/fi.json index 744d7a6469..0abc7a0679 100644 --- a/projects/aca-content/assets/i18n/fi.json +++ b/projects/aca-content/assets/i18n/fi.json @@ -268,8 +268,6 @@ "LEAVE": "Poistu kirjastosta", "EDIT_OFFLINE": "Muokkaa offline-tilassa", "EDIT_OFFLINE_CANCEL": "Peruuta muokkaus", - "LIST_MODE": "Tarkastele luetteloa", - "GALLERY_MODE": "Tarkastele galleriaa", "CHANGE_ASPECT": "Muokkaa ominaisuusjoukkoja" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/fr.json b/projects/aca-content/assets/i18n/fr.json index 25aba88a01..eca6215ad6 100644 --- a/projects/aca-content/assets/i18n/fr.json +++ b/projects/aca-content/assets/i18n/fr.json @@ -268,8 +268,6 @@ "LEAVE": "Quitter la bibliothèque", "EDIT_OFFLINE": "Editer hors-ligne", "EDIT_OFFLINE_CANCEL": "Annuler l'édition", - "LIST_MODE": "Afficher la liste", - "GALLERY_MODE": "Afficher la galerie", "CHANGE_ASPECT": "Modifier les aspects" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/it.json b/projects/aca-content/assets/i18n/it.json index 3e044a2fdd..d54fefa33c 100644 --- a/projects/aca-content/assets/i18n/it.json +++ b/projects/aca-content/assets/i18n/it.json @@ -268,8 +268,6 @@ "LEAVE": "Esci dalla libreria", "EDIT_OFFLINE": "Modifica offline", "EDIT_OFFLINE_CANCEL": "Annulla modifica", - "LIST_MODE": "Visualizza elenco", - "GALLERY_MODE": "Visualizza raccolta", "CHANGE_ASPECT": "Modifica aspetti" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/ja.json b/projects/aca-content/assets/i18n/ja.json index 2f0f7bd2ac..e9f0164b44 100644 --- a/projects/aca-content/assets/i18n/ja.json +++ b/projects/aca-content/assets/i18n/ja.json @@ -268,8 +268,6 @@ "LEAVE": "ライブラリから脱退", "EDIT_OFFLINE": "オフライン編集", "EDIT_OFFLINE_CANCEL": "編集のキャンセル", - "LIST_MODE": "リストを表示", - "GALLERY_MODE": "ギャラリーを表示", "CHANGE_ASPECT": "アスペクトを編集" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/nb.json b/projects/aca-content/assets/i18n/nb.json index c888439997..7e42becff3 100644 --- a/projects/aca-content/assets/i18n/nb.json +++ b/projects/aca-content/assets/i18n/nb.json @@ -268,8 +268,6 @@ "LEAVE": "Forlat bibliotek", "EDIT_OFFLINE": "Rediger frakoblet", "EDIT_OFFLINE_CANCEL": "Avbryt redigering", - "LIST_MODE": "Vis liste", - "GALLERY_MODE": "Vis galleri", "CHANGE_ASPECT": "Rediger Aspekter" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/nl.json b/projects/aca-content/assets/i18n/nl.json index 0dcd65b6b6..224b221b9c 100644 --- a/projects/aca-content/assets/i18n/nl.json +++ b/projects/aca-content/assets/i18n/nl.json @@ -268,8 +268,6 @@ "LEAVE": "Bibliotheek verlaten", "EDIT_OFFLINE": "Offline bewerken", "EDIT_OFFLINE_CANCEL": "Bewerken annuleren", - "LIST_MODE": "Lijst weergeven", - "GALLERY_MODE": "Galerie weergeven", "CHANGE_ASPECT": "Aspecten bewerken" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/pl.json b/projects/aca-content/assets/i18n/pl.json index 400ad9fcbc..f0215da74d 100644 --- a/projects/aca-content/assets/i18n/pl.json +++ b/projects/aca-content/assets/i18n/pl.json @@ -268,8 +268,6 @@ "LEAVE": "Opuść bibliotekę", "EDIT_OFFLINE": "Edytuj w trybie offline", "EDIT_OFFLINE_CANCEL": "Anuluj edytowanie", - "LIST_MODE": "Wyświetl listę", - "GALLERY_MODE": "Wyświetl galerię", "CHANGE_ASPECT": "Edytuj aspekty" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/pt-BR.json b/projects/aca-content/assets/i18n/pt-BR.json index 66cdbfa694..44fc3215a8 100644 --- a/projects/aca-content/assets/i18n/pt-BR.json +++ b/projects/aca-content/assets/i18n/pt-BR.json @@ -268,8 +268,6 @@ "LEAVE": "Sair da biblioteca", "EDIT_OFFLINE": "Editar offline", "EDIT_OFFLINE_CANCEL": "Cancelar a edição", - "LIST_MODE": "Exibir lista", - "GALLERY_MODE": "Exibir galeria", "CHANGE_ASPECT": "Editar aspectos" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/ru.json b/projects/aca-content/assets/i18n/ru.json index b57cc360fb..e4c6afcd4e 100644 --- a/projects/aca-content/assets/i18n/ru.json +++ b/projects/aca-content/assets/i18n/ru.json @@ -268,8 +268,6 @@ "LEAVE": "Покинуть библиотеку", "EDIT_OFFLINE": "Редактировать в автономном режиме", "EDIT_OFFLINE_CANCEL": "Отменить редактирование", - "LIST_MODE": "Просмотреть список", - "GALLERY_MODE": "Просмотреть галерею", "CHANGE_ASPECT": "Редактировать аспекты" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/sv.json b/projects/aca-content/assets/i18n/sv.json index 0316095b69..e6685188a4 100644 --- a/projects/aca-content/assets/i18n/sv.json +++ b/projects/aca-content/assets/i18n/sv.json @@ -268,8 +268,6 @@ "LEAVE": "Lämna bibliotek", "EDIT_OFFLINE": "Redigera offline", "EDIT_OFFLINE_CANCEL": "Avbryt redigering", - "LIST_MODE": "Visa lista", - "GALLERY_MODE": "Visa galleri", "CHANGE_ASPECT": "Redigera aspekter" }, "DIALOGS": { diff --git a/projects/aca-content/assets/i18n/zh-CN.json b/projects/aca-content/assets/i18n/zh-CN.json index 3fc38f7238..c588edce28 100644 --- a/projects/aca-content/assets/i18n/zh-CN.json +++ b/projects/aca-content/assets/i18n/zh-CN.json @@ -268,8 +268,6 @@ "LEAVE": "离开库", "EDIT_OFFLINE": "离线编辑", "EDIT_OFFLINE_CANCEL": "取消编辑", - "LIST_MODE": "查看列表", - "GALLERY_MODE": "查看图库", "CHANGE_ASPECT": "编辑纵横比" }, "DIALOGS": { diff --git a/projects/aca-content/src/lib/aca-content.module.ts b/projects/aca-content/src/lib/aca-content.module.ts index 33017eb876..dbf8424349 100644 --- a/projects/aca-content/src/lib/aca-content.module.ts +++ b/projects/aca-content/src/lib/aca-content.module.ts @@ -71,7 +71,6 @@ import { LibraryMetadataTabComponent } from './components/info-drawer/library-me import { MetadataTabComponent } from './components/info-drawer/metadata-tab/metadata-tab.component'; import { VersionsTabComponent } from './components/info-drawer/versions-tab/versions-tab.component'; import { PreviewComponent } from '@alfresco/aca-preview'; -import { DocumentDisplayModeComponent } from './components/toolbar/document-display-mode/document-display-mode.component'; import { ToggleEditOfflineComponent } from './components/toolbar/toggle-edit-offline/toggle-edit-offline.component'; import { ToggleFavoriteLibraryComponent } from './components/toolbar/toggle-favorite-library/toggle-favorite-library.component'; import { ToggleFavoriteComponent } from './components/toolbar/toggle-favorite/toggle-favorite.component'; @@ -170,7 +169,6 @@ export class ContentServiceExtensionModule { 'app.toolbar.toggleFavorite': ToggleFavoriteComponent, 'app.toolbar.toggleFavoriteLibrary': ToggleFavoriteLibraryComponent, 'app.toolbar.toggleJoinLibrary': ToggleJoinLibraryButtonComponent, - 'app.toolbar.cardView': DocumentDisplayModeComponent, 'app.menu.toggleJoinLibrary': ToggleJoinLibraryMenuComponent, 'app.shared-link.toggleSharedLink': ToggleSharedComponent, 'app.columns.name': CustomNameColumnComponent, diff --git a/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.spec.ts deleted file mode 100644 index 302560023f..0000000000 --- a/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.spec.ts +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Alfresco Example Content Application - * - * This file is part of the Alfresco Example Content Application. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * The Alfresco Example Content Application is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The Alfresco Example Content Application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * from Hyland Software. If not, see . - */ - -import { DocumentDisplayModeComponent } from './document-display-mode.component'; -import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { CoreModule } from '@alfresco/adf-core'; -import { AppTestingModule } from '../../../testing/app-testing.module'; -import { of } from 'rxjs'; -import { provideMockStore } from '@ngrx/store/testing'; -import { Store } from '@ngrx/store'; - -describe('DocumentDisplayModeComponent', () => { - let fixture: ComponentFixture; - let store: Store; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [CoreModule, AppTestingModule], - providers: [provideMockStore()] - }); - - fixture = TestBed.createComponent(DocumentDisplayModeComponent); - store = TestBed.inject(Store); - }); - - it('should show the list button when list', async () => { - spyOn(store, 'select').and.returnValue(of('list')); - fixture.detectChanges(); - await fixture.whenStable(); - - const displayButton: HTMLButtonElement = fixture.nativeElement.querySelector('#app-document-display-mode-button'); - expect(displayButton.title).toBe('APP.ACTIONS.LIST_MODE'); - }); - - it('should show the gallery button when gallery', async () => { - spyOn(store, 'select').and.returnValue(of('gallery')); - fixture.detectChanges(); - await fixture.whenStable(); - const displayButton: HTMLButtonElement = fixture.nativeElement.querySelector('#app-document-display-mode-button'); - expect(displayButton.title).toBe('APP.ACTIONS.GALLERY_MODE'); - }); -}); diff --git a/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.ts b/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.ts deleted file mode 100644 index c5b1d35f63..0000000000 --- a/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.ts +++ /dev/null @@ -1,74 +0,0 @@ -/*! - * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved. - * - * Alfresco Example Content Application - * - * This file is part of the Alfresco Example Content Application. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * The Alfresco Example Content Application is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * The Alfresco Example Content Application is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * from Hyland Software. If not, see . - */ - -import { Component, OnDestroy, OnInit, ViewEncapsulation } from '@angular/core'; -import { Observable, Subject } from 'rxjs'; -import { Store } from '@ngrx/store'; -import { AppStore, ToggleDocumentDisplayMode, getDocumentDisplayMode } from '@alfresco/aca-shared/store'; -import { takeUntil } from 'rxjs/operators'; - -@Component({ - selector: 'app-document-display-mode', - template: ` - - - - `, - encapsulation: ViewEncapsulation.None, - host: { class: 'app-document-display-mode' } -}) -export class DocumentDisplayModeComponent implements OnInit, OnDestroy { - displayMode$: Observable; - displayModeTitle: string; - - onDestroy$ = new Subject(); - - constructor(private store: Store) {} - - ngOnInit(): void { - this.displayMode$ = this.store.select(getDocumentDisplayMode); - this.displayMode$.pipe(takeUntil(this.onDestroy$)).subscribe((displayMode) => { - this.displayModeTitle = displayMode === 'list' ? 'APP.ACTIONS.LIST_MODE' : 'APP.ACTIONS.GALLERY_MODE'; - }); - } - - ngOnDestroy(): void { - this.onDestroy$.next(); - this.onDestroy$.complete(); - } - - onClick() { - this.store.dispatch(new ToggleDocumentDisplayMode()); - } -} diff --git a/projects/aca-content/src/lib/components/toolbar/toolbar.module.ts b/projects/aca-content/src/lib/components/toolbar/toolbar.module.ts index 46ec47a3c7..73df94e65e 100644 --- a/projects/aca-content/src/lib/components/toolbar/toolbar.module.ts +++ b/projects/aca-content/src/lib/components/toolbar/toolbar.module.ts @@ -23,7 +23,6 @@ */ import { NgModule } from '@angular/core'; -import { DocumentDisplayModeComponent } from './document-display-mode/document-display-mode.component'; import { ToggleFavoriteComponent } from './toggle-favorite/toggle-favorite.component'; import { ToggleInfoDrawerComponent } from './toggle-info-drawer/toggle-info-drawer.component'; import { CommonModule } from '@angular/common'; @@ -40,7 +39,6 @@ import { SharedToolbarModule } from '@alfresco/aca-shared'; @NgModule({ imports: [CommonModule, CoreModule.forChild(), ExtensionsModule, SharedToolbarModule, DirectivesModule], declarations: [ - DocumentDisplayModeComponent, ToggleFavoriteComponent, ToggleInfoDrawerComponent, ToggleJoinLibraryButtonComponent, @@ -50,7 +48,6 @@ import { SharedToolbarModule } from '@alfresco/aca-shared'; ViewNodeComponent ], exports: [ - DocumentDisplayModeComponent, ToggleFavoriteComponent, ToggleInfoDrawerComponent, ToggleJoinLibraryButtonComponent,