* [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
+9 -3
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) |
+20
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>
```
+13 -9
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
+2
View File
@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Accordion Component
Creates a collapsible accordion menu.
+36 -37
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 -->
+1 -3
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
+9 -8
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 -->
+44
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)
+38 -9
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';
});
```
```
+10 -10
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).
+2
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.
+2
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.
+2
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.
+29 -29
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
-63
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 -->
-42
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 -->
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Bpm User model
Contains information about a Process Services user.
+10 -5
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
+54
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.
+74
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)
+151
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)
+8 -7
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
+138 -217
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)
+7 -7
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
+8 -5
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. |
+1
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.
+14 -14
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
+9 -6
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. |
+65 -51
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
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# APS Content Component
Shows the content preview.
+2 -2
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
+10 -8
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
+18 -5
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);
+29 -22
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 -->
+173 -41
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)
+4 -4
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)
+4 -4
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
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Ecm User model
Contains information about a Content Services user.
+8 -8
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
+80
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)
+81
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)
+24 -3
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
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# File Size pipe
Converts a number of bytes to the equivalent in KB, MB, etc.
+18 -17
View File
@@ -2,9 +2,10 @@
Added: v2.0.0
Status: Active
---
# FormFieldValidator interface
Defines how the input fields of Form and Task Details components are validated.
Defines how the input fields of [`Form`](../../lib/process-services/task-list/models/form.model.ts) and Task Details components are validated.
## Basic Usage
@@ -52,26 +53,26 @@ Perform validation on `field`.
You can supply a set of validator objects for a form using its `fieldValidators` property.
ADF will determine if a validator should be used with a given field by calling its
`isSupported` method, passing the field's FormFieldModel as a parameter. If the validator
does support the field then its `validate` method will be called on the FormFieldModel
`isSupported` method, passing the field's [`FormFieldModel`](../core/form-field.model.md) as a parameter. If the validator
does support the field then its `validate` method will be called on the [`FormFieldModel`](../core/form-field.model.md)
during the validation phase.
Several validator classes are predefined for you to use:
| Validator name | Checks that: |
| -------------- | ------------ |
| `RequiredFieldValidator` | Field is not left blank |
| `NumberFieldValidator` | Field contains numeric data |
| `MinLengthFieldValidator` | Field text has at least a minimum number of characters |
| `MaxLengthFieldValidator` | Field text has no more than a maximum number of characters |
| `MinValueFieldValidator` | Numeric field's value is greater than a lower limit |
| `MaxValueFieldValidator` | Numeric field's vaue is less than an upper limit |
| `RegExFieldValidator` | Field text matches a regular expression |
| `DateFieldValidator` | Field contains a date in the correct format |
| `MinDateFieldValidator` | Date within a field occurs after a certain starting point |
| `MaxDateFieldValidator` | Date within a field occurs before a certain end point |
| [`RequiredFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field is not left blank |
| [`NumberFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field contains numeric data |
| [`MinLengthFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text has at least a minimum number of characters |
| [`MaxLengthFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text has no more than a maximum number of characters |
| [`MinValueFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Numeric field's value is greater than a lower limit |
| [`MaxValueFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Numeric field's vaue is less than an upper limit |
| [`RegExFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field text matches a regular expression |
| [`DateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Field contains a date in the correct format |
| [`MinDateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Date within a field occurs after a certain starting point |
| [`MaxDateFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) | Date within a field occurs before a certain end point |
The `FORM_FIELD_VALIDATORS` array contains an instance of each of these classes. You can assign this to the `fieldValidators` property of an Activiti Form or Activiti Task Details component to enable standard validation.
The `FORM_FIELD_VALIDATORS` array contains an instance of each of these classes. You can assign this to the `fieldValidators` property of an Activiti [`Form`](../../lib/process-services/task-list/models/form.model.ts) or Activiti [Task Details component](../process-services/task-details.component.md) to enable standard validation.
### Custom validators
@@ -79,9 +80,9 @@ You can implement your own custom validator classes if the standard set doesn't
features you need. For example, you could check for consistency between separate fields on
the form (currency values adding up to a given total, say).
The `type` property of `FormFieldModel` is often used in the `isSupported` function, since
The `type` property of [`FormFieldModel`](../core/form-field.model.md) is often used in the `isSupported` function, since
validation methods typically apply only to specific types of data.
The [FormFieldTypes](https://github.com/Alfresco/alfresco-ng2-components/blob/master/ng2-components/ng2-activiti-form/src/components/widgets/core/form-field-types.ts)
The [`FormFieldTypes`](../../lib/core/form/components/widgets/core/form-field-types.ts)
class defines convenient constants for the type strings.
The validator in the example
@@ -126,7 +127,7 @@ export class AppComponent {
}
```
You can now use the 'fieldValidators' property of the Form or Task Details components to assign your
You can now use the 'fieldValidators' property of the [`Form`](../../lib/process-services/task-list/models/form.model.ts) or Task Details components to assign your
custom validator set:
```html
+10 -7
View File
@@ -1,34 +1,37 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Form field component
A form field in an APS form.
## Basic Usage
All form field editors (aka widgets) on a Form are rendered by means of a `FormFieldComponent`
that takes an instance of a `FormFieldModel`:
All form field editors (aka widgets) on a [`Form`](../../lib/process-services/task-list/models/form.model.ts) are rendered by means of a [`FormFieldComponent`](../core/form-field.component.md)
that takes an instance of a [`FormFieldModel`](../core/form-field.model.md):
```html
<adf-form-field [field]="field"></adf-form-field>
```
This component depends on the `FormRenderingService` to map the `FormFieldModel` to a Form Field UI component
This component depends on the [`FormRenderingService`](../core/form-rendering.service.md) to map the [`FormFieldModel`](../core/form-field.model.md) to a [`Form`](../../lib/process-services/task-list/models/form.model.ts) Field UI component
based on the field type or the metadata information.
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| field | `FormFieldModel` | `null` | Contains all the necessary data needed to determine what UI Widget to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the `FormFieldModel` definitions. |
| -- | -- | -- | -- |
| field | [`FormFieldModel`](../core/form-field.model.md) | null | Contains all the necessary data needed to determine what UI Widget to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the [`FormFieldModel`](../core/form-field.model.md) definitions. |
## Details
You would typically not use this component directly but instead use the `<adf-form>` component, which under the hood
uses `<adf-form-field>` components to render the form fields. See next section for how each field in a form definition
is mapped to a form field component (i.e. UI widget) implementation.
uses `<adf-form-field>` components to render the form fields.
### Field Type -> Form Field Component mappings
+8 -8
View File
@@ -6,7 +6,7 @@ Last reviewed: 2018-03-20
# Form Field model
Contains the value and metadata for a field of a Form component.
Contains the value and metadata for a field of a [`Form`](../../lib/process-services/task-list/models/form.model.ts) component.
## Properties
@@ -49,16 +49,16 @@ Contains the value and metadata for a field of a Form component.
| fields | FormFieldModel\[] | \[] | Fields contained within a container field |
| columns | ContainerColumnModel\[] | \[] | Column definitions for a container field |
| emptyOption | FormFieldOption | | Dropdown menu item to use when no option is chosen |
| validationSummary | string | | Error/information message added during field validation (see [FormFieldValidator](form-field-validator.interface.md) interface) |
| validationSummary | string | | Error/information message added during field validation (see [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) interface) |
## Details
Every field of a form has an associated `FormFieldModel` instance that contains the
Every field of a form has an associated [`FormFieldModel`](../core/form-field.model.md) instance that contains the
field's value and metadata. The standard widgets use this information to render fields and you can also make use of it in your own custom widgets and field validators.
### Custom widgets
You will need to use the properties of `FormFieldModel` if you want to implement your own
You will need to use the properties of [`FormFieldModel`](../core/form-field.model.md) if you want to implement your own
custom widgets. Aside from the `value` property (which contains the data value entered into
the field), there are also a few other fields that are used for specific types of data. For
example, the `currency` property holds the currency symbol to be displayed next to the value
@@ -66,13 +66,13 @@ example, the `currency` property holds the currency symbol to be displayed next
### Validation
A [Form](form.component.md) or [Task Details](../process-services/task-details.component.md) component can
A [`Form`](../../lib/process-services/task-list/models/form.model.ts) or [Task Details](../process-services/task-details.component.md) component can
be supplied with a set of validator objects. Each validator applies a particular kind of
check to a field. A number of `FormFieldModel` properties are used by validators. For
check to a field. A number of [`FormFieldModel`](../core/form-field.model.md) properties are used by validators. For
example, `minValue` and `maxValue` are used to check that a numeric value falls within an
allowed range and `regexPattern` defines a regular expression that a text field should
match. Also, the `validationSummary` is used to send a message back from the validator
for the user to read. See the [FormFieldValidator](form-field-validator.interface.md) page for more information about implementing validators.
for the user to read. See the [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts) page for more information about implementing validators.
### REST properties
@@ -96,6 +96,6 @@ contains full details about how the REST calls work, along with a worked example
## See also
- [Extensibility](../user-guide/extensibility.md)
- [FormFieldValidator](form-field-validator.interface.md)
- [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts)
- [Form rendering service](form-rendering.service.md)
- [Form component](form.component.md)
+5 -2
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Form List Component
Shows APS forms as a list.
@@ -14,8 +15,10 @@ Shows APS forms as a list.
</adf-form-list>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| forms | `any[]` | `[]` | The array that contains the information to show inside the list. |
| -- | -- | -- | -- |
| forms | `any[]` | \[] | The array that contains the information to show inside the list. |
+26 -20
View File
@@ -1,33 +1,39 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
---
# Form Rendering service
Maps an APS form field type string onto the corresponding form widget component type.
Maps an APS form field type string onto the corresponding form [widget component](../insights/widget.component.md) type.
## Methods
## Class members
- `getComponentTypeResolver(type: string, defaultValue: Type<{}> = this.defaultValue): DynamicComponentResolveFunction`
Gets the currently active ComponentTypeResolver function for a field type.
- `type` - The type whose resolver you want
- `defaultValue` - Default type returned for types that are not yet mapped
- `setComponentTypeResolver(type: string, resolver: DynamicComponentResolveFunction, override: boolean = false)`
Sets or optionally replaces a ComponentTypeResolver function for a field type.
- `type` - The type whose resolver you want to set
- `resolver` - The new resolver function
- `override` - The new resolver will only replace an existing one if this parameter is true
- `resolveComponentType(model: DynamicComponentModel, defaultValue: Type<{}> = this.defaultValue): Type<{}>`
Finds the component type that is needed to render a form field.
- `model` - [Form field model](form-field.model.md) for the field to render
- `defaultValue` - Default type returned for field types that are not yet mapped.
### 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 Form Field component uses this service to choose which widget to use to render an instance of a
form field. The Form Field model stores the field type name as a string (see the table below).
The Form Rendering service maintains a mapping between each type name and
a corresponding ComponentTypeResolver function. The function takes a FormFieldModel object as its argument and
The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Field component uses this service to choose which widget to use to render an instance of a
form field. The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Field model stores the field type name as a string (see the table below).
The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Rendering service maintains a mapping between each type name and
a corresponding ComponentTypeResolver function. The function takes a [`FormFieldModel`](../core/form-field.model.md) object as its argument and
uses the data from the object to determine which widget should be used to render the field.
In some cases, the field type string alone is enough to determine the widget type and so the function
@@ -53,7 +59,7 @@ formRenderingService.setComponentTypeResolver('text', customResolver, true);
### Default type mapping
The Form Rendering service is initialized with the mapping shown in the table below:
The [`Form`](../../lib/process-services/task-list/models/form.model.ts) Rendering service is initialized with the mapping shown in the table below:
| Stencil name | Field type string | Component type |
| ------------ | ----------------- | -------------- |
+35 -31
View File
@@ -6,7 +6,7 @@ Last reviewed: 2018-03-21
# Form component
Shows a Form from APS
Shows a [`Form`](../../lib/process-services/task-list/models/form.model.ts) from APS
(See it live: [Form Quickstart](https://embed.plnkr.co/YSLXTqb3DtMhVJSqXKkE/))
@@ -14,6 +14,8 @@ Shows a Form from APS
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
@@ -35,45 +37,47 @@ Shows a Form from APS
</adf-form>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| form | `FormModel` | | Underlying form model instance. |
| taskId | `string` | | Task id to fetch corresponding form and values. |
| nodeId | `string` | | Content Services node ID for the form metadata. |
| formId | `string` | | The id of the form definition to load and display with custom values. |
| formName | `string` | | Name of the form definition to load and display with custom values. |
| saveMetadata | `boolean` | `false` | Toggle saving of form metadata. |
| data | `FormValues` | | Custom form values map to be used with the rendered form. |
| path | `string` | | Path of the folder where the metadata will be stored. |
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
| showTitle | `boolean` | `true` | Toggle rendering of the form title. |
| showCompleteButton | `boolean` | `true` | Toggle rendering of the `Complete` outcome button. |
| disableCompleteButton | `boolean` | `false` | If true then the `Complete` outcome button is shown but it will be disabled. |
| disableStartProcessButton | `boolean` | `false` | If true then the `Start Process` outcome button is shown but it will be disabled. |
| showSaveButton | `boolean` | `true` | Toggle rendering of the `Save` outcome button. |
| showDebugButton | `boolean` | `false` | Toggle debug options. |
| readOnly | `boolean` | `false` | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
| showRefreshButton | `boolean` | `true` | Toggle rendering of the `Refresh` button. |
| showValidationIcon | `boolean` | `true` | Toggle rendering of the validation icon next to the form title. |
| fieldValidators | `FormFieldValidator[]` | `[]` | Contains a list of form field validator instances. |
| -- | -- | -- | -- |
| data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
| disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
| fieldValidators | [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Contains a list of form field validator instances. |
| form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
| formId | `string` | | The id of the form definition to load and display with custom values. |
| formName | `string` | | Name of the form definition to load and display with custom values. |
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
| nodeId | `string` | | Content Services node ID for the form metadata. |
| path | `string` | | Path of the folder where the metadata will be stored. |
| readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
| saveMetadata | `boolean` | false | Toggle saving of form metadata. |
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` outcome button. |
| showDebugButton | `boolean` | false | Toggle debug options. |
| showRefreshButton | `boolean` | true | Toggle rendering of the `Refresh` button. |
| showSaveButton | `boolean` | true | Toggle rendering of the `Save` outcome button. |
| showTitle | `boolean` | true | Toggle rendering of the form title. |
| showValidationIcon | `boolean` | true | Toggle rendering of the validation icon next to the form title. |
| taskId | `string` | | Task id to fetch corresponding form and values. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
| formDataRefreshed | `EventEmitter<FormModel>` | Emitted when form values are refreshed due to a data property change. |
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| onError | `EventEmitter<any>` | Emitted when any error occurs. |
| -- | -- | -- |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../lib/core/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when form content is clicked. |
| formDataRefreshed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when form values are refreshed due to a data property change. |
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| onError | `EventEmitter<any>` | Emitted when any error occurs. |
## Details
All `formXXX` events receive a `FormModel` instance as their argument:
All `formXXX` events receive a [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) instance as their argument:
**MyView.component.html**
@@ -162,7 +166,7 @@ The `nameNode` parameter is optional.
</adf-form>
```
Here, the node metadata is shown in an APS Form,
Here, the node metadata is shown in an APS [Form,](../../lib/process-services/task-list/models/form.model.ts)
with the form fields themselves saved as metadata. The `nameNode` parameter is optional.
### Custom empty form template
+39 -39
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Form service
Implements Process Services form methods
@@ -50,84 +51,83 @@ class MyComponent {
### Methods
- `parseForm(json: any, data?: FormValues, readOnly: boolean = false): FormModel`
Parses JSON data to create a corresponding Form model.
- `parseForm(json: any, data?: `[`FormValues,`](../../lib/core/form/components/widgets/core/form-values.ts)` readOnly: boolean = false): `[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)
Parses JSON data to create a corresponding [`Form`](../../lib/process-services/task-list/models/form.model.ts) model.
- `json` - JSON to create the form
- `data` - (Optional) Values for the form fields
- `readOnly` - Should the form fields be read-only?
- `createFormFromANode(formName: string): Observable<any>`
Create a Form with a field for each metadata property.
- `createFormFromANode(formName: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts) with a field for each metadata property.
- `formName` - Name of the new form
- `createForm(formName: string): Observable<any>`
Create a Form.
- `createForm(formName: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Create a [`Form`](../../lib/process-services/task-list/models/form.model.ts).
- `formName` - Name of the new form
- `saveForm(formId: string, formModel: FormDefinitionModel): Observable<any>`
- `saveForm(formId: string, formModel: FormDefinitionModel): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Saves a form.
- `formId` - ID of the form to save
- `formModel` - Model data for the form
- `addFieldsToAForm(formId: string, formModel: FormDefinitionModel): Observable<any>`
- `addFieldsToAForm(formId: string, formModel: FormDefinitionModel): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
- `formId` - ID of the form
- `formModel` - Form definition
- `searchFrom(name: string): Observable<any>`
- `formModel` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) definition
- `searchFrom(name: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Search for a form by name.
- `name` - The form name to search for
- `getForms(): Observable<any>`
- `getForms(): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets all the forms.
- `getProcessDefinitions(): Observable<any>`
- `getProcessDefinitions(): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get Process Definitions
- `getProcessVarablesById(processInstanceId: string): Observable<any[]>`
- `getProcessVarablesById(processInstanceId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any[]>`
Get instance variables for a process.
- `processInstanceId` - ID of the target process
- `getTasks(): Observable<any>`
- `getTasks(): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets all the tasks.
- `getTask(taskId: string): Observable<any>`
- `getTask(taskId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets a task.
- `taskId` - Task Id
- `saveTaskForm(taskId: string, formValues: FormValues): Observable<any>`
Save Task Form.
- `saveTaskForm(taskId: string, formValues: FormValues): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Save Task [`Form`](../../lib/process-services/task-list/models/form.model.ts).
- `taskId` - Task Id
- `formValues` - Form Values
- `completeTaskForm(taskId: string, formValues: FormValues, outcome?: string): Observable<any>`
Complete Task Form
- `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
- `completeTaskForm(taskId: string, formValues: `[`FormValues,`](../../lib/core/form/components/widgets/core/form-values.ts)` outcome?: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Complete Task [`Form`](../../lib/process-services/task-list/models/form.model.ts)
- `taskId` - Task Id
- `formValues` - Form Values
- `outcome` - (Optional) Form Outcome
- `getTaskForm(taskId: string): Observable<any>`
Get Form related to a taskId
- `formValues` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Values
- `outcome` - (Optional) [`Form`](../../lib/process-services/task-list/models/form.model.ts) Outcome
- `getTaskForm(taskId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) related to a taskId
- `taskId` - Task Id
- `getFormDefinitionById(formId: string): Observable<any>`
Get Form Definition
- `formId` - Form Id
- `getFormDefinitionByName(name: string): Observable<any>`
- `getFormDefinitionById(formId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get [`Form`](../../lib/process-services/task-list/models/form.model.ts) Definition
- `formId` - [`Form`](../../lib/process-services/task-list/models/form.model.ts) Id
- `getFormDefinitionByName(name: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Returns form definition with a given name.
- `name` - The form name
- `getStartFormInstance(processId: string): Observable<any>`
- `getStartFormInstance(processId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get start form instance for a given processId
- `processId` - Process definition ID
- `getProcessIntance(processId: string): Observable<any>`
- `getProcessIntance(processId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets a process instance.
- `processId` - ID of the process to get
- `getStartFormDefinition(processId: string): Observable<any>`
- `getStartFormDefinition(processId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Get start form definition for a given process
- `processId` - Process definition ID
- `getRestFieldValues(taskId: string, field: string): Observable<any>`
- `getRestFieldValues(taskId: string, field: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets values of fields populated by a REST backend.
- `taskId` - Task identifier
- `field` - Field identifier
- `getRestFieldValuesByProcessId(processDefinitionId: string, field: string): Observable<any>`
- `getRestFieldValuesByProcessId(processDefinitionId: string, field: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets values of fields populated by a REST backend using a process ID.
- `processDefinitionId` - Process identifier
- `field` - Field identifier
- `getRestFieldValuesColumnByProcessId(processDefinitionId: string, field: string, column?: string): Observable<any>`
- `getRestFieldValuesColumnByProcessId(processDefinitionId: string, field: string, column?: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets column values of fields populated by a REST backend using a process ID.
- `processDefinitionId` - Process identifier
- `field` - Field identifier
- `column` - (Optional) Column identifier
- `getRestFieldValuesColumn(taskId: string, field: string, column?: string): Observable<any>`
- `getRestFieldValuesColumn(taskId: string, field: string, column?: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Gets column values of fields populated by a REST backend.
- `taskId` - Task identifier
- `field` - Field identifier
@@ -135,11 +135,11 @@ class MyComponent {
- `getUserProfileImageApi(userId: number): string`
Returns a URL for the profile picture of a user.
- `userId` - ID of the target user
- `getWorkflowUsers(filter: string, groupId?: string): Observable<UserProcessModel[]>`
- [`getWorkflowUsers(filter: string, groupId?: string): Observable<UserProcessModel[]>`](../core/user-process.model.md)
Gets a list of workflow users.
- `filter` - Filter to select specific users
- `groupId` - (Optional) Group ID for the search
- `getWorkflowGroups(filter: string, groupId?: string): Observable<GroupModel[]>`
- [`getWorkflowGroups(filter: string, groupId?: string): Observable<GroupModel[]>`](../../lib/core/form/components/widgets/core/group.model.ts)
Gets a list of groups in a workflow.
- `filter` - Filter to select specific groups
- `groupId` - (Optional) Group ID for the search
@@ -152,6 +152,6 @@ class MyComponent {
- `toJsonArray(res: any): any`
Creates a JSON array representation of form data.
- `res` - Object representing form data
- `handleError(error: any): Observable<any>`
- `handleError(error: any): `[`Observable`](http://reactivex.io/documentation/observable.html)`<any>`
Reports an error message.
- `error` - Data object with optional \`message\` and \`status\` fields for the error
+11 -7
View File
@@ -2,17 +2,21 @@
Added: v2.0.0
Status: Active
---
# Highlight Transform service
Adds HTML to a string to highlight chosen sections.
## Methods
## Class members
- `highlight(text: string, search: string, wrapperClass: string = 'highlight'): HightlightTransformResult`
Searches for `search` string(s) within `text` and highlights all occurrences.
- `text` - Text to search within
- `search` - Text pattern to search for
- `wrapperClass` - CSS class used to provide highlighting style
### Methods
- **highlight**(text: `string` = `null`, search: `string` = `null`, wrapperClass: `string` = `"highlight"`): [`HightlightTransformResult`](../../lib/core/services/highlight-transform.service.ts)<br/>
Searches for `search` string(s) within `text` and highlights all occurrences.
- _text:_ `string` - Text to search within
- _search:_ `string` - Text pattern to search for
- _wrapperClass:_ `string` - CSS class used to provide highlighting style
- **Returns** [`HightlightTransformResult`](../../lib/core/services/highlight-transform.service.ts) - New text along with boolean value to indicate whether anything was highlighted
## Details
@@ -27,7 +31,7 @@ highlight any of those words individually. The &lt;span> element includes a
`class` attribute which defaults to "highlight" but you can pass any class name
you like using the `wrapperClass` parameter.
The resulting text with HTML highlighting is returned within a `HightlightTransformResult`
The resulting text with HTML highlighting is returned within a [`HightlightTransformResult`](../../lib/core/services/highlight-transform.service.ts)
object:
```ts
+24 -8
View File
@@ -1,30 +1,46 @@
---
Added: v2.0.0
Status: Active
Status: Internal
Last reviewed: 2018-06-13
---
# Host settings component
Validates the URLs for ACS and APS and saves them in the user's local storage
**Note:** this is an internal component and is not meant to be used in production.
![Host settings](../docassets/images/host-settings-component.png)
## Basic Usage
```html
<adf-host-settings>
</adf-breadcrumb>
</adf-host-settings>
```
```ts
@NgModule({
providers: [
{ provide: AppConfigService, useClass: DebugAppConfigService },
]
)]
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| providers | `string` | `'ALL'` | Determines which configurations are shown. Possible valid values are "ECM", "BPM" or "ALL". |
| -- | -- | -- | -- |
| providers | `string[]` | ['BPM', 'ECM', 'ALL'] | Tells the component which provider option are available. Possible valid values are "ECM" (Content), "BPM" (Process) , "ALL" (Content and Process), 'OAUTH2' SSO . |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| error | `EventEmitter<string>` | Emitted when the URL is invalid. |
| ecmHostChange | `EventEmitter<string>` | Emitted when the ECM host url is changed. |
| bpmHostChange | `EventEmitter<string>` | Emitted when the BPM host url is changed. |
| -- | -- | -- |
| bpmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | (**Deprecated:** in 2.4.0) Emitted when the bpm host URL is changed. |
| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | |
| ecmHostChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | (**Deprecated:** in 2.4.0) Emitted when the ecm host URL is changed. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the URL is invalid. |
| success | `EventEmitter<boolean>` | |
+7 -7
View File
@@ -36,28 +36,28 @@ Adds "infinite" pagination to the component it is used with.
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| -- | -- | -- | -- |
| loading | `boolean` | false | Is a new page loading? |
| pageSize | `number` | InfinitePaginationComponent.DEFAULT_PAGE_SIZE | Number of items that are added with each "load more" event. |
| pagination | `Pagination` | | Pagination object. |
| pageSize | `number` | [`InfinitePaginationComponent`](../core/infinite-pagination.component.md).DEFAULT_PAGE_SIZE | Number of items that are added with each "load more" event. |
| pagination | [`PaginationModel`](../../lib/core/models/pagination.model.ts) | | (**Deprecated:** 2.3.0 [Pagination](../../lib/content-services/document-list/models/document-library.model.ts) object.) |
| target | `PaginatedComponent` | | Component that provides custom pagination support. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| loadMore | `EventEmitter<Pagination>` | Emitted when the "Load More" button is clicked. |
| -- | -- | -- |
| loadMore | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts)`>` | Emitted when the "Load More" button is clicked. |
## Details
Pagination is the process of dividing a list into separate ranges or "pages" with a
[`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) is the process of dividing a list into separate ranges or "pages" with a
certain number of items each. This allows a long list to be delivered in manageable pieces
rather than all at once. "Infinite" pagination means that there is no upper limit on
the number of items that can be displayed visually; a single page is shown initially but
the user can extend the list one page at a time by clicking a "Load More" button.
The `loadMore` event is emitted when the button is pressed. It is passed a
[Pagination](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/Pagination.md)
[`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts)
parameter which contains the details of the current page (the start offset of the
page within the list to be shown, whether there are more items left to show, etc).
+7 -1
View File
@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Info drawer layout component
Displays a sidebar-style information panel.
@@ -28,12 +30,16 @@ Displays a sidebar-style information panel.
## Details
As the name suggests, this is basically just a layout with CSS styling. There are three regions where you can add your own content, as shown in the example:
As the name suggests, this is basically just a layout with CSS styling. There are three
regions where you can add your own content, as shown in the example:
- info-drawer-title
- info-drawer-buttons
- info-drawer-content
See the [Info drawer layout component](../core/info-drawer-layout.component.md) for an alternative approach that uses tabs to
structure the content of the info drawer.
## See also
- [Info drawer component](info-drawer.component.md)
+64
View File
@@ -0,0 +1,64 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-08
---
# Info Drawer Tab component
Renders tabs in a [Info drawer component](../core/info-drawer.component.md).
![Info drawer screenshot](../docassets/images/label-tab.png)
## Basic usage
Render a tab with label:
```html
<adf-info-drawer>
<adf-info-drawer-tab [label]="'Tab1'">
<div> Tab1 content</div>
</adf-info-drawer-tab>
<adf-info-drawer-tab [label]="'Tab2'">
<div> Tab2 content</div>
</adf-info-drawer-tab>
</adf-info-drawer>
```
Render tab with icon instead of labels:
```html
<adf-info-drawer>
<adf-info-drawer-tab [label]="'Tab1'" icon="comment">
<div> Tab1 content</div>
</adf-info-drawer-tab>
<adf-info-drawer-tab [label]="'Tab2'" icon="people">
<div> Tab2 content</div>
</adf-info-drawer-tab>
</adf-info-drawer>
```
![Info drawer screenshot](../docassets/images/icon-tab.png)
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| label | `string` | '' | Tab label. |
| icon | `string` | null | The material design icon. |
## Details
See the [Info drawer component](../core/info-drawer.component.md) page for details of how to use this subcomponent.
## See also
- [Info drawer component](info-drawer.component.md)
- [Info drawer layout component](info-drawer-layout.component.md)
+6 -5
View File
@@ -1,7 +1,7 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-04-10
Last reviewed: 2018-06-08
---
# Info Drawer component
@@ -37,20 +37,21 @@ Displays a sidebar-style information panel with tabs.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| selectedIndex | `number` | 0 | The selected index tab. |
| title | `string | null` | null | The title of the info drawer. |
| title | `string \| null` | null | The title of the info drawer. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| currentTab | `EventEmitter<number>` | Emitted when the currently active tab changes. |
| currentTab | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<number>` | Emitted when the currently active tab changes. |
## Details
This is a variant of the [Info Drawer Layout component](info-drawer-layout.component.md) that displays information in tabs. You can use the `adf-info-drawer-tab` subcomponent to add tabs (as shown in the example) and the `currentTab` output property to select the currently active tab.
This is a variant of the [Info Drawer Layout component](info-drawer-layout.component.md) that displays information in tabs. You can use the Info drawer tab subcomponent to add tabs (as shown in the example) and the `currentTab` output property to select the currently active tab.
You can also customize the three regions (title, buttons and content) as with the Info Drawer Layout component.
You can also customize the three regions (title, buttons and content) as with the [Info Drawer Layout component](../core/info-drawer-layout.component.md).
## See also
- [Info drawer layout component](info-drawer-layout.component.md)
- [Info drawer tab component](info-drawer-tab.component.md)
+2 -1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Language Menu component
Displays all the languages that are present in the "app.config.json" or the default one (EN).
@@ -24,7 +25,7 @@ How to attach an ADF Language Menu as main menu
## Details
In the previous example we are using the ADF Language Menu as main menu.
The Language Menu component is able to fetch all the languages from the "app.config.json".
The [Language Menu component](../core/language-menu.component.md) is able to fetch all the languages from the "app.config.json".
This is how the configuration looks like in the the "app.config.json"
```json
+90 -33
View File
@@ -1,10 +1,12 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Log Service
Provide a log functionality for your ADF application.
Provides log functionality.
## Basic Usage
@@ -30,22 +32,87 @@ export class AppComponent {
}
```
### Log levels
```ts
import { LogService } from '@alfresco/adf-core';
The log service provide 6 level of logs:
@Component({...})
export class AppComponent {
Name | Level
-|-
TRACE |5
DEBUG |4
INFO |3
WARN |2
ERROR |1
SILENT |0
constructor(logService: LogService, myIntegrationService: MyIntegrationService)) {
logService.onMessage.subscribe((message) => {
myIntegrationService.send(message.text,message.type);
});
}
}
```
You can configure the log level setting the ***logLevel*** properties in the **app.config.json**. By default the level is TRACE.
## Class members
If you want set for example the log to warning:
### Methods
- **assert**(test?: `boolean` = `null`, message?: `string` = `null`, optionalParams: `any[]` = `null`)<br/>
Logs a message if a boolean test fails.
- _test:_ `boolean` - (Optional) Test value (typically a boolean expression)
- _message:_ `string` - (Optional) Message to show if test is false
- _optionalParams:_ `any[]` - Interpolation values for the message in "printf" format
- **debug**(message?: `any` = `null`, optionalParams: `any[]` = `null`)<br/>
Logs a message at the "DEBUG" level.
- _message:_ `any` - (Optional) Message to log
- _optionalParams:_ `any[]` - Interpolation values for the message in "printf" format
- **error**(message?: `any` = `null`, optionalParams: `any[]` = `null`)<br/>
Logs a message at the "ERROR" level.
- _message:_ `any` - (Optional) Message to log
- _optionalParams:_ `any[]` - Interpolation values for the message in "printf" format
- **getLogLevel**(level: `string` = `null`): [`LogLevelsEnum`](../../lib/core/models/log-levels.model.ts)<br/>
Converts a log level name string into its numeric equivalent.
- _level:_ `string` - Level name
- **Returns** [`LogLevelsEnum`](../../lib/core/models/log-levels.model.ts) - Numeric log level
- **group**(groupTitle?: `string` = `null`, optionalParams: `any[]` = `null`)<br/>
Starts an indented group of log messages.
- _groupTitle:_ `string` - (Optional) Title shown at the start of the group
- _optionalParams:_ `any[]` - Interpolation values for the title in "printf" format
- **groupEnd**()<br/>
Ends a indented group of log messages.
- **info**(message?: `any` = `null`, optionalParams: `any[]` = `null`)<br/>
Logs a message at the "INFO" level.
- _message:_ `any` - (Optional) Message to log
- _optionalParams:_ `any[]` - Interpolation values for the message in "printf" format
- **log**(message?: `any` = `null`, optionalParams: `any[]` = `null`)<br/>
Logs a message at any level from "TRACE" upwards.
- _message:_ `any` - (Optional) Message to log
- _optionalParams:_ `any[]` - Interpolation values for the message in "printf" format
- **messageBus**(text: `string` = `null`, logLevel: `string` = `null`)<br/>
Triggers notification callback for log messages.
- _text:_ `string` - Message text
- _logLevel:_ `string` - Log level for the message
- **trace**(message?: `any` = `null`, optionalParams: `any[]` = `null`)<br/>
Logs a message at the "TRACE" level.
- _message:_ `any` - (Optional) Message to log
- _optionalParams:_ `any[]` - Interpolation values for the message in "printf" format
- **warn**(message?: `any` = `null`, optionalParams: `any[]` = `null`)<br/>
Logs a message at the "WARN" level.
- _message:_ `any` - (Optional) Message to log
- _optionalParams:_ `any[]` - Interpolation values for the message in "printf" format
## Details
### Log levels
There are 6 levels of logs that you can use:
| Name | Level |
| ---- | ----- |
| TRACE | 5 |
| DEBUG | 4 |
| INFO | 3 |
| WARN | 2 |
| ERROR | 1 |
| SILENT | 0 |
You can set the default log level using the **_logLevel_** property in `app.config.json`.
The factory setting for this property is `TRACE`.
For example, you can set the default log level to `WARNING` as follows:
**app.config.json**
@@ -57,9 +124,10 @@ If you want set for example the log to warning:
### Log message bus
The logservice provide also an Observable ***onMessage*** where you can subscribe and recive all the logs:
The messagge object recived form the bus is composed:
The [log service](../core/log.service.md) also provides an
[`Observable`](http://reactivex.io/documentation/observable.html) called `_onMessage_`
that you can subscribe to if you want to receive all the log messages.
The message object passed as a parameter to the `onMessage` handler has the following format:
```ts
{
@@ -67,22 +135,11 @@ The messagge object recived form the bus is composed:
type: "ERROR|DEBUG|INFO|LOG|TRACE|WARN|ASSERT"
}
```
## Usage
```ts
import { LogService } from '@alfresco/adf-core';
### Using the log to feed analytics
@Component({...})
export class AppComponent {
constructor(logService: LogService, myIntegrationService: MyIntegrationService)) {
logService.onMessage.subscribe((message) => {
myIntegrationService.send(message.text,message.type);
});
}
}
```
You can pass the log output to an analytics system to collect error and assertion data
from apps as they run. This can help you spot which problems users are running into most
often and the situations in which they occur. See the tutorial about
[integrating the log service with analytics](https://community.alfresco.com/community/application-development-framework/blog/2018/05/01/how-to-integrate-adf-log-service-with-mixpanel-analytics-service)
on the Alfresco Community site for further information.
+46 -17
View File
@@ -14,6 +14,8 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
- [Basic usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
@@ -25,6 +27,8 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
- [Customizing validation rules](#customizing-validation-rules)
- [Call an external identity provider to fetch the auth token](#call-an-external-identity-provider-to-fetch-the-auth-token)
- [Controlling form submit execution behaviour](#controlling-form-submit-execution-behaviour)
- [SSO login](#sso-login)
- [Implicit Flow](#implicit-flow)
- [See Also](#see-also)
@@ -32,34 +36,35 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
```html
<adf-login
providers="ECM"
successRoute="/home">
</adf-login>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| showRememberMe | `boolean` | `true` | Should the `Remember me` checkbox be shown? |
| showLoginActions | `boolean` | `true` | Should the extra actions (`Need Help`, `Register`, etc) be shown? |
| needHelpLink | `string` | `''` | Sets the URL of the NEED HELP link in the footer. |
| registerLink | `string` | `''` | Sets the URL of the REGISTER link in the footer. |
| logoImageUrl | `string` | `'./assets/images/alfresco-logo.svg'` | Path to a custom logo image. |
| backgroundImageUrl | `string` | `'./assets/images/background.svg'` | Path to a custom background image. |
| copyrightText | `string` | `'\u00A9 2016 Alfresco Software, Inc. All Rights Reserved.'` | The copyright text below the login box. |
| providers | `string` | | Possible valid values are ECM, BPM or ALL. By default, this component will log in only to ECM. If you want to log in in both systems then use ALL. There is also a way to call your Auth token API using the string "OAUTH" (supported only for BPM) |
| fieldsValidation | `any` | | Custom validation rules for the login form. |
| -- | -- | -- | -- |
| backgroundImageUrl | `string` | "./assets/images/background.svg" | Path to a custom background image. |
| copyrightText | `string` | "© 2016 Alfresco Software, Inc. All Rights Reserved." | The copyright text below the login box. |
| disableCsrf | `boolean` | | Prevents the CSRF Token from being submitted. Only valid for Alfresco Process Services. |
| successRoute | `string` | `null` | Route to redirect to on successful login. |
| fieldsValidation | `any` | | Custom validation rules for the login form. |
| logoImageUrl | `string` | "./assets/images/alfresco-logo.svg" | Path to a custom logo image. |
| needHelpLink | `string` | "" | Sets the URL of the NEED HELP link in the footer. |
| providers | `string` | | **Deprecated:** 3.0.0 |
| registerLink | `string` | "" | Sets the URL of the REGISTER link in the footer. |
| showLoginActions | `boolean` | true | Should the extra actions (`Need Help`, `Register`, etc) be shown? |
| showRememberMe | `boolean` | true | Should the `Remember me` checkbox be shown? When selected, this option will remember the logged-in user after the browser is closed to avoid logging in repeatedly. |
| successRoute | `string` | null | Route to redirect to on successful login. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| -- | -- | -- |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`LoginErrorEvent`](../../lib/core/login/models/login-error.event.ts)`>` | Emitted when the login fails. |
| executeSubmit | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`LoginSubmitEvent`](../../lib/core/login/models/login-submit.event.ts)`>` | Emitted when the login form is submitted. |
| success | `EventEmitter<LoginSuccessEvent>` | Emitted when the login is successful. |
| error | `EventEmitter<LoginErrorEvent>` | Emitted when the login fails. |
| executeSubmit | `EventEmitter<LoginSubmitEvent>` | Emitted when the login form is submitted. |
## Details
@@ -69,7 +74,6 @@ Authenticates to Alfresco Content Services and Alfresco Process Services.
```html
<adf-login
providers="ALL"
(success)="mySuccessMethod($event)"
(error)="myErrorMethod($event)">
</adf-login>
@@ -92,7 +96,7 @@ export class AppComponent {
### Changing content
You can replace the content of the header and footer of the Login component with
You can replace the content of the header and footer of the [Login component](../core/login.component.md) with
your own custom content, as shown in the examples below:
```html
@@ -269,6 +273,31 @@ export class MyCustomLogin {
}
```
### SSO login
### Implicit Flow
If the 'app.config.json' or you used the host-setting component to use the SSO Oauth the [login component](../core/login.component.md) will show only a button to login:
```JSON
"authType" :"OAUTH",
"oauth2": {
"host": "http://localhost:30081/auth/realms/myrealm",
"clientId": "activiti",
"scope": "openid",
"secret": "",
"implicitFlow": true,
"silentLogin": false,
"redirectUri": "/",
"redirectUriLogout": "/logout"
},
```
![Login component](../docassets/images/sso-login.png)
Note if the silentLogin property in the oauth2 configuration is true will not be possible to show the login page. with silentLogin true the application is automatically redirect to the
authorization server when is not logged-in
Note that if you do not call `event.preventDefault()` then the default behaviour
will execute _after_ your custom code has completed.
+9
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Logout directive
Logs the user out when the decorated element is clicked.
@@ -12,6 +13,14 @@ Logs the user out when the decorated element is clicked.
<button adf-logout>Logout</button>
```
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| redirectUri | `string` | 'login' | Uri to be redirect after the logout |
| enabelRedirect | `boolean` | 'true' | enable/disable redirect after logout |
## See also
- [Login component](login.component.md)
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Mime Type Icon pipe
Retrieves an icon to represent a MIME type.
+2 -2
View File
@@ -30,13 +30,13 @@ Deletes multiple files and folders.
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| permanent | `boolean` | false | If true then the nodes are deleted immediately rather than being put in the trash |
| adf-delete | `MinimalNodeEntity[] | DeletedNodeEntity[]` | | Array of nodes to delete. |
| adf-delete | `MinimalNodeEntity[] \| DeletedNodeEntity[]` | | Array of nodes to delete. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| delete | `EventEmitter<any>` | Emitted when the nodes have been deleted. |
| delete | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the nodes have been deleted. |
## Details
+2 -1
View File
@@ -48,7 +48,8 @@ export class MyComponent {
| Name | Type | Description |
| -- | -- | -- |
| toggle | `EventEmitter<any>` | Emitted when the favorite setting is complete. |
| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the favorite setting has fail. |
| toggle | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when the favorite setting is complete. |
## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Node Name Tooltip pipe
Formats the tooltip for a Node.
+19 -4
View File
@@ -8,6 +8,21 @@ Last reviewed: 2018-04-10
Selectively disables an HTML element or Angular component
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Details](#details)
- [HTML element example](#html-element-example)
- [Angular component example](#angular-component-example)
- [Implementing the NodePermissionSubject interface](#implementing-the-nodepermissionsubject-interface)
- [Defining your component as an EXTENDIBLE_COMPONENT parent component](#defining-your-component-as-an-extendible_component-parent-component)
## Basic Usage
```html
@@ -35,7 +50,7 @@ Selectively disables an HTML element or Angular component
## Details
The Node Permission directive lets you disable an HTML element or Angular component
The [Node Permission directive](../core/node-permission.directive.md) lets you disable an HTML element or Angular component
by taking a collection of `MinimalNodeEntity` instances and checking their permissions.
The decorated element will be disabled if:
@@ -69,7 +84,7 @@ one or more documents that they have permission to delete.
### Angular component example
You can add the directive to any Angular component that implements the `NodePermissionSubject`
You can add the directive to any Angular component that implements the [`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts)
interface (the [Upload Drag Area component](../content-services/upload-drag-area.component.md),
for example). You can also use it in much the same way as you would with an HTML element:
@@ -84,12 +99,12 @@ for example). You can also use it in much the same way as you would with an HTML
```
To enable your own component to work with this directive, you need to implement the
`NodePermissionSubject` interface and also define it as an EXTENDIBLE_COMPONENT parent component,
[`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts) interface and also define it as an EXTENDIBLE_COMPONENT parent component,
as described in the following sections.
### Implementing the NodePermissionSubject interface
The component must implement the `NodePermissionSubject` interface which means it must have a
The component must implement the [`NodePermissionSubject`](../../lib/core/directives/node-permission.directive.ts) interface which means it must have a
boolean `disabled` property. This is the property that will be set by the directive:
```js
+21 -3
View File
@@ -15,7 +15,7 @@ Restores deleted nodes to their original location.
<button mat-icon-button
location="/files"
[adf-restore]="documentList.selection"
(restore)="documentList.reload()">
(restore)="onRestore($event)">
<mat-icon>restore</mat-icon>
</button>
</adf-toolbar>
@@ -26,20 +26,38 @@ Restores deleted nodes to their original location.
</adf-document-list>
```
```ts
onRestore(restoreMessage: RestoreMessageModel) {
this.notificationService
.openSnackMessageAction(
restoreMessage.message,
restoreMessage.action
)
.onAction()
.subscribe(() => this.navigateLocation(restoreMessage.path));
this.documentList.reload();
}
navigateLocation(path: PathInfoEntity) {
const parent = path.elements[path.elements.length - 1];
this.router.navigate(['files/', parent.id]);
}
```
## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| location | `string` | "" | Path to restored node. |
| location | `string` | "" | (**Deprecated:** 2.4.0 Path to restored node.) |
| adf-restore | `DeletedNodeEntry[]` | | Array of deleted nodes to restore. |
### Events
| Name | Type | Description |
| -- | -- | -- |
| restore | `EventEmitter<any>` | Emitted when restoration is complete. |
| restore | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`RestoreMessageModel`](../../lib/core/directives/node-restore.directive.ts)`>` | Emitted when restoration is complete. |
## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Node Service
Gets Alfresco Repository node metadata and creates nodes with metadata.
+50 -35
View File
@@ -8,51 +8,66 @@ Last reviewed: 2018-04-06
Accesses and manipulates ACS document nodes using their node IDs.
## Contents
- [Class members](#class-members)
- [Methods](#methods)
- [Details](#details)
- [Getting node information](#getting-node-information)
- [Getting folder node contents](#getting-folder-node-contents)
- [Creating and updating nodes](#creating-and-updating-nodes)
- [Deleting and restoring nodes](#deleting-and-restoring-nodes)
- [See also](#see-also)
## Class members
### Methods
- `createFolder(parentNodeId: string = null, nodeBody: any = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/>
- **createFolder**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Creates a new folder node inside a parent folder.
- `parentNodeId: string = null` - ID of the parent folder node
- `nodeBody: any = null` - Data for the new folder
- `options: any = {}` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new folder
- `createNode(parentNodeId: string = null, nodeBody: any = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/>
- _parentNodeId:_ `string` - ID of the parent folder node
- _nodeBody:_ `any` - Data for the new folder
- _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Details of the new folder
- **createNode**(parentNodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Creates a new document node inside a folder.
- `parentNodeId: string = null` - ID of the parent folder node
- `nodeBody: any = null` - Data for the new node
- `options: any = {}` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the new node
- `deleteNode(nodeId: string = null, options: any = {}): Observable<void>`<br/>
- _parentNodeId:_ `string` - ID of the parent folder node
- _nodeBody:_ `any` - Data for the new node
- _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Details of the new node
- **deleteNode**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<void>`<br/>
Moves a node to the trashcan.
- `nodeId: string = null` - ID of the target node
- `options: any = {}` - Optional parameters supported by JSAPI
- **Returns** `Observable<void>` - Empty result that notifies when the deletion is complete
- `getNode(nodeId: string = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/>
- _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<void>` - Empty result that notifies when the deletion is complete
- **getNode**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Gets the stored information about a node.
- `nodeId: string = null` - ID of the target node
- `options: any = {}` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Node information
- `getNodeChildren(nodeId: string = null, options: any = {}): Observable<NodePaging>`<br/>
- _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Node information
- **getNodeChildren**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets the items contained in a folder node.
- `nodeId: string = null` - ID of the target node
- `options: any = {}` - Optional parameters supported by JSAPI
- **Returns** `Observable<NodePaging>` - List of child items from the folder
- `handleError(error: any = null): Observable<any>`<br/>
- _nodeId:_ `string` - ID of the target node
- _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>` - List of child items from the folder
- **handleError**(error: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Reports an error.
- `error: any = null` - Object representing the error
- **Returns** `Observable<any>` - Error information
- `restoreNode(nodeId: string = null): Observable<MinimalNodeEntryEntity>`<br/>
- _error:_ `any` - Object representing the error
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Error information
- **restoreNode**(nodeId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Restores a node previously moved to the trashcan.
- `nodeId: string = null` - ID of the node to restore
- **Returns** `Observable<MinimalNodeEntryEntity>` - Details of the restored node
- `updateNode(nodeId: string = null, nodeBody: any = null, options: any = {}): Observable<MinimalNodeEntryEntity>`<br/>
- _nodeId:_ `string` - ID of the node to restore
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Details of the restored node
- **updateNode**(nodeId: `string` = `null`, nodeBody: `any` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>`<br/>
Updates the information about a node.
- `nodeId: string = null` - ID of the target node
- `nodeBody: any = null` - New data for the node
- `options: any = {}` - Optional parameters supported by JSAPI
- **Returns** `Observable<MinimalNodeEntryEntity>` - Updated node information
- _nodeId:_ `string` - ID of the target node
- _nodeBody:_ `any` - New data for the node
- _options:_ `any` - Optional parameters supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<MinimalNodeEntryEntity>` - Updated node information
## Details
@@ -65,7 +80,7 @@ by dashes, eg:
The string is convenient for storage, for passing as an
[Angular route parameter](https://angular.io/guide/router)
and other purposes but doesn't enable you to do very much with the node itself.
The Nodes Api Service has methods for getting information about nodes and
The [Nodes Api Service](../core/nodes-api.service.md) has methods for getting information about nodes and
managing them within the repository (creating, deleting, etc).
Other lower level interfaces to the ACS nodes API are also available - see the
@@ -109,7 +124,7 @@ of a [Document List component](../content-services/document-list.component.md) o
[Document List row](../content-services/document-list.component.md#underlying-node-object). In these cases,
you might pass the `id` or `parentId` as a [route parameter](https://angular.io/guide/router)
to a page describing the node in full detail. The component receiving the node ID can
use the Nodes Api service to "decode" the ID string into a MinimalNodeEntryEntity:
use the [Nodes Api service](../core/nodes-api.service.md) to "decode" the ID string into a MinimalNodeEntryEntity:
```ts
import { ActivatedRoute, Router } from '@angular/router';
+28 -16
View File
@@ -1,28 +1,34 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Notification Service
Shows a notification message with optional feedback.
![Notification Service screenshot](docassets/images/NotiService.png)
![Notification Service screenshot](../docassets/images/NotiService.png)
## Methods
## Class members
- `openSnackMessage(message: string, millisecondsDuration?: number): MatSnackBarRef<any>`
Opens a snackbar notification to show a message.
- `message` - The message to show
- `millisecondsDuration` - (Optional) Time before notification disappears after being shown
- `openSnackMessageAction(message: string, action: string, millisecondsDuration?: number): MatSnackBarRef<any>`
Opens a snackbar notification with a message and a response button.
- `message` - The message to show
- `action` - Caption for the response button
- `millisecondsDuration` - (Optional) Time before the notification disappears (unless the button is clicked)
### Methods
- **openSnackMessage**(message: `string` = `null`, millisecondsDuration?: `number` = `null`): [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>`<br/>
Opens a SnackBar notification to show a message.
- _message:_ `string` - The message (or resource key) to show.
- _millisecondsDuration:_ `number` - (Optional) Time before notification disappears after being shown
- **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar
- **openSnackMessageAction**(message: `string` = `null`, action: `string` = `null`, millisecondsDuration?: `number` = `null`): [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>`<br/>
Opens a SnackBar notification with a message and a response button.
- _message:_ `string` - The message (or resource key) to show.
- _action:_ `string` - Caption for the response button
- _millisecondsDuration:_ `number` - (Optional) Time before the notification disappears (unless the button is clicked)
- **Returns** [`MatSnackBarRef`](https://material.angular.io/components/snack-bar/overview)`<any>` - Information/control object for the SnackBar
## Details
The Notification Service is implemented on top of the Angular Material Design snackbar.
The [Notification Service](../core/notification.service.md) is implemented on top of the Angular Material Design snackbar.
Use this service to show a notification message, and optionally get feedback from it.
```ts
@@ -34,9 +40,12 @@ export class MyComponent implements OnInit {
}
ngOnInit() {
this.notificationService.openSnackMessage('test', 200000).afterDismissed().subscribe(() => {
console.log('The snack-bar was dismissed');
});
this.notificationService
.openSnackMessage('test', 200000)
.afterDismissed()
.subscribe(() => {
console.log('The snack-bar was dismissed');
});
}
}
```
@@ -50,7 +59,10 @@ export class MyComponent implements OnInit {
}
ngOnInit() {
this.notificationService.openSnackMessageAction('Do you want to report this issue?', 'send', 200000).afterDismissed().subscribe(() => {
this.notificationService
.openSnackMessageAction('Do you want to report this issue?', 'send', 200000)
.afterDismissed()
.subscribe(() => {
console.log('The snack-bar was dismissed');
});
}
+7 -4
View File
@@ -2,15 +2,18 @@
Added: v2.0.0
Status: Active
---
# Page Title service
Sets the page title.
## Methods
## Class members
- `setTitle(value: string = '')`
Sets the page title.
- `value` - The new title
### Methods
- **setTitle**(value: `string` = `""`)<br/>
Sets the page title.
- _value:_ `string` - The new title
## Details
+34 -16
View File
@@ -10,6 +10,22 @@ Adds pagination to the component it is used with.
![](../docassets/images/basic.png)
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Integrating with the Document List component](#integrating-with-the-document-list-component)
- [Custom pagination](#custom-pagination)
- [See also](#see-also)
## Basic Usage
```html
@@ -24,30 +40,32 @@ Adds pagination to the component it is used with.
</adf-pagination>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| target | `PaginatedComponent` | | Component that provides custom pagination support. |
| supportedPageSizes | `number[]` | `[5, 25, 50, 100]` | An array of page sizes. |
| pagination | `Pagination` | | Pagination object. |
| -- | -- | -- | -- |
| pagination | [`PaginationModel`](../../lib/core/models/pagination.model.ts) | [`PaginationComponent`](../core/pagination.component.md).DEFAULT_PAGINATION | [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) object. |
| supportedPageSizes | `number[]` | [5, 25, 50, 100] | An array of page sizes. |
| target | `PaginatedComponent` | | Component that provides custom pagination support. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| change | `EventEmitter<PaginationQueryParams>` | Emitted when pagination changes in any way. |
| changePageNumber | `EventEmitter<Pagination>` | Emitted when the page number changes. |
| changePageSize | `EventEmitter<Pagination>` | Emitted when the page size changes. |
| nextPage | `EventEmitter<Pagination>` | Emitted when the next page is requested. |
| prevPage | `EventEmitter<Pagination>` | Emitted when the previous page is requested. |
| -- | -- | -- |
| change | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PaginationModel`](../../lib/core/models/pagination.model.ts)`>` | Emitted when pagination changes in any way. |
| changePageNumber | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`PaginationModel`](../../lib/core/models/pagination.model.ts)`>` | Emitted when the page number changes. |
| changePageSize | `EventEmitter<PaginationModel>` | Emitted when the page size changes. |
| nextPage | `EventEmitter<PaginationModel>` | Emitted when the next page is requested. |
| prevPage | `EventEmitter<PaginationModel>` | Emitted when the previous page is requested. |
## Details
You can use the Pagination component to add pagination features to other components. The Alfresco
You can use the [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) component to add pagination features to other components. The Alfresco
APIs make use of pagination to reduce the amount of data transferred in a single call. The start offset
and number of items in the page are passed during the call. The items of interest will be
returned along with a Pagination object. You can use this object to set up the pagination component
returned along with a [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) object. You can use this object to set up the [pagination component](../core/pagination.component.md)
and then subscribe to one of the page change events. This will return updated pagination data that you
can pass to a subsequent API call.
@@ -55,7 +73,7 @@ Each event corresponds to a particular action from the user. For the `change` ev
[PaginationQueryParams](https://github.com/Alfresco/alfresco-ng2-components/blob/development/ng2-components/ng2-alfresco-core/src/components/pagination/pagination-query-params.interface.ts) object is returned. This contains the query
parameters supported by the REST API, `skipCount` and `maxItems`.
For all events other than `change`, a new Pagination object is returned as in the following example. The
For all events other than `change`, a new [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) object is returned as in the following example. The
new object contains updated properties that you can use to fetch the next page of information.
### Integrating with the Document List component
@@ -70,7 +88,7 @@ new object contains updated properties that you can use to fetch the next page o
### Custom pagination
The component also makes it easy to integrate your own implementation of pagination.
You can supply any component that implements the `PaginatedComponent` interface as the value of the
You can supply any component that implements the [`PaginatedComponent`](../../lib/core/pagination/paginated-component.interface.ts) interface as the value of the
`target` property.
```js
@@ -82,8 +100,8 @@ export interface PaginatedComponent {
}
```
Your component must provide a `pagination` subject to allow the Pagination component to respond to changes.
Every time user interacts with the Pagination component, it will call the `updatePagination` method
Your component must provide a `pagination` subject to allow the [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) component to respond to changes.
Every time user interacts with the [`Pagination`](../../lib/content-services/document-list/models/document-library.model.ts) component, it will call the `updatePagination` method
and pass the updated parameters.
## See also
+6 -6
View File
@@ -12,19 +12,19 @@ Gets information about a Content Services user.
### Methods
- `getCurrentPerson(): Observable<any>`<br/>
- **getCurrentPerson**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets information about the user who is currently logged in.
- **Returns** `Observable<any>` - User information
- `getPerson(personId: string = null): Observable<any>`<br/>
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
- **getPerson**(personId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets information about a user identified by their username.
- `personId: string = null` - ID of the target user
- **Returns** `Observable<any>` - User information
- _personId:_ `string` - ID of the target user
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - User information
## Details
The class returned by `getPerson` and `getCurrentPerson` 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
+14 -14
View File
@@ -12,25 +12,25 @@ Gets information about Process Services users.
### Methods
- `getUserImage(user: UserProcessModel = null): string`<br/>
- **getUserImage**(user: [`UserProcessModel`](../core/user-process.model.md) = `null`): `string`<br/>
Gets the profile picture URL for the specified user.
- `user: UserProcessModel = null` - The target user
- _user:_ [`UserProcessModel`](../core/user-process.model.md) - The target user
- **Returns** `string` - Profile picture URL
- `getWorkflowUsers(taskId?: string = null, searchWord?: string = null): Observable<UserProcessModel[]>`<br/>
- **getWorkflowUsers**(taskId?: `string` = `null`, searchWord?: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>`<br/>
Gets information about users across all tasks.
- `taskId?: string = null` - (Optional) ID of the task
- `searchWord?: string = null` - (Optional) Filter text to search for
- **Returns** `Observable<UserProcessModel[]>` - Array of user information objects
- `involveUserWithTask(taskId: string = null, idToInvolve: string = null): Observable<UserProcessModel[]>`<br/>
- _taskId:_ `string` - (Optional) ID of the task
- _searchWord:_ `string` - (Optional) Filter text to search for
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>` - Array of user information objects
- **involveUserWithTask**(taskId: `string` = `null`, idToInvolve: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>`<br/>
Sets a user to be involved with a task.
- `taskId: string = null` - ID of the target task
- `idToInvolve: string = null` - ID of the user to involve
- **Returns** `Observable<UserProcessModel[]>` - Empty response when the update completes
- `removeInvolvedUser(taskId: string = null, idToRemove: string = null): Observable<UserProcessModel[]>`<br/>
- _taskId:_ `string` - ID of the target task
- _idToInvolve:_ `string` - ID of the user to involve
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>` - Empty response when the update completes
- **removeInvolvedUser**(taskId: `string` = `null`, idToRemove: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>`<br/>
Removes a user who is currently involved with a task.
- `taskId: string = null` - ID of the target task
- `idToRemove: string = null` - ID of the user to remove
- **Returns** `Observable<UserProcessModel[]>` - Empty response when the update completes
- _taskId:_ `string` - ID of the target task
- _idToRemove:_ `string` - ID of the user to remove
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>` - Empty response when the update completes
## Details
+44 -44
View File
@@ -11,65 +11,65 @@ Manipulates content related to a Process Instance or Task Instance in APS.
### Methods
- `createProcessRelatedContent(processInstanceId: string = null, content: any = null, opts?: any = null): Observable<any>`<br/>
- **createProcessRelatedContent**(processInstanceId: `string` = `null`, content: `any` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Associates an uploaded file with a process instance.
- `processInstanceId: string = null` - ID of the target process instance
- `content: any = null` - File to associate
- `opts?: any = null` - (Optional) Options supported by JSAPI
- **Returns** `Observable<any>` - Details of created content
- `createTaskRelatedContent(taskId: string = null, file: any = null, opts?: any = null): any`<br/>
- _processInstanceId:_ `string` - ID of the target process instance
- _content:_ `any` - File to associate
- _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Details of created content
- **createTaskRelatedContent**(taskId: `string` = `null`, file: `any` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Associates an uploaded file with a task instance.
- `taskId: string = null` - ID of the target task
- `file: any = null` - File to associate
- `opts?: any = null` - (Optional) Options supported by JSAPI
- **Returns** `any` - Details of created content
- `createTemporaryRawRelatedContent(file: any = null): Observable<RelatedContentRepresentation>`<br/>
- _taskId:_ `string` - ID of the target task
- _file:_ `any` - File to associate
- _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Details of created content
- **createTemporaryRawRelatedContent**(file: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>`<br/>
Create temporary related content from an uploaded file.
- `file: any = null` - File to use for content
- **Returns** `Observable<RelatedContentRepresentation>` - The created content data
- `deleteRelatedContent(contentId: number = null): Observable<any>`<br/>
- _file:_ `any` - File to use for content
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>` - The created content data
- **deleteRelatedContent**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Deletes related content.
- `contentId: number = null` - Identifier of the content to delete
- **Returns** `Observable<any>` - Null response that notifies when the deletion is complete
- `getContentPreview(contentId: number = null): Observable<Blob>`<br/>
- _contentId:_ `number` - Identifier of the content to delete
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response that notifies when the deletion is complete
- **getContentPreview**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>`<br/>
Gets the preview for a related content file.
- `contentId: number = null` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the content preview
- `getContentThumbnail(contentId: number = null): Observable<Blob>`<br/>
- _contentId:_ `number` - ID of the related content
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the content preview
- **getContentThumbnail**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>`<br/>
Gets the thumbnail for a related content file.
- `contentId: number = null` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the thumbnail image
- `getFileContent(contentId: number = null): Observable<RelatedContentRepresentation>`<br/>
- _contentId:_ `number` - ID of the related content
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the thumbnail image
- **getFileContent**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>`<br/>
Gets the metadata for a related content item.
- `contentId: number = null` - ID of the content item
- **Returns** `Observable<RelatedContentRepresentation>` - Metadata for the content
- `getFileRawContent(contentId: number = null): Observable<Blob>`<br/>
- _contentId:_ `number` - ID of the content item
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md)`>` - Metadata for the content
- **getFileRawContent**(contentId: `number` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>`<br/>
Gets raw binary content data for a related content file.
- `contentId: number = null` - ID of the related content
- **Returns** `Observable<Blob>` - Binary data of the related content
- `getFileRawContentUrl(contentId: number = null): string`<br/>
- _contentId:_ `number` - ID of the related content
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary data of the related content
- **getFileRawContentUrl**(contentId: `number` = `null`): `string`<br/>
Gets a URL for direct access to a related content file.
- `contentId: number = null` - ID of the related content
- _contentId:_ `number` - ID of the related content
- **Returns** `string` - URL to access the content
- `getProcessRelatedContent(processId: string = null): Observable<any>`<br/>
- **getProcessRelatedContent**(processId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets related content items for a process instance.
- `processId: string = null` - ID of the target process
- **Returns** `Observable<any>` - Metadata for the content
- `getTaskRelatedContent(taskId: string = null): Observable<any>`<br/>
- _processId:_ `string` - ID of the target process
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Metadata for the content
- **getTaskRelatedContent**(taskId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Gets related content items for a task instance.
- `taskId: string = null` - ID of the target task
- **Returns** `Observable<any>` - Metadata for the content
- `handleError(error: any = null): Observable<any>`<br/>
- _taskId:_ `string` - ID of the target task
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Metadata for the content
- **handleError**(error: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Reports an error message.
- `error: any = null` - Data object with optional `message` and `status` fields for the error
- **Returns** `Observable<any>` - Callback when an error occurs
- `toJson(res: any = null): any`<br/>
- _error:_ `any` - Data object with optional `message` and `status` fields for the error
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Callback when an error occurs
- **toJson**(res: `any` = `null`): `any`<br/>
Creates a JSON representation of data.
- `res: any = null` - Object representing data
- _res:_ `any` - Object representing data
- **Returns** `any` - JSON object
- `toJsonArray(res: any = null): any`<br/>
- **toJsonArray**(res: `any` = `null`): `any`<br/>
Creates a JSON array representation of data.
- `res: any = null` - Object representing data
- _res:_ `any` - Object representing data
- **Returns** `any` - JSON array object
## Methods
@@ -206,7 +206,7 @@ See `getProcessRelatedContent` and `getTaskRelatedContent` for how to get to the
#### getFileContent(contentId: number): Observable`<RelatedContentRepresentation>`
Get the metadata for a related content item in the format of a `RelatedContentRepresentation` object:
Get the metadata for a related content item in the format of a [`RelatedContentRepresentation`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/RelatedContentRepresentation.md) object:
```ts
const contentId = 6008;
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Product Version model
Contains version and license information classes for Alfresco products.
+6 -5
View File
@@ -2,22 +2,23 @@
Added: v2.0.0
Status: Deprecated
---
# Renditions service
Manages prearranged conversions of content to different formats.
## Methods
`isRenditionAvailable(nodeId: string, encoding: string): Observable<boolean>`<br/>
`isRenditionAvailable(nodeId: string, encoding: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>`<br/>
Has the specified rendition been set up for this item?
`isConversionPossible(nodeId: string, encoding: string): Observable<boolean>`<br/>
`isConversionPossible(nodeId: string, encoding: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<boolean>`<br/>
Is it possible to convert this item to the specified format?
`getRenditionUrl(nodeId: string, encoding: string): string`<br/>
Gets a URL linking to a rendition.
`getRenditionsListByNodeId(nodeId: string): Observable<RenditionPaging>`<br/>
`getRenditionsListByNodeId(nodeId: string): `[`Observable`](http://reactivex.io/documentation/observable.html)`<RenditionPaging>`<br/>
Gets all available renditions for an item.
`convert(nodeId: string, encoding: string, pollingInterval: number = 1000)`<br/>
@@ -31,11 +32,11 @@ version of ADF.
ACS allows content items to be converted to other formats for display or delivery.
For example, a raw text file might be converted to HTML to enable better formatting
in a web browser or a PDF might be converted to an equivalent bitmap image. A
*rendition* is a prearranged conversion that is set up for an item for convenient
_rendition_ is a prearranged conversion that is set up for an item for convenient
repeated use. More information about renditions is available in the
[Content Services documentation](https://docs.alfresco.com/5.2/references/dev-extension-points-content-transformer.html).
In the Renditions service methods, the `nodeId` is a string identifying the content
In the [Renditions service](../core/renditions.service.md) methods, the `nodeId` is a string identifying the content
node that the rendition applies to. This can be obtained from
[Document List component](../content-services/document-list.component.md) events and various other places
in the ADF API. The `encoding` identifies the conversion performed by the rendition.
+4 -2
View File
@@ -2,9 +2,11 @@
Accesses the Content Services Search API.
## Methods
## Class members
`search(query: any): Observable<NodePaging>`<br/>
### Methods
[`search(query: any): Observable<NodePaging>`](../../lib/content-services/document-list/models/document-library.model.ts)<br/>
Searches the repository.
## Details
+3 -2
View File
@@ -2,6 +2,7 @@
Added: v2.1.0
Status: Active
---
# Search Configuration interface
Provides fine control of parameters to a search.
@@ -26,7 +27,7 @@ described below.
1. Implement the service class
Create your own service class to implement the SearchConfigurationInterface. This defines the
Create your own service class to implement the [`SearchConfigurationInterface`](../core/search-configuration.interface.md). This defines the
the `generateQueryBody` method that returns the QueryBody object. See the
[QueryBody](https://github.com/Alfresco/alfresco-js-api/blob/1.6.0/src/alfresco-search-rest-api/docs/QueryBody.md)
page in the Alfresco JS API for further details about the options this object provides.
@@ -83,7 +84,7 @@ described below.
})
```
You also need to add the SearchService as a provider to avoid overriding the module instance. This component will have his own instance of the SearchService that will use the class you have provided
You also need to add the [`SearchService`](../../lib/core/services/search.service.ts) as a provider to avoid overriding the module instance. This component will have his own instance of the [`SearchService`](../../lib/core/services/search.service.ts) that will use the class you have provided
as its configuration.
## See also
+10 -3
View File
@@ -2,14 +2,21 @@
Added: v2.1.0
Status: Active
---
# Search Configuration service
Provides fine control of parameters to a search.
## Methods
## Class members
`generateQueryBody(searchTerm: string, maxResults: string, skipCount: string): QueryBody`<br/>
Generates a QueryBody object with custom search parameters.
### Methods
- **generateQueryBody**(searchTerm: `string` = `null`, maxResults: `number` = `null`, skipCount: `number` = `null`): `QueryBody`<br/>
- _searchTerm:_ `string` -
- _maxResults:_ `number` -
- _skipCount:_ `number` -
- **Returns** `QueryBody` -
## Details
+18 -4
View File
@@ -1,16 +1,30 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Shared Links Api service
Finds shared links to Content Services items.
## Methods
## Class members
- `getSharedLinks(options: any = {}): Observable<NodePaging>`
Gets shared links available to the current user.
- `options` - Options supported by JSAPI
### Methods
- **createSharedLinks**(nodeId: `string` = `null`, options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>`<br/>
Creates a shared link available to the current user.
- _nodeId:_ `string` - ID of the node to link to
- _options:_ `any` - Options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>` - The shared link just created
- **deleteSharedLink**(sharedId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>`<br/>
Deletes a shared link.
- _sharedId:_ `string` - ID of the link to delete
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<SharedLinkEntry>` - Null response notifying when the operation is complete
- **getSharedLinks**(options: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`NodePaging`](../../lib/content-services/document-list/models/document-library.model.ts)`>`<br/>
Gets shared links available to the current user.
- _options:_ `any` - 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 shared links
## Details
+7 -3
View File
@@ -2,6 +2,7 @@
Added: v2.1.0
Status: Active
---
# Sidebar action menu component
Displays a sidebar-action menu information panel.
@@ -26,12 +27,15 @@ Displays a sidebar-action menu information panel.
</adf-sidebar-action-menu>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| title | `string` | | The title of the sidebar action. |
| expanded | `boolean` | | Toggle the sidebar action menu on expand. |
| -- | -- | -- | -- |
| expanded | `boolean` | | Toggle the sidebar action menu on expand. |
| title | `string` | | The title of the sidebar action. |
| width | `number` | 272 | Width in pixels for sidebar action menu options |
## Details
+70 -11
View File
@@ -1,7 +1,7 @@
---
Added: v2.3.0
Status: Active
Last reviewed: 2018-04-11
Last reviewed: 2018-06-08
---
# Sidenav Layout component
@@ -10,6 +10,21 @@ Displays the standard three-region ADF application layout.
![Sidenav on desktop](../docassets/images/sidenav-layout.png)
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Events](#events)
- [Details](#details)
- [Template context](#template-context)
- [menuOpenState$](#menuopenstate)
- [Preserving the menu state](#preserving-the-menu-state)
## Basic Usage
```html
@@ -18,7 +33,8 @@ Displays the standard three-region ADF application layout.
[sidenavMax]="220"
[stepOver]="600"
[hideSidenav]="false"
[expandedSidenav]="true">
[expandedSidenav]="true"
(expanded)="setState($event)">
<adf-sidenav-layout-header>
<ng-template let-toggleMenu="toggleMenu">
@@ -48,13 +64,19 @@ Displays the standard three-region ADF application layout.
### Properties
| Name | Type | Default | Description |
| --- | --- | --- | --- |
| sidenavMin | `number` | | (**required**) Width in pixels when compacted |
| sidenavMax | `number` | | (**required**) Width in pixels when expanded |
| stepOver | `number` | | (**required**) "Breakpoint" size (ie, number of pixels for selecting between mobile and desktop layouts) |
| hideSidenav | `boolean` | false | Toggles showing/hiding the navigation region |
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| expandedSidenav | `boolean` | true | Should the navigation region be expanded initially? |
| hideSidenav | `boolean` | false | Toggles showing/hiding the navigation region |
| sidenavMax | `number` | | Maximum size of the navigation region |
| sidenavMin | `number` | | Minimum size of the navigation region |
| stepOver | `number` | | Screen size at which display switches from small screen to large screen configuration |
### Events
| Name | Type | Description |
| -- | -- | -- |
| expanded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted when the menu toggle and the collapsed/expanded state of the sideNav changes |
## Details
@@ -65,8 +87,7 @@ The layout will select between a small screen (ie, mobile) configuration and a l
configuration according to the screen size in pixels (the `stepOver` property sets the
number of pixels at which the switch will occur).
The small screen layout uses the Angular Material
[Sidenav component](https://material.angularjs.org/latest/api/directive/mdSidenav) which is
The small screen layout uses the Angular Material [Sidenav component](https://material.angularjs.org/latest/api/directive/mdSidenav) which is
described in detail on their website.
The ADF-style (ie, large screen) Sidenav has two states: **expanded** and **compact**.
@@ -91,4 +112,42 @@ Each template is given a context containing the following methods:
Triggers menu toggling.
- `isMenuMinimized(): boolean`
Is the menu in minimized/compacted state? Only works for large screen layouts.
The expanded/compact (minimized) state of the navigation. This one only makes sense in case of desktop size, when the screen size is above the value of stepOver.
### menuOpenState$
Beside the template context's **isMenuMinimized** variable, another way to listen to the component's menu's open/closed state is with the `menuOpenState$` observable, which is driven by a `BehaviorSubject` in the background. The value emitted by this observable is the opposite of the `isMenuMinimized` template variable.
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| menuOpenState$ | Observable&lt;boolean> | true | Another way to listen to menu open/closed state |
Every time the menu state is changed, the following values are emitted:
- true, if the menu changed to the opened state
- false, if the menu changed to the closed state
### Preserving the menu state
You can preserve the state of the menu between sessions. To do this, you first need to
set a property in the `app.config.json` file:
```json
"sideNav" : {
"preserveState" : true
}
```
When this property is set, the collapsed/expanded state will be stored in the local storage
and restored when the page is reloaded or when the user next uses the app.
You can also set the default state in the `app.config.json` file:
```json
"sideNav" : {
"expandedSidenav" : true
}
```
Note that if `preserveState` is set then the current state of the sidenav (set by the user)
will override this default setting.
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Site model
Provides information about a site in a Content Services repository.
+29 -21
View File
@@ -8,32 +8,40 @@ Last reviewed: 2018-03-21
Accesses and manipulates sites from a Content Services repository.
## Methods
## Class members
- `getSites(opts: any = {}): Observable<SitePaging>`
Gets a list of all sites in the repository.
- `opts` - Options supported by JSAPI
- `getSite(siteId: string, opts?: any): Observable<SiteEntry>`
Gets the details for a site.
- `siteId` - ID of the target site
- `opts` - (Optional) Options supported by JSAPI
- `deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any>`
Deletes a site.
- `siteId` - Site to delete
- `permanentFlag` - True: deletion is permanent; False: site is moved to the trash
- `getSiteContent(siteId: string): Observable<SiteEntry>`
Gets a site's content.
- `siteId` - ID of the target site
- `getSiteMembers(siteId: string): Observable<SiteEntry>`
Gets a list of all a site's members.
- `siteId` - ID of the target site
- `getEcmCurrentLoggedUserName(): string`
Gets the username of the user currently logged into ACS.
### Methods
- **deleteSite**(siteId: `string` = `null`, permanentFlag: `boolean` = `true`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Deletes a site.
- _siteId:_ `string` - Site to delete
- _permanentFlag:_ `boolean` - True: deletion is permanent; False: site is moved to the trash
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Null response notifying when the operation is complete
- **getEcmCurrentLoggedUserName**(): `string`<br/>
Gets the username of the user currently logged into ACS.
- **Returns** `string` - Username string
- **getSite**(siteId: `string` = `null`, opts?: `any` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
Gets the details for a site.
- _siteId:_ `string` - ID of the target site
- _opts:_ `any` - (Optional) Options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - Information about the site
- **getSiteContent**(siteId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
Gets a site's content.
- _siteId:_ `string` - ID of the target site
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - Site content
- **getSiteMembers**(siteId: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>`<br/>
Gets a list of all a site's members.
- _siteId:_ `string` - ID of the target site
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` - Site members
- **getSites**(opts: `any` = `{}`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md)`>`<br/>
Gets a list of all sites in the repository.
- _opts:_ `any` - Options supported by JSAPI
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md)`>` - List of sites
## Details
You can use `getSites` to get a list of all sites in the repository.
The sites are returned as `Observable<SiteModel[]>` (see
The sites are returned as [`Observable`](http://reactivex.io/documentation/observable.html)`<SiteModel[]>` (see
[Site Model](site.model.md) for more information about this class).
If you are only interested in a single site and you have its ID, you
can use `getSite` to access it. Alternatively, you can use `getSiteContent`
+65
View File
@@ -0,0 +1,65 @@
---
Added: v2.4.0
Status: Active
Last reviewed: 2018-06-08
---
# Sorting Picker Component
Selects from a set of predefined sorting definitions and directions.
![Sorting Picker](../docassets/images/sorting-picker.png)
## Basic Usage
```html
<adf-sorting-picker
[options]="options"
[selected]="value"
[ascending]="ascending"
(change)="onChanged($event)">
</adf-sorting-picker>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| ascending | `boolean` | true | Current sorting direction |
| options | `Array<object>` | \[] | Available sorting options |
| selected | `string` | | Currently selected option key |
### Events
| Name | Type | Description |
| -- | -- | -- |
| change | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<object>` | Raised each time sorting key or direction gets changed. |
## Details
The picker shows the user a menu of sorting options (which could be data columns to sort on
alphabetical vs numerical search, etc) and the choice of ascending vs descending sort order.
Note that picker only implements the menu, so you are responsible for implementing the sorting
options yourself.
The `options` property contains an array of any objects that expose the following properties:
```ts
{
key: string;
label: string;
}
```
The `key` is an identifying value and the `label` is the text that the user will see in the
picker. The selected `key` is reported by the `change` event, which passes an object like the
following as its parameter:
```ts
{
key: string,
ascending: boolean
}
```
+37 -35
View File
@@ -1,10 +1,12 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Start Form component
Displays the Start Form for a process.
Displays the Start [`Form`](../../lib/process-services/task-list/models/form.model.ts) for a process.
![Start Form screenshot](../docassets/images/ProcessStartForm.png)
@@ -17,52 +19,52 @@ Displays the Start Form for a process.
</adf-start-form>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| processDefinitionId | `string` | | Definition ID of the process to start. |
| processId | `string` | | Process ID of the process to start. |
| showOutcomeButtons | `boolean` | `true` | Should form outcome buttons be shown? |
| showRefreshButton | `boolean` | `true` | Should the refresh button be shown? |
| readOnlyForm | `boolean` | `false` | Is the form read-only (ie, can't be edited)? |
| form | `FormModel` | | Underlying form model instance. |
| taskId | `string` | | Task id to fetch corresponding form and values. |
| nodeId | `string` | | Content Services node ID for the form metadata. |
| formId | `string` | | The id of the form definition to load and display with custom values. |
| formName | `string` | | Name of the form definition to load and display with custom values. |
| saveMetadata | `boolean` | `false` | Toggle saving of form metadata. |
| data | `FormValues` | | Custom form values map to be used with the rendered form. |
| path | `string` | | Path of the folder where the metadata will be stored. |
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
| showTitle | `boolean` | `true` | Toggle rendering of the form title. |
| showCompleteButton | `boolean` | `true` | Toggle rendering of the `Complete` outcome button. |
| disableCompleteButton | `boolean` | `false` | If true then the `Complete` outcome button is shown but it will be disabled. |
| disableStartProcessButton | `boolean` | `false` | If true then the `Start Process` outcome button is shown but it will be disabled. |
| showSaveButton | `boolean` | `true` | Toggle rendering of the `Save` outcome button. |
| showDebugButton | `boolean` | `false` | Toggle debug options. |
| readOnly | `boolean` | `false` | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
| showRefreshButton | `boolean` | `true` | Toggle rendering of the `Refresh` button. |
| showValidationIcon | `boolean` | `true` | Toggle rendering of the validation icon next to the form title. |
| fieldValidators | `FormFieldValidator[]` | `[]` | Contains a list of form field validator instances. |
| -- | -- | -- | -- |
| data | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Custom form values map to be used with the rendered form. |
| disableCompleteButton | `boolean` | false | If true then the `Complete` outcome button is shown but it will be disabled. |
| disableStartProcessButton | `boolean` | false | If true then the `Start Process` outcome button is shown but it will be disabled. |
| fieldValidators | [`FormFieldValidator`](../../lib/core/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Contains a list of form field validator instances. |
| form | [`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts) | | Underlying [form model](../../lib/core/form/components/widgets/core/form.model.ts) instance. |
| formId | `string` | | The id of the form definition to load and display with custom values. |
| formName | `string` | | Name of the form definition to load and display with custom values. |
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
| nodeId | `string` | | Content Services node ID for the form metadata. |
| path | `string` | | Path of the folder where the metadata will be stored. |
| processDefinitionId | `string` | | Definition ID of the process to start. |
| processId | `string` | | Process ID of the process to start. |
| readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
| readOnlyForm | `boolean` | false | Is the form read-only (ie, can't be edited)? |
| saveMetadata | `boolean` | false | Toggle saving of form metadata. |
| showCompleteButton | `boolean` | true | Toggle rendering of the `Complete` outcome button. |
| showDebugButton | `boolean` | false | Toggle debug options. |
| showOutcomeButtons | `boolean` | true | Should form outcome buttons be shown? |
| showRefreshButton | `boolean` | true | Should the refresh button be shown? |
| showSaveButton | `boolean` | true | Toggle rendering of the `Save` outcome button. |
| showTitle | `boolean` | true | Toggle rendering of the form title. |
| showValidationIcon | `boolean` | true | Toggle rendering of the validation icon next to the form title. |
| taskId | `string` | | Task id to fetch corresponding form and values. |
### Events
| Name | Type | Description |
| ---- | ---- | ----------- |
| outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. |
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when a field of the form is clicked. |
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| formCompleted | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | `EventEmitter<ContentLinkModel>` | Emitted when form content is clicked. |
| -- | -- | -- |
| executeOutcome | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormOutcomeEvent`](../../lib/core/form/components/widgets/core/form-outcome-event.model.ts)`>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formCompleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is submitted with the `Complete` outcome. |
| formContentClicked | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ContentLinkModel`](../../lib/core/form/components/widgets/core/content-link.model.ts)`>` | Emitted when a field of the form is clicked. |
| formDataRefreshed | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when form values are refreshed due to a data property change. |
| formLoaded | `EventEmitter<FormModel>` | Emitted when the form is loaded or reloaded. |
| formDataRefreshed | `EventEmitter<FormModel>` | Emitted when form values are refreshed due to a data property change. |
| executeOutcome | `EventEmitter<FormOutcomeEvent>` | Emitted when any outcome is executed. Default behaviour can be prevented via `event.preventDefault()`. |
| formSaved | `EventEmitter<FormModel>` | Emitted when the form is submitted with the `Save` or custom outcomes. |
| onError | `EventEmitter<any>` | Emitted when any error occurs. |
| outcomeClick | `EventEmitter<any>` | Emitted when the user clicks one of the outcome buttons that completes the form. |
## Details
The [Start Process component](../process-services/start-process.component.md) uses the Start Form component
The [Start Process component](../process-services/start-process.component.md) uses the Start [`Form`](../../lib/process-services/task-list/models/form.model.ts) component
to display the
[start form](http://docs.alfresco.com/process-services1.6/topics/none_start_event.html)
for the process.
+20 -16
View File
@@ -2,28 +2,32 @@
Added: v2.0.0
Status: Active
---
# Storage service
Stores items in the form of key-value pairs.
## Methods
## Class members
- `getItem(key: string): string`
Gets an item.
- `key` - Key to identify the item
- `setItem(key: string, data: string)`
Stores an item
- `key` - Key to identify the item
- `data` - Data to store
- `clear()`
Removes all currently stored items.
### Methods
- `removeItem(key: string)`
Removes a single item.
- `key` - Key to identify the item
- `hasItem(key: string): boolean`
Is any item currently stored under `key`?
- `key` - Key identifying item to check
- **clear**()<br/>
Removes all currently stored items.
- **getItem**(key: `string` = `null`): `string | null`<br/>
Gets an item.
- _key:_ `string` - Key to identify the item
- **Returns** `string | null` - The item (if any) retrieved by the key
- **hasItem**(key: `string` = `null`): `boolean`<br/>
Is any item currently stored under `key`?
- _key:_ `string` - Key identifying item to check
- **Returns** `boolean` - True if key retrieves an item, false otherwise
- **removeItem**(key: `string` = `null`)<br/>
Removes a single item.
- _key:_ `string` - Key to identify the item
- **setItem**(key: `string` = `null`, data: `string` = `null`)<br/>
Stores an item
- _key:_ `string` - Key to identify the item
- _data:_ `string` - Data to store
## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Text Highlight pipe
Adds highlighting to words or sections of text that match a search string.
+5 -3
View File
@@ -14,11 +14,13 @@ Implements text field input masks.
<input [textMask]="{mask: mask, isReversed: isMaskReversed}">
```
## Class members
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| textMask | any | | Object defining mask and "reversed" status. |
| Name | Type | Default value | Description |
| -- | -- | -- | -- |
| textMask | `object` | | Object defining mask and "reversed" status. |
## Details
+13 -9
View File
@@ -8,17 +8,21 @@ Last reviewed: 2018-03-21
Retrieves an SVG thumbnail image to represent a document type.
## Methods
## Class members
- `getDocumentThumbnailUrl(node: any): string`
Gets a thumbnail URL for the given document node.
- `node` - Node to get URL for.
- `getMimeTypeIcon(mimeType: string): string`
Gets a thumbnail URL for a MIME type.
- `mimeType` - MIME type for the thumbnail
- `getDefaultMimeTypeIcon(): string`
Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
### Methods
- **getDefaultMimeTypeIcon**(): `string`<br/>
Gets a "miscellaneous" thumbnail URL for types with no other icon defined.
- **Returns** `string` - URL string
- **getDocumentThumbnailUrl**(node: `any` = `null`): `string`<br/>
Gets a thumbnail URL for the given document node.
- _node:_ `any` - Node to get URL for.
- **Returns** `string` - URL string
- **getMimeTypeIcon**(mimeType: `string` = `null`): `string`<br/>
Gets a thumbnail URL for a MIME type.
- _mimeType:_ `string` - MIME type for the thumbnail
- **Returns** `string` - URL string
## Details
+1
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# Time Ago pipe
Converts a recent past date into a number of days ago.
+2
View File
@@ -1,7 +1,9 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Toolbar Divider Component
Divides groups of elements in a Toolbar with a visual separator.
+3 -1
View File
@@ -1,10 +1,12 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Toolbar Title Component
Supplies custom HTML to be included in a Toolbar component title.
Supplies custom HTML to be included in a [Toolbar component](../core/toolbar.component.md) title.
![](../docassets/images/adf-toolbar-02.png)
+54 -11
View File
@@ -1,13 +1,33 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-08
---
# Toolbar Component
Simple container for headers, titles, actions and breadcrumbs.
![](../docassets/images/adf-toolbar-01.png)
## Contents
- [Basic Usage](#basic-usage)
- [Class members](#class-members)
- [Properties](#properties)
- [Details](#details)
- [Custom title](#custom-title)
- [Divider](#divider)
- [Spacer](#spacer)
- [Dropdown menu](#dropdown-menu)
- [Custom color](#custom-color)
- [See also](#see-also)
## Basic Usage
```html
@@ -21,18 +41,21 @@ Simple container for headers, titles, actions and breadcrumbs.
</adf-toolbar>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| title | `string` | `''` | Toolbar title. |
| color | `string` | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. |
| -- | -- | -- | -- |
| color | `string` | | Toolbar color. Can be changed to empty value (default), `primary`, `accent` or `warn`. |
| title | `string` | "" | Toolbar title. |
## Details
### Custom title
You can use any HTML layout or Angular component as a content of the Title section by using the special `<adf-toolbar-title>` component instead of the "title" attribute:
You can use any HTML layout or Angular component as the content of the title section by
using the `<adf-toolbar-title>` subcomponent instead of the "title" attribute:
```html
<adf-toolbar>
@@ -43,8 +66,6 @@ You can use any HTML layout or Angular component as a content of the Title secti
</adf-toolbar>
```
The toolbar should now look similar to the following:
![](../docassets/images/adf-toolbar-02.png)
### Divider
@@ -60,9 +81,31 @@ You can divide groups of elements with a visual separator `<adf-toolbar-divider>
</adf-toolbar>
```
### Spacer
You can split the toolbar into separate sections at the left and right of the screen
with the `adf-toolbar--spacer` CSS class. In the following example, the toolbar title
element is rendered to the left but all the buttons are pushed to the right side:
```html
<adf-toolbar>
<adf-toolbar-title>
...
<adf-toolbar-title>
<div class="adf-toolbar--spacer"></div>
<button></button>
<adf-toolbar-divider></adf-toolbar-divider>
<button></button>
</adf-toolbar>
```
### Dropdown menu
You can use the following example to create a dropdown menu:
The following example shows how to create a dropdown menu. The code is based
on the `<mat-menu>` component from the `@angular/material` library
but you could also use your own custom menu components:
```html
<adf-toolbar title="Toolbar">
@@ -88,11 +131,10 @@ You can use the following example to create a dropdown menu:
</adf-toolbar>
```
The code above is based on the `<mat-menu>` component from the `@angular/material` library. You can use any custom menu component as well.
![](../docassets/images/adf-toolbar-03.png)
Once you click the menu button you should see the following menu items as defined earlier:
With the menu set up like this, you would see the following menu items as defined earlier
when you click the menu button:
![](../docassets/images/adf-toolbar-04.png)
@@ -100,7 +142,8 @@ Once you click the menu button you should see the following menu items as define
Besides the default color you can use 'primary', 'accent', or 'warn' values:
Depending on the overall application theme the colors of the toolbar should change.
You might also want to change colors to follow your application's color
[theme](../user-guide/theming.md):
For example:
+44 -22
View File
@@ -1,28 +1,38 @@
---
Added: v2.0.0
Status: Active
Last reviewed: 2018-06-07
---
# Translation service
Supports localisation.
## Methods
## Class members
- `addTranslationFolder(name: string = '', path: string = '')`
Adds a new folder of translation source files.
- `name` - Name for the translation provider
- `path` - Path to the folder
- `use(lang: string): Observable<any>`
Sets the target language for translations.
- `lang` - Code name for the language
- `get(key: string|Array<string>, interpolateParams?: Object): Observable<any>`
Gets the translation for the supplied key.
- `key` - Key to translate
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message
- `instant(key: string | Array<string>, interpolateParams?: Object): any`
Directly returns the translation for the supplied key.
- `key` - Key to translate
- `interpolateParams` - (Optional) String(s) to be interpolated into the main message
### Methods
- **addTranslationFolder**(name: `string` = `""`, path: `string` = `""`)<br/>
Adds a new folder of translation source files.
- _name:_ `string` - Name for the translation provider
- _path:_ `string` - Path to the folder
- **get**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<string | any>`<br/>
Gets the translation for the supplied key.
- _key:_ `string | Array<string>` - Key to translate
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<string | any>` - Translated text
- **instant**(key: `string | Array<string>` = `null`, interpolateParams?: `Object` = `null`): `string | any`<br/>
Directly returns the translation for the supplied key.
- _key:_ `string | Array<string>` - Key to translate
- _interpolateParams:_ `Object` - (Optional) String(s) to be interpolated into the main message
- **Returns** `string | any` - Translated text
- **onTranslationChanged**(lang: `string` = `null`)<br/>
Triggers a notification callback when the translation language changes.
- _lang:_ `string` - The new language code
- **use**(lang: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Sets the target language for translations.
- _lang:_ `string` - Code name for the language
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Translations available for the language
## Details
@@ -61,7 +71,7 @@ general format of the path to this folder will be:
`<app>/src/assets/my-translations/i18n`
If you wanted English and French translations then you would copy the built-in
If you wanted English and French translations then you would add
`en.json` and `fr.json` files into the `i18n` folder and add your new keys:
// en.json
@@ -75,6 +85,22 @@ If you wanted English and French translations then you would copy the built-in
"WELCOME_MESSAGE": "Bienvenue !"
...
The files follow the same hierarchical key:value JSON format as the built-in translations.
You can add new keys to your local files or redefine existing keys but the built-in definitions
will be used for any keys you don't explicitly define in your files. For example, `en.json` might
look like the following:
```json
{
"title": "my app",
"LOGIN": {
"LABEL": {
"LOGIN": "Custom Sign In"
}
}
}
```
To enable the new translations in your app, you also need to register them in your
`app.module.ts` file. Import `TRANSLATION_PROVIDER` and add the path of your
translations folder to the `providers`:
@@ -119,10 +145,6 @@ ngOnInit() {
...
```
The new translation files completely replace the built-in ones.
If you want to continue using the built-in keys then you must add your new
keys to copies of the existing files.
Note: the `source` property points to the web application root. Ensure you have
webpack correctly set up to copy all the i18n files at compile time.
@@ -138,7 +160,7 @@ You can register as many entries as you like.
Depending on your application, you may want to have buttons or dropdown menus to allow language selection for the end users.
You can use `TranslationService` to switch languages from your code based on input events of your choice:
You can use [`TranslationService`](../core/translation.service.md) to switch languages from your code based on input events of your choice:
```ts
class MyComponent {
+2 -2
View File
@@ -62,7 +62,7 @@ value or expression:
### Modes
The Upload directive supports two modes:
The [Upload directive](../core/upload.directive.md) supports two modes:
- **drop** mode, where the decorated element acts like a drop zone for files (enabled by default)
- **click** mode, where the decorated element invokes a file dialog to select files or folders.
@@ -99,7 +99,7 @@ In click mode you can provide extra attributes for the file dialog:
#### Drop mode
Currently, the upload directive supports only file drops (single or multiple).
Currently, the [upload directive](../core/upload.directive.md) supports only file drops (single or multiple).
Support for folders and `accept` filters will probably be implemented in a
future version.
+13 -13
View File
@@ -12,28 +12,28 @@ Provides access to various APIs related to file upload features.
### Methods
- `addToQueue(files: FileModel[] = null): FileModel[]`<br/>
- **addToQueue**(files: [`FileModel`](../../lib/core/models/file.model.ts)`[]` = `null`): [`FileModel`](../../lib/core/models/file.model.ts)`[]`<br/>
Adds files to the uploading queue to be uploaded
- `files: FileModel[] = null` - One or more separate parameters or an array of files to queue
- **Returns** `FileModel[]` - Array of files that were not blocked from upload by the ignore list
- `cancelUpload(files: FileModel[] = null)`<br/>
- _files:_ [`FileModel`](../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files to queue
- **Returns** [`FileModel`](../../lib/core/models/file.model.ts)`[]` - Array of files that were not blocked from upload by the ignore list
- **cancelUpload**(files: [`FileModel`](../../lib/core/models/file.model.ts)`[]` = `null`)<br/>
Cancels uploading of files.
- `files: FileModel[] = null` - One or more separate parameters or an array of files specifying uploads to cancel
- `clearQueue()`<br/>
- _files:_ [`FileModel`](../../lib/core/models/file.model.ts)`[]` - One or more separate parameters or an array of files specifying uploads to cancel
- **clearQueue**()<br/>
Clears the upload queue
- `getQueue(): FileModel[]`<br/>
- **getQueue**(): [`FileModel`](../../lib/core/models/file.model.ts)`[]`<br/>
Gets the file Queue
- **Returns** `FileModel[]` - Array of files that form the queue
- `getUploadPromise(file: FileModel = null): any`<br/>
- **Returns** [`FileModel`](../../lib/core/models/file.model.ts)`[]` - Array of files that form the queue
- **getUploadPromise**(file: [`FileModel`](../../lib/core/models/file.model.ts) = `null`): `any`<br/>
Gets an upload promise for a file.
- `file: FileModel = null` - The target file
- _file:_ [`FileModel`](../../lib/core/models/file.model.ts) - The target file
- **Returns** `any` - Promise that is resolved if the upload is successful or error otherwise
- `isUploading(): boolean`<br/>
- **isUploading**(): `boolean`<br/>
Checks whether the service is uploading a file.
- **Returns** `boolean` - True if a file is uploading, false otherwise
- `uploadFilesInTheQueue(emitter: EventEmitter<any> = null)`<br/>
- **uploadFilesInTheQueue**(emitter?: [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` = `null`)<br/>
Finds all the files in the queue that are not yet uploaded and uploads them into the directory folder.
- `emitter: EventEmitter<any> = null` - (Deprecated) Emitter to invoke on file status change
- _emitter:_ [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` - (Optional) (Deprecated) Emitter to invoke on file status change
## Events
+10 -7
View File
@@ -2,6 +2,7 @@
Added: v2.0.0
Status: Active
---
# User Info component
Shows user information.
@@ -12,16 +13,18 @@ Shows user information.
<adf-userinfo></adf-userinfo>
```
## Class members
### Properties
| Name | Type | Default value | Description |
| ---- | ---- | ------------- | ----------- |
| ecmBackgroundImage | `string` | `'./assets/images/ecm-background.png'` | Custom path for the background banner image for ACS users. |
| bpmBackgroundImage | `string` | `'./assets/images/bpm-background.png'` | Custom path for the background banner image for APS users. |
| menuPositionX | `string` | `'after'` | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
| menuPositionY | `string` | `'below'` | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
| showName | `boolean` | `true` | Shows/hides the username next to the user info button. |
| namePosition | `string` | `'right'` | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. |
| -- | -- | -- | -- |
| bpmBackgroundImage | `string` | "./assets/images/bpm-background.png" | Custom path for the background banner image for APS users. |
| ecmBackgroundImage | `string` | "./assets/images/ecm-background.png" | Custom path for the background banner image for ACS users. |
| menuPositionX | `string` | "after" | Custom choice for opening the menu at the bottom. Can be `before` or `after`. |
| menuPositionY | `string` | "below" | Custom choice for opening the menu at the bottom. Can be `above` or `below`. |
| namePosition | `string` | "right" | When the username is shown, this defines its position relative to the user info button. Can be `right` or `left`. |
| showName | `boolean` | true | Shows/hides the username next to the user info button. |
## Details
+2 -1
View File
@@ -2,9 +2,10 @@
Added: v2.0.0
Status: Active
---
# User Initial pipe
Takes the name fields of a UserProcessModel object and extracts and formats the initials.
Takes the name fields of a [`UserProcessModel`](../core/user-process.model.md) object and extracts and formats the initials.
## Basic Usage
+33 -30
View File
@@ -8,35 +8,39 @@ Last reviewed: 2018-04-16
Stores preferences for components.
## Methods
## Class members
- `get(property: string, defaultValue?: string): string`
Gets a preference property.
- `property` - Name of the property
- `defaultValue` - (Optional) Default to return if the property is not found
- `set(property: string, value: any)`
Sets a preference property.
- `property` - Name of the property
- `value` - New value for the property
- `getStoragePrefix(): string`
Gets the active storage prefix for preferences.
- `setStoragePrefix(value: string)`
Sets the active storage prefix for preferences.
- `value` - Name of the prefix
- `getPropertyKey(property: string): string`
Gets the full property key with prefix.
- `property` - The property name
- `getDefaultPageSizes(): number[]`
Gets an array containing the available page sizes.
- `getDefaultLocale(): string`
Gets the default locale.
- `select(property: string) : Observable`
Return the value for the user status property changed
- `property` - The property name to query
### Methods
- **get**(property: `string` = `null`, defaultValue?: `string` = `null`): `string`<br/>
Gets a preference property.
- _property:_ `string` - Name of the property
- _defaultValue:_ `string` - (Optional) Default to return if the property is not found
- **Returns** `string` - Preference property
- **getDefaultLocale**(): `string`<br/>
Gets the default locale.
- **Returns** `string` - Default locale language code
- **getDefaultPageSizes**(): `number[]`<br/>
Gets an array containing the available page sizes.
- **Returns** `number[]` - Array of page size values
- **getPropertyKey**(property: `string` = `null`): `string`<br/>
Gets the full property key with prefix.
- _property:_ `string` - The property name
- **Returns** `string` - [Property](../../lib/content-services/content-metadata/interfaces/property.interface.ts) key
- **getStoragePrefix**(): `string`<br/>
Gets the active storage prefix for preferences.
- **Returns** `string` - Storage prefix
- **select**(property: `string` = `null`): [`Observable`](http://reactivex.io/documentation/observable.html)`<any>`<br/>
Sets up a callback to notify when a property has changed.
- _property:_ `string` - The property to watch
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<any>` - Notification callback
- **set**(property: `string` = `null`, value: `any` = `null`)<br/>
Sets a preference property.
- _property:_ `string` - Name of the property
- _value:_ `any` - New value for the property
- **setStoragePrefix**(value: `string` = `null`)<br/>
Sets the active storage prefix for preferences.
- _value:_ `string` - Name of the prefix
## Details
@@ -61,7 +65,7 @@ class AppComponent {
}
```
As soon as you assign the storage prefix, all settings that you get or set via the `UserPreferencesService` will be saved to a dedicated profile.
As soon as you assign the storage prefix, all settings that you get or set via the [`UserPreferencesService`](../core/user-preferences.service.md) will be saved to a dedicated profile.
You can import the service into your controller and use its APIs as shown below:
@@ -102,7 +106,7 @@ whole set of user properties. This is useful when a component needs to react to
```
You can also use the `select` method to get notification when a particular property is changed.
A set of basic properties is added into the enumeration `UserPreferenceValues` which gives you the key value to access the standard user preference service properties : **PaginationSize**, **DisableCSRF**, **Locale** and **SupportedPageSizes**.
A set of basic properties is added into the enumeration [`UserPreferenceValues`](../../lib/core/services/user-preferences.service.ts) which gives you the key value to access the standard user preference service properties : **PaginationSize**, **DisableCSRF**, **Locale** and **SupportedPageSizes**.
```ts
userPreferences.disableCSRF = true;
@@ -110,4 +114,3 @@ A set of basic properties is added into the enumeration `UserPreferenceValues` w
console.log(CSRFflag); //this will be true;
});
```

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