diff --git a/angular.json b/angular.json index 6518a08d3e..5c77bc1bb0 100644 --- a/angular.json +++ b/angular.json @@ -672,4 +672,4 @@ "cli": { "analytics": "0ce5075f-0835-439a-bebe-7c41750179a6" } -} \ No newline at end of file +} diff --git a/docs/core/components/viewer.component.md b/docs/core/components/viewer.component.md index abc75cf8cf..902b785af6 100644 --- a/docs/core/components/viewer.component.md +++ b/docs/core/components/viewer.component.md @@ -93,6 +93,7 @@ See the [Custom layout](#custom-layout) section for full details of all availabl | mimeType | `string` | | MIME type of the file content (when not determined by the filename extension). | | nodeId | `string` | null | Node Id of the file to load. | | overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. | +| readOnly | `boolean` | true | Hide or show media management actions for [Image-viewer component](../../../lib/core/viewer/components/img-viewer.component.ts "Defined in img-viewer.component.ts") | | sharedLinkId | `string` | null | Shared link id (to display shared file). | | showLeftSidebar | `boolean` | false | Toggles left sidebar visibility. Requires `allowLeftSidebar` to be set to `true`. | | showRightSidebar | `boolean` | false | Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. | @@ -110,6 +111,7 @@ See the [Custom layout](#custom-layout) section for full details of all availabl | Name | Type | Description | | ---- | ---- | ----------- | | extensionChange | `any` | Emitted when the filename extension changes. | +| fileSubmit | `Blob` | Emitted when media management actions occur. | | goBack | `any` | Emitted when user clicks the 'Back' button. | | invalidSharedLink | `any` | Emitted when the shared link used is not valid. | | navigateBefore | `any` | Emitted when user clicks 'Navigate Before' ("<") button. | diff --git a/e2e/core/viewer/viewer-content-services-component.e2e.ts b/e2e/core/viewer/viewer-content-services-component.e2e.ts index 7219592668..3cb9d6fde5 100644 --- a/e2e/core/viewer/viewer-content-services-component.e2e.ts +++ b/e2e/core/viewer/viewer-content-services-component.e2e.ts @@ -221,8 +221,6 @@ describe('Content Services Viewer', () => { await viewerPage.checkZoomInButtonIsDisplayed(); await viewerPage.checkZoomOutButtonIsDisplayed(); await viewerPage.checkPercentageIsDisplayed(); - await viewerPage.checkRotateLeftButtonIsDisplayed(); - await viewerPage.checkRotateRightButtonIsDisplayed(); await viewerPage.checkScaleImgButtonIsDisplayed(); await viewerPage.clickCloseButton(); @@ -242,15 +240,6 @@ describe('Content Services Viewer', () => { await viewerPage.clickZoomOutButton(); await viewerPage.checkZoomedOut(zoom); - await viewerPage.clickRotateLeftButton(); - await viewerPage.checkRotation('transform: scale(1, 1) rotate(-90deg) translate(0px, 0px);'); - - await viewerPage.clickScaleImgButton(); - await viewerPage.checkRotation('transform: scale(1, 1) rotate(0deg) translate(0px, 0px);'); - - await viewerPage.clickRotateRightButton(); - await viewerPage.checkRotation('transform: scale(1, 1) rotate(90deg) translate(0px, 0px);'); - await viewerPage.clickCloseButton(); }); diff --git a/lib/core/i18n/en.json b/lib/core/i18n/en.json index 2be7dd9f94..897f844d17 100644 --- a/lib/core/i18n/en.json +++ b/lib/core/i18n/en.json @@ -384,8 +384,9 @@ "ZOOM_IN": "Zoom in", "ZOOM_OUT": "Zoom out", "FIT_PAGE": "Fit page", - "ROTATE_LEFT": "Rotate left", - "ROTATE_RIGHT": "Rotate right", + "ROTATE": "Rotate", + "SAVE": "Save", + "CANCEL": "Cancel", "RESET": "Reset", "THUMBNAILS": "Document thumbnails", "THUMBNAILS_PANLEL_CLOSE": "Close thumbnails panel" diff --git a/lib/core/package.json b/lib/core/package.json index adb2fd2723..fe0aa52e7a 100644 --- a/lib/core/package.json +++ b/lib/core/package.json @@ -26,6 +26,7 @@ "@alfresco/js-api": "4.4.0-3371", "@alfresco/adf-extensions": "4.3.0", "@ngx-translate/core": ">=13.0.0", + "cropperjs": "1.5.11", "minimatch-browser": ">=1.0.0", "moment": ">=2.22.2", "pdfjs-dist": ">=2.3.200" diff --git a/lib/core/viewer/components/img-viewer.component.html b/lib/core/viewer/components/img-viewer.component.html index 522b74f27c..3210cfc550 100644 --- a/lib/core/viewer/components/img-viewer.component.html +++ b/lib/core/viewer/components/img-viewer.component.html @@ -1,18 +1,9 @@ -