diff --git a/docs/README.md b/docs/README.md index baa6c928b2..f13a7b39a0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -79,7 +79,7 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | | [About component](core/about.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows a general version and status overview of the installed ADF library. | [Source](../lib/core/about/about.component.ts) | -| [Buttons menu component](core/buttons-menu.component.md) | Displays buttons on a responsive menu. | [Source](../lib/core/buttons-menu/buttons-menu.component.ts) | +| [Buttons menu component](core/buttons-menu.component.md) | Displays buttons on a responsive menu. | [Source](../lib/core/buttons-menu/buttons-menu.component.ts) | | [Card view component](core/card-view.component.md) | Displays a configurable property list renderer. | [Source](../lib/core/card-view/components/card-view/card-view.component.ts) | | [Comment list component](core/comment-list.component.md) | Shows a list of comments. | [Source](../lib/core/comments/comment-list.component.ts) | | [Comments component](core/comments.component.md) | 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. | [Source](../lib/core/comments/comments.component.ts) | @@ -159,7 +159,7 @@ for more information about installing and using the source code. | [Activiti alfresco service](core/activiti-alfresco.service.md) | Gets Alfresco Repository folder content based on a Repository account configured in Alfresco Process Services (APS). | [Source](../lib/core/form/services/activiti-alfresco.service.ts) | | [Form rendering service](core/form-rendering.service.md) | Maps a form field type string onto the corresponding form widget component type. | [Source](../lib/core/form/services/form-rendering.service.ts) | | [Form service](core/form.service.md) | Implements Process Services form methods | [Source](../lib/core/form/services/form.service.ts) | -| [Node service](core/node.service.md) | Gets Alfresco Repository node metadata and creates nodes with metadata. | [Source](../lib/core/form/services/node.service.ts) | +| [Node service](core/node.service.md) | Gets Alfresco Repository node metadata and creates nodes with metadata. | [Source](../lib/core/form/services/node.service.ts) | | [Process content service](core/process-content.service.md) | Manipulates content related to a Process Instance or Task Instance in APS. | [Source](../lib/core/form/services/process-content.service.ts) | | [Alfresco api service](core/alfresco-api.service.md) | Provides access to an initialized **AlfrescoJSApi** instance. | [Source](../lib/core/services/alfresco-api.service.ts) | | [Apps process service](core/apps-process.service.md) | Gets details of the Process Services apps that are deployed for the user. | [Source](../lib/core/services/apps-process.service.ts) | @@ -176,13 +176,13 @@ for more information about installing and using the source code. | [Download zip service](core/download-zip.service.md) | Creates and manages downloads. | [Source](../lib/core/services/download-zip.service.ts) | | [Favorites api service](core/favorites-api.service.md) | Gets a list of items a user has marked as their favorites. | [Source](../lib/core/services/favorites-api.service.ts) | | [Highlight transform service](core/highlight-transform.service.md) | Adds HTML to a string to highlight chosen sections. | [Source](../lib/core/services/highlight-transform.service.ts) | -| [Jwt helper service](core/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/services/jwt-helper.service.ts) | +| [Jwt helper service](core/jwt-helper.service.md) | Decodes a JSON Web Token (JWT) to a JavaScript object. | [Source](../lib/core/services/jwt-helper.service.ts) | | [Log service](core/log.service.md) | Provides log functionality. | [Source](../lib/core/services/log.service.ts) | | [Login dialog service](core/login-dialog.service.md) | Manages login dialogs. | [Source](../lib/core/services/login-dialog.service.ts) | | [Nodes api service](core/nodes-api.service.md) | Accesses and manipulates ACS document nodes using their node IDs. | [Source](../lib/core/services/nodes-api.service.ts) | | [Notification service](core/notification.service.md) | Shows a notification message with optional feedback. | [Source](../lib/core/services/notification.service.ts) | | [Page title service](core/page-title.service.md) | Sets the page title. | [Source](../lib/core/services/page-title.service.ts) | -| [People content service](core/people-content.service.md) | Gets information about a Content Services user. | [Source](../lib/core/services/people-content.service.ts) | +| [People content service](core/people-content.service.md) | Gets information about a Content Services user. | [Source](../lib/core/services/people-content.service.ts) | | [People process service](core/people-process.service.md) | Gets information about Process Services users. | [Source](../lib/core/services/people-process.service.ts) | | [Renditions service](core/renditions.service.md) | Manages prearranged conversions of content to different formats. | [Source](../lib/core/services/renditions.service.ts) | | [Search configuration service](core/search-configuration.service.md) | Provides fine control of parameters to a search. | [Source](../lib/core/services/search-configuration.service.ts) | @@ -196,7 +196,7 @@ for more information about installing and using the source code. | [User preferences service](core/user-preferences.service.md) | Stores preferences for the app and for individual components. | [Source](../lib/core/services/user-preferences.service.ts) | | [Bpm user service](core/bpm-user.service.md) | Gets information about the current Process Services user. | [Source](../lib/core/userinfo/services/bpm-user.service.ts) | | [Ecm user service](core/ecm-user.service.md) | Gets information about a Content Services user. | [Source](../lib/core/userinfo/services/ecm-user.service.ts) | -| [Identity user service](core/identity-user.service.md) | Gets OAuth2 personal details and roles for users. | [Source](../lib/core/userinfo/services/identity-user.service.ts) | +| [Identity user service](core/identity-user.service.md) | Gets OAuth2 personal details and roles for users. | [Source](../lib/core/userinfo/services/identity-user.service.ts) | ## Widgets @@ -251,7 +251,7 @@ for more information about installing and using the source code. | [Search slider component](content-services/search-slider.component.md) | Implements a numeric slider widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-slider/search-slider.component.ts) | | [Search sorting picker component](content-services/search-sorting-picker.component.md) | Provides an ability to select one of the predefined sorting definitions for search results: | [Source](../lib/content-services/search/components/search-sorting-picker/search-sorting-picker.component.ts) | | [Search text component](content-services/search-text.component.md) | Implements a text input widget for the Search Filter component. | [Source](../lib/content-services/search/components/search-text/search-text.component.ts) | -| [Search component](content-services/search.component.md) | Searches items for supplied search terms. | [Source](../lib/content-services/search/components/search.component.ts) | +| [Search component](content-services/search.component.md) | Searches items for supplied search terms. | [Source](../lib/content-services/search/components/search.component.ts) | | [Sites dropdown component](content-services/sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../lib/content-services/site-dropdown/sites-dropdown.component.ts) | | [Like component](content-services/like.component.md) | Allows a user to add "likes" to an item. | [Source](../lib/content-services/social/like.component.ts) | | [Rating component](content-services/rating.component.md) | Allows a user to add ratings to an item. | [Source](../lib/content-services/social/rating.component.ts) | @@ -334,49 +334,50 @@ for more information about installing and using the source code. -## Components +### Components | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Apps list component](process-services/apps-list.component.md) | Shows all available apps. | [Source](../lib/process-services/app-list/apps-list.component.ts) | -| [Create process attachment component](process-services/create-process-attachment.component.md) | Displays an Upload Component (Drag and Click) to upload the attachment to a specified process instance. | [Source](../lib/process-services/attachment/create-process-attachment.component.ts) | -| [Create task attachment component](process-services/create-task-attachment.component.md) | Displays an Upload Component (Drag and Click) to upload the attachment to a specified task. | [Source](../lib/process-services/attachment/create-task-attachment.component.ts) | -| [Process attachment list component](process-services/process-attachment-list.component.md) | Displays documents attached to a specified process instance. | [Source](../lib/process-services/attachment/process-attachment-list.component.ts) | -| [Task attachment list component](process-services/task-attachment-list.component.md) | Displays documents attached to a specified task. | [Source](../lib/process-services/attachment/task-attachment-list.component.ts) | -| [People component](process-services/people.component.md) | Displays users involved with a specified task | [Source](../lib/process-services/people/components/people/people.component.ts) | -| [People list component](process-services/people-list.component.md) | Shows a list of users (people). | [Source](../lib/process-services/people/components/people-list/people-list.component.ts) | -| [People search component](process-services/people-search.component.md) | Searches users/people. | [Source](../lib/process-services/people/components/people-search/people-search.component.ts) | -| [Process comments component](process-services/process-comments.component.md) | Displays comments associated with a particular process instance and allows the user to add new comments. | [Source](../lib/process-services/process-comments/process-comments.component.ts) | -| [Process filters component](process-services/process-filters.component.md) | Collection of criteria used to filter process instances, which may be customized by users. | [Source](../lib/process-services/process-list/components/process-filters.component.ts) | -| [Process instance details component](process-services/process-instance-details.component.md) | Displays detailed information about a specified process instance | [Source](../lib/process-services/process-list/components/process-instance-details.component.ts) | -| [Process instance header component](process-services/process-instance-header.component.md) | Sub-component of the process details component, which renders some general information about the selected process. | [Source](../lib/process-services/process-list/components/process-instance-header.component.ts) | -| [Process instance tasks component](process-services/process-instance-tasks.component.md) | Lists both the active and completed tasks associated with a particular process instance | [Source](../lib/process-services/process-list/components/process-instance-tasks.component.ts) | -| [Process list component](process-services/process-list.component.md) | Renders a list containing all the process instances matched by the parameters specified. | [Source](../lib/process-services/process-list/components/process-list.component.ts) | -| [Start process component](process-services/start-process.component.md) | Starts a process. | [Source](../lib/process-services/process-list/components/start-process.component.ts) | -| [Attach form component](process-services/attach-form.component.md) | This component can be used when there is no form attached to a task and you want to add one. | [Source](../lib/process-services/task-list/components/attach-form.component.ts) | -| [Checklist component](process-services/checklist.component.md) | Shows the checklist task functionality. | [Source](../lib/process-services/task-list/components/checklist.component.ts) | -| [Start task component](process-services/start-task.component.md) | Creates/Starts a new task for the specified app. | [Source](../lib/process-services/task-list/components/start-task.component.ts) | -| [Task details component](process-services/task-details.component.md) | Shows the details of the task ID passed in as input. | [Source](../lib/process-services/task-list/components/task-details.component.ts) | -| [Task filters component](process-services/task-filters.component.md) | Shows all available filters. | [Source](../lib/process-services/task-list/components/task-filters.component.ts) | -| [Task header component](process-services/task-header.component.md) | Shows all the information related to a task. | [Source](../lib/process-services/task-list/components/task-header.component.ts) | -| [Task list component](process-services/task-list.component.md) | Renders a list containing all the tasks matched by the parameters specified. | [Source](../lib/process-services/task-list/components/task-list.component.ts) | -| [Task standalone component](process-services/task-standalone.component.md) | This component can be used when the task doesn't belong to any processes. | [Source](../lib/process-services/task-list/components/task-standalone.component.ts) | +| [Apps List Component](process-services/components/apps-list.component.md) | Shows all available apps. | [Source](../lib/process-services/app-list/apps-list.component.ts) | +| [Attach Form component](process-services/components/attach-form.component.md) | This component can be used when there is no form attached to a task and you want to add one. | [Source](../lib/process-services/task-list/components/attach-form.component.ts) | +| [Checklist Component](process-services/components/checklist.component.md) | Shows the checklist task functionality. | [Source](../lib/process-services/task-list/components/checklist.component.ts) | +| [Create Process Attachment component](process-services/components/create-process-attachment.component.md) | Displays an Upload Component (Drag and Click) to upload the attachment to a specified process instance. | [Source](../lib/process-services/attachment/create-process-attachment.component.ts) | +| [Create Task Attachment Component](process-services/components/create-task-attachment.component.md) | Displays an Upload Component (Drag and Click) to upload the attachment to a specified task. | [Source](../lib/process-services/attachment/create-task-attachment.component.ts) | +| [People list component](process-services/components/people-list.component.md) | Shows a list of users (people). | [Source](../lib/process-services/people/components/people-list/people-list.component.ts) | +| [People Search component](process-services/components/people-search.component.md) | Searches users/people. | [Source](../lib/process-services/people/components/people-search/people-search.component.ts) | +| [People Component](process-services/components/people.component.md) | Displays users involved with a specified task | [Source](../lib/process-services/people/components/people/people.component.ts) | +| [Process Attachment List component](process-services/components/process-attachment-list.component.md) | Displays documents attached to a specified process instance. | [Source](../lib/process-services/attachment/process-attachment-list.component.ts) | +| [Process Instance Comments component](process-services/components/process-comments.component.md) | Displays comments associated with a particular process instance and allows the user to add new comments. | [Source](../lib/process-services/process-comments/process-comments.component.ts) | +| [Process Filters Component](process-services/components/process-filters.component.md) | Collection of criteria used to filter process instances, which may be customized by users. | [Source](../lib/process-services/process-list/components/process-filters.component.ts) | +| [Process Details component](process-services/components/process-instance-details.component.md) | Displays detailed information about a specified process instance | [Source](../lib/process-services/process-list/components/process-instance-details.component.ts) | +| [Process Instance Details Header component](process-services/components/process-instance-header.component.md) | Sub-component of the process details component, which renders some general information about the selected process. | [Source](../lib/process-services/process-list/components/process-instance-header.component.ts) | +| [Process Instance Tasks component](process-services/components/process-instance-tasks.component.md) | Lists both the active and completed tasks associated with a particular process instance | [Source](../lib/process-services/process-list/components/process-instance-tasks.component.ts) | +| [Process Instance List](process-services/components/process-list.component.md) | Renders a list containing all the process instances matched by the parameters specified. | [Source](../lib/process-services/process-list/components/process-list.component.ts) | +| [Select App Component](process-services/components/select-apps-dialog.component.md) | Shows all available apps and returns the selected app. | [Source](../lib/process-services/app-list/select-apps-dialog-component.ts) | +| [Start Process component](process-services/components/start-process.component.md) | Starts a process. | [Source](../lib/process-services/process-list/components/start-process.component.ts) | +| [Start Task Component](process-services/components/start-task.component.md) | Creates/Starts a new task for the specified app. | [Source](../lib/process-services/task-list/components/start-task.component.ts) | +| [Task Attachment List Component](process-services/components/task-attachment-list.component.md) | Displays documents attached to a specified task. | [Source](../lib/process-services/attachment/task-attachment-list.component.ts) | +| [Task Details component](process-services/components/task-details.component.md) | Shows the details of the task ID passed in as input. | [Source](../lib/process-services/task-list/components/task-details.component.ts) | +| [Task Filters component](process-services/components/task-filters.component.md) | Shows all available filters. | [Source](../lib/process-services/task-list/components/task-filters.component.ts) | +| [Task Header component](process-services/components/task-header.component.md) | Shows all the information related to a task. | [Source](../lib/process-services/task-list/components/task-header.component.ts) | +| [Task List component](process-services/components/task-list.component.md) | Renders a list containing all the tasks matched by the parameters specified. | [Source](../lib/process-services/task-list/components/task-list.component.ts) | +| [Task Standalone component](process-services/components/task-standalone.component.md) | This component can be used when the task doesn't belong to any processes. | [Source](../lib/process-services/task-list/components/task-standalone.component.ts) | -## Directives +### Directives | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Process audit directive](process-services/process-audit.directive.md) | Fetches the Process Audit information in PDF or JSON format. | [Source](../lib/process-services/process-list/components/process-audit.directive.ts) | -| [Task audit directive](process-services/task-audit.directive.md) | Fetches the Task Audit information in PDF or JSON format. | [Source](../lib/process-services/task-list/components/task-audit.directive.ts) | +| [Process Audit Directive](process-services/directives/process-audit.directive.md) | Fetches the Process Audit information in PDF or JSON format. | [Source](../lib/process-services/process-list/components/process-audit.directive.ts) | +| [Task Audit Directive](process-services/directives/task-audit.directive.md) | Fetches the Task Audit information in PDF or JSON format. | [Source](../lib/process-services/task-list/components/task-audit.directive.ts) | -## Services +### Services | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Process filter service](process-services/process-filter.service.md) | Manage Process Filters, which are pre-configured Process Instance queries. | [Source](../lib/process-services/process-list/services/process-filter.service.ts) | -| [Process service](process-services/process.service.md) | Manages Process Instances, Process Variables, and Process Audit Log. | [Source](../lib/process-services/process-list/services/process.service.ts) | -| [Task filter service](process-services/task-filter.service.md) | Manage Task Filters, which are pre-configured Task Instance queries. | [Source](../lib/process-services/task-list/services/task-filter.service.ts) | -| [Tasklist service](process-services/tasklist.service.md) | Manages Task Instances. | [Source](../lib/process-services/task-list/services/tasklist.service.ts) | +| [Process Filter Service](process-services/services/process-filter.service.md) | Manage Process Filters, which are pre-configured Process Instance queries. | [Source](../lib/process-services/process-list/services/process-filter.service.ts) | +| [Process Service](process-services/services/process.service.md) | Manages Process Instances, Process Variables, and Process Audit Log. | [Source](../lib/process-services/process-list/services/process.service.ts) | +| [Task Filter Service](process-services/services/task-filter.service.md) | Manage Task Filters, which are pre-configured Task Instance queries. | [Source](../lib/process-services/task-list/services/task-filter.service.ts) | +| [Tasklist Service](process-services/services/tasklist.service.md) | Manages Task Instances. | [Source](../lib/process-services/task-list/services/tasklist.service.ts) | @@ -418,15 +419,15 @@ for more information about installing and using the source code. | Name | Description | Source link | | ---- | ----------- | ----------- | -| [Apps process cloud service](process-services-cloud/apps-process-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Gets details of deployed apps for the current user. | [Source](../lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts) | -| [Group cloud service](process-services-cloud/group-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches and gets information for groups. | [Source](../lib/process-services-cloud/src/lib/group/services/group-cloud.service.ts) | -| [Process filter cloud service](process-services-cloud/process-filter-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Manage Process Filters, which are pre-configured Process Instance queries. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.ts) | -| [Process list cloud service](process-services-cloud/process-list-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches processes. | [Source](../lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts) | -| [Start process cloud service](process-services-cloud/start-process-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Gets process definitions and starts processes. | [Source](../lib/process-services-cloud/src/lib/process/start-process/services/start-process-cloud.service.ts) | -| [Start task cloud service](process-services-cloud/start-task-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Starts standalone tasks. | [Source](../lib/process-services-cloud/src/lib/task/start-task/services/start-task-cloud.service.ts) | -| [Task filter cloud service](process-services-cloud/task-filter-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Manages task filters. | [Source](../lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.ts) | -| [Task header cloud service](process-services-cloud/task-header-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Manages cloud tasks. | [Source](../lib/process-services-cloud/src/lib/task/task-header/services/task-header-cloud.service.ts) | -| [Task list cloud service](process-services-cloud/task-list-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches tasks. | [Source](../lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.ts) | +| [Apps process cloud service](process-services-cloud/apps-process-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Gets details of deployed apps for the current user. | [Source](../lib/process-services-cloud/src/lib/app/services/apps-process-cloud.service.ts) | +| [Group cloud service](process-services-cloud/group-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches and gets information for groups. | [Source](../lib/process-services-cloud/src/lib/group/services/group-cloud.service.ts) | +| [Process filter cloud service](process-services-cloud/process-filter-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Manage Process Filters, which are pre-configured Process Instance queries. | [Source](../lib/process-services-cloud/src/lib/process/process-filters/services/process-filter-cloud.service.ts) | +| [Process list cloud service](process-services-cloud/process-list-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches processes. | [Source](../lib/process-services-cloud/src/lib/process/process-list/services/process-list-cloud.service.ts) | +| [Start process cloud service](process-services-cloud/start-process-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Gets process definitions and starts processes. | [Source](../lib/process-services-cloud/src/lib/process/start-process/services/start-process-cloud.service.ts) | +| [Start task cloud service](process-services-cloud/start-task-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Starts standalone tasks. | [Source](../lib/process-services-cloud/src/lib/task/start-task/services/start-task-cloud.service.ts) | +| [Task filter cloud service](process-services-cloud/task-filter-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Manages task filters. | [Source](../lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.ts) | +| [Task header cloud service](process-services-cloud/task-header-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Manages cloud tasks. | [Source](../lib/process-services-cloud/src/lib/task/task-header/services/task-header-cloud.service.ts) | +| [Task list cloud service](process-services-cloud/task-list-cloud.service.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Searches tasks. | [Source](../lib/process-services-cloud/src/lib/task/task-list/services/task-list-cloud.service.ts) | diff --git a/docs/process-services/README.md b/docs/process-services/README.md deleted file mode 100644 index adfd898e0a..0000000000 --- a/docs/process-services/README.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -Title: Process Services API -Github only: true ---- - -# Process Services API - -Contains components related to Process Services. -See the library's -[README file](../../lib/process-services/README.md) -for more information about installing and using the source code. - - - -## Components - -| Name | Description | Source link | -| ---- | ----------- | ----------- | -| [Apps list component](apps-list.component.md) | Shows all available apps. | [Source](../../lib/process-services/app-list/apps-list.component.ts) | -| [Create process attachment component](create-process-attachment.component.md) | Displays an Upload Component (Drag and Click) to upload the attachment to a specified process instance. | [Source](../../lib/process-services/attachment/create-process-attachment.component.ts) | -| [Create task attachment component](create-task-attachment.component.md) | Displays an Upload Component (Drag and Click) to upload the attachment to a specified task. | [Source](../../lib/process-services/attachment/create-task-attachment.component.ts) | -| [Process attachment list component](process-attachment-list.component.md) | Displays documents attached to a specified process instance. | [Source](../../lib/process-services/attachment/process-attachment-list.component.ts) | -| [Task attachment list component](task-attachment-list.component.md) | Displays documents attached to a specified task. | [Source](../../lib/process-services/attachment/task-attachment-list.component.ts) | -| [People component](people.component.md) | Displays users involved with a specified task | [Source](../../lib/process-services/people/components/people/people.component.ts) | -| [People list component](people-list.component.md) | Shows a list of users (people). | [Source](../../lib/process-services/people/components/people-list/people-list.component.ts) | -| [People search component](people-search.component.md) | Searches users/people. | [Source](../../lib/process-services/people/components/people-search/people-search.component.ts) | -| [Process comments component](process-comments.component.md) | Displays comments associated with a particular process instance and allows the user to add new comments. | [Source](../../lib/process-services/process-comments/process-comments.component.ts) | -| [Process filters component](process-filters.component.md) | Collection of criteria used to filter process instances, which may be customized by users. | [Source](../../lib/process-services/process-list/components/process-filters.component.ts) | -| [Process instance details component](process-instance-details.component.md) | Displays detailed information about a specified process instance | [Source](../../lib/process-services/process-list/components/process-instance-details.component.ts) | -| [Process instance header component](process-instance-header.component.md) | Sub-component of the process details component, which renders some general information about the selected process. | [Source](../../lib/process-services/process-list/components/process-instance-header.component.ts) | -| [Process instance tasks component](process-instance-tasks.component.md) | Lists both the active and completed tasks associated with a particular process instance | [Source](../../lib/process-services/process-list/components/process-instance-tasks.component.ts) | -| [Process list component](process-list.component.md) | Renders a list containing all the process instances matched by the parameters specified. | [Source](../../lib/process-services/process-list/components/process-list.component.ts) | -| [Start process component](start-process.component.md) | Starts a process. | [Source](../../lib/process-services/process-list/components/start-process.component.ts) | -| [Attach form component](attach-form.component.md) | This component can be used when there is no form attached to a task and you want to add one. | [Source](../../lib/process-services/task-list/components/attach-form.component.ts) | -| [Checklist component](checklist.component.md) | Shows the checklist task functionality. | [Source](../../lib/process-services/task-list/components/checklist.component.ts) | -| [Start task component](start-task.component.md) | Creates/Starts a new task for the specified app. | [Source](../../lib/process-services/task-list/components/start-task.component.ts) | -| [Task details component](task-details.component.md) | Shows the details of the task ID passed in as input. | [Source](../../lib/process-services/task-list/components/task-details.component.ts) | -| [Task filters component](task-filters.component.md) | Shows all available filters. | [Source](../../lib/process-services/task-list/components/task-filters.component.ts) | -| [Task header component](task-header.component.md) | Shows all the information related to a task. | [Source](../../lib/process-services/task-list/components/task-header.component.ts) | -| [Task list component](task-list.component.md) | Renders a list containing all the tasks matched by the parameters specified. | [Source](../../lib/process-services/task-list/components/task-list.component.ts) | -| [Task standalone component](task-standalone.component.md) | This component can be used when the task doesn't belong to any processes. | [Source](../../lib/process-services/task-list/components/task-standalone.component.ts) | - -## Directives - -| Name | Description | Source link | -| ---- | ----------- | ----------- | -| [Process audit directive](process-audit.directive.md) | Fetches the Process Audit information in PDF or JSON format. | [Source](../../lib/process-services/process-list/components/process-audit.directive.ts) | -| [Task audit directive](task-audit.directive.md) | Fetches the Task Audit information in PDF or JSON format. | [Source](../../lib/process-services/task-list/components/task-audit.directive.ts) | - -## Services - -| Name | Description | Source link | -| ---- | ----------- | ----------- | -| [Process filter service](process-filter.service.md) | Manage Process Filters, which are pre-configured Process Instance queries. | [Source](../../lib/process-services/process-list/services/process-filter.service.ts) | -| [Process service](process.service.md) | Manages Process Instances, Process Variables, and Process Audit Log. | [Source](../../lib/process-services/process-list/services/process.service.ts) | -| [Task filter service](task-filter.service.md) | Manage Task Filters, which are pre-configured Task Instance queries. | [Source](../../lib/process-services/task-list/services/task-filter.service.ts) | -| [Tasklist service](tasklist.service.md) | Manages Task Instances. | [Source](../../lib/process-services/task-list/services/tasklist.service.ts) | - - diff --git a/docs/process-services/apps-list.component.md b/docs/process-services/components/apps-list.component.md similarity index 79% rename from docs/process-services/apps-list.component.md rename to docs/process-services/components/apps-list.component.md index 34995b6659..56d1cb9945 100644 --- a/docs/process-services/apps-list.component.md +++ b/docs/process-services/components/apps-list.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Apps List Component](../../lib/process-services/app-list/apps-list.component.ts "Defined in apps-list.component.ts") +# [Apps List Component](../../../lib/process-services/app-list/apps-list.component.ts "Defined in apps-list.component.ts") Shows all available apps. -![how-filter-apps](../docassets/images/how-filter-apps.png) +![how-filter-apps](../../docassets/images/how-filter-apps.png) ## Basic Usage @@ -19,7 +19,7 @@ Shows all available apps. ``` -### [Transclusions](../user-guide/transclusion.md) +### [Transclusions](../../user-guide/transclusion.md) You can show custom content when there are no apps available by supplying an `` section: @@ -46,7 +46,7 @@ You can show custom content when there are no apps available by supplying an | Name | Type | Description | | ---- | ---- | ----------- | -| appClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`AppDefinitionRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>` | Emitted when an app entry is clicked. | +| appClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`AppDefinitionRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>` | Emitted when an app entry is clicked. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs. | ## Details @@ -79,4 +79,4 @@ For example, if you set `filtersAppId` as follows: ...then only the Tasks app, the app with `deploymentId` 15037 and the app with "my app name" will be shown. -![how-filter-apps](../docassets/images/how-filter-apps.png) +![how-filter-apps](../../docassets/images/how-filter-apps.png) diff --git a/docs/process-services/attach-form.component.md b/docs/process-services/components/attach-form.component.md similarity index 87% rename from docs/process-services/attach-form.component.md rename to docs/process-services/components/attach-form.component.md index c1a85863f0..fbf5bc7ddf 100644 --- a/docs/process-services/attach-form.component.md +++ b/docs/process-services/components/attach-form.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-20 --- -# [Attach Form component](../../lib/process-services/task-list/components/attach-form.component.ts "Defined in attach-form.component.ts") +# [Attach Form component](../../../lib/process-services/task-list/components/attach-form.component.ts "Defined in attach-form.component.ts") This component can be used when there is no form attached to a task and you want to add one. diff --git a/docs/process-services/checklist.component.md b/docs/process-services/components/checklist.component.md similarity index 78% rename from docs/process-services/checklist.component.md rename to docs/process-services/components/checklist.component.md index 6e85b205f1..8a4b341e12 100644 --- a/docs/process-services/checklist.component.md +++ b/docs/process-services/components/checklist.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-19 --- -# [Checklist Component](../../lib/process-services/task-list/components/checklist.component.ts "Defined in checklist.component.ts") +# [Checklist Component](../../../lib/process-services/task-list/components/checklist.component.ts "Defined in checklist.component.ts") Shows the checklist task functionality. @@ -33,6 +33,6 @@ Shows the checklist task functionality. | Name | Type | Description | | ---- | ---- | ----------- | -| checklistTaskCreated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` | Emitted when a new checklist task is created. | +| checklistTaskCreated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` | Emitted when a new checklist task is created. | | checklistTaskDeleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a checklist task is deleted. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs. | diff --git a/docs/process-services/create-process-attachment.component.md b/docs/process-services/components/create-process-attachment.component.md similarity index 81% rename from docs/process-services/create-process-attachment.component.md rename to docs/process-services/components/create-process-attachment.component.md index d07906f0bb..9d423a195b 100644 --- a/docs/process-services/create-process-attachment.component.md +++ b/docs/process-services/components/create-process-attachment.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Create Process Attachment component](../../lib/process-services/attachment/create-process-attachment.component.ts "Defined in create-process-attachment.component.ts") +# [Create Process Attachment component](../../../lib/process-services/attachment/create-process-attachment.component.ts "Defined in create-process-attachment.component.ts") Displays an Upload Component (Drag and Click) to upload the attachment to a specified process instance. -![process-create-attachment](../docassets/images/process-create-attachment.png) +![process-create-attachment](../../docassets/images/process-create-attachment.png) ## Basic Usage diff --git a/docs/process-services/create-task-attachment.component.md b/docs/process-services/components/create-task-attachment.component.md similarity index 81% rename from docs/process-services/create-task-attachment.component.md rename to docs/process-services/components/create-task-attachment.component.md index 08e5ad4ae0..80b52e8b6d 100644 --- a/docs/process-services/create-task-attachment.component.md +++ b/docs/process-services/components/create-task-attachment.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Create Task Attachment Component](../../lib/process-services/attachment/create-task-attachment.component.ts "Defined in create-task-attachment.component.ts") +# [Create Task Attachment Component](../../../lib/process-services/attachment/create-task-attachment.component.ts "Defined in create-task-attachment.component.ts") Displays an Upload Component (Drag and Click) to upload the attachment to a specified task. -![task-create-attachment](../docassets/images/task-create-attachment.png) +![task-create-attachment](../../docassets/images/task-create-attachment.png) ## Basic Usage diff --git a/docs/process-services/people-list.component.md b/docs/process-services/components/people-list.component.md similarity index 69% rename from docs/process-services/people-list.component.md rename to docs/process-services/components/people-list.component.md index 5b3d54f54e..9285cb5dde 100644 --- a/docs/process-services/people-list.component.md +++ b/docs/process-services/components/people-list.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [People list component](../../lib/process-services/people/components/people-list/people-list.component.ts "Defined in people-list.component.ts") +# [People list component](../../../lib/process-services/people/components/people-list/people-list.component.ts "Defined in people-list.component.ts") Shows a list of users (people). -![ADF People List](../docassets/images/adf-people-list.png) +![ADF People List](../../docassets/images/adf-people-list.png) ## Basic Usage @@ -44,8 +44,8 @@ export class SomeComponent implements OnInit { } ``` -You can use column templates with the [people list component](../process-services/people-list.component.md), since it is based on the -[Datatable component](../core/datatable.component.md): +You can use column templates with the [people list component](people-list.component.md), since it is based on the +[Datatable component](../../core/datatable.component.md): @@ -79,11 +79,11 @@ You can use column templates with the [people list component](../process-service | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | actions | `boolean` | false | Toggles whether or not actions should be visible, i.e. the 'Three-Dots' menu. | -| users | [`UserProcessModel`](../core/user-process.model.md)`[]` | | The array of user data used to populate the people list. | +| users | [`UserProcessModel`](../../core/user-process.model.md)`[]` | | The array of user data used to populate the people list. | ### Events | Name | Type | Description | | ---- | ---- | ----------- | -| clickAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UserEventModel`](../../lib/process-services/task-list/models/user-event.model.ts)`>` | Emitted when the user clicks in the 'Three Dots' drop down menu for a row. | -| clickRow | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UserProcessModel`](../core/user-process.model.md)`>` | Emitted when the user clicks a row in the people list. | +| clickAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UserEventModel`](../../../lib/process-services/task-list/models/user-event.model.ts)`>` | Emitted when the user clicks in the 'Three Dots' drop down menu for a row. | +| clickRow | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UserProcessModel`](../../core/user-process.model.md)`>` | Emitted when the user clicks a row in the people list. | diff --git a/docs/process-services/people-search.component.md b/docs/process-services/components/people-search.component.md similarity index 77% rename from docs/process-services/people-search.component.md rename to docs/process-services/components/people-search.component.md index 6f426cc29f..2262d8be12 100644 --- a/docs/process-services/people-search.component.md +++ b/docs/process-services/components/people-search.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-14 --- -# [People Search component](../../lib/process-services/people/components/people-search/people-search.component.ts "Defined in people-search.component.ts") +# [People Search component](../../../lib/process-services/people/components/people-search/people-search.component.ts "Defined in people-search.component.ts") Searches users/people. @@ -15,7 +15,7 @@ Searches users/people. ``` -### [Transclusions](../user-guide/transclusion.md) +### [Transclusions](../../user-guide/transclusion.md) You can provide a title for the search header and a label for the action button using special sub-components in the body of the `` element: @@ -33,7 +33,7 @@ special sub-components in the body of the `` element: | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| results | [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../core/user-process.model.md)`[]>` | | Parameters for displaying the list. | +| results | [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`UserProcessModel`](../../core/user-process.model.md)`[]>` | | Parameters for displaying the list. | ### Events @@ -41,7 +41,7 @@ special sub-components in the body of the `` element: | ---- | ---- | ----------- | | closeSearch | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the "close" button is clicked. | | searchPeople | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a search is performed with a new keyword. | -| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UserProcessModel`](../core/user-process.model.md)`>` | Emitted when a user is selected and the action button is clicked. | +| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`UserProcessModel`](../../core/user-process.model.md)`>` | Emitted when a user is selected and the action button is clicked. | ## Details diff --git a/docs/process-services/people.component.md b/docs/process-services/components/people.component.md similarity index 70% rename from docs/process-services/people.component.md rename to docs/process-services/components/people.component.md index 86c636d748..6e1e2a472f 100644 --- a/docs/process-services/people.component.md +++ b/docs/process-services/components/people.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2018-11-19 --- -# [People Component](../../lib/process-services/people/components/people/people.component.ts "Defined in people.component.ts") +# [People Component](../../../lib/process-services/people/components/people/people.component.ts "Defined in people.component.ts") Displays users involved with a specified task -![activiti-people](../docassets/images/activiti_people.png) +![activiti-people](../../docassets/images/activiti_people.png) ## Contents @@ -39,7 +39,7 @@ Displays users involved with a specified task | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| people | [`UserProcessModel`](../core/user-process.model.md)`[]` | \[] | The array of User objects to display. | +| people | [`UserProcessModel`](../../core/user-process.model.md)`[]` | \[] | The array of User objects to display. | | readOnly | `boolean` | false | Should the data be read-only? | | taskId | `string` | "" | The numeric ID of the task. | @@ -47,12 +47,12 @@ Displays users involved with a specified task ### How to customize the people component behavior -The [people component](../process-services/people.component.md) provides two options to customize its behavior: +The [people component](people.component.md) provides two options to customize its behavior: - _involveUserAndCloseSearch_: The selected user gets added and then the search section is closed - _involveUserWithoutCloseSearch_: The selected user gets added without closing the search section -This makes it easy to customize the [people component](../process-services/people.component.md) to involve the user via a single or double click event: +This makes it easy to customize the [people component](people.component.md) to involve the user via a single or double click event: ### Involve People single click and close search @@ -65,7 +65,7 @@ This makes it easy to customize the [people component](../process-services/peopl ``` -![involve-people-single-click-and-close-search](../docassets/images/involve-people-single-click-and-close-search.gif) +![involve-people-single-click-and-close-search](../../docassets/images/involve-people-single-click-and-close-search.gif) ### Involve People single click without close search @@ -78,7 +78,7 @@ This makes it easy to customize the [people component](../process-services/peopl ``` -![involve-people-single-click-without-close-search](../docassets/images/involve-people-single-click-without-close-search.gif) +![involve-people-single-click-without-close-search](../../docassets/images/involve-people-single-click-without-close-search.gif) ### Involve People double click and close search @@ -91,7 +91,7 @@ This makes it easy to customize the [people component](../process-services/peopl ``` -![involve-people-double-click-and-close-search](../docassets/images/involve-people-double-click-and-close-search.gif) +![involve-people-double-click-and-close-search](../../docassets/images/involve-people-double-click-and-close-search.gif) ### Involve People double double without close search @@ -104,4 +104,4 @@ This makes it easy to customize the [people component](../process-services/peopl ``` -![involve-people-double-click-without-close-search](../docassets/images/involve-people-double-click-without-close-search.gif) +![involve-people-double-click-without-close-search](../../docassets/images/involve-people-double-click-without-close-search.gif) diff --git a/docs/process-services/process-attachment-list.component.md b/docs/process-services/components/process-attachment-list.component.md similarity index 76% rename from docs/process-services/process-attachment-list.component.md rename to docs/process-services/components/process-attachment-list.component.md index eb80134a1f..2a6c51b5e8 100644 --- a/docs/process-services/process-attachment-list.component.md +++ b/docs/process-services/components/process-attachment-list.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Process Attachment List component](../../lib/process-services/attachment/process-attachment-list.component.ts "Defined in process-attachment-list.component.ts") +# [Process Attachment List component](../../../lib/process-services/attachment/process-attachment-list.component.ts "Defined in process-attachment-list.component.ts") Displays documents attached to a specified process instance. -![process-attachment-list-sample](../docassets/images/process-attachment-list.png) +![process-attachment-list-sample](../../docassets/images/process-attachment-list.png) ## Basic Usage @@ -20,7 +20,7 @@ Displays documents attached to a specified process instance. ``` -Make sure to override the [`UploadService`](../core/upload.service.md) with the [`ProcessUploadService`](../../lib/process-services/task-list/services/process-upload.service.ts) +Make sure to override the [`UploadService`](../../core/upload.service.md) with the [`ProcessUploadService`](../../../lib/process-services/task-list/services/process-upload.service.ts) ```ts import { UploadService } from '@alfresco/adf-core'; @@ -37,7 +37,7 @@ export class MyCustomProcessAttachmentComponent { } ``` -### [Transclusions](../user-guide/transclusion.md) +### [Transclusions](../../user-guide/transclusion.md) Any content inside the `` element will be shown when the list is empty: @@ -48,11 +48,11 @@ the list is empty: ``` -![custom-no-content-drag-drop-template-sample](../docassets/images/custom-no-content-drag-drop-template.png) +![custom-no-content-drag-drop-template-sample](../../docassets/images/custom-no-content-drag-drop-template.png) A default template will be used if you don't supply a custom one to override it: -![default-no-content-template-sample](../docassets/images/default-no-content-template.png) +![default-no-content-template-sample](../../docassets/images/default-no-content-template.png) ## Class members @@ -67,7 +67,7 @@ A default template will be used if you don't supply a custom one to override it: | Name | Type | Description | | ---- | ---- | ----------- | -| attachmentClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the attachment is double-clicked or the view option is selected from the context menu by the user from within the component. Returns a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) representing the object that was clicked. | +| attachmentClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the attachment is double-clicked or the view option is selected from the context menu by the user from within the component. Returns a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) representing the object that was clicked. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the attachment list is not able to fetch the attachments (eg, following a network error). | | success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | @@ -76,7 +76,7 @@ A default template will be used if you don't supply a custom one to override it: ### How to Add Drag and Drop Functionality You can wrap the attachment list with an -[Upload Drag Area component](../content-services/upload-drag-area.component.md) +[Upload Drag Area component](../../content-services/upload-drag-area.component.md) to let the user upload attachments to empty lists. When you do this, you can also supply a custom _no content template_ (using <adf-empty-list>) to invite the user to add their attachments: diff --git a/docs/process-services/process-comments.component.md b/docs/process-services/components/process-comments.component.md similarity index 83% rename from docs/process-services/process-comments.component.md rename to docs/process-services/components/process-comments.component.md index 08e2519ec6..7977890652 100644 --- a/docs/process-services/process-comments.component.md +++ b/docs/process-services/components/process-comments.component.md @@ -4,7 +4,7 @@ Added: v2.0.0 Status: Active --- -# [Process Instance Comments component](../../lib/process-services/process-comments/process-comments.component.ts "Defined in process-comments.component.ts") +# [Process Instance Comments component](../../../lib/process-services/process-comments/process-comments.component.ts "Defined in process-comments.component.ts") Displays comments associated with a particular process instance and allows the user to add new comments. diff --git a/docs/process-services/process-filters.component.md b/docs/process-services/components/process-filters.component.md similarity index 81% rename from docs/process-services/process-filters.component.md rename to docs/process-services/components/process-filters.component.md index f68e6fcb0c..09f63642ee 100644 --- a/docs/process-services/process-filters.component.md +++ b/docs/process-services/components/process-filters.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-09-14 --- -# [Process Filters Component](../../lib/process-services/process-list/components/process-filters.component.ts "Defined in process-filters.component.ts") +# [Process Filters Component](../../../lib/process-services/process-list/components/process-filters.component.ts "Defined in process-filters.component.ts") Collection of criteria used to filter process instances, which may be customized by users. @@ -17,7 +17,7 @@ Collection of criteria used to filter process instances, which may be customized - [Events](#events) - [Details](#details) - [How filter the activiti process filters](#how-filter-the-activiti-process-filters) - - [FilterParamsModel](#filterparamsmodel) + - [`FilterParamsModel`](../../../lib/process-services/task-list/models/filter.model.ts) - [See also](#see-also) ## Basic Usage @@ -36,7 +36,7 @@ Collection of criteria used to filter process instances, which may be customized | ---- | ---- | ------------- | ----------- | | appId | `number` | | Display filters available to the current user for the application with the specified ID. | | appName | `string` | | Display filters available to the current user for the application with the specified name. | -| filterParam | [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) | | The parameters to filter the task filter. If there is no match then the default one (ie, the first filter in the list) is selected. | +| filterParam | [`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts) | | The parameters to filter the task filter. If there is no match then the default one (ie, the first filter in the list) is selected. | | showIcon | `boolean` | true | Toggle to show or hide the filter's icon. | ### Events @@ -66,7 +66,7 @@ If both `appId` and `appName` are specified then `appName` will take precedence ``` -You can use inside the filterParam one of the properties defined by [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) (see below). +You can use inside the filterParam one of the properties defined by [`FilterParamsModel`](../../../lib/process-services/task-list/models/filter.model.ts) (see below). ### FilterParamsModel @@ -86,4 +86,4 @@ You can use inside the filterParam one of the properties defined by [`FilterPara ## See also -- [Process Filter service](process-filter.service.md) +- [Process Filter service](../services/process-filter.service.md) diff --git a/docs/process-services/process-instance-details.component.md b/docs/process-services/components/process-instance-details.component.md similarity index 80% rename from docs/process-services/process-instance-details.component.md rename to docs/process-services/components/process-instance-details.component.md index e2ce81f58d..f34fafd3e7 100644 --- a/docs/process-services/process-instance-details.component.md +++ b/docs/process-services/components/process-instance-details.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-19 --- -# [Process Details component](../../lib/process-services/process-list/components/process-instance-details.component.ts "Defined in process-instance-details.component.ts") +# [Process Details component](../../../lib/process-services/process-list/components/process-instance-details.component.ts "Defined in process-instance-details.component.ts") Displays detailed information about a specified process instance @@ -34,4 +34,4 @@ Displays detailed information about a specified process instance | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs. | | processCancelled | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the current process is cancelled by the user from within the component. | | showProcessDiagram | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the "show diagram" button is clicked. | -| taskClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsEvent`](../../lib/process-services/task-list/models/task-details.event.ts)`>` | Emitted when a task is clicked. | +| taskClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsEvent`](../../../lib/process-services/task-list/models/task-details.event.ts)`>` | Emitted when a task is clicked. | diff --git a/docs/process-services/process-instance-header.component.md b/docs/process-services/components/process-instance-header.component.md similarity index 68% rename from docs/process-services/process-instance-header.component.md rename to docs/process-services/components/process-instance-header.component.md index 1ff061e3c5..d36238d702 100644 --- a/docs/process-services/process-instance-header.component.md +++ b/docs/process-services/components/process-instance-header.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Process Instance Details Header component](../../lib/process-services/process-list/components/process-instance-header.component.ts "Defined in process-instance-header.component.ts") +# [Process Instance Details Header component](../../../lib/process-services/process-list/components/process-instance-header.component.ts "Defined in process-instance-header.component.ts") Sub-component of the process details component, which renders some general information about the selected process. -![adf-process-instance-header](../docassets/images/adf-process-instance-header-attachment.png) +![adf-process-instance-header](../../docassets/images/adf-process-instance-header-attachment.png) ## Basic Usage @@ -25,7 +25,7 @@ Sub-component of the process details component, which renders some general infor | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| processInstance | [`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts) | | (**required**) Full details of the process instance to display information about. | +| processInstance | [`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts) | | (**required**) Full details of the process instance to display information about. | ## Details diff --git a/docs/process-services/process-instance-tasks.component.md b/docs/process-services/components/process-instance-tasks.component.md similarity index 63% rename from docs/process-services/process-instance-tasks.component.md rename to docs/process-services/components/process-instance-tasks.component.md index 2a01920dac..3872d59229 100644 --- a/docs/process-services/process-instance-tasks.component.md +++ b/docs/process-services/components/process-instance-tasks.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-19 --- -# [Process Instance Tasks component](../../lib/process-services/process-list/components/process-instance-tasks.component.ts "Defined in process-instance-tasks.component.ts") +# [Process Instance Tasks component](../../../lib/process-services/process-list/components/process-instance-tasks.component.ts "Defined in process-instance-tasks.component.ts") Lists both the active and completed tasks associated with a particular process instance @@ -24,7 +24,7 @@ Lists both the active and completed tasks associated with a particular process i | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| processInstanceDetails | [`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts) | | (**required**) The ID of the process instance to display tasks for. | +| processInstanceDetails | [`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts) | | (**required**) The ID of the process instance to display tasks for. | | showRefreshButton | `boolean` | true | Toggles whether to show a refresh button next to the list of tasks to allow it to be updated from the server. | ### Events @@ -32,4 +32,4 @@ Lists both the active and completed tasks associated with a particular process i | Name | Type | Description | | ---- | ---- | ----------- | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs. | -| taskClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsEvent`](../../lib/process-services/task-list/models/task-details.event.ts)`>` | Emitted when a task is clicked. | +| taskClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsEvent`](../../../lib/process-services/task-list/models/task-details.event.ts)`>` | Emitted when a task is clicked. | diff --git a/docs/process-services/process-list.component.md b/docs/process-services/components/process-list.component.md similarity index 86% rename from docs/process-services/process-list.component.md rename to docs/process-services/components/process-list.component.md index 6ad3f48ff7..5acd665ba5 100644 --- a/docs/process-services/process-list.component.md +++ b/docs/process-services/components/process-list.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2019-01-16 --- -# [Process Instance List](../../lib/process-services/process-list/components/process-list.component.ts "Defined in process-list.component.ts") +# [Process Instance List](../../../lib/process-services/process-list/components/process-list.component.ts "Defined in process-list.component.ts") Renders a list containing all the process instances matched by the parameters specified. @@ -32,7 +32,7 @@ Renders a list containing all the process instances matched by the parameters sp ``` -### [Transclusions](../user-guide/transclusion.md) +### [Transclusions](../../user-guide/transclusion.md) Any content inside an `` sub-component will be shown when the process list is empty: @@ -52,7 +52,7 @@ when the process list is empty: | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | appId | `number` | | The id of the app. | -| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. | +| data | [`DataTableAdapter`](../../../lib/core/datatable/data/datatable-adapter.ts) | | Data source to define the datatable. | | multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row | | page | `number` | 0 | The page number of the processes to fetch. | | presetColumn | `string` | | Custom preset column schema in JSON format. | @@ -70,7 +70,7 @@ when the process list is empty: | ---- | ---- | ----------- | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs while loading the list of process instances from the server. | | rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a row in the process list is clicked. | -| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessListModel`](../../lib/process-services/process-list/models/process-list.model.ts)`>` | Emitted when the list of process instances has been loaded successfully from the server. | +| success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessListModel`](../../../lib/process-services/process-list/models/process-list.model.ts)`>` | Emitted when the list of process instances has been loaded successfully from the server. | ## Details @@ -107,7 +107,7 @@ You can define a custom schema for the list in the `app.config.json` file and ac ``` You can also define the schema in the HTML using the -[Data column component](../core/data-column.component.md). You can combine this with schema +[Data column component](../../core/data-column.component.md). You can combine this with schema information defined in `app.config.json` as in the example below: ```json @@ -186,6 +186,6 @@ The Process Instance List also supports pagination: ## See also -- [Data column component](../core/data-column.component.md) -- [Data Table Adapter interface](../core/datatable-adapter.interface.md) -- [Pagination component](../core/pagination.component.md) +- [Data column component](../../core/data-column.component.md) +- [Data Table Adapter interface](../../core/datatable-adapter.interface.md) +- [Pagination component](../../core/pagination.component.md) diff --git a/docs/process-services/select-apps-dialog.component.md b/docs/process-services/components/select-apps-dialog.component.md similarity index 75% rename from docs/process-services/select-apps-dialog.component.md rename to docs/process-services/components/select-apps-dialog.component.md index ebf656fc86..383207998d 100644 --- a/docs/process-services/select-apps-dialog.component.md +++ b/docs/process-services/components/select-apps-dialog.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Select App Component](../../lib/process-services/app-list/select-apps-dialog-component.ts "Defined in select-apps-dialog-component.ts") +# [Select App Component](../../../lib/process-services/app-list/select-apps-dialog-component.ts "Defined in select-apps-dialog-component.ts") Shows all available apps and returns the selected app. -![select-apps-dialog](../docassets/images/select-apps-dialog.png) +![select-apps-dialog](../../docassets/images/select-apps-dialog.png) ## Basic Usage diff --git a/docs/process-services/start-process.component.md b/docs/process-services/components/start-process.component.md similarity index 80% rename from docs/process-services/start-process.component.md rename to docs/process-services/components/start-process.component.md index d497d70ac9..fb1e5cee29 100644 --- a/docs/process-services/start-process.component.md +++ b/docs/process-services/components/start-process.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Start Process component](../../lib/process-services/process-list/components/start-process.component.ts "Defined in start-process.component.ts") +# [Start Process component](../../../lib/process-services/process-list/components/start-process.component.ts "Defined in start-process.component.ts") Starts a process. -![adf-start-process ](../docassets/images/startProcess.png) +![adf-start-process ](../../docassets/images/startProcess.png) ## Contents @@ -43,16 +43,16 @@ Starts a process. | processDefinitionName | `string` | | (optional) Definition name of the process to start. | | processFilterSelector | `boolean` | true | (optional) Parameter to enable selection of process when filtering. | | showSelectProcessDropdown | `boolean` | true | Hide or show the process selection dropdown. | -| values | [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) | | Parameter to pass form field values in the start form if one is associated. | -| variables | [`ProcessInstanceVariable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]` | | Variables in the input to the process [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md). | +| values | [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts) | | Parameter to pass form field values in the start form if one is associated. | +| variables | [`ProcessInstanceVariable`](../../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]` | | Variables in the input to the process [RestVariable](https://github.com/Alfresco/alfresco-js-api/tree/master/src/alfresco-activiti-rest-api/docs/RestVariable.md). | ### Events | Name | Type | Description | | ---- | ---- | ----------- | -| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts)`>` | Emitted when the process is canceled. | -| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts)`>` | Emitted when an error occurs. | -| start | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts)`>` | Emitted when the process starts. | +| cancel | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts)`>` | Emitted when the process is canceled. | +| error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts)`>` | Emitted when an error occurs. | +| start | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts)`>` | Emitted when the process starts. | ## Details @@ -170,7 +170,7 @@ Note that in the object above, the key `file` is the name of the attach file fie The result will be the start form prefilled with the file data: -![Start process load file](../docassets/images/start_process.png) +![Start process load file](../../docassets/images/start_process.png) ## See also diff --git a/docs/process-services/start-task.component.md b/docs/process-services/components/start-task.component.md similarity index 82% rename from docs/process-services/start-task.component.md rename to docs/process-services/components/start-task.component.md index f7e0d36af0..eb757644d2 100644 --- a/docs/process-services/start-task.component.md +++ b/docs/process-services/components/start-task.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Start Task Component](../../lib/process-services/task-list/components/start-task.component.ts "Defined in start-task.component.ts") +# [Start Task Component](../../../lib/process-services/task-list/components/start-task.component.ts "Defined in start-task.component.ts") Creates/Starts a new task for the specified app. -![adf-start-task](../docassets/images/adf-start-task.png) +![adf-start-task](../../docassets/images/adf-start-task.png) ## Basic Usage diff --git a/docs/process-services/task-attachment-list.component.md b/docs/process-services/components/task-attachment-list.component.md similarity index 68% rename from docs/process-services/task-attachment-list.component.md rename to docs/process-services/components/task-attachment-list.component.md index 50d522b5cb..86240227a5 100644 --- a/docs/process-services/task-attachment-list.component.md +++ b/docs/process-services/components/task-attachment-list.component.md @@ -5,11 +5,22 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Task Attachment List Component](../../lib/process-services/attachment/task-attachment-list.component.ts "Defined in task-attachment-list.component.ts") +# [Task Attachment List Component](../../../lib/process-services/attachment/task-attachment-list.component.ts "Defined in task-attachment-list.component.ts") Displays documents attached to a specified task. -![task-attachment-list-sample](../docassets/images/task-attachment-list.png) +![task-attachment-list-sample](../../docassets/images/task-attachment-list.png) + +## Contents + +- [Basic Usage](#basic-usage) + - [Transclusions](#transclusions) +- [Class members](#class-members) + - [Properties](#properties) + - [Events](#events) +- [Details](#details) + - [How to Add Drag and Drop Functionality](#how-to-add-drag-and-drop-functionality) +- [See also](#see-also) ## Basic Usage @@ -20,7 +31,7 @@ Displays documents attached to a specified task. ``` -### [Transclusions](../user-guide/transclusion.md) +### [Transclusions](../../user-guide/transclusion.md) Any content inside the `` element will be displayed when the list is empty: @@ -31,11 +42,11 @@ when the list is empty: ``` -![custom-no-content-drag-drop-template-sample](../docassets/images/custom-no-content-drag-drop-template.png) +![custom-no-content-drag-drop-template-sample](../../docassets/images/custom-no-content-drag-drop-template.png) A default "no content" template is displayed if you don't supply one to override it: -![default-no-content-template-sample](../docassets/images/default-no-content-template.png) +![default-no-content-template-sample](../../docassets/images/default-no-content-template.png) ## Class members @@ -43,14 +54,14 @@ A default "no content" template is displayed if you don't supply one to override | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | -| disabled | `boolean` | false | Disable/Enable read only mode for attachement list. | +| disabled | `boolean` | false | Disable/Enable read only mode for attachment list. | | taskId | `string` | | (**required**) The ID of the task to display. | ### Events | Name | Type | Description | | ---- | ---- | ----------- | -| attachmentClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the attachment is double-clicked or a view option is selected from the context menu by the user from within the component. Returns a [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) representing the clicked object. | +| attachmentClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the attachment is double-clicked or a view option is selected from the context menu by the user from within the component. Returns a [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) representing the clicked object. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs while fetching the attachments. | | success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the attachment list has fetched all the attachments. Returns a list of attachments. | @@ -58,7 +69,7 @@ A default "no content" template is displayed if you don't supply one to override ### How to Add Drag and Drop Functionality -You can wrap the component with an [Upload Drag Area component](../content-services/upload-drag-area.component.md) +You can wrap the component with an [Upload Drag Area component](../../content-services/upload-drag-area.component.md) to enable the user to upload attachments for empty lists. When you do this, you can also pass a custom _no content template_ as shown below. The component invites the user to drag files to upload whenever the list is empty. @@ -89,7 +100,7 @@ import { UploadService } from '@alfresco/adf-core'; import { TaskUploadService } from '@alfresco/adf-process-services'; ``` -Make sure you override the [`UploadService`](../core/upload.service.md) with the [`TaskUploadService`](../../lib/process-services/task-list/services/task-upload.service.ts) +Make sure you override the [`UploadService`](../../core/upload.service.md) with the [`TaskUploadService`](../../../lib/process-services/task-list/services/task-upload.service.ts) ```ts @Component({ @@ -105,4 +116,4 @@ export class MyCustomTaskAttachmentComponent { ## See also -- [Upload Drag Area Component](../content-services/upload-drag-area.component.md) +- [Upload Drag Area Component](../../content-services/upload-drag-area.component.md) diff --git a/docs/process-services/task-details.component.md b/docs/process-services/components/task-details.component.md similarity index 68% rename from docs/process-services/task-details.component.md rename to docs/process-services/components/task-details.component.md index e49141ac8d..46e4fb37fd 100644 --- a/docs/process-services/task-details.component.md +++ b/docs/process-services/components/task-details.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-13 --- -# [Task Details component](../../lib/process-services/task-list/components/task-details.component.ts "Defined in task-details.component.ts") +# [Task Details component](../../../lib/process-services/task-list/components/task-details.component.ts "Defined in task-details.component.ts") Shows the details of the task ID passed in as input. @@ -24,7 +24,7 @@ Shows the details of the task ID passed in as input. | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | debugMode | `boolean` | false | Toggles debug mode. | -| fieldValidators | `FormFieldValidator[]` | \[] | Field validators for use with the form. | +| fieldValidators | [`FormFieldValidator`](../../../lib/core/form/components/widgets/core/form-field-validator.ts)`[]` | \[] | Field validators for use with the form. | | readOnlyForm | `boolean` | false | Toggles read-only state of the form. All form widgets render as read-only if enabled. | | showChecklist | `boolean` | true | Toggles `Checklist` feature for the Header component. | | showComments | `boolean` | true | Toggles `Comments` feature for the Header component. | @@ -45,12 +45,12 @@ Shows the details of the task ID passed in as input. | assignTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a task is assigned. | | claimedTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a task is claimed. | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an 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 the form field content is clicked. | -| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. | -| formSaved | [`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 `Save` or custom outcomes. | -| taskCreated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` | Emitted when a checklist task is created. | +| 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 the form field content is clicked. | +| formLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FormModel`](../../../lib/core/form/components/widgets/core/form.model.ts)`>` | Emitted when the form is loaded or reloaded. | +| formSaved | [`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 `Save` or custom outcomes. | +| taskCreated | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` | Emitted when a checklist task is created. | | taskDeleted | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a checklist task is deleted. | | unClaimedTask | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when a task is unclaimed. | @@ -58,7 +58,7 @@ Shows the details of the task ID passed in as input. ### Custom 'empty Task Details' template -By default the [Task Details component](../process-services/task-details.component.md) shows a simple "No Tasks" message when there are +By default the [Task Details component](task-details.component.md) shows a simple "No Tasks" message when there are no details. You can change this by adding the a custom HTML template as in the following example: diff --git a/docs/process-services/task-filters.component.md b/docs/process-services/components/task-filters.component.md similarity index 70% rename from docs/process-services/task-filters.component.md rename to docs/process-services/components/task-filters.component.md index 5cd5fb17ab..985caada3d 100644 --- a/docs/process-services/task-filters.component.md +++ b/docs/process-services/components/task-filters.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-16 --- -# [Task Filters component](../../lib/process-services/task-list/components/task-filters.component.ts "Defined in task-filters.component.ts") +# [Task Filters component](../../../lib/process-services/task-list/components/task-filters.component.ts "Defined in task-filters.component.ts") Shows all available filters. @@ -23,7 +23,7 @@ Shows all available filters. | ---- | ---- | ------------- | ----------- | | appId | `number` | | Display filters available to the current user for the application with the specified ID. | | appName | `string` | | Display filters available to the current user for the application with the specified name. | -| filterParam | [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) | | Parameters to use for the task filter. If there is no match then the default filter (the first one the list) is selected. | +| filterParam | [`FilterParamsModel`](../../../lib/process-services/task-list/models/filter.model.ts) | | Parameters to use for the task filter. If there is no match then the default filter (the first one the list) is selected. | | showIcon | `boolean` | | Toggles display of the filter's icon. | ### Events @@ -31,7 +31,7 @@ Shows all available filters. | Name | Type | Description | | ---- | ---- | ----------- | | error | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when an error occurs during loading. | -| filterClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>` | Emitted when a filter in the list is clicked. | +| filterClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>` | Emitted when a filter in the list is clicked. | | success | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the list is loaded. | ## Details @@ -46,7 +46,7 @@ Use the `filterParam` property to restrict the range of filters that are shown: ``` -You can use properties from [`FilterParamsModel`](../../lib/process-services/task-list/models/filter.model.ts) +You can use properties from [`FilterParamsModel`](../../../lib/process-services/task-list/models/filter.model.ts) as the value of `filterParam` as shown in the table below: | Name | Type | Description | diff --git a/docs/process-services/task-header.component.md b/docs/process-services/components/task-header.component.md similarity index 74% rename from docs/process-services/task-header.component.md rename to docs/process-services/components/task-header.component.md index d8fdcfae32..da86044973 100644 --- a/docs/process-services/task-header.component.md +++ b/docs/process-services/components/task-header.component.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Task Header component](../../lib/process-services/task-list/components/task-header.component.ts "Defined in task-header.component.ts") +# [Task Header component](../../../lib/process-services/task-list/components/task-header.component.ts "Defined in task-header.component.ts") Shows all the information related to a task. -![adf-task-header](../docassets/images/adf-task-header.png) +![adf-task-header](../../docassets/images/adf-task-header.png) ## Basic Usage @@ -26,7 +26,7 @@ Shows all the information related to a task. | Name | Type | Default value | Description | | ---- | ---- | ------------- | ----------- | | formName | `string` | null | The name of the form. | -| taskDetails | [`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts) | | (required) Details related to the task. | +| taskDetails | [`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts) | | (required) Details related to the task. | ### Events @@ -38,7 +38,7 @@ Shows all the information related to a task. ## Details The component populates an internal array of -[CardViewModel](../core/card-view.component.md) with the information that we want to display. +[CardViewModel](../../core/card-view.component.md) with the information that we want to display. By default all properties are displayed: diff --git a/docs/process-services/task-list.component.md b/docs/process-services/components/task-list.component.md similarity index 87% rename from docs/process-services/task-list.component.md rename to docs/process-services/components/task-list.component.md index c0209b31a9..c000bb2755 100644 --- a/docs/process-services/task-list.component.md +++ b/docs/process-services/components/task-list.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2019-02-08 --- -# [Task List component](../../lib/process-services/task-list/components/task-list.component.ts "Defined in task-list.component.ts") +# [Task List component](../../../lib/process-services/task-list/components/task-list.component.ts "Defined in task-list.component.ts") Renders a list containing all the tasks matched by the parameters specified. @@ -34,7 +34,7 @@ Renders a list containing all the tasks matched by the parameters specified. ``` -### [Transclusions](../user-guide/transclusion.md) +### [Transclusions](../../user-guide/transclusion.md) Any content inside an `` sub-component will be shown when the task list is empty: @@ -55,7 +55,7 @@ when the task list is empty: | ---- | ---- | ------------- | ----------- | | appId | `number` | | The id of the app. | | assignment | `string` | | The assignment of the process. Possible values are: "assignee" (the current user is the assignee), "candidate" (the current user is a task candidate, "group_x" (the task is assigned to a group where the current user is a member, no value (the current user is involved). | -| data | [`DataTableAdapter`](../../lib/core/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. | +| data | [`DataTableAdapter`](../../../lib/core/datatable/data/datatable-adapter.ts) | | Data source object that represents the number and the type of the columns that you want to show. | | dueAfter | `string` | | Filter the tasks. Display only tasks with `created_date` after `dueAfter`. | | dueBefore | `string` | | Filter the tasks. Display only tasks with `created_date` before `dueBefore`. | | includeProcessInstance | `boolean` | | Toggles inclusion of Process Instances | @@ -209,8 +209,8 @@ The Tasklist also supports pagination as shown in the example below: ### DataTableAdapter example -See the [Data Table Adapter interface](../core/datatable-adapter.interface.md) page for full details of the interface and its standard -implementation, [`ObjectDataTableAdapter`](../../lib/core/datatable/data/object-datatable-adapter.ts). Below is an example of how you can set up the adapter for a +See the [Data Table Adapter interface](../../core/datatable-adapter.interface.md) page for full details of the interface and its standard +implementation, [`ObjectDataTableAdapter`](../../../lib/core/datatable/data/object-datatable-adapter.ts). Below is an example of how you can set up the adapter for a typical tasklist. ```json @@ -224,10 +224,10 @@ typical tasklist. ### DataColumn Features -You can customize the styling of a column and also add features like tooltips and automatic translation of column titles. See the [Data Column component](../../lib/core/datatable/data/data-column.model.ts) page for more information about these features. +You can customize the styling of a column and also add features like tooltips and automatic translation of column titles. See the [Data Column component](../../core/data-column.component.md) page for more information about these features. ## See also -- [Data column component](../core/data-column.component.md) -- [Data Table Adapter interface](../core/datatable-adapter.interface.md) -- [Pagination component](../core/pagination.component.md) +- [Data column component](../../core/data-column.component.md) +- [Data Table Adapter interface](../../core/datatable-adapter.interface.md) +- [Pagination component](../../core/pagination.component.md) diff --git a/docs/process-services/task-standalone.component.md b/docs/process-services/components/task-standalone.component.md similarity index 89% rename from docs/process-services/task-standalone.component.md rename to docs/process-services/components/task-standalone.component.md index 4f78441daf..e86381dd45 100644 --- a/docs/process-services/task-standalone.component.md +++ b/docs/process-services/components/task-standalone.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-19 --- -# [Task Standalone component](../../lib/process-services/task-list/components/task-standalone.component.ts "Defined in task-standalone.component.ts") +# [Task Standalone component](../../../lib/process-services/task-list/components/task-standalone.component.ts "Defined in task-standalone.component.ts") This component can be used when the task doesn't belong to any processes. diff --git a/docs/process-services/process-audit.directive.md b/docs/process-services/directives/process-audit.directive.md similarity index 83% rename from docs/process-services/process-audit.directive.md rename to docs/process-services/directives/process-audit.directive.md index e531028726..2500f6ab42 100644 --- a/docs/process-services/process-audit.directive.md +++ b/docs/process-services/directives/process-audit.directive.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Process Audit Directive](../../lib/process-services/process-list/components/process-audit.directive.ts "Defined in process-audit.directive.ts") +# [Process Audit Directive](../../../lib/process-services/process-list/components/process-audit.directive.ts "Defined in process-audit.directive.ts") Fetches the Process Audit information in PDF or JSON format. -![adf-process-audit-directive](../docassets/images/adf-process-audit-directive.png) +![adf-process-audit-directive](../../docassets/images/adf-process-audit-directive.png) ## Basic Usage diff --git a/docs/process-services/task-audit.directive.md b/docs/process-services/directives/task-audit.directive.md similarity index 84% rename from docs/process-services/task-audit.directive.md rename to docs/process-services/directives/task-audit.directive.md index 391327cc72..688e00d89d 100644 --- a/docs/process-services/task-audit.directive.md +++ b/docs/process-services/directives/task-audit.directive.md @@ -5,11 +5,11 @@ Status: Active Last reviewed: 2019-01-14 --- -# [Task Audit Directive](../../lib/process-services/task-list/components/task-audit.directive.ts "Defined in task-audit.directive.ts") +# [Task Audit Directive](../../../lib/process-services/task-list/components/task-audit.directive.ts "Defined in task-audit.directive.ts") Fetches the Task Audit information in PDF or JSON format. -![adf-task-audit-directive](../docassets/images/adf-task-audit-directive.png) +![adf-task-audit-directive](../../docassets/images/adf-task-audit-directive.png) ## Basic Usage diff --git a/docs/process-services/process-filter.service.md b/docs/process-services/services/process-filter.service.md similarity index 63% rename from docs/process-services/process-filter.service.md rename to docs/process-services/services/process-filter.service.md index a2f195ec55..a77588b9e7 100644 --- a/docs/process-services/process-filter.service.md +++ b/docs/process-services/services/process-filter.service.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-13 --- -# [Process Filter Service](../../lib/process-services/process-list/services/process-filter.service.ts "Defined in process-filter.service.ts") +# [Process Filter Service](../../../lib/process-services/process-list/services/process-filter.service.ts "Defined in process-filter.service.ts") Manage Process Filters, which are pre-configured Process Instance queries. @@ -13,41 +13,41 @@ Manage Process Filters, which are pre-configured Process Instance queries. ### Methods -- **addProcessFilter**(filter: [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`>`
+- **addProcessFilter**(filter: [`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`>`
Adds a filter. - - _filter:_ [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) - The filter to add - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`>` - The filter just added + - _filter:_ [`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts) - The filter to add + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`>` - The filter just added - **callApiProcessFilters**(appId?: `number`): `any`
Calls `getUserProcessInstanceFilters` from the Alfresco JS API. - _appId:_ `number` - (Optional) ID of the target app - **Returns** `any` - List of filter details -- **createDefaultFilters**(appId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`[]>`
+- **createDefaultFilters**(appId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`[]>`
Creates and returns the default filters for an app. - _appId:_ `number` - ID of the target app - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`[]>` - Default filters just created -- **getProcessFilterById**(filterId: `number`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`[]>` - Default filters just created +- **getProcessFilterById**(filterId: `number`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`>`
Retrieves the process filter by ID. - _filterId:_ `number` - ID of the filter - _appId:_ `number` - (Optional) ID of the target app - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`>` - Details of the filter -- **getProcessFilterByName**(filterName: `string`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`>` - Details of the filter +- **getProcessFilterByName**(filterName: `string`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`>`
Retrieves the process filter by name. - _filterName:_ `string` - Name of the filter - _appId:_ `number` - (Optional) ID of the target app - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`>` - Details of the filter -- **getProcessFilters**(appId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`[]>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`>` - Details of the filter +- **getProcessFilters**(appId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`[]>`
Gets all filters defined for a Process App. - _appId:_ `number` - ID of the target app - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)`[]>` - Array of filter details -- **getRunningFilterInstance**(appId: `number`): [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts)
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)`[]>` - Array of filter details +- **getRunningFilterInstance**(appId: `number`): [`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts)
Creates and returns a filter that matches "running" process instances. - _appId:_ `number` - ID of the target app - - **Returns** [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) - Filter just created + - **Returns** [`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts) - Filter just created ## Details The methods of this service generally return an instance of -[`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) or an array of instances. For example, you +[`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts) or an array of instances. For example, you could use `getProcessFilters` as follows: ```ts @@ -60,7 +60,7 @@ this.processFilterService.getProcessFilters(processAppId) }); ``` -The response is an array of [`FilterProcessRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) objects: +The response is an array of [`FilterProcessRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts) objects: filters: 0: {id: 15, appId: 2, name: "Running", recent: true, icon: "glyphicon-random", …} @@ -75,5 +75,5 @@ such as 'Running', 'Completed', 'All', etc. ## See also -- [Process Filters component](process-filters.component.md) +- [Process Filters component](../components/process-filters.component.md) - [Task Filter service](task-filter.service.md) diff --git a/docs/process-services/process.service.md b/docs/process-services/services/process.service.md similarity index 67% rename from docs/process-services/process.service.md rename to docs/process-services/services/process.service.md index 0a8b54b7f2..11144f8308 100644 --- a/docs/process-services/process.service.md +++ b/docs/process-services/services/process.service.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-03-20 --- -# [Process Service](../../lib/process-services/process-list/services/process.service.ts "Defined in process.service.ts") +# [Process Service](../../../lib/process-services/process-list/services/process.service.ts "Defined in process.service.ts") Manages Process Instances, Process Variables, and Process Audit Log. @@ -17,11 +17,11 @@ Manages Process Instances, Process Variables, and Process Audit Log. Cancels a process instance. - _processInstanceId:_ `string` - ID of process to cancel - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`` - Null response notifying when the operation is complete -- **createOrUpdateProcessInstanceVariables**(processInstanceId: `string`, variables: `RestVariable[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>`
+- **createOrUpdateProcessInstanceVariables**(processInstanceId: `string`, variables: `RestVariable[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>`
Creates or updates variables for a process instance. - _processInstanceId:_ `string` - ID of the target process - _variables:_ `RestVariable[]` - Variables to update - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>` - Array of instance variable info + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>` - Array of instance variable info - **deleteProcessInstanceVariable**(processInstanceId: `string`, variableName: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)``
Deletes a variable for a process instance. - _processInstanceId:_ `string` - ID of the target process @@ -35,41 +35,41 @@ Manages Process Instances, Process Variables, and Process Audit Log. Fetches the Process Audit information as a PDF. - _processId:_ `string` - ID of the target process - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary PDF data -- **getProcess**(processInstanceId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts)`>`
+- **getProcess**(processInstanceId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts)`>`
Gets Process Instance metadata. - _processInstanceId:_ `string` - ID of the target process - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts)`>` - Metadata for the instance -- **getProcessDefinitions**(appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionRepresentation`](../../lib/process-services/process-list/models/process-definition.model.ts)`[]>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts)`>` - Metadata for the instance +- **getProcessDefinitions**(appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionRepresentation`](../../../lib/process-services/process-list/models/process-definition.model.ts)`[]>`
Gets process definitions associated with an app. - _appId:_ `number` - (Optional) ID of a target app - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionRepresentation`](../../lib/process-services/process-list/models/process-definition.model.ts)`[]>` - Array of process definitions -- **getProcessInstanceVariables**(processInstanceId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessDefinitionRepresentation`](../../../lib/process-services/process-list/models/process-definition.model.ts)`[]>` - Array of process definitions +- **getProcessInstanceVariables**(processInstanceId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>`
Gets the variables for a process instance. - _processInstanceId:_ `string` - ID of the target process - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>` - Array of instance variable info -- **getProcessInstances**(requestNode: [`ProcessFilterParamRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts), processDefinitionKey?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../lib/process-services/process-list/models/process-list.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstanceVariable`](../../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]>` - Array of instance variable info +- **getProcessInstances**(requestNode: [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts), processDefinitionKey?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../../lib/process-services/process-list/models/process-list.model.ts)`>`
Gets process instances for a filter and optionally a process definition. - - _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) - Filter for instances + - _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts) - Filter for instances - _processDefinitionKey:_ `string` - (Optional) Limits returned instances to a process definition - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../lib/process-services/process-list/models/process-list.model.ts)`>` - List of process instances -- **getProcessTasks**(processInstanceId: `string`, state?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`[]>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../../lib/process-services/process-list/models/process-list.model.ts)`>` - List of process instances +- **getProcessTasks**(processInstanceId: `string`, state?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`[]>`
Gets task instances for a process instance. - _processInstanceId:_ `string` - ID of the process instance - _state:_ `string` - (Optional) Task state filter (can be "active" or "completed") - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`[]>` - Array of task instance details -- **getProcesses**(requestNode: [`ProcessFilterParamRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts), processDefinitionKey?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../lib/process-services/process-list/models/process-list.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`[]>` - Array of task instance details +- **getProcesses**(requestNode: [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts), processDefinitionKey?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../../lib/process-services/process-list/models/process-list.model.ts)`>`
Gets processes for a filter and optionally a process definition. - - _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../lib/process-services/process-list/models/filter-process.model.ts) - Filter for instances + - _requestNode:_ [`ProcessFilterParamRepresentationModel`](../../../lib/process-services/process-list/models/filter-process.model.ts) - Filter for instances - _processDefinitionKey:_ `string` - (Optional) Limits returned instances to a process definition - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../lib/process-services/process-list/models/process-list.model.ts)`>` - List of processes -- **startProcess**(processDefinitionId: `string`, name: `string`, outcome?: `string`, startFormValues?: [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts), variables?: [`ProcessInstanceVariable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessListModel`](../../../lib/process-services/process-list/models/process-list.model.ts)`>` - List of processes +- **startProcess**(processDefinitionId: `string`, name: `string`, outcome?: `string`, startFormValues?: [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts), variables?: [`ProcessInstanceVariable`](../../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts)`>`
Starts a process based on a process definition, name, form values or variables. - _processDefinitionId:_ `string` - Process definition ID - _name:_ `string` - Process name - _outcome:_ `string` - (Optional) Process outcome - - _startFormValues:_ [`FormValues`](../../lib/core/form/components/widgets/core/form-values.ts) - (Optional) Values for the start form - - _variables:_ [`ProcessInstanceVariable`](../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]` - (Optional) Array of process instance variables - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts)`>` - Details of the process instance just started + - _startFormValues:_ [`FormValues`](../../../lib/core/form/components/widgets/core/form-values.ts) - (Optional) Values for the start form + - _variables:_ [`ProcessInstanceVariable`](../../../lib/process-services/process-list/models/process-instance-variable.model.ts)`[]` - (Optional) Array of process instance variables + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts)`>` - Details of the process instance just started ## Details @@ -113,7 +113,7 @@ this.processService.startProcess(processDefinitionId, name, outcome, startFormVa }); ``` -A [`ProcessInstance`](../../lib/process-services/process-list/models/process-instance.model.ts) object is returned for a successfully started process. This implements the +A [`ProcessInstance`](../../../lib/process-services/process-list/models/process-instance.model.ts) object is returned for a successfully started process. This implements the [ProcessInstanceRepresentation interface](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-activiti-rest-api/docs/ProcessInstanceRepresentation.md). You can start the process with process variables instead of form field values using diff --git a/docs/process-services/task-filter.service.md b/docs/process-services/services/task-filter.service.md similarity index 61% rename from docs/process-services/task-filter.service.md rename to docs/process-services/services/task-filter.service.md index 8e6a413722..1523340683 100644 --- a/docs/process-services/task-filter.service.md +++ b/docs/process-services/services/task-filter.service.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-06-07 --- -# [Task Filter Service](../../lib/process-services/task-list/services/task-filter.service.ts "Defined in task-filter.service.ts") +# [Task Filter Service](../../../lib/process-services/task-list/services/task-filter.service.ts "Defined in task-filter.service.ts") Manage Task Filters, which are pre-configured Task Instance queries. @@ -13,52 +13,52 @@ Manage Task Filters, which are pre-configured Task Instance queries. ### Methods -- **addFilter**(filter: [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>`
+- **addFilter**(filter: [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>`
Adds a new task filter - - _filter:_ [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The new filter to add - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>` - Details of task filter just added + - _filter:_ [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - The new filter to add + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>` - Details of task filter just added - **callApiTaskFilters**(appId?: `number`): [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)``
Calls `getUserTaskFilters` from the Alfresco JS API. - _appId:_ `number` - (Optional) ID of the target app - **Returns** [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_promises)`` - List of task filters -- **createDefaultFilters**(appId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`[]>`
+- **createDefaultFilters**(appId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`[]>`
Creates and returns the default filters for a process app. - _appId:_ `number` - ID of the target app - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`[]>` - Array of default filters just created -- **getCompletedTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`[]>` - Array of default filters just created +- **getCompletedTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)
Creates and returns a filter for "Completed" task instances. - _appId:_ `number` - ID of the target app - - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter -- **getInvolvedTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ - **Returns** [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getInvolvedTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)
Creates and returns a filter for "Involved" task instances. - _appId:_ `number` - ID of the target app - - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter -- **getMyTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ - **Returns** [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getMyTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)
Creates and returns a filter for "My Tasks" task instances. - _appId:_ `number` - ID of the target app - - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter -- **getQueuedTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)
+ - **Returns** [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getQueuedTasksFilterInstance**(appId: `number`): [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)
Creates and returns a filter for "Queued Tasks" task instances. - _appId:_ `number` - ID of the target app - - **Returns** [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter -- **getTaskFilterById**(filterId: `number`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>`
+ - **Returns** [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - The newly created filter +- **getTaskFilterById**(filterId: `number`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>`
Gets a task filter by ID. - _filterId:_ `number` - ID of the filter - _appId:_ `number` - (Optional) ID of the app for the filter - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>` - Details of task filter -- **getTaskFilterByName**(taskName: `string`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>` - Details of task filter +- **getTaskFilterByName**(taskName: `string`, appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>`
Gets a task filter by name. - _taskName:_ `string` - Name of the filter - _appId:_ `number` - (Optional) ID of the app for the filter - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>` - Details of task filter -- **getTaskListFilters**(appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`[]>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>` - Details of task filter +- **getTaskListFilters**(appId?: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`[]>`
Gets all task filters for a process app. - _appId:_ `number` - (Optional) Optional ID for a specific app - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`[]>` - Array of task filter details + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`[]>` - Array of task filter details ## Details -The methods of this service generally return an instance of [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) or +The methods of this service generally return an instance of [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) or an array of instances. For example, you could use `getTaskListFilters` as follows: ```ts @@ -70,7 +70,7 @@ this.taskFilterService.getTaskListFilters(processAppId).subscribe( (filters: Fil }); ``` -The response is an array of [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) objects: +The response is an array of [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) objects: filters: 0: {id: 10, appId: 2, name: "Involved Tasks", recent: true, icon: "glyphicon-align-left", …} @@ -98,5 +98,5 @@ export class SomePageComponent implements OnInit { ## See also -- [Task Filters component](task-filters.component.md) +- [Task Filters component](../components/task-filters.component.md) - [Process Filter service](process-filter.service.md) diff --git a/docs/process-services/tasklist.service.md b/docs/process-services/services/tasklist.service.md similarity index 60% rename from docs/process-services/tasklist.service.md rename to docs/process-services/services/tasklist.service.md index ac6914dd46..da5d24525c 100644 --- a/docs/process-services/tasklist.service.md +++ b/docs/process-services/services/tasklist.service.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2018-11-14 --- -# [Tasklist Service](../../lib/process-services/task-list/services/tasklist.service.ts "Defined in tasklist.service.ts") +# [Tasklist Service](../../../lib/process-services/task-list/services/tasklist.service.ts "Defined in tasklist.service.ts") Manages Task Instances. @@ -13,45 +13,45 @@ Manages Task Instances. ### Methods -- **addTask**(task: [`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+- **addTask**(task: [`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Adds a subtask (ie, a checklist task) to a parent task. - - _task:_ [`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts) - The task to add - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - The subtask that was added -- **assignTask**(taskId: `string`, requestNode: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+ - _task:_ [`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts) - The task to add + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - The subtask that was added +- **assignTask**(taskId: `string`, requestNode: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Assigns a task to a user or group. - _taskId:_ `string` - The task to assign - _requestNode:_ `any` - User or group to assign the task to - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the assigned task -- **assignTaskByUserId**(taskId: `string`, userId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the assigned task +- **assignTaskByUserId**(taskId: `string`, userId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Assigns a task to a user. - _taskId:_ `string` - ID of the task to assign - _userId:_ `string` - ID of the user to assign the task to - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the assigned task + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the assigned task - **attachFormToATask**(taskId: `string`, formId: `number`): [`Observable`](http://reactivex.io/documentation/observable.html)``
Attaches a form to a task. - _taskId:_ `string` - ID of the target task - _formId:_ `number` - ID of the form to add - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`` - Null response notifying when the operation is complete -- **claimTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+- **claimTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Claims a task for the current user. - _taskId:_ `string` - ID of the task to claim - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the claimed task + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the claimed task - **completeTask**(taskId: `string`): `any`
Gives completed status to a task. - _taskId:_ `string` - ID of the target task - **Returns** `any` - Null response notifying when the operation is complete -- **createNewTask**(task: [`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+- **createNewTask**(task: [`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Creates a new standalone task. - - _task:_ [`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts) - Details of the new task - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the newly created task -- **deleteForm**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+ - _task:_ [`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts) - Details of the new task + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Details of the newly created task +- **deleteForm**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Deletes a form from a task. - _taskId:_ `string` - Task id related to form - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete -- **deleteTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete +- **deleteTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Deletes a subtask (ie, a checklist task) from a parent task. - _taskId:_ `string` - The task to delete - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete - **fetchTaskAuditJsonById**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)``
Fetch the Task Audit information in JSON format - _taskId:_ `string` - ID of the target task @@ -60,64 +60,64 @@ Manages Task Instances. Fetches the Task Audit information in PDF format. - _taskId:_ `string` - ID of the target task - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob)`>` - Binary PDF data -- **findAllTaskByState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts), state?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>`
+- **findAllTaskByState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts), state?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>`
Gets all tasks matching a query and state value. - - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks. + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks. - _state:_ `string` - (Optional) Task state. Can be "open" or "completed". - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks -- **findAllTasksWithoutState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks +- **findAllTasksWithoutState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>`
Gets all tasks matching the supplied query but ignoring the task state. - - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks -- **findTasksByState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts), state?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>`
+ - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks +- **findTasksByState**(requestNode: [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts), state?: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>`
Gets tasks matching a query and state value. - - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks - _state:_ `string` - (Optional) Task state. Can be "open" or "completed". - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks -- **getFilterForTaskById**(taskId: `string`, filterList: [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks +- **getFilterForTaskById**(taskId: `string`, filterList: [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`[]`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>`
Gets all the filters in the list that belong to a task. - _taskId:_ `string` - ID of the target task - - _filterList:_ [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`[]` - List of filters to search through - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>` - Filters belonging to the task -- **getFormList**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Form`](../../lib/process-services/task-list/models/form.model.ts)`[]>`
+ - _filterList:_ [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`[]` - List of filters to search through + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>` - Filters belonging to the task +- **getFormList**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Form`](../../../lib/process-services/task-list/models/form.model.ts)`[]>`
Gets all available reusable forms. - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Form`](../../lib/process-services/task-list/models/form.model.ts)`[]>` - Array of form details -- **getTaskChecklist**(id: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`[]>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`Form`](../../../lib/process-services/task-list/models/form.model.ts)`[]>` - Array of form details +- **getTaskChecklist**(id: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`[]>`
Gets the checklist for a task. - _id:_ `string` - ID of the target task - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`[]>` - Array of checklist task details -- **getTaskDetails**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`[]>` - Array of checklist task details +- **getTaskDetails**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Gets details for a task. - _taskId:_ `string` - ID of the target task. - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Task details -- **getTasks**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Task details +- **getTasks**(requestNode: [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>`
Gets all the tasks matching the supplied query. - - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks -- **getTotalTasks**(requestNode: [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)``
+ - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts)`>` - List of tasks +- **getTotalTasks**(requestNode: [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)``
Gets the total number of the tasks found by a query. - - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks + - _requestNode:_ [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - Query to search for tasks - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`` - Number of tasks -- **isTaskRelatedToFilter**(taskId: `string`, filterModel: [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>`
+- **isTaskRelatedToFilter**(taskId: `string`, filterModel: [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>`
Checks if a taskId is filtered with the given filter. - _taskId:_ `string` - ID of the target task - - _filterModel:_ [`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) - The filter you want to check - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts)`>` - The filter if it is related or null otherwise -- **unclaimTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+ - _filterModel:_ [`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) - The filter you want to check + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`FilterRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts)`>` - The filter if it is related or null otherwise +- **unclaimTask**(taskId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Un-claims a task for the current user. - _taskId:_ `string` - ID of the task to unclaim - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete -- **updateTask**(taskId: `any`, updated: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>`
+ - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Null response notifying when the operation is complete +- **updateTask**(taskId: `any`, updated: `any`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>`
Updates the details (name, description, due date) for a task. - _taskId:_ `any` - ID of the task to update - _updated:_ `any` - Data to update the task (as a `TaskUpdateRepresentation` instance). - - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts)`>` - Updated task details + - **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts)`>` - Updated task details ## Details ### Task details -Several of the methods return one or more [`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts) instances corresponding +Several of the methods return one or more [`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts) instances corresponding to tasks or subtasks matched by a query of some kind. For example, `getTaskDetails` could be used as shown below: @@ -130,7 +130,7 @@ this.tasklistService.getTaskDetails(taskInstanceId).subscribe( (taskInstance: Ta }); ``` -The resulting [`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts) object contains information like the following: +The resulting [`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts) object contains information like the following: adhocTaskCanBeReassigned: false assignee: UserProcessModel {pictureId: null, id: 1, email: "admin@app.activiti.com", firstName: null, lastName: "Administrator"} @@ -166,7 +166,7 @@ The resulting [`TaskDetailsModel`](../../lib/process-services/task-list/models/t ### Queries -Some of the methods run a search query contained in a [`TaskQueryRequestRepresentationModel`](../../lib/process-services/task-list/models/filter.model.ts) and +Some of the methods run a search query contained in a [`TaskQueryRequestRepresentationModel`](../../../lib/process-services/task-list/models/filter.model.ts) and return the matched tasks. Below is an example of how you might run a query using `getTasks`: ```ts @@ -205,8 +205,8 @@ The `assignment` property filters tasks based on how they are assigned (or not a Use `assignee` if you are interested in tasks that are assigned to a user. If you want to see pooled tasks (i.e. tasks that needs to be claimed by a user), then use `candidate`. -A successful query returns a [`TaskListModel`](../../lib/process-services/task-list/models/task-list.model.ts) with the `data` property set to an array of -[`TaskDetailsModel`](../../lib/process-services/task-list/models/task-details.model.ts): +A successful query returns a [`TaskListModel`](../../../lib/process-services/task-list/models/task-list.model.ts) with the `data` property set to an array of +[`TaskDetailsModel`](../../../lib/process-services/task-list/models/task-details.model.ts): data: 0: {id: "75010", name: "Approve Invoice - Invoice-10202.pdf", description: null, category: null, assignee: {…}, …} diff --git a/package.json b/package.json index 3f6d9e2c27..b48807ba02 100644 --- a/package.json +++ b/package.json @@ -94,6 +94,7 @@ "pdfjs-dist": "^2.0.489", "raphael": "2.2.7", "reflect-metadata": "0.1.13", + "remark-validate-links": "^8.0.0", "rxjs": "^6.2.2", "systemjs": "0.19.27", "web-animations-js": "2.3.1", @@ -120,6 +121,7 @@ "ejs": "^2.6.1", "extract-text-webpack-plugin": "^4.0.0-beta.0", "fs-extra": "^4.0.2", + "graphql": "^14.1.1", "http-proxy-middleware": "^0.19.0", "husky": "^1.2.0", "jasmine-ajax": "3.2.0", diff --git a/tools/doc/docProcessor.js b/tools/doc/docProcessor.js index f88443134c..452e74f408 100644 --- a/tools/doc/docProcessor.js +++ b/tools/doc/docProcessor.js @@ -263,6 +263,7 @@ var files = []; if (sourceInfo.isDirectory()) { getAllDocFilePaths(sourcePath, files); + aggData['rootFolder'] = path.dirname(sourcePath); } else if (sourceInfo.isFile()) { files = [ sourcePath ]; } diff --git a/tools/doc/doctool.config.json b/tools/doc/doctool.config.json index b0a2bb7536..93d688adb3 100644 --- a/tools/doc/doctool.config.json +++ b/tools/doc/doctool.config.json @@ -1,7 +1,7 @@ { "profiles": { "default": [ - "index", + "gqIndex", "versionIndex", "tutorialIndex", "tsInfo", @@ -10,7 +10,7 @@ "toc" ], "index": [ - "index", + "gqIndex", "versionIndex", "tutorialIndex" ], @@ -24,7 +24,7 @@ "fileChecker" ], "dev": [ - "toc" + "typeLinker" ] }, "statusIcons": { diff --git a/tools/doc/mqDefs.js b/tools/doc/mqDefs.js new file mode 100644 index 0000000000..4ad40846e1 --- /dev/null +++ b/tools/doc/mqDefs.js @@ -0,0 +1,186 @@ +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +Object.defineProperty(exports, "__esModule", { value: true }); +var mdToString = require("mdast-util-to-string"); +var jsyaml = require("js-yaml"); +exports.schema = "\n type Query {\n documents(idFilter: String = \"\"): [Root]\n }\n\n type Root {\n id: ID\n type: String\n folder(depth: Int = 1): String\n metadata(key: String): String\n heading(depth: Int = 0): Heading\n headings(depth: Int = 0): [Heading]\n paragraph: Paragraph\n paragraphs: [Paragraph]\n link: Link\n links: [Link]\n text: Text\n texts: [Text]\n children: [Node]\n }\n\n type Heading {\n depth: Int\n plaintext: String\n paragraph: Paragraph\n paragraphs: [Paragraph]\n link: Link\n links: [Link]\n children: [Node]\n }\n\n type Paragraph {\n plaintext: String\n }\n\n type Link {\n plaintext: String\n title: String\n url: String\n paragraph: Paragraph\n paragraphs: [Paragraph]\n text: Text\n texts: [Text]\n }\n\n type Text {\n value: String\n }\n\n type Node {\n type: String\n children: [Node]\n }\n"; +var Node = /** @class */ (function () { + function Node(orig) { + this.orig = orig; + } + Node.prototype.type = function () { + return this.orig.type; + }; + Node.prototype.depth = function () { + return this.orig['depth'] || null; + }; + Node.prototype.lang = function () { + return this.orig['lang'] || null; + }; + Node.prototype.ordered = function () { + return this.orig['ordered'] || null; + }; + Node.prototype.start = function () { + return this.orig['start'] || null; + }; + Node.prototype.loose = function () { + return this.orig['loose'] || null; + }; + Node.prototype.align = function () { + return this.orig['align'] || null; + }; + Node.prototype.title = function () { + return this.orig['title'] || null; + }; + Node.prototype.url = function () { + return this.orig['title'] || null; + }; + Node.prototype.children = function () { + if (this.orig['children']) { + return this.orig['children'].map(function (x) { return new Node(x); }); + } + else { + return null; + } + }; + return Node; +}()); +exports.Node = Node; +var Parent = /** @class */ (function () { + function Parent(orig) { + this.orig = orig; + } + Parent.prototype.plaintext = function () { + return mdToString(this.orig); + }; + Parent.prototype.paragraph = function () { + return new Paragraph(this.orig.children.find(function (ch) { return (ch.type === 'paragraph'); })); + }; + Parent.prototype.paragraphs = function () { + return this.orig.children.filter(function (ch) { + return (ch.type === 'paragraph'); + }) + .map(function (ch) { return new Paragraph(ch); }); + }; + Parent.prototype.link = function () { + return new Link(this.orig.children.find(function (ch) { return (ch.type === 'link'); })); + }; + Parent.prototype.links = function () { + return this.orig.children.filter(function (ch) { + return (ch.type === 'link'); + }) + .map(function (ch) { return new Link(ch); }); + }; + Parent.prototype.text = function () { + return new Text(this.orig.children.find(function (ch) { return (ch.type === 'text'); })); + }; + Parent.prototype.texts = function () { + return this.orig.children.filter(function (ch) { + return (ch.type === 'text'); + }) + .map(function (ch) { return new Text(ch); }); + }; + return Parent; +}()); +exports.Parent = Parent; +var Root = /** @class */ (function (_super) { + __extends(Root, _super); + function Root() { + return _super !== null && _super.apply(this, arguments) || this; + } + Root.prototype.type = function () { + return 'root'; + }; + Root.prototype.folder = function (args) { + var depth = args['depth']; + var relPath = this.id.substring(this.id.indexOf('docs')); + var pathSegments = relPath.split(/[\\\/]/); + return pathSegments[depth]; + }; + Root.prototype.metadata = function (args) { + if (!this._meta) { + var yamlElement = this.orig.children.find(function (ch) { return (ch.type === 'yaml'); }); + if (yamlElement) { + this._meta = jsyaml.safeLoad(yamlElement.value); + } + else { + this._meta = {}; + } + } + if (this._meta[args['key']]) { + return this._meta[args['key']]; + } + else { + return ''; + } + }; + Root.prototype.heading = function (args) { + var depth = args['depth']; + return new Heading(this.orig.children.find(function (ch) { + return (ch.type === 'heading') && + ((depth === 0) || (depth === ch.depth)); + })); + }; + Root.prototype.headings = function (args) { + var depth = args['depth']; + return this.orig.children.filter(function (ch) { + return (ch.type === 'heading') && + ((depth === 0) || (depth === ch.depth)); + }) + .map(function (ch) { return new Heading(ch); }); + }; + return Root; +}(Parent)); +exports.Root = Root; +var Heading = /** @class */ (function (_super) { + __extends(Heading, _super); + function Heading() { + return _super !== null && _super.apply(this, arguments) || this; + } + Heading.prototype.depth = function () { + return this.orig.depth; + }; + return Heading; +}(Parent)); +exports.Heading = Heading; +var Paragraph = /** @class */ (function (_super) { + __extends(Paragraph, _super); + function Paragraph() { + return _super !== null && _super.apply(this, arguments) || this; + } + return Paragraph; +}(Parent)); +exports.Paragraph = Paragraph; +var Link = /** @class */ (function (_super) { + __extends(Link, _super); + function Link() { + return _super !== null && _super.apply(this, arguments) || this; + } + Link.prototype.title = function () { + return this.orig.title; + }; + Link.prototype.url = function () { + return this.orig.url; + }; + return Link; +}(Parent)); +exports.Link = Link; +var Text = /** @class */ (function () { + function Text(orig) { + this.orig = orig; + } + Text.prototype.value = function () { + return this.orig.value; + }; + return Text; +}()); +exports.Text = Text; diff --git a/tools/doc/mqDefs.ts b/tools/doc/mqDefs.ts new file mode 100644 index 0000000000..8cf7999427 --- /dev/null +++ b/tools/doc/mqDefs.ts @@ -0,0 +1,249 @@ +import { MDAST } from 'mdast'; +import { UNIST } from 'unist'; +import * as mdToString from 'mdast-util-to-string'; + +import * as jsyaml from 'js-yaml'; + +export let schema = ` + type Query { + documents(idFilter: String = ""): [Root] + } + + type Root { + id: ID + type: String + folder(depth: Int = 1): String + metadata(key: String): String + heading(depth: Int = 0): Heading + headings(depth: Int = 0): [Heading] + paragraph: Paragraph + paragraphs: [Paragraph] + link: Link + links: [Link] + text: Text + texts: [Text] + children: [Node] + } + + type Heading { + depth: Int + plaintext: String + paragraph: Paragraph + paragraphs: [Paragraph] + link: Link + links: [Link] + children: [Node] + } + + type Paragraph { + plaintext: String + } + + type Link { + plaintext: String + title: String + url: String + paragraph: Paragraph + paragraphs: [Paragraph] + text: Text + texts: [Text] + } + + type Text { + value: String + } + + type Node { + type: String + children: [Node] + } +`; + +export class Node { + constructor(private orig: UNIST.Node) {} + + type(): string { + return this.orig.type; + } + + depth(): number { + return this.orig['depth'] || null; + } + + lang(): string { + return this.orig['lang'] || null; + } + + ordered(): boolean { + return this.orig['ordered'] || null; + } + + start(): number { + return this.orig['start'] || null; + } + + loose(): boolean { + return this.orig['loose'] || null; + } + + align(): MDAST.AlignType { + return this.orig['align'] || null; + } + + title(): string { + return this.orig['title'] || null; + } + + url(): string { + return this.orig['title'] || null; + } + + children(): Node[] { + if (this.orig['children']) { + return this.orig['children'].map(x => new Node(x)); + } else { + return null; + } + } +} + + +export class Parent { + + constructor(protected orig: UNIST.Parent) {} + + plaintext(): string { + return mdToString(this.orig); + } + + paragraph(): Paragraph { + return new Paragraph( this.orig.children.find( + (ch: UNIST.Node) => (ch.type === 'paragraph') + )); + } + + paragraphs(): Paragraph[] { + return this.orig.children.filter( + (ch: UNIST.Node) => + (ch.type === 'paragraph') + ) + .map(ch => new Paragraph( ch)); + } + + link(): Link { + return new Link( this.orig.children.find( + (ch: UNIST.Node) => (ch.type === 'link') + )); + } + + links(): Link[] { + return this.orig.children.filter( + (ch: UNIST.Node) => + (ch.type === 'link') + ) + .map(ch => new Link( ch)); + } + + text(): Text { + return new Text( this.orig.children.find( + (ch: UNIST.Node) => (ch.type === 'text') + )); + } + + texts(): Text[] { + return this.orig.children.filter( + (ch: UNIST.Node) => + (ch.type === 'text') + ) + .map(ch => new Text( ch)); + } +} + +export class Root extends Parent { + _meta: {}; + public id: string + + type(): string { + return 'root'; + } + + folder(args): string { + let depth = args['depth']; + + let relPath = this.id.substring(this.id.indexOf('docs')); + let pathSegments = relPath.split(/[\\\/]/); + return pathSegments[depth]; + } + + metadata(args): string { + if (!this._meta) { + let yamlElement: MDAST.YAML = this.orig.children.find( + (ch: UNIST.Node) => (ch.type === 'yaml') + ); + + if (yamlElement) { + this._meta = jsyaml.safeLoad(yamlElement.value) + } else { + this._meta = {}; + } + } + + if (this._meta[args['key']]) { + return this._meta[args['key']] + } else { + return ''; + } + } + + heading(args): Heading { + let depth = args['depth']; + + return new Heading( this.orig.children.find( + (ch: UNIST.Node) => + (ch.type === 'heading') && + ((depth === 0) || (depth === ( ch).depth)) + )); + } + + + headings(args): Heading[] { + let depth = args['depth']; + + return this.orig.children.filter( + (ch: UNIST.Node) => + (ch.type === 'heading') && + ((depth === 0) || (depth === ( ch).depth))) + .map(ch => new Heading( ch)); + } +} + +export class Heading extends Parent { + + depth(): number { + return ( this.orig).depth; + } +} + + +export class Paragraph extends Parent { +} + + +export class Link extends Parent { + + title(): string { + return ( this.orig).title; + } + + url(): string { + return ( this.orig).url; + } +} + +export class Text { + constructor(protected orig: MDAST.TextNode) {} + + value(): String { + return this.orig.value; + } +} \ No newline at end of file diff --git a/tools/doc/remarkGraphQl.js b/tools/doc/remarkGraphQl.js new file mode 100644 index 0000000000..c914bf512e --- /dev/null +++ b/tools/doc/remarkGraphQl.js @@ -0,0 +1,24 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var fs = require("fs"); +var path = require("path"); +var graphql_1 = require("graphql"); +var remark = require("remark"); +var frontMatter = require("remark-frontmatter"); +var removePosInfo = require("unist-util-remove-position"); +var MQ = require("./mqDefs"); +var docFilePath = path.resolve('..', '..', 'docs', 'core', 'about.component.md'); +var docSrc = fs.readFileSync(docFilePath, 'utf8'); +var tree = remark() + .use(frontMatter, ["yaml"]) + .parse(docSrc); +tree = removePosInfo(tree); +//console.log(JSON.stringify(tree)); +var schema = graphql_1.buildSchema(MQ.schema); +var root = { + document: function () { return new MQ.Root(tree); } +}; +var query = "\n {\n document {\n metadata(key: \"Status\")\n heading {\n link {\n text {\n value\n }\n }\n }\n paragraph {\n plaintext\n }\n }\n }\n"; +graphql_1.graphql(schema, query, root).then(function (response) { + console.log(JSON.stringify(response)); +}); diff --git a/tools/doc/remarkGraphQl.ts b/tools/doc/remarkGraphQl.ts new file mode 100644 index 0000000000..ec81d5f380 --- /dev/null +++ b/tools/doc/remarkGraphQl.ts @@ -0,0 +1,51 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +import { graphql, buildSchema } from 'graphql'; + +import * as remark from 'remark'; +import * as frontMatter from 'remark-frontmatter'; +import { MDAST } from 'mdast'; +import * as removePosInfo from 'unist-util-remove-position'; + +import * as MQ from './mqDefs'; + +let docFilePath = path.resolve('..', '..', 'docs', 'core', 'about.component.md'); +let docSrc = fs.readFileSync(docFilePath, 'utf8'); + +let tree: MDAST.Root = remark() +.use(frontMatter, ["yaml"]) +.parse(docSrc); + +tree = removePosInfo(tree); + +//console.log(JSON.stringify(tree)); + +let schema = buildSchema(MQ.schema); + +let root = { + document: () => new MQ.Root(tree) +}; + + +let query = ` + { + document { + metadata(key: "Status") + heading { + link { + text { + value + } + } + } + paragraph { + plaintext + } + } + } +`; + +graphql(schema, query, root).then((response) => { + console.log(JSON.stringify(response)); +}); \ No newline at end of file diff --git a/tools/doc/templates/gqIndex.ejs b/tools/doc/templates/gqIndex.ejs new file mode 100644 index 0000000000..990c649dde --- /dev/null +++ b/tools/doc/templates/gqIndex.ejs @@ -0,0 +1,35 @@ +<% + function relDocPath(fullPath) { + return fullPath.substring(fullPath.indexOf('docs') + 5).replace('\\', '/') + } + + function relSrcPath(fullPath) { + return '../' + fullPath.substring(fullPath.indexOf('lib')).replace('\\', '/') + } + + function renderSection(sectionName) { + var sectionDocs = documents.filter(doc => doc.classType === sectionName.toLowerCase()); + + if (sectionDocs.length > 0) { -%> + +### <%= sectionName %> + +| Name | Description | Source link | +| -- | -- | --| +<% } + + sectionDocs.forEach(document => { -%> +| [<%= document['title'] %>](<%= relDocPath(document['id']) %>) | <%= document['paragraph']['plaintext'] %> | [Source](<%= relSrcPath(document['heading']['link']['url']) %>) | +<% }); + } +-%> +<% +renderSection('Components'); +renderSection('Directives'); +renderSection('Dialogs'); +renderSection('Interfaces'); +renderSection('Models'); +renderSection('Pipes'); +renderSection('Services'); +renderSection('Widgets'); +-%> diff --git a/tools/doc/tools/gqIndex.js b/tools/doc/tools/gqIndex.js new file mode 100644 index 0000000000..86b0cd208c --- /dev/null +++ b/tools/doc/tools/gqIndex.js @@ -0,0 +1,75 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var fs = require("fs"); +var path = require("path"); +var ejs = require("ejs"); +var remark = require("remark"); +var frontMatter = require("remark-frontmatter"); +var replaceZone = require("mdast-zone"); +var graphql_1 = require("graphql"); +var MQ = require("../mqDefs"); +var libNamesRegex = /content-services|core|extensions|insights|process-services|process-services-cloud/; +var libNamesList = ['process-services']; +var query = "\n query libIndex($libName: String) {\n documents(idFilter: $libName) {\n title: metadata(key: \"Title\")\n status: metadata(key: \"Status\")\n id\n classType: folder(depth: 2)\n heading {\n link {\n url\n }\n }\n paragraph {\n plaintext\n }\n }\n }\n"; +function processDocs(mdCache, aggData, _errorMessages) { + var docset = new GQDocset(mdCache); + var templateFilePath = path.resolve(__dirname, '..', 'templates', 'gqIndex.ejs'); + var templateSource = fs.readFileSync(templateFilePath, 'utf8'); + var template = ejs.compile(templateSource); + var indexFilePath = path.resolve(aggData['rootFolder'], 'README.md'); + var indexFileText = fs.readFileSync(indexFilePath, 'utf8'); + var indexMD = remark() + .use(frontMatter, ["yaml"]) + .parse(indexFileText); + var schema = graphql_1.buildSchema(MQ.schema); + libNamesList.forEach(function (libName) { + graphql_1.graphql(schema, query, docset, null, { 'libName': libName }) + .then(function (response) { + if (!response['data']) { + console.log(JSON.stringify(response)); + } + else { + //console.log(template(response['data'])); + var newSection_1 = remark().parse(template(response['data'])).children; + replaceZone(indexMD, libName, function (start, _oldZone, end) { + newSection_1.unshift(start); + newSection_1.push(end); + return newSection_1; + }); + var outText = remark() + .use(frontMatter, { type: 'yaml', fence: '---' }) + .data("settings", { paddedTable: false, gfm: false }) + .stringify(indexMD); + fs.writeFileSync(indexFilePath, outText); + } + }); + }); +} +exports.processDocs = processDocs; +var GQDocset = /** @class */ (function () { + function GQDocset(mdCache) { + var _this = this; + this.docs = []; + var pathnames = Object.keys(mdCache); + pathnames.forEach(function (pathname) { + if (!pathname.match(/README/) && + pathname.match(libNamesRegex)) { + var doc = new MQ.Root(mdCache[pathname].mdInTree); + doc.id = pathname.replace(/\\/g, '/'); + _this.docs.push(doc); + } + }); + } + GQDocset.prototype.documents = function (args) { + if (args['idFilter'] === '') { + return this.docs; + } + else { + return this.docs.filter(function (doc) { return doc.id.indexOf(args['idFilter'] + '/') !== -1; }); + } + }; + GQDocset.prototype.size = function () { + return this.docs.length; + }; + return GQDocset; +}()); diff --git a/tools/doc/tools/gqIndex.ts b/tools/doc/tools/gqIndex.ts new file mode 100644 index 0000000000..1b89dd1163 --- /dev/null +++ b/tools/doc/tools/gqIndex.ts @@ -0,0 +1,113 @@ +import * as fs from 'fs'; +import * as path from 'path'; + +import * as ejs from 'ejs'; + +import * as remark from 'remark'; +import * as frontMatter from 'remark-frontmatter'; +import * as replaceZone from 'mdast-zone'; + +import { graphql, buildSchema } from 'graphql'; + +import * as MQ from '../mqDefs'; + +let libNamesRegex = /content-services|core|extensions|insights|process-services|process-services-cloud/; +let libNamesList = ['process-services']; + + +let query = ` + query libIndex($libName: String) { + documents(idFilter: $libName) { + title: metadata(key: "Title") + status: metadata(key: "Status") + id + classType: folder(depth: 2) + heading { + link { + url + } + } + paragraph { + plaintext + } + } + } +`; + + +export function processDocs(mdCache, aggData, _errorMessages) { + let docset: GQDocset = new GQDocset(mdCache); + + let templateFilePath = path.resolve(__dirname, '..', 'templates', 'gqIndex.ejs'); + let templateSource = fs.readFileSync(templateFilePath, 'utf8'); + let template = ejs.compile(templateSource); + + let indexFilePath = path.resolve(aggData['rootFolder'], 'docs', 'README.md'); + let indexFileText = fs.readFileSync(indexFilePath, 'utf8'); + let indexMD = remark() + .use(frontMatter, ["yaml"]) + .parse(indexFileText); + + let schema = buildSchema(MQ.schema); + + libNamesList.forEach(libName => { + graphql(schema, query, docset, null, {'libName': libName}) + .then((response) => { + if (!response['data']) { + console.log(JSON.stringify(response)); + } else { + //console.log(template(response['data'])); + let newSection = remark().parse(template(response['data'])).children; + + replaceZone(indexMD, libName, (start, _oldZone, end) => { + newSection.unshift(start); + newSection.push(end); + return newSection; + }); + + let outText = remark() + .use(frontMatter, {type: 'yaml', fence: '---'}) + .data("settings", {paddedTable: false, gfm: false}) + .stringify(indexMD); + + fs.writeFileSync(indexFilePath, outText); + } + }); + }); + + +} + + +class GQDocset { + public docs: MQ.Root[]; + + constructor(mdCache) { + this.docs = []; + + let pathnames = Object.keys(mdCache); + + pathnames.forEach(pathname => { + + if (!pathname.match(/README/) && + pathname.match(libNamesRegex) + ) { + let doc = new MQ.Root(mdCache[pathname].mdInTree); + doc.id = pathname.replace(/\\/g, '/'); + this.docs.push(doc); + } + }); + } + + documents(args): MQ.Root[] { + if (args['idFilter'] === '') { + return this.docs; + } else { + return this.docs.filter(doc => doc.id.indexOf(args['idFilter'] + '/') !== -1); + } + } + + size(): number { + return this.docs.length; + } +} \ No newline at end of file diff --git a/tools/doc/tools/reducer.ts b/tools/doc/tools/reducer.ts new file mode 100644 index 0000000000..e646e92b39 --- /dev/null +++ b/tools/doc/tools/reducer.ts @@ -0,0 +1,8 @@ +import * as path from "path"; +import * as fs from "fs"; + +import { select, selectAll } from "unist-util-select"; + + +export function processDocs(mdCache, aggData, errorMessages) { +} \ No newline at end of file diff --git a/tools/doc/tools/sourceLinker.js b/tools/doc/tools/sourceLinker.js index 6688df147a..708483aebc 100644 --- a/tools/doc/tools/sourceLinker.js +++ b/tools/doc/tools/sourceLinker.js @@ -1,5 +1,5 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +exports.__esModule = true; var path = require("path"); var unist_util_select_1 = require("unist-util-select"); var ngHelpers = require("../ngHelpers"); @@ -16,20 +16,30 @@ function processDocs(mdCache, aggData, errorMessages) { var classInfo = aggData.classInfo[className]; var sourcePath = classInfo ? classInfo.sourcePath : ''; var titleHeading = unist_util_select_1.select('heading[depth=1]:first-of-type', tree); + var relDocPath = pathname.substring(pathname.indexOf('docs')); + var srcUrl = fixRelSrcUrl(relDocPath, sourcePath); if (titleHeading.children[0].type === "text") { var titleText = titleHeading.children[0]; titleHeading.children[0] = { type: 'link', - url: "../../" + sourcePath, + url: srcUrl, title: "Defined in " + path.basename(sourcePath), children: [titleText] }; } else if ((titleHeading.children[0].type === "link") && sourcePath) { var linkElem = titleHeading.children[0]; - linkElem.url = "../../" + sourcePath; - linkElem.title = "Defined in " + path.basename(sourcePath); + linkElem.url = srcUrl, //`../../${sourcePath}`; + linkElem.title = "Defined in " + path.basename(sourcePath); } }); } exports.processDocs = processDocs; +function fixRelSrcUrl(docPath, srcPath) { + var docPathSegments = docPath.split(/[\\\/]/); + var dotPathPart = ''; + for (var i = 0; i < (docPathSegments.length - 1); i++) { + dotPathPart += '../'; + } + return dotPathPart + srcPath; +} diff --git a/tools/doc/tools/sourceLinker.ts b/tools/doc/tools/sourceLinker.ts index ac09f50705..4db2d32757 100644 --- a/tools/doc/tools/sourceLinker.ts +++ b/tools/doc/tools/sourceLinker.ts @@ -23,20 +23,33 @@ export function processDocs(mdCache, aggData, errorMessages) { let classInfo = aggData.classInfo[className]; let sourcePath = classInfo ? classInfo.sourcePath : ''; let titleHeading = select('heading[depth=1]:first-of-type', tree); - + let relDocPath = pathname.substring(pathname.indexOf('docs')); + let srcUrl = fixRelSrcUrl(relDocPath, sourcePath); + if (titleHeading.children[0].type === "text") { let titleText = titleHeading.children[0]; - titleHeading.children[0] = { type: 'link', - url: `../../${sourcePath}`, + url: srcUrl,//`../../${sourcePath}`, title: `Defined in ${path.basename(sourcePath)}`, children: [titleText] } } else if ((titleHeading.children[0].type === "link") && sourcePath) { let linkElem = titleHeading.children[0]; - linkElem.url = `../../${sourcePath}`; + linkElem.url = srcUrl, //`../../${sourcePath}`; linkElem.title = `Defined in ${path.basename(sourcePath)}`; } }); +} + + +function fixRelSrcUrl(docPath: string, srcPath: string) { + let docPathSegments = docPath.split(/[\\\/]/); + let dotPathPart = ''; + + for (let i = 0; i < (docPathSegments.length - 1); i++) { + dotPathPart += '../'; + } + + return dotPathPart + srcPath; } \ No newline at end of file diff --git a/tools/doc/tools/typeLinker.js b/tools/doc/tools/typeLinker.js index 1a83a87cc9..0eb645325f 100644 --- a/tools/doc/tools/typeLinker.js +++ b/tools/doc/tools/typeLinker.js @@ -1,22 +1,6 @@ "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); +exports.__esModule = true; var path = require("path"); -var fs = require("fs"); -/* -import { - Application, - ProjectReflection, - Reflection, - DeclarationReflection, - SignatureReflection, - ParameterReflection, - ReflectionKind, - TraverseProperty, - Decorator - } from "typedoc"; -import { CommentTag } from "typedoc/dist/lib/models"; -*/ -var ProgressBar = require("progress"); var unist = require("../unistHelpers"); var ngHelpers = require("../ngHelpers"); var includedNodeTypes = [ @@ -28,44 +12,38 @@ var docFolder = path.resolve("docs"); var adfLibNames = ["core", "content-services", "insights", "process-services", "process-services-cloud", "extensions"]; var externalNameLinks; function processDocs(mdCache, aggData, errorMessages) { - initPhase(aggData); + initPhase(aggData, mdCache); var pathnames = Object.keys(mdCache); - var progress = new ProgressBar("Processing: [:bar] (:current/:total)", { - total: pathnames.length, - width: 50, - clear: true - }); pathnames.forEach(function (pathname) { updateFile(mdCache[pathname].mdOutTree, pathname, aggData, errorMessages); - progress.tick(); - progress.render(); }); } exports.processDocs = processDocs; -function initPhase(aggData) { +function initPhase(aggData, mdCache) { externalNameLinks = aggData.config.externalNameLinks; aggData.docFiles = {}; aggData.nameLookup = new SplitNameLookup(); - adfLibNames.forEach(function (libName) { - var libFolderPath = path.resolve(docFolder, libName); - var files = fs.readdirSync(libFolderPath); - files.forEach(function (file) { + /* + adfLibNames.forEach(libName => { + let libFolderPath = path.resolve(docFolder, libName); + + let files = fs.readdirSync(libFolderPath); + + files.forEach(file => { if (path.extname(file) === ".md") { - var relPath = libFolderPath.substr(libFolderPath.indexOf("docs") + 5).replace(/\\/, "/") + "/" + file; - var compName = path.basename(file, ".md"); + let relPath = libFolderPath.substr(libFolderPath.indexOf("docs") + 5).replace(/\\/, "/") + "/" + file; + let compName = path.basename(file, ".md"); aggData.docFiles[compName] = relPath; } }); }); - /* - let classes = aggData.projData.getReflectionsByKind(ReflectionKind.Class); - - classes.forEach(currClass => { - if (currClass.name.match(/(Component|Directive|Interface|Model|Pipe|Service|Widget)$/)) { - aggData.nameLookup.addName(currClass.name); - } - }); */ + var docFilePaths = Object.keys(mdCache); + docFilePaths.forEach(function (docFilePath) { + var relPath = docFilePath.substring(docFilePath.indexOf('docs') + 5).replace(/\\/g, "/"); + var compName = path.basename(relPath, ".md"); + aggData.docFiles[compName] = relPath; + }); var classNames = Object.keys(aggData.classInfo); classNames.forEach(function (currClassName) { if (currClassName.match(/(Component|Directive|Interface|Model|Pipe|Service|Widget)$/)) { @@ -81,34 +59,25 @@ function updateFile(tree, pathname, aggData, _errorMessages) { if (!includedNodeTypes.includes(node.type)) { return; } - /*if (node.type === "inlineCode") { - console.log(`Link text: ${node.value}`); - let link = resolveTypeLink(aggData, node.value); - - if (link) { - convertNodeToTypeLink(node, node.value, link); - } - - } else */ if (node.type === "link") { if (node.children && ((node.children[0].type === "inlineCode") || (node.children[0].type === "text"))) { - var link = resolveTypeLink(aggData, node.children[0].value); + var link = resolveTypeLink(aggData, pathname, node.children[0].value); if (link) { convertNodeToTypeLink(node, node.children[0].value, link); } } } - else if ((node.children) && (node.type !== "heading")) { //((node.type === "paragraph") || (node.type === "tableCell")) { + else if ((node.children) && (node.type !== "heading")) { node.children.forEach(function (child, index) { - var _a; if ((child.type === "text") || (child.type === "inlineCode")) { - var newNodes = handleLinksInBodyText(aggData, child.value, child.type === 'inlineCode'); + var newNodes = handleLinksInBodyText(aggData, pathname, child.value, child.type === 'inlineCode'); (_a = node.children).splice.apply(_a, [index, 1].concat(newNodes)); } else { traverseMDTree(child); } + var _a; }); } /*else if (node.children) { node.children.forEach(child => { @@ -250,7 +219,7 @@ var WordScanner = /** @class */ (function () { }; return WordScanner; }()); -function handleLinksInBodyText(aggData, text, wrapInlineCode) { +function handleLinksInBodyText(aggData, docFilePath, text, wrapInlineCode) { if (wrapInlineCode === void 0) { wrapInlineCode = false; } var result = []; var currTextStart = 0; @@ -260,12 +229,12 @@ function handleLinksInBodyText(aggData, text, wrapInlineCode) { .replace(/'s$/, "") .replace(/^[;:,\."']+/g, "") .replace(/[;:,\."']+$/g, ""); - var link = resolveTypeLink(aggData, word); + var link = resolveTypeLink(aggData, docFilePath, word); var matchStart = void 0; if (!link) { var match_1 = matcher.nextWord(word.toLowerCase(), scanner.index); if (match_1 && match_1[0]) { - link = resolveTypeLink(aggData, match_1[0].value); + link = resolveTypeLink(aggData, docFilePath, match_1[0].value); matchStart = match_1[0].startPos; } } @@ -307,7 +276,7 @@ function handleLinksInBodyText(aggData, text, wrapInlineCode) { } return result; } -function resolveTypeLink(aggData, text) { +function resolveTypeLink(aggData, docFilePath, text) { var possTypeName = cleanTypeName(text); if (possTypeName === 'constructor') { return ""; @@ -320,10 +289,11 @@ function resolveTypeLink(aggData, text) { if (classInfo) { var kebabName = ngHelpers.kebabifyClassName(possTypeName); var possDocFile = aggData.docFiles[kebabName]; - //let url = "../../lib/" + ref.sources[0].fileName; - var url = "../../" + classInfo.sourcePath; //"../../lib/" + classInfo.items[0].source.path; + //let url = "../../" + classInfo.sourcePath; + var url = fixRelSrcUrl(docFilePath, classInfo.sourcePath); if (possDocFile) { - url = "../" + possDocFile; + //url = "../" + possDocFile; + url = fixRelDocUrl(docFilePath, possDocFile); } return url; } @@ -334,6 +304,25 @@ function resolveTypeLink(aggData, text) { return ""; } } +function fixRelSrcUrl(docPath, srcPath) { + var relDocPath = docPath.substring(docPath.indexOf('docs')); + var docPathSegments = relDocPath.split(/[\\\/]/); + var dotPathPart = ''; + for (var i = 0; i < (docPathSegments.length - 1); i++) { + dotPathPart += '../'; + } + return dotPathPart + srcPath; +} +function fixRelDocUrl(docPathFrom, docPathTo) { + var relDocPathFrom = docPathFrom.substring(docPathFrom.indexOf('docs')); + var docPathSegments = relDocPathFrom.split(/[\\\/]/); + var dotPathPart = ''; + console.log("Fixing: " + docPathFrom + " " + docPathTo); + for (var i = 0; i < (docPathSegments.length - 2); i++) { + dotPathPart += '../'; + } + return dotPathPart + docPathTo; +} function cleanTypeName(text) { var matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)(\[\])?>/); if (matches) { diff --git a/tools/doc/tools/typeLinker.ts b/tools/doc/tools/typeLinker.ts index 3f1eff8bd4..71aa4d80dc 100644 --- a/tools/doc/tools/typeLinker.ts +++ b/tools/doc/tools/typeLinker.ts @@ -1,28 +1,10 @@ import * as path from "path"; import * as fs from "fs"; - import * as remark from "remark"; import * as stringify from "remark-stringify"; import * as frontMatter from "remark-frontmatter"; -/* -import { - Application, - ProjectReflection, - Reflection, - DeclarationReflection, - SignatureReflection, - ParameterReflection, - ReflectionKind, - TraverseProperty, - Decorator - } from "typedoc"; -import { CommentTag } from "typedoc/dist/lib/models"; -*/ - -import * as ProgressBar from "progress"; - import * as unist from "../unistHelpers"; import * as ngHelpers from "../ngHelpers"; import { match } from "minimatch"; @@ -40,29 +22,22 @@ const adfLibNames = ["core", "content-services", "insights", "process-services", let externalNameLinks; export function processDocs(mdCache, aggData, errorMessages) { - initPhase(aggData); + initPhase(aggData, mdCache); var pathnames = Object.keys(mdCache); - let progress = new ProgressBar("Processing: [:bar] (:current/:total)", { - total: pathnames.length, - width: 50, - clear: true - }); - pathnames.forEach(pathname => { updateFile(mdCache[pathname].mdOutTree, pathname, aggData, errorMessages); - progress.tick(); - progress.render(); }); } -function initPhase(aggData) { +function initPhase(aggData, mdCache) { externalNameLinks = aggData.config.externalNameLinks; aggData.docFiles = {}; aggData.nameLookup = new SplitNameLookup(); + /* adfLibNames.forEach(libName => { let libFolderPath = path.resolve(docFolder, libName); @@ -76,17 +51,16 @@ function initPhase(aggData) { } }); }); - - /* - let classes = aggData.projData.getReflectionsByKind(ReflectionKind.Class); - - classes.forEach(currClass => { - if (currClass.name.match(/(Component|Directive|Interface|Model|Pipe|Service|Widget)$/)) { - aggData.nameLookup.addName(currClass.name); - } - }); */ + let docFilePaths = Object.keys(mdCache); + + docFilePaths.forEach(docFilePath => { + let relPath = docFilePath.substring(docFilePath.indexOf('docs') + 5).replace(/\\/g, "/"); + let compName = path.basename(relPath, ".md"); + aggData.docFiles[compName] = relPath; + }); + let classNames = Object.keys(aggData.classInfo); classNames.forEach(currClassName => { @@ -110,21 +84,12 @@ function updateFile(tree, pathname, aggData, _errorMessages) { return; } - /*if (node.type === "inlineCode") { - console.log(`Link text: ${node.value}`); - let link = resolveTypeLink(aggData, node.value); - - if (link) { - convertNodeToTypeLink(node, node.value, link); - } - - } else */ if (node.type === "link") { if (node.children && ( (node.children[0].type === "inlineCode") || (node.children[0].type === "text") )) { - let link = resolveTypeLink(aggData, node.children[0].value); + let link = resolveTypeLink(aggData, pathname, node.children[0].value); if (link) { convertNodeToTypeLink(node, node.children[0].value, link); @@ -133,7 +98,7 @@ function updateFile(tree, pathname, aggData, _errorMessages) { } else if ((node.children) && (node.type !== "heading")) { //((node.type === "paragraph") || (node.type === "tableCell")) { node.children.forEach((child, index) => { if ((child.type === "text") || (child.type === "inlineCode")) { - let newNodes = handleLinksInBodyText(aggData, child.value, child.type === 'inlineCode'); + let newNodes = handleLinksInBodyText(aggData, pathname, child.value, child.type === 'inlineCode'); node.children.splice(index, 1, ...newNodes); } else { traverseMDTree(child); @@ -302,7 +267,7 @@ class WordScanner { } -function handleLinksInBodyText(aggData, text: string, wrapInlineCode: boolean = false): Node[] { +function handleLinksInBodyText(aggData, docFilePath: string, text: string, wrapInlineCode: boolean = false): Node[] { let result = []; let currTextStart = 0; let matcher = new SplitNameMatcher(aggData.nameLookup.root); @@ -313,14 +278,14 @@ function handleLinksInBodyText(aggData, text: string, wrapInlineCode: boolean = .replace(/^[;:,\."']+/g, "") .replace(/[;:,\."']+$/g, ""); - let link = resolveTypeLink(aggData, word); + let link = resolveTypeLink(aggData, docFilePath, word); let matchStart; if (!link) { let match = matcher.nextWord(word.toLowerCase(), scanner.index); if (match && match[0]) { - link = resolveTypeLink(aggData, match[0].value); + link = resolveTypeLink(aggData, docFilePath, match[0].value); matchStart = match[0].startPos; } } else { @@ -368,7 +333,7 @@ function handleLinksInBodyText(aggData, text: string, wrapInlineCode: boolean = } -function resolveTypeLink(aggData, text): string { +function resolveTypeLink(aggData, docFilePath, text): string { let possTypeName = cleanTypeName(text); if (possTypeName === 'constructor') { @@ -384,12 +349,14 @@ function resolveTypeLink(aggData, text): string { if (classInfo) { let kebabName = ngHelpers.kebabifyClassName(possTypeName); let possDocFile = aggData.docFiles[kebabName]; - //let url = "../../lib/" + ref.sources[0].fileName; - let url = "../../" + classInfo.sourcePath; //"../../lib/" + classInfo.items[0].source.path; + //let url = "../../" + classInfo.sourcePath; + + let url = fixRelSrcUrl(docFilePath, classInfo.sourcePath); if (possDocFile) { - url = "../" + possDocFile; + //url = "../" + possDocFile; + url = fixRelDocUrl(docFilePath, possDocFile); } return url; @@ -400,6 +367,31 @@ function resolveTypeLink(aggData, text): string { } } +function fixRelSrcUrl(docPath: string, srcPath: string) { + let relDocPath = docPath.substring(docPath.indexOf('docs')); + let docPathSegments = relDocPath.split(/[\\\/]/); + let dotPathPart = ''; + + for (let i = 0; i < (docPathSegments.length - 1); i++) { + dotPathPart += '../'; + } + + return dotPathPart + srcPath; +} + +function fixRelDocUrl(docPathFrom: string, docPathTo: string) { + let relDocPathFrom = docPathFrom.substring(docPathFrom.indexOf('docs')); + let docPathSegments = relDocPathFrom.split(/[\\\/]/); + let dotPathPart = ''; + + console.log(`Fixing: ${docPathFrom} ${docPathTo}`); + + for (let i = 0; i < (docPathSegments.length - 2); i++) { + dotPathPart += '../'; + } + + return dotPathPart + docPathTo; +} function cleanTypeName(text) { let matches = text.match(/[a-zA-Z0-9_]+<([a-zA-Z0-9_]+)(\[\])?>/); diff --git a/tools/doc/tsconfig.json b/tools/doc/tsconfig.json new file mode 100644 index 0000000000..bafda39a9a --- /dev/null +++ b/tools/doc/tsconfig.json @@ -0,0 +1,18 @@ +{ + "compilerOptions": { + "outDir": ".", + "baseUrl": ".", + "moduleResolution": "node", + "noUnusedLocals": true, + "target": "es5", + "types": ["node", "@paperist/types-remark"], + "lib": [ + "es5" + ] + }, + "files": [ + "remarkGraphQl.ts", + "mqDefs.ts", + "tools/gqIndex.ts" + ] + } \ No newline at end of file