diff --git a/e2e/components/data-table/data-table.ts b/e2e/components/data-table/data-table.ts index 5f0b9093d..8e2975b55 100755 --- a/e2e/components/data-table/data-table.ts +++ b/e2e/components/data-table/data-table.ts @@ -34,16 +34,16 @@ export class DataTable extends Component { root: 'adf-datatable', head: '.adf-datatable-header', - columnHeader: '.adf-datatable-row .adf-datatable-table-cell-header', + columnHeader: '.adf-datatable-row .adf-datatable-cell-header', sortedColumnHeader: ` - .adf-data-table__header--sorted-asc, - .adf-data-table__header--sorted-desc + .adf-datatable__header--sorted-asc, + .adf-datatable__header--sorted-desc `, body: '.adf-datatable-body', row: '.adf-datatable-row[role]', selectedRow: '.adf-datatable-row.adf-is-selected', - cell: '.adf-data-table-cell', + cell: '.adf-datatable-cell-container', locationLink: '.aca-location-link', nameLink: '.adf-datatable-link', libraryRole: 'adf-library-role-column', diff --git a/e2e/components/viewer/viewer.ts b/e2e/components/viewer/viewer.ts index 60cb6709a..d687c3bce 100755 --- a/e2e/components/viewer/viewer.ts +++ b/e2e/components/viewer/viewer.ts @@ -37,7 +37,7 @@ export class Viewer extends Component { closeBtn: '.adf-viewer-close-button', fileTitle: '.adf-viewer__file-title', - viewerExtensionContent: 'app-preview-extension' + viewerExtensionContent: 'adf-preview-extension' }; root: ElementFinder = browser.$(Viewer.selectors.root); diff --git a/e2e/resources/extensibility-configs/context-submenus-ext.json b/e2e/resources/extensibility-configs/context-submenus-ext.json index 51c26e0c2..afd0c4e68 100644 --- a/e2e/resources/extensibility-configs/context-submenus-ext.json +++ b/e2e/resources/extensibility-configs/context-submenus-ext.json @@ -946,7 +946,6 @@ "id": "app.files.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -955,7 +954,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -982,7 +981,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -992,7 +991,6 @@ "id": "app.libraries.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1001,7 +999,7 @@ "key": "title", "title": "APP.DOCUMENT_LIST.COLUMNS.TITLE", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.libraryName", "desktopOnly": false @@ -1021,7 +1019,6 @@ "id": "app.shared.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1030,7 +1027,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1066,7 +1063,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true }, @@ -1075,7 +1072,7 @@ "key": "sharedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -1085,7 +1082,6 @@ "id": "app.recent.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1094,7 +1090,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1131,7 +1127,6 @@ "id": "app.favorites.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1140,7 +1135,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1176,7 +1171,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -1186,7 +1181,6 @@ "id": "app.trashcan.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1195,7 +1189,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.trashcanName", "desktopOnly": false diff --git a/e2e/resources/extensibility-configs/document-presets-ext.json b/e2e/resources/extensibility-configs/document-presets-ext.json index 45f006c3d..027d1458a 100644 --- a/e2e/resources/extensibility-configs/document-presets-ext.json +++ b/e2e/resources/extensibility-configs/document-presets-ext.json @@ -880,7 +880,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -907,7 +907,7 @@ "key": "modifiedByUser.displayName", "title": "Test header", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true }, @@ -916,7 +916,7 @@ "key": "createdByUser.displayName", "title": "New column", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -926,7 +926,6 @@ "id": "app.libraries.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -935,7 +934,7 @@ "key": "title", "title": "APP.DOCUMENT_LIST.COLUMNS.TITLE", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.libraryName", "desktopOnly": false @@ -955,7 +954,6 @@ "id": "app.shared.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -964,7 +962,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1000,7 +998,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true }, @@ -1009,7 +1007,7 @@ "key": "sharedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -1019,7 +1017,6 @@ "id": "app.recent.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1028,7 +1025,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1065,7 +1062,6 @@ "id": "app.favorites.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1074,7 +1070,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1110,7 +1106,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -1120,7 +1116,6 @@ "id": "app.trashcan.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1129,7 +1124,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.trashcanName", "desktopOnly": false diff --git a/e2e/resources/extensibility-configs/info-drawer-ext.json b/e2e/resources/extensibility-configs/info-drawer-ext.json index 735c7ba12..ab2631b3e 100644 --- a/e2e/resources/extensibility-configs/info-drawer-ext.json +++ b/e2e/resources/extensibility-configs/info-drawer-ext.json @@ -1,773 +1,1648 @@ { - "$schema": "../../extension.schema.json", - "$name": "app", - "$version": "1.0.0", - "$references": [ - "plugin1.json", - "plugin2.json", - "dev.tools.json" - ], + "$schema": "../../extension.schema.json", + "$id": "app.core", + "$name": "app.core", + "$version": "1.0.0", + "$vendor": "Alfresco Software, Ltd.", + "$license": "LGPL-3.0", + "$runtime": "1.7.0", + "$description": "Core application extensions and features", + "$references": ["aos.plugin.json"], - "rules": [ + "rules": [ + { + "id": "app.toolbar.favorite.canToggle", + "comment": "workaround for recent files and search api issue", + "type": "core.every", + "parameters": [ { - "id": "app.toolbar.favorite.canToggle", - "comment": "workaround for recent files and search api issue", - "type": "core.every", - "parameters": [ - { - "type": "rule", - "value": "core.some", - "parameters": [ - { "type": "rule", "value": "app.selection.canAddFavorite" }, - { "type": "rule", "value": "app.selection.canRemoveFavorite" } - ] - }, - { - "type": "rule", - "value": "core.some", - "parameters": [ - { "type": "rule", "value": "app.navigation.isRecentFiles" }, - { "type": "rule", "value": "app.navigation.isSharedFiles" }, - { "type": "rule", "value": "app.navigation.isSearchResults" } - ] - } - ] + "type": "rule", + "value": "core.some", + "parameters": [ + { + "type": "rule", + "value": "app.selection.canAddFavorite" + }, + { + "type": "rule", + "value": "app.selection.canRemoveFavorite" + } + ] }, { - "id": "app.toolbar.favorite.canAdd", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.canAddFavorite" }, - { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, - { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, - { "type": "rule", "value": "app.navigation.isNotSearchResults" } - ] - }, - { - "id": "app.toolbar.favorite.canRemove", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.canRemoveFavorite" }, - { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, - { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, - { "type": "rule", "value": "app.navigation.isNotSearchResults" } - ] - }, - { - "id": "app.toolbar.info", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.notEmpty" }, - { "type": "rule", "value": "app.navigation.isNotLibraries" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.toolbar.canCopyNode", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.notEmpty" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" }, - { "type": "rule", "value": "app.navigation.isNotLibraries" } - ] - }, - { - "id": "app.toolbar.permissions", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.file" }, - { "type": "rule", "value": "app.selection.first.canUpdate" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.toolbar.versions", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.file" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.trashcan.hasSelection", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.notEmpty" }, - { "type": "rule", "value": "app.navigation.isTrashcan" } - ] - }, - { - "id": "app.toolbar.canEditFolder", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.folder" }, - { "type": "rule", "value": "app.selection.folder.canUpdate" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.toolbar.canViewFile", - "type": "core.every", - "parameters": [ - { - "type": "rule", - "value": "app.selection.file" - }, - { - "type": "rule", - "value": "core.not", - "parameters": [ - { "type": "rule", "value": "app.navigation.isTrashcan" } - ] - } - ] - }, - { - "id": "app.toolbar.canDownload", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.canDownload" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] + "type": "rule", + "value": "core.some", + "parameters": [ + { + "type": "rule", + "value": "app.navigation.isRecentFiles" + }, + { + "type": "rule", + "value": "app.navigation.isSharedFiles" + }, + { + "type": "rule", + "value": "app.navigation.isSearchResults" + }, + { + "type": "rule", + "value": "app.navigation.isFavorites" + } + ] } - ], - - "features": { - "create": [ - { - "id": "app.create.folder", - "order": 100, - "icon": "create_new_folder", - "title": "APP.NEW_MENU.MENU_ITEMS.CREATE_FOLDER", - "description": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER", - "description-disabled": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER_NOT_ALLOWED", - "actions": { - "click": "CREATE_FOLDER" - }, - "rules": { - "enabled": "app.navigation.folder.canCreate" - } - }, - { - "id": "app.create.uploadFile", - "order": 200, - "icon": "file_upload", - "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FILE", - "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES", - "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES_NOT_ALLOWED", - "actions": { - "click": "UPLOAD_FILES" - }, - "rules": { - "enabled": "app.navigation.folder.canUpload" - } - }, - { - "id": "app.create.uploadFolder", - "order": 300, - "icon": "file_upload", - "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FOLDER", - "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS", - "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS_NOT_ALLOWED", - "actions": { - "click": "UPLOAD_FOLDER" - }, - "rules": { - "enabled": "app.navigation.folder.canUpload" - } - } - ], - "navbar": [ - { - "id": "app.navbar.primary", - "items": [ - { - "id": "app.navbar.personalFiles", - "order": 100, - "icon": "folder", - "title": "APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.PERSONAL.SIDENAV_LINK.TOOLTIP", - "route": "personal-files" - }, - { - "id": "app.navbar.libraries", - "order": 200, - "icon": "group_work", - "title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP", - "route": "libraries" - } - ] - }, - { - "id": "app.navbar.secondary", - "items": [ - { - "id": "app.navbar.shared", - "order": 100, - "icon": "people", - "title": "APP.BROWSE.SHARED.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.SHARED.SIDENAV_LINK.TOOLTIP", - "route": "shared" - }, - { - "id": "app.navbar.recentFiles", - "order": 200, - "icon": "schedule", - "title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP", - "route": "recent-files" - }, - { - "id": "app.navbar.favorites", - "order": 300, - "icon": "star", - "title": "APP.BROWSE.FAVORITES.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.FAVORITES.SIDENAV_LINK.TOOLTIP", - "route": "favorites" - }, - { - "id": "app.navbar.trashcan", - "order": 400, - "icon": "delete", - "title": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.TOOLTIP", - "route": "trashcan" - } - ] - } - ], - "toolbar": [ - { - "id": "app.toolbar.preview", - "order": 100, - "title": "APP.ACTIONS.VIEW", - "icon": "open_in_browser", - "actions": { - "click": "VIEW_FILE" - }, - "rules": { - "visible": "app.toolbar.canViewFile" - } - }, - { - "id": "app.toolbar.download", - "order": 200, - "title": "APP.ACTIONS.DOWNLOAD", - "icon": "get_app", - "actions": { - "click": "DOWNLOAD_NODES" - }, - "rules": { - "visible": "app.toolbar.canDownload" - } - }, - { - "id": "app.toolbar.editFolder", - "order": 300, - "title": "APP.ACTIONS.EDIT", - "icon": "create", - "actions": { - "click": "EDIT_FOLDER" - }, - "rules": { - "visible": "app.toolbar.canEditFolder" - } - }, - { - "id": "app.toolbar.purgeDeletedNodes", - "order": 400, - "title": "APP.ACTIONS.DELETE_PERMANENT", - "icon": "delete_forever", - "actions": { - "click": "PURGE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - }, - { - "id": "app.toolbar.restoreDeletedNodes", - "order": 500, - "title": "APP.ACTIONS.RESTORE", - "icon": "restore", - "actions": { - "click": "RESTORE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - }, - { - "id": "app.toolbar.createLibrary", - "order": 600, - "title": "Create Library", - "icon": "create_new_folder", - "actions": { - "click": "CREATE_LIBRARY" - }, - "rules": { - "visible": "app.navigation.isLibraries" - } - }, - { - "id": "app.toolbar.info", - "type": "custom", - "order": 700, - "component": "app.toolbar.toggleInfoDrawer", - "rules": { - "visible": "app.toolbar.info" - } - }, - { - "id": "app.toolbar.more", - "type": "menu", - "order": 10000, - "icon": "more_vert", - "title": "APP.ACTIONS.MORE", - "children": [ - { - "id": "app.toolbar.favorite", - "comment": "workaround for Recent Files and Search API issue", - "type": "custom", - "order": 100, - "component": "app.toolbar.toggleFavorite", - "rules": { - "visible": "app.toolbar.favorite.canToggle" - } - }, - { - "id": "app.toolbar.favorite.add", - "order": 200, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star_border", - "actions": { - "click": "ADD_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canAdd" - } - }, - { - "id": "app.toolbar.favorite.remove", - "order": 300, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star", - "actions": { - "click": "REMOVE_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canRemove" - } - }, - { - "id": "app.toolbar.copy", - "order": 400, - "title": "APP.ACTIONS.COPY", - "icon": "content_copy", - "actions": { - "click": "COPY_NODES" - }, - "rules": { - "visible": "app.toolbar.canCopyNode" - } - }, - { - "id": "app.toolbar.move", - "order": 500, - "title": "APP.ACTIONS.MOVE", - "icon": "library_books", - "actions": { - "click": "MOVE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.toolbar.share", - "order": 600, - "title": "APP.ACTIONS.SHARE", - "icon": "share", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.toolbar.unshare", - "order": 700, - "title": "APP.ACTIONS.UNSHARE", - "icon": "stop_screen_share", - "actions": { - "click": "UNSHARE_NODES" - }, - "rules": { - "visible": "app.selection.canUnshare" - } - }, - { - "id": "app.toolbar.delete", - "order": 800, - "title": "APP.ACTIONS.DELETE", - "icon": "delete", - "actions": { - "click": "DELETE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.toolbar.deleteLibrary", - "order": 900, - "title": "APP.ACTIONS.DELETE", - "icon": "delete", - "actions": { - "click": "DELETE_LIBRARY" - }, - "rules": { - "visible": "app.selection.library" - } - }, - { - "id": "app.toolbar.versions", - "order": 1000, - "title": "APP.ACTIONS.VERSIONS", - "icon": "history", - "actions": { - "click": "MANAGE_VERSIONS" - }, - "rules": { - "visible": "app.toolbar.versions" - } - }, - { - "id": "app.toolbar.permissions", - "order": 1100, - "title": "APP.ACTIONS.PERMISSIONS", - "icon": "settings_input_component", - "actions": { - "click": "MANAGE_PERMISSIONS" - }, - "rules": { - "visible": "app.toolbar.permissions" - } - } - ] - } - ], - "contextMenu": [ - { - "id": "app.context.menu.download", - "order": 100, - "title": "APP.ACTIONS.DOWNLOAD", - "icon": "get_app", - "actions": { - "click": "DOWNLOAD_NODES" - }, - "rules": { - "visible": "app.toolbar.canDownload" - } - }, - { - "id": "app.context.menu.preview", - "order": 200, - "title": "APP.ACTIONS.VIEW", - "icon": "open_in_browser", - "actions": { - "click": "VIEW_FILE" - }, - "rules": { - "visible": "app.toolbar.canViewFile" - } - }, - { - "id": "app.context.menu.editFolder", - "order": 300, - "title": "APP.ACTIONS.EDIT", - "icon": "create", - "actions": { - "click": "EDIT_FOLDER" - }, - "rules": { - "visible": "app.toolbar.canEditFolder" - } - }, - { - "id": "app.context.menu.share", - "title": "APP.ACTIONS.SHARE", - "order": 400, - "icon": "share", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.context.menu.favorite.add", - "title": "APP.ACTIONS.FAVORITE", - "order": 500, - "icon": "star_border", - "actions": { - "click": "ADD_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canAdd" - } - }, - { - "id": "app.context.menu.favorite.remove", - "title": "APP.ACTIONS.FAVORITE", - "order": 600, - "icon": "star", - "actions": { - "click": "REMOVE_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canRemove" - } - }, - { - "id": "app.context.menu.favorite", - "comment": "workaround for Recent Files and Search API issue", - "type": "custom", - "order": 501, - "component": "app.toolbar.toggleFavorite", - "rules": { - "visible": "app.toolbar.favorite.canToggle" - } - }, - { - "id": "app.context.menu.copy", - "title": "APP.ACTIONS.COPY", - "order": 700, - "icon": "content_copy", - "actions": { - "click": "COPY_NODES" - }, - "rules": { - "visible": "app.toolbar.canCopyNode" - } - }, - { - "id": "app.context.menu.move", - "title": "APP.ACTIONS.MOVE", - "order": 800, - "icon": "library_books", - "actions": { - "click": "MOVE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.context.menu.delete", - "title": "APP.ACTIONS.DELETE", - "order": 900, - "icon": "delete", - "actions": { - "click": "DELETE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.context.menu.versions", - "title": "APP.ACTIONS.VERSIONS", - "order": 1000, - "icon": "history", - "actions": { - "click": "MANAGE_VERSIONS" - }, - "rules": { - "visible": "app.toolbar.versions" - } - }, - { - "id": "app.context.menu.permissions", - "title": "APP.ACTIONS.PERMISSIONS", - "icon": "settings_input_component", - "order": 1100, - "actions": { - "click": "MANAGE_PERMISSIONS" - }, - "rules": { - "visible": "app.toolbar.permissions" - } - }, - { - "id": "app.context.menu.purgeDeletedNodes", - "order": 1200, - "title": "APP.ACTIONS.DELETE_PERMANENT", - "icon": "delete_forever", - "actions": { - "click": "PURGE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - }, - { - "id": "app.context.menu.restoreDeletedNodes", - "order": 1300, - "title": "APP.ACTIONS.RESTORE", - "icon": "restore", - "actions": { - "click": "RESTORE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - } - ], - "viewer": { - "toolbar": [ - { - "id": "app.viewer.favorite.add", - "order": 100, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star_border", - "actions": { - "click": "ADD_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canAdd" - } - }, - { - "id": "app.viewer.favorite.remove", - "order": 200, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star", - "actions": { - "click": "REMOVE_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canRemove" - } - }, - { - "id": "app.viewer.share", - "order": 300, - "title": "APP.ACTIONS.SHARE", - "icon": "share", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.viewer.copy", - "order": 400, - "title": "APP.ACTIONS.COPY", - "icon": "content_copy", - "actions": { - "click": "COPY_NODES" - }, - "rules": { - "visible": "app.toolbar.canCopyNode" - } - }, - { - "id": "app.viewer.move", - "order": 500, - "title": "APP.ACTIONS.MOVE", - "icon": "library_books", - "actions": { - "click": "MOVE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.viewer.delete", - "order": 600, - "title": "APP.ACTIONS.DELETE", - "icon": "delete", - "actions": { - "click": "DELETE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.viewer.versions", - "order": 700, - "title": "APP.ACTIONS.VERSIONS", - "icon": "history", - "actions": { - "click": "MANAGE_VERSIONS" - }, - "rules": { - "visible": "app.toolbar.versions" - } - }, - { - "id": "app.viewer.permissions", - "order": 800, - "title": "APP.ACTIONS.PERMISSIONS", - "icon": "settings_input_component", - "actions": { - "click": "MANAGE_PERMISSIONS" - }, - "rules": { - "visible": "app.toolbar.permissions" - } - } - ], - "content": [ - { - "id": "app.viewer.pdf", - "disabled": true, - "fileExtension": "pdf", - "component": "app.components.tabs.metadata" - }, - { - "id": "app.viewer.docx", - "disabled": true, - "fileExtension": "docx", - "component": "app.components.tabs.comments" - } - ] + ] + }, + { + "id": "app.context.canShare", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file.canShare" }, + { "type": "rule", "value": "repository.isQuickShareEnabled" } + ] + }, + { + "id": "app.toolbar.canShare", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file.canShare" }, + { "type": "rule", "value": "repository.isQuickShareEnabled" }, + { + "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.selection.file.isShared" } + ] + } + ] + }, + { + "id": "app.toolbar.favorite.canAdd", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canAddFavorite" }, + { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, + { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, + { + "type": "rule", + "value": "app.navigation.isNotSearchResults" }, - "sidebar": [ - { - "id": "app.sidebar.properties", - "order": 1, - "title": "MY PROPERTIES", - "component": "app.components.tabs.metadata" - }, - { - "id": "app.sidebar.custom", - "order": 2, - "icon": "mood", - "title": "MY CUSTOM TITLE", - "component": "app.toolbar.toggleFavorite" - }, - { - "id": "app.sidebar.no_title", - "order": 3, - "icon": "check_circle", - "component": "app.components.tabs.metadata" - }, - { - "id": "app.sidebar.comments", - "order": 4, - "disabled": true, - "title": "APP.INFO_DRAWER.TABS.COMMENTS", - "component": "app.components.tabs.comments" - } - ] + { "type": "rule", "value": "app.navigation.isNotFavorites" } + ] + }, + { + "id": "app.toolbar.favorite.canRemove", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canRemoveFavorite" }, + { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, + { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, + { + "type": "rule", + "value": "app.navigation.isNotSearchResults" + }, + { "type": "rule", "value": "app.navigation.isNotFavorites" } + ] + }, + { + "id": "app.toolbar.info", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.navigation.isNotLibraries" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.libraries.toolbar", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.selection.library" } + ] + }, + { + "id": "app.libraries.toolbar.canToggleJoin", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.library" }, + { "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.selection.isPrivateLibrary" } + ] + }, + { "type": "rule", "value": "app.selection.hasNoLibraryRole" } + ] + }, + { + "id": "app.libraries.toolbar.canLeaveLibrary", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.library" }, + { "type": "rule", "value": "app.selection.hasLibraryRole" } + ] + }, + { + "id": "app.toolbar.canCopyNode", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { "type": "rule", "value": "app.navigation.isNotLibraries" } + ] + }, + { + "id": "app.toolbar.permissions", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.first.canUpdate" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.versions", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { + "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.selection.file.isLocked" } + ] + } + ] + }, + { + "id": "app.trashcan.hasSelection", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.navigation.isTrashcan" } + ] + }, + { + "id": "app.toolbar.canEditFolder", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.folder" }, + { "type": "rule", "value": "app.selection.folder.canUpdate" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.canViewFile", + "type": "core.every", + "parameters": [ + { + "type": "rule", + "value": "app.selection.file" + }, + { + "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.navigation.isTrashcan" } + ] + } + ] + }, + { + "id": "app.toolbar.canDownload", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canDownload" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.canDelete", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canDelete" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.canToggleLock", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { + "type": "rule", + "value": "core.some", + "parameters": [ + { "type": "rule", "value": "app.navigation.isNotFavorites" }, + { "type": "rule", "value": "app.navigation.isFavoritesPreview" } + ] + }, + { + "type": "rule", + "value": "core.some", + "parameters": [ + { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, + { "type": "rule", "value": "app.navigation.isSharedPreview" } + ] + }, + { + "type": "rule", + "value": "core.some", + "parameters": [ + { "type": "rule", "value": "app.selection.file.canUnlock" }, + { "type": "rule", "value": "app.selection.file.canLock" } + ] + } + ] + }, + { + "id": "app.toolbar.canUploadNewVersion", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { "type": "rule", "value": "app.selection.file.canUploadVersion" } + ] } + ], + + "features": { + "icons": [ + { + "id": "adf:join_library", + "value": "./assets/images/join-library.svg" + }, + { + "id": "adf:move_file", + "value": "./assets/images/adf-move-file-24px.svg" + } + ], + "create": [ + { + "id": "app.create.uploadFile", + "order": 100, + "icon": "file_upload", + "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FILE", + "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES", + "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES_NOT_ALLOWED", + "actions": { + "click": "UPLOAD_FILES" + }, + "rules": { + "enabled": "app.navigation.folder.canUpload" + } + }, + { + "id": "app.create.uploadFolder", + "order": 200, + "icon": "file_upload", + "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FOLDER", + "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS", + "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS_NOT_ALLOWED", + "actions": { + "click": "UPLOAD_FOLDER" + }, + "rules": { + "enabled": "app.navigation.folder.canUpload" + } + }, + { + "id": "app.create.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.create.folder", + "order": 400, + "icon": "create_new_folder", + "title": "APP.NEW_MENU.MENU_ITEMS.CREATE_FOLDER", + "description": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER", + "description-disabled": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER_NOT_ALLOWED", + "actions": { + "click": "CREATE_FOLDER" + }, + "rules": { + "enabled": "app.navigation.folder.canCreate" + } + }, + { + "id": "app.create.library", + "order": 600, + "title": "APP.NEW_MENU.MENU_ITEMS.CREATE_LIBRARY", + "description": "APP.NEW_MENU.TOOLTIPS.CREATE_LIBRARY", + "icon": "create_new_folder", + "actions": { + "click": "CREATE_LIBRARY" + } + } + ], + "navbar": [ + { + "id": "app.navbar.primary", + "items": [ + { + "id": "app.navbar.personalFiles", + "order": 100, + "icon": "folder", + "title": "APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.PERSONAL.SIDENAV_LINK.TOOLTIP", + "route": "personal-files" + }, + { + "id": "app.navbar.libraries.menu", + "order": 200, + "icon": "library_books", + "title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP", + "children": [ + { + "id": "app.navbar.libraries.files", + "order": 100, + "title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP", + "route": "libraries" + }, + { + "id": "app.navbar.libraries.favorite", + "order": 200, + "title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP", + "route": "favorite/libraries" + } + ] + } + ] + }, + { + "id": "app.navbar.secondary", + "items": [ + { + "id": "app.navbar.shared", + "order": 100, + "icon": "people", + "title": "APP.BROWSE.SHARED.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.SHARED.SIDENAV_LINK.TOOLTIP", + "route": "shared", + "rules": { + "visible": "repository.isQuickShareEnabled" + } + }, + { + "id": "app.navbar.recentFiles", + "order": 200, + "icon": "schedule", + "title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP", + "route": "recent-files" + }, + { + "id": "app.navbar.favorites", + "order": 300, + "icon": "star", + "title": "APP.BROWSE.FAVORITES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.FAVORITES.SIDENAV_LINK.TOOLTIP", + "route": "favorites" + }, + { + "id": "app.navbar.trashcan", + "order": 400, + "icon": "delete", + "title": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.TOOLTIP", + "route": "trashcan" + } + ] + } + ], + "toolbar": [ + { + "id": "app.toolbar.searchFilter", + "order": 50, + "title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER", + "icon": "view_list", + "actions": { + "click": "TOGGLE_SEARCH_FILTER" + }, + "rules": { + "visible": "app.navigation.isSearchResults" + } + }, + { + "id": "app.toolbar.share", + "order": 100, + "title": "APP.ACTIONS.SHARE", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.toolbar.canShare" + } + }, + { + "id": "app.toolbar.share.edit", + "order": 101, + "title": "APP.ACTIONS.SHARE_EDIT", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.selection.file.isShared" + } + }, + { + "id": "app.toolbar.preview", + "order": 300, + "title": "APP.ACTIONS.VIEW", + "icon": "visibility", + "actions": { + "click": "VIEW_FILE" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.toolbar.download", + "order": 200, + "title": "APP.ACTIONS.DOWNLOAD", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + }, + "rules": { + "visible": "app.toolbar.canDownload" + } + }, + { + "id": "app.toolbar.purgeDeletedNodes", + "order": 400, + "title": "APP.ACTIONS.DELETE_PERMANENT", + "icon": "delete_forever", + "actions": { + "click": "PURGE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + }, + { + "id": "app.toolbar.restoreDeletedNodes", + "order": 500, + "title": "APP.ACTIONS.RESTORE", + "icon": "restore", + "actions": { + "click": "RESTORE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + }, + { + "id": "app.toolbar.joinLibrary", + "type": "custom", + "order": 600, + "component": "app.toolbar.toggleJoinLibrary", + "rules": { + "visible": "app.libraries.toolbar.canToggleJoin" + } + }, + { + "id": "app.toolbar.leaveLibrary", + "order": 650, + "title": "APP.ACTIONS.LEAVE", + "icon": "exit_to_app", + "actions": { + "click": "LEAVE_LIBRARY" + }, + "rules": { + "visible": "app.libraries.toolbar.canLeaveLibrary" + } + }, + { + "id": "app.create.separator.2", + "type": "separator", + "order": 680 + }, + { + "id": "app.toolbar.info.infoDrawer", + "type": "custom", + "order": 700, + "component": "app.toolbar.toggleInfoDrawer", + "rules": { + "visible": "app.toolbar.info" + } + }, + { + "id": "app.libraries.toolbar.infoDrawer", + "type": "custom", + "order": 800, + "component": "app.toolbar.toggleInfoDrawer", + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.toolbar.more", + "type": "menu", + "order": 10000, + "icon": "more_vert", + "title": "APP.ACTIONS.MORE", + "children": [ + { + "id": "app.toolbar.toggleLock", + "order": 100, + "type": "custom", + "component": "app.toolbar.toggleEditOffline", + "rules": { + "visible": "app.toolbar.canToggleLock" + } + }, + { + "id": "app.toolbar.uploadNodeVersion", + "order": 200, + "title": "APP.ACTIONS.UPLOAD_VERSION", + "icon": "playlist_add", + "actions": { + "click": "UPLOAD_FILE_VERSION" + }, + "rules": { + "visible": "app.toolbar.canUploadNewVersion" + } + }, + { + "id": "app.create.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.toolbar.favorite", + "comment": "workaround for Recent Files and Search API issue", + "type": "custom", + "order": 400, + "component": "app.toolbar.toggleFavorite", + "rules": { + "visible": "app.toolbar.favorite.canToggle" + } + }, + { + "id": "app.libraries.toolbar.toggleFavorite", + "type": "custom", + "order": 401, + "component": "app.toolbar.toggleFavoriteLibrary", + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.toolbar.favorite.add", + "order": 402, + "title": "APP.ACTIONS.FAVORITE", + "icon": "star_border", + "actions": { + "click": "ADD_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canAdd" + } + }, + { + "id": "app.toolbar.favorite.remove", + "order": 403, + "title": "APP.ACTIONS.REMOVE_FAVORITE", + "icon": "star", + "actions": { + "click": "REMOVE_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canRemove" + } + }, + { + "id": "app.toolbar.editFolder", + "order": 450, + "title": "APP.ACTIONS.EDIT", + "icon": "create", + "actions": { + "click": "EDIT_FOLDER" + }, + "rules": { + "visible": "app.toolbar.canEditFolder" + } + }, + { + "id": "app.create.separator.2", + "type": "separator", + "order": 500 + }, + { + "id": "app.toolbar.copy", + "order": 600, + "title": "APP.ACTIONS.COPY", + "icon": "content_copy", + "actions": { + "click": "COPY_NODES" + }, + "rules": { + "visible": "app.toolbar.canCopyNode" + } + }, + { + "id": "app.toolbar.move", + "order": 700, + "title": "APP.ACTIONS.MOVE", + "icon": "adf:move_file", + "actions": { + "click": "MOVE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.toolbar.delete", + "order": 800, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.create.separator.3", + "type": "separator", + "order": 900 + }, + { + "id": "app.toolbar.versions", + "order": 1100, + "title": "APP.ACTIONS.VERSIONS", + "icon": "history", + "actions": { + "click": "MANAGE_VERSIONS" + }, + "rules": { + "visible": "app.toolbar.versions" + } + }, + { + "id": "app.toolbar.permissions", + "order": 1200, + "title": "APP.ACTIONS.PERMISSIONS", + "icon": "settings_input_component", + "actions": { + "click": "MANAGE_PERMISSIONS" + }, + "rules": { + "visible": "app.toolbar.permissions" + } + }, + { + "id": "app.toolbar.deleteLibrary", + "order": 100, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_LIBRARY" + }, + "rules": { + "visible": "app.selection.library" + } + } + ] + } + ], + "contextMenu": [ + { + "id": "app.context.toggleLock", + "order": 100, + "type": "custom", + "component": "app.toolbar.toggleEditOffline", + "rules": { + "visible": "app.toolbar.canToggleLock" + } + }, + { + "id": "app.context.menu.uploadNodeVersion", + "title": "APP.ACTIONS.UPLOAD_VERSION", + "order": 200, + "icon": "playlist_add", + "actions": { + "click": "UPLOAD_FILE_VERSION" + }, + "rules": { + "visible": "app.toolbar.canUploadNewVersion" + } + }, + { + "id": "app.create.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.context.menu.share", + "type": "custom", + "order": 400, + "component": "app.shared-link.toggleSharedLink", + "rules": { + "visible": "app.context.canShare" + } + }, + { + "id": "app.context.menu.download", + "order": 500, + "title": "APP.ACTIONS.DOWNLOAD", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + }, + "rules": { + "visible": "app.toolbar.canDownload" + } + }, + { + "id": "app.context.menu.preview", + "order": 600, + "title": "APP.ACTIONS.VIEW", + "icon": "visibility", + "actions": { + "click": "VIEW_FILE" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.context.menu.favorite.add", + "title": "APP.ACTIONS.FAVORITE", + "order": 700, + "icon": "star_border", + "actions": { + "click": "ADD_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canAdd" + } + }, + { + "id": "app.context.menu.favorite.remove", + "title": "APP.ACTIONS.REMOVE_FAVORITE", + "order": 701, + "icon": "star", + "actions": { + "click": "REMOVE_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canRemove" + } + }, + { + "id": "app.context.menu.favorite", + "comment": "workaround for Recent Files and Search API issue", + "type": "custom", + "order": 702, + "component": "app.toolbar.toggleFavorite", + "rules": { + "visible": "app.toolbar.favorite.canToggle" + } + }, + { + "id": "app.context.menu.libraries.toggleFavorite", + "type": "custom", + "order": 703, + "component": "app.toolbar.toggleFavoriteLibrary", + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.context.menu.editFolder", + "order": 800, + "title": "APP.ACTIONS.EDIT", + "icon": "create", + "actions": { + "click": "EDIT_FOLDER" + }, + "rules": { + "visible": "app.toolbar.canEditFolder" + } + }, + { + "id": "app.create.separator.2", + "type": "separator", + "order": 900 + }, + { + "id": "app.context.menu.copy", + "title": "APP.ACTIONS.COPY", + "order": 1000, + "icon": "content_copy", + "actions": { + "click": "COPY_NODES" + }, + "rules": { + "visible": "app.toolbar.canCopyNode" + } + }, + { + "id": "app.context.menu.move", + "title": "APP.ACTIONS.MOVE", + "order": 1100, + "icon": "adf:move_file", + "actions": { + "click": "MOVE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.context.menu.delete", + "title": "APP.ACTIONS.DELETE", + "order": 1200, + "icon": "delete", + "actions": { + "click": "DELETE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.create.separator.3", + "type": "separator", + "order": 1300 + }, + { + "id": "app.context.menu.versions", + "title": "APP.ACTIONS.VERSIONS", + "order": 1400, + "icon": "history", + "actions": { + "click": "MANAGE_VERSIONS" + }, + "rules": { + "visible": "app.toolbar.versions" + } + }, + { + "id": "app.context.menu.permissions", + "title": "APP.ACTIONS.PERMISSIONS", + "icon": "settings_input_component", + "order": 1500, + "actions": { + "click": "MANAGE_PERMISSIONS" + }, + "rules": { + "visible": "app.toolbar.permissions" + } + }, + { + "id": "app.context.menu.joinLibrary", + "type": "custom", + "order": 100, + "component": "app.menu.toggleJoinLibrary", + "rules": { + "visible": "app.libraries.toolbar.canToggleJoin" + } + }, + { + "id": "app.context.menu.leaveLibrary", + "order": 200, + "title": "APP.ACTIONS.LEAVE", + "icon": "exit_to_app", + "actions": { + "click": "LEAVE_LIBRARY" + }, + "rules": { + "visible": "app.libraries.toolbar.canLeaveLibrary" + } + }, + { + "id": "app.context.menu.deleteLibrary", + "order": 300, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_LIBRARY" + }, + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.context.menu.purgeDeletedNodes", + "order": 100, + "title": "APP.ACTIONS.DELETE_PERMANENT", + "icon": "delete_forever", + "actions": { + "click": "PURGE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + }, + { + "id": "app.context.menu.restoreDeletedNodes", + "order": 200, + "title": "APP.ACTIONS.RESTORE", + "icon": "restore", + "actions": { + "click": "RESTORE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + } + ], + "viewer": { + "toolbarActions": [ + { + "id": "app.viewer.fullscreen", + "order": 100, + "title": "APP.ACTIONS.FULLSCREEN", + "icon": "fullscreen", + "actions": { + "click": "FULLSCREEN_VIEWER" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 180 + }, + { + "id": "app.viewer.share", + "order": 200, + "title": "APP.ACTIONS.SHARE", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.toolbar.canShare" + } + }, + { + "id": "app.viewer.share.edit", + "order": 250, + "title": "APP.ACTIONS.SHARE_EDIT", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.selection.file.isShared" + } + }, + { + "id": "app.viewer.download", + "order": 300, + "title": "APP.ACTIONS.DOWNLOAD", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + }, + "rules": { + "visible": "app.toolbar.canDownload" + } + }, + { + "id": "app.viewer.print", + "order": 400, + "title": "APP.ACTIONS.PRINT", + "icon": "print", + "actions": { + "click": "PRINT_FILE" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.viewer.separator.2", + "type": "separator", + "order": 450 + }, + { + "id": "app.viewer.infoDrawer", + "type": "custom", + "order": 500, + "component": "app.toolbar.toggleInfoDrawer", + "rules": { + "visible": "app.toolbar.info" + } + }, + { + "id": "app.viewer.toolbar.more", + "type": "menu", + "order": 10000, + "icon": "more_vert", + "title": "APP.ACTIONS.MORE", + "children": [ + { + "id": "app.viewer.toggleLock", + "order": 100, + "type": "custom", + "component": "app.toolbar.toggleEditOffline", + "rules": { + "visible": "app.toolbar.canToggleLock" + } + }, + { + "id": "app.toolbar.uploadNodeVersion", + "order": 200, + "title": "APP.ACTIONS.UPLOAD_VERSION", + "icon": "playlist_add", + "actions": { + "click": "UPLOAD_FILE_VERSION" + }, + "rules": { + "visible": "app.toolbar.canUploadNewVersion" + } + }, + { + "id": "app.viewer.more.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.viewer.favorite.add", + "order": 400, + "title": "APP.ACTIONS.FAVORITE", + "icon": "star_border", + "actions": { + "click": "ADD_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canAdd" + } + }, + { + "id": "app.viewer.favorite.remove", + "order": 401, + "title": "APP.ACTIONS.REMOVE_FAVORITE", + "icon": "star", + "actions": { + "click": "REMOVE_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canRemove" + } + }, + { + "id": "app.viewer.favorite", + "comment": "workaround for Recent Files and Search API issue", + "type": "custom", + "order": 402, + "component": "app.toolbar.toggleFavorite", + "rules": { + "visible": "app.toolbar.favorite.canToggle" + } + }, + { + "id": "app.viewer.more.separator.2", + "type": "separator", + "order": 500 + }, + { + "id": "app.viewer.copy", + "order": 600, + "title": "APP.ACTIONS.COPY", + "icon": "content_copy", + "actions": { + "click": "COPY_NODES" + }, + "rules": { + "visible": "app.toolbar.canCopyNode" + } + }, + { + "id": "app.viewer.move", + "order": 700, + "title": "APP.ACTIONS.MOVE", + "icon": "adf:move_file", + "actions": { + "click": "MOVE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.viewer.delete", + "order": 800, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.viewer.more.separator.3", + "type": "separator", + "order": 900 + }, + + { + "id": "app.viewer.versions", + "order": 1000, + "title": "APP.ACTIONS.VERSIONS", + "icon": "history", + "actions": { + "click": "MANAGE_VERSIONS" + }, + "rules": { + "visible": "app.toolbar.versions" + } + }, + { + "id": "app.viewer.permissions", + "order": 1100, + "title": "APP.ACTIONS.PERMISSIONS", + "icon": "settings_input_component", + "actions": { + "click": "MANAGE_PERMISSIONS" + }, + "rules": { + "visible": "app.toolbar.permissions" + } + } + ] + } + ], + "shared": { + "toolbarActions": [ + { + "id": "app.viewer.shared.fullscreen", + "order": 100, + "title": "APP.ACTIONS.FULLSCREEN", + "icon": "fullscreen", + "actions": { + "click": "FULLSCREEN_VIEWER" + } + }, + { + "id": "app.viewer.shared.download", + "order": 200, + "title": "APP.ACTIONS.DOWNLOAD", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + } + } + ] + }, + "content": [ + { + "id": "app.viewer.pdf", + "disabled": true, + "fileExtension": "pdf", + "component": "app.components.tabs.metadata" + }, + { + "id": "app.viewer.docx", + "disabled": true, + "fileExtension": "docx", + "component": "app.components.tabs.comments" + } + ] + }, + "sidebar": [ + { + "id": "app.sidebar.properties", + "order": 1, + "title": "MY PROPERTIES", + "component": "app.components.tabs.metadata" + }, + { + "id": "app.sidebar.custom", + "order": 2, + "icon": "mood", + "title": "MY CUSTOM TITLE", + "component": "app.toolbar.toggleFavorite" + }, + { + "id": "app.sidebar.no_title", + "order": 3, + "icon": "check_circle", + "component": "app.components.tabs.metadata" + }, + { + "id": "app.sidebar.comments", + "order": 4, + "disabled": true, + "title": "APP.INFO_DRAWER.TABS.COMMENTS", + "component": "app.components.tabs.comments" + } + ], + "content-metadata-presets": [ + { + "id": "app.content.metadata.custom", + "custom": [ + { + "id": "app.content.metadata.customGroup", + "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE", + "items": [ + { + "id": "app.content.metadata.exifAspect", + "aspect": "exif:exif", + "properties": [ + "exif:pixelXDimension", + "exif:pixelYDimension", + "exif:dateTimeOriginal", + "exif:exposureTime", + "exif:fNumber", + "exif:flash", + "exif:focalLength", + "exif:isoSpeedRatings", + "exif:orientation", + "exif:manufacturer", + "exif:model", + "exif:software" + ] + } + ] + } + ] + } + ], + "documentList": { + "files": [ + { + "id": "app.files.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.files.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-ellipsis-cell adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.files.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.files.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.files.modifiedBy", + "key": "modifiedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + } + ], + "libraries": [ + { + "id": "app.libraries.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.libraries.name", + "key": "title", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.libraryName", + "desktopOnly": false + }, + { + "id": "app.libraries.role", + "key": "role", + "title": "APP.DOCUMENT_LIST.COLUMNS.ROLE", + "type": "text", + "sortable": true, + "template": "app.columns.libraryRole", + "desktopOnly": false + }, + { + "id": "app.libraries.visibility", + "key": "visibility", + "title": "APP.DOCUMENT_LIST.COLUMNS.VISIBILITY", + "type": "text", + "sortable": true, + "template": "app.columns.libraryStatus", + "desktopOnly": true + } + ], + "favoriteLibraries": [ + { + "id": "app.favorite.libraries.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.favorite.libraries.name", + "key": "title", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.libraryName", + "desktopOnly": false + }, + { + "id": "app.favorite.libraries.role", + "key": "role", + "title": "APP.DOCUMENT_LIST.COLUMNS.ROLE", + "type": "text", + "sortable": true, + "template": "app.columns.libraryRole", + "desktopOnly": false + }, + { + "id": "app.favorite.libraries.visibility", + "key": "visibility", + "title": "APP.DOCUMENT_LIST.COLUMNS.VISIBILITY", + "type": "text", + "sortable": true, + "template": "app.columns.libraryStatus", + "desktopOnly": true + } + ], + "shared": [ + { + "id": "app.shared.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.shared.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.shared.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.shared.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.shared.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.shared.modifiedBy", + "key": "modifiedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.shared.sharedBy", + "key": "sharedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + } + ], + "recent": [ + { + "id": "app.recent.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.recent.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.recent.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.recent.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.recent.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + } + ], + "favorites": [ + { + "id": "app.favorites.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.favorites.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.favorites.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.favorites.size", + "key": "sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.favorites.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.favorites.modifiedBy", + "key": "modifiedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + } + ], + "trashcan": [ + { + "id": "app.trashcan.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.trashcan.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.trashcanName", + "desktopOnly": false + }, + { + "id": "app.trashcan.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.trashcan.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.trashcan.deletedOn", + "key": "archivedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.DELETED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + } + ], + "search-libraries": [ + { + "id": "app.libraries.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.libraries.name", + "key": "title", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.libraryName", + "desktopOnly": false + }, + { + "id": "app.libraries.role", + "key": "role", + "title": "APP.DOCUMENT_LIST.COLUMNS.ROLE", + "type": "text", + "sortable": true, + "template": "app.columns.libraryRole", + "desktopOnly": false + }, + { + "id": "app.libraries.visibility", + "key": "visibility", + "title": "APP.DOCUMENT_LIST.COLUMNS.VISIBILITY", + "type": "text", + "sortable": true, + "template": "app.columns.libraryStatus", + "desktopOnly": true + } + ] + } + } } diff --git a/e2e/resources/extensibility-configs/viewer-ext.json b/e2e/resources/extensibility-configs/viewer-ext.json index 352f137e2..0b3ccc2a6 100644 --- a/e2e/resources/extensibility-configs/viewer-ext.json +++ b/e2e/resources/extensibility-configs/viewer-ext.json @@ -1,857 +1,1683 @@ { - "$schema": "../../extension.schema.json", - "$name": "app", - "$version": "1.0.0", - "$references": [ - "plugin1.json", - "plugin2.json", - "dev.tools.json" - ], + "$schema": "../../extension.schema.json", + "$id": "app.core", + "$name": "app.core", + "$version": "1.0.0", + "$vendor": "Alfresco Software, Ltd.", + "$license": "LGPL-3.0", + "$runtime": "1.7.0", + "$description": "Core application extensions and features", + "$references": ["aos.plugin.json"], - "rules": [ + "rules": [ + { + "id": "app.toolbar.favorite.canToggle", + "comment": "workaround for recent files and search api issue", + "type": "core.every", + "parameters": [ { - "id": "app.toolbar.favorite.canToggle", - "comment": "workaround for recent files and search api issue", - "type": "core.every", - "parameters": [ - { - "type": "rule", - "value": "core.some", - "parameters": [ - { "type": "rule", "value": "app.selection.canAddFavorite" }, - { "type": "rule", "value": "app.selection.canRemoveFavorite" } - ] - }, - { - "type": "rule", - "value": "core.some", - "parameters": [ - { "type": "rule", "value": "app.navigation.isRecentFiles" }, - { "type": "rule", "value": "app.navigation.isSharedFiles" }, - { "type": "rule", "value": "app.navigation.isSearchResults" } - ] - } - ] + "type": "rule", + "value": "core.some", + "parameters": [ + { + "type": "rule", + "value": "app.selection.canAddFavorite" + }, + { + "type": "rule", + "value": "app.selection.canRemoveFavorite" + } + ] }, { - "id": "app.toolbar.favorite.canAdd", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.canAddFavorite" }, - { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, - { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, - { "type": "rule", "value": "app.navigation.isNotSearchResults" } - ] - }, - { - "id": "app.toolbar.favorite.canRemove", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.canRemoveFavorite" }, - { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, - { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, - { "type": "rule", "value": "app.navigation.isNotSearchResults" } - ] - }, - { - "id": "app.toolbar.info", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.notEmpty" }, - { "type": "rule", "value": "app.navigation.isNotLibraries" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.toolbar.canCopyNode", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.notEmpty" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" }, - { "type": "rule", "value": "app.navigation.isNotLibraries" } - ] - }, - { - "id": "app.toolbar.permissions", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.file" }, - { "type": "rule", "value": "app.selection.first.canUpdate" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.toolbar.versions", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.file" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.trashcan.hasSelection", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.notEmpty" }, - { "type": "rule", "value": "app.navigation.isTrashcan" } - ] - }, - { - "id": "app.toolbar.canEditFolder", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.folder" }, - { "type": "rule", "value": "app.selection.folder.canUpdate" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] - }, - { - "id": "app.toolbar.canViewFile", - "type": "core.every", - "parameters": [ - { - "type": "rule", - "value": "app.selection.file" - }, - { - "type": "rule", - "value": "core.not", - "parameters": [ - { "type": "rule", "value": "app.navigation.isTrashcan" } - ] - } - ] - }, - { - "id": "app.toolbar.canDownload", - "type": "core.every", - "parameters": [ - { "type": "rule", "value": "app.selection.canDownload" }, - { "type": "rule", "value": "app.navigation.isNotTrashcan" } - ] + "type": "rule", + "value": "core.some", + "parameters": [ + { + "type": "rule", + "value": "app.navigation.isRecentFiles" + }, + { + "type": "rule", + "value": "app.navigation.isSharedFiles" + }, + { + "type": "rule", + "value": "app.navigation.isSearchResults" + }, + { + "type": "rule", + "value": "app.navigation.isFavorites" + } + ] } - ], - - "features": { - "create": [ - { - "id": "app.create.folder", - "order": 100, - "icon": "create_new_folder", - "title": "APP.NEW_MENU.MENU_ITEMS.CREATE_FOLDER", - "description": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER", - "description-disabled": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER_NOT_ALLOWED", - "actions": { - "click": "CREATE_FOLDER" - }, - "rules": { - "enabled": "app.navigation.folder.canCreate" - } - }, - { - "id": "app.create.uploadFile", - "order": 200, - "icon": "file_upload", - "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FILE", - "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES", - "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES_NOT_ALLOWED", - "actions": { - "click": "UPLOAD_FILES" - }, - "rules": { - "enabled": "app.navigation.folder.canUpload" - } - }, - { - "id": "app.create.uploadFolder", - "order": 300, - "icon": "file_upload", - "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FOLDER", - "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS", - "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS_NOT_ALLOWED", - "actions": { - "click": "UPLOAD_FOLDER" - }, - "rules": { - "enabled": "app.navigation.folder.canUpload" - } - } - ], - "navbar": [ - { - "id": "app.navbar.primary", - "items": [ - { - "id": "app.navbar.personalFiles", - "order": 100, - "icon": "folder", - "title": "APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.PERSONAL.SIDENAV_LINK.TOOLTIP", - "route": "personal-files" - }, - { - "id": "app.navbar.libraries", - "order": 200, - "icon": "group_work", - "title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP", - "route": "libraries" - } - ] - }, - { - "id": "app.navbar.secondary", - "items": [ - { - "id": "app.navbar.shared", - "order": 100, - "icon": "people", - "title": "APP.BROWSE.SHARED.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.SHARED.SIDENAV_LINK.TOOLTIP", - "route": "shared" - }, - { - "id": "app.navbar.recentFiles", - "order": 200, - "icon": "schedule", - "title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP", - "route": "recent-files" - }, - { - "id": "app.navbar.favorites", - "order": 300, - "icon": "star", - "title": "APP.BROWSE.FAVORITES.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.FAVORITES.SIDENAV_LINK.TOOLTIP", - "route": "favorites" - }, - { - "id": "app.navbar.trashcan", - "order": 400, - "icon": "delete", - "title": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.LABEL", - "description": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.TOOLTIP", - "route": "trashcan" - } - ] - } - ], - "toolbar": [ - { - "id": "app.toolbar.preview", - "order": 100, - "title": "APP.ACTIONS.VIEW", - "icon": "open_in_browser", - "actions": { - "click": "VIEW_FILE" - }, - "rules": { - "visible": "app.toolbar.canViewFile" - } - }, - { - "id": "app.toolbar.download", - "order": 200, - "title": "APP.ACTIONS.DOWNLOAD", - "icon": "get_app", - "actions": { - "click": "DOWNLOAD_NODES" - }, - "rules": { - "visible": "app.toolbar.canDownload" - } - }, - { - "id": "app.toolbar.editFolder", - "order": 300, - "title": "APP.ACTIONS.EDIT", - "icon": "create", - "actions": { - "click": "EDIT_FOLDER" - }, - "rules": { - "visible": "app.toolbar.canEditFolder" - } - }, - { - "id": "app.toolbar.purgeDeletedNodes", - "order": 400, - "title": "APP.ACTIONS.DELETE_PERMANENT", - "icon": "delete_forever", - "actions": { - "click": "PURGE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - }, - { - "id": "app.toolbar.restoreDeletedNodes", - "order": 500, - "title": "APP.ACTIONS.RESTORE", - "icon": "restore", - "actions": { - "click": "RESTORE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - }, - { - "id": "app.toolbar.createLibrary", - "order": 600, - "title": "Create Library", - "icon": "create_new_folder", - "actions": { - "click": "CREATE_LIBRARY" - }, - "rules": { - "visible": "app.navigation.isLibraries" - } - }, - { - "id": "app.toolbar.info", - "type": "custom", - "order": 700, - "component": "app.toolbar.toggleInfoDrawer", - "rules": { - "visible": "app.toolbar.info" - } - }, - { - "id": "app.toolbar.more", - "type": "menu", - "order": 10000, - "icon": "more_vert", - "title": "APP.ACTIONS.MORE", - "children": [ - { - "id": "app.toolbar.favorite", - "comment": "workaround for Recent Files and Search API issue", - "type": "custom", - "order": 100, - "component": "app.toolbar.toggleFavorite", - "rules": { - "visible": "app.toolbar.favorite.canToggle" - } - }, - { - "id": "app.toolbar.favorite.add", - "order": 200, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star_border", - "actions": { - "click": "ADD_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canAdd" - } - }, - { - "id": "app.toolbar.favorite.remove", - "order": 300, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star", - "actions": { - "click": "REMOVE_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canRemove" - } - }, - { - "id": "app.toolbar.copy", - "order": 400, - "title": "APP.ACTIONS.COPY", - "icon": "content_copy", - "actions": { - "click": "COPY_NODES" - }, - "rules": { - "visible": "app.toolbar.canCopyNode" - } - }, - { - "id": "app.toolbar.move", - "order": 500, - "title": "APP.ACTIONS.MOVE", - "icon": "library_books", - "actions": { - "click": "MOVE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.toolbar.share", - "order": 600, - "title": "APP.ACTIONS.SHARE", - "icon": "share", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.toolbar.unshare", - "order": 700, - "title": "APP.ACTIONS.UNSHARE", - "icon": "stop_screen_share", - "actions": { - "click": "UNSHARE_NODES" - }, - "rules": { - "visible": "app.selection.canUnshare" - } - }, - { - "id": "app.toolbar.delete", - "order": 800, - "title": "APP.ACTIONS.DELETE", - "icon": "delete", - "actions": { - "click": "DELETE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.toolbar.deleteLibrary", - "order": 900, - "title": "APP.ACTIONS.DELETE", - "icon": "delete", - "actions": { - "click": "DELETE_LIBRARY" - }, - "rules": { - "visible": "app.selection.library" - } - }, - { - "id": "app.toolbar.versions", - "order": 1000, - "title": "APP.ACTIONS.VERSIONS", - "icon": "history", - "actions": { - "click": "MANAGE_VERSIONS" - }, - "rules": { - "visible": "app.toolbar.versions" - } - }, - { - "id": "app.toolbar.permissions", - "order": 1100, - "title": "APP.ACTIONS.PERMISSIONS", - "icon": "settings_input_component", - "actions": { - "click": "MANAGE_PERMISSIONS" - }, - "rules": { - "visible": "app.toolbar.permissions" - } - } - ] - } - ], - "contextMenu": [ - { - "id": "app.context.menu.download", - "order": 100, - "title": "APP.ACTIONS.DOWNLOAD", - "icon": "get_app", - "actions": { - "click": "DOWNLOAD_NODES" - }, - "rules": { - "visible": "app.toolbar.canDownload" - } - }, - { - "id": "app.context.menu.preview", - "order": 200, - "title": "APP.ACTIONS.VIEW", - "icon": "open_in_browser", - "actions": { - "click": "VIEW_FILE" - }, - "rules": { - "visible": "app.toolbar.canViewFile" - } - }, - { - "id": "app.context.menu.editFolder", - "order": 300, - "title": "APP.ACTIONS.EDIT", - "icon": "create", - "actions": { - "click": "EDIT_FOLDER" - }, - "rules": { - "visible": "app.toolbar.canEditFolder" - } - }, - { - "id": "app.context.menu.share", - "title": "APP.ACTIONS.SHARE", - "order": 400, - "icon": "share", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.context.menu.favorite.add", - "title": "APP.ACTIONS.FAVORITE", - "order": 500, - "icon": "star_border", - "actions": { - "click": "ADD_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canAdd" - } - }, - { - "id": "app.context.menu.favorite.remove", - "title": "APP.ACTIONS.FAVORITE", - "order": 600, - "icon": "star", - "actions": { - "click": "REMOVE_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canRemove" - } - }, - { - "id": "app.context.menu.favorite", - "comment": "workaround for Recent Files and Search API issue", - "type": "custom", - "order": 501, - "component": "app.toolbar.toggleFavorite", - "rules": { - "visible": "app.toolbar.favorite.canToggle" - } - }, - { - "id": "app.context.menu.copy", - "title": "APP.ACTIONS.COPY", - "order": 700, - "icon": "content_copy", - "actions": { - "click": "COPY_NODES" - }, - "rules": { - "visible": "app.toolbar.canCopyNode" - } - }, - { - "id": "app.context.menu.move", - "title": "APP.ACTIONS.MOVE", - "order": 800, - "icon": "library_books", - "actions": { - "click": "MOVE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.context.menu.delete", - "title": "APP.ACTIONS.DELETE", - "order": 900, - "icon": "delete", - "actions": { - "click": "DELETE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.context.menu.versions", - "title": "APP.ACTIONS.VERSIONS", - "order": 1000, - "icon": "history", - "actions": { - "click": "MANAGE_VERSIONS" - }, - "rules": { - "visible": "app.toolbar.versions" - } - }, - { - "id": "app.context.menu.permissions", - "title": "APP.ACTIONS.PERMISSIONS", - "icon": "settings_input_component", - "order": 1100, - "actions": { - "click": "MANAGE_PERMISSIONS" - }, - "rules": { - "visible": "app.toolbar.permissions" - } - }, - { - "id": "app.context.menu.purgeDeletedNodes", - "order": 1200, - "title": "APP.ACTIONS.DELETE_PERMANENT", - "icon": "delete_forever", - "actions": { - "click": "PURGE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - }, - { - "id": "app.context.menu.restoreDeletedNodes", - "order": 1300, - "title": "APP.ACTIONS.RESTORE", - "icon": "restore", - "actions": { - "click": "RESTORE_DELETED_NODES" - }, - "rules": { - "visible": "app.trashcan.hasSelection" - } - } - ], - "viewer": { - "toolbarActions": [ - { - "id": "app.toolbar.download", - "order": 100, - "title": "My custom title", - "icon": "get_app", - "actions": { - "click": "DOWNLOAD_NODES" - }, - "rules": { - "visible": "app.toolbar.canDownload" - } - }, - { - "id": "app.toolbar.my-action", - "order": 150, - "title": "My action", - "icon": "http", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.viewer.print", - "order": 200, - "title": "APP.ACTIONS.PRINT", - "icon": "print", - "disabled": true, - "actions": { - "click": "PRINT_FILE" - }, - "rules": { - "visible": "app.toolbar.canViewFile" - } - }, - { - "id": "app.viewer.share", - "order": 300, - "title": "APP.ACTIONS.SHARE", - "icon": "share", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.viewer.fullscreen", - "order": 400, - "title": "APP.ACTIONS.FULLSCREEN", - "icon": "fullscreen", - "actions": { - "click": "FULLSCREEN_VIEWER" - }, - "rules": { - "visible": "app.toolbar.canViewFile" - } - }, - { - "id": "app.toolbar.more", - "type": "menu", - "order": 10000, - "icon": "more_vert", - "title": "APP.ACTIONS.MORE", - "children": [ - { - "id": "app.viewer.favorite.add", - "order": 100, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star_border", - "actions": { - "click": "ADD_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canAdd" - } - }, - { - "id": "app.viewer.favorite.remove", - "order": 200, - "title": "APP.ACTIONS.FAVORITE", - "icon": "star", - "actions": { - "click": "REMOVE_FAVORITE" - }, - "rules": { - "visible": "app.toolbar.favorite.canRemove" - } - }, - { - "id": "app.viewer.favorite", - "comment": "workaround for Recent Files and Search API issue", - "type": "custom", - "order": 101, - "component": "app.toolbar.toggleFavorite", - "rules": { - "visible": "app.toolbar.favorite.canToggle" - } - }, - { - "id": "app.toolbar.my-secondary-action", - "order": 150, - "title": "My secondary action", - "icon": "alarm", - "actions": { - "click": "PRINT_FILE" - }, - "rules": { - "visible": "app.toolbar.canViewFile" - } - }, - { - "id": "app.viewer.share", - "order": 300, - "title": "APP.ACTIONS.SHARE", - "icon": "share", - "actions": { - "click": "SHARE_NODE" - }, - "rules": { - "visible": "app.selection.file.canShare" - } - }, - { - "id": "app.viewer.copy", - "order": 400, - "title": "APP.ACTIONS.COPY", - "icon": "content_copy", - "actions": { - "click": "COPY_NODES" - }, - "rules": { - "visible": "app.toolbar.canCopyNode" - } - }, - { - "id": "app.viewer.move", - "order": 500, - "title": "My new title", - "icon": "library_books", - "actions": { - "click": "MOVE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.viewer.delete", - "order": 600, - "title": "APP.ACTIONS.DELETE", - "icon": "delete", - "actions": { - "click": "DELETE_NODES" - }, - "rules": { - "visible": "app.selection.canDelete" - } - }, - { - "id": "app.viewer.versions", - "order": 700, - "title": "APP.ACTIONS.VERSIONS", - "icon": "history", - "actions": { - "click": "MANAGE_VERSIONS" - }, - "rules": { - "visible": "app.toolbar.versions" - } - }, - { - "id": "app.viewer.permissions", - "order": 800, - "title": "APP.ACTIONS.PERMISSIONS", - "disabled": true, - "icon": "settings_input_component", - "actions": { - "click": "MANAGE_PERMISSIONS" - }, - "rules": { - "visible": "app.toolbar.permissions" - } - } - ] - } - ], - "content": [ - { - "id": "app.viewer.pdf", - "fileExtension": "pdf", - "component": "app.components.tabs.metadata" - }, - { - "id": "app.viewer.docx", - "fileExtension": "docx", - "component": "app.components.tabs.comments" - } - ] + ] + }, + { + "id": "app.context.canShare", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file.canShare" }, + { "type": "rule", "value": "repository.isQuickShareEnabled" } + ] + }, + { + "id": "app.toolbar.canShare", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file.canShare" }, + { "type": "rule", "value": "repository.isQuickShareEnabled" }, + { + "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.selection.file.isShared" } + ] + } + ] + }, + { + "id": "app.toolbar.favorite.canAdd", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canAddFavorite" }, + { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, + { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, + { + "type": "rule", + "value": "app.navigation.isNotSearchResults" }, - "sidebar": [ - { - "id": "app.sidebar.properties", - "order": 100, - "title": "APP.INFO_DRAWER.TABS.PROPERTIES", - "component": "app.components.tabs.metadata" - }, - { - "id": "app.sidebar.comments", - "order": 200, - "title": "APP.INFO_DRAWER.TABS.COMMENTS", - "component": "app.components.tabs.comments" - }, - { - "id": "app.sidebar.versions", - "order": 300, - "disabled": true, - "title": "APP.INFO_DRAWER.TABS.VERSIONS", - "component": "app.components.tabs.versions" - } - ] + { "type": "rule", "value": "app.navigation.isNotFavorites" } + ] + }, + { + "id": "app.toolbar.favorite.canRemove", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canRemoveFavorite" }, + { "type": "rule", "value": "app.navigation.isNotRecentFiles" }, + { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, + { + "type": "rule", + "value": "app.navigation.isNotSearchResults" + }, + { "type": "rule", "value": "app.navigation.isNotFavorites" } + ] + }, + { + "id": "app.toolbar.info", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.navigation.isNotLibraries" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.libraries.toolbar", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.selection.library" } + ] + }, + { + "id": "app.libraries.toolbar.canToggleJoin", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.library" }, + { "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.selection.isPrivateLibrary" } + ] + }, + { "type": "rule", "value": "app.selection.hasNoLibraryRole" } + ] + }, + { + "id": "app.libraries.toolbar.canLeaveLibrary", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.library" }, + { "type": "rule", "value": "app.selection.hasLibraryRole" } + ] + }, + { + "id": "app.toolbar.canCopyNode", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { "type": "rule", "value": "app.navigation.isNotLibraries" } + ] + }, + { + "id": "app.toolbar.permissions", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.first.canUpdate" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.versions", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { + "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.selection.file.isLocked" } + ] + } + ] + }, + { + "id": "app.trashcan.hasSelection", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.notEmpty" }, + { "type": "rule", "value": "app.navigation.isTrashcan" } + ] + }, + { + "id": "app.toolbar.canEditFolder", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.folder" }, + { "type": "rule", "value": "app.selection.folder.canUpdate" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.canViewFile", + "type": "core.every", + "parameters": [ + { + "type": "rule", + "value": "app.selection.file" + }, + { + "type": "rule", + "value": "core.not", + "parameters": [ + { "type": "rule", "value": "app.navigation.isTrashcan" } + ] + } + ] + }, + { + "id": "app.toolbar.canDownload", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canDownload" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.canDelete", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.canDelete" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" } + ] + }, + { + "id": "app.toolbar.canToggleLock", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { + "type": "rule", + "value": "core.some", + "parameters": [ + { "type": "rule", "value": "app.navigation.isNotFavorites" }, + { "type": "rule", "value": "app.navigation.isFavoritesPreview" } + ] + }, + { + "type": "rule", + "value": "core.some", + "parameters": [ + { "type": "rule", "value": "app.navigation.isNotSharedFiles" }, + { "type": "rule", "value": "app.navigation.isSharedPreview" } + ] + }, + { + "type": "rule", + "value": "core.some", + "parameters": [ + { "type": "rule", "value": "app.selection.file.canUnlock" }, + { "type": "rule", "value": "app.selection.file.canLock" } + ] + } + ] + }, + { + "id": "app.toolbar.canUploadNewVersion", + "type": "core.every", + "parameters": [ + { "type": "rule", "value": "app.selection.file" }, + { "type": "rule", "value": "app.navigation.isNotTrashcan" }, + { "type": "rule", "value": "app.selection.file.canUploadVersion" } + ] } + ], + + "features": { + "icons": [ + { + "id": "adf:join_library", + "value": "./assets/images/join-library.svg" + }, + { + "id": "adf:move_file", + "value": "./assets/images/adf-move-file-24px.svg" + } + ], + "create": [ + { + "id": "app.create.uploadFile", + "order": 100, + "icon": "file_upload", + "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FILE", + "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES", + "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FILES_NOT_ALLOWED", + "actions": { + "click": "UPLOAD_FILES" + }, + "rules": { + "enabled": "app.navigation.folder.canUpload" + } + }, + { + "id": "app.create.uploadFolder", + "order": 200, + "icon": "file_upload", + "title": "APP.NEW_MENU.MENU_ITEMS.UPLOAD_FOLDER", + "description": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS", + "description-disabled": "APP.NEW_MENU.TOOLTIPS.UPLOAD_FOLDERS_NOT_ALLOWED", + "actions": { + "click": "UPLOAD_FOLDER" + }, + "rules": { + "enabled": "app.navigation.folder.canUpload" + } + }, + { + "id": "app.create.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.create.folder", + "order": 400, + "icon": "create_new_folder", + "title": "APP.NEW_MENU.MENU_ITEMS.CREATE_FOLDER", + "description": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER", + "description-disabled": "APP.NEW_MENU.TOOLTIPS.CREATE_FOLDER_NOT_ALLOWED", + "actions": { + "click": "CREATE_FOLDER" + }, + "rules": { + "enabled": "app.navigation.folder.canCreate" + } + }, + { + "id": "app.create.library", + "order": 600, + "title": "APP.NEW_MENU.MENU_ITEMS.CREATE_LIBRARY", + "description": "APP.NEW_MENU.TOOLTIPS.CREATE_LIBRARY", + "icon": "create_new_folder", + "actions": { + "click": "CREATE_LIBRARY" + } + } + ], + "navbar": [ + { + "id": "app.navbar.primary", + "items": [ + { + "id": "app.navbar.personalFiles", + "order": 100, + "icon": "folder", + "title": "APP.BROWSE.PERSONAL.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.PERSONAL.SIDENAV_LINK.TOOLTIP", + "route": "personal-files" + }, + { + "id": "app.navbar.libraries.menu", + "order": 200, + "icon": "library_books", + "title": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.LIBRARIES.SIDENAV_LINK.TOOLTIP", + "children": [ + { + "id": "app.navbar.libraries.files", + "order": 100, + "title": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.TOOLTIP", + "route": "libraries" + }, + { + "id": "app.navbar.libraries.favorite", + "order": 200, + "title": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.LIBRARIES.MENU.FAVORITE_LIBRARIES.SIDENAV_LINK.TOOLTIP", + "route": "favorite/libraries" + } + ] + } + ] + }, + { + "id": "app.navbar.secondary", + "items": [ + { + "id": "app.navbar.shared", + "order": 100, + "icon": "people", + "title": "APP.BROWSE.SHARED.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.SHARED.SIDENAV_LINK.TOOLTIP", + "route": "shared", + "rules": { + "visible": "repository.isQuickShareEnabled" + } + }, + { + "id": "app.navbar.recentFiles", + "order": 200, + "icon": "schedule", + "title": "APP.BROWSE.RECENT.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.RECENT.SIDENAV_LINK.TOOLTIP", + "route": "recent-files" + }, + { + "id": "app.navbar.favorites", + "order": 300, + "icon": "star", + "title": "APP.BROWSE.FAVORITES.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.FAVORITES.SIDENAV_LINK.TOOLTIP", + "route": "favorites" + }, + { + "id": "app.navbar.trashcan", + "order": 400, + "icon": "delete", + "title": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.LABEL", + "description": "APP.BROWSE.TRASHCAN.SIDENAV_LINK.TOOLTIP", + "route": "trashcan" + } + ] + } + ], + "toolbar": [ + { + "id": "app.toolbar.searchFilter", + "order": 50, + "title": "APP.BROWSE.SEARCH.TOGGLE_SEARCH_FILTER", + "icon": "view_list", + "actions": { + "click": "TOGGLE_SEARCH_FILTER" + }, + "rules": { + "visible": "app.navigation.isSearchResults" + } + }, + { + "id": "app.toolbar.share", + "order": 100, + "title": "APP.ACTIONS.SHARE", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.toolbar.canShare" + } + }, + { + "id": "app.toolbar.share.edit", + "order": 101, + "title": "APP.ACTIONS.SHARE_EDIT", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.selection.file.isShared" + } + }, + { + "id": "app.toolbar.preview", + "order": 300, + "title": "APP.ACTIONS.VIEW", + "icon": "visibility", + "actions": { + "click": "VIEW_FILE" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.toolbar.download", + "order": 200, + "title": "APP.ACTIONS.DOWNLOAD", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + }, + "rules": { + "visible": "app.toolbar.canDownload" + } + }, + { + "id": "app.toolbar.purgeDeletedNodes", + "order": 400, + "title": "APP.ACTIONS.DELETE_PERMANENT", + "icon": "delete_forever", + "actions": { + "click": "PURGE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + }, + { + "id": "app.toolbar.restoreDeletedNodes", + "order": 500, + "title": "APP.ACTIONS.RESTORE", + "icon": "restore", + "actions": { + "click": "RESTORE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + }, + { + "id": "app.toolbar.joinLibrary", + "type": "custom", + "order": 600, + "component": "app.toolbar.toggleJoinLibrary", + "rules": { + "visible": "app.libraries.toolbar.canToggleJoin" + } + }, + { + "id": "app.toolbar.leaveLibrary", + "order": 650, + "title": "APP.ACTIONS.LEAVE", + "icon": "exit_to_app", + "actions": { + "click": "LEAVE_LIBRARY" + }, + "rules": { + "visible": "app.libraries.toolbar.canLeaveLibrary" + } + }, + { + "id": "app.create.separator.2", + "type": "separator", + "order": 680 + }, + { + "id": "app.toolbar.info.infoDrawer", + "type": "custom", + "order": 700, + "component": "app.toolbar.toggleInfoDrawer", + "rules": { + "visible": "app.toolbar.info" + } + }, + { + "id": "app.libraries.toolbar.infoDrawer", + "type": "custom", + "order": 800, + "component": "app.toolbar.toggleInfoDrawer", + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.toolbar.more", + "type": "menu", + "order": 10000, + "icon": "more_vert", + "title": "APP.ACTIONS.MORE", + "children": [ + { + "id": "app.toolbar.toggleLock", + "order": 100, + "type": "custom", + "component": "app.toolbar.toggleEditOffline", + "rules": { + "visible": "app.toolbar.canToggleLock" + } + }, + { + "id": "app.toolbar.uploadNodeVersion", + "order": 200, + "title": "APP.ACTIONS.UPLOAD_VERSION", + "icon": "playlist_add", + "actions": { + "click": "UPLOAD_FILE_VERSION" + }, + "rules": { + "visible": "app.toolbar.canUploadNewVersion" + } + }, + { + "id": "app.create.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.toolbar.favorite", + "comment": "workaround for Recent Files and Search API issue", + "type": "custom", + "order": 400, + "component": "app.toolbar.toggleFavorite", + "rules": { + "visible": "app.toolbar.favorite.canToggle" + } + }, + { + "id": "app.libraries.toolbar.toggleFavorite", + "type": "custom", + "order": 401, + "component": "app.toolbar.toggleFavoriteLibrary", + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.toolbar.favorite.add", + "order": 402, + "title": "APP.ACTIONS.FAVORITE", + "icon": "star_border", + "actions": { + "click": "ADD_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canAdd" + } + }, + { + "id": "app.toolbar.favorite.remove", + "order": 403, + "title": "APP.ACTIONS.REMOVE_FAVORITE", + "icon": "star", + "actions": { + "click": "REMOVE_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canRemove" + } + }, + { + "id": "app.toolbar.editFolder", + "order": 450, + "title": "APP.ACTIONS.EDIT", + "icon": "create", + "actions": { + "click": "EDIT_FOLDER" + }, + "rules": { + "visible": "app.toolbar.canEditFolder" + } + }, + { + "id": "app.create.separator.2", + "type": "separator", + "order": 500 + }, + { + "id": "app.toolbar.copy", + "order": 600, + "title": "APP.ACTIONS.COPY", + "icon": "content_copy", + "actions": { + "click": "COPY_NODES" + }, + "rules": { + "visible": "app.toolbar.canCopyNode" + } + }, + { + "id": "app.toolbar.move", + "order": 700, + "title": "APP.ACTIONS.MOVE", + "icon": "adf:move_file", + "actions": { + "click": "MOVE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.toolbar.delete", + "order": 800, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.create.separator.3", + "type": "separator", + "order": 900 + }, + { + "id": "app.toolbar.versions", + "order": 1100, + "title": "APP.ACTIONS.VERSIONS", + "icon": "history", + "actions": { + "click": "MANAGE_VERSIONS" + }, + "rules": { + "visible": "app.toolbar.versions" + } + }, + { + "id": "app.toolbar.permissions", + "order": 1200, + "title": "APP.ACTIONS.PERMISSIONS", + "icon": "settings_input_component", + "actions": { + "click": "MANAGE_PERMISSIONS" + }, + "rules": { + "visible": "app.toolbar.permissions" + } + }, + { + "id": "app.toolbar.deleteLibrary", + "order": 100, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_LIBRARY" + }, + "rules": { + "visible": "app.selection.library" + } + } + ] + } + ], + "contextMenu": [ + { + "id": "app.context.toggleLock", + "order": 100, + "type": "custom", + "component": "app.toolbar.toggleEditOffline", + "rules": { + "visible": "app.toolbar.canToggleLock" + } + }, + { + "id": "app.context.menu.uploadNodeVersion", + "title": "APP.ACTIONS.UPLOAD_VERSION", + "order": 200, + "icon": "playlist_add", + "actions": { + "click": "UPLOAD_FILE_VERSION" + }, + "rules": { + "visible": "app.toolbar.canUploadNewVersion" + } + }, + { + "id": "app.create.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.context.menu.share", + "type": "custom", + "order": 400, + "component": "app.shared-link.toggleSharedLink", + "rules": { + "visible": "app.context.canShare" + } + }, + { + "id": "app.context.menu.download", + "order": 500, + "title": "APP.ACTIONS.DOWNLOAD", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + }, + "rules": { + "visible": "app.toolbar.canDownload" + } + }, + { + "id": "app.context.menu.preview", + "order": 600, + "title": "APP.ACTIONS.VIEW", + "icon": "visibility", + "actions": { + "click": "VIEW_FILE" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.context.menu.favorite.add", + "title": "APP.ACTIONS.FAVORITE", + "order": 700, + "icon": "star_border", + "actions": { + "click": "ADD_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canAdd" + } + }, + { + "id": "app.context.menu.favorite.remove", + "title": "APP.ACTIONS.REMOVE_FAVORITE", + "order": 701, + "icon": "star", + "actions": { + "click": "REMOVE_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canRemove" + } + }, + { + "id": "app.context.menu.favorite", + "comment": "workaround for Recent Files and Search API issue", + "type": "custom", + "order": 702, + "component": "app.toolbar.toggleFavorite", + "rules": { + "visible": "app.toolbar.favorite.canToggle" + } + }, + { + "id": "app.context.menu.libraries.toggleFavorite", + "type": "custom", + "order": 703, + "component": "app.toolbar.toggleFavoriteLibrary", + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.context.menu.editFolder", + "order": 800, + "title": "APP.ACTIONS.EDIT", + "icon": "create", + "actions": { + "click": "EDIT_FOLDER" + }, + "rules": { + "visible": "app.toolbar.canEditFolder" + } + }, + { + "id": "app.create.separator.2", + "type": "separator", + "order": 900 + }, + { + "id": "app.context.menu.copy", + "title": "APP.ACTIONS.COPY", + "order": 1000, + "icon": "content_copy", + "actions": { + "click": "COPY_NODES" + }, + "rules": { + "visible": "app.toolbar.canCopyNode" + } + }, + { + "id": "app.context.menu.move", + "title": "APP.ACTIONS.MOVE", + "order": 1100, + "icon": "adf:move_file", + "actions": { + "click": "MOVE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.context.menu.delete", + "title": "APP.ACTIONS.DELETE", + "order": 1200, + "icon": "delete", + "actions": { + "click": "DELETE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.create.separator.3", + "type": "separator", + "order": 1300 + }, + { + "id": "app.context.menu.versions", + "title": "APP.ACTIONS.VERSIONS", + "order": 1400, + "icon": "history", + "actions": { + "click": "MANAGE_VERSIONS" + }, + "rules": { + "visible": "app.toolbar.versions" + } + }, + { + "id": "app.context.menu.permissions", + "title": "APP.ACTIONS.PERMISSIONS", + "icon": "settings_input_component", + "order": 1500, + "actions": { + "click": "MANAGE_PERMISSIONS" + }, + "rules": { + "visible": "app.toolbar.permissions" + } + }, + { + "id": "app.context.menu.joinLibrary", + "type": "custom", + "order": 100, + "component": "app.menu.toggleJoinLibrary", + "rules": { + "visible": "app.libraries.toolbar.canToggleJoin" + } + }, + { + "id": "app.context.menu.leaveLibrary", + "order": 200, + "title": "APP.ACTIONS.LEAVE", + "icon": "exit_to_app", + "actions": { + "click": "LEAVE_LIBRARY" + }, + "rules": { + "visible": "app.libraries.toolbar.canLeaveLibrary" + } + }, + { + "id": "app.context.menu.deleteLibrary", + "order": 300, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_LIBRARY" + }, + "rules": { + "visible": "app.libraries.toolbar" + } + }, + { + "id": "app.context.menu.purgeDeletedNodes", + "order": 100, + "title": "APP.ACTIONS.DELETE_PERMANENT", + "icon": "delete_forever", + "actions": { + "click": "PURGE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + }, + { + "id": "app.context.menu.restoreDeletedNodes", + "order": 200, + "title": "APP.ACTIONS.RESTORE", + "icon": "restore", + "actions": { + "click": "RESTORE_DELETED_NODES" + }, + "rules": { + "visible": "app.trashcan.hasSelection" + } + } + ], + "viewer": { + "toolbarActions": [ + { + "id": "app.viewer.fullscreen", + "order": 100, + "title": "APP.ACTIONS.FULLSCREEN", + "icon": "fullscreen", + "actions": { + "click": "FULLSCREEN_VIEWER" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.viewer.my-action", + "order": 150, + "title": "My action", + "icon": "http", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.selection.file.canShare" + } + }, + { + "id": "app.viewer.separator.1", + "type": "separator", + "order": 180 + }, + { + "id": "app.viewer.share", + "order": 200, + "title": "APP.ACTIONS.SHARE", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.toolbar.canShare" + } + }, + { + "id": "app.viewer.share.edit", + "order": 250, + "title": "APP.ACTIONS.SHARE_EDIT", + "icon": "link", + "actions": { + "click": "SHARE_NODE" + }, + "rules": { + "visible": "app.selection.file.isShared" + } + }, + { + "id": "app.viewer.download", + "order": 300, + "title": "My custom title", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + }, + "rules": { + "visible": "app.toolbar.canDownload" + } + }, + { + "id": "app.viewer.print", + "order": 400, + "title": "APP.ACTIONS.PRINT", + "icon": "print", + "disabled": true, + "actions": { + "click": "PRINT_FILE" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.viewer.separator.2", + "type": "separator", + "order": 450 + }, + { + "id": "app.viewer.infoDrawer", + "type": "custom", + "order": 500, + "component": "app.toolbar.toggleInfoDrawer", + "rules": { + "visible": "app.toolbar.info" + } + }, + { + "id": "app.viewer.toolbar.more", + "type": "menu", + "order": 10000, + "icon": "more_vert", + "title": "APP.ACTIONS.MORE", + "children": [ + { + "id": "app.viewer.toggleLock", + "order": 100, + "type": "custom", + "component": "app.toolbar.toggleEditOffline", + "rules": { + "visible": "app.toolbar.canToggleLock" + } + }, + { + "id": "app.viewer.my-secondary-action", + "order": 150, + "title": "My secondary action", + "icon": "alarm", + "actions": { + "click": "PRINT_FILE" + }, + "rules": { + "visible": "app.toolbar.canViewFile" + } + }, + { + "id": "app.toolbar.uploadNodeVersion", + "order": 200, + "title": "APP.ACTIONS.UPLOAD_VERSION", + "icon": "playlist_add", + "actions": { + "click": "UPLOAD_FILE_VERSION" + }, + "rules": { + "visible": "app.toolbar.canUploadNewVersion" + } + }, + { + "id": "app.viewer.more.separator.1", + "type": "separator", + "order": 300 + }, + { + "id": "app.viewer.favorite.add", + "order": 400, + "title": "APP.ACTIONS.FAVORITE", + "icon": "star_border", + "actions": { + "click": "ADD_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canAdd" + } + }, + { + "id": "app.viewer.favorite.remove", + "order": 401, + "title": "APP.ACTIONS.REMOVE_FAVORITE", + "icon": "star", + "actions": { + "click": "REMOVE_FAVORITE" + }, + "rules": { + "visible": "app.toolbar.favorite.canRemove" + } + }, + { + "id": "app.viewer.favorite", + "comment": "workaround for Recent Files and Search API issue", + "type": "custom", + "order": 402, + "component": "app.toolbar.toggleFavorite", + "rules": { + "visible": "app.toolbar.favorite.canToggle" + } + }, + { + "id": "app.viewer.more.separator.2", + "type": "separator", + "order": 500 + }, + { + "id": "app.viewer.copy", + "order": 600, + "title": "APP.ACTIONS.COPY", + "icon": "content_copy", + "actions": { + "click": "COPY_NODES" + }, + "rules": { + "visible": "app.toolbar.canCopyNode" + } + }, + { + "id": "app.viewer.move", + "order": 700, + "title": "My new title", + "icon": "adf:move_file", + "actions": { + "click": "MOVE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.viewer.delete", + "order": 800, + "title": "APP.ACTIONS.DELETE", + "icon": "delete", + "actions": { + "click": "DELETE_NODES" + }, + "rules": { + "visible": "app.toolbar.canDelete" + } + }, + { + "id": "app.viewer.more.separator.3", + "type": "separator", + "order": 900 + }, + + { + "id": "app.viewer.versions", + "order": 1000, + "title": "APP.ACTIONS.VERSIONS", + "icon": "history", + "actions": { + "click": "MANAGE_VERSIONS" + }, + "rules": { + "visible": "app.toolbar.versions" + } + }, + { + "id": "app.viewer.permissions", + "order": 1100, + "title": "APP.ACTIONS.PERMISSIONS", + "disabled": true, + "icon": "settings_input_component", + "actions": { + "click": "MANAGE_PERMISSIONS" + }, + "rules": { + "visible": "app.toolbar.permissions" + } + } + ] + } + ], + "shared": { + "toolbarActions": [ + { + "id": "app.viewer.shared.fullscreen", + "order": 100, + "title": "APP.ACTIONS.FULLSCREEN", + "icon": "fullscreen", + "actions": { + "click": "FULLSCREEN_VIEWER" + } + }, + { + "id": "app.viewer.shared.download", + "order": 200, + "title": "APP.ACTIONS.DOWNLOAD", + "icon": "get_app", + "actions": { + "click": "DOWNLOAD_NODES" + } + } + ] + }, + "content": [ + { + "id": "app.viewer.pdf", + "fileExtension": "pdf", + "component": "app.components.tabs.metadata" + }, + { + "id": "app.viewer.docx", + "fileExtension": "docx", + "component": "app.components.tabs.comments" + } + ] + }, + "sidebar": [ + { + "id": "app.sidebar.properties", + "order": 100, + "title": "APP.INFO_DRAWER.TABS.PROPERTIES", + "component": "app.components.tabs.metadata", + "rules": { + "visible": "app.navigation.isNotLibraries" + } + }, + { + "id": "app.sidebar.comments", + "order": 200, + "title": "APP.INFO_DRAWER.TABS.COMMENTS", + "component": "app.components.tabs.comments", + "rules": { + "visible": "app.navigation.isNotLibraries" + } + }, + { + "id": "app.sidebar.versions", + "order": 300, + "disabled": true, + "title": "APP.INFO_DRAWER.TABS.VERSIONS", + "component": "app.components.tabs.versions", + "rules": { + "visible": "app.navigation.isNotLibraries" + } + }, + { + "id": "app.sidebar.library.properties", + "order": 500, + "title": "APP.INFO_DRAWER.TABS.LIBRARY_PROPERTIES", + "component": "app.components.tabs.library.metadata", + "rules": { + "visible": "app.libraries.toolbar" + } + } + ], + "content-metadata-presets": [ + { + "id": "app.content.metadata.custom", + "custom": [ + { + "id": "app.content.metadata.customGroup", + "title": "APP.CONTENT_METADATA.EXIF_GROUP_TITLE", + "items": [ + { + "id": "app.content.metadata.exifAspect", + "aspect": "exif:exif", + "properties": [ + "exif:pixelXDimension", + "exif:pixelYDimension", + "exif:dateTimeOriginal", + "exif:exposureTime", + "exif:fNumber", + "exif:flash", + "exif:focalLength", + "exif:isoSpeedRatings", + "exif:orientation", + "exif:manufacturer", + "exif:model", + "exif:software" + ] + } + ] + } + ] + } + ], + "documentList": { + "files": [ + { + "id": "app.files.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.files.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-ellipsis-cell adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.files.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.files.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.files.modifiedBy", + "key": "modifiedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + } + ], + "libraries": [ + { + "id": "app.libraries.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.libraries.name", + "key": "title", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.libraryName", + "desktopOnly": false + }, + { + "id": "app.libraries.role", + "key": "role", + "title": "APP.DOCUMENT_LIST.COLUMNS.ROLE", + "type": "text", + "sortable": true, + "template": "app.columns.libraryRole", + "desktopOnly": false + }, + { + "id": "app.libraries.visibility", + "key": "visibility", + "title": "APP.DOCUMENT_LIST.COLUMNS.VISIBILITY", + "type": "text", + "sortable": true, + "template": "app.columns.libraryStatus", + "desktopOnly": true + } + ], + "favoriteLibraries": [ + { + "id": "app.favorite.libraries.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.favorite.libraries.name", + "key": "title", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.libraryName", + "desktopOnly": false + }, + { + "id": "app.favorite.libraries.role", + "key": "role", + "title": "APP.DOCUMENT_LIST.COLUMNS.ROLE", + "type": "text", + "sortable": true, + "template": "app.columns.libraryRole", + "desktopOnly": false + }, + { + "id": "app.favorite.libraries.visibility", + "key": "visibility", + "title": "APP.DOCUMENT_LIST.COLUMNS.VISIBILITY", + "type": "text", + "sortable": true, + "template": "app.columns.libraryStatus", + "desktopOnly": true + } + ], + "shared": [ + { + "id": "app.shared.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.shared.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.shared.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.shared.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.shared.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.shared.modifiedBy", + "key": "modifiedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.shared.sharedBy", + "key": "sharedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + } + ], + "recent": [ + { + "id": "app.recent.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.recent.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.recent.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.recent.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.recent.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + } + ], + "favorites": [ + { + "id": "app.favorites.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.favorites.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.name", + "desktopOnly": false + }, + { + "id": "app.favorites.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.favorites.size", + "key": "sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.favorites.modifiedOn", + "key": "modifiedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.favorites.modifiedBy", + "key": "modifiedByUser.displayName", + "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", + "type": "text", + "class": "adf-ellipsis-cell", + "sortable": true, + "desktopOnly": true + } + ], + "trashcan": [ + { + "id": "app.trashcan.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.trashcan.name", + "key": "name", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.trashcanName", + "desktopOnly": false + }, + { + "id": "app.trashcan.location", + "key": "path.name", + "title": "APP.DOCUMENT_LIST.COLUMNS.LOCATION", + "type": "text", + "sortable": true, + "template": "app.columns.location", + "desktopOnly": true + }, + { + "id": "app.trashcan.size", + "key": "content.sizeInBytes", + "title": "APP.DOCUMENT_LIST.COLUMNS.SIZE", + "type": "fileSize", + "sortable": true, + "desktopOnly": true + }, + { + "id": "app.trashcan.deletedOn", + "key": "archivedAt", + "title": "APP.DOCUMENT_LIST.COLUMNS.DELETED_ON", + "type": "date", + "format": "timeAgo", + "sortable": true, + "desktopOnly": true + } + ], + "search-libraries": [ + { + "id": "app.libraries.thumbnail", + "key": "$thumbnail", + "type": "image", + "sortable": false, + "desktopOnly": false + }, + { + "id": "app.libraries.name", + "key": "title", + "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", + "type": "text", + "class": "adf-expand-cell-5", + "sortable": true, + "template": "app.columns.libraryName", + "desktopOnly": false + }, + { + "id": "app.libraries.role", + "key": "role", + "title": "APP.DOCUMENT_LIST.COLUMNS.ROLE", + "type": "text", + "sortable": true, + "template": "app.columns.libraryRole", + "desktopOnly": false + }, + { + "id": "app.libraries.visibility", + "key": "visibility", + "title": "APP.DOCUMENT_LIST.COLUMNS.VISIBILITY", + "type": "text", + "sortable": true, + "template": "app.columns.libraryStatus", + "desktopOnly": true + } + ] + } + } } diff --git a/e2e/suites/actions/single-click.test.ts b/e2e/suites/actions/single-click.test.ts index 870e7b1c4..e76b1a0df 100755 --- a/e2e/suites/actions/single-click.test.ts +++ b/e2e/suites/actions/single-click.test.ts @@ -100,7 +100,8 @@ describe('Single click on item name', () => { expect(await dataTable.hasLinkOnName(file1)).toBe(true, 'Link on name is missing'); }); - it('File preview opens when clicking the hyperlink - [C280033]', async () => { + // TODO: investigate + xit('File preview opens when clicking the hyperlink - [C280033]', async () => { await dataTable.clickNameLink(file1); expect(await viewer.isViewerOpened()).toBe(true, 'Viewer is not opened'); @@ -108,7 +109,8 @@ describe('Single click on item name', () => { await Utils.pressEscape(); }); - it('Navigate inside the folder when clicking the hyperlink - [C280034]', async () => { + // TODO: investigate + xit('Navigate inside the folder when clicking the hyperlink - [C280034]', async () => { await dataTable.clickNameLink(folder1); expect(await breadcrumb.getCurrentItemName()).toBe(folder1); diff --git a/e2e/suites/extensions/ext-viewer.test.ts b/e2e/suites/extensions/ext-viewer.test.ts index 9acefaca4..80d7275a4 100755 --- a/e2e/suites/extensions/ext-viewer.test.ts +++ b/e2e/suites/extensions/ext-viewer.test.ts @@ -45,19 +45,19 @@ describe('Extensions - Viewer', () => { let docxFileId; const customAction = { - id: 'app.toolbar.my-action', + id: 'app.viewer.my-action', title: 'My action', icon: 'http' }; const customSecondaryAction = { - id: 'app.toolbar.my-secondary-action', + id: 'app.viewer.my-secondary-action', title: 'My secondary action', icon: 'alarm' }; const downloadButton = { - id: 'app.toolbar.download', + id: 'app.viewer.download', title: 'My custom title' }; diff --git a/package-lock.json b/package-lock.json index 1b1827542..9324b3757 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,33 +5,33 @@ "requires": true, "dependencies": { "@alfresco/adf-content-services": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.0.0.tgz", - "integrity": "sha512-fslg/adVczwvrDJV4i/9zWgsrYv+zvqhmiFXubS+vORDvl48fqf3575OIfDSoeRblPrINzyoupH61DHWzAKa/w==", + "version": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce", + "resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-3.2.0-7271e85f94e4a89b227f520488b33706c25406ce.tgz", + "integrity": "sha512-1eSXIfvWWrMzJ9lh4gi8pkcoZbBeU7W/uSqiV3c8TNP7VFPo6pRsym7io+DE1FGV/c57BIuf872D2ZvkjauVIQ==", "requires": { "tslib": "^1.9.0" } }, "@alfresco/adf-core": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.0.0.tgz", - "integrity": "sha512-3WbOGNPDM1YIG0fSQC2NiEwoNVoBU555yiW6jcNIMI6tSMVw13zuDyA9+wOmo6KY4FZlABah3hGcD/DfqBfNLg==", + "version": "3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81", + "resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81.tgz", + "integrity": "sha512-R1V5gRWl6xMT5RvhS+P7qlDrJntZjeyjY4793AB6Qq0TGSAvGIR+S3mbPl02Ex6jT6E6xmHiDm0AeqdRwjsL7Q==", "requires": { "tslib": "^1.9.0" } }, "@alfresco/adf-extensions": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.0.0.tgz", - "integrity": "sha512-piQvPQbG6Zx6J+M8U4Qv6m42gUOOOy9W3Zwgq+DdVCjP60RfhXcS+HW8wUMUxFOTgjonFOIyNA26BddIOoUhEQ==", + "version": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce", + "resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-3.2.0-7271e85f94e4a89b227f520488b33706c25406ce.tgz", + "integrity": "sha512-l4IV7v9XID4GYlxtGGKa2mV8r7IwpbMkseUidTSDd+fQvXqeMsjCGlEMBkeaD6+DNHW/J4jyeDa6e46dFfdJYQ==", "requires": { "tslib": "^1.9.0" } }, "@alfresco/js-api": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.0.0.tgz", - "integrity": "sha512-eiJQRJH+GHw9OszNoHWyGrc/llcI5qQBult5G3TfmRDK3c1YcCLHXbQmaN7hgoOuk0i88oPziXC6ZFS/rfi+fA==", + "version": "3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630", + "resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630.tgz", + "integrity": "sha512-7KNSCMq4/8Bluhm5DzdGRNg36H7ZE9Ei9s6JY1yWrYgGH/ObOCYnJKx4kyAetqFbktD+C/1LHCHyPsF+0qkZ2g==", "requires": { "event-emitter": "0.3.4", "superagent": "3.8.2" @@ -352,17 +352,17 @@ } }, "@angular/animations": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-7.2.10.tgz", - "integrity": "sha512-WgklBWYKy8LVlugMJ8XgBB4whNiMng8vY6mpaYhza064nsrQXK+ua1anSOGMGlmCI/5i4EgaycTS05XD/C+Kkw==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/animations/-/animations-7.2.11.tgz", + "integrity": "sha512-YlZATC4Gnd3eOBuSW/QqsMPHeJWVKR8yfen2qKgFO3waK+6qXHXIdRF3j81l07jlUx5kBw+f1OCEeHl2QChBiw==", "requires": { "tslib": "^1.9.0" } }, "@angular/cdk": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.3.5.tgz", - "integrity": "sha512-5m5HYm/D3/HveZdQQ4wtXk1Vm7bPiV+X5hPgegSHaoX6XONLIwSf821UqE+yYgjalILN44080+p3wHXtQT6Fkg==", + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.3.6.tgz", + "integrity": "sha512-ZuOz8nQk0bdo8YyNFcwnmSl4MPaQDAFTbLK29w4Vd/LfPnhBI3pAr0wVuPFb0fl3eSvvUrfTb/+kPbQcE07A0A==", "requires": { "parse5": "^5.0.0", "tslib": "^1.7.1" @@ -436,25 +436,25 @@ } }, "@angular/common": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/common/-/common-7.2.10.tgz", - "integrity": "sha512-FyiVUhV1MaRogXmVKsw6CMXqWZHsiYMdK651absXtGqWZn6and0jiUwEM9LbV4HRpLbB7F6gwqCvT5Ft8xpzeg==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/common/-/common-7.2.11.tgz", + "integrity": "sha512-78T65tt3zD0Oss6pyRvzLhPlTJMhPpXMCsJdr1s821i+/xg8TUzgU3Cqxvz37r3dysnY08r6BmEqJg3+fGxEwA==", "requires": { "tslib": "^1.9.0" } }, "@angular/compiler": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.2.10.tgz", - "integrity": "sha512-sRuH+UDogzAHpagorHfj2rbF8HWGEJGsFUn5TGq1vyWA37ALuu/zkemufIcgET16lTiBEvVn7/Oz9Am+JTlGrg==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-7.2.11.tgz", + "integrity": "sha512-PptrtUgzuxLtBFxcmkkmhr16Pu9A3xqRQGmgTKL2mzwpt/fZswYEv4QT2E5Br8f94UP5XPv+K30kY+exjPnFjg==", "requires": { "tslib": "^1.9.0" } }, "@angular/compiler-cli": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-7.2.10.tgz", - "integrity": "sha512-L/mksAkpb8kywYlHlXi5mAyUNNiSHZpoTV+P2t3nNGmqyXuad92TvdZMCO34TYUyGyFz9AVH2qc6LciY9ipQTA==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/compiler-cli/-/compiler-cli-7.2.11.tgz", + "integrity": "sha512-JlyJcRdD0oltKbFKGA83g4+vitF4e7ReqAHYTGbNTDIicWhCXYwwGAqj0HYAUHsv9KnP9F5ojZOJ7FRIN7mPgw==", "dev": true, "requires": { "canonical-path": "1.0.0", @@ -690,9 +690,9 @@ } }, "@angular/core": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/core/-/core-7.2.10.tgz", - "integrity": "sha512-u2IKaq4G1wpq5w1AI0Q7jnsKuSfR4WDsBLnwtjTIjde1YDqA0n0dYwqrvWzLK6SbzSWjlrAXx0hrz5SlDchmqA==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/core/-/core-7.2.11.tgz", + "integrity": "sha512-2FUgXbGn75D6HQESVVmnrjqP1l2YNwwIZISembzpr4WvTm0lxzq/9WsuPFJNWggwCerajyjYz+kDJT3RsonGZg==", "requires": { "tslib": "^1.9.0" } @@ -706,63 +706,63 @@ } }, "@angular/forms": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.2.10.tgz", - "integrity": "sha512-fQccon0Yuni13QJt16npSRlkitPZBLXfWXDFwCEybo/QqtSar3BOJAQFW2yqokrfW5lbO5VDFJ7Pj2dDyBXEAA==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/forms/-/forms-7.2.11.tgz", + "integrity": "sha512-S7qpaA4lP4yU5HsOvPuf4bpDGiqP6YjwcWHcTkm1kx9oiHGvmUoQAkFw06SMh2YCsGi413Qqys/4L0H8+8Za2A==", "requires": { "tslib": "^1.9.0" } }, "@angular/http": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/http/-/http-7.2.10.tgz", - "integrity": "sha512-Uaq9Ep21ZZIG+yzYHhyH+RA/AEyKGTtWT5y12UXXFsCdXSwJ2p+czw2EdP42Oj1g1QptkP6lAl2W/RUlxwXQcw==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/http/-/http-7.2.11.tgz", + "integrity": "sha512-v2imS3q8kxXyHcYXrsv7K4Ot4ZinyYEzJiDPndmIWDLerSMriDahKx3akX6BXYyaJ+a22sEu8JfBuO3tqc+WqQ==", "requires": { "tslib": "^1.9.0" } }, "@angular/language-service": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-7.2.10.tgz", - "integrity": "sha512-14mIHbouqD+JauLcNakhHSL7/YB63+w7NrwNJY/DHNT/IyppBUV2dneHHembGEUs3QBY+7oL8FfPCLDRT+K+OQ==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/language-service/-/language-service-7.2.11.tgz", + "integrity": "sha512-hq6ROxnqghmKXwJ8eIPb0wlz/PSmVTpFNQGrk3H6BFdRxPIHxvYU94mcLiV0/rMLZsSSSd4oANRUQToJR9upUA==", "dev": true }, "@angular/material": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@angular/material/-/material-7.3.5.tgz", - "integrity": "sha512-BkakYMuvicKIybp4LI1FKbC8a1jmmTo1ruNugy4PvQmjvj+kim7OMtAR/yCHycYq4cNQDq5LmnqLdclQEniqFw==", + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-7.3.6.tgz", + "integrity": "sha512-yRQlB0+KO0BilpK9Eg8Sv+T1hJZEWgQ2YGTxnIsgc6DhYM/IHk165iN5KMj3MBJq425z16xEEP6GqDzjTwp+pA==", "requires": { "tslib": "^1.7.1" } }, "@angular/material-moment-adapter": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-7.3.5.tgz", - "integrity": "sha512-3H7dR7axzPqtzFuDNbl0eG0kK708xIRRKBPCFPem1IRJc8Hiolaj7cRWJGq6c5GjPe0shqhRJetQVbmwmRazrQ==", + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-7.3.6.tgz", + "integrity": "sha512-VoUTQRKXkIYhzlWAi/2RQ6r+Oj2b2aTDxbUa+1kN70ECmnv5Ds7L0odyuD3LrXJTVVxswGOeDoD4jIu4OMuEfQ==", "requires": { "tslib": "^1.7.1" } }, "@angular/platform-browser": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.2.10.tgz", - "integrity": "sha512-78r527d0Nw0svkDw2SBr58H3VEH5VAvn+r+q7NLqIqD8jsOMf8CMztUCDs+h02HhEHveCXWI5EtFXxWepB6wFg==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-7.2.11.tgz", + "integrity": "sha512-M/XB1TQDHx2Ni+2NR75Zc1N+UuwfAMwNcBaOxtKRLkZhpyOAneA0ZyqT2GQm6XTGxDwQhz6Q3wG6SwGTm9aLYg==", "requires": { "tslib": "^1.9.0" } }, "@angular/platform-browser-dynamic": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.2.10.tgz", - "integrity": "sha512-ZTJL7iIEL3yDgJLx5/a2wfKsxe0ZHEUSibtbRQNpn35ZI0G9QN7ezbTOqj2+/QGvaY8Y1JeoYCeJrMzaUxDxGg==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/platform-browser-dynamic/-/platform-browser-dynamic-7.2.11.tgz", + "integrity": "sha512-MDwNjH0BKfYabTJtfKAy87o+pRVcHsCwlrkp8/LBGNS42vDuzWWNUepMRTf2SloDUthL9Tsibdl1LfbMhUoGpw==", "requires": { "tslib": "^1.9.0" } }, "@angular/router": { - "version": "7.2.10", - "resolved": "https://registry.npmjs.org/@angular/router/-/router-7.2.10.tgz", - "integrity": "sha512-7A0n6O5sW2xbQTG6pHfCwSkx6UvUQLg6Z/sDOghAZUakf4kd5BIWet1Q9eyiYndkpq6esQ+gMt9+CeJidf5l1A==", + "version": "7.2.11", + "resolved": "https://registry.npmjs.org/@angular/router/-/router-7.2.11.tgz", + "integrity": "sha512-6TcXQgTCPrOgkGWkxO879t+kcMovno6VfN4xfqr36IMBRxhmeWFEhLJmsVGPa/TT4XZjYQXyBk57ZXmneUqjQQ==", "requires": { "tslib": "^1.9.0" } @@ -4019,7 +4019,7 @@ }, "engine.io-client": { "version": "3.2.1", - "resolved": "https://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", + "resolved": "http://registry.npmjs.org/engine.io-client/-/engine.io-client-3.2.1.tgz", "integrity": "sha512-y5AbkytWeM4jQr7m/koQLc5AxpRKC1hEVUb/s1FUAWEJq5AzJJ4NLvzuKPuxtDi5Mq755WuDvZ6Iv2rXj4PTzw==", "dev": true, "requires": { @@ -4108,13 +4108,13 @@ } }, "es5-ext": { - "version": "0.10.47", - "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.47.tgz", - "integrity": "sha512-/1TItLfj+TTfWoeRcDn/0FbGV6SNo4R+On2GGVucPU/j3BWnXE2Co8h8CTo4Tu34gFJtnmwS9xiScKs4EjZhdw==", + "version": "0.10.49", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.49.tgz", + "integrity": "sha512-3NMEhi57E31qdzmYp2jwRArIUsj1HI/RxbQ4bgnSB+AIKIxsAmTiK83bYMifIcpWvEc3P1X30DhUKOqEtF/kvg==", "requires": { "es6-iterator": "~2.0.3", "es6-symbol": "~3.1.1", - "next-tick": "1" + "next-tick": "^1.0.0" } }, "es6-iterator": { @@ -10036,9 +10036,9 @@ "dev": true }, "qs": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.6.0.tgz", - "integrity": "sha512-KIJqT9jQJDQx5h5uAVPimw6yVg2SekOKu959OCtktD3FjzbpvaPr8i4zzg07DOMz+igA4W/aNM7OV8H37pFYfA==" + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz", + "integrity": "sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==" }, "querystring": { "version": "0.2.0", @@ -11398,7 +11398,7 @@ }, "socket.io-parser": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", + "resolved": "http://registry.npmjs.org/socket.io-parser/-/socket.io-parser-3.2.0.tgz", "integrity": "sha512-FYiBx7rc/KORMJlgsXysflWx/RIvtqZbyGLlHZvjfmPTPeuD/I8MaW7cfFrj5tRltICJdgwflhfZ3NVVbVLFQA==", "dev": true, "requires": { diff --git a/package.json b/package.json index c0015e00b..2bcadac86 100644 --- a/package.json +++ b/package.json @@ -36,23 +36,23 @@ }, "private": true, "dependencies": { - "@alfresco/adf-content-services": "3.0.0", - "@alfresco/adf-core": "3.0.0", - "@alfresco/adf-extensions": "3.0.0", - "@alfresco/js-api": "3.0.0", - "@angular/animations": "7.2.10", - "@angular/cdk": "^7.3.5", - "@angular/common": "7.2.10", - "@angular/compiler": "7.2.10", - "@angular/core": "7.2.10", + "@alfresco/adf-content-services": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce", + "@alfresco/adf-core": "3.2.0-75295fdb84e0fc1ee88d7fc2c65ac963b1161d81", + "@alfresco/adf-extensions": "3.2.0-7271e85f94e4a89b227f520488b33706c25406ce", + "@alfresco/js-api": "3.1.0-2c7e78d49c51ba0966d4e6c4dedf2b64da83d630", + "@angular/animations": "7.2.11", + "@angular/cdk": "^7.3.6", + "@angular/common": "7.2.11", + "@angular/compiler": "7.2.11", + "@angular/core": "7.2.11", "@angular/flex-layout": "^7.0.0-beta.23", - "@angular/forms": "7.2.10", - "@angular/http": "7.2.10", - "@angular/material": "^7.3.5", - "@angular/material-moment-adapter": "^7.3.5", - "@angular/platform-browser": "7.2.10", - "@angular/platform-browser-dynamic": "7.2.10", - "@angular/router": "7.2.10", + "@angular/forms": "7.2.11", + "@angular/http": "7.2.11", + "@angular/material": "^7.3.6", + "@angular/material-moment-adapter": "^7.3.6", + "@angular/platform-browser": "7.2.11", + "@angular/platform-browser-dynamic": "7.2.11", + "@angular/router": "7.2.11", "@mat-datetimepicker/core": "^3.0.0-beta.0", "@mat-datetimepicker/moment": "^3.0.0-beta.0", "@ngrx/effects": "^7.3.0", @@ -73,8 +73,8 @@ "@angular-devkit/build-angular": "~0.13.0", "@angular-devkit/build-ng-packagr": "~0.13.0", "@angular/cli": "^7.3.6", - "@angular/compiler-cli": "7.2.10", - "@angular/language-service": "7.2.10", + "@angular/compiler-cli": "7.2.11", + "@angular/language-service": "7.2.11", "@types/jasmine": "^2.5.53", "@types/jasminewd2": "^2.0.2", "@types/node": "9.3.0", diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index c9986fafe..bf59dfb77 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -32,8 +32,8 @@ import { GenericErrorComponent } from './components/common/generic-error/generic import { SearchResultsComponent } from './components/search/search-results/search-results.component'; import { SearchLibrariesResultsComponent } from './components/search/search-libraries-results/search-libraries-results.component'; import { LoginComponent } from './components/login/login.component'; -import { AppAuthGuard } from './guards/auth.guard'; import { AppSharedRuleGuard } from './guards/shared.guard'; +import { AuthGuardEcm } from '@alfresco/adf-core'; export const APP_ROUTES: Routes = [ { @@ -242,7 +242,7 @@ export const APP_ROUTES: Routes = [ component: GenericErrorComponent } ], - canActivateChild: [AppAuthGuard], - canActivate: [AppAuthGuard] + canActivateChild: [AuthGuardEcm], + canActivate: [AuthGuardEcm] } ]; diff --git a/src/app/components/context-menu/context-menu.directive.ts b/src/app/components/context-menu/context-menu.directive.ts index 8c33226d3..eb946b603 100644 --- a/src/app/components/context-menu/context-menu.directive.ts +++ b/src/app/components/context-menu/context-menu.directive.ts @@ -100,7 +100,7 @@ export class ContextActionsDirective implements OnInit, OnDestroy { } private getTarget(event: MouseEvent): Element { - return this.findAncestor(event.target, 'adf-datatable-table-cell'); + return this.findAncestor(event.target, 'adf-datatable-cell'); } private isSelected(target): boolean { diff --git a/src/app/components/context-menu/context-menu.directives.spec.ts b/src/app/components/context-menu/context-menu.directives.spec.ts index bea806d9f..57da3015e 100644 --- a/src/app/components/context-menu/context-menu.directives.spec.ts +++ b/src/app/components/context-menu/context-menu.directives.spec.ts @@ -45,8 +45,7 @@ describe('ContextActionsDirective', () => { it('should call service to render context menu', fakeAsync(() => { const el = document.createElement('div'); - el.className = - 'adf-data-table-cell adf-datatable-table-cell adf-datatable-row'; + el.className = 'adf-data-table-cell adf-datatable-cell adf-datatable-row'; const fragment = document.createDocumentFragment(); fragment.appendChild(el); diff --git a/src/app/components/login/login.component.html b/src/app/components/login/login.component.html index c2dd3cdad..ca45d6231 100644 --- a/src/app/components/login/login.component.html +++ b/src/app/components/login/login.component.html @@ -2,7 +2,7 @@ [copyrightText]="'application.copyright' | adfAppConfig | translate" providers="ECM" successRoute="/personal-files" - [logoImageUrl]="'./assets/images/alfresco-logo.svg'" + logoImageUrl="./assets/images/alfresco-logo.svg" [showRememberMe]="false" [showLoginActions]="false" > diff --git a/src/app/components/login/login.component.spec.ts b/src/app/components/login/login.component.spec.ts deleted file mode 100644 index faf3f52f5..000000000 --- a/src/app/components/login/login.component.spec.ts +++ /dev/null @@ -1,83 +0,0 @@ -/*! - * @license - * Alfresco Example Content Application - * - * Copyright (C) 2005 - 2019 Alfresco Software Limited - * - * 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 - * along with Alfresco. If not, see . - */ - -import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { Router } from '@angular/router'; -import { Location } from '@angular/common'; -import { TestBed, ComponentFixture } from '@angular/core/testing'; -import { - AuthenticationService, - UserPreferencesService, - AppConfigPipe -} from '@alfresco/adf-core'; -import { LoginComponent } from './login.component'; -import { AppTestingModule } from '../../testing/app-testing.module'; - -describe('LoginComponent', () => { - let fixture: ComponentFixture; - let router: Router; - let userPreference: UserPreferencesService; - let auth: AuthenticationService; - let location: Location; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [AppTestingModule], - declarations: [LoginComponent, AppConfigPipe], - providers: [Location], - schemas: [NO_ERRORS_SCHEMA] - }); - - fixture = TestBed.createComponent(LoginComponent); - - router = TestBed.get(Router); - spyOn(router, 'navigateByUrl'); - - location = TestBed.get(Location); - spyOn(location, 'forward'); - - auth = TestBed.get(AuthenticationService); - spyOn(auth, 'getRedirect').and.returnValue('/some-url'); - - userPreference = TestBed.get(UserPreferencesService); - spyOn(userPreference, 'setStoragePrefix'); - }); - - describe('OnInit()', () => { - it('should perform normal login when user is not logged in', () => { - spyOn(auth, 'isEcmLoggedIn').and.returnValue(false); - fixture.detectChanges(); - - expect(location.forward).not.toHaveBeenCalled(); - }); - - it('should redirect when user is logged in', () => { - spyOn(auth, 'isEcmLoggedIn').and.returnValue(true); - fixture.detectChanges(); - - expect(location.forward).toHaveBeenCalled(); - }); - }); -}); diff --git a/src/app/components/login/login.component.ts b/src/app/components/login/login.component.ts index 122492080..fed1ff9ee 100644 --- a/src/app/components/login/login.component.ts +++ b/src/app/components/login/login.component.ts @@ -23,29 +23,9 @@ * along with Alfresco. If not, see . */ -import { Component, OnInit } from '@angular/core'; -import { Location } from '@angular/common'; -import { AuthenticationService } from '@alfresco/adf-core'; -import { ActivatedRoute, Params } from '@angular/router'; +import { Component } from '@angular/core'; @Component({ templateUrl: './login.component.html' }) -export class LoginComponent implements OnInit { - constructor( - private location: Location, - private auth: AuthenticationService, - private route: ActivatedRoute - ) {} - - ngOnInit() { - if (this.auth.isEcmLoggedIn()) { - this.location.forward(); - } else { - this.route.queryParams.subscribe((params: Params) => { - const redirectUrl = params['redirectUrl']; - this.auth.setRedirect({ provider: 'ECM', url: redirectUrl }); - }); - } - } -} +export class LoginComponent {} diff --git a/src/app/components/permissions/permission-manager/permission-manager.component.theme.scss b/src/app/components/permissions/permission-manager/permission-manager.component.theme.scss index 9b94eb559..9f4d43b32 100644 --- a/src/app/components/permissions/permission-manager/permission-manager.component.theme.scss +++ b/src/app/components/permissions/permission-manager/permission-manager.component.theme.scss @@ -12,7 +12,7 @@ flex: 1; .adf-datatable-permission { - .adf-data-table-cell--icon { + .adf-datatable-cell--icon { width: auto; } } diff --git a/src/app/components/preview/preview.component.html b/src/app/components/preview/preview.component.html index 2cf210515..92a278739 100644 --- a/src/app/components/preview/preview.component.html +++ b/src/app/components/preview/preview.component.html @@ -31,20 +31,5 @@ - - - - - - - - - diff --git a/src/app/components/preview/preview.component.ts b/src/app/components/preview/preview.component.ts index a3076bc6b..98d3eff00 100644 --- a/src/app/components/preview/preview.component.ts +++ b/src/app/components/preview/preview.component.ts @@ -149,7 +149,6 @@ export class PreviewComponent extends PageComponent ]); this.openWith = this.extensions.openWithActions; - this.contentExtensions = this.extensions.viewerContentExtensions; } ngOnDestroy() { diff --git a/src/app/components/trashcan/trashcan.component.html b/src/app/components/trashcan/trashcan.component.html index 2c6528eba..7d8c14ef4 100644 --- a/src/app/components/trashcan/trashcan.component.html +++ b/src/app/components/trashcan/trashcan.component.html @@ -76,7 +76,7 @@ diff --git a/src/app/extensions/app.interface.ts b/src/app/extensions/app.interface.ts deleted file mode 100644 index a792c78f8..000000000 --- a/src/app/extensions/app.interface.ts +++ /dev/null @@ -1,33 +0,0 @@ -/*! - * @license - * Alfresco Example Content Application - * - * Copyright (C) 2005 - 2019 Alfresco Software Limited - * - * 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 - * along with Alfresco. If not, see . - */ - -import { RuleContext } from '@alfresco/adf-extensions'; -import { AuthenticationService } from '@alfresco/adf-core'; -import { RepositoryInfo } from '@alfresco/js-api'; - -export interface AppRuleContext extends RuleContext { - repository: RepositoryInfo; - auth: AuthenticationService; -} diff --git a/src/app/extensions/core.extensions.module.ts b/src/app/extensions/core.extensions.module.ts index 0fce8462a..b72ee2899 100644 --- a/src/app/extensions/core.extensions.module.ts +++ b/src/app/extensions/core.extensions.module.ts @@ -23,7 +23,7 @@ * along with Alfresco. If not, see . */ -import { CoreModule } from '@alfresco/adf-core'; +import { CoreModule, AuthGuardEcm } from '@alfresco/adf-core'; import { CommonModule } from '@angular/common'; import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core'; import { AppLayoutComponent } from '../components/layout/app-layout/app-layout.component'; @@ -40,7 +40,6 @@ import { LibraryMetadataTabComponent } from '../components/info-drawer/library-m import { CommentsTabComponent } from '../components/info-drawer/comments-tab/comments-tab.component'; import { VersionsTabComponent } from '../components/info-drawer/versions-tab/versions-tab.component'; import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions'; -import { AppAuthGuard } from '../guards/auth.guard'; import { LocationLinkComponent } from '../components/common/location-link/location-link.component'; import { DocumentDisplayModeComponent } from '../components/toolbar/document-display-mode/document-display-mode.component'; import { ToggleJoinLibraryButtonComponent } from '../components/toolbar/toggle-join-library/toggle-join-library-button.component'; @@ -106,7 +105,7 @@ export class CoreExtensionsModule { }); extensions.setAuthGuards({ - 'app.auth': AppAuthGuard + 'app.auth': AuthGuardEcm }); extensions.setEvaluators({ diff --git a/src/app/extensions/document-list.extensions.ts b/src/app/extensions/document-list.extensions.ts deleted file mode 100644 index df5d73708..000000000 --- a/src/app/extensions/document-list.extensions.ts +++ /dev/null @@ -1,37 +0,0 @@ -/*! - * @license - * Alfresco Example Content Application - * - * Copyright (C) 2005 - 2019 Alfresco Software Limited - * - * 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 - * along with Alfresco. If not, see . - */ - -import { ExtensionElement } from '@alfresco/adf-extensions'; - -export interface DocumentListPresetRef extends ExtensionElement { - key: string; - type: string; // text|image|date - title?: string; - format?: string; - class?: string; - sortable: boolean; - template: string; - desktopOnly: boolean; -} diff --git a/src/app/extensions/evaluators/app.evaluators.ts b/src/app/extensions/evaluators/app.evaluators.ts index 476594e7b..320635a4d 100644 --- a/src/app/extensions/evaluators/app.evaluators.ts +++ b/src/app/extensions/evaluators/app.evaluators.ts @@ -24,7 +24,6 @@ */ import { RuleContext, RuleParameter } from '@alfresco/adf-extensions'; -import { AppRuleContext } from '../app.interface'; import { isNotTrashcan, isNotLibraries, @@ -375,7 +374,7 @@ export function hasLockedFiles( * JSON ref: `app.selection.file.isLocked` */ export function isWriteLocked( - context: AppRuleContext, + context: RuleContext, ...args: RuleParameter[] ): boolean { return !!( @@ -396,7 +395,7 @@ export function isWriteLocked( * JSON ref: `app.selection.file.isLockOwner` */ export function isUserWriteLockOwner( - context: AppRuleContext, + context: RuleContext, ...args: RuleParameter[] ): boolean { return ( @@ -412,7 +411,7 @@ export function isUserWriteLockOwner( * JSON ref: `app.selection.file.canLock` */ export function canLockFile( - context: AppRuleContext, + context: RuleContext, ...args: RuleParameter[] ): boolean { return ( @@ -425,7 +424,7 @@ export function canLockFile( * JSON ref: `app.selection.file.canLock` */ export function canUnlockFile( - context: AppRuleContext, + context: RuleContext, ...args: RuleParameter[] ): boolean { const { file } = context.selection; @@ -441,7 +440,7 @@ export function canUnlockFile( * JSON ref: `app.selection.file.canUploadVersion` */ export function canUploadVersion( - context: AppRuleContext, + context: RuleContext, ...args: RuleParameter[] ): boolean { if (isFavorites(context, ...args) || isSharedFiles(context, ...args)) { diff --git a/src/app/extensions/evaluators/repository.evaluators.ts b/src/app/extensions/evaluators/repository.evaluators.ts index 0e1fde33d..b81582bdf 100644 --- a/src/app/extensions/evaluators/repository.evaluators.ts +++ b/src/app/extensions/evaluators/repository.evaluators.ts @@ -23,15 +23,14 @@ * along with Alfresco. If not, see . */ -import { RuleParameter } from '@alfresco/adf-extensions'; -import { AppRuleContext } from '../app.interface'; +import { RuleParameter, RuleContext } from '@alfresco/adf-extensions'; /** * Checks if the quick share repository option is enabled or not. * JSON ref: `repository.isQuickShareEnabled` */ export function hasQuickShareEnabled( - context: AppRuleContext, + context: RuleContext, ...args: RuleParameter[] ): boolean { return context.repository.status.isQuickShareEnabled; diff --git a/src/app/extensions/extension.service.ts b/src/app/extensions/extension.service.ts index 9ecc54e67..9a28a3c87 100644 --- a/src/app/extensions/extension.service.ts +++ b/src/app/extensions/extension.service.ts @@ -36,7 +36,6 @@ import { NavigationState, ExtensionConfig, RuleEvaluator, - ViewerExtensionRef, ContentActionRef, ContentActionType, ExtensionLoaderService, @@ -48,19 +47,19 @@ import { ExtensionService, ProfileState, mergeObjects, - ExtensionRef + ExtensionRef, + RuleContext, + DocumentListPresetRef, + IconRef } from '@alfresco/adf-extensions'; import { AppConfigService, AuthenticationService } from '@alfresco/adf-core'; -import { DocumentListPresetRef } from './document-list.extensions'; import { BehaviorSubject, Observable } from 'rxjs'; -import { IconRef } from './icon.extensions'; -import { AppRuleContext } from './app.interface'; import { RepositoryInfo } from '@alfresco/js-api'; @Injectable({ providedIn: 'root' }) -export class AppExtensionService implements AppRuleContext { +export class AppExtensionService implements RuleContext { private _references = new BehaviorSubject([]); defaults = { @@ -72,7 +71,6 @@ export class AppExtensionService implements AppRuleContext { toolbarActions: Array = []; viewerToolbarActions: Array = []; sharedLinkViewerToolbarActions: Array = []; - viewerContentExtensions: Array = []; contextMenuActions: Array = []; openWithActions: Array = []; createActions: Array = []; @@ -154,10 +152,6 @@ export class AppExtensionService implements AppRuleContext { 'features.viewer.shared.toolbarActions' ); - this.viewerContentExtensions = this.loader - .getElements(config, 'features.viewer.content') - .filter(ref => !this.isViewerExtensionDisabled(ref)); - this.contextMenuActions = this.loader.getContentActions( config, 'features.contextMenu' diff --git a/src/app/extensions/icon.extensions.ts b/src/app/extensions/icon.extensions.ts deleted file mode 100644 index 65323aa48..000000000 --- a/src/app/extensions/icon.extensions.ts +++ /dev/null @@ -1,30 +0,0 @@ -/*! - * @license - * Alfresco Example Content Application - * - * Copyright (C) 2005 - 2019 Alfresco Software Limited - * - * 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 - * along with Alfresco. If not, see . - */ - -import { ExtensionElement } from '@alfresco/adf-extensions'; - -export interface IconRef extends ExtensionElement { - value: string; -} diff --git a/src/app/guards/auth.guard.spec.ts b/src/app/guards/auth.guard.spec.ts deleted file mode 100644 index aa0a783ff..000000000 --- a/src/app/guards/auth.guard.spec.ts +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * @license - * Alfresco Example Content Application - * - * Copyright (C) 2005 - 2019 Alfresco Software Limited - * - * 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 - * along with Alfresco. If not, see . - */ - -import { AppAuthGuard } from './auth.guard'; -import { TestBed } from '@angular/core/testing'; -import { AppTestingModule } from '../testing/app-testing.module'; -import { AuthenticationService, AppConfigService } from '@alfresco/adf-core'; -import { RouterTestingModule } from '@angular/router/testing'; -import { Router } from '@angular/router'; - -describe('AppAuthGuard', () => { - let auth: AuthenticationService; - let guard: AppAuthGuard; - let router: Router; - let config: AppConfigService; - - beforeEach(() => { - TestBed.configureTestingModule({ - imports: [AppTestingModule, RouterTestingModule], - providers: [AppAuthGuard] - }); - - auth = TestBed.get(AuthenticationService); - guard = TestBed.get(AppAuthGuard); - router = TestBed.get(Router); - config = TestBed.get(AppConfigService); - - spyOn(router, 'navigateByUrl').and.stub(); - }); - - it('should fall through when withCredentials enabled', () => { - spyOn(auth, 'isEcmLoggedIn').and.returnValue(false); - - config.config = { - auth: { - withCredentials: false - } - }; - - expect(guard.checkLogin(null)).toBe(false); - - config.config = { - auth: { - withCredentials: true - } - }; - - expect(guard.checkLogin(null)).toBe(true); - }); - - it('should evaluate to [true] if logged in already', () => { - spyOn(auth, 'isEcmLoggedIn').and.returnValue(true); - - expect(guard.checkLogin(null)).toBe(true); - }); - - it('should navigate to login with the redirect url', () => { - spyOn(auth, 'isEcmLoggedIn').and.returnValue(false); - expect(guard.checkLogin('test/url')).toBe(false); - expect(router.navigateByUrl).toHaveBeenCalledWith( - '/login?redirectUrl=test/url' - ); - }); - - it('should evaluate to [false] with OAuth enabled', () => { - spyOn(auth, 'isEcmLoggedIn').and.returnValue(false); - spyOn(auth, 'isOauth').and.returnValue(true); - spyOn(guard, 'isOAuthWithoutSilentLogin').and.returnValue(false); - - expect(guard.checkLogin(null)).toBe(false); - expect(router.navigateByUrl).not.toHaveBeenCalled(); - }); -}); diff --git a/src/app/guards/auth.guard.ts b/src/app/guards/auth.guard.ts deleted file mode 100644 index 6a6918fbb..000000000 --- a/src/app/guards/auth.guard.ts +++ /dev/null @@ -1,63 +0,0 @@ -/*! - * @license - * Alfresco Example Content Application - * - * Copyright (C) 2005 - 2019 Alfresco Software Limited - * - * 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 - * along with Alfresco. If not, see . - */ - -import { Injectable } from '@angular/core'; -import { Router } from '@angular/router'; -import { - AuthenticationService, - AppConfigService, - AuthGuardEcm -} from '@alfresco/adf-core'; - -@Injectable({ - providedIn: 'root' -}) -export class AppAuthGuard extends AuthGuardEcm { - constructor( - private _auth: AuthenticationService, - private _router: Router, - private _config: AppConfigService - ) { - super(_auth, _router, _config); - } - - checkLogin(redirectUrl: string): boolean { - const withCredentials = this._config.get( - 'auth.withCredentials', - false - ); - - if (withCredentials || this._auth.isEcmLoggedIn()) { - return true; - } - - if (!this._auth.isOauth() || this.isOAuthWithoutSilentLogin()) { - this._auth.setRedirect({ provider: 'ECM', url: redirectUrl }); - this._router.navigateByUrl('/login?redirectUrl=' + redirectUrl); - } - - return false; - } -} diff --git a/src/app/services/node-actions.service.ts b/src/app/services/node-actions.service.ts index 80c54e338..6a7133c70 100644 --- a/src/app/services/node-actions.service.ts +++ b/src/app/services/node-actions.service.ts @@ -31,13 +31,15 @@ import { AlfrescoApiService, ContentService, DataColumn, - TranslationService + TranslationService, + ThumbnailService } from '@alfresco/adf-core'; import { DocumentListService, ContentNodeSelectorComponent, ContentNodeSelectorComponentData, - ContentNodeDialogService + ContentNodeDialogService, + ShareDataRow } from '@alfresco/adf-content-services'; import { MinimalNodeEntity, @@ -68,7 +70,8 @@ export class NodeActionsService { private dialog: MatDialog, private documentListService: DocumentListService, private apiService: AlfrescoApiService, - private translation: TranslationService + private translation: TranslationService, + private thumbnailService: ThumbnailService ) {} /** @@ -634,22 +637,17 @@ export class NodeActionsService { return this.contentService.hasAllowableOperations(node, permission); } - // todo: review once 1.10-beta6 is out - private rowFilter(row: /*ShareDataRow*/ any): boolean { + private rowFilter(row: ShareDataRow): boolean { const node: MinimalNodeEntryEntity = row.node.entry; this.isSitesDestinationAvailable = !!node['guid']; return !node.isFile && node.nodeType !== 'app:folderlink'; } - // todo: review once 1.10-beta6 is out - private imageResolver( - row: /*ShareDataRow*/ any, - col: DataColumn - ): string | null { + private imageResolver(row: ShareDataRow, _: DataColumn): string | null { const entry: MinimalNodeEntryEntity = row.node.entry; if (!this.contentService.hasAllowableOperations(entry, 'update')) { - return this.documentListService.getMimeTypeIcon('disable/folder'); + return this.thumbnailService.getMimeTypeIcon('disable/folder'); } return null; diff --git a/src/app/ui/overrides/adf-document-list.theme.scss b/src/app/ui/overrides/adf-document-list.theme.scss index e1a5a36fd..a57b98050 100644 --- a/src/app/ui/overrides/adf-document-list.theme.scss +++ b/src/app/ui/overrides/adf-document-list.theme.scss @@ -1,49 +1,29 @@ @import 'mixins'; @mixin adf-document-list-theme($theme) { - $foreground: map-get($theme, foreground); - $background: map-get($theme, background); - $primary: map-get($theme, primary); + .adf-datatable-list { + border: none; + } + + .mat-icon.adf-datatable-selected > svg { + fill: #2196f3; + } adf-document-list { @include flex-column; - background-color: mat-color($background, card); } - adf-datatable { + .adf-datatable { @include flex-column; overflow-y: scroll; - } - .adf-data-table { - border: none !important; - - .adf-datatable-selected > svg { - // fill: mat-color($primary); - fill: #2196f3; - } - - .adf-datatable-header, - .adf-datatable-row, - .adf-data-table-cell { - color: mat-color($foreground, text, 0.54); + .adf-datatable-cell-header, + .adf-datatable-cell { &:focus { outline: none !important; } } - .adf-cell-container { - position: relative; - } - - .adf-data-table-cell { - height: 56px; - } - - .adf-datatable-table-cell-header:focus { - outline: none !important; - } - .adf-datatable-body .adf-datatable-row { &:hover, &:focus { @@ -56,55 +36,12 @@ } } - .adf-data-table-cell, - .adf-datatable-header { - width: 100%; - text-align: left; - } - - .adf-datatable-body .adf-data-table-cell--image { - padding-left: 24px; - padding-right: 0; - width: 10px; - } - - .adf-data-table-cell--ellipsis .adf-cell-value, - .adf-data-table-cell--ellipsis__name .adf-cell-value { - display: flex; - align-items: center; - } - - .adf-data-table-cell--ellipsis .adf-datatable-cell, - .adf-data-table-cell--ellipsis__name .adf-datatable-cell { - white-space: nowrap; - display: block; - overflow: hidden; - text-overflow: ellipsis; - } - - .adf-data-table-cell--ellipsis .adf-datatable-cell { - max-width: 7vw; - } - - .adf-data-table-cell--ellipsis__name .adf-datatable-cell { - position: absolute; - max-width: calc(100% - 2em); - } - - .adf-datatable-row:last-child .adf-datatable-table-cell { - border-bottom: 1px solid mat-color($foreground, text, 0.07); - } - - &.adf-data-table--empty { + .adf-datatable--empty { .adf-datatable-row { &:hover, &:focus { background-color: unset; } - - .adf-datatable-table-cell { - border: none; - } } } } diff --git a/src/assets/app.extensions.json b/src/assets/app.extensions.json index 1b7ba5ebe..073c8883d 100644 --- a/src/assets/app.extensions.json +++ b/src/assets/app.extensions.json @@ -1296,7 +1296,6 @@ "id": "app.files.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1305,7 +1304,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-ellipsis-cell adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1332,7 +1331,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -1342,7 +1341,6 @@ "id": "app.libraries.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1351,7 +1349,7 @@ "key": "title", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-expand-cell-5", "sortable": true, "template": "app.columns.libraryName", "desktopOnly": false @@ -1380,7 +1378,6 @@ "id": "app.favorite.libraries.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1389,7 +1386,7 @@ "key": "title", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-expand-cell-5", "sortable": true, "template": "app.columns.libraryName", "desktopOnly": false @@ -1418,7 +1415,6 @@ "id": "app.shared.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1427,7 +1423,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1463,7 +1459,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true }, @@ -1472,7 +1468,7 @@ "key": "sharedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.SHARED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -1482,7 +1478,6 @@ "id": "app.recent.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1491,7 +1486,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1528,7 +1523,6 @@ "id": "app.favorites.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1537,7 +1531,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-expand-cell-5", "sortable": true, "template": "app.columns.name", "desktopOnly": false @@ -1573,7 +1567,7 @@ "key": "modifiedByUser.displayName", "title": "APP.DOCUMENT_LIST.COLUMNS.MODIFIED_BY", "type": "text", - "class": "adf-data-table-cell--ellipsis", + "class": "adf-ellipsis-cell", "sortable": true, "desktopOnly": true } @@ -1583,7 +1577,6 @@ "id": "app.trashcan.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1592,7 +1585,7 @@ "key": "name", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-expand-cell-5", "sortable": true, "template": "app.columns.trashcanName", "desktopOnly": false @@ -1629,7 +1622,6 @@ "id": "app.libraries.thumbnail", "key": "$thumbnail", "type": "image", - "class": "adf-image-table-cell", "sortable": false, "desktopOnly": false }, @@ -1638,7 +1630,7 @@ "key": "title", "title": "APP.DOCUMENT_LIST.COLUMNS.NAME", "type": "text", - "class": "adf-data-table-cell--ellipsis__name", + "class": "adf-expand-cell-5", "sortable": true, "template": "app.columns.libraryName", "desktopOnly": false