* [ADF-2914] support for number range patterns (#3282)

* support for number range patterns

* fix memory leak for tag actions

* [ADF-2824] Reviewed docs for core and content services (#3290)

* [ADF-2824] Reviewed card view docs

* [ADF-2824] Reviewed doc for core and content services

* [ADF-2824] Added class name exception to prop script

* [ADF-2843] added tooltip for create new folder and edit folder icons … (#3286)

* [ADF-2843] added tooltip for create new folder and edit folder icons from Content Service

* [ADF-2843] added translation for tooltip

* Update content-metadata.component.md

* [ADF_NOISSUE] Fix styling and sidenav layout fixes (#3291)

* Fix styling and sidenav layout fixes

* Revert packagr conflicting mods

* [ADF-2905] Added JSDocs for process services (#3292)

* [ADF-2905] Added JSDocs for process services

* [ADF-2905] Added missing return value in tasklist service

* [ADF-2916] number range form validator added (#3279)

* number range form validator added

* tests added

* [ADF-2626] added preserved state functionality for sidenav component (#3278)

* [ADF-2626] added preserved state functionality for sidenav component

* [ADF-2626] changed logic for preserving the sidenav component state

* [ADF-2626] added missing curly brace }

* [ADF-2626] small changes on logic based on pr comments

* [ADF-2843] added tooltip for create folder and edit folder icons from Content Services

* Revert "[ADF-2843] added tooltip for create folder and edit folder icons from Content Services"

This reverts commit d5a7abb65b.

* [ADF-2626] changed casting

* [ADF-2626] updated documentation with event

* [ADF-2626] removed app-config pipe because it was not being used

* [ADF-2328] filtering support for facets and categories (#3293)

* filtering support for facets and categories

* fix tests

* update variable names

* [ADF-2973] Angular pipe to get application configuration settings (#3301)

* app config pipe

* update docs

* [ADF-2849] Search Date Range - Set the format of the date from config (#3288)

* format date chosen from the datePicker's calendar

* format date on focusout event

* fix tests & some code refactoring

* more validation messages

* unit tests

* fix typecast error

* move "dateFormat" to be part of the "date range" widget settings block

* fix error on Moment

"...Type 'moment.Moment' is not assignable to type 'moment.Moment'. Two different types with this name exist, but they are unrelated.
          Property 'isLocal' is missing in type 'Moment'..."

* moment - use old version

* change script - use recent version of moment

* Added the working-with-nodes-api-service tutorial. (#3295)

* [ADF-2826] added a check for duplicate permission add (#3265)

* [ADF-2556] first step to create add people or group to permissions

* [ADF-2556] creating a dialog with user results

* [ADF-2556]
integrated service for add and remove permission from node

* [ADF-2556] fixed behaviour and style for add user group

* [ADF-2556] added some refactoring for dialog service

* [ADF-2556] refactoring the dependencies of the components

* [ADF-2556] added some fix and a new key for dialog

* [ADF-2556] start adding test for node permission service

* [ADF-2556] added test for add permission panel component

* [ADf-2556] adding tests for new add permission component

* [ADF-2556] fixed tests and added documentation

* [ADF-2556] fixed documentation for add-node components

* [ADF-2556] added peer review changes

* [ADF-2826] added a check for duplicate permission add

* [ADF-2826] removed fdescribe

* [ADF-2826] applied peer review changes

* [ADF-2930] general purpose "Empty Page" component (#3296)

* empty content component

* fix selector name

* style fixes

* cleanup code

* docs for empty content

* update docs

* update docs

* use typography for icon

* layout fixes for Login (ported from ACA)

* fix aot crash

* fix tslint error and add and block if tslint give error in the pipeline

* [ADF-2892] Sidenav now prevents closing itself when ESC key is pressed (#3302)

* [ADF-2892] Sidenav now closes when clicking outside of it

* [ADF-2892] Sidevan now prevents closing itself when ESC key is pressed

* Fix for a technical bug, which prevents the proper usage of the expanded output event. (#3304)

* [ADF-NO-PRIVATE] renoved private property which breaks AOT (#3305)

* [ADF-2975] New input for File Upload Button component (#3299)

* new nodeType input

* unit tests

* content type fix

* remove package-lock.json files

* [ADF-2699] added localisation for time ago pipe (#3298)

* [ADF-2699] added localisation to the time-ago pipe

* [ADF-2699] added lang to time ago pipe

* [ADF-2699] added localisation for time ago pipe

* [ADF-2699] removed fdescribe

* [ADF-2699] removed comments

* [ADF-2699] removed useless default values

* fix css scope for search filter

* fix aot error

* fix ID show rancher script update

* Addition to the preparation of the environment. (#3306)

* Added the working-with-nodes-api-service tutorial.

* Added the 'Alfresco Example Content Application' paragraph to the 'Preparing the development environment' tutorial.

* [ADF-2843] added tooltips for all the buttons in toolbar (#3297)

* [ADF-2843] added tooltip for create new folder and edit folder icons from Content Service

* [ADF-2843] added translation for tooltip

* [ADF-2843] added tooltips for all the buttons in toolbar

* [ADF-2843] discard package-lock

* [ADF-2832] discard changes to package-lock

* [ADF-2843] discarded changes from package-lock

* [ADF-2843] added tooltip for list view button

* [ADF-2912] added group everyone as constant result for add permissions (#3266)

* [ADF-2556] first step to create add people or group to permissions

* [ADF-2556] creating a dialog with user results

* [ADF-2556]
integrated service for add and remove permission from node

* [ADF-2556] fixed behaviour and style for add user group

* [ADF-2556] added some refactoring for dialog service

* [ADF-2556] refactoring the dependencies of the components

* [ADF-2556] added some fix and a new key for dialog

* [ADF-2556] start adding test for node permission service

* [ADF-2556] added test for add permission panel component

* [ADf-2556] adding tests for new add permission component

* [ADF-2556] fixed tests and added documentation

* [ADF-2556] fixed documentation for add-node components

* [ADF-2556] added peer review changes

* [ADF-2912] added group everyone as constant result for add permissions

* [ADF-2912] readded jsdoc

* fix search filter styles (#3313)

* [ADF-2978] added a check when locally set permission is undefined (#3307)

* [ADF-2969] Moved doc tools to new tools folder (#3314)

* [ADF-2969] Moved doc tools to new tools folder

* [ADF-2969] Added files missing from schematic

* [ADF-2969] Added missing files to schematic

* [ADF-2813] set default sorting (#3311)

* [ADF-2891] decoupled search service love (#3312)

* Added the tutorial 'Creating your JavaScript application using alfresco-js-api'. (#3310)

* Added the working-with-nodes-api-service tutorial.

* Added the 'Alfresco Example Content Application' paragraph to the 'Preparing the development environment' tutorial.

* Added the tutorial 'Creating your JavaScript application using alfresco-js-api'.

* Added the image of the tutorial.

* Typo in 'creating-javascript-app-using-alfresco-js-api.md'

Typo in 'Prerequisites'.

* Typos in 'creating-javascript-app-using-alfresco-js-api.md'

Two small typos.

* Wrong sentence in 'creating-javascript-app-using-alfresco-js-api.md'

...into Angular applications, but it is "framework agnostic".

* Typo on 'creating-javascript-app-using-alfresco-js-api.md'.

...and Angular...

* [ADF-2888] UX doesn't respect the Sidenav specifiactions (#3303)

* [ADF-2771] Sidebar action menu component - UX review

* Add a input property to set the width of sidebar-action-menu.

* [ADF-2888]  UX doesn't respect the Sidenav specifiactions

* Add a input property to set the width of sidebar-action-menu.

* remove search configuration enforcement (#3315)

* [ADF-2986] try to pick the start value from local storage before the standard default (#3318)

* [ADF-2912] group everyone is always visible even for no search result (#3316)

* [ADF-2826] fixed wrong parsing for error message (#3317)

* [ADF-2739] Improved breadcrumb logic (#3287)

* [ADF-2739] Long names in breadcrumb fixed

* [ADF-2739] Updated styles

* [ADF-2739] Fixing @mixin for breadcrumb

* [ADF-2739] Waiting for changes in demo-shell

* [ADF-2739] Fixed @mixin

* [ADF-2739] Fixed issue related to breadcrumb position

* [ADF-2739] Improved ngOnChanges call for breadcrumb

* [ADF-2739] Fixed issues with lint

* [ADF-2739] Removed comment in dropdown breadcrumb component file

* [ADF-2739] Changed recalculateNodes method from public to protected

* pipeline-update (#3309)

* deploy PR script

* [ADF-2967] fixed create new task navigation (#3322)

* [ADF-2967] fixed create new task navigation

* [ADF-2967] removed extra variables

* [ADF-2967] removed unused methods

* [ADF-2961] support for protocol substition in app config files (#3324)

* support for protocol substition in app config files

* Update app-config.service.spec.ts

* Update app-config.service.spec.ts

* [ADF-2925] Required and invalid validators added (#3277)

* test added

* tests clean

* test added

* tslint clean

* test name changed

* update tests

* Added the tutorial 'Working with the Nodes API Service'. (#3319)

* [ADF-2979] Updated props script to avoid copying missing JSDocs (#3327)

* [ADF-2979] Updated tools to ignore blank JSDocs for inputs/outputs

* [ADF-2979] Bug fixes for handling missing tables, etc

* [ADF-2989] updated documentation with multiple node example (#3328)

* [ADF-2503] conditional visibility for content actions (#3325)

* conditional visibility for content actions

* fix typo

* workaround for "target: all"

* [ADF-2821] move module sidebar action menu (#3321)

* move module sidebar action menu

* fix core import test

* remove sidebar module

* skip error

* skiperror old versions

* [ADF-2995] Permissions - Consumer should be able to upload a new version for his file on a private site (#3326)

* check node permission instead of parent

* tests

* Fix sidenav action icons (#3331)

* Only the username form control should be emitted (#3333)

* about component (#3337)

* [ADF-2563] Improve versioning functionality (#3335)

* change input with textarea

* update file version use now the update content API

* provide way to test read only mode version list

* fix test

* test fix

* [ADF-2997] The meaning of the range fields is not clear (#3338)

* [ADF-2997] restrict 'to' field not to allow dates in the future

* [ADF-2997] more clear labels for start and end date fields

the translation team will decide what will be the best values for the date fields

* [ADF-3000] Update the documentation by adding the steps of date format custom configuration. (#3339)

* [ADF-3028] i18n support for title service (#3342)

* i18n support for title service

* cleanup tests

* update tests

* fixed constraint for viewer name width (#3343)

* (demo shell) login css fixes (#3344)

* [ADF-1997] override custom form widgets by default (#3346)

* override custom form widgets by default

* update tests

* [ADF-2979] Updated doc tools to avoid erasing MD docs with blank JSDocs in services (#3347)

* [ADF-2979] Update to ignore blank JSDocs for method signature

* [ADF-2979] Finished adding blank JSDoc check for services

* [ADF-2131] Search sorting (#3334)

* sorting configuration

* detect primary sorting and use with document list

* search results sorting

* docs update

* unit tests and code updates

* update code

* update code

* generic sorting picker, test updates

* ability to switch off client side sorting

* update docs for document list

* [ADF-2884] Task List - Custom apps display all tasks (#3329)

* [ADF-2884] Handled filterParam input change
Changed component selector

* [ADF-2884] Modified/Added tests

* [ADF-2884] Deprecated old selectors

* [ADF-2884] Added deprecated version

* [ADF-2884] Improved filter finding condition

* update project permissions change

* [ADF-2984] Show date invalid message on search date range picker (#3323)

* [ADF-2984] Show date invalid message on search date range picker

* [ADF-2984] test that required format is displayed when date input is invalid

* [ADF-2984] More space above buttons

* dummy commit

* restore deleted breadcrumb code

* [ADF-2753] New error component (#3336)

* [ADF-1938] Overflowing text in reports section fidex

* [ADF-1938] Long names in report section now fit

* [ADF-1938] Reverted changes in container widget

* [ADF-2753] New error component created

* [ADF-2753] Unit test for Error Content Component

* Deleting unused files

* Deleting unused files

* Deleting unused files

* [ADF-2753] Documentation added

* [ADF-2753] Fixed minor bugs

* [ADF-2753] Authentication not needed to view error

* add error handler

* tslint fix

* router app component

* remove unused import

* fix import modules

* limit to 404

* destroy fixture after any test

* misspelling error

* breadcrumb bug fixes (#3348)

* [ADF-2726] fixed save content for external repository (#3341)

* [ADF-2726] start fixing the show of files loaded from CS

* [ADF-2726] start fixing the show of files loaded from CS

* [ADF-2726] fixed save content for external repository|

* [ADF-2726] fixed save content for external repository|

* [ADF-2726] reeanabled and fixed the tests

* [ADF-2726] reeanabled and fixed the tests

* [ADF-2726] added tests for attach file widget and activiti alfresco service

* [ADF-2726] added tests for attach file widget and activiti alfresco service

* [ADF-2726] fixed test

* fix like test

* fix typo in the resource key (#3352)

* fix failing tests replace ajax with spy

* remove fdescribe

* [ADF-3040] Replaced doc template engine to fix whitespace issues (#3356)

* replace jasmine ajax with spy in rating tests

* fix breadcrumb align in object picker (#3353)

* fix no content node display (#3351)

* Broken links and missing images for two tutorials. (#3357)

* Broken links and missing images for two tutorials.

* Replaced .html with .md extensions

Replaced .html with .md extensions.

* Typo in Prerequi(si)tes

Typo in Prerequi(si)tes.

* [ADF-2988] fix logo change (#3362)

* [ADF-3055] fix bug with page size for facet fields (#3359)

* fix bug with page size for facet fields

* move page size to a constant

* move const inside the scope

* test fixes

* [ADF-2923] button type added (#3358)

* button type added

* remove unnecessary code

* [ADF-2608] added a fix to handle selection on slow connection problem (#3350)

* [ADF-2608] added a fix to handle selection on slow connection problem

* [ADF-2608] fixed test for datatable

* Added an import command to the 'Adding a new view' tutorial. (#3366)

* remove redundant logic (#3361)

* [ADF-2679] Reviewed latest tutorial content (#3371)

* [ADF-2679] Initial review of new tutorial content

* [ADF-2679] Reviewed the latest tutorials

* [ADF-2679] Initial review of new tutorial content

* [ADF-2679] Reviewed the latest tutorials

* [ADF-2832] Demo-shell, Fix Task filter dropdown menu alignment (#3294)

* [ADF-2832] changed height to auto for task filter dropdown header

* [ADF-2832] change selector with classes

* [ADF-2832] changed selector

* [ADF-2832] removed unnecessary css

* [ADF-2832] added class and changed selector

* [ADF-2832] added adf-prefix

* [ADF-2927] search filter enhancements (#3365)

* search filter enhancements

* reset button for facet queries

* update code and tests

* remove unused type

* restore code missing after rebase

* [ADF-2764] Updated doc files with latest script features (#3368)

* [ADF-2764] Updated doc files with latest script features

* [ADF-2764] Rebuilt full index instead of just content services index

* [ADF-2985] Demo shell - Provide an easy way to test the security issue (#3354)

* Provide an easy way to test the security issue

* use logService

* first part random test fix (#3376)

fixing random test executions first part

* fix form radio test

* [ADF-3065] TaskList component - Deprecate the processDefinitionKey (#3369)

* Deprecate the processDefinitionKey property.
remove unused tasklist code. It was needed with the old pagination component

* Remove nosense test

* Use adf version

* [ADF-2999] readded form validation icon (#3367)

* [ADF-2999] readded form validation icon

* [ADF-2999] fixed broken test

* Added the tutorial 'Basic theming'. (#3378)

* [ADF-2854] Fix demoshell task/process filter and routing (#3360)

* Fix demoshell task/process filter and routing

* Use the correct js api model

* Fix unit test

* search filter now remembers original user query (#3384)

* [ADF-2319] added a check for delete checklist button (#3382)

* [ADF-2238] removed created by property (#3380)

* [ADF-2238] removed created by property

* [ADF-2238] added a condition to avoid checklist delete for completed task

* Revert "[ADF-2238] added a condition to avoid checklist delete for completed task"

This reverts commit fc2227ea04.

* bold font for checked boxes (#3381)

* [ADF-2774] fixed message bus, background and language dropdowns that were hidden by the toolbar (#3379)

* [ADF-2764] Applied new doc tool features to core library (#3383)

* [ADF-2824] Added and reviewed some content services docs (#3385)

* revert changes (#3387)

* Added the 'Content metadata component' tutorial. (#3386)

* update package settings and lock file (#3389)

* minor layout fix for search facet buttons

* [ADF-2857] fixed message for date and date time widget (#3370)

* [ADF-2764] Updated process services docs with latest features (#3390)

* [ADF-2977] made language change persistenr (#3373)

* [ADF-3041] TaskList Component - Empty State issue. (#3345)

* [DW-635] Empty State Component

* [DW-635] Empty State Component

* [DW-635] Empty state Issue

* [DW-635] Use empty state component and custom empty directive

* [ADF-3041] Documentation for TaskList Component - Empty State issue.

* [ADF-3088] move sorting picker to a separate module (#3396)

* move sorting picker to a separate module

* update translation mock

* [ADF-3087] Clarified section about adding/replacing keys in i18n guide (#3392)

* [ADF-3087] Clarified section about adding/replacing keys

* [ADF-3087] Corrected information in i18n and translation service docs

* [ADF-3068] ADF Sidenav/Toolbar - Ux background colour review (#3401)

* [ADF-2824] Reviewed docs for new components in 2.4 (#3400)

* [ADF-3042] Use the custom date adapter from adf-core on Search Date Range widget (#3394)

-fix localization
-fix tests
-show parse error

* [ADF-3053] breadcrumb fixes (#3406)

* translate breadcrumb root in demo shell

* optional "max items" feature and style fixes

* should not be restricted by default

* style updates

* toolbar and breadcrumb layout fixes

* breadcrumb demo and testing page

* full toolbar scenario

* fix translation issue with the dropdown and custom root

* a11y fixes

* fix issue with duplicate id, remove unused attribute

* [ADF-2627] Icons-only mode for Info Drawer (#3398)

* tab with icon

* docs

* test

* add option without login docker publish

* fix publish script

* move docker push outside login

* fix random test failing part 2 (#3395)

* fix random failing test core search/comment/auth/user

* fix node delete directive

* fix lint issues

* node restore fix

* fix comment test

* remove fdescribe

* fix tests and tslint

* fix upload test

* unsubscribe success event task test

* copy comment object during test

* use the data pipe performance improvement and standard usage

* uncomment random test

* fix comment date random failing test

* disposable unsubscribe

* fix start process

* remove fdescribe

* change start process test and remove commented code

* fix error event check double click

* clone object form test

* refactor date time test

* fix service mock

* fix test dropdown and context

* git hook lint

* fix language test

* unsubscribe documentlist event test

* fix disposable error

* fix console log service error document list

* unusbscribe search test

* clear input field

* remove wrong test

* [ADF-2754] People Widget - Refactoring style and logic (#3349)

* observable logic added

* tests added & bug fixed

* onkeyup removed

* isValidUser method removed

* tslint fix

* test added

* comments fixed

* check if input value is string

* remove console log err from document list test

* [ADF-3082] Task Filter - Custom Task filters don't work (#3402)

* [ADF-3082] Custom Task filters don't work.

* Added an sorting input to the datatable.
* Updated documentation for the recent changes.
* Added testcases for the recent changes.

* [ADF-3082] Custom Task filters don't work

* Added a sorting input to the datatable
* Added testcases to the recent changes.
* Updated doc for the recent changes.

* * Refactored task/process list dataSort.

* * Refactored process/task list datasort method

* remove console log error from version list and content node selector test stubbing necessary method

* [ADF-3041] - Task List Empty State Issue (#3408)

* fix demo shell gallery view switch (#3413)

* [ADF-2541] reset datatable selection when rows are changed from code (#3410)

* reset selection when rows are replaced from code

* code fixes

* unit test updates

* visualise selection count for testing purposes

* make row selection api public

* remove question mark from the event name

* remove pdfviewer thumbnail console log test error

* fix conflict link creation id (#3412)

*  [ADF-2753] Error Component throwing default error fixed (#3364)

* [ADF-1938] Overflowing text in reports section fidex

* [ADF-1938] Long names in report section now fit

* [ADF-1938] Reverted changes in container widget

* [ADF-2753] New error component created

* [ADF-2753] Unit test for Error Content Component

* Deleting unused files

* Deleting unused files

* Deleting unused files

* [ADF-2753] Documentation added

* [ADF-2753] Error Component throwing default error fixed

* [ADF-2753] White space removed

* [ADF-2753] Removed unnecessary files and updated trnaslation file

* [ADF-2753] Changed link for button in error component

* [ADF-2753] Updated doc file

* [ADF-2753] Removed fdescribe

* [ADF-2753] Improved code coverage

* fix error AppTitle service test log

* fix gallery view demo shell route

* [ADF-3095] ability to intercept, pause and resume upload process (#3416)

* prevent and resume upload process

* upload fixes and confirmation dialog demo

* ability to toggle the upload confirmation demo

* fix tests

* unit tests

* docs update

* remove deprecation

* fix test name

* [ADF-2698] Date and time Widget - UTC vs local time issue (#3393)

* [ADF-2698] Date and time Widget - UTC vs local time issue

* [ADF-2698] add unit test to check that the format for min and max values is correct

* [ADF-2698] test behavior

* [ADF-3102] added lazy loading for tab content to fix animations (#3418)

* [ADF-2764] Fixed union type display glitches in property tables (#3419)

* [ADF-2764] Test commit to fix handling of union types in Github docs

* [ADF-2764] Fixed union type error in component docs

* [ADF-2593] z-index fix for search bar (#3409)

* [ADF-2593]

* [ADF-2593] Removed unnecessary style attributes

* [ADF-3111] pagination is not showed when automation test are running (#3420)

* [ADF-3108] Search - facetQueries panel renders when not defined in configuration (#3417)

* show facetQueries based on configuration definition

* tests

* FacetQueries is defined

* [ADF-3039] Task List - Enanchement (#3404)

* * Created DataColumnSchemaAssembler component to get column schema from html and app.config.json
* Removed column related  method  from tasklist.

* * Removed data property from the tasklist component
* Using rows input property instead of data input property of the datatable

* *  Renamed  DataColumnSchemaAssembler to DataTableSchema
* Refactored DataTableSchema component

* * Changed schem property into an  input schemaColumns property  in dataTable component

* * Added selectFirstRow input property to select a first row of datatable
* Removed unnecessary method from tasklist component

* * Added test case for the recent changes
* Added mock object for the tasklist spec

* * Added testcases for recent changes in the datatable component

* * Updated datatable and tasklist document for the recent changes

* * Refactored process-service and task list component
* Updated datatable document.

* [ADF-3039] Task List - Enanchement
* Changed schemaColumn name to columns
* Updated datatable documentation.
*  data input Annotated  with @deprecated in the tasklist component

* * Added an sorting input to the datatable.
* Updated datatable and tasklist documentation
* Added method to get current sorting order.

* * After rebasing

* * Revert  sorting changes

* * After rebase

* * fixed conflicts

* * Fixed failing testcase after rebased.

* update toolbar docs (#3423)

* Add custom data holder for CardViewItems (#3422)

* [ADF-3115] a11y fixes (#3424)

* a11y fixes for search input

* a11y fixes for pagination

* a11y fixes for content actions

* [ADF-3118] translation support for notification service (snackbars) (#3427)

* translation support for snackbar

* unit tests

* [ADF-2438] fixed thumbnails height (#3407)

* [ADF-2438] calculate thumbnail height

* [ADF-2438] send height to parent element

* [ADF-2438] add width to css

* [ADF-2438] moved height and width logic to parent component

* [ADF-2438] added height and width logic to parent component

* [ADF-2438] fixed failing test

* demo translation for search radio

* [ADF-2710] removed default shared link creation at the opening (#3430)

* [ADF-2999] added a way to test the validation icon on demo shell (#3431)

* [ADF-2754] People component tests fixed and style improvement (#3414)

* tests fixed and style

* show people test fixed

* error message test fixed

* [ADF-3131] fix selection order for DT/DL (#3433)

* fix selection order for DT/DL

* remove fit

* [ADF-3066] ProcessList Component - Empty State issue. (#3434)

* [ADF-3093] Added style checking tool for en.json translation file (#3428)

* [ADF-3093] Started li18nt VS Code extension

* [ADF-3093] Started work on UI style lint tool for VSCode

* [ADF-3093] Added UI style rules up to sg0006

* [ADF-3093] Added remaining style rules

* [ADF-3093] Added docs and command line tool

* [ADF-3093] Removed Microsoft notices and updated licences to Apache-2.0

* [ADF-3133] Fixed inconsistency in doc example (#3436)

* [ADF-2753] Fixed routing and second button showing up (#3421)

* [ADF-1938] Overflowing text in reports section fidex

* [ADF-1938] Long names in report section now fit

* [ADF-1938] Reverted changes in container widget

* [ADF-2753] New error component created

* [ADF-2753] Unit test for Error Content Component

* Deleting unused files

* Deleting unused files

* Deleting unused files

* [ADF-2753] Documentation added

* [ADF-2753] Removed unnecessary files and updated trnaslation file

* []

* [ADF-2753] Fixed routing and second button showing up

* [ADF-2753] Fixed typo

* [ADF-2753] Fixed view loading before variables

* [ADF-2753] Missing whitespace

* [ADF-2753] Added test for route params

* [ADF-2753] Changed getData function name to getTranslations

* [ADF-fix date widget test] Fixing a randomly failing test (#3439)

* group uploaded files into single batch, IE fixes (#3438)

* [ADF-3067] App-list Empty State. (#3432)

* extend demo shell upload example to button

* [ADF-2764] Added new type linker features and applied them to core docs (#3442)

* [ADF-2764] Added basic support for composite and external types

* [ADF-2764] Added new type linker features and applied to core docs

* notification service demo and testing area (#3443)

* notification service demo and testing area

* fix typo

* fix viewer title style (#3445)

* [ADF-3132] TaskList empty state doesn't respect the specification (#3440)

* [ADF-3134] fix increasing search calls issue (#3444)

* [ADF-2764] Applied new type linker features to content services docs (#3446)

* [ADF-3062] dual api support for Favorites (#3447)

* dual api support for Favorites

* unit test

* ADF-2974] New Buttons Menu component version (#3429)

* [ADF-2974] Buttons injected from parent html component

* [ADF-2974] New version of buttons menu component

* [ADF-2974] Updated unit tests

* [ADF-2974] Updated documentation

* [ADF-2974] Removed unused variable

* [ADF-2974] Fixed failing test at analytics report parameters

* [ADF-2974] Removed fdescribe

* [ADF-2974] Moved mock inside testing file for buttons menu component

* extend breadcrumb testing page (demo shell)

* [ADF-3142] Added missing info about 'remember me' in login docs (#3448)

* [ADF-3120] fixed sorting for tasklist and process list (#3435)

* [ADF-3120] fixed sorting for tasklist and process list

* [ADF-3120] removed commented code

* [ADF-3120] fixing another randomly failing test

* [ADF-2764] Applied new type linker features to proc services docs (#3449)

* (demo shell) fix memory leak with search results

* [ADF-2795] SSO implicitflow (#3332)

* Enable OAUTH2

* Create SSO services

* SSO improvements

* Rollback sso login change

* Add SSO configuration from Setting component

* Refactoring

* Remove login ECM/BPM toggle and move use the userpreference instead of store

* fix host setting unit test

* Fix unit test missing instance

* use the Js api oauth

* add logout component and clean sso not used class

* fix dependencies cicle

* add translation settings

* fix style setting page

* clean

* JS APi should receive the oauth config from the userPreference and not from the config file

* change login if SSO is present

* missing spaces

* add sso test in login component

* add logout directive new properties test

* Improve host setting and remove library reference

* fix login test

* Remove unused code

* Fix authentication unit test

* fix authguard unit test

* fix csrf check login component

* fix unit test core and demo shell

* remove

* simple filtering for datatable (#3453)

* [ADF-3150] Moved all doc tool config settings to doctool.config.json (#3455)

* [ADF-3150] Moved undoc stoplist to doc config file

* [ADF-3150] Moved config to doctools.config.json and removed obsolete scripts

* fixes for memory leaks and multiple subscriptions (#3456)

* fix content action memory leaks

* memory leak fixes for demo shell

* [no-issue] error image resolver mimetype should not be part of datatable (#3415)

* move error image custom logic form datatable to documentlist

* change travis

* [fix-test-log] added optional function to data row interface

* [no-issue] fixed datatable tests

* [no-issue] fixing tests

* [ADF-2859] conditional evaluation of disabled state for content actions (#3450)

* react on [disabled] binding changes

* [disabled] binding updates for context menu items

* evaluating disabled state with a function

* unit test

* restore original description

* remove irrelevant test

* fix tests

* fix test

* remove not used events in demo shell host setting components

* [ADF-3156] App config default ALL (BPM and ECM) provider (#3460)

* Use as default provider ALL (BPM and ECM)

* Default host OAUTH

* removing wrong fdescribe (#3461)

* [ADF-3123] removed default choice for the first radio button (#3462)

* Fix host component (#3463)

* [ADF-2824] Doc review and minor changes to review checker tool (#3466)

* restore historical selection order (#3467)

* restore historical selection order

* fix test

* [ADF-2859] fixes for the conditional visibility and disabled states (#3465)

* fixes for the conditional visibility and disabled states

* update docs

* cleanup code

* remove unused code

* [LOC-61] i18n 2.4.0 (#3468)

* i18n 2.4.0

* missing part

* revert development config

* [ADF-3144] Error component displayed when closing file viewer in process tab (#3469)

* [ADF-3173] [Task List] - Empty list message is not translated (#3471)

* Added a missing translation keys.

* Fix dropdown panel in viewer toolbar  because of z-index (#3472)

* [ADF-3162] Setting component - Should be able to render the providers passed as input (#3464)

* Be able to change the available providers values

* Add deprecated tag

* add default providers

* Fix empty OAuth and selected providers
Improve the documentation

* Fix BPM guard to check SSO condition

* Add the oauthConfig again

* SSO or Basic otpion auth setting change

* fix host settings sso/basic
add login documentation

* remove test string

* fix auth guard test

* dispose upload emitter test events

* remove space

* exclude failing test

* Update ADF packages version 2.4.0-beta13 (#3475)

* [ADF-2824] Reviewed search docs for 2.4 (#3477)

* [ADF-2824] Moved search widget docs into separate pages

* [ADF-2824] Separated search widget page and added search filter service docs

* [ADF-2824] Updated new search docs with doc tools

* Remove unused field (#3480)

* Fix default SSO config not filled in (#3479)

* [ADF-3175] renabling upload on single target folder row (#3473)

* [ADF-3191] Not able to login only to BPM or ECM (#3478)

* disable random test

* host setting component reset JS-API

* reload api after user prefrence change

* remove replicate reset

* missing semicolon

* deprecate provider property

* remove trailing space

* check new value before to set

* [ADF-3198] Updated index files + minor doc updates (#3482)

* [ADF-3200] custom Extension filter - file with different extension is uploaded with drag and drop

* [ADF-3181] Auth Guard - redirect by string url (#3474)

* redirect by string url

* auth guard tests fix

* revise

* [ADF-3196] fixed task selection and double click (#3484)

* [ADF-3191] Fix userprefrence oauth2 (#3488)

* remove user preference setting save

* fix host setting test

* remove userPreferences test

* fix title service test

* remove unused imports

* restore input align

* fix service import in test tag rating

* [ADF-3210] Typo People Search (#3487)

* remove vscode changes

* [ADF-3196] [Task list / Process list] - The 'Task details' are not diplayed for the selected Task (#3483)

* [ADF-3196] [Task list / Process list] - The 'Task details' are not displayed for the selected Task

* * After rebase

* [ADF-3176] Fixed permissionsissue when editing metadata (#3476)

* [ADF-3217] reset previous search settings (#3490)

* reset previous search settings

* unit test

* remove fit

* [ADF-3196] fixed selection of first tasklist element (#3491)

* [ADF-3196] [Task list / Process list] - The 'Task details' are not displayed for the selected Task

* * After rebase

* [ADF-3196] fixed selection for fist element

* [ADF-3212] Upload version buttons wrapping fixed (#3492)

* Update ADF packages version 2.4.0-beta14 (#3493)

* demo shell host setting component login redirect after setting

* remove old auth test not  valid anymore

* fix translations (#3497)

* [ADF-3203] Fixed doc tools bugs from Linux run and added verbose option (#3496)

* [ADF-3912] Setting Component - Return as default BASIC authType (#3495)

* Return as default BASIC authType

* remove the commented line

* [ADF-3190] Fix rerendering issue with content-meta-data (#3494)

* Fix rerendering issue with content-meta-data

* Fix indentation

* [ADF-3198] Index and tutorial content review (#3500)

* [ADF-3198] Fixed glitches in doc index files and tools

* [ADF-3198] Reviewed new tutorial content and fixed index glitches

* [ADF-3198] Fixed host settings component brief description

* [ADF-3223] Restore message directive files fix (#3499)

* fix restore notification

* improve path specification property

* fix lint and document issues

* fix test

* remove unused import

* [ADF-3226] remove Double behaviour setting allow download and comment (#3502)

* fix restore notification

* improve path specification property

* fix lint and document issues

* fix test

* remove unused import

* remove double behavior allowComments and allowDonload can be set only thorough input property

* [ADF-3233] fixed demo shell filtering for files on drag&drop] (#3504)

* [ADF-3232] fixing retrieving for ecm user via site service (#3506)

* [ADF-3176] file content reload fixed (#3501)

* file content reload fixed

* refactoring & layout fix

* resolve indentation problems

* missing semicolon

* [ADF-3224] move ticket store logic in js-api (#3505)

* move ticket store logic in js-api

* remove space

* fix test

* fix tests

* [ADF-3212] Fixed permission issues when updating version (#3503)

* [ADF-3213] Fixed permission issues when updating version

* [ADF-3212] fixed test for PR

* allowableOperations include viewer get node

* update demo shell with metadata demo

* undo ADF-3176 changes

* fix login oauth cookie problem (#3508)

* fix login don't check the cookie in oauth2

* fix test

* check boolean storage

* fix provider check

* clean local storage before auth test

* fix missing pdf viewer update when scale is the same (#3510)

* [ADF-3239] Fixed deprecated property descriptions (#3509)

* [ADF-3239] Changed deprecated properties to include full description

* [ADF-3239] Updated deprecated properties of affected doc files

* [ADF-3239] Fixed badly formatted doc comment in tasklist

* [ADF-3229] people widget list reseted if empty input (#3507)

* list reseted when input is empty

* test added

* [ADF-3242] removed filter for string in example log component (#3511)

* [ADF-3242] removed filter for string in example log component

* [ADF-3242] added try catch for circular dependency objects

* [ADF-3242] added try catch and removed error message

* invalidate session in host setting internal component instead to logout

* remove unused import

* use i18n key for "Permission" label

* [ADF-3198] Final doc checks for release (#3513)

* [ADF-3198] Doc link check for release

* [ADF-3198] Updated main index doc page

* remove invalidation session because is concern of the js-api

* check 401 and redirect demo shell (#3516)

* [ADF-3248] fixed readonly status for people widget (#3512)

* [ADF-3248] fixed readonly status for people widget

* [ADF-3248] fixed test people widget

* [ADF-3248] added readonly test

* [ADF-3251] Authentication Service - Check if used loggedin based on the provider (#3515)

* check if loggedin based on the provider

* Fix unit tests

* remove 404 check in demo shell

* [ADF-3262] Remove avoidable css style from task/process list component (#3518)

* [ADF-3230] Changes to stop doc tools from updating files unnecessarily (#3519)

* [ADF-3230] Added basic change detector to doc tools

* [ADF-3230] Updates to type linker to fix before/after inconsistencies

* [ADF-3230] Fixed comparison error caused by adjacent text blocks

* [ADF-3230] Added basic change detector to doc tools

* [ADF-3230] Updates to type linker to fix before/after inconsistencies

* [ADF-3230] Fixed comparison error caused by adjacent text blocks

* [ADF-3230] Modified props tool to remove spaces from union types

* [ADF-3230] Made ToC tool before/after state consistent

* [ADF-3265] Updated index script to remove brief desc links (#3520)

* bump 2.4.0 version
This commit is contained in:
Eugenio Romano
2018-06-25 11:24:26 +01:00
committed by GitHub
parent c3db1c2ff8
commit f9658e2879
1054 changed files with 70758 additions and 16578 deletions

View File

@@ -15,6 +15,8 @@ that the component is complete and suitable for normal use. The other status lev
but is now obsolete and will probably be removed in a future version of ADF.
- **Experimental** ![](docassets/images/ExperimentalIcon.png) - The component is available for
experimentation but not fully complete and tested for production code.
- **Internal** ![](docassets/images/InternalIcon.png) - The component is available for
internal test use but not meant to be used in production
There is also a set of ADF tutorials that describe how to accomplish tasks step-by-step.
See the [Tutorials index](tutorials/README.md) for the full list.
@@ -55,6 +57,8 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [About component](core/about.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | This component allow you to have a general overview of the version of ADF installed and the status of the Content service and Process service. | [Source](../lib/core/about/about.component.ts) |
| [Buttons menu component](core/buttons-menu.component.md) | Displays buttons on a responsive menu. | [Source](../lib/core/buttons-menu/buttons-menu.component.ts) |
| [Card view component](core/card-view.component.md) | Displays a configurable property list renderer. | [Source](../lib/core/card-view/components/card-view/card-view.component.ts) |
| [Accordion group component](core/accordion-group.component.md) | Adds a collapsible panel to an accordion menu. | [Source](../lib/core/collapsable/accordion-group.component.ts) |
| [Accordion component](core/accordion.component.md) | Creates a collapsible accordion menu. | [Source](../lib/core/collapsable/accordion.component.ts) |
@@ -73,9 +77,12 @@ for more information about installing and using the source code.
| [Login component](core/login.component.md) | Authenticates to Alfresco Content Services and Alfresco Process Services. | [Source](../lib/core/login/components/login.component.ts) |
| [Infinite pagination component](core/infinite-pagination.component.md) | Adds "infinite" pagination to the component it is used with. | [Source](../lib/core/pagination/infinite-pagination.component.ts) |
| [Pagination component](core/pagination.component.md) | Adds pagination to the component it is used with. | [Source](../lib/core/pagination/pagination.component.ts) |
| [Host settings component](core/host-settings.component.md) | Validates the URLs for ACS and APS and saves them in the user's local storage | [Source](../lib/core/settings/host-settings.component.ts) |
| [Sidebar action menu component](core/sidebar-action-menu.component.md) | Displays a sidebar-action menu information panel. | [Source](../lib/core/sidebar/sidebar-action-menu.component.ts) |
| [Host settings component](core/host-settings.component.md) ![Internal](docassets/images/InternalIcon.png) | Validates the URLs for ACS and APS and saves them in the user's local storage | [Source](../lib/core/settings/host-settings.component.ts) |
| [Sidebar action menu component](core/sidebar-action-menu.component.md) | Displays a sidebar-action menu information panel. | [Source](../lib/core/sidenav-layout/components/sidebar-action/sidebar-action-menu.component.ts) |
| [Sidenav layout component](core/sidenav-layout.component.md) | Displays the standard three-region ADF application layout. | [Source](../lib/core/sidenav-layout/components/sidenav-layout/sidenav-layout.component.ts) |
| [Sorting picker component](core/sorting-picker.component.md) | Selects from a set of predefined sorting definitions and directions. | [Source](../lib/core/sorting-picker/sorting-picker.component.ts) |
| [Empty content component](core/empty-content.component.md) | Provides a generic "Empty Content" placeholder for components. | [Source](../lib/core/templates/empty-content/empty-content.component.ts) |
| [Error content component](core/error-content.component.md) | Displays info about a specific error. | [Source](../lib/core/templates/error-content/error-content.component.ts) |
| [Toolbar divider component](core/toolbar-divider.component.md) | Divides groups of elements in a Toolbar with a visual separator. | [Source](../lib/core/toolbar/toolbar-divider.component.ts) |
| [Toolbar title component](core/toolbar-title.component.md) | Supplies custom HTML to be included in a Toolbar component title. | [Source](../lib/core/toolbar/toolbar-title.component.ts) |
| [Toolbar component](core/toolbar.component.md) | Simple container for headers, titles, actions and breadcrumbs. | [Source](../lib/core/toolbar/toolbar.component.ts) |
@@ -121,6 +128,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Card item types service](core/card-item-types.service.md) | Maps type names to field component types for the Card View component. | [Source](../lib/core/card-view/services/card-item-types.service.ts) |
| [Card view update service](core/card-view-update.service.md) | Reports edits and clicks within fields of a Card View component. | [Source](../lib/core/card-view/services/card-view-update.service.ts) |
| [Activiti alfresco service](core/activiti-alfresco.service.md) | Gets Alfresco Repository folder content based on a Repository account configured in Alfresco Process Services (APS). | [Source](../lib/core/form/services/activiti-alfresco.service.ts) |
| [Form rendering service](core/form-rendering.service.md) | Maps an APS form field type string onto the corresponding form widget component type. | [Source](../lib/core/form/services/form-rendering.service.ts) |
@@ -141,7 +149,7 @@ for more information about installing and using the source code.
| [Discovery api service](core/discovery-api.service.md) | Gets version and license information for Process Services and Content Services. | [Source](../lib/core/services/discovery-api.service.ts) |
| [Favorites api service](core/favorites-api.service.md) | Gets a list of items a user has marked as their favorites. | [Source](../lib/core/services/favorites-api.service.ts) |
| [Highlight transform service](core/highlight-transform.service.md) | Adds HTML to a string to highlight chosen sections. | [Source](../lib/core/services/highlight-transform.service.ts) |
| [Log service](core/log.service.md) | Provide a log functionality for your ADF application. | [Source](../lib/core/services/log.service.ts) |
| [Log service](core/log.service.md) | Provides log functionality. | [Source](../lib/core/services/log.service.ts) |
| [Nodes api service](core/nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../lib/core/services/nodes-api.service.ts) |
| [Notification service](core/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/services/notification.service.ts) |
| [Page title service](core/page-title.service.md) | Sets the page title. | [Source](../lib/core/services/page-title.service.ts) |
@@ -197,10 +205,20 @@ for more information about installing and using the source code.
| [Content node selector component](content-services/content-node-selector.component.md) | Allows a user to select items from a Content Services repository. | [Source](../lib/content-services/content-node-selector/content-node-selector.component.ts) |
| [Content action component](content-services/content-action.component.md) | Adds options to a Document List actions menu for a particular content type. | [Source](../lib/content-services/document-list/components/content-action/content-action.component.ts) |
| [Document list component](content-services/document-list.component.md) | Displays the documents from a repository. | [Source](../lib/content-services/document-list/components/document-list.component.ts) |
| [Add permission dialog component](content-services/add-permission-dialog.component.md) | Displays a dialog to search for people or groups to add to the current node permissions. | [Source](../lib/content-services/permission-manager/components/add-permission/add-permission-dialog.component.ts) |
| [Add permission panel component](content-services/add-permission-panel.component.md) | Searches for people or groups to add to the current node permissions. | [Source](../lib/content-services/permission-manager/components/add-permission/add-permission-panel.component.ts) |
| [Add permission component](content-services/add-permission.component.md) | Searches for people or groups to add to the current node permissions. | [Source](../lib/content-services/permission-manager/components/add-permission/add-permission.component.ts) |
| [Permission list component](content-services/permission-list.component.md) | Shows node permissions as a table. | [Source](../lib/content-services/permission-manager/components/permission-list/permission-list.component.ts) |
| [Search check list component](content-services/search-check-list.component.md) | Implements a checklist widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-check-list/search-check-list.component.ts) |
| [Search chip list component](content-services/search-chip-list.component.md) | Displays search criteria as a set of "chips". | [Source](../lib/content-services/search/components/search-chip-list/search-chip-list.component.ts) |
| [Search control component](content-services/search-control.component.md) | Displays a input text which shows find-as-you-type suggestions. | [Source](../lib/content-services/search/components/search-control.component.ts) |
| [Search date range component](content-services/search-date-range.component.md) | Implements a date range widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-date-range/search-date-range.component.ts) |
| [Search filter component](content-services/search-filter.component.md) | Represents a main container component for custom search and faceted search settings. | [Source](../lib/content-services/search/components/search-filter/search-filter.component.ts) |
| [Search number range component](content-services/search-number-range.component.md) | Implements a number range widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-number-range/search-number-range.component.ts) |
| [Search radio component](content-services/search-radio.component.md) | Implements a radio button list widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-radio/search-radio.component.ts) |
| [Search slider component](content-services/search-slider.component.md) | Implements a numeric slider widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-slider/search-slider.component.ts) |
| [Search sorting picker component](content-services/search-sorting-picker.component.md) | Provides an ability to select one of the predefined sorting definitions for search results: | [Source](../lib/content-services/search/components/search-sorting-picker/search-sorting-picker.component.ts) |
| [Search text component](content-services/search-text.component.md) | Implements a text input widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-text/search-text.component.ts) |
| [Search component](content-services/search.component.md) | Searches items for supplied search terms. | [Source](../lib/content-services/search/components/search.component.ts) |
| [Sites dropdown component](content-services/sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../lib/content-services/site-dropdown/sites-dropdown.component.ts) |
| [Like component](content-services/like.component.md) | Allows a user to add "likes" to an item. | [Source](../lib/content-services/social/like.component.ts) |
@@ -212,7 +230,7 @@ for more information about installing and using the source code.
| [Upload button component](content-services/upload-button.component.md) | Activates a file upload. | [Source](../lib/content-services/upload/components/upload-button.component.ts) |
| [Upload drag area component](content-services/upload-drag-area.component.md) | Adds a drag and drop area to upload files to ACS. | [Source](../lib/content-services/upload/components/upload-drag-area.component.ts) |
| [Upload version button component](content-services/upload-version-button.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Activates a file version upload. | [Source](../lib/content-services/upload/components/upload-version-button.component.ts) |
| [Version list component](content-services/version-list.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the version history of a node in a Version Manager component | [Source](../lib/content-services/version-manager/version-list.component.ts) |
| [Version list component](content-services/version-list.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the version history of a node in a Version Manager component. | [Source](../lib/content-services/version-manager/version-list.component.ts) |
| [Version manager component](content-services/version-manager.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Displays the version history of a node with the ability to upload a new version. | [Source](../lib/content-services/version-manager/version-manager.component.ts) |
| [Webscript component](content-services/webscript.component.md) | Provides access to Webscript features. | [Source](../lib/content-services/webscript/webscript.component.ts) |
@@ -244,13 +262,21 @@ for more information about installing and using the source code.
| [Document actions service](content-services/document-actions.service.md) | Implements the document menu actions for the Document List component. | [Source](../lib/content-services/document-list/services/document-actions.service.ts) |
| [Document list service](content-services/document-list.service.md) | Implements node operations used by the Document List component. | [Source](../lib/content-services/document-list/services/document-list.service.ts) |
| [Folder actions service](content-services/folder-actions.service.md) | Implements the folder menu actions for the Document List component. | [Source](../lib/content-services/document-list/services/folder-actions.service.ts) |
| [Node permission service](content-services/node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../lib/content-services/permission-manager/services/node-permission.service.ts) |
| [Search query builder service](content-services/search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final Search query. | [Source](../lib/content-services/search/search-query-builder.service.ts) |
| [Node permission dialog service](content-services/node-permission-dialog.service.md) | Displays dialogs to let the user set node permissions. | [Source](../lib/content-services/permission-manager/services/node-permission-dialog.service.ts) |
| [Node permission service](content-services/node-permission.service.md) | Manages role permissions for content nodes. | [Source](../lib/content-services/permission-manager/services/node-permission.service.ts) |
| [Search filter service](content-services/search-filter.service.md) | Registers widgets for use with the Search Filter component. | [Source](../lib/content-services/search/components/search-filter/search-filter.service.ts) |
| [Search query builder service](content-services/search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final search query. | [Source](../lib/content-services/search/search-query-builder.service.ts) |
| [Rating service](content-services/rating.service.md) | Manages ratings for items in Content Services. | [Source](../lib/content-services/social/services/rating.service.ts) |
| [Tag service](content-services/tag.service.md) | Manages tags in Content Services. | [Source](../lib/content-services/tag/services/tag.service.ts) |
<!--content-services end-->
## Other classes and interfaces
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Search Widget interface](content-services/search-widget.interface.md) | Specifies required properties for Search filter component widgets. | [Source](../lib/content-services/search/search-widget.interface.ts) |
[(Back to Contents)](#contents)
## ADF Process Services

View File

@@ -18,10 +18,20 @@ for more information about installing and using the source code.
| [Content node selector component](content-node-selector.component.md) | Allows a user to select items from a Content Services repository. | [Source](../../lib/content-services/content-node-selector/content-node-selector.component.ts) |
| [Content action component](content-action.component.md) | Adds options to a Document List actions menu for a particular content type. | [Source](../../lib/content-services/document-list/components/content-action/content-action.component.ts) |
| [Document list component](document-list.component.md) | Displays the documents from a repository. | [Source](../../lib/content-services/document-list/components/document-list.component.ts) |
| [Add permission dialog component](add-permission-dialog.component.md) | Displays a dialog to search for people or groups to add to the current node permissions. | [Source](../../lib/content-services/permission-manager/components/add-permission/add-permission-dialog.component.ts) |
| [Add permission panel component](add-permission-panel.component.md) | Searches for people or groups to add to the current node permissions. | [Source](../../lib/content-services/permission-manager/components/add-permission/add-permission-panel.component.ts) |
| [Add permission component](add-permission.component.md) | Searches for people or groups to add to the current node permissions. | [Source](../../lib/content-services/permission-manager/components/add-permission/add-permission.component.ts) |
| [Permission list component](permission-list.component.md) | Shows node permissions as a table. | [Source](../../lib/content-services/permission-manager/components/permission-list/permission-list.component.ts) |
| [Search check list component](search-check-list.component.md) | Implements a checklist widget for the Search Filter component. | [Source](../../lib/content-services/search/components/search-check-list/search-check-list.component.ts) |
| [Search chip list component](search-chip-list.component.md) | Displays search criteria as a set of "chips". | [Source](../../lib/content-services/search/components/search-chip-list/search-chip-list.component.ts) |
| [Search control component](search-control.component.md) | Displays a input text which shows find-as-you-type suggestions. | [Source](../../lib/content-services/search/components/search-control.component.ts) |
| [Search date range component](search-date-range.component.md) | Implements a date range widget for the Search Filter component. | [Source](../../lib/content-services/search/components/search-date-range/search-date-range.component.ts) |
| [Search filter component](search-filter.component.md) | Represents a main container component for custom search and faceted search settings. | [Source](../../lib/content-services/search/components/search-filter/search-filter.component.ts) |
| [Search number range component](search-number-range.component.md) | Implements a number range widget for the Search Filter component. | [Source](../../lib/content-services/search/components/search-number-range/search-number-range.component.ts) |
| [Search radio component](search-radio.component.md) | Implements a radio button list widget for the Search Filter component. | [Source](../../lib/content-services/search/components/search-radio/search-radio.component.ts) |
| [Search slider component](search-slider.component.md) | Implements a numeric slider widget for the Search Filter component. | [Source](../../lib/content-services/search/components/search-slider/search-slider.component.ts) |
| [Search sorting picker component](search-sorting-picker.component.md) | Provides an ability to select one of the predefined sorting definitions for search results: | [Source](../../lib/content-services/search/components/search-sorting-picker/search-sorting-picker.component.ts) |
| [Search text component](search-text.component.md) | Implements a text input widget for the Search Filter component. | [Source](../../lib/content-services/search/components/search-text/search-text.component.ts) |
| [Search component](search.component.md) | Searches items for supplied search terms. | [Source](../../lib/content-services/search/components/search.component.ts) |
| [Sites dropdown component](sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../../lib/content-services/site-dropdown/sites-dropdown.component.ts) |
| [Like component](like.component.md) | Allows a user to add "likes" to an item. | [Source](../../lib/content-services/social/like.component.ts) |
@@ -33,7 +43,7 @@ for more information about installing and using the source code.
| [Upload button component](upload-button.component.md) | Activates a file upload. | [Source](../../lib/content-services/upload/components/upload-button.component.ts) |
| [Upload drag area component](upload-drag-area.component.md) | Adds a drag and drop area to upload files to ACS. | [Source](../../lib/content-services/upload/components/upload-drag-area.component.ts) |
| [Upload version button component](upload-version-button.component.md) ![Experimental](../docassets/images/ExperimentalIcon.png) | Activates a file version upload. | [Source](../../lib/content-services/upload/components/upload-version-button.component.ts) |
| [Version list component](version-list.component.md) ![Experimental](../docassets/images/ExperimentalIcon.png) | Displays the version history of a node in a Version Manager component | [Source](../../lib/content-services/version-manager/version-list.component.ts) |
| [Version list component](version-list.component.md) ![Experimental](../docassets/images/ExperimentalIcon.png) | Displays the version history of a node in a Version Manager component. | [Source](../../lib/content-services/version-manager/version-list.component.ts) |
| [Version manager component](version-manager.component.md) ![Experimental](../docassets/images/ExperimentalIcon.png) | Displays the version history of a node with the ability to upload a new version. | [Source](../../lib/content-services/version-manager/version-manager.component.ts) |
| [Webscript component](webscript.component.md) | Provides access to Webscript features. | [Source](../../lib/content-services/webscript/webscript.component.ts) |
@@ -65,9 +75,17 @@ for more information about installing and using the source code.
| [Document actions service](document-actions.service.md) | Implements the document menu actions for the Document List component. | [Source](../../lib/content-services/document-list/services/document-actions.service.ts) |
| [Document list service](document-list.service.md) | Implements node operations used by the Document List component. | [Source](../../lib/content-services/document-list/services/document-list.service.ts) |
| [Folder actions service](folder-actions.service.md) | Implements the folder menu actions for the Document List component. | [Source](../../lib/content-services/document-list/services/folder-actions.service.ts) |
| [Node permission service](node-permission.service.md) | Manages the role permissions for the content nodes | [Source](../../lib/content-services/permission-manager/services/node-permission.service.ts) |
| [Search query builder service](search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final Search query. | [Source](../../lib/content-services/search/search-query-builder.service.ts) |
| [Node permission dialog service](node-permission-dialog.service.md) | Displays dialogs to let the user set node permissions. | [Source](../../lib/content-services/permission-manager/services/node-permission-dialog.service.ts) |
| [Node permission service](node-permission.service.md) | Manages role permissions for content nodes. | [Source](../../lib/content-services/permission-manager/services/node-permission.service.ts) |
| [Search filter service](search-filter.service.md) | Registers widgets for use with the Search Filter component. | [Source](../../lib/content-services/search/components/search-filter/search-filter.service.ts) |
| [Search query builder service](search-query-builder.service.md) | Stores information from all the custom search and faceted search widgets, compiles and runs the final search query. | [Source](../../lib/content-services/search/search-query-builder.service.ts) |
| [Rating service](rating.service.md) | Manages ratings for items in Content Services. | [Source](../../lib/content-services/social/services/rating.service.ts) |
| [Tag service](tag.service.md) | Manages tags in Content Services. | [Source](../../lib/content-services/tag/services/tag.service.ts) |
<!--content-services end-->
## Other classes and interfaces
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Search Widget interface](search-widget.interface.md) | Specifies required properties for Search filter component widgets. | [Source](../../lib/content-services/search/search-widget.interface.ts) |

View File

@@ -0,0 +1,55 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-05-03
---
# Add Permission Dialog Component
Displays a dialog to search for people or groups to add to the current node permissions.
![Add Permission Component](../docassets/images/add-permission-component.png)
## Basic Usage
```ts
import { NodePermissionDialogService } from '@alfresco/adf-content-services';
constructor(private nodePermissionDialogService: nodePermissionDialogService) {
}
this.nodePermissionDialogService.openAddPermissionDialog(this.nodeId).subscribe((selectedNodes) => {
//action for selected nodes
},
(error) => {
this.showErrorMessage(error);
});
```
## Details
This component extends the [Add permission panel component](../content-services/add-permission-panel.component.md)
to apply the chosen selection of permissions when they are accepted.
You can open the dialog with the [Node Permission Dialog Service](../content-services/node-permission-dialog.service.md). This returns Observables that
you can subscribe to for get the details of the node after the update.
Use the `updateNodePermissionByDialog` from the service to update node permissions, as shown in
the following example:
```ts
import { NodePermissionDialogService } from '@alfresco/adf-content-services';
constructor(private nodePermissionDialogService: nodePermissionDialogService) {
}
this.nodePermissionDialogService.updateNodePermissionByDialog(this.nodeId).subscribe((node) => {
//updated node
},
(error) => {
this.showErrorMessage(error);
});
```
## See also
- [Node permission dialog service](node-permission-dialog.service.md)
- [Add permission panel component](add-permission-panel.component.md)

View File

@@ -0,0 +1,44 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-05-03
---
# Add Permission Panel Component
Searches for people or groups to add to the current node permissions.
![Add Permission Component](../docassets/images/add-permission-component.png)
## Basic Usage
```html
<adf-add-permission
[nodeId]="nodeId"
(success)="onSuccess($event)"
(error)="onError($event)">
</adf-add-permission>
```
## Class members
### Events
| Name | Type | Description |
| -- | -- | -- |
| select | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when a permission list item is selected. |
## Details
This component uses a [Search component](search.component.md) to retrieve the
groups and people that could be added to the permission list of the current node.
The `select` event is emitted when a result is clicked from the list.
The [Add permission dialog component](../content-services/add-permission-dialog.component.md)
and [Add permission component](../content-services/add-permission.component.md) extend this behavior by applying the chosen
permissions to the node once the selection has been made.
## See also
- [Add permission dialog component](../content-services/add-permission-dialog.component.md)
- [Add permission component](../content-services/add-permission.component.md)

View File

@@ -0,0 +1,47 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-05-03
---
# Add Permission Component
Searches for people or groups to add to the current node permissions.
![Add Permission Component](../docassets/images/add-permission-component.png)
## Basic Usage
```html
<adf-add-permission
[nodeId]="nodeId"
(success)="onSuccess($event)"
(error)="onError($event)">
</adf-add-permission>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| nodeId | `string` | | ID of the target node. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs during the update. |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the node is updated successfully. |
## Details
This component extends the [Add permission panel component](../content-services/add-permission-panel.component.md)
to apply the chosen selection of permissions when they are accepted. You can also
use the [Add permission dialog component](../content-services/add-permission-dialog.component.md) to perform the same action using a dialog.
## See also
- [Add permission panel component](../content-services/add-permission-panel.component.md)
- [Add permission dialog component](../content-services/add-permission-dialog.component.md)

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-12
Last reviewed: 2018-06-08
---
# Breadcrumb Component
@@ -19,24 +19,32 @@ Indicates the current position within a navigation hierarchy.
</adf-breadcrumb>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| folderNode | `MinimalNodeEntryEntity` | `null` | Active node, builds UI based on folderNode.path.elements collection. |
| root | `string` | `null` | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
| rootId | `string` | `null` | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
| target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. |
| transform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
| -- | -- | -- | -- |
| folderNode | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | null | Active node, builds UI based on folderNode.path.elements collection. |
| maxItems | `number` | | Maximum number of nodes to display before wrapping them with a dropdown element. |
| root | `string` | null | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
| rootId | `string` | null | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
| target | [`DocumentListComponent`](../content-services/document-list.component.md) | | (optional) [Document List component](../content-services/document-list.component.md) to operate with. The list will update when the breadcrumb is clicked. |
| transform | `function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. |
| -- | -- | -- |
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PathElementEntity`](../../lib/content-services/document-list/models/document-library.model.ts)`>` | Emitted when the user clicks on a breadcrumb. |
## Details
The `maxItems` property sets the maximum number of "crumbs" in the breadcrumb trail. If
the actual path contains more nodes than this then the earliest items in the path will be
removed and kept in a menu as with the
[Dropdown breadcrumb component](../content-services/dropdown-breadcrumb.component.md).
### Using the transform function
The function supplied in the `transform` property lets you modify the Node object that the component
@@ -45,7 +53,7 @@ the list by altering the node's `path.elements` property.
Below is an example of how you might do this with the
[Content Node Selector component](content-node-selector.component.md). In this case, you pass the
transform function via the `breadcrumbTransform` property of `ContentNodeSelectorComponentData` during
transform function via the `breadcrumbTransform` property of [`ContentNodeSelectorComponentData`](../../lib/content-services/content-node-selector/content-node-selector.component-data.interface.ts) during
initialization:
```ts
@@ -84,7 +92,7 @@ A transform function to remove the "Sites" folder from the path would look somet
Below, the breadcrumb is shown before and after the transform function is applied:
![Content Node Selector breadcrumbTransfrom before/after screenshot](../docassets/images/breadcrumbTransform.png)
![Content Node Selector breadcrumbTransform before/after screenshot](../docassets/images/breadcrumbTransform.png)
## See also

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Content Action component
Adds options to a Document List actions menu for a particular content type.
@@ -12,12 +14,15 @@ Adds options to a Document List actions menu for a particular content type.
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Examples](#examples)
- [Conditional visibility](#conditional-visibility)
- [Customizing built-in actions](#customizing-built-in-actions)
- [Error, Permission and Success callbacks](#error-permission-and-success-callbacks)
@@ -76,31 +81,34 @@ export class MyView {
}
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| title | `string` | `'Action'` | The title of the action as shown in the menu. If the title is a translation key the translation will be automatically showed. |
| icon | `string` | | The name of the icon to display next to the menu command (can be left blank). |
| handler | `string` | | System actions. Can be "delete", "download", "copy" or "move". |
| target | `string` | [ContentActionTarget.All](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/content-services/document-list/models/content-action.model.ts) | Type of item that the action applies to. Can be one of the values provided by the enum : **All**, **Folder**, **Document** |
| permission | `string` | | The permission type. |
| disableWithNoPermission | `boolean` | | Should this action be disabled in the menu if the user doesn't have permission for it? |
| disabled | `boolean` | `false` | Is the menu item disabled? |
| -- | -- | -- | -- |
| disableWithNoPermission | `boolean` | | Should this action be disabled in the menu if the user doesn't have permission for it? |
| disabled | `boolean \|Function` | false | Is the menu item disabled? |
| handler | `string` | | System actions. Can be "delete", "download", "copy" or "move". |
| icon | `string` | | The name of the icon to display next to the menu command (can be left blank). |
| permission | `string` | | The permission type. |
| target | `string` | [`ContentActionTarget`](../../lib/content-services/document-list/models/content-action.model.ts).All | Type of item that the action applies to. Can be "document" or "folder" |
| title | `string` | "Action" | The title of the action as shown in the menu. |
| visible | `boolean \| Function` | true | Visibility state (see examples). |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| execute | `EventEmitter<{}>` | Emitted when the user selects the action from the menu. |
| permissionEvent | `EventEmitter<{}>` | Emitted when a permission error occurs |
| error | `EventEmitter<{}>` | Emitted when an error occurs during the action. Applies to copy and move actions. |
| success | `EventEmitter<{}>` | Emitted when the action succeeds with the success string message. Applies to copy, move and delete actions. |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an error occurs during the action. Applies to copy and move actions. |
| execute | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the user selects the action from the menu. |
| permissionEvent | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a permission error occurs |
| success | `EventEmitter<Object>` | Emitted when the action succeeds with the success string message. Applies to copy, move and delete actions. |
## Details
The document actions are rendered on a dropdown menu for each items of content. You can use the
`target` property to choose whether the action applies to folders , documents or both. (By default the actions arre applied to both)
`target` property to choose whether the action applies to folders, documents or both. (By default the actions are applied to both)
A number of built-in actions are defined to handle common use cases:
@@ -116,11 +124,11 @@ will trigger the same action.) You can also add your own handler by implementing
`execute` event.
Note that you can use _both_ a built-in handler and your own `execute`
function in the same action. The `execute` function is passed a `NodeMinimalEntry` as its
function in the same action. The `execute` function is passed a [`NodeMinimalEntry`](../../lib/content-services/document-list/models/document-library.model.ts) as its
parameter (see the [Document Library model](document-library.model.md) page for more
information) which contains full details of the item that the action is operating on. For
example, with `handler="delete"` you could use `execute` to show a message with the name,
type and other details of the item just deleted:
type, and other details of the item just deleted:
```html
<content-actions>
@@ -156,29 +164,28 @@ type and other details of the item just deleted:
### Examples
#### System handler
This action simply execute one of the built-in actions described above:
```html
<adf-document-list [contentActions]="true"...>
<content-actions>
<content-action
target="document"
title="Download"
handler="download">
</content-action>
</content-actions>
</adf-document-list>
```
```html
<adf-document-list [contentActions]="true"...>
<content-actions>
<content-action
target="document"
title="Download"
handler="download">
</content-action>
</content-actions>
</adf-document-list>
```
![Download document action](../docassets/images/document-action-download.png)
#### Custom handler
If you specify a custom handler it will be executed at any click of the action:
If you specify a custom handler it will be executed whenever the action is selected:
```html
<adf-document-list [contentActions]="true"...>
@@ -193,7 +200,6 @@ If you specify a custom handler it will be executed at any click of the action:
</adf-document-list>
```
```ts
export class MyComponent {
@@ -206,11 +212,11 @@ export class MyComponent {
#### System handler combined with custom handler
If you specify both system handler and your own custom handler with
`(execute)="myCustomActionAfterDelete($event)"`, your handler will run after a system handler completes
successfully. A system operation is considered successful if there are no permission or
network-related errors for the system request. You can avoid permission errors simply by disabling
an item for users who don't have permission to use it (set `disableWithNoPermission="true"`).
If you specify both a system handler and your own custom handler with
`(execute)="myCustomActionAfterDelete($event)"`, your handler will run after the system handler
completes successfully. A system operation is considered successful if there are no permission
or network-related errors for the system request. You can avoid permission errors simply
by disablingan item for users who don't have permission to use it (set `disableWithNoPermission="true"`).
```html
<adf-document-list ...>
@@ -276,7 +282,6 @@ export class MyComponent {
![Delete show notification message](../docassets/images/content-action-notification-message.png)
#### Copy and move
These actions show the destination chooser dialog for copy and move actions. By default,
@@ -317,6 +322,118 @@ allow the item being copied/moved to be the destination if it is itself a folder
</adf-document-list>
```
### Conditional visibility
The `<content-action>` component allows you to control visibility with the help of the `visible` property and supports the following scenarios:
- direct value of `boolean` type
- binding to a property of the `Function` type that evaluates condition and returns `boolean` value
#### Using direct boolean value
```html
<content-action
icon="get_app"
title="Never see this action again"
handler="download"
[visible]="false">
</content-action>
```
#### Using a property of the Function type
```html
<content-action
icon="get_app"
title="Download this file now!"
handler="download"
[visible]="canDownloadNode">
</content-action>
```
The code above relies on the `canDownloadNode` property (of `Function` type) declared in
your component class:
```ts
export class MyComponent {
canDownloadNode = (node: MinimalNodeEntity): boolean => {
if (node && node.entry && node.entry.name === 'For Sale.docx') {
return true;
}
return false;
}
}
```
The code above checks the node name and evaluates to `true` only if the corresponding
node is called "For Sale.docx".
Note that if you want to preserve `this` context within the evaluator function then
the property should be declared as a lambda function:
```ts
funcName = (parameters): boolean => {
// implementation
return true;
}
```
### Conditional disabled state
Similar to `visible` property, it is possible to control the `disabled` state with the following scenarios:
- direct value of `boolean` type
- binding to a property of the `Function` type that evaluates condition and returns `boolean` value
#### Using direct value of boolean type
```html
<content-action
target="all"
title="Action for 'custom' node"
[disabled]="true"
(execute)="runCustomAction($event)">
</content-action>
```
#### Using a property of the Function type
```html
<content-action
target="all"
title="Action for 'custom' node"
[disabled]="isCustomActionDisabled"
(execute)="runCustomAction($event)">
</content-action>
```
The code above relies on the `isCustomActionDisabled` property of a `Function` type declared at your component class level:
```ts
export class MyComponent {
isCustomActionDisabled = (node: MinimalNodeEntity): boolean => {
if (node && node.entry && node.entry.name === 'custom') {
return false;
}
return true;
}
}
```
Code above checks the node name, and evaluates to `true` only if corresponding node is called "custom".
Please note that if you want to preserve `this` context within the evaluator function,
its property should be declared as a lambda one:
```ts
funcName = (parameters): boolean => {
// implementation
return true;
}
```
### Customizing built-in actions
The built-in actions are defined in the [Document Actions service](document-actions.service.md) and
@@ -335,13 +452,8 @@ Defining error, permission and success callbacks are pretty much the same as doi
![Copy/move document action](../docassets/images/document-action-copymove.png)
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
## See also
- [Document list component](document-list.component.md)
- [Document actions service](document-actions.service.md)
- [Folder actions service](folder-actions.service.md)
<!-- seealso end -->

View File

@@ -24,13 +24,14 @@ Displays and edits metadata related to a node.
### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| node | MinimalNodeEntryEntity | - | (**required**) The node entity to fetch metadata about |
| displayEmpty | boolean | false | Toggles whether to display empty values in the card view |
| readOnly | boolean | true | Toggles whether the edit button should be shown |
| multi | boolean | false | The multi parameter of the underlying material expansion panel |
| preset | string | "*" | Name of the metadata preset, which defines aspects and their properties |
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| displayEmpty | `boolean` | false | Toggles whether to display empty values in the card view |
| editable | `boolean` | false | Toggles whether the edit button should be shown |
| expanded | `boolean` | false | Toggles between expanded (ie, full information) and collapsed (ie, reduced information) in the display |
| multi | `boolean` | false | The multi parameter of the underlying material expansion panel |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | (required) The node entity to fetch metadata about |
| preset | `string` | | Name of the metadata preset, which defines aspects and their properties |
## Details
@@ -44,7 +45,7 @@ properties.
### Application config presets
You can define different presets for the metadata component or override the default presets in
the `app.config.json` file. The **default** preset is "*" if not set, meaning the component
the `app.config.json` file. The **default** preset is "\*" if not set, meaning the component
will display every aspect and property of a node without filtering.
You can define as many extra presets as you need for your components.
@@ -89,7 +90,7 @@ just the `exif:exif` and `custom:aspect` aspects are whitelisted:
```
You can further restrict the whitelist to specific properties of one or more aspects by using
an array of property names in place of the "*" filter:
an array of property names in place of the "\*" filter:
```json
...
@@ -190,24 +191,25 @@ A more complex config is shown in the example below:
]
}
```
The result of this config would be two accordion groups with the following properties:
|GROUP-TITLE1-TRANSLATION-KEY|
|---|
|exif:param1|
|exif:param2|
|...|
|exif:paramN|
|kitten:custom1|
|kitten:custom3|
|owner:name|
|kitten:name|
|kitten:color|
| GROUP-TITLE1-TRANSLATION-KEY |
| ---------------------------- |
| exif:param1 |
| exif:param2 |
| ... |
| exif:paramN |
| kitten:custom1 |
| kitten:custom3 |
| owner:name |
| kitten:name |
| kitten:color |
|GROUP-TITLE2-TRANSLATION-KEY|
|---|
|kitten:favourite-food|
|kitten:recommended-food|
| GROUP-TITLE2-TRANSLATION-KEY |
| ---------------------------- |
| kitten:favourite-food |
| kitten:recommended-food |
## What happens when there is a whitelisted aspect in the config but the given node doesn't relate to that aspect

View File

@@ -1,55 +1,63 @@
---
Added: v2.1.0
Status: Active
Last reviewed: 2018-03-13
Last reviewed: 2018-05-03
---
# Content Node Dialog service
Displays and manages dialogs for selecting content to open, copy or upload.
## Methods
## Class members
- `openLockNodeDialog(nodeEntry: MinimalNodeEntryEntity): Observable<string>`
Opens a dialog to lock or unlock file
- `nodeEntry` - Item to lock or unlock.
- `openFileBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]>`
Opens a file browser at a chosen folder location.
- `folderNodeId` - ID of the folder to use
- `openFileBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`
Opens a file browser at a chosen site location.
- `openFolderBrowseDialogBySite(): Observable<MinimalNodeEntryEntity[]>`
Opens a folder browser at a chosen site location.
- `openFolderBrowseDialogByFolderId(folderNodeId: string): Observable<MinimalNodeEntryEntity[]>`
Opens a folder browser at a chosen folder location.
- `folderNodeId` - ID of the folder to use
- `openCopyMoveDialog(action: string, contentEntry: MinimalNodeEntryEntity, permission?: string): Observable<MinimalNodeEntryEntity[]>`
Opens a dialog to copy or move an item to a new location.
- `action` - Name of the action (eg, "Copy" or "Move") to show in the title
- `contentEntry` - Item to be copied or moved
- `permission` - (Optional) Permission for the operation
- `getTitleTranslation(action: string, name: string): string`
Gets the translation of the dialog title.
- `action` - Name of the action to display in the dialog title
- `name` - Name of the item on which the action is being performed
- `openUploadFolderDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]>`
Opens a dialog to choose a folder to upload.
- `action` - Name of the action to show in the title
- `contentEntry` - Item to upload
- `openUploadFileDialog(action: string, contentEntry: MinimalNodeEntryEntity): Observable<MinimalNodeEntryEntity[]>`
Opens a dialog to choose a file to upload.
- `action` - Name of the action to show in the title
- `contentEntry` - Item to upload
- `close()`
Closes the currently open dialog.
### Methods
- **close**()<br/>
Closes the currently open dialog.
- **getTitleTranslation**(action: `string` = `null`, name: `string` = `null`): `string`<br/>
Gets the translation of the dialog title.
- _action:_ `string` - Name of the action to display in the dialog title
- _name:_ `string` - Name of the item on which the action is being performed
- **Returns** `string` - Translated version of the title
- **openCopyMoveDialog**(action: `string` = `null`, contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`, permission?: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a dialog to copy or move an item to a new location.
- _action:_ `string` - Name of the action (eg, "Copy" or "Move") to show in the title
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Item to be copied or moved
- _permission:_ `string` - (Optional) Permission for the operation
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about files that were copied/moved
- **openFileBrowseDialogByFolderId**(folderNodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a file browser at a chosen folder location.
- _folderNodeId:_ `string` - ID of the folder to use
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected file(s)
- **openFileBrowseDialogBySite**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a file browser at a chosen site location.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected file(s)
- **openFolderBrowseDialogByFolderId**(folderNodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a folder browser at a chosen folder location.
- _folderNodeId:_ `string` - ID of the folder to use
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected folder(s)
- **openFolderBrowseDialogBySite**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a folder browser at a chosen site location.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the selected folder(s)
- **openLockNodeDialog**(contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`): [`Subject`](http://reactivex.io/documentation/subject.html)`<string>`<br/>
Opens a lock node dialog.
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Node to lock
- **Returns** [`Subject`](http://reactivex.io/documentation/subject.html)`<string>` - Error/status message (if any)
- **openUploadFileDialog**(action: `string` = `null`, contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a dialog to choose a file to upload.
- _action:_ `string` - Name of the action to show in the title
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Item to upload
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the chosen file(s)
- **openUploadFolderDialog**(action: `string` = `null`, contentEntry: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a dialog to choose folders to upload.
- _action:_ `string` - Name of the action to show in the title
- _contentEntry:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Item to upload
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` - Information about the chosed folder(s)
## Details
The `openXXX` methods return an
[Observable](http://reactivex.io/rxjs/manual/overview.html#observable) that you can subscribe
[`Observable`](http://reactivex.io/documentation/observable.html) that you can subscribe
to in order to get the information from the result:
```ts
@@ -69,18 +77,10 @@ yourFunctionOnCopyOrMove(){
The `openXXXByFolderId` methods let you set the initial folder location of the browser
using a folder ID string. This can be obtained from the `id` property of a
[MinimalNodeEntryEntity](document-library.model.md) object (returned from a previous
[`MinimalNodeEntryEntity`](../content-services/document-library.model.md) object (returned from a previous
dialog operation, say) or be set to one of the well-known names "-my-" , "-shared-" or
"-root-".
The `openCopyMoveDialog` and `openUploadXXX` methods require the following parameters:
| Name | Type | Description |
| ---- | ---- | ----------- |
| action | string | The label for the confirm button of the dialog. |
| contentEntry | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md) | The node we want to be copied/moved or uploaded. |
| neededPermissionForAction | string | (`openCopyMoveDialog` only) Permission required to perform the relative action (eg: copy will need the 'update' permission ). |
## See Also
- [Content node selector panel component](content-node-selector-panel.component.md)

View File

@@ -23,24 +23,26 @@ Opens a Content Node Selector in its own dialog window.
</adf-content-node-selector-panel>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| currentFolderId | `string` | `null` | Node ID of the folder currently listed. |
| dropdownHideMyFiles | `boolean` | `false` | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| dropdownSiteList | `SitePaging` | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| rowFilter | `RowFilter` | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| imageResolver | `ImageResolver` | `null` | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| pageSize | `number` | | Number of items shown per page in the list. |
| isSelectionValid | `ValidationFunction` | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
| -- | -- | -- | -- |
| breadcrumbTransform | `function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
| currentFolderId | `string` | null | Node ID of the folder currently listed. |
| dropdownHideMyFiles | `boolean` | false | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| imageResolver | [`ImageResolver`](../../lib/content-services/document-list/data/image-resolver.model.ts) | null | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| isSelectionValid | [`ValidationFunction`](../../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) | defaultValidation | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
| pageSize | `number` | | Number of items shown per page in the list. |
| rowFilter | [`RowFilter`](../../lib/content-services/document-list/data/row-filter.model.ts) | null | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| select | `EventEmitter<MinimalNodeEntryEntity[]>` | Emitted when the user has chosen an item. |
| -- | -- | -- |
| select | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`[]>` | Emitted when the user has chosen an item. |
## Details

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-03-29
Last reviewed: 2018-04-18
---
# Content Node Selector component
@@ -10,33 +10,50 @@ Allows a user to select items from a Content Services repository.
![Content Node Selector screenshot](../docassets/images/ContentNodeSelector.png)
## Contents
- [Class members](#class-members)
- [Properties](#properties)
- [Details](#details)
- [Showing the dialog](#showing-the-dialog)
- [Usage example](#usage-example)
- [RowFilter and ImageResolver](#rowfilter-and-imageresolver)
- [Using the breadcrumbTransform function](#using-the-breadcrumbtransform-function)
- [See also](#see-also)
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| currentFolderId | `string` | null | Deprecated: in 2.1.0 |
| dropdownHideMyFiles | `boolean` | false | Deprecated: in 2.1.0 |
| dropdownSiteList | `SitePaging` | null | Deprecated: in 2.1.0 |
| imageResolver | `ImageResolver` | null | Deprecated: in 2.1.0 |
| pageSize | `number` | | Deprecated: in 2.1.0 |
| rowFilter | `RowFilter` | null | Deprecated: in 2.1.0 |
| title | `string` | null | Deprecated: in 2.1.0 |
| -- | -- | -- | -- |
| currentFolderId | `string` | null | (**Deprecated:** in 2.1.0) |
| dropdownHideMyFiles | `boolean` | false | (**Deprecated:** in 2.1.0) |
| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | (**Deprecated:** in 2.1.0) |
| imageResolver | [`ImageResolver`](../../lib/content-services/document-list/data/image-resolver.model.ts) | null | (**Deprecated:** in 2.1.0) |
| pageSize | `number` | | (**Deprecated:** in 2.1.0) |
| rowFilter | [`RowFilter`](../../lib/content-services/document-list/data/row-filter.model.ts) | null | (**Deprecated:** in 2.1.0) |
| title | `string` | null | (**Deprecated:** in 2.1.0) |
## Details
The Content Node Selector component works a lot like the standard File Open/Save
The [Content Node Selector component](../content-services/content-node-selector.component.md) works a lot like the standard File Open/Save
dialog used by desktop applications except that it chooses items from a Content Services
repository rather than the filesystem. For example, the
[Document List component](document-list.component.md) uses a selector to choose the targets
of Copy/Move actions (see the [Content Action component](content-action.component.md) for
more information).
### Showing the dialog
Unlike most components, the Content Node Selector is typically shown in a dialog box
rather than the main page and you are responsible for opening the dialog yourself. You can use the
[Angular Material Dialog](https://material.angular.io/components/dialog/overview) for this,
as shown in the usage example. ADF provides the `ContentNodeSelectorComponentData` interface
as shown in the usage example. ADF provides the [`ContentNodeSelectorComponentData`](../../lib/content-services/content-node-selector/content-node-selector.component-data.interface.ts) interface
to work with the Dialog's
[data option](https://material.angular.io/components/dialog/overview#sharing-data-with-the-dialog-component-):
@@ -55,6 +72,22 @@ interface ContentNodeSelectorComponentData {
}
```
The properties are described in the table below:
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| title | `string` | "" | Dialog title |
| actionName | `string` | "" | Text to appear on the dialog's main action button ("Move", "Copy", etc) |
| currentFolderId | `string` | `null` | Node ID of the folder currently listed. |
| dropdownHideMyFiles | `boolean` | `false` | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. |
| rowFilter | [`RowFilter`](../../lib/content-services/document-list/data/row-filter.model.ts) | `null` | Custom row filter function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| imageResolver | [`ImageResolver`](../../lib/content-services/document-list/data/image-resolver.model.ts) | `null` | Custom image resolver function. See the [Document List component](document-list.component.md#custom-row-filter) for more information. |
| pageSize | `number` | | Number of items shown per page in the list. |
| isSelectionValid | [`ValidationFunction`](../../lib/content-services/content-node-selector/content-node-selector-panel.component.ts) | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
| select | [`EventEmitter<MinimalNodeEntryEntity[]>`](../content-services/document-library.model.md) | | Event emitted with the current node selection when the dialog closes |
If you don't want to manage the dialog yourself then it is easier to use the
[Content Node Selector Panel component](content-node-selector-panel.component.md), or the
methods of the [Content Node Dialog service](content-node-dialog.service.md), which create
@@ -73,6 +106,7 @@ constructor(dialog: MatDialog ... ) {}
openSelectorDialog() {
data: ContentNodeSelectorComponentData = {
title: "Choose an item",
actionName: "Choose",
currentFolderId: someFolderId,
select: new Subject<MinimalNodeEntryEntity[]>()
};
@@ -98,7 +132,7 @@ openSelectorDialog() {
}
```
All the results will be streamed to the select [subject](http://reactivex.io/rxjs/manual/overview.html#subject) present in the `ContentNodeSelectorComponentData` object passed to the dialog.
All the results will be streamed to the select [subject](http://reactivex.io/rxjs/manual/overview.html#subject) present in the [`ContentNodeSelectorComponentData`](../../lib/content-services/content-node-selector/content-node-selector.component-data.interface.ts) object passed to the dialog.
When the dialog action is selected by clicking, the `data.select` stream will be completed.
### RowFilter and ImageResolver
@@ -113,7 +147,7 @@ section of the Document List page to learn how these functions are implemented.
### Using the breadcrumbTransform function
The `breadcrumbTransform` property of `ContentNodeSelectorComponentData` lets you modify
The `breadcrumbTransform` property of [`ContentNodeSelectorComponentData`](../../lib/content-services/content-node-selector/content-node-selector.component-data.interface.ts) lets you modify
the Node object that is used to generate the
list of breadcrumbs. You can use this, for example, to remove path elements that are not
relevant to the use case. See the [Breadcrumb component](breadcrumb.component.md) page for an

View File

@@ -1,7 +1,7 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-04-12
Last reviewed: 2018-05-03
---
# Custom Resources service
@@ -12,49 +12,49 @@ Manages Document List information that is specific to a user.
### Methods
- `getRecentFiles(personId: string, pagination: PaginationModel): Observable<NodePaging>`<br/>
Gets files recently accessed by a user.
- `personId: string` - ID of the user
- `pagination: PaginationModel` - Specifies how to paginate the results
- **Returns** `Observable<NodePaging>` - List of nodes for the recently used files
- `loadFavorites(pagination: PaginationModel, includeFields: string[] = []): Observable<NodePaging>`<br/>
Gets favorite files for the current user.
- `pagination: PaginationModel` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<NodePaging>` - List of favorite files
- `loadMemberSites(pagination: PaginationModel): Observable<NodePaging>`<br/>
Gets sites that the current user is a member of.
- `pagination: PaginationModel` - Specifies how to paginate the results
- **Returns** `Observable<NodePaging>` - List of sites
- `loadSites(pagination: PaginationModel): Observable<NodePaging>`<br/>
Gets all sites in the respository.
- `pagination: PaginationModel` - Specifies how to paginate the results
- **Returns** `Observable<NodePaging>` - List of sites
- `loadTrashcan(pagination: PaginationModel, includeFields: string[] = []): Observable<DeletedNodesPaging>`<br/>
Gets all items currently in the trash.
- `pagination: PaginationModel` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<DeletedNodesPaging>` - List of deleted items
- `loadSharedLinks(pagination: PaginationModel, includeFields: string[] = []): Observable<NodePaging>`<br/>
Gets shared links for the current user.
- `pagination: PaginationModel` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<NodePaging>` - List of shared links
- `isCustomSource(folderId: string): boolean`<br/>
Is the folder ID one of the well-known aliases?
- `FolderId` - Folder ID name to check
- **Returns** `Observable<NodePaging>` - True if the ID is a well-known name, false otherwise
- `loadFolderByNodeId(nodeId: string, pagination: PaginationModel, includeFields: string[]): Observable<NodePaging>`<br/>
Gets a folder's contents.
- `nodeId: string` - ID of the target folder node
- `pagination: PaginationModel` - Specifies how to paginate the results
- `includeFields: string[] = []` - List of data field names to include in the results
- **Returns** `Observable<NodePaging>` - List of items contained in the folder
- `getCorrespondingNodeIds(nodeId: string, pagination: PaginationModel): Observable<string[]>`<br/>
- **getCorrespondingNodeIds**(nodeId: `string` = `null`, pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string[]>`<br/>
Gets the contents of one of the well-known aliases in the form of node ID strings.
- `nodeId: string` - ID of the target folder node
- `pagination: PaginationModel` - Specifies how to paginate the results
- **Returns** `Observable<string[]>` - List of node IDs
- _nodeId:_ `string` - ID of the target folder node
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string[]>` - List of node IDs
- **getRecentFiles**(personId: `string` = `null`, pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets files recently accessed by a user.
- _personId:_ `string` - ID of the user
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of nodes for the recently used files
- **isCustomSource**(folderId: `string` = `null`): `boolean`<br/>
Is the folder ID one of the well-known aliases?
- _folderId:_ `string` - Folder ID name to check
- **Returns** `boolean` - True if the ID is a well-known name, false otherwise
- **loadFavorites**(pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets favorite files for the current user.
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of favorite files
- **loadFolderByNodeId**(nodeId: `string` = `null`, pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`, includeFields: `string[]` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets a folder's contents.
- _nodeId:_ `string` - ID of the target folder node
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of items contained in the folder
- **loadMemberSites**(pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets sites that the current user is a member of.
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of sites
- **loadSharedLinks**(pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets shared links for the current user.
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of shared links
- **loadSites**(pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets all sites in the respository.
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of sites
- **loadTrashcan**(pagination: [`PaginationModel`](../../lib/core/models/pagination.model.ts) = `null`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`DeletedNodesPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/DeletedNodesPaging.md)`>`<br/>
Gets all items currently in the trash.
- _pagination:_ [`PaginationModel`](../../lib/core/models/pagination.model.ts) - Specifies how to paginate the results
- _includeFields:_ `string[]` - List of data field names to include in the results
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`DeletedNodesPaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/DeletedNodesPaging.md)`>` - List of deleted items
## Details

View File

@@ -6,24 +6,24 @@ Last reviewed: 2018-03-29
# Document Actions service
Implements the document menu actions for the Document List component.
Implements the document menu actions for the [Document List component](../content-services/document-list.component.md).
## Class members
### Methods
- `canExecuteAction(obj: any = null): boolean`<br/>
- **canExecuteAction**(obj: `any` = `null`): `boolean`<br/>
Checks if actions can be executed for an item.
- `obj: any = null` - Item to receive an action
- _obj:_ `any` - Item to receive an action
- **Returns** `boolean` - True if the action can be executed on this item, false otherwise
- `getHandler(key: string = null): ContentActionHandler`<br/>
- **getHandler**(key: `string` = `null`): [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts)<br/>
Gets the handler for an action.
- `key: string = null` - Identifier of the action
- **Returns** `ContentActionHandler` - The handler for the action
- `setHandler(key: string = null, handler: ContentActionHandler = null): boolean`<br/>
- _key:_ `string` - Identifier of the action
- **Returns** [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts) - The handler for the action
- **setHandler**(key: `string` = `null`, handler: [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts) = `null`): `boolean`<br/>
Sets a new handler for an action.
- `key: string = null` - Identifier of the action
- `handler: ContentActionHandler = null` - Handler for the action
- _key:_ `string` - Identifier of the action
- _handler:_ [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts) - Handler for the action
- **Returns** `boolean` - False if the key was an empty/null string, true otherwise
## Details

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Document Library model
Defines classes for use with the Content Services node API.
@@ -109,9 +110,11 @@ class PathElementEntity {
```
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
## See also
- [Document list component](document-list.component.md)
- [Nodes api service](../core/nodes-api.service.md)
<!-- seealso end -->
- [Document list component](document-list.component.md)
- [Nodes api service](../core/nodes-api.service.md)
<!-- seealso end -->

View File

@@ -14,12 +14,15 @@ Displays the documents from a repository.
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [DOM Events](#dom-events)
- [Conditional visibility](#conditional-visibility)
- [Card view](#card-view)
- [Pagination strategy](#pagination-strategy)
- [Data Sources](#data-sources)
@@ -52,48 +55,51 @@ Displays the documents from a repository.
</adf-document-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| display | `string` | `DisplayMode.List` | Change the display mode of the table. Can be "list" or "gallery". |
| permissionsStyle | `PermissionStyleModel[]` | `[]` | Define a set of CSS styles styles to apply depending on the permission of the user on that node. See the Permission Style model page for further details and examples. |
| locationFormat | `string` | `'/'` | The default route for all the location-based columns (if declared). |
| navigate | `boolean` | `true` | Toggles navigation to folder content or file preview |
| showHeader | `boolean` | `true` | Toggles the header |
| navigationMode | `string` | See description | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". Default value: "dblclick" |
| thumbnails | `boolean` | `false` | Show document thumbnails rather than icons |
| selectionMode | `string` | `'single'` | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| multiselect | `boolean` | `false` | Toggles multiselect mode |
| contentActions | `boolean` | `false` | Toggles content actions for each row |
| contentActionsPosition | `string` | `'right'` | Position of the content actions dropdown menu. Can be set to "left" or "right". |
| contextMenuActions | `boolean` | `false` | Toggles context menus for each row |
| emptyFolderImageUrl | `string` | See description | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
| allowDropFiles | `boolean` | `false` | Toggle file drop support for rows (see Upload Directive for further details |
| sorting | `string[]` | | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. |
| -- | -- | -- | -- |
| allowDropFiles | `boolean` | false | Toggle file drop support for rows (see [Upload Directive](../core/upload.directive.md) for further details |
| contentActions | `boolean` | false | Toggles content actions for each row |
| contentActionsPosition | `string` | "right" | Position of the content actions dropdown menu. Can be set to "left" or "right". |
| contextMenuActions | `boolean` | false | Toggles context menus for each row |
| currentFolderId | `string` | null | The ID of the folder node to display or a reserved string alias for special sources |
| display | `string` | [`DisplayMode`](../../lib/core/datatable/components/datatable/datatable.component.ts).List | Change the display mode of the table. Can be "list" or "gallery". |
| emptyFolderImageUrl | `string` | "./assets/images/empty_doc_lib.svg" | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
| enableInfiniteScrolling | `boolean` | false | Set document list to work in infinite scrolling mode |
| folderNode | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | null | Currently displayed folder node |
| imageResolver | `any \| null` | null | Custom image resolver |
| includeFields | `string[]` | | Include additional information about the node in the server request.for example: association, isLink, isLocked and others. |
| loading | `boolean` | false | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
| locationFormat | `string` | "/" | The default route for all the location-based columns (if declared). |
| maxItems | `number` | | Default value is stored into user preference settings use it only if you are not using the pagination |
| multiselect | `boolean` | false | Toggles multiselect mode |
| navigate | `boolean` | true | Toggles navigation to folder content or file preview |
| navigationMode | `string` | [`DocumentListComponent`](../content-services/document-list.component.md).DOUBLE_CLICK_NAVIGATION | User interaction for folder navigation or file preview. Valid values are "click" and "dblclick". Default value: "dblclick" |
| node | [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts) | null | The Document list will show all the nodes contained in the [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts) entity |
| permissionsStyle | [`PermissionStyleModel`](../../lib/content-services/document-list/models/permissions-style.model.ts)`[]` | \[] | Define a set of CSS styles styles to apply depending on the permission of the user on that node. See the [Permission Style model](../../lib/content-services/document-list/models/permissions-style.model.ts) page for further details and examples. |
| rowFilter | `any \| null` | null | Custom row filter |
| rowStyle | `string` | | The inline style to apply to every row. See the Angular NgStyle docs for more details and usage examples. |
| rowStyleClass | `string` | | The CSS class to apply to every row |
| loading | `boolean` | `false` | Toggles the loading state and animated spinners for the component. Used in combination with `navigate=false` to perform custom navigation and loading state indication. |
| rowFilter | `any` | `null` | Custom row filter |
| imageResolver | `any` | `null` | Custom image resolver |
| currentFolderId | `string` | `null` | The ID of the folder node to display or a reserved string alias for special sources |
| folderNode | `MinimalNodeEntryEntity` | `null` | Currently displayed folder node |
| node | `NodePaging` | `null` | The Document list will show all the nodes contained in the NodePaging entity |
| maxItems | `number` | | Default value is stored into user preference settings |
| skipCount | `number` | `0` | Number of elements to skip over for pagination purposes |
| enableInfiniteScrolling | `boolean` | `false` | Set document list to work in infinite scrolling mode |
| includeFields | `string[]` | `[]` | Include additional information about the node in the server request.for example: association, isLink, isLocked and others. |
| rowStyleClass | `string` | | The CSS class to apply to every row |
| selectionMode | `string` | "single" | Row selection mode. Can be null, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| showHeader | `boolean` | true | Toggles the header |
| skipCount | `number` | 0 | Number of elements to skip over for pagination purposes |
| sorting | `string[]` | ['name', 'asc'] | Defines default sorting. The format is an array of 2 strings `[key, direction]` i.e. `['name', 'desc']` or `['name', 'asc']`. Set this value only if you want to override the default sorting detected by the component based on columns. |
| sortingMode | `string` | "client" | Defines sorting mode. Can be either `client` or `server`. |
| thumbnails | `boolean` | false | Show document thumbnails rather than icons |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| nodeClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user clicks a list node |
| nodeDblClick | `EventEmitter<NodeEntityEvent>` | Emitted when the user double-clicks a list node |
| folderChange | `EventEmitter<NodeEntryEvent>` | Emitted when the current display folder changes |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the API fails to get the Document List data |
| folderChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`NodeEntryEvent`](../../lib/content-services/document-list/components/node.event.ts)`>` | Emitted when the current display folder changes |
| nodeClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`NodeEntityEvent`](../../lib/content-services/document-list/components/node.event.ts)`>` | Emitted when the user clicks a list node |
| nodeDblClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`NodeEntityEvent`](../../lib/content-services/document-list/components/node.event.ts)`>` | Emitted when the user double-clicks a list node |
| preview | `EventEmitter<NodeEntityEvent>` | Emitted when the user acts upon files with either single or double click (depends on `navigation-mode`). Useful for integration with the Viewer component. |
| ready | `EventEmitter<NodePaging>` | Emitted when the Document List has loaded all items and is ready for use |
| error | `EventEmitter<any>` | Emitted when the API fails to get the Document List data |
| ready | `EventEmitter<NodePaging>` | Emitted when the Document List has loaded all items and is ready for use |
## Details
@@ -104,7 +110,7 @@ best.
### DOM Events
Below are the DOM events the DocumentList component emits.
All of them are *bubbling*, meaning you can handle them in any component up the parent hierarchy, even if the DocumentList is wrapped by one or more other components.
All of them are _bubbling_, meaning you can handle them in any component up the parent hierarchy, even if the DocumentList is wrapped by one or more other components.
| Name | Description |
| ---- | ----------- |
@@ -124,7 +130,7 @@ have at least the following properties as part of the `Event.detail` property va
```
See the [DataTable](../core/datatable.component.md) documentation for further details about
the other DOM events that the Document List component bubbles up from the DataTable.
the other DOM events that the [Document List component](../content-services/document-list.component.md) bubbles up from the DataTable.
Below is a basic example of handling DOM events in the parent elements.
@@ -141,6 +147,18 @@ Below is a basic example of handling DOM events in the parent elements.
</div>
```
### Conditional visibility
You can use `ngIf` directives to provide conditional visibility support for the columns:
```html
<data-column
*nfIg="showNameColumn"
key="name"
title="MY.RESOURCE.KEY">
</data-column>
```
### Card view
The Document List has an option to display items as "cards" instead of the
@@ -157,16 +175,14 @@ Set the `[display]` property to "gallery" to enable card view mode:
</adf-document-list>
```
### Pagination strategy
The Document List by default supports 2 types of pagination: **finite** and **infinite**:
- With **finite** pagination, the Document List needs 2 parameters: `maxItems` and `skipCount`. These set the maximum number of items shown in a single page and the start
offset of the first item in the page (ie, the number of items you need to skip to get there).
offset of the first item in the page (ie, the number of items you need to skip to get there).
- You can enable **infinite** pagination by setting the same parameters plus an extra third
parameter: `enableInfiniteScrolling`.
parameter: `enableInfiniteScrolling`.
### Data Sources
@@ -186,7 +202,7 @@ You can use one of the well-known reserved aliases:
#### Document List aliases
The Document List component also provides support for the following reserved aliases:
The [Document List component](../content-services/document-list.component.md) also provides support for the following reserved aliases:
- `-trashcan-`,
- `-sharedlinks-`
@@ -198,7 +214,7 @@ The Document List component also provides support for the following reserved ali
Note that due to the nature of the data, these sources do not support navigation.
You may want to handle single and double clicks yourself to perform navigation to other sources.
The Document List component supports default presets for all the custom sources mentioned earlier.
The [Document List component](../content-services/document-list.component.md) supports default presets for all the custom sources mentioned earlier.
If you don't provide any custom column definition with the [Data Column](#custom-columns)
component then a default preset will be automatically used at runtime.
@@ -440,8 +456,8 @@ documentation for a full explanation of the component lifecycle.
### Underlying node object
The Document List component assigns an instance of
[MinimalNode](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md]
The [Document List component](../content-services/document-list.component.md) assigns an instance of
[MinimalNode](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/MinimalNode.md)
(defined in the [Alfresco JS API](https://github.com/Alfresco/alfresco-js-api)) as the data context
for each row. You can make use of the properties of this object when defining custom columns:
@@ -625,7 +641,7 @@ This single extra line in the template enables context menu items for documents
### Navigation mode
By default, the Document List component uses 'double-click' mode for navigation.
By default, the [Document List component](../content-services/document-list.component.md) uses 'double-click' mode for navigation.
That means that the user will see the contents of the folder when they double-click its name
or icon (in a similar manner to Google Drive). However, there is also a single-click mode that
may be sometimes be useful.
@@ -644,7 +660,7 @@ The following example switches navigation to single clicks:
You can create a custom row filter function that returns `true` if the row should be
displayed or `false` if it should be hidden.
A typical row filter implementation receives a `ShareDataRow` object as a parameter:
A typical row filter implementation receives a [`ShareDataRow`](../../lib/content-services/document-list/data/share-data-row.model.ts) object as a parameter:
```ts
myFilter(row: ShareDataRow): boolean {
@@ -695,7 +711,7 @@ are resolved (ie, which image is shown for which item).
**Note:** Image resolvers are executed only for columns of the `image` type.
A typical image resolver implementation receives `DataRow` and `DataColumn` objects as parameters:
A typical image resolver implementation receives [`DataRow`](../../lib/core/datatable/data/data-row.model.ts) and [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) objects as parameters:
```ts
myImageResolver(row: DataRow, col: DataColumn): string {

View File

@@ -6,58 +6,65 @@ Last reviewed: 2018-04-16
# Document List service
Implements node operations used by the Document List component.
Implements node operations used by the [Document List component](../content-services/document-list.component.md).
## Class members
### Methods
- `copyNode(nodeId: string = null, targetParentId: string = null): any`<br/>
- **copyNode**(nodeId: `string` = `null`, targetParentId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Copy a node to destination node
- `nodeId: string = null` - The id of the node to be copied
- `targetParentId: string = null` - The id of the folder where the node will be copied
- **Returns** `any` - NodeEntry for the copied node
- `createFolder(name: string = null, parentId: string = null): Observable<MinimalNodeEntity>`<br/>
Create a new folder in the path.
- `name: string = null` - Folder name
- `parentId: string = null` - Parent folder ID
- **Returns** `Observable<MinimalNodeEntity>` - Details of the created folder node
- `deleteNode(nodeId: string = null): Observable<any>`<br/>
- _nodeId:_ `string` - The id of the node to be copied
- _targetParentId:_ `string` - The id of the folder where the node will be copied
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - NodeEntry for the copied node
- **createFolder**(name: `string` = `null`, parentId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntity`](../content-services/document-library.model.md)`>`<br/>
Creates a new folder in the path.
- _name:_ `string` - Folder name
- _parentId:_ `string` - Parent folder ID
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntity`](../content-services/document-library.model.md)`>` - Details of the created folder node
- **deleteNode**(nodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Deletes a node.
- `nodeId: string = null` - ID of the node to delete
- **Returns** `Observable<any>` - Empty response when the operation is complete
- `getDefaultMimeTypeIcon(): string`<br/>
- _nodeId:_ `string` - ID of the node to delete
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Empty response when the operation is complete
- **getDefaultMimeTypeIcon**(): `string`<br/>
Gets a default icon for MIME types with no specific icon.
- **Returns** `string` - Path to the icon file
- `getDocumentThumbnailUrl(node: MinimalNodeEntity = null): string`<br/>
- **getDocumentThumbnailUrl**(node: [`MinimalNodeEntity`](../content-services/document-library.model.md) = `null`): `string`<br/>
Get thumbnail URL for the given document node.
- `node: MinimalNodeEntity = null` - Node to get URL for.
- _node:_ [`MinimalNodeEntity`](../content-services/document-library.model.md) - Node to get URL for.
- **Returns** `string` - Thumbnail URL string
- `getFolder(folder: string = null, opts?: any = null, includeFields: string[] = []): Observable<NodePaging>`<br/>
- **getFolder**(folder: `string` = `null`, opts?: `any` = `null`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets the folder node with the specified relative name path below the root node.
- `folder: string = null` - Path to folder.
- `opts?: any = null` - (Optional) Options.
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** `Observable<NodePaging>` - Details of the folder
- `getFolderNode(nodeId: string = null, includeFields: string[] = []): Promise<MinimalNodeEntryEntity>`<br/>
Gets a folder node via its node ID.
- `nodeId: string = null` - ID of the folder node
- `includeFields: string[] = []` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** `Promise<MinimalNodeEntryEntity>` - Details of the folder
- `getMimeTypeIcon(mimeType: string = null): string`<br/>
- _folder:_ `string` - Path to folder.
- _opts:_ `any` - (Optional) Options.
- _includeFields:_ `string[]` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - Details of the folder
- **getFolderNode**(nodeId: `string` = `null`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- _nodeId:_ `string` - ID of the folder node
- _includeFields:_ `string[]` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Details of the folder
- **getMimeTypeIcon**(mimeType: `string` = `null`): `string`<br/>
Gets the icon that represents a MIME type.
- `mimeType: string = null` - MIME type to get the icon for
- _mimeType:_ `string` - MIME type to get the icon for
- **Returns** `string` - Path to the icon file
- `hasPermission(node: any = null, permission: PermissionsEnum | string = null): boolean`<br/>
Checks if a node has the specified permission.
- `node: any = null` - Target node
- `permission: PermissionsEnum | string = null` - Permission level to query
- **getNode**(nodeId: `string` = `null`, includeFields: `string[]` = `[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>`<br/>
Gets a node via its node ID.
- _nodeId:_ `string` - ID of the target node
- _includeFields:_ `string[]` - Extra information to include (available options are "aspectNames", "isLink" and "association")
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>` - Details of the folder
- **hasPermission**(node: `any` = `null`, permission: [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)` | string` = `null`): `boolean`<br/>
- _node:_ `any` - Target node
- _permission:_ [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)` | string` - Permission level to query
- **Returns** `boolean` - True if the node has the permission, false otherwise
- `moveNode(nodeId: string = null, targetParentId: string = null): any`<br/>
Move a node to destination node
- `nodeId: string = null` - The id of the node to be moved
- `targetParentId: string = null` - The id of the folder where the node will be moved
- **Returns** `any` - NodeEntry for the moved node
- **moveNode**(nodeId: `string` = `null`, targetParentId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Moves a node to destination node.
- _nodeId:_ `string` - The id of the node to be moved
- _targetParentId:_ `string` - The id of the folder where the node will be moved
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - NodeEntry for the moved node
## Details

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Dropdown Breadcrumb Component
Indicates the current position within a navigation hierarchy using a dropdown menu.
@@ -17,20 +19,30 @@ Indicates the current position within a navigation hierarchy using a dropdown me
</adf-dropdown-breadcrumb>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| folderNode | `MinimalNodeEntryEntity` | `null` | Active node, builds UI based on folderNode.path.elements collection. |
| root | `string` | `null` | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
| rootId | `string` | `null` | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
| target | `DocumentListComponent` | | (optional) Document List component to operate with. The list will update when the breadcrumb is clicked. |
| -- | -- | -- | -- |
| folderNode | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | null | Active node, builds UI based on folderNode.path.elements collection. |
| maxItems | `number` | | Maximum number of nodes to display before wrapping them with a dropdown element. |
| root | `string` | null | (optional) Name of the root element of the breadcrumb. You can use this property to rename "Company Home" to "Personal Files" for example. You can use an i18n resource key for the property value. |
| rootId | `string` | null | (optional) The id of the root element. You can use this property to set a custom element the breadcrumb should start with. |
| target | [`DocumentListComponent`](../content-services/document-list.component.md) | | (optional) [Document List component](../content-services/document-list.component.md) to operate with. The list will update when the breadcrumb is clicked. |
| transform | `function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| navigate | `EventEmitter<PathElementEntity>` | Emitted when the user clicks on a breadcrumb. |
| -- | -- | -- |
| navigate | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PathElementEntity`](../../lib/content-services/document-list/models/document-library.model.ts)`>` | Emitted when the user clicks on a breadcrumb. |
## Details
Although this component inherits the `maxItems` property from the [Breadcrumb component,](../content-services/breadcrumb.component.md) the
"crumbs" are _always_ shown on a menu. By contrast, the Breadcrumb component only falls back
to a menu when its maximum number of nodes is exceeded.
## See also

View File

@@ -13,7 +13,6 @@ Provides drag-and-drop features for an element such as a `div`.
```html
<div [file-draggable]="true" id="DragAndDropBorder" class="drag-and-drop-border"
(filesDropped)="onFilesDropped($event)"
(filesEntityDropped)="onFilesEntityDropped($event)"
(folderEntityDropped)="onFolderEntityDropped($event)"
dropzone="" webkitdropzone="*" #dragAndDropArea>
<ng-content></ng-content>
@@ -46,13 +45,13 @@ Some sample CSS to show the drag and drop area:
| Name | Type | Description |
| -- | -- | -- |
| filesDropped | `EventEmitter<File[]>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
| filesEntityDropped | `EventEmitter<any>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
| filesDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<File[]>` | Emitted when one or more files are dragged and dropped onto the draggable element. |
| filesEntityDropped | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | (**Deprecated:** in 2.4.0: use `filesDropped` instead. Emitted when one or more files are dragged and dropped onto the draggable element.) |
| folderEntityDropped | `EventEmitter<any>` | Emitted when a directory is dragged and dropped onto the draggable element. |
## Details
Typically you would use the Upload Drag Area component instead of this directive.
Typically you would use the [Upload Drag Area component](../content-services/upload-drag-area.component.md) instead of this directive.
### Event handler implementations
@@ -66,11 +65,6 @@ export class SomeComponent implements OnInit {
}
}
onFilesEntityDropped(item: any): void {
// Use for example the uploadService to upload files to ACS
console.log('# of files dropped: ', item);
}
onFolderEntityDropped(folder: any): void {
if (folder.isDirectory) {
// Use for example the uploadService to upload folder content to ACS

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# File Uploading Dialog Component
Shows a dialog listing all the files uploaded with the Upload Button or Drag Area components.
@@ -12,17 +14,19 @@ Shows a dialog listing all the files uploaded with the Upload Button or Drag Are
<adf-file-uploading-dialog></adf-file-uploading-dialog>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| position | `string` | `'right'` | Dialog position. Can be 'left' or 'right'. |
| -- | -- | -- | -- |
| position | `string` | "right" | Dialog position. Can be 'left' or 'right'. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | `EventEmitter<any>` | Emitted when a file upload goes in error |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when a file in the list has an error. |
## Details

View File

@@ -6,24 +6,24 @@ Last reviewed: 2018-04-05
# Folder Actions service
Implements the folder menu actions for the Document List component.
Implements the folder menu actions for the [Document List component](../content-services/document-list.component.md).
## Class members
### Methods
- `canExecuteAction(obj: any = null): boolean`<br/>
- **canExecuteAction**(obj: `any` = `null`): `boolean`<br/>
Checks if an action is available for a particular item.
- `obj: any = null` - Item to check
- _obj:_ `any` - Item to check
- **Returns** `boolean` - True if the action is available, false otherwise
- `getHandler(key: string = null): ContentActionHandler`<br/>
- **getHandler**(key: `string` = `null`): [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts)<br/>
Gets the handler function for an action.
- `key: string = null` - Identifier for the action
- **Returns** `ContentActionHandler` - The handler function
- `setHandler(key: string = null, handler: ContentActionHandler = null): boolean`<br/>
- _key:_ `string` - Identifier for the action
- **Returns** [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts) - The handler function
- **setHandler**(key: `string` = `null`, handler: [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts) = `null`): `boolean`<br/>
Sets a new handler function for an action.
- `key: string = null` - Identifier for the action
- `handler: ContentActionHandler = null` - The new handler function
- _key:_ `string` - Identifier for the action
- _handler:_ [`ContentActionHandler`](../../lib/content-services/document-list/models/content-action.model.ts) - The new handler function
- **Returns** `boolean` - True if the key was a valid action identifier, false otherwise
## Details

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-10
Last reviewed: 2018-05-03
---
# Folder Create directive
@@ -13,7 +13,9 @@ Creates folders.
```html
<adf-toolbar>
<button mat-icon-button
[adf-create-folder]="documentList.currentFolderId">
[adf-create-folder]="documentList.currentFolderId"
title="Title of the dialog"
(success)="doSomething($event)">
<mat-icon>create_new_folder</mat-icon>
</button>
</adf-toolbar>
@@ -29,17 +31,24 @@ Creates folders.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| nodeType | `string` | "cm:folder" | Type of node to create. |
| adf-create-folder | `string` | DEFAULT_FOLDER_PARENT_ID | Parent folder where the new folder will be located after creation. |
| title | `string` | null | Title of folder creation dialog. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when an error occurs (for example a folder with same name already exists) |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the folder is created successfully. |
## Details
Pass this directive the id of the parent folder where you want the new folder node to be created.
If no value is provided, the '-my-' alias is used.
This will open a Folder Dialog component to receive data for the new folder. If the data is valid
then the dialog will emit a `folderCreate` event when it closes.
This will open a [Folder Dialog component](../../lib/content-services/dialogs/folder.dialog.ts) to receive data for the new folder. If the data is valid
then the dialog will emit a `success` event when it closes.
## See also
- [Folder Edit directive](folder-edit.directive.md)

View File

@@ -13,7 +13,9 @@ Allows folders to be edited.
```html
<adf-toolbar title="toolbar example">
<button mat-icon-button
[adf-edit-folder]="documentList.selection[0]?.entry">
[adf-edit-folder]="documentList.selection[0]?.entry"
title="Title of the dialog"
(success)="doSomething($event)">
<mat-icon>create</mat-icon>
</button>
</adf-toolbar>
@@ -29,15 +31,17 @@ Allows folders to be edited.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| adf-edit-folder | `MinimalNodeEntryEntity` | | Folder node to edit. |
| adf-edit-folder | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | Folder node to edit. |
| title | `string` | null | Title of folder edit dialog. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when an error occurs (for example a folder with same name already exists) |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs (eg, a folder with same name already exists). |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` | Emitted when the folder has been edited successfully. |
## Details
Pass this directive a folder to edit its name and description using a Folder Dialog component.
Pass this directive a folder to edit its name and description using a [Folder Dialog component](../../lib/content-services/dialogs/folder.dialog.ts).
If the data is valid then the dialog emits a `folderEdit` event when it closes.

View File

@@ -1,7 +1,9 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-06-08
---
# Inherit Permission directive
Update the current node by adding/removing the inherited permissions.
@@ -15,18 +17,22 @@ Update the current node by adding/removing the inherited permissions.
(updated)="onUpdatedPermissions($node)">PERMISSION</button>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | nodeId where to add/remove inherited permissions |
| nodeId | `string` | | ID of the node to add/remove inherited permissions |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| updated | `EventEmitter<MinimalNodeEntryEntity>` | Emitted when the node is updated. |
| updated | [`EventEmitter<MinimalNodeEntryEntity>`](../content-services/document-library.model.md) | Emitted when the node is updated |
## Details
This directive switches on/off the inheritance on the permission based on what is set on the node entity.
So if the node has inherited permissions, this will remove them viceversa if the node does not have the inherited permission this will add them.
This directive switches inheritance of permissions on or off depending on what is set in
the node entity. So if the node has inherited permissions, this will remove them and
vice versa. If the node does not have inherited permissions then this will add them.

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Like component
Allows a user to add "likes" to an item.
@@ -14,17 +15,19 @@ Allows a user to add "likes" to an item.
<adf-like [nodeId]="nodeId"></adf-like>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | Identifier of a node to apply likes to. |
| -- | -- | -- | -- |
| nodeId | `string` | | Identifier of a node to apply likes to. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| changeVote | `EventEmitter<{}>` | Emitted when the "vote" gets changed. |
| -- | -- | -- |
| changeVote | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the "vote" gets changed. |
## See also

View File

@@ -29,4 +29,4 @@ Allows folders and/or files to be downloaded, with multiple nodes packed as a '.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| adfNodeDownload | `MinimalNodeEntity[]` | | Nodes to download. |
| adfNodeDownload | [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]` | | Nodes to download. |

View File

@@ -8,12 +8,6 @@ Last reviewed: 2018-04-10
Locks a node.
When the directive is clicked a dialog is shown and you can lock or unlock a file (folder cannot be locked)
there are two types of lock: indefinite lock and time lock.
If the time is not selected the user will lock the file it until will not unlock it
When a file is locked it can be locked and unlocked by default only by the user that creates the lock but you can also allow the other file owners to modify it
![adf-lock](../docassets/images/lock-directive.png)
## Basic Usage
```html
@@ -22,15 +16,25 @@ When a file is locked it can be locked and unlocked by default only by the user
</button>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| adf-node-lock | `MinimalNodeEntryEntity` | | Node to lock. |
| -- | -- | -- | -- |
| adf-node-lock | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | Node to lock/unlock. |
## Details
When the decorated element (eg, div) is clicked, a dialog is shown to let you lock
or unlock a file (a folder cannot be locked).
There are two types of lock: indefinite lock and time lock.
If the time is not selected the user will lock the file it until will not unlock it
When a file is locked it can be locked and unlocked by default only by the user that creates the lock but you can also allow the other file owners to modify it
![adf-lock](../docassets/images/lock-directive.png)
This calls the `openLockNodeDialog` method from the
[Content Node Dialog service](content-node-dialog.service.md) method when clicked,
and disables the target button if the provided node is not a file or the user doesn't
have permissions.
have permissions.

View File

@@ -0,0 +1,36 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-05-23
---
# Node permission dialog service
Displays dialogs to let the user set node permissions.
## Class members
### Methods
- **close**()<br/>
Closes the currently-open dialog.
- **openAddPermissionDialog**(nodeId: `string` = `null`, title?: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntity`](../content-services/document-library.model.md)`[]>`<br/>
Opens a dialog to add permissions to a node.
- _nodeId:_ `string` - ID of the target node
- _title:_ `string` - (Optional) Dialog title
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntity`](../content-services/document-library.model.md)`[]>` - Node with updated permissions
- **updateNodePermissionByDialog**(nodeId?: `string` = `null`, title?: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
Opens a dialog to update permissions for a node.
- _nodeId:_ `string` - (Optional) ID of the target node
- _title:_ `string` - (Optional) Dialog title
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Node with updated permissions
## Details
This service sets up an [Add Permission Dialog component](../content-services/add-permission-dialog.component.md) to provide a user
interface for updating permissions.
## See also
- [Node Permission service](node-permission.service.md)
- [Add Permission Dialog component](add-permission-dialog.component.md)

View File

@@ -1,36 +1,59 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Node Permission service
Manages the role permissions for the content nodes
Manages role permissions for content nodes.
## Methods
## Class members
- `getNodeRoles(node: MinimalNodeEntryEntity): Observable<string[]>`
Gets a list of roles for the current node.
- `node` - the target node
- `updatePermissionRoles(node: MinimalNodeEntryEntity, updatedPermissionRole: PermissionElement): Observable<MinimalNodeEntryEntity>`
Update the given permission for the related node
- `node` - the target node
- `updatedPermissionRole` the permission role to update/add
### Methods
- `getGroupMemeberByGroupName(groupName: string, opts?: any): Observable<GroupMemberPaging>`
Perform a call to the groups api to retrieve all the members related to that group name.
- `groupName` the members group name
- `opts` additional parameters to perform the call
- **getGroupMemeberByGroupName**(groupName: `string` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<GroupMemberPaging>`<br/>
Gets all members related to a group name.
- _groupName:_ `string` - Name of group to look for members
- _opts:_ `any` - (Optional) Extra options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<GroupMemberPaging>` - List of members
- **getNodeRoles**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string[]>`<br/>
Gets a list of roles for the current node.
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - The target node
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string[]>` - Array of strings representing the roles
- **removePermission**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`, permissionToRemove: `PermissionElement` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) -
- _permissionToRemove:_ `PermissionElement` -
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` -
- **updateLocallySetPermissions**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`, nodes: [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]` = `null`, nodeRole: `string[]` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) -
- _nodes:_ [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]` -
- _nodeRole:_ `string[]` -
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` -
- **updateNodePermissions**(nodeId: `string` = `null`, permissionList: [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
- _nodeId:_ `string` -
- _permissionList:_ [`MinimalNodeEntity`](../content-services/document-library.model.md)`[]` -
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` -
- **updatePermissionRole**(node: [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) = `null`, updatedPermissionRole: `PermissionElement` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>`<br/>
Updates the permission for a node.
- _node:_ [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) - Target node
- _updatedPermissionRole:_ `PermissionElement` - Permission role to update or add
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`MinimalNodeEntryEntity`](../content-services/document-library.model.md)`>` - Node with updated permission
## Details
Content Services supports
This service needs the support for the groups api fo content services that is available from version 5.2.1
This service requires the Content Services Groups API, which is available from version 5.2.1.
See the
[Groups API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/GroupssApi.md)
in the Alfresco JS API for more information about the types returned by Tag
service methods and for the implementation of the REST API the service is
[Groups API docs](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/GroupssApi.md)
in the Alfresco JS API for more information about the types returned by
the methods and for the implementation of the REST API the service is
based on.
## See also

View File

@@ -26,29 +26,26 @@ Creates and manages public shared links for files.
</adf-document-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| node | `MinimalNodeEntity` | | Nodes to share. |
| baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link |
| node | [`MinimalNodeEntity`](../content-services/document-library.model.md) | | Nodes to share. |
| baseShareUrl | `string` | | baseShareUrl to add as prefix to the generated link |
## Details
This dialog will generate a link with the form "baseShareUrl + sharedId".
For example, if you set the input parameter as follows:
```
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
```
[baseShareUrl]="http://localhost:8080/myrouteForShareFile/"
...then the directive will ask the [Content service](../core/content.service.md) to generate
a `sharedId` for the file. This will create a URL like the following:
```
http://localhost:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
```
http://localhost:8080/myrouteForShareFile/NEW_GENERATED_SHAREID
To use this,ou will need to implement some code that gets the `NEW_GENERATED_SHAREID` with the router
and passes it to a [Viewer component](../core/viewer.component.md):
@@ -58,4 +55,4 @@ and passes it to a [Viewer component](../core/viewer.component.md):
[sharedLinkId]="NEW_GENERATED_SHAREID"
[allowGoBack]="false">
</adf-viewer>
```
```

View File

@@ -1,7 +1,7 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-03-23
Last reviewed: 2018-05-03
---
# Permission List Component
@@ -17,21 +17,35 @@ Shows node permissions as a table.
</adf-permission-list>
```
If permissions list is empty, `No permissions` text is displayed,
or custom template can be added:
```html
<adf-permission-list [nodeId]="nodeId">
<adf-no-permission-template>
Custom no permission template!
</adf-no-permission-template>
</adf-permission-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | `null` | ID of the node whose permissions you want to show. |
| -- | -- | -- | -- |
| nodeId | `string` | "" | ID of the node whose permissions you want to show. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| update | `PermissionElement` | Emitted when the permission is updated. |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | |
| update | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<PermissionElement>` | Emitted when the permission is updated. |
## Details
This component uses a [Datatable component](../core/datatable.component.md) to show the
permissions retrieved from the [Node service](../core/node.service.md).
For the locallyset permissions a role dropdown will be showed allowing the user to change it.
When user select a new value, the permission role is automatically updated and the `update` event is thrown.
For the locally set permissions a role dropdown will be shown to let the user select a new role.
When the user selects a new value, the permission role is automatically updated and the `update` event is emitted.

View File

@@ -2,11 +2,14 @@
Added: v2.0.0
Status: Active
---
# Permission Style model
Sets custom CSS styles for rows of a Document List according to the item's permissions.
## Properties
## Class members
### Properties
| Property | Type | Description |
| -------- | ---- | ----------- |
@@ -19,7 +22,7 @@ Sets custom CSS styles for rows of a Document List according to the item's permi
You can customize the style of a [Document List](document-list.component.md) row based on the user's
permissions for that item. The list has a `permissionsStyle` property containing an array of
Permission Style model objects. These objects associate a particular CSS style with a permission level
[Permission Style model](../../lib/content-services/document-list/models/permissions-style.model.ts) objects. These objects associate a particular CSS style with a permission level
and can be applied separately to files and folders by setting `isFile` and `isFolder` appropriately.
### Permissions enum

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Rating component
Allows a user to add ratings to an item.
@@ -16,17 +17,19 @@ Allows a user to add ratings to an item.
</adf-rating>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | Identifier of the node to apply the rating to. |
| -- | -- | -- | -- |
| nodeId | `string` | | Identifier of the node to apply the rating to. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| changeVote | `EventEmitter<{}>` | Emitted when the "vote" gets changed. |
| -- | -- | -- |
| changeVote | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the "vote" gets changed. |
## See also

View File

@@ -1,26 +1,33 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-04
---
# Rating service
Manages ratings for items in Content Services.
## Methods
## Class members
- `getRating(nodeId: string, ratingType: any): any`
Gets the current user's rating for a node.
- `nodeId` - Node to get the rating from
- `ratingType` - Type of rating (can be "likes" or "fiveStar")
- `postRating(nodeId: string, ratingType: any, vote: any): any`
Adds the current user's rating for a node.
- `nodeId` - Target node for the rating
- `ratingType` - Type of rating (can be "likes" or "fiveStar")
- `vote` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
- `deleteRating(nodeId: string, ratingType: any): any`
Removes the current user's rating for a node.
- `nodeId` - Target node
- `ratingType` - Type of rating to remove (can be "likes" or "fiveStar")
### Methods
- **deleteRating**(nodeId: `string` = `null`, ratingType: `any` = `null`): `any`<br/>
Removes the current user's rating for a node.
- _nodeId:_ `string` - Target node
- _ratingType:_ `any` - Type of rating to remove (can be "likes" or "fiveStar")
- **Returns** `any` - Null response indicating that the operation is complete
- **getRating**(nodeId: `string` = `null`, ratingType: `any` = `null`): `any`<br/>
Gets the current user's rating for a node.
- _nodeId:_ `string` - Node to get the rating from
- _ratingType:_ `any` - Type of rating (can be "likes" or "fiveStar")
- **Returns** `any` - The rating value
- **postRating**(nodeId: `string` = `null`, ratingType: `any` = `null`, vote: `any` = `null`): `any`<br/>
Adds the current user's rating for a node.
- _nodeId:_ `string` - Target node for the rating
- _ratingType:_ `any` - Type of rating (can be "likes" or "fiveStar")
- _vote:_ `any` - Rating value (boolean for "likes", numeric 0..5 for "fiveStar")
- **Returns** `any` - Details about the rating, including the new value
## Details

View File

@@ -0,0 +1,77 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-11
---
# Search check list component
Implements a checklist widget for the [Search Filter component](../content-services/search-filter.component.md).
![Check list widget screenshot](../docassets/images/search-check-list.png)
## Basic usage
```json
{
"search": {
"categories": [
{
"id": "checkList",
"name": "Check List",
"enabled": true,
"component": {
"selector": "check-list",
"pageSize": 5,
"settings": {
"operator": "OR",
"options": [
{ "name": "Folder", "value": "TYPE:'cm:folder'" },
{ "name": "Document", "value": "TYPE:'cm:content'" }
]
}
}
}
]
}
}
```
### Settings
| Name | Type | Description |
| ---- | ---- | ----------- |
| operator | `string` | Logical operator to combine query fragments. Can be 'AND' or 'OR'. |
| options | `array` | Array of objects with `name` and `value` properties. Each object defines a checkbox, labelled with `name`, that adds the query fragment in `value` to the query when enabled. |
## Details
This widget displays a list of checkboxes, each of which toggles a particular query fragment
in the search. See the [Search filter component](../content-services/search-filter.component.md) for full details of how to use the widgets
in a search query.
In the settings, the `options` array, defines the checkboxes that toggle the supplied query
fragments and the `operator` selects logical `AND` or `OR` to combine the fragments.
In the example above, if the user checks both boxes then the following fragment will be added
to the query:
```text
... (TYPE:'cm:folder' OR TYPE:'cm:content') ...
```
The component can be set to split a long checklist into separate pages of checkboxes
using the `pageSize` value as the number of boxes to show per page (default is 5).
When there is more than one page, the widget will display "Show more" and "Show less"
buttons as appropriate.
A "Clear all" button is also displayed at the bottom of the widget to clear all checked
items in the list.
## See also
- [Search filter component](../content-services/search-filter.component.md)
- [Search date range component](../content-services/search-date-range.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search radio component](../content-services/search-radio.component.md)
- [Search slider component](../content-services/search-slider.component.md)
- [Search text component](../content-services/search-text.component.md)

View File

@@ -12,4 +12,4 @@ Displays search criteria as a set of "chips".
<adf-search-filter #searchFilter></adf-search-filter>
```
![Selected Facets](../docassets/images/selected-facets.png)
![Selected Facets](../docassets/images/selected-facets.png)

View File

@@ -25,9 +25,9 @@ Displays a input text which shows find-as-you-type suggestions.
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| -- | -- | -- | -- |
| autocomplete | `boolean` | false | Toggles auto-completion of the search input field. |
| customQueryBody | `QueryBody` | | **Deprecated:** in 2.1.0 |
| customQueryBody | `QueryBody` | | (**Deprecated:** in 2.1.0) |
| expandable | `boolean` | true | Toggles whether to use an expanding search control. If false then a regular input is used. |
| highlight | `boolean` | false | Toggles highlighting of the search term in the results. |
| inputType | `string` | "text" | Type of the input field to render, e.g. "search" or "text" (default). |
@@ -37,9 +37,9 @@ Displays a input text which shows find-as-you-type suggestions.
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| optionClicked | `EventEmitter<any>` | Emitted when a file item from the list of "find-as-you-type" results is selected. |
| searchChange | `EventEmitter<string>` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. |
| -- | -- | -- |
| optionClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when a file item from the list of "find-as-you-type" results is selected. |
| searchChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the search term is changed. The search term is provided in the 'value' property of the returned object. If the term is less than three characters in length then the term is truncated to an empty string. |
| submit | `EventEmitter<any>` | Emitted when the search is submitted pressing ENTER button. The search term is provided as value of the event. |
## Details

View File

@@ -0,0 +1,82 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-11
---
# Search date range component
Implements a date range widget for the [Search Filter component](../content-services/search-filter.component.md).
![Date Range Widget](../docassets/images/search-date-range.png)
## Basic usage
```json
{
"search": {
"categories": [
{
"id": "createdDateRange",
"name": "Created Date (range)",
"enabled": true,
"component": {
"selector": "date-range",
"settings": {
"field": "cm:created"
}
}
}
]
}
}
```
### Settings
| Name | Type | Description |
| ---- | ---- | ----------- |
| field | string | Field to apply the query to. Required value |
| dateFormat | string | Date format. Dates used by the datepicker are [Moment.js](https://momentjs.com/docs/#/parsing/string-format/) instances, so you can use any date format supported by Moment. Default is 'DD/MM/YYYY'. |
## Details
This component lets the user select a range between two dates based on the particular `field`.
See the [Search filter component](../content-services/search-filter.component.md) for full details of how to use widgets
in a search query.
### Custom date format
You can set the date range picker to work with any date format your app requires. You can use
any date format supported by [Moment.js](https://momentjs.com/docs/#/parsing/string-format/)
in the `dateFormat` setting:
```json
{
"search": {
"categories": [
{
"id": "createdDateRange",
"name": "Created Date (range)",
"enabled": true,
"component": {
"selector": "date-range",
"settings": {
"field": "cm:created",
"dateFormat": "DD-MMM-YY"
}
}
}
]
}
}
```
## See also
- [Search filter component](../content-services/search-filter.component.md)
- [Search check list component](../content-services/search-check-list.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search radio component](../content-services/search-radio.component.md)
- [Search slider component](../content-services/search-slider.component.md)
- [Search text component](../content-services/search-text.component.md)

View File

@@ -1,102 +1,189 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-04-16
Last reviewed: 2018-06-12
---
# Search Filter component
Represents a main container component for custom search and faceted search settings.
## Contents
- [Basic usage](#basic-usage)
- [Details](#details)
- [Configuration](#configuration)
- [Extra fields and filter queries](#extra-fields-and-filter-queries)
- [Sorting](#sorting)
- [Categories and widgets](#categories-and-widgets)
- [Facet Fields](#facet-fields)
- [Facet Queries](#facet-queries)
- [See also](#see-also)
## Basic usage
```html
<adf-search-filter #settings></adf-search-filter>
```
## Class members
### Properties
For the property types please refer to the [Search Category interface](#categories).
| Property | Description |
| --- | --- |
| id | Unique identifier of the category. Also used to access QueryBuilder customizations for a particular widget. |
| name | Public display name for the category. |
| enabled | Toggles category availability. Set to `false` if you want to exclude a category from processing. |
| expanded | Toggles the expanded state of the category |
| component.selector | The id of the Angular component selector to render the Category |
| component.settings | An object containing component specific settings. Put any properties needed for the target component here. |
## Details
The component is based on dynamically created widgets to modify the resulting query and options,
and the [Search Query Builder service](search-query-builder.service.md)` to build and execute the search queries.
The component UI uses dynamically created widgets to specify the search query and its
options. It then uses the [Search Query Builder service](search-query-builder.service.md)
to build and execute the query.
You may find it useful to check out the following resources for background information
before customizing the search UI:
- [Search API](https://docs.alfresco.com/5.2/concepts/search-api.html)
- [Alfresco Full Text Search Reference](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-intro.html)
- [ACS API Explorer](https://api-explorer.alfresco.com/api-explorer/#!/search/search)
### Configuration
The configuration should be provided via the `search` entry in the `app.config.json` file.
Below is an example configuration:
You can configure the component using the `search` entry in the `app.config.json` file.
A typical configuration is shown below:
```json
{
"search": {
"limits": {
"permissionEvaluationTime": null,
"permissionEvaluationCount": null
"sorting": {
"options": [
{ "key": "name", "label": "Name", "type": "FIELD", "field": "cm:name", "ascending": true },
{ "key": "content.sizeInBytes", "label": "Size", "type": "FIELD", "field": "content.size", "ascending": true },
{ "key": "description", "label": "Description", "type": "FIELD", "field": "cm:description", "ascending": true }
],
"defaults": [
{ "key": "name", "type": "FIELD", "field": "cm:name", "ascending": true }
]
},
"filterQueries": [
{ "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
{ "query": "NOT cm:creator:System" }
],
"facetFields": {
"facets": [
"facetFields": [
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
{ "field": "content.size", "mincount": 1, "label": "Size" },
{ "field": "creator", "mincount": 1, "label": "Creator" },
{ "field": "modifier", "mincount": 1, "label": "Modifier" }
],
"facetQueries": {
"label": "My facet queries",
"pageSize": 4,
"queries": [
{ "query": "created:2018", "label": "Created This Year" },
{ "query": "content.mimetype", "label": "Type" },
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
]
},
"facetQueries": [
{ "query": "created:2018", "label": "Created This Year" },
{ "query": "content.mimetype", "label": "Type" },
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
],
"query": {
"categories": [
{
"id": "queryName",
"name": "Name",
"enabled": true,
"expanded": true,
"component": {
"selector": "adf-search-text",
"settings": {
"pattern": "cm:name:'(.*?)'",
"field": "cm:name",
"placeholder": "Enter the name"
}
"categories": [
{
"id": "queryName",
"name": "Name",
"enabled": true,
"expanded": true,
"component": {
"selector": "adf-search-text",
"settings": {
"pattern": "cm:name:'(.*?)'",
"field": "cm:name",
"placeholder": "Enter the name"
}
}
}
]
}
}
```
The
[schema.json](https://github.com/Alfresco/alfresco-ng2-components/blob/master/lib/core/app-config/schema.json)
file for the app config has further details about available settings, values and formats for
the configuration options.
### Extra fields and filter queries
You can explicitly define the `include` section for the query from within the application configuration file. This array is a list of extra data fields to be added to the search
results:
```json
{
"search": {
"include": ["path", "allowableOperations"]
}
}
```
You can also provide a set of queries that are always executed alongside the user-defined
settings:
```json
{
"search": {
"filterQueries": [
{ "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
{ "query": "NOT cm:creator:System" }
]
}
}
```
Note that the entries of the `filterQueries` array are joined using the `AND` operator.
### Sorting
The Sorting configuration section consists of two blocks:
- `options`: a list of items that users can select from
- `defaults`: predefined sorting to use by default
```json
{
"search": {
"sorting": {
"options": [
{ "key": "name", "label": "Name", "type": "FIELD", "field": "cm:name", "ascending": true },
{ "key": "content.sizeInBytes", "label": "Size", "type": "FIELD", "field": "content.size", "ascending": true },
{ "key": "description", "label": "Description", "type": "FIELD", "field": "cm:description", "ascending": true }
],
"defaults": [
{ "key": "name", "type": "FIELD", "field": "cm:name", "ascending": true }
]
}
}
}
```
### Categories
The properties of the `options` objects are as follows:
The Search Settings component and Query Builder require a `categories` section provided within the configuration.
| Name | Type | Description |
| ---- | ---- | ----------- |
| key | string | Unique key to identify the entry. This can also be used to map DataColumn instances. |
| label | string | Display text, which can also be an [i18n resource key](../user-guide/internationalization.md). |
| type | string | This specifies how to order the results. It can be based on a field, based on the position of the document in the index, or by score/relevance. |
| field | string | The name of the field. |
| ascending | boolean | The sorting order defined as `true` for ascending order and `false` for descending order |
Categories are needed to build widgets so that users can modify the search query at runtime. Every Category can be represented by a single Angular component, which can be either a simple one or a
composite one.
See the [Sort](https://docs.alfresco.com/5.2/concepts/search-api-sort.html)
element in the [ACS Search API](https://docs.alfresco.com/5.2/concepts/search-api.html)
for further details.
### Categories and widgets
The Search Settings component and Query Builder require a `categories` section in the
configuration.
Categories are used to configure the UI widgets that let the user edit the search query
at runtime. Every category is represented by a single Angular component, which can be
either a simple one or a composite one.
```ts
export interface SearchCategory {
@@ -115,13 +202,34 @@ The interface above also describes entries in the `search.query.categories` sect
![Search Categories](../docassets/images/search-categories-01.png)
### Settings
> **Note:** you must provide at least one category field in order to execute the query,
> so that filters and selected facets are applied.
Every use case will have a different set of settings.
The Search Filter supports a number of widgets out of the box, each implemented
by an ADF component. The `selector` property specifies which widget is used for
a category:
| Widget name | Selector | Description |
| ----------- | -------- | ----------- |
| [Check List](search-check-list.component.md) | `check-list` | Toggles individual query fragments for the search |
| [Date Range](search-date-range.component.md) | `date-range` | Specifies a range f dates that a field may contain |
| [Number Range](search-number-range.component.md) | `number-range` | Specifies a range of numeric values that a field may contain |
| [Radio List](search-radio.component.md) | `radio` | Selects one query fragment from a list of options |
| [Slider](search-slider.component.md) | `slider` | Selects a single numeric value in a given range that a field may contain |
| [Text](search-text.component.md) | `text` | Specifies a text value that a field may contain |
See the individual search widget pages for full details of their usage and settings.
You can also implement your own custom search widgets. See the [`SearchWidget`](../../lib/content-services/search/search-widget.interface.ts) interface
page for full details of how to do this.
#### Widget settings
Each type of widget has its own settings.
For example Number editors may parse minimum and maximum values, while Text editors can support value formats or length constraints.
You can use `component.settings` to pass any information to your custom widget using the
`SearchWidgetSettings` interface:
You can use `component.settings` to pass any information to a widget using the
[`SearchWidgetSettings`](../../lib/content-services/search/search-widget-settings.interface.ts) interface:
```ts
export interface SearchWidgetSettings {
@@ -130,6 +238,90 @@ export interface SearchWidgetSettings {
}
```
### Facet Fields
```json
{
"search": {
"facetFields": [
{ "field": "content.mimetype", "mincount": 1, "label": "Type" },
{ "field": "content.size", "mincount": 1, "label": "Size" },
{ "field": "creator", "mincount": 1, "label": "Creator" },
{ "field": "modifier", "mincount": 1, "label": "Modifier" },
{ "field": "created", "mincount": 1, "label": "Created" }
]
}
}
```
Every field declared within the `facetFields` group is presented by a separate collapsible category at runtime.
By default, users see only the top 5 entries.
If there are more than 5 entries, the "Show more" button is displayed to let the user move to
the next block of results.
![Facet Fields](../docassets/images/search-facet-fields.png)
#### FacetField Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| field | string | | Specifies the facet field. |
| mincount | number | 1 | Specifies the minimum count required for a facet field to be included in the response. The default value is 1. |
| label | string | | Specifies the label to include in place of the facet field. |
| prefix | string | | Restricts the possible constraints to only indexed values with a specified prefix. |
| limit | number | | Maximum number of results |
| pageSize | number | 5 | Display page size |
| offset | number | | Offset position |
### Facet Queries
These provide custom categories based on admin-defined facet queries.
```json
{
"search": {
"facetQueries": {
"label": "Facet queries",
"pageSize": 5,
"expanded": true,
"queries": [
{ "query": "created:2018", "label": "Created This Year" },
{ "query": "content.mimetype", "label": "Type" },
{ "query": "content.size:[0 TO 10240]", "label": "Size: xtra small"},
{ "query": "content.size:[10240 TO 102400]", "label": "Size: small"},
{ "query": "content.size:[102400 TO 1048576]", "label": "Size: medium" },
{ "query": "content.size:[1048576 TO 16777216]", "label": "Size: large" },
{ "query": "content.size:[16777216 TO 134217728]", "label": "Size: xtra large" },
{ "query": "content.size:[134217728 TO MAX]", "label": "Size: XX large" }
]
}
}
}
```
The queries declared in the `facetQueries` are collected into a single collapsible category.
Only the queries that have 1 or more response entries are displayed at runtime.
The component provides a `Show more` button to display more items if the number of items
exceeds the `pageSize` value.
You can also provide a custom `label` (or i18n resource key) for the resulting collapsible category.
The `pageSize` property allows you to define the number of results to display.
Users will see `Show more` or `Show less` buttons as appropriate for the result set.
The default page size of 5 will be used if you set the value to 0 or omit it entirely.
![Facet Queries](../docassets/images/search-facet-queries.png)
## See also
- [Search Query Builder service](search-query-builder.service.md)
- [Search Query Builder service](search-query-builder.service.md)
- [Search Chip List Component](search-chip-list.component.md)
- [Search Sorting Picker Component](search-sorting-picker.component.md)
- [`SearchWidget`](../../lib/content-services/search/search-widget.interface.ts)
- [Search check list component](../content-services/search-check-list.component.md)
- [Search date range component](../content-services/search-date-range.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search radio component](../content-services/search-radio.component.md)
- [Search slider component](../content-services/search-slider.component.md)
- [Search text component](../content-services/search-text.component.md)

View File

@@ -0,0 +1,36 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-12
---
# Search filter service
Registers widgets for use with the [Search Filter component](../content-services/search-filter.component.md).
## Details
This component keeps track of all widgets registered for use with the
[Search Filter component](../content-services/search-filter.component.md). All the built-in widgets are registered by default
but you should register any new custom widgets you create explicitly:
```ts
import { MyComponent } from './my-component.ts'
@Component({...})
export class MyAppOrComponent {
constructor(searchFilterService: SearchFilterService) {
searchFilterService.widgets['my-widget'] = MyComponent;
}
}
```
See the Search Widget interface page for details about creating your own
custom search widgets.
## See also
- [`SearchWidget`](../../lib/content-services/search/search-widget.interface.ts)
- [Search Filter component](../content-services/search-filter.component.md)

View File

@@ -0,0 +1,78 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-11
---
# Search number range component
Implements a number range widget for the [Search Filter component](../content-services/search-filter.component.md).
![Number Range Widget](../docassets/images/search-number-range.png)
## Basic usage
```json
{
"search": {
"categories": [
{
"id": "contentSizeRange",
"name": "Content Size (range)",
"enabled": true,
"component": {
"selector": "number-range",
"settings": {
"field": "cm:content.size",
"format": "[{FROM} TO {TO}]"
}
}
}
]
}
}
```
### Settings
| Name | Type | Description |
| ---- | ---- | ----------- |
| field | string | Field to to use |
| format | string | Value format. Uses string substitution to allow all sorts of [range queries](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-ranges.html). |
## Details
This component lets the user specify a range between two predefined numbers based on the
particular `field`. See the [Search filter component](../content-services/search-filter.component.md) for full details of how to use widgets
in a search query.
#### Range query format
See the [Search for ranges](https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-ranges.html) page in the ACS docs for more information about the date range format.
The `format` setting specifies how the date is displayed textually. Most of the format is
displayed as-is but you can use `{FROM}` and `{TO}` markers to interpolate the range limits
into the format string:
```json
"settings": {
"field": "cm:content.size",
"format": "[{FROM} TO {TO}]"
}
```
The format above would be displayed at runtime as follows:
```text
cm:content.size:[0 TO 100]
```
## See also
- [Search filter component](../content-services/search-filter.component.md)
- [Search check list component](../content-services/search-check-list.component.md)
- [Search date range component](../content-services/search-date-range.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search radio component](../content-services/search-radio.component.md)
- [Search slider component](../content-services/search-slider.component.md)
- [Search text component](../content-services/search-text.component.md)

View File

@@ -1,46 +1,69 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-06-12
---
# Search Query Builder service
Stores information from all the custom search and faceted search widgets, compiles and runs the final Search query.
Stores information from all the custom search and faceted search widgets, compiles and runs the final search query.
## Class members
### Methods
- `addFilterQuery(query: string): void`
Adds a filter query to the search.
- `query` - Query text
- `removeFilterQuery(query: string): void`
Removes a previously added filter query from the search.
- `query` - Query text
- `getFacetQuery(label: string): FacetQuery`
Gets a facet query.
- `label` - Identifier of the target query
- `update(): void`
Rebuilds the query and triggers the `updated` event.
- `async execute()`
Executes the query.
- `buildQuery(): QueryBody`
Builds the query.
- **addFilterQuery**(query: `string` = `null`)<br/>
Adds a new filter query.
- _query:_ `string` - Text of the query to add
- **buildQuery**(): `QueryBody`<br/>
Builds a new query using the added elements.
- **Returns** `QueryBody` - The resulting query
- **execute**(): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<void>`<br/>
Executes the query.
- **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`<void>` - Notification of query completion
- **getFacetField**(label: `string` = `null`): [`FacetField`](../../lib/content-services/search/facet-field.interface.ts)<br/>
Gets the details of a facet field.
- _label:_ `string` - Identifying label of the facet field
- **Returns** [`FacetField`](../../lib/content-services/search/facet-field.interface.ts) - Facet field details
- **getFacetQuery**(label: `string` = `null`): [`FacetQuery`](../../lib/content-services/search/facet-query.interface.ts)<br/>
Gets the details of a facet query
- _label:_ `string` - Identifying label of the facet query
- **Returns** [`FacetQuery`](../../lib/content-services/search/facet-query.interface.ts) - Details of the facet query
- **getPrimarySorting**(): [`SearchSortingDefinition`](../../lib/content-services/search/search-sorting-definition.interface.ts)<br/>
Returns primary sorting definition.
- **Returns** [`SearchSortingDefinition`](../../lib/content-services/search/search-sorting-definition.interface.ts) - Sorting definition
- **getSortingOptions**(): [`SearchSortingDefinition`](../../lib/content-services/search/search-sorting-definition.interface.ts)`[]`<br/>
Returns all pre-configured sorting options that users can choose from.
- **Returns** [`SearchSortingDefinition`](../../lib/content-services/search/search-sorting-definition.interface.ts)`[]` - List of available sorting options
- **removeFilterQuery**(query: `string` = `null`)<br/>
Removes a previously added filter query.
- _query:_ `string` - The query to remove
- **update**()<br/>
Builds the query and notifies subscribers when complete.
## Details
See the [Search filter component](search-filter.component.md) page for full details about the format of queries,
facet fields, and sorting options.
The Query Builder is UI agnostic and does not rely on Angular components.
You can reuse it with multiple component implementations.
You can use custom widgets to populate and edit the following parts of the resulting query:
- categories
- query fragments that form query expression
- include fields
- scope settings
- filter queries
- facet fields
- range queries
- categories
- query fragments that form a query expression
- include fields
- scope settings
- filter queries
- facet fields
- range queries
```ts
constructor(queryBuilder: SearchQueryBuilderService) {
@@ -54,4 +77,9 @@ constructor(queryBuilder: SearchQueryBuilderService) {
});
}
```
```
## See also
- [Search filter component](search-filter.component.md)
- [Search Widget interface](search-widget.interface.md)

View File

@@ -0,0 +1,67 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-11
---
# Search radio component
Implements a radio button list widget for the [Search Filter component](../content-services/search-filter.component.md).
![Radio Widget screenshot](../docassets/images/search-radio.png)
## Basic usage
```json
{
"search": {
"categories": [
{
"id": "queryType",
"name": "Type",
"enabled": true,
"component": {
"selector": "radio",
"settings": {
"field": null,
"pageSize": 5,
"options": [
{ "name": "None", "value": "", "default": true },
{ "name": "All", "value": "TYPE:'cm:folder' OR TYPE:'cm:content'" },
{ "name": "Folder", "value": "TYPE:'cm:folder'" },
{ "name": "Document", "value": "TYPE:'cm:content'" }
]
}
}
}
]
}
}
```
### Settings
| Name | Type | Description |
| ---- | ---- | ----------- |
| options | `array` | Array of objects with `name` and `value` properties. Each object defines a radio button, labelled with `name`, that adds the query fragment in `value` to the query when enabled. Set the `default` property to `true` for one item to have it selected initially when the widget is displayed. |
## Details
This component displays a list of radio buttons, each of which toggles a particular
query fragment in the search. This behaviour is very similar to that of the
[Search check list component](../content-services/search-check-list.component.md) except only one item at a time can be selected. See the
[Search filter component](../content-services/search-filter.component.md) for full details of how to use the widgets in a search query.
The component can be set to split a long list of buttons into separate pages
using the `pageSize` value as the number of buttons to show per page (default is 5).
When there is more than one page, the widget will display "Show more" and "Show less"
buttons as appropriate.
## See also
- [Search filter component](../content-services/search-filter.component.md)
- [Search check list component](../content-services/search-check-list.component.md)
- [Search date range component](../content-services/search-date-range.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search slider component](../content-services/search-slider.component.md)
- [Search text component](../content-services/search-text.component.md)

View File

@@ -0,0 +1,74 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-11
---
# Search slider component
Implements a numeric slider widget for the [Search Filter component](../content-services/search-filter.component.md).
![Slider Widget](../docassets/images/search-slider.png)
## Basic usage
```json
{
"search": {
"categories": [
{
"id": "contentSize",
"name": "Content Size",
"enabled": true,
"component": {
"selector": "slider",
"settings": {
"field": "cm:content.size",
"min": 0,
"max": 18,
"step": 1,
"thumbLabel": true
}
}
}
]
}
}
```
### Settings
| Name | Type | Description |
| ---- | ---- | ----------- |
| field | string | Field to apply the query fragment to. Required value |
| min | number | Minimum numeric value at the left end of the slider |
| max | number | Maximum numeric value at the right end of the slider |
| step | number | The step between adjacent positions on the slider |
| thumbLabel | boolean | Toggles whether the "thumb" of the slider should show the current value |
## Details
This component lets the user select from a range between two predefined numbers based on the
particular `field`. See the [Search filter component](../content-services/search-filter.component.md) for full
details of how to use widgets in a search query.
### Resetting the slider value
The query fragment represented by the slider will not be added to the query until a value is
selected by the user. However, once the slider has been moved, there is no way to use it to
go back to the initial state (ie, the query fragment will be present regardless of the final
value of the slider). This can be a problem in cases where even a zero or minimum value can
affect the query.
To handle this situation, the slider comes with a `Clear` button to reset the value to the
initial state. When the user clicks this button, the slider control is set to the `min` value
or zero and the corresponsing query fragment is removed from the query.
## See also
- [Search filter component](../content-services/search-filter.component.md)
- [Search check list component](../content-services/search-check-list.component.md)
- [Search date range component](../content-services/search-date-range.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search radio component](../content-services/search-radio.component.md)
- [Search text component](../content-services/search-text.component.md)

View File

@@ -0,0 +1,13 @@
---
Added: v2.3.0
Status: Active
---
# Search Sorting Picker Component
Provides an ability to select one of the predefined sorting definitions for search results:
```html
<adf-search-sorting-picker></adf-search-sorting-picker>
<adf-search-filter></adf-search-filter>
```

View File

@@ -0,0 +1,59 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-11
---
# Search text component
Implements a text input widget for the [Search Filter component](../content-services/search-filter.component.md).
![Text Widget](../docassets/images/search-text.png)
## Basic usage
```json
{
"search": {
"categories": [
{
"id": "queryName",
"name": "Name",
"enabled": true,
"expanded": true,
"component": {
"selector": "text",
"settings": {
"pattern": "cm:name:'(.*?)'",
"field": "cm:name",
"placeholder": "Enter the name"
}
}
}
]
}
}
```
### Settings
| Name | Type | Description |
| ---- | ---- | ----------- |
| field | string | Field to apply the query fragment to. Required value |
| pattern | string | Regular expression pattern to restrict the format of the input text |
| placeholder | string | Text displayed in the widget when the input string is empty |
## Details
This component lets the user add a text value to search for in the specified
`field`. See the [Search filter component](../content-services/search-filter.component.md) for full
details of how to use widgets in a search query.
## See also
- [Search filter component](../content-services/search-filter.component.md)
- [Search check list component](../content-services/search-check-list.component.md)
- [Search date range component](../content-services/search-date-range.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search radio component](../content-services/search-radio.component.md)
- [Search slider component](../content-services/search-slider.component.md)

View File

@@ -0,0 +1,196 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-12
---
# Search widget interface
Specifies required properties for [Search filter component](../content-services/search-filter.component.md) widgets.
## Contents
- [Basic usage](#basic-usage)
- [Properties](#properties)
- [Details](#details)
- [Implementing a custom widget](#implementing-a-custom-widget)
- [Reading external settings](#reading-external-settings)
- [Updating the final query](#updating-the-final-query)
- [Registering a custom widget](#registering-a-custom-widget)
- [See also](#see-also)
## Basic usage
```ts
export interface SearchWidget {
id: string;
settings?: SearchWidgetSettings;
context?: SearchQueryBuilderService;
}
```
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| id | `string` | | Unique identifying value for the widget |
| settings | [`SearchWidgetSettings`](../../lib/content-services/search/search-widget-settings.interface.ts) | | Settings for component properties |
| context | [`SearchQueryBuilderService`](../content-services/search-query-builder.service.md) | | Instance of the Search Query Builder service to process the query |
## Details
The [Search Filter component](../content-services/search-filter.component.md) uses widgets to provide the UI that lets the user customize the
search. ADF provides a number of widgets out of the box (see the [See Also](#see-also) section
for a full list) but you can also implement your own. Both built-in and custom widgets must
implement the Search Widget interface to operate with the Search Filter component.
### Implementing a custom widget
To create a custom Search Filter widget, start by generating a blank Angular component
that implements the
[`SearchWidget`](../../lib/content-services/search/search-widget.interface.ts)
interface:
```ts
export interface SearchWidget {
id: string;
settings?: SearchWidgetSettings;
context?: SearchQueryBuilderService;
}
```
Every widget implementation must have an `id`, and may also support external `settings`.
At runtime, every time a new instance of the widget is created, it also receives a reference to the [`SearchQueryBuilderService`](../content-services/search-query-builder.service.md)
so that you component can access query related information, events and methods.
```ts
@Component({...})
export class MyComponent implements SearchWidget, OnInit {
id: string;
settings: SearchWidgetSettings;
context: SearchQueryBuilderService;
key1: string;
key2: string;
}
```
### Reading external settings
At runtime, ADF provides every search filter widget with a `settings` instance,
based on the JSON data that the administrator has provided for your widget in the
`app.config.json` file.
It is your responsibility to parse the `settings` property values and also to
convert types and set up defaults as necessary. ADF does not provide any validation
of the objects. It only reads from the configuration and passes the data to your component
instance.
```ts
@Component({...})
export class MyComponent implements SearchWidget, OnInit {
id: string;
settings: SearchWidgetSettings;
context: SearchQueryBuilderService;
key1: string;
key2: string;
ngOnInit() {
if (this.settings) {
this.key1 = this.settings['key1'];
this.key2 = this.settings['key2'];
}
}
}
```
### Updating the final query
The [`SearchQueryBuilderService`](../content-services/search-query-builder.service.md) keeps track of all query fragments that have been added by search widgets.
When the query is complete, it composes the fragments together alongside other settings
that will be used when performing the actual query.
Every query fragment is stored and retrieved using its widget `id`.
It is your responsibility to format the query correctly.
Once your change to the query is finished, update the context and call the `update` method
to inform other components about the change:
```ts
@Component({...})
export class MyComponent implements SearchWidget, OnInit {
...
onUIChanged() {
this.context.queryFragments[this.id] = `some query`;
this.context.update();
}
}
```
When executed, your fragment will be injected into the resulting query based on the category order in the application configuration file.
```text
... AND (widget1) AND (some query) AND (widget2) AND ...
```
### Registering a custom widget
You must register your custom widgets with the [Search Filter service](../content-services/search-filter.service.md):
```ts
import { MyComponent } from './my-component.ts'
@Component({...})
export class MyAppOrComponent {
constructor(searchFilterService: SearchFilterService) {
searchFilterService.widgets['my-widget'] = MyComponent;
}
}
```
When you have done this, you can declare your widget in `app.config.json`
and pass custom attributes, if your component supports them:
```json
{
"search": {
"categories": [
{
"id": "someUniqueId",
"name": "String or i18n key",
"enabled": true,
"component": {
"selector": "my-widget",
"settings": {
"key1": "value1",
"key2": "value2",
"keyN": "valueN"
}
}
}
]
}
}
```
## See also
- [Search filter component](../content-services/search-filter.component.md)
- [Search check list component](../content-services/search-check-list.component.md)
- [Search date range component](../content-services/search-date-range.component.md)
- [Search number range component](../content-services/search-number-range.component.md)
- [Search radio component](../content-services/search-radio.component.md)
- [Search slider component](../content-services/search-slider.component.md)
- [Search text component](../content-services/search-text.component.md)

View File

@@ -8,6 +8,23 @@ Last reviewed: 2018-04-13
Searches items for supplied search terms.
## Contents
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Customise Search Results](#customise-search-results)
- [Attach an input field to the search](#attach-an-input-field-to-the-search)
- [Custom search configuration](#custom-search-configuration)
- [See Also](#see-also)
## Basic usage
```html
@@ -23,19 +40,19 @@ Searches items for supplied search terms.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| displayWith | `function | null` | null | Function that maps an option's value to its display value in the trigger. |
| displayWith | `function \| null` | null | Function that maps an option's value to its display value in the trigger. |
| maxResults | `number` | 20 | Maximum number of results to show in the search. |
| queryBody | `QueryBody` | | **Deprecated:** in 2.1.0 |
| queryBody | `QueryBody` | | (**Deprecated:** in 2.1.0) |
| searchTerm | `string` | "" | Search term to use when executing the search. Updating this value will run a new search and update the results. |
| skipResults | `number` | 0 | Number of results to skip from the results pagination. |
| class | `` | | CSS class for display. |
| class | | | CSS class for display. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| error | `EventEmitter<any>` | Emitted when an error occurs. |
| resultLoaded | `EventEmitter<NodePaging>` | Emitted when search results have fully loaded. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| resultLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` | Emitted when search results have fully loaded. |
## Details
@@ -113,7 +130,7 @@ However, you can use a more complex template if necessary:
### Attach an input field to the search
You can also attach an input field to the search component via the `searchAutocomplete` property.
You can also attach an input field to the [search component](../content-services/search.component.md) via the `searchAutocomplete` property.
Export the search panel instance into a local template variable and bind that variable to the
input's `searchAutocomplete` property. The example below demonstrates this with an
instance called "search":
@@ -141,8 +158,8 @@ By doing this, you can get the results as the user types into the input text.
You can get finer control over the parameters of a search by defining them in a custom
[QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md)
object. The recommended way to do this is with a custom implementation of the
[Search Configuration interface](../core/search-configuration.interface.md) (the `queryBody` parameter of the `Search component` is now deprecated). The ADF source provides a standard implementation of this
interface, `SearchConfigurationService` that you can use as a base to adapt to your needs. See the
[Search Configuration interface](../core/search-configuration.interface.md) (the `queryBody` parameter of the [`Search component`](../content-services/search.component.md) is now deprecated). The ADF source provides a standard implementation of this
interface, [`SearchConfigurationService`](../core/search-configuration.service.md) that you can use as a base to adapt to your needs. See the
[Search Configuration interface](../core/search-configuration.interface.md) page for full details of how to
customize your search.

View File

@@ -18,12 +18,14 @@ Displays a dropdown menu to show and interact with the sites of the current user
</adf-sites-dropdown>
```
## Class members
### Properties
| Attribute | Type | Default | Description |
| --------- | ---- | ------- | ----------- |
| hideMyFiles | boolean | false | Hide the "My Files" option added to the list by default |
| siteList | [SitePaging](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. |
| siteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. |
| placeholder | string | 'DROPDOWN.PLACEHOLDER_LABEL' | The placeholder text/the key from translation files for the placeholder text to be shown by default |
| value | string | null | Id of the select site |
| relations | string | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. |

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Tag Node Actions List component
Shows available actions for tags.
@@ -16,16 +17,18 @@ Shows available actions for tags.
</adf-tag-node-actions-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | The identifier of a node. |
| -- | -- | -- | -- |
| nodeId | `string` | | The identifier of a node. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs. |
| result | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an action is chosen. |
| successAdd | `EventEmitter<any>` | Emitted when a tag is added successfully. |
| error | `EventEmitter<any>` | Emitted when an error occurs. |
| result | `EventEmitter<{}>` | Emitted when an action is chosen. |

View File

@@ -2,19 +2,20 @@
Added: v2.0.0
Status: Active
---
# Tag List component
Shows tags for an item.
![Custom columns](../docassets/images/tag2.png)
## Basic Usage
## Class members
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| result | `EventEmitter<{}>` | Emitted when a tag is selected. |
| -- | -- | -- |
| result | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a tag is selected. |
## See Also

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Tag Node List component
Shows tags for a node.
@@ -16,14 +17,16 @@ Shows tags for a node.
</adf-tag-node-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| nodeId | `string` | | The identifier of a node. |
| -- | -- | -- | -- |
| nodeId | `string` | | The identifier of a node. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| results | `EventEmitter<{}>` | Emitted when a tag is selected. |
| -- | -- | -- |
| results | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a tag is selected. |

View File

@@ -12,22 +12,22 @@ Manages tags in Content Services.
### Methods
- `addTag(nodeId: string = null, tagName: string = null): any`<br/>
- **addTag**(nodeId: `string` = `null`, tagName: `string` = `null`): `any`<br/>
Adds a tag to a node.
- `nodeId: string = null` - ID of the target node
- `tagName: string = null` - Name of the tag to add
- _nodeId:_ `string` - ID of the target node
- _tagName:_ `string` - Name of the tag to add
- **Returns** `any` - TagEntry object (defined in JSAPI) with details of the new tag
- `getAllTheTags(): any`<br/>
- **getAllTheTags**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets a list of all the tags already defined in the repository.
- **Returns** `any` - TagPaging object (defined in JSAPI) containing the tags
- `getTagsByNodeId(nodeId: string = null): any`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - TagPaging object (defined in JSAPI) containing the tags
- **getTagsByNodeId**(nodeId: `string` = `null`): `any`<br/>
Gets a list of tags added to a node.
- `nodeId: string = null` - ID of the target node
- _nodeId:_ `string` - ID of the target node
- **Returns** `any` - TagPaging object (defined in JSAPI) containing the tags
- `removeTag(nodeId: string = null, tag: string = null): any`<br/>
- **removeTag**(nodeId: `string` = `null`, tag: `string` = `null`): `any`<br/>
Removes a tag from a node.
- `nodeId: string = null` - ID of the target node
- `tag: string = null` - Name of the tag to remove
- _nodeId:_ `string` - ID of the target node
- _tag:_ `string` - Name of the tag to remove
- **Returns** `any` - Null object when the operation completes
## Details
@@ -45,8 +45,8 @@ construct a list like this.
See the
[Tags API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/TagsApi.md)
in the Alfresco JS API for more information about the types returned by Tag
service methods and for the implementation of the REST API the service is
in the Alfresco JS API for more information about the types returned by [Tag
service](../content-services/tag.service.md) methods and for the implementation of the REST API the service is
based on.
## See also

View File

@@ -22,28 +22,34 @@ Activates a file upload.
<adf-file-uploading-dialog></adf-file-uploading-dialog>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). |
| uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). |
| multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
| versioning | `boolean` | `false` | Toggles versioning. |
| -- | -- | -- | -- |
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
| comment | `string` | | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history |
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| staticTitle | `string` | | Defines the text of the upload button. |
| tooltip | `string` | `null` | Custom tooltip text. |
| rootFolderId | `string` | `'-root-'` | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| acceptedFilesType | `string` | `'*'` | Filter for accepted file types. |
| multipleFiles | `boolean` | false | Allows/disallows multiple files |
| nodeType | `string` | "cm:content" | Custom node type for uploaded file |
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| staticTitle | `string` | | Defines the text of the upload button. |
| tooltip | `string` | null | Custom tooltip text. |
| uploadFolders | `boolean` | false | Allows/disallows upload folders (only for Chrome). |
| versioning | `boolean` | false | Toggles versioning. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. |
| error | `EventEmitter<{}>` | Emitted when an error occurs. |
| createFolder | `EventEmitter<{}>` | Emitted when a folder is created. |
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
| -- | -- | -- |
| beginUpload | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts)`>` | |
| createFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a folder is created. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an error occurs. |
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when create permission is missing. |
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
## Details
@@ -77,4 +83,4 @@ export class MyComponent {
## See also
- [Upload Version Button component](upload-version-button.component.md)
- [Upload Version Button component](upload-version-button.component.md)

View File

@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-16
Last reviewed: 2018-05-04
---
# Upload Drag Area Component
@@ -36,13 +36,76 @@ export class AppComponent {
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
| disabled | `boolean` | false | Toggle component disabled state. |
| parentId | `string` | | ID of parent folder node. |
| versioning | `boolean` | false | When false, renames the file using an integer suffix if there is a name clash. Set to true to indicate that a major version should be created instead. |
| comment | `string` | | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history |
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| nodeType | `string` | "cm:content" | Custom node type for uploaded file |
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| versioning | `boolean` | false | Toggles versioning. |
| parentId | | | **Deprecated:** 2.4.0 use rootFolderId ID of parent folder node. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| error | `EventEmitter<Object>` | Raised when the file upload goes in error. |
| success | `EventEmitter<Object>` | Emitted when the file is uploaded. |
| beginUpload | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts)`>` | Raised after files or folders dropped and before the upload process starts. |
| createFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a folder is created. |
| error | `EventEmitter<Object>` | Emitted when an error occurs. |
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
## Intercepting uploads
You can intercept the upload process by utilizing the `beginUpload` event.
The event has a type of [`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts) and provides the following APIs:
- **files**: get access to the [`FileInfo`](../../lib/core/utils/file-utils.ts) objects that are prepared for the upload
- **pauseUpload**: pause the upload and perform additional tasks, like showing the confirmation dialog
- **resumeUpload**: resume the upload process
## Example
Wire the `beginUpload` event at the template level
```html
<adf-upload-drag-area (beginUpload)="onBeginUpload($event)" ...>
...
</adf-upload-drag-area>
```
Create the `onBeginUpload` handler that invokes a confirmation dialog
```ts
import { UploadFilesEvent, ConfirmDialogComponent } from '@alfresco/adf-content-services';
@Component({...})
export class MyComponent {
onBeginUpload(event: UploadFilesEvent) {
const files = event.files || [];
if (files.length > 1) {
event.pauseUpload();
const dialogRef = this.dialog.open(ConfirmDialogComponent, {
data: {
title: 'Upload',
message: `Are you sure you want to upload ${files.length} file(s)?`
},
minWidth: '250px'
});
dialogRef.afterClosed().subscribe(result => {
if (result === true) {
event.resumeUpload();
}
});
}
}
}
```
The example above is going to raise confirmation dialog every time a user uploads more than 1 file.
That can be either 2 or more files, or a folder with multiple entries.

View File

@@ -27,31 +27,37 @@ to enrich the features and decrease the restrictions currently applied to node v
This component extends the [Upload Button component](upload-button.component.md). The
properties and events are the same except for the `node` property that specifies the node
to be versioned (this is a _required_ input parameter). However, some properties don't make
sense when applied to the Upload Version Button component, so they are simply ignored.
sense when applied to the [Upload Version Button component,](../content-services/upload-version-button.component.md) so they are simply ignored.
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| node | `MinimalNodeEntryEntity` | | (**Required**) The node to be versioned. |
| disabled | `boolean` | `false` | Toggles component disabled state (if there is no node permission checking). |
| uploadFolders | `boolean` | `false` | Allows/disallows upload folders (only for Chrome). |
| multipleFiles | `boolean` | `false` | Allows/disallows multiple files |
| versioning | `boolean` | `false` | Toggles versioning. |
| -- | -- | -- | -- |
| acceptedFilesType | `string` | "\*" | Filter for accepted file types. |
| comment | `string` | | When you overwrite existing content, you can use the comment field to add a version comment that appears in the version history |
| disabled | `boolean` | false | Toggles component disabled state (if there is no node permission checking). |
| majorVersion | `boolean` | false | majorVersion boolean field to true to indicate a major version should be created. |
| maxFilesSize | `number` | | Sets a limit on the maximum size (in bytes) of a file to be uploaded. Has no effect if undefined. |
| staticTitle | `string` | | Defines the text of the upload button. |
| tooltip | `string` | `null` | Custom tooltip text. |
| rootFolderId | `string` | `'-root-'` | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| acceptedFilesType | `string` | `'*'` | Filter for accepted file types. |
| multipleFiles | `boolean` | false | Allows/disallows multiple files |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | (**Required**) The node to be versioned. |
| nodeType | `string` | "cm:content" | Custom node type for uploaded file |
| rootFolderId | `string` | "-root-" | The ID of the root. Use the nodeId for Content Services or the taskId/processId for Process Services. |
| staticTitle | `string` | | Defines the text of the upload button. |
| tooltip | `string` | null | Custom tooltip text. |
| uploadFolders | `boolean` | false | Allows/disallows upload folders (only for Chrome). |
| versioning | `boolean` | false | Toggles versioning. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| success | `EventEmitter<{}>` | Emitted when the file is uploaded successfully. |
| error | `EventEmitter<{}>` | Emitted when an error occurs. |
| createFolder | `EventEmitter<{}>` | Emitted when a folder is created. |
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when delete permission is missing. |
| -- | -- | -- |
| beginUpload | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UploadFilesEvent`](../../lib/content-services/upload/components/upload-files.event.ts)`>` | |
| createFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a folder is created. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an error occurs. |
| permissionEvent | `EventEmitter<PermissionModel>` | Emitted when create permission is missing. |
| success | `EventEmitter<Object>` | Emitted when the file is uploaded successfully. |
## Details
@@ -67,8 +73,8 @@ So, to sum up, this component:
- **Can** upload a new version from the same file extension regardless of the file name.
- **Cannot** upload a new version that has a different file extension, to the file that was
originally uploaded (an error message will be emitted by the `error` EventEmitter of the component.
originally uploaded (an error message will be emitted by the `error` [`EventEmitter`](https://angular.io/api/core/EventEmitter) of the component.
## See also
- [Upload Button component](upload-button.component.md)
- [Upload Button component](upload-button.component.md)

View File

@@ -1,38 +1,41 @@
---
Added: v2.0.0
Status: Experimental
Last reviewed: 2018-05-08
---
# Version List component
Displays the version history of a node in a Version Manager component
Displays the version history of a node in a [Version Manager component](../content-services/version-manager.component.md).
### Basic Usage
```html
<adf-version-list [id]="nodeId"></adf-version-list>
<adf-version-list [node]="myNode"></adf-version-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| node | `MinimalNodeEntryEntity` | | Node whose version history you want to display. |
| showComments | `boolean` | true | Set this to false if version comments should not be displayed. |
| allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. |
### DOM events
All DOM events are bubbling and can be handled in the parent components up to the root application component.
| Name | Description |
| --- | --- |
| version-deleted | Raised after a version is deleted. |
| version-restored | Raised after a version is restored. |
| -- | -- | -- | -- |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| id | `string` | | (**Deprecated:** in 2.3.0) |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | The target node. |
| showActions | `boolean` | true | Toggles showing/hiding of version actions |
| showComments | `boolean` | true | Toggles showing/hiding of comments |
## Details
Inside the version manager component, there is the underlying VersionListComponent.
The VersionListComponent loads and displays the version history of a node.
This component is used by the [Version Manager component](../content-services/version-manager.component.md) to
load and displays the version history of a node.
If you want show readonly version list you set this component with showActions false:
```html
<adf-version-list [node]="myNode" [showActions]="false" ></adf-version-list>
```
## See also

View File

@@ -10,7 +10,7 @@ Displays the version history of a node with the ability to upload a new version.
![Version Manager](../docassets/images/version-manager.png)
![\#f03c15](https://placehold.it/15/f03c15/000000?text=+) `This component is still in experimental phase. It has several limitations which will be resolved soon.`
`This component is still in experimental phase. It has several limitations which will be resolved soon.`
## Basic Usage
@@ -22,20 +22,22 @@ Displays the version history of a node with the ability to upload a new version.
</adf-version-manager>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | --- | ----------- |
| node | [MinimalNodeEntryEntity](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeMinimalEntry.md) | |The node you want to manage the version history of. |
| showComments | `boolean` | true | Set this to false if version comments should not be displayed. |
| allowDownload | `boolean` | true | Toggles downloads of previous versions. Set this to false to not show the menu item for version download. |
| -- | -- | -- | -- |
| allowDownload | `boolean` | true | Enable/disable downloading a version of the current node. |
| node | [`MinimalNodeEntryEntity`](../content-services/document-library.model.md) | | Target node to manage version history. |
| showComments | `boolean` | true | Toggles showing/hiding of comments. |
### Events
| Name | Description |
| --- | --- |
| uploadSuccess | Raised when the file is uploaded |
| uploadError | Emitted when an error occurs.|
| Name | Type | Description |
| -- | -- | -- |
| uploadError | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when an error occurs during upload. |
| uploadSuccess | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when a file is uploaded successfully. |
## Details

View File

@@ -2,10 +2,26 @@
Added: v2.0.0
Status: Active
---
# Webscript component
Provides access to Webscript features.
## Contents
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Webscript View HTML example](#webscript-view-html-example)
- [Webscript View DATATABLE example](#webscript-view-datatable-example)
- [Webscript View JSON example](#webscript-view-json-example)
## Basic usage
```html
@@ -44,28 +60,30 @@ export class AppComponent {
}
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| scriptPath | `string` | | (required) Path to the webscript (as defined by webscript). |
| scriptArgs | `any` | | Arguments to pass to the webscript. |
| showData | `boolean` | `true` | Toggles whether to show or hide the data. |
| contextRoot | `string` | `'alfresco'` | Path where the application is deployed |
| servicePath | `string` | `'service'` | Path that the webscript service is mapped to. |
| contentType | `string` | `'TEXT'` | Content type to interpret the data received from the webscript. Can be "JSON" , "HTML" , "DATATABLE" or "TEXT" |
| -- | -- | -- | -- |
| contentType | `string` | "TEXT" | Content type to interpret the data received from the webscript. Can be "JSON" , "HTML" , "DATATABLE" or "TEXT" |
| contextRoot | `string` | "alfresco" | Path where the application is deployed |
| scriptArgs | `any` | | Arguments to pass to the webscript. |
| scriptPath | `string` | | (required) Path to the webscript (as defined by webscript). |
| servicePath | `string` | "service" | Path that the webscript service is mapped to. |
| showData | `boolean` | true | Toggles whether to show or hide the data. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| success | `EventEmitter<{}>` | Emitted when the operation succeeds. You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application. |
| -- | -- | -- |
| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the operation succeeds. You can get the plain data from the webscript through the **success** event parameter and use it as you need in your application. |
## Details
### Webscript View HTML example
This sample demonstrates how to implement a Webscript component that renders the HTML contents that come from a webscript
This sample demonstrates how to implement a [Webscript component](../content-services/webscript.component.md) that renders the HTML contents that come from a webscript
This sample Web Scripts reside in your Alfresco Server. You can access the folder webscript here:
`http://localhost:8080/alfresco/service/sample/folder/Company%20Home`
@@ -84,7 +102,7 @@ This sample Web Scripts reside in your Alfresco Server. You can access the folde
### Webscript View DATATABLE example
This sample demonstrates how to implement a Webscript component that renders the JSON contents that come from a webscript
This sample demonstrates how to implement a [Webscript component](../content-services/webscript.component.md) that renders the JSON contents that come from a webscript
`http://localhost:8080/alfresco/service/sample/folder/DATATABLE`
@@ -141,7 +159,7 @@ that will render the following table
### Webscript View JSON example
This sample demonstrates how to implement a Webscript component that renders the JSON contents that come from a webscript
This sample demonstrates how to implement a [Webscript component](../content-services/webscript.component.md) that renders the JSON contents that come from a webscript
This sample Web Scripts reside in your Alfresco Server. You can access the folder webscript here:
`http://localhost:8080/alfresco/service/sample/folder/JSON%EXAMPLE`

View File

@@ -11,6 +11,8 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [About component](about.component.md) ![Experimental](../docassets/images/ExperimentalIcon.png) | This component allow you to have a general overview of the version of ADF installed and the status of the Content service and Process service. | [Source](../../lib/core/about/about.component.ts) |
| [Buttons menu component](buttons-menu.component.md) | Displays buttons on a responsive menu. | [Source](../../lib/core/buttons-menu/buttons-menu.component.ts) |
| [Card view component](card-view.component.md) | Displays a configurable property list renderer. | [Source](../../lib/core/card-view/components/card-view/card-view.component.ts) |
| [Accordion group component](accordion-group.component.md) | Adds a collapsible panel to an accordion menu. | [Source](../../lib/core/collapsable/accordion-group.component.ts) |
| [Accordion component](accordion.component.md) | Creates a collapsible accordion menu. | [Source](../../lib/core/collapsable/accordion.component.ts) |
@@ -29,9 +31,12 @@ for more information about installing and using the source code.
| [Login component](login.component.md) | Authenticates to Alfresco Content Services and Alfresco Process Services. | [Source](../../lib/core/login/components/login.component.ts) |
| [Infinite pagination component](infinite-pagination.component.md) | Adds "infinite" pagination to the component it is used with. | [Source](../../lib/core/pagination/infinite-pagination.component.ts) |
| [Pagination component](pagination.component.md) | Adds pagination to the component it is used with. | [Source](../../lib/core/pagination/pagination.component.ts) |
| [Host settings component](host-settings.component.md) | Validates the URLs for ACS and APS and saves them in the user's local storage | [Source](../../lib/core/settings/host-settings.component.ts) |
| [Sidebar action menu component](sidebar-action-menu.component.md) | Displays a sidebar-action menu information panel. | [Source](../../lib/core/sidebar/sidebar-action-menu.component.ts) |
| [Host settings component](host-settings.component.md) ![Internal](../docassets/images/InternalIcon.png) | Validates the URLs for ACS and APS and saves them in the user's local storage | [Source](../../lib/core/settings/host-settings.component.ts) |
| [Sidebar action menu component](sidebar-action-menu.component.md) | Displays a sidebar-action menu information panel. | [Source](../../lib/core/sidenav-layout/components/sidebar-action/sidebar-action-menu.component.ts) |
| [Sidenav layout component](sidenav-layout.component.md) | Displays the standard three-region ADF application layout. | [Source](../../lib/core/sidenav-layout/components/sidenav-layout/sidenav-layout.component.ts) |
| [Sorting picker component](sorting-picker.component.md) | Selects from a set of predefined sorting definitions and directions. | [Source](../../lib/core/sorting-picker/sorting-picker.component.ts) |
| [Empty content component](empty-content.component.md) | Provides a generic "Empty Content" placeholder for components. | [Source](../../lib/core/templates/empty-content/empty-content.component.ts) |
| [Error content component](error-content.component.md) | Displays info about a specific error. | [Source](../../lib/core/templates/error-content/error-content.component.ts) |
| [Toolbar divider component](toolbar-divider.component.md) | Divides groups of elements in a Toolbar with a visual separator. | [Source](../../lib/core/toolbar/toolbar-divider.component.ts) |
| [Toolbar title component](toolbar-title.component.md) | Supplies custom HTML to be included in a Toolbar component title. | [Source](../../lib/core/toolbar/toolbar-title.component.ts) |
| [Toolbar component](toolbar.component.md) | Simple container for headers, titles, actions and breadcrumbs. | [Source](../../lib/core/toolbar/toolbar.component.ts) |
@@ -77,6 +82,7 @@ for more information about installing and using the source code.
| Name | Description | Source link |
| ---- | ----------- | ----------- |
| [Card item types service](card-item-types.service.md) | Maps type names to field component types for the Card View component. | [Source](../../lib/core/card-view/services/card-item-types.service.ts) |
| [Card view update service](card-view-update.service.md) | Reports edits and clicks within fields of a Card View component. | [Source](../../lib/core/card-view/services/card-view-update.service.ts) |
| [Activiti alfresco service](activiti-alfresco.service.md) | Gets Alfresco Repository folder content based on a Repository account configured in Alfresco Process Services (APS). | [Source](../../lib/core/form/services/activiti-alfresco.service.ts) |
| [Form rendering service](form-rendering.service.md) | Maps an APS form field type string onto the corresponding form widget component type. | [Source](../../lib/core/form/services/form-rendering.service.ts) |
@@ -97,7 +103,7 @@ for more information about installing and using the source code.
| [Discovery api service](discovery-api.service.md) | Gets version and license information for Process Services and Content Services. | [Source](../../lib/core/services/discovery-api.service.ts) |
| [Favorites api service](favorites-api.service.md) | Gets a list of items a user has marked as their favorites. | [Source](../../lib/core/services/favorites-api.service.ts) |
| [Highlight transform service](highlight-transform.service.md) | Adds HTML to a string to highlight chosen sections. | [Source](../../lib/core/services/highlight-transform.service.ts) |
| [Log service](log.service.md) | Provide a log functionality for your ADF application. | [Source](../../lib/core/services/log.service.ts) |
| [Log service](log.service.md) | Provides log functionality. | [Source](../../lib/core/services/log.service.ts) |
| [Nodes api service](nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../../lib/core/services/nodes-api.service.ts) |
| [Notification service](notification.service.md) | Shows a notification message with optional feedback. | [Source](../../lib/core/services/notification.service.ts) |
| [Page title service](page-title.service.md) | Sets the page title. | [Source](../../lib/core/services/page-title.service.ts) |

View File

@@ -0,0 +1,20 @@
---
Added: v2.4.0
Status: Experimental
Last reviewed: 2018-05-16
---
# About Component
This component allow you to have a general overview of the version of ADF installed and the status of the [Content service](../core/content.service.md) and [Process service](../process-services/process.service.md).
Note at the moment this component is mostly for internal use and it require:
- create a version file : npm list --depth=0 --json=true --prod=true > versions.json
- provide this version file in the dist folder
## Basic Usage
```html
<adf-about></adf-about>
```

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Accordion Group component
Adds a collapsible panel to an accordion menu.
@@ -33,22 +35,24 @@ export class MyComponent implements OnInit {
}
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| heading | `string` | | Title heading for the group. |
| headingIcon | `string` | | The material design icon. |
| headingIconTooltip | `string` | | Tooltip message to be shown for headingIcon |
| hasAccordionIcon | `boolean` | `true` | Should the (expanded) accordion icon be shown? |
| isOpen | `boolean` | | Is this group currently open? |
| isSelected | `boolean` | | Is this group currently selected? |
| -- | -- | -- | -- |
| hasAccordionIcon | `boolean` | true | Should the (expanded) accordion icon be shown? |
| heading | `string` | | Title heading for the group. |
| headingIcon | `string` | | The material design icon. |
| headingIconTooltip | `string` | | Tooltip message to be shown for headingIcon |
| isOpen | | | Is this group currently open? |
| isSelected | | | Is this group currently selected? |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| headingClick | `EventEmitter<any>` | Emitted when the heading is clicked. |
| -- | -- | -- |
| headingClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the heading is clicked. |
## Details

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Accordion Component
Creates a collapsible accordion menu.

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Activiti Alfresco Content Service
Gets Alfresco Repository folder content based on a Repository account configured in Alfresco Process Services (APS).
@@ -35,7 +36,8 @@ export class SomePageComponent implements OnInit {
## Methods
#### getAlfrescoNodes(accountId: string, folderId: string): Observable<[ExternalContent]>
#### getAlfrescoNodes(accountId: string, folderId: string): Observable&lt;[ExternalContent]>
Get all the nodes under passed in folder node ID (e.g. 3062d73b-fe47-4040-89d2-79efae63869c) for passed in
Alfresco Repository account ID as configured in APS:
@@ -58,26 +60,25 @@ The `folderNodeId` needs to identify a folder node ID in the Alfresco Repository
The response contained in `nodes` is an array with properties for each object like in this sample:
```
0:
folder: false
id: "2223d3c2-0709-4dd7-a79b-c45571901889;1.0"
simpleType: "pdf"
title: "JLAN_Server_Installation_Guide.pdf"
1:
folder: false
id: "900b4dc0-bfdc-4ec1-84dd-5f1f0a420066;1.0"
simpleType: "image"
title: "Screen Shot 2017-09-21 at 15.44.23.png"
2:
folder: true
id: "f7010382-7b4e-4a78-bb94-9de092439230"
simpleType: "folder"
title: "Event More Stuff"
```
0:
folder: false
id: "2223d3c2-0709-4dd7-a79b-c45571901889;1.0"
simpleType: "pdf"
title: "JLAN_Server_Installation_Guide.pdf"
1:
folder: false
id: "900b4dc0-bfdc-4ec1-84dd-5f1f0a420066;1.0"
simpleType: "image"
title: "Screen Shot 2017-09-21 at 15.44.23.png"
2:
folder: true
id: "f7010382-7b4e-4a78-bb94-9de092439230"
simpleType: "folder"
title: "Event More Stuff"
#### linkAlfrescoNode(accountId: string, node: ExternalContent, siteId: string): Observable<ExternalContentLink>
Link Alfresco content as related content in APS by passing in Alfresco node identifying the content, the Share site
that contains the content, and the Alfresco Repository account ID as configured in APS:
@@ -109,23 +110,21 @@ The `externalContentNode` identifies the content that should be set up as tempor
The response contained in `link` looks like in this sample:
```
link:
contentAvailable: true
created: Tue Nov 07 2017 13:18:48 GMT+0000 (GMT) {}
createdBy: {id: 1, firstName: null, lastName: "Administrator", email: "admin@app.activiti.com"}
id: 6006
link:true
mimeType: null
name: "simple.txt"
previewStatus: "queued"
relatedContent: false
simpleType: "content"
source: "alfresco-2"
sourceId: "da196918-1324-4e97-9d26-d28f1837a0b6@sample-workspace"
thumbnailStatus: "queued"
```
link:
contentAvailable: true
created: Tue Nov 07 2017 13:18:48 GMT+0000 (GMT) {}
createdBy: {id: 1, firstName: null, lastName: "Administrator", email: "admin@app.activiti.com"}
id: 6006
link:true
mimeType: null
name: "simple.txt"
previewStatus: "queued"
relatedContent: false
simpleType: "content"
source: "alfresco-2"
sourceId: "da196918-1324-4e97-9d26-d28f1837a0b6@sample-workspace"
thumbnailStatus: "queued"
<!-- seealso start -->
<!-- seealso end -->
<!-- seealso end -->

View File

@@ -26,8 +26,6 @@ export class MyComponent implements OnInit {
}
```
## Class members
### Properties
| Name | Type | Default value | Description |
@@ -47,7 +45,7 @@ export class MyComponent implements OnInit {
### Events
| Name | Type | Description |
| --- | --- | --- |
| ---- | ---- | ----------- |
| nodeUpdated | `Subject<MinimalNodeEntryEntity>` | Emitted when a node updates. |
## Details

View File

@@ -2,11 +2,14 @@
Added: v2.0.0
Status: Active
---
# Alfresco Content service
Gets URLs and access info and creates folders in Content Services.
## Methods
## Class members
### Methods
`getDocumentThumbnailUrl(nodeId: any, attachment?: boolean, ticket?: string): string`<br/>
Gets a thumbnail URL for a node.
@@ -14,16 +17,16 @@ Gets a thumbnail URL for a node.
`getContentUrl(nodeId: any, attachment?: boolean, ticket?: string): string`<br/>
Gets the URL for a node's content.
`getNodeContent(nodeId: string): Observable<any>`<br/>
`getNodeContent(nodeId: string):`[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets a node's content.
`createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`<br/>
[`createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`](../../lib/core/events/folder-created.event.ts)<br/>
Creates a folder.
`hasPermission(node: any, permission: PermissionsEnum|string): boolean`<br/>
`hasPermission(node: any, permission:`[`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)`|string): boolean`<br/>
Checks if the user has the specified permissions for `node`.
`hasAllowableOperations(node: any): boolean `<br/>
`hasAllowableOperations(node: any): boolean`<br/>
Checks if the the node has the `allowableOperations` property.
## Details
@@ -49,9 +52,7 @@ See the
for more information about the low-level REST API that these methods are based on.
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
<!-- seealso end -->

View File

@@ -0,0 +1,44 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-05-24
---
# App Config Pipe
Retrieves values from the application configuration file directly.
## Basic usage
```html
<adf-login
copyrightText="{{ 'application.copyright' | adfAppConfig }}">
</adf-login>
```
## Details
### Fallback values
You can use the pipe parameter to pass a fallback value which will be
used if the property name is not found:
```html
<adf-login
copyrightText="{{ 'application.copyright' | adfAppConfig:'Fallback Text' }}">
</adf-login>
```
### Chaining with other pipes
You can also chain values with other pipes such as the translation pipe:
```html
<adf-login
copyrightText="{{ 'application.copyright' | adfAppConfig | translate }}">
</adf-login>
```
## See also
- [App Config service](app-config.service.md)

View File

@@ -2,13 +2,41 @@
Added: v2.0.0
Status: Active
---
# App Config service
Supports app configuration settings, stored server side.
## Class members
### Methods
- **get**(key: `string` = `null`, defaultValue?: `T` = `null`): `T`<br/>
Gets the value of a named property.
- _key:_ `string` - Name of the property
- _defaultValue:_ `T` - (Optional) Value to return if the key is not found
- **Returns** `T` - Value of the property
- **getLocationHostname**(): `string`<br/>
Gets the location.hostname property.
- **Returns** `string` - Value of the property
- **getLocationPort**(prefix: `string` = `""`): `string`<br/>
Gets the location.port property.
- _prefix:_ `string` - Text added before port value
- **Returns** `string` - Port with prefix
- **getLocationProtocol**(): `string`<br/>
Gets the location.protocol value.
- **Returns** `string` -
- **load**(): `Promise<any>`<br/>
Loads the config file.
- **Returns** `Promise<any>` - Notification when loading is complete
- **select**(property: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Requests notification of a property value when it is loaded.
- _property:_ `string` - The desired property value
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Property value, when loaded
## Details
The `AppConfigService` service provides support for loading and accessing global application configuration settings that you store on the server side in the form of a JSON file.
The [`AppConfigService`](../core/app-config.service.md) service provides support for loading and accessing global application configuration settings that you store on the server side in the form of a JSON file.
You may need this service when deploying your ADF-based application to production servers.
@@ -37,7 +65,7 @@ Example of the default settings file content:
Please note that settings above are default ones coming with the server.
You can override the values in your custom `app.config.json` file if needed.
You can also change the path or name of the configuration file when importing the CoreModule in your main application.
You can also change the path or name of the configuration file when importing the [`CoreModule`](../../lib/core/core.module.ts) in your main application.
```ts
...
@@ -53,7 +81,7 @@ You can also change the path or name of the configuration file when importing th
export class AppModule { }
```
Below is a simple example of using the AppConfigService in practice.
Below is a simple example of using the [`AppConfigService`](../core/app-config.service.md) in practice.
**app.component.ts**
@@ -75,17 +103,17 @@ export class AppComponent {
}
```
Your custom components can also benefit from the `AppConfigService`,
Your custom components can also benefit from the [`AppConfigService`](../core/app-config.service.md),
you can put an unlimited number of settings and optionally a nested JSON hierarchy.
### Variable substitution in configuration strings
The `AppConfigService` also supports a limited set of variable substitutions to greatly simplify certain scenarios.
The [`AppConfigService`](../core/app-config.service.md) also supports a limited set of variable substitutions to greatly simplify certain scenarios.
```json
{
"ecmHost": "http://{hostname}:{port}/ecm",
"bpmHost": "http://{hostname}:{port}/bpm",
"ecmHost": "{protocol}//{hostname}:{port}/ecm",
"bpmHost": "{protocol}//{hostname}:{port}/bpm",
"application": {
"name": "Alfresco"
}
@@ -96,14 +124,15 @@ The supported variables are:
| Variable name | Runtime value |
| ------------- | ------------- |
| protocol | `location.protocol` |
| hostname | `location.hostname` |
| port | `location.port` |
## App Config onLoad Stream
When the app config is loaded correctly an onChange event is sent with the whole set app config properties. This comes in handy when a component wants to react to some property change or interact with the app config when it's correctly loaded.
```ts
appConfig.onLoad.subscribe((appConfig) => {
console.log(appConfig); //this is the representation of the app-config
});
@@ -122,4 +151,4 @@ We have added also the `select` method where the user can give the property name
appConfig.select('logLevel').subscribe((logLevelValue) => {
console.log(logLevelValue); //this will be 'trace';
});
```
```

View File

@@ -12,23 +12,23 @@ Gets details of the Process Services apps that are deployed for the user.
### Methods
- `getApplicationDetailsById(appId: number = null): Observable<AppDefinitionRepresentation>`<br/>
- **getApplicationDetailsById**(appId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>`<br/>
Gets the details for a specific app ID number.
- `appId: number = null` - ID of the target app
- **Returns** `Observable<AppDefinitionRepresentation>` - Details of the app
- `getDeployedApplications(): Observable<AppDefinitionRepresentation[]>`<br/>
- _appId:_ `number` - ID of the target app
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>` - Details of the app
- **getDeployedApplications**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`[]>`<br/>
Gets a list of deployed apps for this user.
- **Returns** `Observable<AppDefinitionRepresentation[]>` - The list of deployed apps
- `getDeployedApplicationsByName(name: string = null): Observable<AppDefinitionRepresentation>`<br/>
Gets a list of deployed apps for this user, where the app name is \`name\`.
- `name: string = null` - Name of the app
- **Returns** `Observable<AppDefinitionRepresentation>` - The list of deployed apps
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`[]>` - The list of deployed apps
- **getDeployedApplicationsByName**(name: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>`<br/>
Gets a list of deployed apps for this user, where the app name is `name`.
- _name:_ `string` - Name of the app
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md)`>` - The list of deployed apps
## Details
This service can be used to access the Process Services apps that are available
to the current user. You can find more information about the
returned `AppDefinitionRepresentation` class in the
returned [`AppDefinitionRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppDefinitionRepresentation.md) class in the
[Filter model page](../process-services/filter.model.md)
and in the
[Process Services Apps API](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/AppsApi.md#getAppDefinitions).

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Auth Guard Bpm service
Adds authentication with Process Services to a route within the app.

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Auth Guard Ecm service
Adds authentication with Content Services to a route within the app.

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Auth Guard service
Adds authentication to a route within the app.

View File

@@ -12,63 +12,63 @@ Provides authentication to ACS and APS.
### Methods
- `getBpmUsername(): string`<br/>
- **getBpmUsername**(): `string`<br/>
Gets the BPM username
- **Returns** `string` - The BPM username
- `getEcmUsername(): string`<br/>
- **getEcmUsername**(): `string`<br/>
Gets the ECM username.
- **Returns** `string` - The ECM username
- `getRedirectUrl(provider: string = null): string`<br/>
- **getRedirect**(provider: `string` = `null`): `any[]`<br/>
Gets the URL to redirect to after login.
- `provider: string = null` - Service provider. Can be "ECM", "BPM" or "ALL".
- **Returns** `string` - The redirect URL
- `getTicketBpm(): string | null`<br/>
- _provider:_ `string` - Service provider. Can be "ECM", "BPM" or "ALL".
- **Returns** `any[]` - The redirect URL
- **getTicketBpm**(): `string | null`<br/>
Gets the BPM ticket stored in the Storage.
- **Returns** `string | null` - The ticket or `null` if none was found
- `getTicketEcm(): string | null`<br/>
- **getTicketEcm**(): `string | null`<br/>
Gets the ECM ticket stored in the Storage.
- **Returns** `string | null` - The ticket or `null` if none was found
- `getTicketEcmBase64(): string | null`<br/>
- **getTicketEcmBase64**(): `string | null`<br/>
Gets the BPM ticket from the Storage in Base 64 format.
- **Returns** `string | null` - The ticket or `null` if none was found
- `handleError(error: any = null): Observable<any>`<br/>
- **handleError**(error: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Prints an error message in the console browser
- `error: any = null` - Error message
- **Returns** `Observable<any>` - Object representing the error message
- `isBpmLoggedIn(): boolean`<br/>
- _error:_ `any` - Error message
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Object representing the error message
- **isBpmLoggedIn**(): `boolean`<br/>
Checks if the user is logged in on a BPM provider.
- **Returns** `boolean` - True if logged in, false otherwise
- `isEcmLoggedIn(): boolean`<br/>
- **isEcmLoggedIn**(): `boolean`<br/>
Checks if the user is logged in on an ECM provider.
- **Returns** `boolean` - True if logged in, false otherwise
- `isLoggedIn(): boolean`<br/>
- **isLoggedIn**(): `boolean`<br/>
Checks if the user logged in.
- **Returns** `boolean` - True if logged in, false otherwise
- `isRememberMeSet(): boolean`<br/>
- **isRememberMeSet**(): `boolean`<br/>
Checks whether the "remember me" cookie was set or not.
- **Returns** `boolean` - True if set, false otherwise
- `login(username: string = null, password: string = null, rememberMe: boolean = false): Observable<object>`<br/>
- **login**(username: `string` = `null`, password: `string` = `null`, rememberMe: `boolean` = `false`): [`Observable`](http://reactivex.io/documentation/observable.html)`<object>`<br/>
Logs the user in.
- `username: string = null` - Username for the login
- `password: string = null` - Password for the login
- `rememberMe: boolean = false` - Stores the user's login details if true
- **Returns** `Observable<object>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket
- `logout(): any`<br/>
- _username:_ `string` - Username for the login
- _password:_ `string` - Password for the login
- _rememberMe:_ `boolean` - Stores the user's login details if true
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<object>` - Object with auth type ("ECM", "BPM" or "ALL") and auth ticket
- **logout**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Logs the user out.
- **Returns** `any` - Response event called when logout is complete
- `removeTicket()`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Response event called when logout is complete
- **removeTicket**()<br/>
Removes the login ticket from Storage.
- `saveTicketAuth()`<br/>
- **saveTicketAuth**()<br/>
Saves the AUTH ticket in the Storage.
- `saveTicketBpm()`<br/>
- **saveTicketBpm**()<br/>
Saves the BPM ticket in the Storage.
- `saveTicketEcm()`<br/>
- **saveTicketEcm**()<br/>
Saves the ECM ticket in the Storage.
- `saveTickets()`<br/>
- **saveTickets**()<br/>
Saves the ECM and BPM ticket in the Storage.
- `setRedirectUrl(url: RedirectionModel = null)`<br/>
- **setRedirect**(url: [`RedirectionModel`](../../lib/core/models/redirection.model.ts) = `null`)<br/>
Sets the URL to redirect to after login.
- `url: RedirectionModel = null` - URL to redirect to
- _url:_ [`RedirectionModel`](../../lib/core/models/redirection.model.ts) - URL to redirect to
## Details

View File

@@ -1,63 +0,0 @@
# Boilerplate component
Shows how to write a Markdown file for a component.
![Screenshot goes here if necessary](../docassets/images/adf-toolbar-01.png)
<!-- Most doc files don't need a table of contents. Delete this part unless
you have added about five subsections in the Details part.
-->
<!-- markdown-toc start - Don't edit this section. npm run toc to generate it-->
<!-- toc -->
<!-- tocstop -->
<!-- markdown-toc end -->
## Basic Usage
<!-- Delete any Basic Usage parts that you don't need (eg, some components don't
have any properties). -->
```html
<adf-document-list
#documentList
[currentFolderId]="'-my-'"
[contextMenuActions]="true"
[contentActions]="true">
</adf-document-list>
```
### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| prop1 | string | 'hello' | The property description in the table should be no more than a few sentences. Add extra description in the Details section if you need to. |
| prop2 | boolean | true | Prop tables should have name, type, default and description, in that order. Leave default value blank if appropriate. |
### Events
| Name | Description |
| --- | --- |
| someEvent | Keep description short for the table. Usually starts with "Emitted when..." |
| anotherEvent | Emitted when the user double-clicks a list node |
## Details
**Note: This is not a real component!**
Copy the contents of this file when you create a new component doc and edit or remove bits of it
as necessary. Usually, the title should be derived from the Angular name with the kebab-case expanded
(so "task-details.component" becomes "Task Details component") but there is no need to stick to this
if it looks wrong to you.
### Subsection
You don't need to make subsections in the Details part but add them if they help with the
explanation. Add them as level 3 headings in the Details part only - to keep the consistency
of the docs, you shouldn't normally add any new level 1 or 2 sections to the Markdown.
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
<!-- seealso end -->

View File

@@ -1,42 +0,0 @@
# Boilerplate service
Shows how to write a Markdown file for a service.
## Methods
`someMethod(value: string = '')`<br/>
Shows how to document a method.
`anotherMethod(value: string = '')`<br/>
Shows how to document a method.
## Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| prop1 | string | 'hello' | Many services don't need a properties table. Delete this section if you don't need it. |
| prop2 | boolean | true | Prop tables should have name, type, default and description, in that order. Leave default blank if appropriate. |
## Details
**Note: This is not a real component!**
Copy the contents of this file when you create a new service doc and edit or remove bits of it
as necessary. Usually, the title should be derived from the Angular name with the kebab-case expanded
(so "page-title.service" becomes "Page Title service") but there is no need to stick to this
if it looks wrong to you.
The main difference between service and component docs is that services usually have methods. Replace
the method signature and description with your own text but keep the &lt;br&gt; at the end of the
signature line.
### Subsection
You don't need to make subsections in the Details part but add them if they help with the
explanation. Add them as level 3 headings in the Details part only - to keep the consistency
of the docs, you shouldn't normally add any new level 1 or 2 sections to the Markdown.
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
<!-- seealso end -->

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Bpm User model
Contains information about a Process Services user.

View File

@@ -1,18 +1,23 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-04
---
# Bpm User service
Gets information about the current Process Services user.
## Methods
## Class members
`getCurrentUserInfo(): Observable<BpmUserModel>`<br/>
Gets information about the current user.
### Methods
`getCurrentUserProfileImage(): string`<br/>
Returns the current user's profile image as a URL.
- **getCurrentUserInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../core/bpm-user.model.md)`>`<br/>
Gets information about the current user.
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`BpmUserModel`](../core/bpm-user.model.md)`>` - User information object
- **getCurrentUserProfileImage**(): `string`<br/>
Gets the current user's profile image as a URL.
- **Returns** `string` - URL string
## Details

View File

@@ -0,0 +1,54 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-08
---
# Buttons Menu Component
Displays buttons on a responsive menu.
![adf-buttons-menu-desktop](../docassets/images/adf-buttons-menu-desktop.png)
## Basic Usage
Place the buttons for the menu inside this component's HTML tags.
They must use the following structure:
```html
<adf-buttons-action-menu>
<button mat-menu-item (click)="showSettings()">
<mat-icon>settings</mat-icon><span>Settings</span>
</button>
<button mat-menu-item (click)="delete()">
<mat-icon>delete</mat-icon><span>Delete</span>
</button>
</adf-buttons-action-menu>
```
Notice that the buttons have an icon and a label for the button inside a `<span>` tag.
They also make use of the Angular material directive `mat-menu-item`.
```html
<button mat-menu-item (click)="event()">
<mat-icon> icon </mat-icon>
<span> label </span>
</button>
```
## Details
This component is fully responsive and it will display one of two different layouts
depending on the screen size:
**Desktop View**
![adf-buttons-menu-desktop](../docassets/images/adf-buttons-menu-desktop.png)
**Mobile View**
![adf-buttons-menu-mobile](../docassets/images/adf-buttons-menu-mobile.png)
The component has a property called `isMenuEmpty` that you can access from code. If this is
set to true then the component will not show an empty menu with no buttons defined.

View File

@@ -0,0 +1,74 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Card Item Type service
Maps type names to field component types for the [Card View component](../core/card-view.component.md).
## Class members
### Methods
- **getComponentTypeResolver**(type: `string` = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts)<br/>
Gets the currently active ComponentTypeResolver function for a field type.
- _type:_ `string` - The type whose resolver you want
- _defaultValue:_ `Type<__type>` - Default type returned for types that are not yet mapped
- **Returns** [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) - Resolver function
- **resolveComponentType**(model: [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, defaultValue: `Type<__type>` = `this.defaultValue`): `Type<__type>`<br/>
Finds the component type that is needed to render a form field.
- _model:_ [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) - [Form](../../lib/process-services/task-list/models/form.model.ts) field model for the field to render
- _defaultValue:_ `Type<__type>` - Default type returned for field types that are not yet mapped.
- **Returns** `Type<__type>` - Component type
- **setComponentTypeResolver**(type: `string` = `null`, resolver: [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) = `null`, override: `boolean` = `true`)<br/>
Sets or optionally replaces a ComponentTypeResolver function for a field type.
- _type:_ `string` - The type whose resolver you want to set
- _resolver:_ [`DynamicComponentResolveFunction`](../../lib/core/services/dynamic-component-mapper.service.ts) - The new resolver function
- _override:_ `boolean` - The new resolver will only replace an existing one if this parameter is true
## Details
The [Card View component](card-view.component.md) uses this service to find the component
type that is required to display a particular field type (text, date, etc). The service
maps a type name string to a corresponding `ComponentTypeResolver` function that takes a
model object as a parameter and returns the component type needed to display that model.
The default mapping is shown below:
| Type string | Component |
| ----------- | --------- |
| 'text' | CardViewTextItemComponent |
| 'int' | CardViewTextItemComponent |
| 'float' | CardViewTextItemComponent |
| 'date' | CardViewDateItemComponent |
| 'datetime' | CardViewDateItemComponent |
| 'bool' | CardViewBoolItemComponent |
| 'map' | CardViewMapItemComponent |
### Adding new type mappings
You can define your own custom field types for the Card View (see the
[Card View Item interface](card-view-item.interface.md) page for full details of how to do this).
When you have defined the field component, you need to register it with the [Card Item Type service](../../lib/core/card-view/services/card-item-types.service.ts)
so that the [Card View component](../core/card-view.component.md) can make use of it:
```ts
@Component({
...
providers: [ CardItemTypeService ] /* If you don't want to pollute the main instance of the CardItemTypeService service */
...
})
export class SomeParentComponent {
constructor(private cardItemTypeService: CardItemTypeService) {
cardItemTypeService.setComponentTypeResolver('star-date', () => CardViewStarDateItemComponent);
}
}
```
## See also
- [Card View component](card-view.component.md)
- [Card View Item interface](card-view-item.interface.md)

View File

@@ -0,0 +1,151 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Card View Item interface
Defines the implementation of an item in a [Card View component](../core/card-view.component.md).
## Definition
```ts
export interface CardViewItem {
label: string;
value: any;
key: string;
default?: any;
type: string;
displayValue: string;
editable?: boolean;
icon?: string;
data?: any;
}
```
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label | string | "" | Item label |
| value | any | | The original data value for the item |
| key | string | "" | Identifying key (important when editing the item) |
| default | any | | The default value to display if the value is empty |
| displayValue | string | "" | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
| clickable | boolean | false | Toggles whether the item is clickable |
| icon | string | | The material icon to show beside clickable items |
| data | any | null | Any custom data which is needed to be provided and stored in the model for any reason. During an update or a click event this can be a container of any custom data which can be useful for 3rd party codes. |
## Details
Card item components are loaded dynamically by the
main [Card View component](card-view.component.md). This allows you to define your own
component for a custom item type.
For example, follow the steps given below to add a **stardate** type to display Captain
Picard's birthday (47457.1):
1. Define the model for the custom type.
Your model must extend the [`CardViewBaseItemModel`](../../lib/core/card-view/models/card-view-baseitem.model.ts) class and implement the [`CardViewItem`](../../lib/core/card-view/interfaces/card-view-item.interface.ts)
and [`DynamicComponentModel`](../../lib/core/services/dynamic-component-mapper.service.ts) interfaces. See the
[Card View Text Item model source](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts)
for an example of how to do this.
```ts
import { CardViewBaseItemModel, CardViewItem, DynamicComponentModel } from '@alfresco/adf-core';
export class CardViewStarDateItemModel extends CardViewBaseItemModel implements CardViewItem, DynamicComponentModel {
type: string = 'star-date';
get displayValue() {
return this.convertToStarDate(this.value) || this.default;
}
private convertToStarDate(starTimeStamp: number): string {
// Do the magic
}
}
```
2. Define the component for the custom type.
The selector is not important given that this is a dynamically loaded component.
You can choose any name for the selector, but it makes sense to follow the Angular standards.
```ts
@Component({
selector: 'card-view-stardateitem' /* For example */
...
})
export class CardViewStarDateItemComponent {
@Input()
property: CardViewStarDateItemModel;
@Input()
editable: boolean;
constructor(private cardViewUpdateService: CardViewUpdateService) {}
isEditable() {
return this.editable && this.property.editable;
}
showStarDatePicker() {
...
}
}
```
See the
[Card View Text Item component source](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/card-view/components/card-view-textitem/card-view-textitem.component.ts)
or the
[Card View Date Item component source](https://github.com/Alfresco/alfresco-ng2-components/blob/development/lib/core/card-view/components/card-view-dateitem/card-view-dateitem.component.ts) for examples of how to make the field
editable.
3. Add your custom component to your module's `entryComponents` list.
You must register your component in your module's `entryComponents` array
to enable Angular to load it dynamically:
```js
@NgModule({
imports: [...],
declarations: [
CardViewStarDateItemComponent
],
entryComponents: [
CardViewStarDateItemComponent
],
exports: [...]
})
export class MyModule {}
```
4. Bind your custom component to the custom model type so that Angular's dynamic component
loader can find it.
```ts
@Component({
...
providers: [ CardItemTypeService ] /* If you don't want to pollute the main instance of the CardItemTypeService service */
...
})
export class SomeParentComponent {
constructor(private cardItemTypeService: CardItemTypeService) {
cardItemTypeService.setComponentTypeResolver('star-date', () => CardViewStarDateItemComponent);
}
}
```
The [Card Item Type service](card-item-types.service.md) maps each item type to the
corresponding component. See its [doc page](card-item-types.service.md) for further
details.
## See also
- [Card View component](card-view.component.md)
- [Card Item Types service](card-item-types.service.md)

View File

@@ -2,13 +2,14 @@
Added: v2.0.0
Status: Active
---
# Card View Update service
Reports edits and clicks within fields of a Card View component.
Reports edits and clicks within fields of a [Card View component](../core/card-view.component.md).
## Details
You can use the Card View Update service to respond to edits and clicks within items on
You can use the [Card View Update service](../core/card-view-update.service.md) to respond to edits and clicks within items on
a card view. This might involve updating application data to reflect the changes made to
the view or could simply be a matter of highlighting a clicked item.
@@ -52,7 +53,7 @@ constructor(private cardViewUpdateService: CardViewUpdateService) {
}
```
The constructor here also sets the `CardViewTextItemModel` instances that define the layout of the
The constructor here also sets the [`CardViewTextItemModel`](../../lib/core/card-view/models/card-view-textitem.model.ts) instances that define the layout of the
card view (see the [Card View component](card-view.component.md) for further information
about this). The model objects and the `key` property are used to identify which item has been clicked
or updated when an event occurs.
@@ -74,7 +75,7 @@ called after updates and clicks, respectively.
### Responding to updates
The update function is passed a parameter of type `UpdateNotification`:
The update function is passed a parameter of type [`UpdateNotification`](../../lib/core/card-view/services/card-view-update.service.ts):
```ts
export interface UpdateNotification {
@@ -83,8 +84,8 @@ export interface UpdateNotification {
}
```
Here, `target` contains the `CardViewTextItemModel` that was used to initialize
the field in question (in practice, this might be a `CardViewDateItemModel` or `CardViewMapItemModel` if
Here, `target` contains the [`CardViewTextItemModel`](../../lib/core/card-view/models/card-view-textitem.model.ts) that was used to initialize
the field in question (in practice, this might be a [`CardViewDateItemModel`](../../lib/core/card-view/models/card-view-dateitem.model.ts) or [`CardViewMapItemModel`](../../lib/core/card-view/models/card-view-mapitem.model.ts) if
the card layout includes these objects). The `changed` property contains an object with a single property:
```ts
@@ -112,7 +113,7 @@ on the [Card View component](card-view.component.md) itself.
### Responding to clicks
The click function is passed a `ClickNotification` object, which is similar to `UpdateNotification` described above,
The click function is passed a [`ClickNotification`](../../lib/core/card-view/services/card-view-update.service.ts) object, which is similar to [`UpdateNotification`](../../lib/core/card-view/services/card-view-update.service.ts) described above,
but without the `changed` property. Use the `target` property to identify the item that was clicked:
```ts

View File

@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-09
---
# Card View component
Displays a configurable property list renderer.
@@ -10,6 +12,8 @@ Displays a configurable property list renderer.
## Basic Usage
Defining properties from HTML:
```html
<adf-card-view
[properties]="[{label: 'My Label', value: 'My value'}]"
@@ -17,61 +21,9 @@ Displays a configurable property list renderer.
</adf-card-view>
```
### Properties
Defining properties from Typescript:
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| properties | [CardViewItem](#defining-properties)\[] | - | (**required**) The custom view to render |
| editable | boolean | - | If the component editable or not |
| displayEmpty | boolean | true | Whether to show empty properties in non-editable mode |
## Details
You define the property list, the CardViewComponent does the rest. Each property represents a card view item (a row) in the card view component. At the time of writing three a few kind of card view item (property type) is supported out of the box (e.g: [text](#card-text-item) item and [date](#card-date-item) item) but you can define your own custom types as well.
### Editing
The card view can optionally allow its properties to be edited. You can control the editing of the properties in two level.
- **global level** - _via the editable parameter of the card-view.component_
- **property level** - _in each property via the editable attribute_
If you set the global editable parameter to false, no properties can be edited regardless of what is set inside the property.
See the [Card View Update service](card-view-update.service.md) page for details on how to use the service
to respond to clicks and edits in a card view. You can use this, for example, to save the edits within your
application or to highlight a clicked item.
### Defining properties
Properties is an array of models which one by one implements the CardViewItem interface.
```js
export interface CardViewItem {
label: string;
value: any;
key: string;
default?: any;
type: string;
displayValue: string;
editable?: boolean;
icon?: string;
}
```
At the moment these are the models supported:
- **CardViewTextItemModel** - _for text items_
- **CardViewMapItemModel** - _for map items_
- **CardViewDateItemModel** - _for date items_
- **CardViewDatetimeItemModel** - _for datetime items_
- **CardViewBoolItemModel** - _for bool items (checkbox)_
- **CardViewIntItemModel** - _for integers items_
- **CardViewFloatItemModel** - _for float items_
Each of them extends the abstract CardViewBaseItemModel class to add some custom functionality to the basic behaviour.
```js
```ts
this.properties = [
new CardViewTextItemModel({
label: 'Name',
@@ -126,32 +78,97 @@ Each of them extends the abstract CardViewBaseItemModel class to add some custom
]
```
## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| displayEmpty | `boolean` | true | Toggles whether or not to show empty items in non-editable mode. |
| editable | `boolean` | | Toggles whether or not the items can be edited. |
| properties | [`CardViewItem`](../../lib/core/card-view/interfaces/card-view-item.interface.ts)`[]` | | (**required**) Items to show in the card view. |
## Details
You define the property list, the [`CardViewComponent`](../core/card-view.component.md) does the rest. Each property represents a card view item (a row) in the [card view component](../core/card-view.component.md). The following item types are available by default:
- [**CardViewTextItemModel**](#card-text-item) - _for text items_
- [**CardViewMapItemModel**](#card-map-item) - _for map items_
- [**CardViewDateItemModel**](#card-date-item) - _for date items_
- [**CardViewDatetimeItemModel**](#card-datetime-item) - _for datetime items_
- [**CardViewBoolItemModel**](#card-bool-item) - _for bool items (checkbox)_
- [**CardViewIntItemModel**](#card-int-item) - _for integer items_
- [**CardViewFloatItemModel**](#card-float-item) - _for float items_
Each of these types implements the [Card View Item interface](card-view-item.interface.md):
```ts
export interface CardViewItem {
label: string;
value: any;
key: string;
default?: any;
type: string;
displayValue: string;
editable?: boolean;
icon?: string;
}
```
You can also define your own item types. See the
[Card View Item interface](card-view-item.interface.md) page for details of how to do
this.
### Editing
You can optionally set up the card view so that its properties can be edited. You can control
the editing of properties at two levels:
- **Global level** - _via the editable parameter of the card-view.component_
- **Property level** - _in each property via the editable attribute_
If you set the global editable parameter to false, no properties can be edited regardless of their
individual `editable` settings.
See the [Card View Update service](card-view-update.service.md)
page for details of how to use the service to respond to clicks and edits in a card view.
You can use this, for example, to save the edits within your application or to highlight a
clicked item.
### Defining properties
The `properties` array contains instances of models that represent the layout of the Card View.
The ordering of the models in the array matches the ordering of items in the view. Each of the
models extends the abstract [`CardViewBaseItemModel`](../../lib/core/card-view/models/card-view-baseitem.model.ts) class to add functionality for
specific data types, as described below.
#### Card Text Item
CardViewTextItemModel is a property type for text properties.
[`CardViewTextItemModel`](../../lib/core/card-view/models/card-view-textitem.model.ts) is a property type for text properties.
```js
```ts
const textItemProperty = new CardViewTextItemModel(options);
```
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label\* | string | --- | The label to render |
| value\* | any | --- | The original value |
| key\* | string | --- | the key of the property. Have an important role when editing the property. |
| default | any | --- | The default value to render in case the value is empty |
| displayValue\* | string | --- | The value to render |
| editable | boolean | false | Whether the property editable or not |
| clickable | boolean | false | Whether the property clickable or not |
| icon | string | The material icon to show against the clickable property |
| multiline | string | false | Single or multiline text |
| pipes | CardViewTextItemPipeProperty\[] | \[] | Pipes to be applied on the displayValue |
| label\* | string | | Item label |
| value\* | any | | The original data value for the item |
| key\* | string | | Identifying key (important when editing the item) |
| default | any | | The default value to display if the value is empty |
| displayValue\* | string | | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
| clickable | boolean | false | Toggles whether the property responds to clicks |
| icon | string | | The material icon to show beside the item if it is clickable |
| multiline | boolean | false | Single or multiline text |
| pipes | CardViewTextItemPipeProperty\[] | \[] | Pipes to be applied to the text before display |
##### Using pipes in Card Text Item
##### Using pipes with a Card Text Item
You can use pipes for text items almost the same way as you would do it in your template. You can provide an array of pipes with additional pipeParameters like this:
You can use pipes for text items in almost the same way as you would do it in an HTML template.
You can provide an array of pipes with additional pipe parameters using the `pipes` property:
```js
```ts
const myWonderfulPipe1: PipeTransform = <whatever PipeTransform implmentation>;
const myWonderfulPipe2: PipeTransform = <whatever PipeTransform implmentation>;
@@ -168,205 +185,109 @@ new CardViewTextItemModel({
#### Card Map Item
CardViewMapItemModel is a property type for map properties.
[`CardViewMapItemModel`](../../lib/core/card-view/models/card-view-mapitem.model.ts) is a property type for map properties.
```js
```ts
const mapItemProperty = new CardViewMapItemModel(options);
```
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label\* | string | --- | The label to render |
| value\* | Map | --- | A map that contains the key value pairs |
| key\* | string | --- | the key of the property. |
| default | any | --- | The default value to render in case the value is empty |
| displayValue\* | string | --- | The value to render |
| clickable | boolean | false | Whether the property clickable or not |
| label\* | string | | Item label |
| value\* | Map | | A map that contains the key value pairs |
| key\* | string | | Identifying key (important when editing the item) |
| default | any | | The default value to display if the value is empty |
| displayValue\* | string | | The value to display |
| clickable | boolean | false | Toggles whether the property responds to clicks |
#### Card Date Item
CardViewDateItemModel is a property type for date properties.
[`CardViewDateItemModel`](../../lib/core/card-view/models/card-view-dateitem.model.ts) is a property type for date properties.
```js
```ts
const dateItemProperty = new CardViewDateItemModel(options);
```
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label\* | string | --- | The label to render |
| value\* | any | --- | The original value |
| key\* | string | --- | the key of the property. |
| default | any | --- | The default value to render in case the value is empty |
| displayValue\* | any | --- | The value to render |
| editable | boolean | false | Whether the property editable or not |
| format | boolean | "MMM DD YYYY" | any format that momentjs accepts |
| label\* | string | | Item label |
| value\* | any | | The original data value for the item |
| key\* | string | | Identifying key (important when editing the item) |
| default | any | | The default value to display if the value is empty |
| displayValue\* | any | | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
| format | boolean | "MMM DD YYYY" | Any date format that momentjs accepts |
#### Card Datetime Item
CardViewDatetimeItemModel is a property type for datetime properties.
[`CardViewDatetimeItemModel`](../../lib/core/card-view/models/card-view-datetimeitem.model.ts) is a property type for datetime properties.
```js
```ts
const datetimeItemProperty = new CardViewDatetimeItemModel(options);
```
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label\* | string | --- | The label to render |
| value\* | any | --- | The original value |
| key\* | string | --- | the key of the property. |
| default | any | any | The default value to render in case the value is empty |
| displayValue\* | string | --- | The value to render |
| editable | boolean | false | Whether the property editable or not |
| format | boolean | "MMM DD YYYY HH:mm" | any format that momentjs accepts |
| label\* | string | | Item label |
| value\* | any | | The original data value for the item |
| key\* | string | | Identifying key (important when editing the item) |
| default | any | any | The default value to display if the value is empty |
| displayValue\* | string | | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
| format | boolean | "MMM DD YYYY HH:mm" | Any datetime format that momentjs accepts |
#### Card Bool Item
CardViewBoolItemModel is a property type for boolean properties.
[`CardViewBoolItemModel`](../../lib/core/card-view/models/card-view-boolitem.model.ts) is a property type for boolean properties.
```js
```ts
const boolItemProperty = new CardViewBoolItemModel(options);
```
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label\* | string | --- | The label to render |
| value\* | boolean | --- | The original value |
| key\* | string | --- | the key of the property. |
| default | boolean | false | The default value to render in case the value is empty |
| displayValue\* | boolean | --- | The value to render |
| editable | boolean | false | Whether the property editable or not |
| label\* | string | | Item label |
| value\* | boolean | | The original data value for the item |
| key\* | string | | Identifying key (important when editing the item) |
| default | boolean | false | The default value to display if the value is empty |
| displayValue\* | boolean | | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
#### Card Int Item
CardViewIntItemModel is a property type for integer properties.
[`CardViewIntItemModel`](../../lib/core/card-view/models/card-view-intitem.model.ts) is a property type for integer properties.
```js
```ts
const intItemProperty = new CardViewIntItemModel(options);
```
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label\* | string | --- | The label to render |
| value\* | integer | --- | The original value |
| key\* | string | --- | the key of the property. |
| default | integer | --- | The default value to render in case the value is empty |
| displayValue\* | integer | --- | The value to render |
| editable | boolean | false | Whether the property editable or not |
| label\* | string | | Item label |
| value\* | integer | | The original data value for the item |
| key\* | string | | Identifying key (important when editing the item) |
| default | integer | | The default value to display if the value is empty |
| displayValue\* | integer | | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
#### Card Float Item
CardViewFloatItemModel is a property type for float properties.
[`CardViewFloatItemModel`](../../lib/core/card-view/models/card-view-floatitem.model.ts) is a property type for float properties.
```js
```ts
const floatItemProperty = new CardViewFloatItemModel(options);
```
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label\* | string | --- | The label to render |
| value\* | float | --- | The original value |
| key\* | string | --- | the key of the property. |
| default | float | --- | The default value to render in case the value is empty |
| displayValue\* | float | --- | The value to render |
| editable | boolean | false | Whether the property editable or not |
### Defining your custom card Item
Card item components are loaded dynamically, which makes you able to define your own custom component for the custom card item type.
Let's consider you want to have a **stardate** type to display Captain Picard's birthday (47457.1). For this, you need to do the following steps.
#### 1. Define the Model for the custom type
Your model has to extend the **CardViewBaseItemModel** and implement the **CardViewItem** and **DynamicComponentModel** interface.
_(You can check how the CardViewTextItemModel is implemented for further guidance.)_
```js
import { CardViewBaseItemModel, CardViewItem, DynamicComponentModel } from '@alfresco/adf-core';
export class CardViewStarDateItemModel extends CardViewBaseItemModel implements
CardViewItem, DynamicComponentModel {
type: string = 'star-date';
get displayValue() {
return this.convertToStarDate(this.value) || this.default;
}
private convertToStarDate(starTimeStamp: number): string {
// Do the magic
}
}
```
#### 2. Define the Component for the custom type
Create your custom card view item component. Defining the selector is not important, being it a dinamically loaded component, so you can give any selector name to it, but it makes sense to follow the angular standards.
```js
@Component({
selector: 'card-view-stardateitem' // For example
...
})
export class CardViewStarDateItemComponent {
@Input()
property: CardViewStarDateItemModel;
@Input()
editable: boolean;
constructor(private cardViewUpdateService: CardViewUpdateService) {}
isEditable() {
return this.editable && this.property.editable;
}
showStarDatePicker() {
...
}
}
```
To make your component editable, you can have a look on either the CardViewTextItemComponent' or on the CardViewDateItemComponent's source.
#### 3. Add you custom component to your module's entryComponents list
For Angular to be able to load your custom component dynamically, you have to register your component in your modules entryComponents.
```js
@NgModule({
imports: [...],
declarations: [
CardViewStarDateItemComponent
],
entryComponents: [
CardViewStarDateItemComponent
],
exports: [...]
})
export class MyModule {}
```
#### 4. Bind your custom component to the custom model type, enabling Angular's dynamic component loader to find it.
For mapping each type to their Component, there is the **CardItemTypeService**. This service extends the **DynamicComponentMapper** abstract class.
This CardItemTypeService is responible for the type resolution, it contains all the default components (e.g.: text, date, etc...) also. In order to make your component available, you need to extend the list of possible components.
You can extend this list the following way:
```js
@Component({
...
providers: [ CardItemTypeService ] // If you don't want to pollute the main instance of the CardItemTypeService service
...
})
export class SomeParentComponent {
constructor(private cardItemTypeService: CardItemTypeService) {
cardItemTypeService.setComponentTypeResolver('star-date', () => CardViewStarDateItemComponent);
}
}
```
| label\* | string | | Item label |
| value\* | float | | The original data value for the item |
| key\* | string | | Identifying key (important when editing the item) |
| default | float | | The default value to display if the value is empty |
| displayValue\* | float | | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
## See also
- [Card view update service](card-view-update.service.md)
- [Card View Update service](card-view-update.service.md)
- [Card View Item interface](card-view-item.interface.md)

View File

@@ -12,15 +12,15 @@ Adds and retrieves comments for nodes in Content Services.
### Methods
- `addNodeComment(nodeId: string, message: string): Observable<CommentModel>`<br/>
- **addNodeComment**(nodeId: `string` = `null`, message: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>`<br/>
Adds a comment to a node.
- `nodeId: string` - ID of the target node
- `message: string` - Text for the comment
- **Returns** `Observable<CommentModel>` - Details of the comment added
- `getNodeComments(nodeId: string): Observable<CommentModel[]>`<br/>
- _nodeId:_ `string` - ID of the target node
- _message:_ `string` - Text for the comment
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` - Details of the comment added
- **getNodeComments**(nodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>`<br/>
Gets all comments that have been added to a node.
- `nodeId: string = null` - ID of the target node
- **Returns** `Observable<CommentModel[]>` - Details for each comment
- _nodeId:_ `string` - ID of the target node
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>` - Details for each comment
## Details

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Comment list component
Shows a list of comments.
@@ -47,7 +48,7 @@ export class SomeComponent implements OnInit {
}
```
In the component template use the comment list component:
In the component template use the [comment list component](../core/comment-list.component.md):
```html
<adf-comment-list
@@ -56,14 +57,16 @@ In the component template use the comment list component:
</adf-comment-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| comments | `any[]` | | The comments data used to populate the list. |
| -- | -- | -- | -- |
| comments | [`CommentModel`](../../lib/core/models/comment.model.ts)`[]` | | The comments data used to populate the list. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| clickRow | `EventEmitter<any>` | Emitted when the user clicks on one of the comment rows. |
| -- | -- | -- |
| clickRow | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` | Emitted when the user clicks on one of the comment rows. |

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Comment Process model
Represents a comment added to a Process Services task or process instance.

View File

@@ -12,24 +12,24 @@ Adds and retrieves comments for task and process instances in Process Services.
### Methods
- `addProcessInstanceComment(processInstanceId: string = null, message: string = null): Observable<CommentModel>`<br/>
- **addProcessInstanceComment**(processInstanceId: `string` = `null`, message: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>`<br/>
Adds a comment to a process instance.
- `processInstanceId: string = null` - ID of the target process instance
- `message: string = null` - Text for the comment
- **Returns** `Observable<CommentModel>` - Details of the comment added
- `addTaskComment(taskId: string = null, message: string = null): Observable<CommentModel>`<br/>
- _processInstanceId:_ `string` - ID of the target process instance
- _message:_ `string` - Text for the comment
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` - Details of the comment added
- **addTaskComment**(taskId: `string` = `null`, message: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>`<br/>
Adds a comment to a task.
- `taskId: string = null` - ID of the target task
- `message: string = null` - Text for the comment
- **Returns** `Observable<CommentModel>` - Details about the comment
- `getProcessInstanceComments(processInstanceId: string = null): Observable<CommentModel[]>`<br/>
- _taskId:_ `string` - ID of the target task
- _message:_ `string` - Text for the comment
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`>` - Details about the comment
- **getProcessInstanceComments**(processInstanceId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>`<br/>
Gets all comments that have been added to a process instance.
- `processInstanceId: string = null` - ID of the target process instance
- **Returns** `Observable<CommentModel[]>` - Details for each comment
- `getTaskComments(taskId: string = null): Observable<CommentModel[]>`<br/>
- _processInstanceId:_ `string` - ID of the target process instance
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>` - Details for each comment
- **getTaskComments**(taskId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>`<br/>
Gets all comments that have been added to a task.
- `taskId: string = null` - ID of the target task
- **Returns** `Observable<CommentModel[]>` - Details for each comment
- _taskId:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`CommentModel`](../../lib/core/models/comment.model.ts)`[]>` - Details for each comment
## Details

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Comments Component
Displays comments from users involved in a specified task or content and allows an involved user to add a comment to a task or a content.
@@ -26,16 +27,18 @@ Displays comments from users involved in a specified task or content and allows
</adf-comments>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| taskId | `string` | | The numeric ID of the task. |
| nodeId | `string` | | The ID of the node. |
| readOnly | `boolean` | `false` | Are the comments read only? |
| -- | -- | -- | -- |
| nodeId | `string` | | The numeric ID of the node. |
| readOnly | `boolean` | false | Are the comments read only? |
| taskId | `string` | | The numeric ID of the task. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | `EventEmitter<any>` | Emitted when an error occurs while displaying/adding a comment. |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when an error occurs while displaying/adding a comment. |

View File

@@ -8,72 +8,86 @@ Last reviewed: 2018-04-13
Accesses app-generated data objects via URLs and file downloads.
## Methods
## Class members
- `downloadBlob(blob: Blob, fileName: string)`
Invokes content download for a Blob with a file name.
- `blob` - Content to download.
- `fileName` - Name of the resulting file.
- `downloadData(data: any, fileName: string)`
Invokes content download for a data array with a file name.
- `data` - Data to download.
- `fileName` - Name of the resulting file.
- `downloadJSON(json: any, fileName)`
Invokes content download for a JSON object with a file name.
- `json` - JSON object to download.
- `fileName` - Name of the resulting file.
- `createTrustedUrl(blob: Blob): string`
Creates a trusted object URL from the Blob. WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
- `blob` - Data to wrap into object URL
- `getDocumentThumbnailUrl(node: any, attachment?: boolean, ticket?: string): string`
Get thumbnail URL for the given document node.
- `node` - Node to get URL for.
- `attachment` - (Optional) Retrieve content as an attachment for download
- `ticket` - (Optional) Custom ticket to use for authentication
- `getContentUrl(node: any, attachment?: boolean, ticket?: string): string`
Get content URL for the given node.
- `node` - nodeId or node to get URL for.
- `attachment` - (Optional) Retrieve content as an attachment for download
- `ticket` - (Optional) Custom ticket to use for authentication
- `getNodeContent(nodeId: string): Observable<any>`
Get content for the given node.
- `nodeId` - ID of the target node
- `createFolder(relativePath: string, name: string, parentId?: string): Observable<FolderCreatedEvent>`
Create a folder
- `relativePath` - Location to create the folder
- `name` - Folder name
- `parentId` - (Optional) Node ID of parent folder
- `hasPermission(node: any, permission: PermissionsEnum | string): boolean`
Check if the user has permissions on that node
- `node` - Node to check allowableOperations
- `permission` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- `hasAllowableOperations(node: any): boolean`
Check if the node has the properties allowableOperations
- `node` - Node to check allowableOperations
### Methods
- **createFolder**(relativePath: `string` = `null`, name: `string` = `null`, parentId?: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FolderCreatedEvent`](../../lib/core/events/folder-created.event.ts)`>`<br/>
Creates a folder.
- _relativePath:_ `string` - Location to create the folder
- _name:_ `string` - Folder name
- _parentId:_ `string` - (Optional) Node ID of parent folder
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FolderCreatedEvent`](../../lib/core/events/folder-created.event.ts)`>` - Information about the new folder
- **createTrustedUrl**(blob: [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) = `null`): `string`<br/>
Creates a trusted object URL from the [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob). WARNING: calling this method with untrusted user data exposes your application to XSS security risks!
- _blob:_ [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - Data to wrap into object URL
- **Returns** `string` - URL string
- **downloadBlob**(blob: [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) with a file name.
- _blob:_ [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) - Content to download.
- _fileName:_ `string` - Name of the resulting file.
- **downloadData**(data: `any` = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a data array with a file name.
- _data:_ `any` - Data to download.
- _fileName:_ `string` - Name of the resulting file.
- **downloadJSON**(json: `any` = `null`, fileName: `string` = `null`)<br/>
Invokes content download for a JSON object with a file name.
- _json:_ `any` - JSON object to download.
- _fileName:_ `string` - Name of the resulting file.
- **getContentUrl**(node: `any` = `null`, attachment?: `boolean` = `null`, ticket?: `string` = `null`): `string`<br/>
Gets a content URL for the given node.
- _node:_ `any` - Node to get URL for.
- _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download
- _ticket:_ `string` - (Optional) Custom ticket to use for authentication
- **Returns** `string` - URL string
- **getDocumentThumbnailUrl**(node: `any` = `null`, attachment?: `boolean` = `null`, ticket?: `string` = `null`): `string`<br/>
Gets a thumbnail URL for the given document node.
- _node:_ `any` - Node to get URL for.
- _attachment:_ `boolean` - (Optional) Toggles whether to retrieve content as an attachment for download
- _ticket:_ `string` - (Optional) Custom ticket to use for authentication
- **Returns** `string` - URL string
- **getNode**(nodeId: `string` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>`<br/>
Gets a Node via its node ID.
- _nodeId:_ `string` - ID of the target node
- _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodeEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodeEntry.md)`>` - Details of the folder
- **getNodeContent**(nodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets content for the given node.
- _nodeId:_ `string` - ID of the target node
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Content data
- **hasAllowableOperations**(node: `any` = `null`): `boolean`<br/>
Checks if the node has the properties allowableOperations
- _node:_ `any` - Node to check allowableOperations
- **Returns** `boolean` - True if the node has the property, false otherwise
- **hasPermission**(node: `Node` = `null`, permission: [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)` | string` = `null`): `boolean`<br/>
Checks if the user has permissions on that node
- _node:_ `Node` - Node to check allowableOperations
- _permission:_ [`PermissionsEnum`](../../lib/core/models/permissions.enum.ts)` | string` - Create, delete, update, updatePermissions, !create, !delete, !update, !updatePermissions
- **Returns** `boolean` - True if the user has the required permissions, false otherwise
## Details
Use the Content service to deliver data to the user from `Blob` objects.
Use the [Content service](../core/content.service.md) to deliver data to the user from [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) objects.
The [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class
The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class
(implemented in the browser, not ADF) represents an array of bytes that you can
use to construct and store data in any binary format you choose.
The user can access a Blob either by downloading the byte array as a file or in
The user can access a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) either by downloading the byte array as a file or in
some cases by viewing it directly in the browser via a special URL that references
the Blob. For example, you could use the Blob interface to construct an image in the
the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). For example, you could use the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) interface to construct an image in the
[PNG format](https://en.wikipedia.org/wiki/Portable_Network_Graphics). Since
PNG is a format the browser can display, you could use the Blob's URL in an
PNG is a format the browser can display, you could use the [Blob's](https://developer.mozilla.org/en-US/docs/Web/API/Blob) URL in an
&lt;img> element to view the image within the page. Alternatively, you could let
the user download it as a PNG file.
The `downloadBlob` method starts a download of the Blob data to the `filename`
The `downloadBlob` method starts a download of the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) data to the `filename`
within the user's downloads folder. The other `downloadXXX` methods do the same
but first convert the supplied data to a Blob before downloading; see the
but first convert the supplied data to a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) before downloading; see the
[Blob reference page](https://developer.mozilla.org/en-US/docs/Web/API/Blob)
for details of how a Blob's contents are assembled from the constructor arguments.
for details of how a [Blob's](https://developer.mozilla.org/en-US/docs/Web/API/Blob) contents are assembled from the constructor arguments.
Use `createdTrustedUrl` to generate a URL string for a Blob. The URL refers to
the Blob as though it were a file but it is actually an object stored in memory,
Use `createdTrustedUrl` to generate a URL string for a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob). The URL refers to
the [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) as though it were a file but it is actually an object stored in memory,
so it does not persist across browser sessions. This URL can be used much like any
other, so you could use it for the `src` attribute of an &lt;img> element or the
`href` of a download link. Note that while the URL is 'trusted', the data it contains

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# APS Content Component
Shows the content preview.

View File

@@ -48,8 +48,8 @@ export class MyComponent implements OnInit {
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| context-menu-enabled | `boolean` | false | |
| context-menu | `any[]` | | |
| context-menu-enabled | `boolean` | false | Is the menu enabled? |
| context-menu | `any[]` | | Items for the menu. |
## Details

View File

@@ -12,19 +12,21 @@ Stores key-value data items as browser cookies.
### Methods
- `getItem(key: string = null): string | null`<br/>
- **clear**()<br/>
- **getItem**(key: `string` = `null`): `string | null`<br/>
Retrieves a cookie by its key.
- `key: string = null` - Key to identify the cookie
- _key:_ `string` - Key to identify the cookie
- **Returns** `string | null` - The cookie data or null if it is not found
- `isEnabled(): boolean`<br/>
- **isEnabled**(): `boolean`<br/>
Checks if cookies are enabled.
- **Returns** `boolean` - True if enabled, false otherwise
- `setItem(key: string = null, data: string = null, expiration: Date | null = null, path: string | null = null)`<br/>
- **setItem**(key: `string` = `null`, data: `string` = `null`, expiration: `Date | null` = `null`, path: `string | null` = `null`)<br/>
Sets a cookie.
- `key: string = null` - Key to identify the cookie
- `data: string = null` - Data value to set for the cookie
- `expiration: Date | null = null` - Expiration date of the data
- `path: string | null = null` - "Pathname" to store the cookie
- _key:_ `string` - Key to identify the cookie
- _data:_ `string` - Data value to set for the cookie
- _expiration:_ `Date | null` - Expiration date of the data
- _path:_ `string | null` - "Pathname" to store the cookie
## Details

View File

@@ -17,6 +17,7 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
- [Details](#details)
- [Conditional visibility](#conditional-visibility)
- [Automatic column header translation](#automatic-column-header-translation)
- [Custom tooltips](#custom-tooltips)
- [Column Template](#column-template)
@@ -55,9 +56,21 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
## Details
### Conditional visibility
You can use `ngIf` directives to provide conditional visibility support for the columns:
```html
<data-column
*nfIg="showNameColumn"
key="name"
title="MY.RESOURCE.KEY">
</data-column>
```
### Automatic column header translation
You can use i18n resource keys with DataColumn `title` property.
You can use i18n resource keys with [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) `title` property.
The component will automatically check the corresponding i18n resources and fetch corresponding value.
```html
@@ -110,9 +123,9 @@ Every cell in the DataTable component is bound to the dynamic data context conta
| Name | Type | Description |
| ---- | ---- | ----------- |
| data | [DataTableAdapter](datatable-adapter.interface.md) | Data adapter instance. |
| row | [DataRow](datatable-adapter.interface.md) | Current data row instance. |
| col | [DataColumn](datatable-adapter.interface.md) | Current data column instance. |
| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | Data adapter instance. |
| row | [`DataRow`](../../lib/core/datatable/data/data-row.model.ts) | Current data row instance. |
| col | [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) | Current data column instance. |
You can use all three properties to gain full access to underlying data from within your custom templates.
In order to wire HTML templates with the data context you will need defining a variable that is bound to `$implicit` like shown below:
@@ -125,7 +138,7 @@ In order to wire HTML templates with the data context you will need defining a v
The format of naming is `let-VARIABLE_NAME="$implicit"` where `VARIABLE_NAME` is the name of the variable you want to bind template data context to.
Getting a cell value from the underlying DataTableAdapter:
Getting a cell value from the underlying [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts):
```ts
context.data.getValue(entry.row, entry.col);

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# DataTableAdapter interface
Defines how table data is supplied to [DataTable](datatable.component.md)
@@ -10,48 +11,53 @@ and [Tasklist](../process-services/task-list.component.md) components.
## Properties
| Name | Type | Description |
| --- | --- | --- |
| ---- | ---- | ----------- |
| selectedRow | DataRow | The data for the currently selected row. |
## Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| rowsChanged | [`Subject<Array<DataRow>>`](../../lib/core/datatable/data/data-row.model.ts) | Raised when data adapter gets new rows. |
## Methods
`getRows(): Array<DataRow>;`<br/>
`setRows(rows: Array<DataRow>): void;`<br/>
[`getRows(): Array<DataRow>;`](../../lib/core/datatable/data/data-row.model.ts)<br/>
[`setRows(rows: Array<DataRow>): void;`](../../lib/core/datatable/data/data-row.model.ts)<br/>
Get/set the values for display in the table using an array of rows.
`getColumns(): Array<DataColumn>;`<br/>
`setColumns(columns: Array<DataColumn>): void;`<br/>
[`getColumns(): Array<DataColumn>;`](../../lib/core/datatable/data/data-column.model.ts)<br/>
[`setColumns(columns: Array<DataColumn>): void;`](../../lib/core/datatable/data/data-column.model.ts)<br/>
Get/set an array of column specifications.
`getValue(row: DataRow, col: DataColumn): any;`<br/>
`getValue(row: `[`DataRow,`](../../lib/core/datatable/data/data-row.model.ts)` col: DataColumn): any;`<br/>
Get the data value from a specific table cell.
`getSorting(): DataSorting;`
`setSorting(sorting: DataSorting): void;`
`getSorting(): `[`DataSorting`](../../lib/core/datatable/data/data-sorting.model.ts)`;`<br/>
`setSorting(sorting: DataSorting): void;`<br/>
Get/set the sorting key and direction (ascending or descending).
`sort(key?: string, direction?: string): void;`
`sort(key?: string, direction?: string): void;`<br/>
Sort the table with a specified key and direction (ascending or descending).
## Details
You can implement DataTableAdapter in your own class to display your data with the [DataTable](datatable.component.md)
You can implement [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) in your own class to display your data with the [DataTable](datatable.component.md)
and [Tasklist](../process-services/task-list.component.md) components.
This interface (along with other interfaces for column and row data) hides the details of your class from the caller, so you can store your data internally however you like. The DataTable library implements the interface in the [ObjectDataTableAdapter](#objectdatatableadapter) class which is the standard adapter for the Datatable component.
This interface (along with other interfaces for column and row data) hides the details of your class from the caller, so you can store your data internally however you like. The DataTable library implements the interface in the [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts) class which is the standard adapter for the Datatable component.
The basic idea of DataTableAdapter is that the caller can request your class to return an array of column
The basic idea of [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) is that the caller can request your class to return an array of column
definition objects. Each of these objects specifies the unique key, name, type and other properties of a single column.
The caller can also request the data values for the table as an array of row objects. The caller accesses the data from a row using a `getValue` method that returns the data from a specified column. This column is identified by the unique key that was set during the column definition.
The data-hiding works the other way around when the caller needs to set data in the DataTableAdapter class - the internal
The data-hiding works the other way around when the caller needs to set data in the [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) class - the internal
details of the caller's storage are hidden by the column and row interfaces. When the `setColumns` and `setRows` methods are
called on the adapter, it can simply query the column/row objects it receives and then store the data in its own format.
### Columns and rows
Columns are defined by the DataColumn interface:
Columns are defined by the [`DataColumn`](../../lib/core/datatable/data/data-column.model.ts) interface:
```ts
interface DataColumn {
@@ -69,7 +75,7 @@ interface DataColumn {
An array of these objects is passed to your object when the `setColumns` method is called. The `key` property is used to identify columns and so each column's key should be unique. The `type` string can have a value of 'text', 'image' or 'date'.
An array of DataRow objects is passed to your object when the `setRows` method is called:
An array of [`DataRow`](../../lib/core/datatable/data/data-row.model.ts) objects is passed to your object when the `setRows` method is called:
```ts
interface DataRow {
@@ -85,8 +91,8 @@ Each row contains a set of values. An item in the set is retrieved by passing it
### ObjectDataTableAdapter
The DataTable library provides a implementation of DataTableAdapter, called
[ObjectDataTableAdapter](https://github.com/Alfresco/alfresco-ng2-components/blob/master/ng2-components/ng2-alfresco-datatable/src/data/object-datatable-adapter.ts). This is a simple adapter that binds to object arrays and turns object fields into columns:
The DataTable library provides a implementation of [DataTableAdapter,](../../lib/core/datatable/data/datatable-adapter.ts) called
[`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts). This is a simple adapter that binds to object arrays and turns object fields into columns:
```ts
let data = new ObjectDataTableAdapter(
@@ -143,13 +149,14 @@ let schema = ObjectDataTableAdapter.generateSchema(data);
}
]
*/
```
<!-- Don't edit the See also section. Edit seeAlsoGraph.json and run config/generateSeeAlso.js -->
<!-- seealso start -->
## See also
- [Datatable component](datatable.component.md)
- [Task list component](../process-services/task-list.component.md)
<!-- seealso end -->
- [Datatable component](datatable.component.md)
- [Task list component](../process-services/task-list.component.md)
<!-- seealso end -->

View File

@@ -16,6 +16,10 @@ See it live: [DataTable Quickstart](https://embed.plnkr.co/80qr4YFBeHjLMdAV0F6l/
- [Basic usage](#basic-usage)
- [Setting the rows and column schema](#setting-the-rows-and-column-schema)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
@@ -78,7 +82,72 @@ export class DataTableDemo {
}
```
You can also use HTML-based schema declaration like shown below:
### Setting the rows and column schema
You can set rows and columns to the [ObjectDataTableAdapter](../../lib/core/datatable/data/object-datatable-adapter.ts) like shown below:
```ts
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@Component({...})
export class DataTableDemo {
data: ObjectDataTableAdapter;
constructor() {
this.data = new ObjectDataTableAdapter(
// data
[
{id: 1, name: 'Name 1'},
{id: 2, name: 'Name 2'}
],
// columns
[
{
type: 'text',
key: 'id',
title: 'Id',
sortable: true
},
{
type: 'text',
key: 'name',
title: 'Name',
cssClass: 'full-width',
sortable: true
}
]
);
}
}
```
```html
<adf-datatable
[data]="data">
</adf-datatable>
```
You can also set rows and HTML-based schema declaration like shown below:
```ts
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@Component({...})
export class DataTableDemo {
data: ObjectDataTableAdapter;
constructor() {
this.data = new ObjectDataTableAdapter(
// data
[
{id: 1, name: 'Name 1'},
{id: 2, name: 'Name 2'}
],
[]
);
}
}
```
```html
<adf-datatable [data]="data">
@@ -92,76 +161,139 @@ You can also use HTML-based schema declaration like shown below:
</adf-datatable>
```
You can also set rows to the [ObjectDataTableAdapter](../../lib/core/datatable/data/object-datatable-adapter.ts) and set columns as an input like shown below :
```ts
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@Component({...})
export class DataTableDemo {
data: ObjectDataTableAdapter;
schema: any;
constructor() {
this.data = new ObjectDataTableAdapter(
// data
[
{
id: 1,
name: 'Name 1',
createdBy : { name: 'user'},
createdOn: 123,
icon: 'http://example.com/img.png'
{id: 1, name: 'Name 1'},
{id: 2, name: 'Name 2'}
],
[]
);
// columns
this.schema =
[
{
type: 'text',
key: 'id',
title: 'Id',
sortable: true
},
{
id: 2,
name: 'Name 2',
createdBy : { name: 'user 2'},
createdOn: 123,
icon: 'http://example.com/img.png'
type: 'text',
key: 'name',
title: 'Name',
sortable: true
}
]
);
];
}
}
```
```html
<adf-datatable
[data]="data"
[columns]="schema">
</adf-datatable>
```
You can also set rows and columns through inputs as shown below :
```ts
import { ObjectDataTableAdapter } from '@alfresco/adf-core';
@Component({...})
export class DataTableDemo {
rows: any;
schema: any;
constructor() {
// data
this.rows =
[
{id: 1, name: 'Name 1'},
{id: 2, name: 'Name 2'}
];
// columns
this.schema =
[
{
type: 'text',
key: 'id',
title: 'Id',
sortable: true
},
{
type: 'text',
key: 'name',
title: 'Name',
sortable: true
}
];
}
}
```
```html
<adf-datatable
[rows]="rows"
[columns]="schema">
</adf-datatable>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| data | `DataTableAdapter` | | Data source for the table |
| display | `string` | `DisplayMode.List` | Selects the display mode of the table. Can be "list" or "gallery". |
| rows | `any[]` | `[]` | The rows that the datatable will show. |
| selectionMode | `string` | `'single'` | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| multiselect | `boolean` | `false` | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
| actions | `boolean` | `false` | Toggles the data actions column. |
| actionsPosition | `string` | `'right'` | Position of the actions dropdown menu. Can be "left" or "right". |
| fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. |
| contextMenu | `boolean` | `false` | Toggles custom context menu for the component. |
| allowDropFiles | `boolean` | `false` | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). |
| -- | -- | -- | -- |
| actions | `boolean` | false | Toggles the data actions column. |
| actionsPosition | `string` | "right" | Position of the actions dropdown menu. Can be "left" or "right". |
| allowDropFiles | `boolean` | false | Toggles file drop support for rows (see [Upload directive](upload.directive.md) for further details). |
| columns | `any[]` | \[] | The columns that the datatable will show. |
| contextMenu | `boolean` | false | Toggles custom context menu for the component. |
| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source for the table |
| display | `string` | [`DisplayMode`](../../lib/core/datatable/components/datatable/datatable.component.ts).List | Selects the display mode of the table. Can be "list" or "gallery". |
| fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. |
| loading | `boolean` | false | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). |
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
| noPermission | `boolean` | false | Flag that indicates if the datatable should show the "no permission" template. |
| rowStyle | `string` | | The inline style to apply to every row. See [NgStyle](https://angular.io/docs/ts/latest/api/common/index/NgStyle-directive.html) docs for more details and usage examples. |
| rowStyleClass | `string` | `''` | The CSS class to apply to every row. |
| showHeader | `boolean` | `true` | Toggles the header. |
| loading | `boolean` | `false` | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). |
| noPermission | `boolean` | `false` | Flag that indicates if the datatable should show the "no permission" template. |
| rowStyleClass | `string` | "" | The CSS class to apply to every row. |
| rows | `any[]` | \[] | The rows that the datatable will show. |
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
| showHeader | `boolean` | true | Toggles the header. |
| sorting | `any[]` | \[] | Define the sort order of the datatable. Possible values are : [`created`, `desc`], [`created`, `asc`], [`due`, `desc`], [`due`, `asc`] |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| rowClick | `EventEmitter<DataRowEvent>` | Emitted when the user clicks a row. |
| rowDblClick | `EventEmitter<DataRowEvent>` | Emitted when the user double-clicks a row. |
| showRowContextMenu | `EventEmitter<DataCellEvent>` | Emitted before the context menu is displayed for a row. |
| showRowActionsMenu | `EventEmitter<DataCellEvent>` | Emitted before the actions menu is displayed for a row. |
| executeRowAction | `EventEmitter<DataRowActionEvent>` | Emitted when the user executes a row action. |
| -- | -- | -- |
| executeRowAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowActionEvent`](../../lib/core/datatable/components/datatable/data-row-action.event.ts)`>` | Emitted when the user executes a row action. |
| rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user clicks a row. |
| rowDblClick | `EventEmitter<DataRowEvent>` | Emitted when the user double-clicks a row. |
| showRowActionsMenu | `EventEmitter<DataCellEvent>` | Emitted before the actions menu is displayed for a row. |
| showRowContextMenu | `EventEmitter<DataCellEvent>` | Emitted before the context menu is displayed for a row. |
## Details
### Supplying data for the table
The column layout and row data are supplied to the table using an object that implements the
DataTableAdapter interface. This interface hides the internal details of the class that provides
[`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) interface. This interface hides the internal details of the class that provides
the data, which gives a lot of flexibility in how the data can be stored and accessed. The DataTable
library includes a standard adapter class called `ObjectDataTableAdapter` that is useful in many
common cases. See the [DataTableAdapter](datatable-adapter.interface.md) for full details about the interface and the `ObjectDataTableAdapter` class.
library includes a standard adapter class called [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts) that is useful in many
common cases. See the [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) for full details about the interface and the [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts) class.
### Customizing columns
@@ -239,7 +371,7 @@ You can add a template that will be shown when there are no rows in your datatab
</adf-datatable>
```
You can use the empty list component to show the default ADF empty template.
You can use the [empty list component](../../lib/core/datatable/components/datatable/empty-list.component.ts) to show the default ADF empty template.
You can place any HTML layout or Angular component as content in the empty template section
by using the `<adf-empty-list-header>`, `<adf-empty-list-body>`, and `<adf-empty-list-footer>`
@@ -481,5 +613,5 @@ earlier), and perform the corresponding actions.
- [Data column component](data-column.component.md)
- [Pagination component](pagination.component.md)
- [DataTableAdapter](datatable-adapter.interface.md)
- [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts)
- [Document list component](../content-services/document-list.component.md)

View File

@@ -12,14 +12,14 @@ Gets a list of Content Services nodes currently in the trash.
### Methods
- `getDeletedNodes(options?: Object = null): Observable<NodePaging>`<br/>
- **getDeletedNodes**(options?: `Object` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets a list of nodes in the trash.
- `options?: Object = null` - (Optional) Options for JSAPI call
- **Returns** `Observable<NodePaging>` - List of nodes in the trash
- _options:_ `Object` - (Optional) Options for JSAPI call
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of nodes in the trash
## Details
The `getDeletedNodes` method returns a NodePaging object that lists
The `getDeletedNodes` method returns a [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts) object that lists
the items in the trash (see [Document Library model](../content-services/document-library.model.md) for
more information about this class). The format of the `options` parameter is
described in the [getDeletedNodes](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/NodesApi.md#getDeletedNodes)

View File

@@ -12,12 +12,12 @@ Gets version and license information for Process Services and Content Services.
### Methods
- `getBpmProductInfo(): any`<br/>
- **getBpmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets product information for Process Services.
- **Returns** `any` - ProductVersionModel containing product details
- `getEcmProductInfo(): any`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - ProductVersionModel containing product details
- **getEcmProductInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets product information for Content Services.
- **Returns** `any` - ProductVersionModel containing product details
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - ProductVersionModel containing product details
## Details

View File

@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Ecm User model
Contains information about a Content Services user.

View File

@@ -12,23 +12,23 @@ Gets information about a Content Services user.
### Methods
- `getCurrentUserInfo(): any`<br/>
- **getCurrentUserInfo**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>`<br/>
Gets information about the user who is currently logged-in.
- **Returns** `any` - User information as for getUserInfo
- `getUserInfo(userName: string = null): Observable<EcmUserModel>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>` - User information as for getUserInfo
- **getUserInfo**(userName: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>`<br/>
Gets information about a user identified by their username.
- `userName: string = null` - Target username
- **Returns** `Observable<EcmUserModel>` - User information
- `getUserProfileImage(avatarId: string = null): string`<br/>
- _userName:_ `string` - Target username
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`EcmUserModel`](../core/ecm-user.model.md)`>` - User information
- **getUserProfileImage**(avatarId: `string` = `null`): `string`<br/>
Returns a profile image as a URL.
- `avatarId: string = null` - Target avatar
- _avatarId:_ `string` - Target avatar
- **Returns** `string` - Image URL
## Details
The class returned by `getUserInfo` and `getCurrentUserInfo` is detailed
in the [Ecm User model docs](ecm-user.model.md). The `avatarId` passed to
`getUserProfileImage` is available as a field of the `EcmUserModel` instance
`getUserProfileImage` is available as a field of the [`EcmUserModel`](../core/ecm-user.model.md) instance
returned for a particular person.
See the

View File

@@ -0,0 +1,80 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-08
---
# Empty Content Component
Provides a generic "Empty Content" placeholder for components.
![Favorites screen](../docassets/images/empty-content-favorites.png)
## Basic usage
```html
<adf-document-list>
<empty-folder-content>
<ng-template>
<adf-empty-content
icon="star_rate"
title="APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE"
subtitle="APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT">
</adf-empty-folder>
</ng-template>
</empty-folder-content>
</adf-document-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| icon | `string` | "cake" | Material Icon to use |
| subtitle | `string` | "" | String or Resource Key for the title |
| title | `string` | "" | String or Resource Key for the subtitle |
## Details
### Usage examples
```html
<adf-document-list>
<empty-folder-content>
<ng-template>
<adf-empty-content
icon="star_rate"
title="APP.BROWSE.FAVORITES.EMPTY_STATE.TITLE"
subtitle="APP.BROWSE.FAVORITES.EMPTY_STATE.TEXT">
</adf-empty-folder>
</ng-template>
</empty-folder-content>
</adf-document-list>
```
![Favorites screen](../docassets/images/empty-content-favorites.png)
You can also use multiple lines instead of the subtitle section:
```html
<adf-document-list>
<empty-folder-content>
<ng-template>
<adf-empty-content
icon="delete"
title="APP.BROWSE.TRASHCAN.EMPTY_STATE.TITLE">
<p class="adf-empty-content__text">{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.FIRST_TEXT' | translate }}</p>
<p class="adf-empty-content__text">{{ 'APP.BROWSE.TRASHCAN.EMPTY_STATE.SECOND_TEXT' | translate }}</p>
</adf-empty-content>
</ng-template>
</empty-folder-content>
</adf-document-list>
```
![Trashcan screen](../docassets/images/empty-content-trashcan.png)
## See also
- [Error content component](error-content.component.md)

View File

@@ -0,0 +1,81 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-13
---
# Error Content Component
Displays info about a specific error.
## Basic Usage
Once you have caught the error in your server you will need to redirect to `/error/errorCode` to display information about that error.
```ts
this.router.navigate(['/error', errorCode]);
```
```html
<div class="adf-error-content">
<p class="adf-error-content-code">
{{ errorCode }}
</p>
<div class="adf-error-content-shadow"></div>
<p class="adf-error-content-title">
{{ 'ERROR_CONTENT.' + errorCode + '.TITLE' | translate }}
</p>
<p class="adf-error-content-description">
{{ 'ERROR_CONTENT.' + errorCode + '.DESCRIPTION' | translate }}
</p>
<div class="adf-error-content-buttons">
<a href="/" mat-raised-button color="primary"
*ngIf="secondaryButtonText" (click)="onSecondButton()"
class="adf-error-content-description-link">
{{ 'ERROR_CONTENT.' + errorCode + '.SECONDARY_BUTTON.TEXT' | translate | uppercase }}
</a>
<a href="/" mat-raised-button color="primary" (click)="onReturnButton()">
{{ 'ERROR_CONTENT.' + this.errorCode + '.RETURN_BUTTON.TEXT' | translate | uppercase }}
</a>
</div>
</div>
```
## Properties
### Error Content Component
| Name | Type | Description |
| ---- | ---- | ----------- |
| errorCode | string | Error code |
| returnButtonUrl | string | URL for the return button |
| secondaryButtonText | string | (Optional) Text that will be displayed inside the secondary button |
| secondaryButtonUrl | string | (Optional) URL for the secondary button |
Note that you will also have to provide values for the variables used in the view template.
## Details
You can customize your error messages by adding them to the translate files inside
`lib/core/i18n`:
```json
"ERROR_CONTENT": {
"404": {
"TITLE": "An error occurred.",
"DESCRIPTION": "We couldnt find the page you were looking for.",
"SECONDARY_BUTTON": {
"TEXT": "",
"URL": ""
},
"RETURN_BUTTON": {
"TEXT": "Back to home",
"ROUTE": "home"
}
}
}
```
## See also
- [Empty Content component](empty-content.component.md)

View File

@@ -1,15 +1,36 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-04
---
# Favorites Api service
Gets a list of items a user has marked as their favorites.
## Methods
## Class members
`getFavorites(personId: string, options?: any): Observable<NodePaging>`<br/>
Gets the favorites for a user.
### Methods
- **getFavorites**(personId: `string` = `null`, options?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets the favorites for a user.
- _personId:_ `string` - ID of the user
- _options:_ `any` - (Optional) Options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of favorites
- **remapFavoriteEntries**(entries: `any[]` = `null`): `any[]`<br/>
- _entries:_ `any[]` -
- **Returns** `any[]` -
- **remapFavoritesData**(data: `any` = `{}`): [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
- _data:_ `any` -
- **Returns** [`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts) -
- **remapEntry**(\_\_namedParameters: `object` = `null`): `any`<br/>
- _\_\_namedParameters:_ `object` -
- **Returns** `any` -
## Details

Some files were not shown because too many files have changed in this diff Show More