diff --git a/docs/README.md b/docs/README.md index 49cb631d8b..95e9401ce0 100644 --- a/docs/README.md +++ b/docs/README.md @@ -87,7 +87,6 @@ for more information about installing and using the source code. | [About GitHub Link Component](core/components/about-github-link.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which version of the application is running based on the latest GitHub commit, as well as the server settings for the application. | [Source](../lib/core/src/lib/about/about-github-link/about-github-link.component.ts) | | [About Product Version Component](core/components/about-product-version.component.md) ![Experimental](docassets/images/ExperimentalIcon.png) | Shows which version of Process Services (BPM) and Content Services (ECM) an application is running. It also shows the relevant license information, application status and Alfresco modules running in an application. | [Source](../lib/core/src/lib/about/about-product-version/about-product-version.component.ts) | | [About Component](core/components/about.component.md) | Presentational component to display About information as a set of collapsible panels. | [Source](../lib/core/src/lib/about/about.component.ts) | -| [Buttons Menu Component](core/components/buttons-menu.component.md) | Displays buttons on a responsive menu. | [Source](../lib/core/src/lib/buttons-menu/buttons-menu.component.ts) | | [Card View component](core/components/card-view.component.md) | Displays a configurable property list renderer. | [Source](../lib/core/src/lib/card-view/components/card-view/card-view.component.ts) | | [Comment list component](core/components/comment-list.component.md) | Shows a list of comments. | [Source](../lib/core/src/lib/comments/comment-list/comment-list.component.ts) | | [Comments Component](core/components/comments.component.md) | Displays comments from users involved in a specified environment and allows an involved user to add a comment to a environment. | [Source](../lib/core/src/lib/comments/comments.component.ts) | @@ -277,7 +276,7 @@ for more information about installing and using the source code. | [Breadcrumb Component](content-services/components/breadcrumb.component.md) | Indicates the current position within a navigation hierarchy. | [Source](../lib/content-services/src/lib/breadcrumb/breadcrumb.component.ts) | | [Content Action component](content-services/components/content-action.component.md) | Adds options to a Document List actions menu for a particular content type. | [Source](../lib/content-services/src/lib/document-list/components/content-action/content-action.component.ts) | | [Content Metadata Card component](content-services/components/content-metadata-card.component.md) | Displays and edits metadata related to a node. | [Source](../lib/content-services/src/lib/content-metadata/components/content-metadata-card/content-metadata-card.component.ts) | -| [Content Node Selector Panel component](content-services/components/content-node-selector-panel.component.md) | Opens a Content Node Selector in its own dialog window. | [Source](../lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts) | +| [Content Node Selector Panel component](content-services/components/content-node-selector-panel.component.md) | Opens a Content Node Selector in its own dialog window. | [Source](../lib/content-services/src/lib/content-node-selector/content-node-selector-panel/content-node-selector-panel.component.ts) | | [Content Node Selector component](content-services/components/content-node-selector.component.md) | Allows a user to select items from a Content Services repository. | [Source](../lib/content-services/src/lib/content-node-selector/content-node-selector.component.ts) | | [Content Type Dialog component](content-services/components/content-type-dialog.component.md) | Confirm dialog when user changes content type of a node. | [Source](../lib/content-services/src/lib/content-type/content-type-dialog.component.ts) | | [Content User Info component](content-services/components/content-user-info.component.md) | Shows user information for CONTENT and CONTENT_SSO mode. | [Source](../lib/content-services/src/lib/content-user-info/content-user-info.component.ts) | @@ -307,7 +306,7 @@ for more information about installing and using the source code. | [Search Sorting Picker Component](content-services/components/search-sorting-picker.component.md) | Provides an ability to select one of the predefined sorting definitions for search results: | [Source](../lib/content-services/src/lib/search/components/search-sorting-picker/search-sorting-picker.component.ts) | | [Search text component](content-services/components/search-text.component.md) | Implements a text input widget for the Search Filter component. | [Source](../lib/content-services/src/lib/search/components/search-text/search-text.component.ts) | | [Search component](content-services/components/search.component.md) | Searches items for supplied search terms. | [Source](../lib/content-services/src/lib/search/components/search.component.ts) | -| [Sites Dropdown component](content-services/components/sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../lib/content-services/src/lib/site-dropdown/sites-dropdown.component.ts) | +| [Sites Dropdown component](content-services/components/sites-dropdown.component.md) | Displays a dropdown menu to show and interact with the sites of the current user. | [Source](../lib/content-services/src/lib/content-node-selector/site-dropdown/sites-dropdown.component.ts) | | [Tag Node Actions List component](content-services/components/tag-actions.component.md) | Shows available actions for tags. | [Source](../lib/content-services/src/lib/tag/tag-actions.component.ts) | | [Tag List component](content-services/components/tag-list.component.md) | Shows tags for an item. | [Source](../lib/content-services/src/lib/tag/tag-list.component.ts) | | [Tag Node List component](content-services/components/tag-node-list.component.md) | Shows tags for a node. | [Source](../lib/content-services/src/lib/tag/tag-node-list.component.ts) | diff --git a/docs/content-services/components/content-node-selector-panel.component.md b/docs/content-services/components/content-node-selector-panel.component.md index c0911b7377..ffa337556d 100644 --- a/docs/content-services/components/content-node-selector-panel.component.md +++ b/docs/content-services/components/content-node-selector-panel.component.md @@ -2,10 +2,10 @@ Title: Content Node Selector Panel component Added: v2.1.0 Status: Active -Last reviewed: 2019-03-20 +Last reviewed: 2024-06-21 --- -# [Content Node Selector Panel component](../../../lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts "Defined in content-node-selector-panel.component.ts") +# Content Node Selector Panel Component Opens a [Content Node Selector](content-node-selector.component.md) in its own dialog window. @@ -28,50 +28,53 @@ Opens a [Content Node Selector](content-node-selector.component.md) in its own ### Properties -| Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| breadcrumbTransform | `Function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. | -| currentFolderId | `string` | null | Node ID of the folder currently listed. | -| dropdownHideMyFiles | `boolean` | false | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | -| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | Custom site for site dropdown. This is the same as the `siteList`. property of the Sites Dropdown component (see its doc page for more information). | -| imageResolver | [`ImageResolver`](../../../lib/content-services/src/lib/document-list/data/image-resolver.model.ts) | null | Custom image resolver function. See the [Image Resolver Model](image-resolver.model.md) page for more information. | -| isSelectionValid | [`ValidationFunction`](../../../lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts) | defaultValidation | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. | -| pageSize | `number` | | Number of items shown per page in the list. | -| restrictRootToCurrentFolderId | `boolean` | false | If true will restrict the search and breadcrumbs to the currentFolderId | -| selectionMode | `"single" \| "multiple"` | "single" | Define the selection mode for document list. The allowed values are single or multiple | -| where | `string` | | Custom _where_ filter function. See the [Document List component](../../content-services/components/document-list.component.md) for more information. | -| excludeSiteContent | `string[]` | | Custom list of site content componentIds. Used to filter out the corresponding items from the displayed nodes | -| rowFilter | [`RowFilter`](../../../lib/content-services/src/lib/document-list/data/row-filter.model.ts) | | Custom row filter function. See the [Row Filter Model](row-filter.model.md) page for more information. | -| showDropdownSiteList | `boolean` | | Toggle sites list dropdown rendering | -| showFilesInResult | `void` | | Shows the files and folders in the search result | -| showNodeCounter | `boolean` | | Shows the node counter in the breadcrumb | -| showSearch | `boolean` | | Toggle search input rendering | +| Name | Type | Default value | Description | +|-------------------------------|--------------------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| breadcrumbTransform | `Function` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. | +| currentFolderId | `string` | null | Node ID of the folder currently listed. | +| dropdownHideMyFiles | `boolean` | false | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | +| dropdownSiteList | `SitePaging` | null | Custom site for site dropdown. This is the same as the `siteList`. property of the Sites Dropdown component (see its doc page for more information). | +| imageResolver | `ImageResolver` | null | Custom image resolver function. See the [Image Resolver Model](../models/image-resolver.model.md) page for more information. | +| isSelectionValid | `ValidationFunction` | defaultValidation | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. | +| pageSize | `number` | | Number of items shown per page in the list. | +| restrictRootToCurrentFolderId | `boolean` | false | If true will restrict the search and breadcrumbs to the currentFolderId | +| selectionMode | `"single" \| "multiple"` | "single" | Define the selection mode for document list. The allowed values are single or multiple | +| where | `string` | | Custom _where_ filter function. See the [Document List component](../../content-services/components/document-list.component.md) for more information. | +| excludeSiteContent | `string[]` | | Custom list of site content componentIds. Used to filter out the corresponding items from the displayed nodes | +| rowFilter | `RowFilter` | | Custom row filter function. See the [Row Filter Model](row-filter.model.md) page for more information. | +| showDropdownSiteList | `boolean` | | Toggle sites list dropdown rendering | +| showFilesInResult | `void` | | Shows the files and folders in the search result | +| showNodeCounter | `boolean` | | Shows the node counter in the breadcrumb | +| showSearch | `boolean` | | Toggle search input rendering | ### Events -| Name | Type | Description | -| ---- | ---- | ----------- | -| currentFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when current folder loaded. | -| folderLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when folder loaded. | -| navigationChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`NodeEntryEvent`](../../../lib/content-services/src/lib/document-list/components/node.event.ts)`>` | Emitted when the navigation changes. | -| select | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the user has chosen an item. | -| showingSearch | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when search is running. | -| siteChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`` | Emitted when the select site changes. | +| Name | Type | Description | +|------------------|--------------------------------|-------------------------------------------| +| currentFolder | `EventEmitter` | Emitted when current folder loaded. | +| folderLoaded | `EventEmitter` | Emitted when folder loaded. | +| navigationChange | `EventEmitter` | Emitted when the navigation changes. | +| select | `EventEmitter` | Emitted when the user has chosen an item. | +| showingSearch | `EventEmitter` | Emitted when search is running. | +| siteChange | `EventEmitter` | Emitted when the select site changes. | ## Details This component opens a _content node selector_ in its own dialog window. This behaves a lot like the standard file open/save dialogs used by applications to choose files. Full details are given in the [Content Node Selector component](content-node-selector.component.md) page (this is similar but does -not manage the dialog window for you). Also, the -[Content Node Dialog service](../services/content-node-dialog.service.md) has several methods that give you +not manage the dialog window for you). + +Also, the [Content Node Dialog service](../services/content-node-dialog.service.md) has several methods that give you finer control over the behavior of the dialog. ### Using the breadcrumbTransform function -The `breadcrumbTransform` property lets you modify the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/Node.md) object that is used to generate the +The `breadcrumbTransform` property lets you modify the `Node` object that is used to generate the list of breadcrumbs. You can use this, for example, to remove path elements that are not -relevant to the use case. See the [Breadcrumb component](breadcrumb.component.md) page for an +relevant to the use case. + +See the [Breadcrumb component](breadcrumb.component.md) page for an example of how to use this function. ## See also diff --git a/docs/content-services/components/content-node-selector.component.md b/docs/content-services/components/content-node-selector.component.md index 9551813a63..0b043e55b9 100644 --- a/docs/content-services/components/content-node-selector.component.md +++ b/docs/content-services/components/content-node-selector.component.md @@ -5,7 +5,7 @@ Status: Active Last reviewed: 2019-01-16 --- -# [Content Node Selector component](../../../lib/content-services/src/lib/content-node-selector/content-node-selector.component.ts "Defined in content-node-selector.component.ts") +# Content Node Selector component Allows a user to select items from a Content Services repository. @@ -15,19 +15,18 @@ Allows a user to select items from a Content Services repository. The [Content Node Selector component](content-node-selector.component.md) works a lot like the standard File Open/Save dialog used by desktop applications except that it chooses items from a Content Services -repository rather than the filesystem. For example, the -[Document List component](document-list.component.md) uses a selector to choose the targets -of Copy/Move actions (see the [Content Action component](content-action.component.md) for -more information). +repository rather than the filesystem. + +For example, the [Document List component](document-list.component.md) uses a selector to choose the targets +of Copy/Move actions (see the [Content Action component](content-action.component.md) for more information). ### Showing the dialog Unlike most components, the [Content Node Selector Component](content-node-selector.component.md) is typically shown in a dialog box -rather than the main page and you are responsible for opening the dialog yourself. You can use the -[Angular Material Dialog](https://material.angular.io/components/dialog/overview) for this, -as shown in the usage example. ADF provides the [`ContentNodeSelectorComponentData`](../../../lib/content-services/src/lib/content-node-selector/content-node-selector.component-data.interface.ts) interface -to work with the Dialog's -[data option](https://material.angular.io/components/dialog/overview#sharing-data-with-the-dialog-component-): +rather than the main page, and you are responsible for opening the dialog yourself. + +You can use the [Angular Material Dialog](https://material.angular.io/components/dialog/overview) for this, as shown in the usage example. +ADF provides the `ContentNodeSelectorComponentData` interface to work with the Dialog [data option](https://material.angular.io/components/dialog/overview#sharing-data-with-the-dialog-component-): ```ts export interface ContentNodeSelectorComponentData { @@ -55,22 +54,22 @@ export interface ContentNodeSelectorComponentData { The properties are described in the table below: -| Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| title | `string` | "" | Dialog title | -| actionName | `string` | "" | Text to appear on the dialog's main action button ("Move", "Copy", etc) | -| currentFolderId | `string` | `null` | [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/Node.md) ID of the folder currently listed. | -| dropdownHideMyFiles | `boolean` | `false` | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | -| dropdownSiteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | -| rowFilter | [`RowFilter`](../../../lib/content-services/src/lib/document-list/data/row-filter.model.ts) | `null` | Custom row filter function. See the [Row Filter Model](../models/row-filter.model.md) page for more information. | -| where | `string` | `null` | Custom _where_ filter function. See the [Document List component](document-list.component.md) for more information. | -| imageResolver | [`ImageResolver`](../../../lib/content-services/src/lib/document-list/data/image-resolver.model.ts) | `null` | Custom image resolver function. See the [Image Resolver Model](../models/image-resolver.model.md) page for more information. | -| pageSize | `number` | | Number of items shown per page in the list. | -| isSelectionValid | [`ValidationFunction`](../../../lib/content-services/src/lib/content-node-selector/content-node-selector-panel.component.ts) | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. | -| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. | -| select | [`Subject`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/Node.md) | | Event emitted with the current node selection when the dialog closes | -| showSearch | `boolean` | `true` | Render search input | -| showDropdownSiteList | `boolean` | `true` | Render sites list dropdown menu | +| Name | Type | Default value | Description | +|----------------------|----------------------|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| title | `string` | "" | Dialog title | +| actionName | `string` | "" | Text to appear on the dialog's main action button ("Move", "Copy", etc) | +| currentFolderId | `string` | `null` | The ID of the folder node currently listed. | +| dropdownHideMyFiles | `boolean` | `false` | Hide the "My Files" option added to the site list by default. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | +| dropdownSiteList | `SitePaging` | `null` | Custom site for site dropdown same as siteList. See the [Sites Dropdown component](sites-dropdown.component.md) for more information. | +| rowFilter | `RowFilter` | `null` | Custom row filter function. See the [Row Filter Model](../models/row-filter.model.md) page for more information. | +| where | `string` | `null` | Custom _where_ filter function. See the [Document List component](document-list.component.md) for more information. | +| imageResolver | `ImageResolver` | `null` | Custom image resolver function. See the [Image Resolver Model](../models/image-resolver.model.md) page for more information. | +| pageSize | `number` | | Number of items shown per page in the list. | +| isSelectionValid | `ValidationFunction` | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. | +| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. | +| select | `Subject` | | Event emitted with the current node selection when the dialog closes | +| showSearch | `boolean` | `true` | Render search input | +| showDropdownSiteList | `boolean` | `true` | Render sites list dropdown menu | If you don't want to manage the dialog yourself then it is easier to use the [Content Node Selector Panel component](content-node-selector-panel.component.md), or the @@ -81,65 +80,65 @@ the dialog for you. ```ts import { MatDialog } from '@angular/material/dialog'; -import { ContentNodeSelectorComponentData, ContentNodeSelectorComponent} from '@adf/content-services' +import { ContentNodeSelectorComponentData, ContentNodeSelectorComponent} from '@adf/content-services'; import { Subject } from 'rxjs/Subject'; - ... -constructor(dialog: MatDialog ... ) {} +export class MyComponent { + constructor(dialog: MatDialog) { + } -openSelectorDialog() { - data: ContentNodeSelectorComponentData = { - title: "Choose an item", - actionName: "Choose", - currentFolderId: someFolderId, - select: new Subject() - }; + openSelectorDialog() { + data: ContentNodeSelectorComponentData = { + title: "Choose an item", + actionName: "Choose", + currentFolderId: someFolderId, + select: new Subject() + }; - this.dialog.open( - ContentNodeSelectorComponent, - { - data, panelClass: 'adf-content-node-selector-dialog', - width: '630px' - } - ); + this.dialog.open( + ContentNodeSelectorComponent, + { + data, panelClass: 'adf-content-node-selector-dialog', + width: '630px' + } + ); - data.select.subscribe((selections: Node[]) => { - // Use or store selection... - }, - (error)=>{ - //your error handling - }, - ()=>{ - //action called when an action or cancel is clicked on the dialog - this.dialog.closeAll(); - }); + data.select.subscribe((selections: Node[]) => { + // Use or store selection... + }, + (error) => { + //your error handling + }, + () => { + //action called when an action or cancel is clicked on the dialog + this.dialog.closeAll(); + }); + } } ``` -All the results will be streamed to the select [subject](http://reactivex.io/rxjs/manual/overview.html#subject) present in the [`ContentNodeSelectorComponentData`](../../../lib/content-services/src/lib/content-node-selector/content-node-selector.component-data.interface.ts) object passed to the dialog. +All the results will be streamed to the select `subject` present in the `ContentNodeSelectorComponentData` object passed to the dialog. When the dialog action is selected by clicking, the `data.select` stream will be completed. ### RowFilter and ImageResolver -The [Content Node Selector](content-node-selector.component.md) uses a -[Document List](document-list.component.md) to display the -items that the user can choose. As with the standard Document List, you can supply a custom -**row filter** function (to hide items that can't be chosen) and a custom **image resolver** -function (to select an image to show in a particular list cell). For example, you could use -a row filter to hide document nodes in a folder selector. See the -[Row Filter Model](../models/row-filter.model.md) and [Image Resolver Model](../models/image-resolver.model.md) -pages for more information. +The [Content Node Selector](content-node-selector.component.md) uses a [Document List](document-list.component.md) to display the items that the user can choose. +As with the standard Document List, you can supply a custom **row filter** function (to hide items that can't be chosen) and a custom **image resolver** +function (to select an image to show in a particular list cell). + +For example, you could use a row filter to hide document nodes in a folder selector. +See the [Row Filter Model](../models/row-filter.model.md) and [Image Resolver Model](../models/image-resolver.model.md) pages for more information. ### Using the breadcrumbTransform function -The `breadcrumbTransform` property of [`ContentNodeSelectorComponentData`](../../../lib/content-services/src/lib/content-node-selector/content-node-selector.component-data.interface.ts) lets you modify -the [`Node`](https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/docs/Node.md) object that is used to generate the -list of breadcrumbs. You can use this, for example, to remove path elements that are not -relevant to the use case. See the [Breadcrumb component](breadcrumb.component.md) page for an -example of how to use this function. +The `breadcrumbTransform` property of `ContentNodeSelectorComponentData` lets you modify +the `Node` object that is used to generate the list of breadcrumbs. + +You can use this, for example, to remove path elements that are not relevant to the use case. +See the [Breadcrumb component](breadcrumb.component.md) page for an example of how to use this function. ## See also -- [Document list component](document-list.component.md) +- [Document List Component](document-list.component.md) - [Content Node Selector Panel component](content-node-selector-panel.component.md) - [Content Node Dialog service](../services/content-node-dialog.service.md) diff --git a/docs/content-services/components/document-list.component.md b/docs/content-services/components/document-list.component.md index a80659351e..83ffaced9c 100644 --- a/docs/content-services/components/document-list.component.md +++ b/docs/content-services/components/document-list.component.md @@ -66,6 +66,7 @@ Displays the documents from a repository. | contentActionsPosition | `string` | "right" | Position of the content actions dropdown menu. Can be set to "left" or "right". | | contextMenuActions | `boolean` | false | Toggles context menus for each row | | currentFolderId | `string` | null | The ID of the folder node to display or a reserved string alias for special sources | +| displayCheckboxesOnHover | `boolean` | false | Enables checkboxes in datatable rows being displayed on hover only. | | emptyFolderImageUrl | `string` | | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' | | filterValue | `any` | | Initial value for filter. | | headerFilters | `boolean` | false | Toggles the header filters mode. | diff --git a/docs/content-services/components/sites-dropdown.component.md b/docs/content-services/components/sites-dropdown.component.md index 1c558b8c7e..6168333e84 100644 --- a/docs/content-services/components/sites-dropdown.component.md +++ b/docs/content-services/components/sites-dropdown.component.md @@ -1,11 +1,4 @@ ---- -Title: Sites Dropdown component -Added: v2.0.0 -Status: Active -Last reviewed: 2018-11-19 ---- - -# [Sites Dropdown component](../../../lib/content-services/src/lib/site-dropdown/sites-dropdown.component.ts "Defined in sites-dropdown.component.ts") +# Sites Dropdown component Displays a dropdown menu to show and interact with the sites of the current user. @@ -19,20 +12,24 @@ Displays a dropdown menu to show and interact with the sites of the current user ``` -## Class members +## API + +```ts +import { SitesDropdownComponent } from '@alfresco/adf-content-services'; +``` ### Properties -| Name | Type | Default value | Description | -| ---- | ---- | ------------- | ----------- | -| hideMyFiles | `boolean` | false | Hide the "My Files" option. | -| placeholder | `string` | | Text or a translation key to act as a placeholder. Default value is the key "DROPDOWN.PLACEHOLDER_LABEL". | -| relations | `string` | | Filter for the results of the sites query. Possible values are "members" and "containers". When "members" is used, the site list will be restricted to the sites that the user is a member of. | -| siteList | [`SitePaging`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SitePaging.md) | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. | -| value | `string` | null | Id of the selected site | +| Name | Type | Default value | Description | +|-------------|--------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| hideMyFiles | `boolean` | false | Hide the "My Files" option. | +| placeholder | `string` | | Text or a translation key to act as a placeholder. Default value is the key "DROPDOWN.PLACEHOLDER_LABEL". | +| relations | `string` | | Filter for the results of the sites query. Possible values are "members" and "containers". When "members" is used, the site list will be restricted to the sites that the user is a member of. | +| siteList | `SitePaging` | null | A custom list of sites to be displayed by the dropdown. If no value is given, the sites of the current user are displayed by default. A list of objects only with properties 'title' and 'guid' is enough to be able to display the dropdown. | +| value | `string` | null | Id of the selected site | ### Events -| Name | Type | Description | -| ---- | ---- | ----------- | -| change | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`SiteEntry`](https://github.com/Alfresco/alfresco-js-api/blob/master/src/alfresco-core-rest-api/docs/SiteEntry.md)`>` | Emitted when the user selects a site. When the default option is selected, an empty model is emitted. | +| Name | Type | Description | +|--------|---------------------------|-------------------------------------------------------------------------------------------------------| +| change | `EventEmitter` | Emitted when the user selects a site. When the default option is selected, an empty model is emitted. | diff --git a/docs/content-services/models/image-resolver.model.md b/docs/content-services/models/image-resolver.model.md index 53b0f3309c..0b82271b21 100644 --- a/docs/content-services/models/image-resolver.model.md +++ b/docs/content-services/models/image-resolver.model.md @@ -1,36 +1,30 @@ ---- -Title: Image Resolver Model -Added: v2.0.0 -Status: Active -Last reviewed: 2019-02-08 ---- - -# [Image Resolver Model](../../../lib/content-services/document-list/data/image-resolver.model.ts "Defined in image-resolver.model.ts") +# Image Resolver Model Defines the Image Resolver function used by the [Document List Component](../components/document-list.component.md). ## Definitions -- `type` **[`ImageResolver`](../../../lib/content-services/src/lib/document-list/data/image-resolver.model.ts)** = (row: [`DataRow`](../../../lib/core/src/lib/datatable/data/data-row.model.ts), column: [`DataColumn`](../../../lib/core/src/lib/datatable/data/data-column.model.ts)) => `string` - - _row:_ [`DataRow`](../../../lib/core/src/lib/datatable/data/data-row.model.ts) - Data that defines the row - - _column:_ [`DataColumn`](../../../lib/core/src/lib/datatable/data/data-column.model.ts) - Data that defines the column +- `type` **ImageResolver** = (row: `DataRow`, column: `DataColumn`) => `string` + - _row:_ `DataRow` - Data that defines the row + - _column:_ `DataColumn` - Data that defines the column - **Returns** File path for the image ## Details -An image resolver function selects an image file path for an item in -a [Document List Component](../components/document-list.component.md) -or another component that uses the Document List (such as the -[Content Node Selector Panel Component](../components/content-node-selector-panel.component.md)). You can supply your own image resolver -to manage the way folder/file icons and thumbnails are resolved (ie, which image is shown for which item). +An image resolver function selects an image file path for an item in a [Document List Component](../components/document-list.component.md) +or another component that uses the Document List (such as the [Content Node Selector Panel Component](../components/content-node-selector-panel.component.md)). + +You can supply your own image resolver to manage the way folder/file icons and thumbnails are resolved (ie, which image is shown for which item). **Note:** Image resolvers are executed only for columns of the `image` type. -A typical image resolver implementation receives [`DataRow`](../../../lib/core/src/lib/datatable/data/data-row.model.ts) and [`DataColumn`](../../../lib/core/src/lib/datatable/data/data-column.model.ts) objects as parameters: +A typical image resolver implementation receives `DataRow` and `DataColumn` objects as parameters: ```ts -myImageResolver(row: DataRow, col: DataColumn): string { - return '/path/to/image'; +export class MyComponent { + myImageResolver(row: DataRow, col: DataColumn): string { + return '/path/to/image'; + } } ``` @@ -74,15 +68,13 @@ export class View1 { let name = row.getValue(col.key); // Format image url - return `http:///${name}`; + return `https:///${name}`; } // For the rest of the cases just fallback to default behaviour. return null; }; - } - } ``` diff --git a/docs/core/components/datatable.component.md b/docs/core/components/datatable.component.md index 7c6bdb5494..9726f4226c 100644 --- a/docs/core/components/datatable.component.md +++ b/docs/core/components/datatable.component.md @@ -429,6 +429,8 @@ Learn more about styling your datatable: [Customizing the component's styles](#c | columns | `any[]` | \[] | The columns that the datatable will show. | | contextMenu | `boolean` | false | Toggles custom context menu for the component. | | data | [`DataTableAdapter`](../../../lib/core/src/lib/datatable/data/datatable-adapter.ts) | | Data source for the table | +| displayCheckboxesOnHover | `boolean` | false | Enables checkboxes in datatable rows being displayed on hover only. | + | fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. | | isResizingEnabled | `boolean` | false | Flag that indicates if the datatable allows column resizing. | | loading | `boolean` | false | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). | diff --git a/docs/core/components/viewer.component.md b/docs/core/components/viewer.component.md index 83bd0b9ccf..05c9b9e40c 100644 --- a/docs/core/components/viewer.component.md +++ b/docs/core/components/viewer.component.md @@ -75,6 +75,7 @@ See the [Custom layout](#custom-layout) section for full details of all availabl | originalMimeType | `string` | | Overload originalMimeType | | overlayMode | `boolean` | false | If `true` then show the Viewer as a full page over the current content. Otherwise fit inside the parent div. | | readOnly | `boolean` | true | Enable when where is possible the editing functionalities | +| allowedEditActions | `{ [key: string]: boolean }` | `{ rotate: true, crop: true }` | Controls which editing actions are enabled when not in read-only mode. Allows granular control over actions like rotation and cropping. | | showLeftSidebar | `boolean` | false | Toggles left sidebar visibility. Requires `allowLeftSidebar` to be set to `true`. | | showRightSidebar | `boolean` | false | Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. | | showToolbar | `boolean` | true | Hide or show the toolbar | diff --git a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html index 5c9522ac86..fd82fdf2f7 100644 --- a/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html +++ b/lib/content-services/src/lib/content-metadata/components/content-metadata/content-metadata.component.html @@ -101,7 +101,7 @@