* remove deprecated file

* [ACA-1904] Language labels (#879)

* [ACA-2083] reset router cache on login/logout (#867)

* reset router cache on login/logout

* Update src/app/app.routes.strategy.ts

Co-Authored-By: DenysVuika <denys.vuika@gmail.com>

* merge suggestion

* [ACA-2083] reset content filters on logout

* [ACA-2083] unit tests

* [ACA-2067] Side navigation - highlight element with children only when not expanded (#880)

* highlight parent element condition

* update test

* e2e

* add context menu (#881)

* [ACA-2107] upgrade to ADF latest beta (#882)

* [ACA-2107] upgrade ADF to latest beta

* fix adf sidenav class name

* [ACA-2107] update is-selected to adf-is-selected

* [ACA-2107] add 'adf' prefix to classes name

* [ACA-2107] remove ADF duplicate css style

* [ACA-2107] use 'adf-full-width' class

* [ACA-2107] add 'adf' prefix

* [ACA-1928] e2e improvements - part1 (#883)

* refactor Mark as favourite tests
rename method to be more clear
create separate methods for some checks and actions

* forgot some changes

* refactor delete-undo tests

* some more refactoring

* fix

* [ACA-1928] e2e improvements - part2 (#884)

* refactor Mark as favourite tests
rename method to be more clear
create separate methods for some checks and actions

* forgot some changes

* refactor delete-undo tests

* some more refactoring

* fix

* small improvements / refactoring

* upgrade 3rd party dependencies (#886)

* upgrade 3rd party dependencies

* update datepicker

* update code

* remove duplicated strings, use ADF instead (#887)

* extension recommendations

* [ACA-1558] cache busting for index.html (#888)

* use dynamic columns from ADF (#889)

* upgrade to latest ADF 3.0.0 alpha

* migrate to ADF column components

* use dynamic column from ADF

* fix e2e tests

* [ACA-2122] automatic code formatting on commit (#890)

* [ACA-2120] update library toolbar (#891)

* [ACA-2131] fix leave library icon for context menu

* remove moment-es6 usage (#892)

* [ACA] Create Library - switch to ADF component (#893)

* use adf component

* fix component name locator

* update extension registration docs

* fix SSO defaults

* fix pre-commit issue with partial commits

* [ACA-2116] search results available actions (#895)

* add item.id to File Libraries

* add method to wait for node to be indexed

* create separate methods in queries API to wait for sites or wait for nodes

* improvements, renaming

* renaming

* fix

* add tests for actions on search results

* add wait and use new method

* fix

* another fix

* use correct method

* more fixes

* create method for clickView button

* fixes

* no message

* unified format for viewer sub-menus (#901)

* unified format for viewer sub-menus

* fix tests

* update prettier

* [ACA-2157] Added basic ABN metadata (#902)

* upgrade to latest JS-API and ADF (#896)

* improved update script and latest ADF libs

* upgrade to latest js-api and ADF

* upgrade tests

* update viewer code

* use @alfresco/js-api

* update to latest adf

* fix deprecation issues

* update viewer

* fix copy/move dialog

* change expect

* fix remove site from favorites

* fix unit test

* update adf version

* use ADF upload dialog

* [ACA-820] add tests for Copy content (#899)

* add tests for Copy content

* fix

* forgot some ids

* update expected favorites number

* support for SSO settings (#905)

* [ACA-2157] Fixed structure, markup and links (#904)

* [ACA-2157] Added brief description and updated links

* [ACA-2157] Fixed broken image URL

* [ADF-2157] Added YAML index file for ABN (#903)

* [e2e] new reporter (#906)

* try new reporter

* run specific suite for testing purposes

* change folder output for report

* more report settings

* remove fdescribe

* remove package and update package-lock

* remove disabled tests not needed by the new reporter

* try to identify cause of travis failure

* run only specific tests for investigation purpose

* remove sleep and increase retry delay

* try a different fix

* revert to previous fix

* try different expects

* call different js-api method

* remove parameter not needed anymore

* upgrade dependencies (#907)

* add tests for Move content (#908)

* [ACA-213] Edit Offline (#909)

* WRITE_LOCK evaluator

* evaluate actions for WRITE_LOCK

* edit offline action

* DL icon for WRITE_LOCK files

* edit offline directive

* custom name column

* localisation

* toggle offline edit extension

* move takeUntil operator

* add tooltip

* better selector to differentiate Edit folder from Edit Offline

* default to empty object for null properties object

* isPersonalFiles evaluator

* isLibraryFiles evaluator

* isLibraryFiles evaluator

* isPersonalFiles evaluator

* update canEditLockedFile rule

* upgrade libraries (#910)

* upgrade libraries

* fix breaking changes

* fix divider

* remove header workarounds

* update repository to 6.1.2-ga, SSO example (#914)

* remove old compose, update to 6.1.2-ga

* SSO with vanilla keycloak

* [ACA-2162] allow custom icons with navbar (#917)

* allow custom icons with navbar

* fix breaking change

* update protractor settings

* pin typescript version, regenerate lock file

* [ACA-2168] auto-generate licenses for docker image (#918)

* auto-generate licenses for docker image

* update version label

* make app agnostic

* [ACA-213] Edit Offline - permissions (#911)

* edit offline action rules

* unlock node error message

* update extensions rules

* lock unlock evaluators

* LockNodeDirective over EditOfflineDirective

* disable tests failing cause of unrelated bug

* isUserWriteLockOwner over isUserWriteLock

* fix lock icon for retina displays

* [ACA-2164] Node version action (#916)

* export upload effects and actions

* remove node version effect and action

* remove node version theme

* change old version manager implementation

* get node info from store selection

* upload version dialog container

* node version form

* update app module

* upload version effect and action

* update version action

* internationalization

* refresh on upload version

* remove old implementation tests

* remove adf-version-manager dialog implementation

* revert adf version component

* fix viewer version action

* [ACA-2160] add tests for Edit offline actions availability (#921)

* add tests for Edit offline actions availability

* fix delete / undo delete tests

* Keensoft AOS extension (#920)

* aos extension

* update karma

* lint improvements and fixes

* update script

* update scripts

* update scripts

* reduce about 56.4 kB of polyfills for modern browsers

* deficated aosHost value to have AOS on separate servers

* context menu and toolbar

* visibility evaluator

* code improvements and fixes

* support locking, lock checks

* [ACA-2193] Lock node - unlock after new version is uploaded (#924)

* unlock node api call

* unlock action and effect

* unlock node after version upload

* check if locked

* clear version input on dialog cancel event

* update viewer on node version upload

* update viewer on file upload delete

* test

* update tests

* update tests

* rename evaluators

* update docs

* minor script improvements

* update AOS extension docs and version

* update package configuration for AOS ext

* update AOS extension details

* Search on mobile opens Sidemenu (#929)

* Added a check for mobile pages to prevent sidemenu opening

* [ACA-2200] Upgrade to 3.0.0-beta9 ADF (#931)

* upgrade to latest ADF 3.0.0-alpha

- remove selectedFacetQueries check
- renamed hasPermission from ADF ContentService to hasAllowableOperations

* update to ADF 3.0.0-beta9

* [ACA-2200] mincount workaround

- until we get the fix for the facet update issue (ADF-3401)

* [ACA-2171] enable copy and move to library tests (#933)

* [ACA-2198 ACA-2206]  Node version - align dialog with XD (#937)

* make comment field not required

* make Minor default version option

* tests

* fix form version options label

* test form state on initialization

* [ACA-2210] Version Dialog - update button text (#939)

* dialog action buttons text to uppercase

* dialog text Cancel over Close

* update translation reference

* [ACA-213] Upload Version - version options use boolean values (#940)

* version form data interface

* subscribe value data type

* use form data  boolean value

* update tests

* [ACA-2208] Hide app menu on swipe (#934)

* mobile: hide app menu on swipe left

* check for mobile screen size

* space for click out on small devices

* added test

* fix test

* [ACA-2199] Upload Version - granular permission   (#938)

* canUploadVersion evaluator

* change upload version action rule

* update docs

* simplify condition

* unit tests and code fixes

* [ACA-2211] auth guard: add support for withCredentials (#942)

* auth guard: add support for withCredentials

* formatting fixes

* remove fdescribe

* [ACA-2204] Upgrade to ADF 3.0.0 release (#949)

* upgrade to ADF 3.0.0

* update unit tests

* disable versioning tab in info drawer (#941)

* [ACA-213] Version Dialog - tests (#948)

* enable Esc action to close dialog

* version dialog form tests

* test fix

* [ACA-2193] Upload new content version - unsubscribe upload event (#925)

* remove console log

* unsubscribe upload event after new version

* unit tests

* update AOS extension to ADF 3.0.0

* Upgrade libs (#952)

* update libs

* remove i18n workaround

* node locking  enhancements and fixes (#955)

* optimize image resolver

* allow previewing locked files

* allow selecting locked nodes

* fix comments and metadata tabs

* improved lock checks

* remove obsolete "experimental" directive

* [ACA-2177] Actions - rearrange actions order  (#922)

* rearange actions

* remove separator duplication

* don't show last divider element

* update e2e

* update e2e

* Update toolbar-single-selection.test.ts

remove fdescribe

* move comment as well

* edit folder locator

* edit folder action

* edit folder action from toolbar more menu

* edit folder context menu id

* dont render versions tab

* [ACA-2199] fix Upload New Version action availability (#959)

* fix Upload New Version action availability

* update unit tests

* remove workaround

* add catch for tests failing on Bamboo

* add new line

* add tests for Upload New Version (#960)

* remove separator between Favorite and Edit folder (#963)

* [ACA-2221] Lock node - check selection is not null (#966)

* check selection is not null

* test

* add tests for downloading a single file (#967)

* [ACA-833] automate tests for download as zip (#968)

* add tests for downloading a single file

* automate tests for download as zip

* [ACA-2216] Shared link preview - use extension actions (#964)

* isSharedFileViewer evaluator

* navigation evaluators tests

* update docs

* fallback for SharedLink entry

* shared link view use extensions

* rules for link shared view actions

* dedicated extension definition for shared link action toolbar

* resolve selection and actions

* update tests

* remove un used imports

* nest shared link viewer toolbar actions in to viewer structure

* [ACA-2180] Viewer toolbar - rearrange actions layout (#962)

* merge action in toolbar submenu

* viewer add info drawer action

* toggle infoDrawer extension action

* hide viewer toolbar info drawer action

* fix typo

* allow to  unsubscribe from infoDrawerOpened event

* [ACA-2207] Upload Dialog - restore previous version on delete (#951)

* restore version over delete node

* apply prettier

* clean up unnecessary dependencies

* remove style file

* set CANCEL status on on deleted node version instances

* Update upload.module.ts

remove extra licence text

* fix typo

* remove duplicate strings

* [ACA-2212] allow "edit in office" only for basic auth (#971)

* allow AOS only for basic auth for now

* bump aos extension version

* [ACA-2208] Hide app menu on swipe (#970)

* [ACA-2220] simple "search in fields" support (#972)

* simple "search in fields" support

* unit tests

* add separator (#974)

* [ACA-2222] add e2e tests for pagination on Favorite Libraries (#969)

* add tests for pagination on Favorite Libraries

* add TestRail ids
add tests for pagination for empty page and single page

* Delete package-lock.json

* Revert "Delete package-lock.json"

This reverts commit 41eba0c57532373d87d454372273b54ba00e880a.

* restore package-lock

* [ACA-2219] support more precise searching (#976)

* support more precise searching

* exact term matching

* remove fdescribe

* update docs

* [ACA-1259] automate remaining tests for sidebar (#977)

* automate remaining tests for sidebar

* formatting

* reload active doclist via NgRx actions (#978)

* doclist reload action and effect

* deprecate folderEdited event

* deprecate "favoriteToggle" event

* deprecate "favoriteRemoved" event

* update docs

* unified reload function

* deprecate "nodesRestored" event

* deprecate "nodesPurged" event

* test fixes

* deprecate "nodesMoved" event

* reduce the use of "nodesDeleted"

* [ACA-2229] run aca nginx as non-root (#979)

* run aca nginx as non-root

* remove edit permissions from html folder

* [ACA-2229] docker security fixes (#980)

* docker permission fixes

* remove index.html edit permissions

* support repository info with app state (#984)

* [ACA-2214] Sharing URL being constructed from ECM Host incorrectly (#981)

* fix baseShareUrl defaults

* allow controlling full path

* unit test

* update tomcat settings

* use single slash

* simplify documentation

* [ACA-2194] better custom aspects in metadata tab (#985)

* better custom aspects in metadata tab

* update test

* fix lockby position (#986)

* compatibility matrix (#989)

* [ACA-2228] Add PipeModule to AppTestingModule (#993)

- fixes unit tests after upgrade to 3.1.0-beta4

* responsive breadcrumb (#990)

* [ACA-2239] initial localisation support for AOS extension (#988)

* setup i18n for aos extension

* translate action names, generic icon

* unit tests and bug fixes

* use AOS testing with CI

* [ACA-2242] add old style back (#994)

fixes missing buttons styles issue until ADF 3.1.0 will fix it

* upgrade libs to latest versions (#996)

* Windows compatibility

* [ACA-2195] fix redirect on login after page reload (#997)

* fix build script for Windows

* update evaluator docs, workspace snippet (#995)

* add missing docs and code hints

* update app evaluator docs and code hints

* fix route url special characters (#1000)

* revert change for AOS related to lock owners

* [ACA-2215] toggle search filter (#998)

* support for toggling search filter

* update docs

* disable e2e test

* update e2e

* [ACA-2133] fix application ready event for kerberos (#1002)

* fix application ready event for kerberos

* format file

* spellcheck fixes

* hide AOS when in trashcan

* fix broken test

* [ACA] Search - show error message on error (#1003)

* show error message

* remove fdescribe

* add documentation on SSO, minor docs fixes (#1005)

* menu filter disabled items (#1009)

* 1.7.0

* [ACA-2261] improve UX on search input (#1004)

* Remove search on change

- search call would be triggered only on submit or on option change

* clicking search icon triggers search

* caches user changes for a possible future search

* caches non-empty user changes for a possible future search

* close search options menu on submit

* update queryBuilder and navigate to new search url

* add setting to enable/disable searching after typing on search input

* fix double search call

* Apply suggestions from code review

- custom name to distinguish between ADF and ACA settings

Co-Authored-By: suzanadirla <dirla.silvia.suzana@gmail.com>

* [ACA-2264] fix loading on search (#1011)

- do nothing on null built query

* readme update

* update readme

* [ACA-1627] add automated tests for Comments (#1012)

* bump runtime version for core extension

* json schema fixes

* [ACA-2260] Open in Office - action breaks application in IE (#1014)

* ie office luncher workaround

* open office without location navigation

* check instance before remove

* various bug fixes (#1010)

* various bug fixes

* use 'remove favorite' label where appropriate

* fix toggle favorite component labels

* e2e type check and fixes

* favorite library label

* support toggle favorite component selectors

* update tests

* update e2e tests

* update e2e

* e2e update

* update e2e

* [ACA-2259] Edit in Microsoft Office - check update permissions (#1015)

* [ACA-2259] Edit in Microsoft Office - check update permissions

* [ACA-2259] check update permissions - unit tests

* [ACA-2259] refactor - check allowableOperationsOnTarget from service

* [ACA-2259] add back check only on target for SharedFiles

* [ACA-2259] SharedLinks are not folders

* type-safe api for node permissions

* workaround for shared files

* use hasOwnProperty function

* fix visibility evaluation for create menu (#1017)

* [ACA-2270] allow add comments on folder (#1018)

* [ACA-2270] allow add comments on folder

* [ACA-2270] fix return on else

* [ACA-2270] add unit tests

* update translations (#1023)

* assert file extension validity first (#1025)

* hide empty metadata by default (#1024)

* update copyright year (#1022)

* update copyright year

* forgot a file

* update year on licence header

* extensions flag inside settings page

* support "disabled" rules for Viewer extensions

* set relevance descending by default (#1027)

* [ACA-2284] Shared Link - Error when trying to download a shared file (#1026)

* shared link content download action

* use same action and effect

* call appropriate api baes on location

* remove unused property

* remove unneeded divider from toolbar (#1028)

* use LTS node.js (#1031)

* Update README.md (#1032)

* Update README.md

* Update README.md

* Update introduction-to-extending.md

* Update search-results.md (#1034)

* Update document-list-layout.md (#1035)

* Update README.md (#1033)

* Update README.md (#1036)

* [ACA-2299] fix search error translation (#1030)

* fix search error translation

* fix translation fallback

* remove fdescribe
This commit is contained in:
Denys Vuika
2019-03-22 14:51:40 +00:00
committed by GitHub
parent 95f19c3dc6
commit c8b99b9d29
562 changed files with 29670 additions and 22477 deletions

View File

@@ -1,4 +1,6 @@
---
Title: Extending
Github only: true
---
# Extending

View File

@@ -1,8 +1,11 @@
---
Title: Actions
---
# Actions
Below are the details of the JSON properties that are used to define actions.
| Name | Description |
| -- | -- |
| **id** | Unique identifier. |

View File

@@ -1,10 +1,13 @@
---
Title: Application Actions
---
# Application Actions
Application is using NgRx (Reactive libraries for Angular, inspired by Redux).
To get more information on NxRx please refer to the following resources:
The app uses **NgRx** (Reactive libraries for Angular, inspired by Redux)
to implement application actions.
For more information on NgRx, please refer to the following resources:
- [Comprehensive Introduction to @ngrx/store](https://gist.github.com/btroncone/a6e4347326749f938510)
@@ -40,10 +43,8 @@ export class MyService {
You can invoke every application action from the extensions, i.e. buttons, menus, etc.
<p class="tip">
Many of the actions take currently selected nodes if no payload provided.
**Tip:** Many of the actions take currently selected nodes if no payload provided.
That simplifies declaring and invoking actions from the extension files.
</p>
In the example below, we create a new entry to the "NEW" menu dropdown
and provide a new `Create Folder (plugin1)` command that invokes the `CREATE_FOLDER` application action.
@@ -75,42 +76,48 @@ and perform document list reload if needed.
Below is the list of public actions types you can use in the plugin definitions as a reference to the action:
| Name | Payload | Description |
| -- | -- | -- |
| SET_CURRENT_FOLDER | Node | Notify components about currently opened folder. |
| SET_CURRENT_URL | string | Notify components about current browser URL. |
| SET_USER_PROFILE | Person | Assign current user profile. |
| TOGGLE_INFO_DRAWER | n/a | Toggle info drawer for the selected node. |
| ADD_FAVORITE | MinimalNodeEntity[] | Add nodes (or selection) to favorites. |
| REMOVE_FAVORITE | MinimalNodeEntity[] | Removes nodes (or selection) from favorites. |
| DELETE_LIBRARY | string | Delete a Library by id. Takes selected node if payload not provided. |
| CREATE_LIBRARY | n/a | Invoke a "Create Library" dialog. |
| SET_SELECTED_NODES | MinimalNodeEntity[] | Notify components about selected nodes. |
| DELETE_NODES | MinimalNodeEntity[] | Delete the nodes (or selection). Supports undo actions. |
| UNDO_DELETE_NODES | any[] | Reverts deletion of nodes (or selection). |
| RESTORE_DELETED_NODES | MinimalNodeEntity[] | Restores deleted nodes (or selection). Typically used with Trashcan. |
| PURGE_DELETED_NODES | MinimalNodeEntity[] | Permanently delete nodes (or selection). Typically used with Trashcan. |
| DOWNLOAD_NODES | MinimalNodeEntity[] | Download nodes (or selections). Creates a ZIP archive for folders or multiple items. |
| CREATE_FOLDER | string | Invoke a "Create Folder" dialog for the opened folder (or the parent folder id in the payload). |
| EDIT_FOLDER | MinimalNodeEntity | Invoke an "Edit Folder" dialog for the node (or selection). |
| SHARE_NODE | MinimalNodeEntity | Invoke a "Share" dialog for the node (or selection). |
| UNSHARE_NODES | MinimalNodeEntity[] | Remove nodes (or selection) from the shared nodes (does not remove content). |
| COPY_NODES | MinimalNodeEntity[] | Invoke a "Copy" dialog for the nodes (or selection). Supports undo actions. |
| MOVE_NODES | MinimalNodeEntity[] | Invoke a "Move" dialog for the nodes (or selection). Supports undo actions. |
| MANAGE_PERMISSIONS | MinimalNodeEntity | Invoke a "Manage Permissions" dialog for the node (or selection). |
| MANAGE_VERSIONS | MinimalNodeEntity | Invoke a "Manage Versions" dialog for the node (or selection). |
| NAVIGATE_URL | string | Navigate to a given route URL within the application. |
| NAVIGATE_ROUTE | any[] | Navigate to a particular Route (supports parameters). |
| NAVIGATE_FOLDER | MinimalNodeEntity | Navigate to a folder based on the Node properties. |
| NAVIGATE_PARENT_FOLDER | MinimalNodeEntity | Navigate to a containing folder based on the Node properties. |
| NAVIGATE_LIBRARY | string | Navigate to library. |
| SEARCH_BY_TERM | string | Perform a simple search by the term and navigate to Search results. |
| SNACKBAR_INFO | string | Show information snackbar with the message provided. |
| SNACKBAR_WARNING | string | Show warning snackbar with the message provided. |
| SNACKBAR_ERROR | string | Show error snackbar with the message provided. |
| UPLOAD_FILES | n/a | Invoke "Upload Files" dialog and upload files to the currently opened folder. |
| UPLOAD_FOLDER | n/a | Invoke "Upload Folder" dialog and upload selected folder to the currently opened one. |
| VIEW_FILE | MinimalNodeEntity | Preview the file (or selection) in the Viewer. |
| PRINT_FILE | MinimalNodeEntity | Print the file opened in the Viewer (or selected). |
| FULLSCREEN_VIEWER | n/a | Enters fullscreen mode to view the file opened in the Viewer. |
| LOGOUT | n/a | Log out and redirect to Login screen. |
| Name | Payload | Description |
| ---------------------- | ------------------- | ----------------------------------------------------------------------------------------------- |
| SET_CURRENT_FOLDER | Node | Notify components about currently opened folder. |
| SET_CURRENT_URL | string | Notify components about current browser URL. |
| SET_USER_PROFILE | Person | Assign current user profile. |
| TOGGLE_INFO_DRAWER | n/a | Toggle info drawer for the selected node. |
| ADD_FAVORITE | MinimalNodeEntity[] | Add nodes (or selection) to favorites. |
| REMOVE_FAVORITE | MinimalNodeEntity[] | Removes nodes (or selection) from favorites. |
| DELETE_LIBRARY | string | Delete a Library by id. Takes selected node if payload not provided. |
| CREATE_LIBRARY | n/a | Invoke a "Create Library" dialog. |
| SET_SELECTED_NODES | MinimalNodeEntity[] | Notify components about selected nodes. |
| DELETE_NODES | MinimalNodeEntity[] | Delete the nodes (or selection). Supports undo actions. |
| UNDO_DELETE_NODES | any[] | Reverts deletion of nodes (or selection). |
| RESTORE_DELETED_NODES | MinimalNodeEntity[] | Restores deleted nodes (or selection). Typically used with Trashcan. |
| PURGE_DELETED_NODES | MinimalNodeEntity[] | Permanently delete nodes (or selection). Typically used with Trashcan. |
| DOWNLOAD_NODES | MinimalNodeEntity[] | Download nodes (or selections). Creates a ZIP archive for folders or multiple items. |
| CREATE_FOLDER | string | Invoke a "Create Folder" dialog for the opened folder (or the parent folder id in the payload). |
| EDIT_FOLDER | MinimalNodeEntity | Invoke an "Edit Folder" dialog for the node (or selection). |
| SHARE_NODE | MinimalNodeEntity | Invoke a "Share" dialog for the node (or selection). |
| UNSHARE_NODES | MinimalNodeEntity[] | Remove nodes (or selection) from the shared nodes (does not remove content). |
| COPY_NODES | MinimalNodeEntity[] | Invoke a "Copy" dialog for the nodes (or selection). Supports undo actions. |
| MOVE_NODES | MinimalNodeEntity[] | Invoke a "Move" dialog for the nodes (or selection). Supports undo actions. |
| MANAGE_PERMISSIONS | MinimalNodeEntity | Invoke a "Manage Permissions" dialog for the node (or selection). |
| MANAGE_VERSIONS | MinimalNodeEntity | Invoke a "Manage Versions" dialog for the node (or selection). |
| NAVIGATE_URL | string | Navigate to a given route URL within the application. |
| NAVIGATE_ROUTE | any[] | Navigate to a particular Route (supports parameters). |
| NAVIGATE_FOLDER | MinimalNodeEntity | Navigate to a folder based on the Node properties. |
| NAVIGATE_PARENT_FOLDER | MinimalNodeEntity | Navigate to a containing folder based on the Node properties. |
| NAVIGATE_LIBRARY | string | Navigate to library. |
| SEARCH_BY_TERM | string | Perform a simple search by the term and navigate to Search results. |
| SNACKBAR_INFO | string | Show information snackbar with the message provided. |
| SNACKBAR_WARNING | string | Show warning snackbar with the message provided. |
| SNACKBAR_ERROR | string | Show error snackbar with the message provided. |
| UPLOAD_FILES | n/a | Invoke "Upload Files" dialog and upload files to the currently opened folder. |
| UPLOAD_FOLDER | n/a | Invoke "Upload Folder" dialog and upload selected folder to the currently opened one. |
| UPLOAD_FILE_VERSION | n/a | Invoke "New File Version" dialog. |
| VIEW_FILE | MinimalNodeEntity | Preview the file (or selection) in the Viewer. |
| UNLOCK_WRITE | NodeEntry | Unlock file from read only mode |
| PRINT_FILE | MinimalNodeEntity | Print the file opened in the Viewer (or selected). |
| FULLSCREEN_VIEWER | n/a | Enters fullscreen mode to view the file opened in the Viewer. |
| LOGOUT | n/a | Log out and redirect to Login screen. |
| RELOAD_DOCUMENT_LIST | n/a | Reload active document list |
| TOGGLE_SEARCH_FILTER | n/a | Toggle Filter component visibility in Search Results. |
| SHOW_SEARCH_FILTER | n/a | Show Filter component in Search Results. |
| HIDE_SEARCH_FILTER | n/a | Hide Filter component in Search Results |

View File

@@ -1,4 +1,5 @@
---
Title: Application Features
---
# Application Features
@@ -30,7 +31,6 @@ All the customizations are stored in the `features` section of the configuration
"contextMenu": [],
"viewer": {
"toolbarActions:": [],
"toolbarMoreMenu:": [],
"openWith": [],
"content": []
},
@@ -117,9 +117,7 @@ You can populate the menu with an extra entries like in the example below:
Please refer to the [Content Actions](/extending/application-features#content-actions) section for more details on supported properties.
<p class="tip">
It is also possible to update or disable existing entries from within the external extension files. You will need to know the `id` of the target element to customize.
</p>
**Tip:** It is also possible to update or disable existing entries from within the external extension files. You will need to know the `id` of the target element to customize.
## Navigation Bar
@@ -235,21 +233,19 @@ The example above renders two tabs:
All corresponding components must be registered for runtime use.
<p class="tip">
See the [Registration](/extending/registration) section for more details
**Tip:** See the [Registration](/extending/registration) section for more details
on how to register your own entries to be re-used at runtime.
</p>
### Tab properties
| Name | Description |
| ------------- | ----------------------------------------------------------- |
| **id** | Unique identifier. |
| **component** | The main [component](/extending/components) to use for the route. |
| **title** | Tab title or resource key. |
| icon | Tab icon |
| disabled | Toggles disabled state. Can be assigned from other plugins. |
| order | The order of the element. |
| Name | Description |
| ------------- | ----------------------------------------------------------------- |
| **id** | Unique identifier. |
| **component** | The main [component](/extending/components) to use for the route. |
| **title** | Tab title or resource key. |
| icon | Tab icon |
| disabled | Toggles disabled state. Can be assigned from other plugins. |
| order | The order of the element. |
### Tab components
@@ -378,7 +374,6 @@ Viewer component in ACA supports the following extension points:
"viewer": {
"content": [],
"toolbarActions:": [],
"toolbarMoreMenu:": [],
"openWith": []
}
}
@@ -425,6 +420,22 @@ Every custom component receives the following properties at runtime:
| url | string | File content URL. |
| extension | string | File name extension. |
#### Rules
You can also provide a rule for the `disabled` state.
That allows to provide conditional availability for Viewer extensions based on external factors.
```json
{
"id": "app.viewer.pdf",
"fileExtension": "png",
"component": "app.components.tabs.metadata",
"rules": {
"disabled": "isViewerDisabled"
}
}
```
### Toolbar actions
The default toolbar actions from the ACA viewer can be customized through extensions to be replaced, modified or disabled.
@@ -451,15 +462,13 @@ New viewer toolbar actions can also be added from the extensions config:
"visible": "app.toolbar.versions"
}
}
],
"toolbarMoreMenu": [...]
]
}
}
}
```
The ADF Viewer component allows you to provide custom entries for the `More` menu button on the toolbar.
The ACA provides an extension point for this menu that you can utilize to populate custom menu items:
You can also provide sub-menus:
```json
{
@@ -469,19 +478,27 @@ The ACA provides an extension point for this menu that you can utilize to popula
"features": {
"viewer": {
"toolbarActions": [...],
"toolbarMoreMenu": [
"toolbarActions": [
{
"id": "app.viewer.share",
"order": 300,
"title": "Share",
"icon": "share",
"actions": {
"click": "SHARE_NODE"
},
"rules": {
"visible": "app.selection.file.canShare"
}
"id": "app.toolbar.more",
"type": "menu",
"order": 10000,
"icon": "more_vert",
"title": "APP.ACTIONS.MORE",
"children": [
{
"id": "app.viewer.share",
"order": 300,
"title": "Share",
"icon": "share",
"actions": {
"click": "SHARE_NODE"
},
"rules": {
"visible": "app.selection.file.canShare"
}
}
]
}
]
}
@@ -532,69 +549,72 @@ As with other content actions, custom plugins can disable, update or extend `Ope
## Content metadata presets
The content metadata presets are needed by the [Content Metadata Component](https://alfresco.github.io/adf-component-catalog/components/ContentMetadataComponent.html#readme) to render the properties of metadata aspects for a given node.
The content metadata presets are needed by the [Content Metadata Component](https://www.alfresco.com/abn/adf/docs/content-services/content-metadata-card.component/) to render the properties of metadata aspects for a given node.
The different aspects and their properties are configured in the `app.config.json` file, but they can also be set on runtime through extension files.
Configuring these presets from `app.extensions.json` will overwrite the default application setting.
Configuring these presets from `app.extensions.json` will overwrite the default application setting.
Settings them from custom plugins allows user to disable, update or extend these presets.
Check out more info about merging extensions [here](/extending/extension-format#merging-properties).
The `content-metadata-presets` elements can be switched off by setting the `disabled` property.
This can be applied also for nested items, allowing disabling down to aspect level.
This can be applied also for nested items, allowing disabling down to aspect level.
<p class="tip">
In order to modify or disable existing entries, you need to know the id of the target element, along with its parents ids.
</p>
**Tip:** In order to modify or disable existing entries, you need to know the id of the target element, along with its parents ids.
Your extensions can perform the following actions at runtime:
* Add new presets items.
* Add new items to existing presets at any level.
* Disable specific items down to the aspect level.
* Modify any existing item based on id.
- Add new presets items.
- Add new items to existing presets at any level.
- Disable specific items down to the aspect level.
- Modify any existing item based on id.
Regarding properties, you can either:
* Add new properties to existing aspect, or
* Redefine the properties of an aspect.
Review this code snippet to see how you can overwrite the properties for `exif:exif` aspect from an external plugin:
```json
{
"$schema": "../../../extension.schema.json",
"$version": "1.0.0",
"$name": "plugin1",
"features": {
"content-metadata-presets": [
{
"id": "app.content.metadata.custom",
"custom": [
{
"id": "app.content.metadata.customGroup",
"items": [
{
"id": "app.content.metadata.exifAspect",
"disabled": true
},
{
"id": "app.content.metadata.exifAspect2",
"aspect": "exif:exif",
"properties": [
"exif:orientation",
"exif:manufacturer",
"exif:model",
"exif:software"
]
}
]
}
]
}
]
}
}
```
This external plugin disables the initial `exif:exif` aspect already defined in the `app.extensions.json` and defines other properties for the `exif:exif` aspect.
- Add new properties to existing aspect, or
- Redefine the properties of an aspect.
Review this code snippet to see how you can overwrite the properties for `exif:exif` aspect from an external plugin:
```json
{
"$schema": "../../../extension.schema.json",
"$version": "1.0.0",
"$name": "plugin1",
"features": {
"content-metadata-presets": [
{
"id": "app.content.metadata.custom",
"custom": [
{
"id": "app.content.metadata.customGroup",
"items": [
{
"id": "app.content.metadata.exifAspect",
"disabled": true
},
{
"id": "app.content.metadata.exifAspect2",
"aspect": "exif:exif",
"properties": [
"exif:orientation",
"exif:manufacturer",
"exif:model",
"exif:software"
]
}
]
}
]
}
]
}
}
```
This external plugin disables the initial `exif:exif` aspect already defined in the `app.extensions.json` and defines other properties for the `exif:exif` aspect.
Here is the initial setting from `app.extension.json`:
```json
...
"content-metadata-presets": [
@@ -630,8 +650,7 @@ Here is the initial setting from `app.extension.json`:
]
...
```
<p class="tip">
In order to allow the content-metadata presets to be extended, the settings from `app.config.json` must be copied to the `app.extensions.json` file and its ids must be added to all the items.
```
**Tip:** In order to allow the content-metadata presets to be extended, the settings from `app.config.json` must be copied to the `app.extensions.json` file and its ids must be added to all the items.
Having ids allows external plugins to extend the current setting.
</p>

View File

@@ -1,4 +1,5 @@
---
Title: Components
---
# Components

View File

@@ -1,11 +1,14 @@
---
Title: Creating custom evaluators
---
# Creating custom evaluators
Rule evaluators are plain JavaScript (or TypeScript) functions that take `RuleContext` references and an optional list of `RuleParameter` instances.
Application provides a special [RuleEvaluator](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app/extensions/rule.extensions.ts#L30) type alias for evaluator functions:
Application provides a special
[RuleEvaluator](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/extensions/src/lib/config/rule.extensions.ts)
type alias for evaluator functions:
```ts
export type RuleEvaluator = (context: RuleContext, ...args: any[]) => boolean;
@@ -22,7 +25,7 @@ export function hasSelection(
}
```
The `context` is a reference to a special instance of the [RuleContext](https://github.com/Alfresco/alfresco-content-app/blob/master/src/app/extensions/rule.extensions.ts#L32) type,
The `context` is a reference to a special instance of the [RuleContext](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/extensions/src/lib/config/rule.extensions.ts) type,
that provides each evaluator access to runtime entities.
```ts
@@ -62,7 +65,5 @@ extensions.setEvaluators({
Now, the `plugin1.rules.hasSelection` evaluator can be used as an inline rule reference,
or part of the composite rule like `core.every`.
<p class="tip">
See the [Registration](/extending/registration) section for more details
**Tip:** See the [Registration](/extending/registration) section for more details
on how to register your own entries to be re-used at runtime.
</p>

View File

@@ -1,4 +1,5 @@
---
Title: Extensibility features
---
# Extensibility features

View File

@@ -1,4 +1,5 @@
---
Title: Extension format
---
# Extension format
@@ -24,11 +25,9 @@ The format is represented by a JSON file with the structure similar to the follo
## Schema
You can find the JSON schema at the project root folder: [extension.schema.json](https://github.com/Alfresco/alfresco-content-app/blob/master/extension.schema.json).
You can find the JSON schema at the project root folder: [extension.schema.json](../../extension.schema.json).
<p class="tip">
The Schema allows you to validate extension files, provides code completion and documentation hints.
</p>
**Tip:** The Schema allows you to validate extension files, provides code completion and documentation hints.
```json
{
@@ -53,10 +52,8 @@ The order of declaration defines the order of loading.
}
```
<p class="warning">
All extension files are merged together at runtime.
**Note:** All extension files are merged together at runtime.
This allows plugins to overwrite the code from the main application or to alter other plugins.
</p>
## Startup behavior
@@ -68,10 +65,8 @@ For the sake of speed the files are loaded in parallel, however once everything
After all the external files are fetched, the `Loader` sorts them, removes the metadata properties and stacks the resulting JSON objects on top of each other.
<p class="tip">
Any top-level property name that starts with the `$` symbol is considered metadata and does not participate in the merge process.
**Tip:** Any top-level property name that starts with the `$` symbol is considered metadata and does not participate in the merge process.
That allows a plugin to carry extra information for maintenance and visualisation purposes, for example: `$name`, `$version`, `$description`, `$license`, etc.
</p>
### Merging properties
@@ -111,10 +106,8 @@ Final result:
Note that as a result we have two unique properties `plugin1.key` and `plugin2.key`,
and also a `plugin1.text` that was first defined in the `Plugin 1`, but then overwritten by the `Plugin 2`.
<p class="tip">
JSON merging is a very powerful concept as it gives you the ability to alter any base application settings,
**Tip:** JSON merging is a very powerful concept as it gives you the ability to alter any base application settings,
or toggle features in other plugins without rebuilding the application or corresponding plugin libraries.
</p>
### Merging objects
@@ -215,9 +208,7 @@ You can find more details in the [Disabling Content](/extending/extension-format
The extension `Loader` provides a special support for merging Arrays.
By default, two collections will be merged into a single array unless objects have `id` properties.
<p class="tip">
If array contains two objects with the same `id` property, the objects will be merged rather than appended.
</p>
**Tip:** If the array contains two objects with the same `id` property, the objects will be merged rather than appended.
Before: Plugin 1

View File

@@ -1,3 +1,7 @@
---
Title: Custom Icons
---
# Custom Icons
You can register and use custom `.svg` icons with toolbars, context menus, etc.

View File

@@ -1,4 +1,5 @@
---
Title: Redistributable libraries
---
# Redistributable libraries
@@ -121,10 +122,8 @@ Update the root `package.json` file and append the following entry to the `scrip
You can now use that script to build the library and copy assets to the output folder.
<p class="tip">
It is good practice to provide installation instructions for your library in the `README.md` file.
**Tip:** It is good practice to provide installation instructions for your library in the `README.md` file.
Be sure to mention that developers should have a build rule to copy your plugin definition file to the `assets/plugins` folder of the main application.
</p>
## Publishing library to NPM
@@ -155,9 +154,7 @@ npm install my-extension
This installs the library and all its dependencies.
<p class="warning">
You do not need to install the library in the original workspace as the application is already configured to use the local version from the `dist` folder.
</p>
**Note:** You do not need to install the library in the original workspace as the application is already configured to use the local version from the `dist` folder.
### Copy assets
@@ -222,6 +219,4 @@ npm start
Click the `My Extension` link and in the main content area you will see the extension component coming from your library.
<p class="warning">
Depending on the application setup, you may need enabling external plugins via the `Settings` dialog available for `admin` users (clicking the application profile button).
</p>
**Note:** Depending on the application setup, you may need enabling external plugins via the `Settings` dialog available for `admin` users (clicking the application profile button).

View File

@@ -1,4 +1,5 @@
---
Title: Registration
---
# Registration
@@ -16,7 +17,7 @@ and use the following snippet to register custom content:
import { ExtensionsModule, ExtensionService } from '@alfresco/adf-extensions';
@NgModule({
imports: [ ExtensionsModule.forChild() ]
imports: [ ExtensionsModule ]
declarations: [ MyComponent1, MyLayout ],
entryComponents: [ MyComponent1, MyLayout ]
})
@@ -41,13 +42,8 @@ export class MyExtensionModule {
}
```
Use `ExtensionsModule.forChild()` when importing into the child modules,
and `ExtensionsModule.forRoot()` for the main application module.
<p class="warning">
According to Angular rules, all components that are created dynamically at runtime
**Note:** According to Angular rules, all components that are created dynamically at runtime
need to be registered within the `entryComponents` section of the NgModule.
</p>
The Registration API is not limited to the custom content only.
You can replace any existing entries by replacing the values from your module.

View File

@@ -1,4 +1,5 @@
---
Title: Routes
---
# Routes
@@ -37,10 +38,8 @@ Use the `app.layout.main` value for the `layout` property to get the default app
with header, navigation sidebar and main content area.
You can register any component to back the `app.layout.main` value.
<p class="tip">
By default, the `app.layout.main` is used if you do not specify any custom values.
**Tip:** By default, the `app.layout.main` is used if you do not specify any custom values.
Use `blank` if you want your route component take the whole page.
</p>
You can define the full route schema like in the next example:

View File

@@ -1,10 +1,10 @@
---
Title: Rules
---
# Rules
Rules allow evaluating conditions for extension components.
For example, you can disable or hide elements based on certain rules.
Rules allow you to evaluate conditions for extension components, so you can disable or hide elements based on certain rules, for example.
Every rule is backed by a condition evaluator.
@@ -46,10 +46,8 @@ Rules can accept other rules as parameters:
}
```
<p class="tip">
You can also negate any rule by utilizing a `!` prefix:
**Tip:** You can also negate any rule by utilizing a `!` prefix:
`!app.navigation.isTrashcan` is the opposite of the `app.navigation.isTrashcan`.
</p>
It is also possible to use inline references to registered evaluators without declaring rules,
in case you do not need providing extra parameters, or chaining multiple rules together.
@@ -131,26 +129,31 @@ The button will be visible only when the linked rule evaluates to `true`.
## Application Evaluators
| Key | Description |
| ------------------------------- | ------------------------------------------------------------ |
| app.selection.canDelete | User has permission to delete selected node(s). |
| app.selection.canDownload | User can download selected node(s). |
| app.selection.notEmpty | At least one node is selected. |
| app.selection.canUnshare | User is able to remove selected node(s) from public sharing. |
| app.selection.canAddFavorite | User can add selected node(s) to favorites. |
| app.selection.canRemoveFavorite | User can remove selected node(s) from favorites. |
| app.selection.first.canUpdate | User has permission to update selected node(s). |
| app.selection.file | A single File node is selected. |
| app.selection.file.canShare | User is able to share the selected file. |
| app.selection.file.isShared | A shared node is selected |
| app.selection.file.isLocked | File is locked for editing |
| app.selection.library | A single Library node is selected. |
| app.selection.isPrivateLibrary | A private Library node is selected. |
| app.selection.hasLibraryRole | The selected Library node has a role property. |
| app.selection.hasNoLibraryRole | The selected Library node has no role property. |
| app.selection.folder | A single Folder node is selected. |
| app.selection.folder.canUpdate | User has permissions to update the selected folder. |
| repository.isQuickShareEnabled | Whether the quick share repository option is enabled or not. |
| Key | Description |
| ----------------------------------- | ------------------------------------------------------------ |
| app.selection.canDelete | User has permission to delete selected node(s). |
| app.selection.canDownload | User can download selected node(s). |
| app.selection.notEmpty | At least one node is selected. |
| app.selection.canUnshare | User is able to remove selected node(s) from public sharing. |
| app.selection.canAddFavorite | User can add selected node(s) to favorites. |
| app.selection.canRemoveFavorite | User can remove selected node(s) from favorites. |
| app.selection.first.canUpdate | User has permission to update selected node(s). |
| app.selection.file | A single File node is selected. |
| app.selection.file.canShare | User is able to share the selected file. |
| app.selection.file.isShared | A shared node is selected. |
| app.selection.file.isLocked | File is locked for editing. |
| app.selection.file.isLockOwner | File is locked and current user is the lock owner. |
| app.selection.file.canUploadVersion | User can update file version. |
| app.selection.library | A single Library node is selected. |
| app.selection.isPrivateLibrary | A private Library node is selected. |
| app.selection.hasLibraryRole | The selected Library node has a role property. |
| app.selection.hasNoLibraryRole | The selected Library node has no role property. |
| app.selection.folder | A single Folder node is selected. |
| app.selection.folder.canUpdate | User has permissions to update the selected folder. |
| app.selection.folder.canUpdate | User has permissions to update the selected folder. |
| app.selection.file.canLock | User has permissions to lock file. |
| app.selection.file.canUnlock | User has permissions to unlock file. |
| repository.isQuickShareEnabled | Whether the quick share repository option is enabled or not. |
## Navigation Evaluators
@@ -159,32 +162,34 @@ The application exposes a set of navigation-related evaluators to help developer
The negated evaluators are provided just to simplify development, and to avoid having complex rule trees just to negate the rules,
for example mixing `core.every` and `core.not`.
<p class="tip">
You can also negate any rule by utilizing a `!` prefix:
**Tip:** You can also negate any rule by utilizing a `!` prefix:
`!app.navigation.isTrashcan` is the opposite of the `app.navigation.isTrashcan`.
</p>
| Key | Description |
| --------------------------------- | ------------------------------------------------------- |
| app.navigation.folder.canCreate | User can create content in the currently opened folder. |
| app.navigation.folder.canUpload | User can upload content to the currently opened folder. |
| app.navigation.isTrashcan | User is using the **Trashcan** page. |
| app.navigation.isNotTrashcan | Current page is not a **Trashcan**. |
| app.navigation.isLibraries | User is using a **Libraries** page. |
| app.navigation.isNotLibraries | Current page is not a **Libraries** page. |
| app.navigation.isSharedFiles | User is using the **Shared Files** page. |
| app.navigation.isNotSharedFiles | Current page is not **Shared Files**. |
| app.navigation.isFavorites | User is using the **Favorites** page. |
| app.navigation.isNotFavorites | Current page is not **Favorites** |
| app.navigation.isRecentFiles | User is using the **Recent Files** page. |
| app.navigation.isNotRecentFiles | Current page is not **Recent Files**. |
| app.navigation.isSearchResults | User is using the **Search Results** page. |
| app.navigation.isNotSearchResults | Current page is not the **Search Results**. |
| Key | Description |
| --------------------------------- | ---------------------------------------------------------------- |
| app.navigation.folder.canCreate | User can create content in the currently opened folder. |
| app.navigation.folder.canUpload | User can upload content to the currently opened folder. |
| app.navigation.isTrashcan | User is using the **Trashcan** page. |
| app.navigation.isNotTrashcan | Current page is not a **Trashcan**. |
| app.navigation.isLibraries | User is using a **Libraries** or **Library Search Result** page. |
| app.navigation.isNotLibraries | Current page is not a **Libraries** page. |
| app.navigation.isSharedFiles | User is using the **Shared Files** page. |
| app.navigation.isNotSharedFiles | Current page is not **Shared Files**. |
| app.navigation.isFavorites | User is using the **Favorites** page. |
| app.navigation.isNotFavorites | Current page is not **Favorites**. |
| app.navigation.isRecentFiles | User is using the **Recent Files** page. |
| app.navigation.isNotRecentFiles | Current page is not **Recent Files**. |
| app.navigation.isSearchResults | User is using the **Search Results** page. |
| app.navigation.isNotSearchResults | Current page is not the **Search Results**. |
| app.navigation.isSharedPreview | Current page is preview **Shared Files**. |
| app.navigation.isFavoritesPreview | Current page is preview **Favorites**. |
| app.navigation.isSharedFileViewer | Current page is shared file preview page. |
| app.navigation.isPreview | Current page is **Preview**. |
| app.navigation.isPersonalFiles | Current page is **Personal Files**. |
| app.navigation.isLibraryFiles | Current page is **Library Files**. |
<p class="tip">
See [Registration](/extending/registration) section for more details
**Tip:** See the [Registration](/extending/registration) section for more details
on how to register your own entries to be re-used at runtime.
</p>
### Example

View File

@@ -1,8 +1,11 @@
---
Title: Tutorials
---
# Tutorials
Below are some short tutorials that cover common tasks.
## Custom route with parameters
In this tutorial, we are going to implement the following features: