mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-09-17 14:21:29 +00:00
Merge remote-tracking branch 'origin/dev-valbano-ng15-start' into AAE-23572-recreate-js-api-lib-into-a-proper-nx-workspace-lib
This commit is contained in:
@@ -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)  | 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 GitHub Link Component](core/components/about-github-link.component.md)  | 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)  | 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 Product Version Component](core/components/about-product-version.component.md)  | 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) |
|
| [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) |
|
| [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) |
|
| [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) |
|
| [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) |
|
| [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 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 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 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 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) |
|
| [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 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 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) |
|
| [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 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 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) |
|
| [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) |
|
||||||
|
@@ -2,10 +2,10 @@
|
|||||||
Title: Content Node Selector Panel component
|
Title: Content Node Selector Panel component
|
||||||
Added: v2.1.0
|
Added: v2.1.0
|
||||||
Status: Active
|
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.
|
Opens a [Content Node Selector](content-node-selector.component.md) in its own dialog window.
|
||||||
|
|
||||||
@@ -29,19 +29,19 @@ Opens a [Content Node Selector](content-node-selector.component.md) in its own
|
|||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default value | Description |
|
| 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. |
|
| 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. |
|
| 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. |
|
| 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). |
|
| 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`](../../../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. |
|
| imageResolver | `ImageResolver` | null | Custom image resolver function. See the [Image Resolver Model](../models/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. |
|
| 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. |
|
| 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 |
|
| 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 |
|
| 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. |
|
| 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 |
|
| 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. |
|
| 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 |
|
| showDropdownSiteList | `boolean` | | Toggle sites list dropdown rendering |
|
||||||
| showFilesInResult | `void` | | Shows the files and folders in the search result |
|
| showFilesInResult | `void` | | Shows the files and folders in the search result |
|
||||||
| showNodeCounter | `boolean` | | Shows the node counter in the breadcrumb |
|
| showNodeCounter | `boolean` | | Shows the node counter in the breadcrumb |
|
||||||
@@ -50,28 +50,31 @@ Opens a [Content Node Selector](content-node-selector.component.md) in its own
|
|||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ---- | ---- | ----------- |
|
|------------------|--------------------------------|-------------------------------------------|
|
||||||
| currentFolder | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node>` | Emitted when current folder loaded. |
|
| currentFolder | `EventEmitter<Node>` | Emitted when current folder loaded. |
|
||||||
| folderLoaded | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<any>` | Emitted when folder loaded. |
|
| folderLoaded | `EventEmitter<any>` | 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. |
|
| navigationChange | `EventEmitter<NodeEntryEvent>` | Emitted when the navigation changes. |
|
||||||
| select | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Node[]>` | Emitted when the user has chosen an item. |
|
| select | `EventEmitter<Node[]>` | Emitted when the user has chosen an item. |
|
||||||
| showingSearch | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<boolean>` | Emitted when search is running. |
|
| showingSearch | `EventEmitter<boolean>` | Emitted when search is running. |
|
||||||
| siteChange | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<string>` | Emitted when the select site changes. |
|
| siteChange | `EventEmitter<string>` | Emitted when the select site changes. |
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
This component opens a _content node selector_ in its own dialog window. This behaves a lot like the
|
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
|
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
|
[Content Node Selector component](content-node-selector.component.md) page (this is similar but does
|
||||||
not manage the dialog window for you). Also, the
|
not manage the dialog window for you).
|
||||||
[Content Node Dialog service](../services/content-node-dialog.service.md) has several methods that give 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.
|
finer control over the behavior of the dialog.
|
||||||
|
|
||||||
### Using the breadcrumbTransform function
|
### 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
|
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.
|
example of how to use this function.
|
||||||
|
|
||||||
## See also
|
## See also
|
||||||
|
@@ -5,7 +5,7 @@ Status: Active
|
|||||||
Last reviewed: 2019-01-16
|
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.
|
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
|
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
|
dialog used by desktop applications except that it chooses items from a Content Services
|
||||||
repository rather than the filesystem. For example, the
|
repository rather than the filesystem.
|
||||||
[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
|
For example, the [Document List component](document-list.component.md) uses a selector to choose the targets
|
||||||
more information).
|
of Copy/Move actions (see the [Content Action component](content-action.component.md) for more information).
|
||||||
|
|
||||||
### Showing the dialog
|
### Showing the dialog
|
||||||
|
|
||||||
Unlike most components, the [Content Node Selector Component](content-node-selector.component.md) is typically shown in a dialog box
|
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
|
rather than the main page, and you are responsible for opening the dialog yourself.
|
||||||
[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
|
You can use the [Angular Material Dialog](https://material.angular.io/components/dialog/overview) for this, as shown in the usage example.
|
||||||
to work with the Dialog's
|
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-):
|
||||||
[data option](https://material.angular.io/components/dialog/overview#sharing-data-with-the-dialog-component-):
|
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
export interface ContentNodeSelectorComponentData {
|
export interface ContentNodeSelectorComponentData {
|
||||||
@@ -56,19 +55,19 @@ export interface ContentNodeSelectorComponentData {
|
|||||||
The properties are described in the table below:
|
The properties are described in the table below:
|
||||||
|
|
||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
|----------------------|----------------------|---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| title | `string` | "" | Dialog title |
|
| title | `string` | "" | Dialog title |
|
||||||
| actionName | `string` | "" | Text to appear on the dialog's main action button ("Move", "Copy", etc) |
|
| 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. |
|
| 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. |
|
| 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. |
|
| 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`](../../../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. |
|
| 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. |
|
| 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. |
|
| 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. |
|
| 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. |
|
| isSelectionValid | `ValidationFunction` | `defaultValidation` | Function used to decide if the selected node has permission to be selected. Default value is a function that always returns true. |
|
||||||
| breadcrumbTransform | `(node: any) => any` | | Transformation to be performed on the chosen/folder node before building the breadcrumb UI. Can be useful when custom formatting is needed for the breadcrumb. You can change the path elements from the node that are used to build the breadcrumb using this function. |
|
| breadcrumbTransform | `(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<Node>`](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 |
|
| select | `Subject<Node>` | | Event emitted with the current node selection when the dialog closes |
|
||||||
| showSearch | `boolean` | `true` | Render search input |
|
| showSearch | `boolean` | `true` | Render search input |
|
||||||
| showDropdownSiteList | `boolean` | `true` | Render sites list dropdown menu |
|
| showDropdownSiteList | `boolean` | `true` | Render sites list dropdown menu |
|
||||||
|
|
||||||
@@ -81,11 +80,12 @@ the dialog for you.
|
|||||||
|
|
||||||
```ts
|
```ts
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
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';
|
import { Subject } from 'rxjs/Subject';
|
||||||
...
|
|
||||||
|
|
||||||
constructor(dialog: MatDialog ... ) {}
|
export class MyComponent {
|
||||||
|
constructor(dialog: MatDialog) {
|
||||||
|
}
|
||||||
|
|
||||||
openSelectorDialog() {
|
openSelectorDialog() {
|
||||||
data: ContentNodeSelectorComponentData = {
|
data: ContentNodeSelectorComponentData = {
|
||||||
@@ -114,32 +114,31 @@ openSelectorDialog() {
|
|||||||
this.dialog.closeAll();
|
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.
|
When the dialog action is selected by clicking, the `data.select` stream will be completed.
|
||||||
|
|
||||||
### RowFilter and ImageResolver
|
### RowFilter and ImageResolver
|
||||||
|
|
||||||
The [Content Node Selector](content-node-selector.component.md) uses a
|
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.
|
||||||
[Document List](document-list.component.md) to display the
|
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**
|
||||||
items that the user can choose. As with the standard Document List, you can supply a custom
|
function (to select an image to show in a particular list cell).
|
||||||
**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
|
For example, you could use a row filter to hide document nodes in a folder selector.
|
||||||
a row filter to hide document nodes in a folder selector. See the
|
See the [Row Filter Model](../models/row-filter.model.md) and [Image Resolver Model](../models/image-resolver.model.md) pages for more information.
|
||||||
[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
|
### 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 `breadcrumbTransform` property of `ContentNodeSelectorComponentData` 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 `Node` object that is used to generate the list of breadcrumbs.
|
||||||
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
|
You can use this, for example, to remove path elements that are not relevant to the use case.
|
||||||
example of how to use this function.
|
See the [Breadcrumb component](breadcrumb.component.md) page for an example of how to use this function.
|
||||||
|
|
||||||
## See also
|
## 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 Selector Panel component](content-node-selector-panel.component.md)
|
||||||
- [Content Node Dialog service](../services/content-node-dialog.service.md)
|
- [Content Node Dialog service](../services/content-node-dialog.service.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". |
|
| 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 |
|
| 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 |
|
| 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' |
|
| emptyFolderImageUrl | `string` | | Custom image for empty folder. Default value: './assets/images/empty_doc_lib.svg' |
|
||||||
| filterValue | `any` | | Initial value for filter. |
|
| filterValue | `any` | | Initial value for filter. |
|
||||||
| headerFilters | `boolean` | false | Toggles the header filters mode. |
|
| headerFilters | `boolean` | false | Toggles the header filters mode. |
|
||||||
|
@@ -1,11 +1,4 @@
|
|||||||
---
|
# Sites Dropdown component
|
||||||
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")
|
|
||||||
|
|
||||||
Displays a dropdown menu to show and interact with the sites of the current user.
|
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
|
|||||||
</adf-sites-dropdown>
|
</adf-sites-dropdown>
|
||||||
```
|
```
|
||||||
|
|
||||||
## Class members
|
## API
|
||||||
|
|
||||||
|
```ts
|
||||||
|
import { SitesDropdownComponent } from '@alfresco/adf-content-services';
|
||||||
|
```
|
||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
| Name | Type | Default value | Description |
|
| Name | Type | Default value | Description |
|
||||||
| ---- | ---- | ------------- | ----------- |
|
|-------------|--------------|---------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| hideMyFiles | `boolean` | false | Hide the "My Files" option. |
|
| 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". |
|
| 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. |
|
| 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. |
|
| 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 |
|
| value | `string` | null | Id of the selected site |
|
||||||
|
|
||||||
### Events
|
### Events
|
||||||
|
|
||||||
| Name | Type | Description |
|
| 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. |
|
| change | `EventEmitter<SiteEntry>` | Emitted when the user selects a site. When the default option is selected, an empty model is emitted. |
|
||||||
|
@@ -1,37 +1,31 @@
|
|||||||
---
|
# Image Resolver Model
|
||||||
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")
|
|
||||||
|
|
||||||
Defines the Image Resolver function used by the [Document List Component](../components/document-list.component.md).
|
Defines the Image Resolver function used by the [Document List Component](../components/document-list.component.md).
|
||||||
|
|
||||||
## Definitions
|
## 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`
|
- `type` **ImageResolver** = (row: `DataRow`, column: `DataColumn`) => `string`
|
||||||
- _row:_ [`DataRow`](../../../lib/core/src/lib/datatable/data/data-row.model.ts) - Data that defines the row
|
- _row:_ `DataRow` - Data that defines the row
|
||||||
- _column:_ [`DataColumn`](../../../lib/core/src/lib/datatable/data/data-column.model.ts) - Data that defines the column
|
- _column:_ `DataColumn` - Data that defines the column
|
||||||
- **Returns** File path for the image
|
- **Returns** File path for the image
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
An image resolver function selects an image file path for an item in
|
An image resolver function selects an image file path for an item in a [Document List Component](../components/document-list.component.md)
|
||||||
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)).
|
||||||
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
|
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).
|
||||||
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.
|
**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
|
```ts
|
||||||
|
export class MyComponent {
|
||||||
myImageResolver(row: DataRow, col: DataColumn): string {
|
myImageResolver(row: DataRow, col: DataColumn): string {
|
||||||
return '/path/to/image';
|
return '/path/to/image';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Your function can return `null` or `false` values to fall back to the default image
|
Your function can return `null` or `false` values to fall back to the default image
|
||||||
@@ -74,15 +68,13 @@ export class View1 {
|
|||||||
let name = row.getValue(col.key);
|
let name = row.getValue(col.key);
|
||||||
|
|
||||||
// Format image url
|
// Format image url
|
||||||
return `http://<my custom path to folder icon>/${name}`;
|
return `https://<my custom path to folder icon>/${name}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
// For the rest of the cases just fallback to default behaviour.
|
// For the rest of the cases just fallback to default behaviour.
|
||||||
return null;
|
return null;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@@ -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. |
|
| columns | `any[]` | \[] | The columns that the datatable will show. |
|
||||||
| contextMenu | `boolean` | false | Toggles custom context menu for the component. |
|
| 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 |
|
| 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. |
|
| fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. |
|
||||||
| isResizingEnabled | `boolean` | false | Flag that indicates if the datatable allows column resizing. |
|
| 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). |
|
| 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). |
|
||||||
|
@@ -75,6 +75,7 @@ See the [Custom layout](#custom-layout) section for full details of all availabl
|
|||||||
| originalMimeType | `string` | | Overload originalMimeType |
|
| 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. |
|
| 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 |
|
| 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`. |
|
| 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`. |
|
| showRightSidebar | `boolean` | false | Toggles right sidebar visibility. Requires `allowRightSidebar` to be set to `true`. |
|
||||||
| showToolbar | `boolean` | true | Hide or show the toolbar |
|
| showToolbar | `boolean` | true | Hide or show the toolbar |
|
||||||
|
@@ -101,7 +101,7 @@
|
|||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<div *ngIf="currentPanel.panelTitle === DefaultPanels.TAGS && !editing" class="adf-metadata-properties-tags">
|
<div *ngIf="currentPanel.panelTitle === DefaultPanels.TAGS && !editing" class="adf-metadata-properties-tags">
|
||||||
<mat-chip-set>
|
<mat-chip-set>
|
||||||
<mat-chip *ngFor="let tag of tags" [disableRipple]="true" data-automation-id="metadata-properties-tag-chip">{{ tag }}</mat-chip>
|
<mat-chip *ngFor="let tag of tags" [disableRipple]="true" class="metadata-properties-tag-chip" data-automation-id="metadata-properties-tag-chip">{{ tag }}</mat-chip>
|
||||||
</mat-chip-set>
|
</mat-chip-set>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="showEmptyTagMessage" class="adf-metadata-no-item-added">
|
<div *ngIf="showEmptyTagMessage" class="adf-metadata-no-item-added">
|
||||||
|
@@ -21,15 +21,15 @@ import { By } from '@angular/platform-browser';
|
|||||||
import { Node, NodeEntry, NodePaging, RequestScope, ResultSetPaging, SiteEntry, SitePaging, SitePagingList } from '@alfresco/js-api';
|
import { Node, NodeEntry, NodePaging, RequestScope, ResultSetPaging, SiteEntry, SitePaging, SitePagingList } from '@alfresco/js-api';
|
||||||
import { of } from 'rxjs';
|
import { of } from 'rxjs';
|
||||||
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||||
import { DocumentListService } from '../document-list/services/document-list.service';
|
import { DocumentListService } from '../../document-list/services/document-list.service';
|
||||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
import { DocumentListComponent } from '../../document-list/components/document-list.component';
|
||||||
import { CustomResourcesService } from '../document-list/services/custom-resources.service';
|
import { CustomResourcesService } from '../../document-list/services/custom-resources.service';
|
||||||
import { NodeEntryEvent, ShareDataRow } from '../document-list';
|
import { NodeEntryEvent, ShareDataRow } from '../../document-list';
|
||||||
import { SearchQueryBuilderService } from '../search';
|
import { SearchQueryBuilderService } from '../../search';
|
||||||
import { mockSearchRequest } from '../mock/search-query.mock';
|
import { mockSearchRequest } from '../../mock/search-query.mock';
|
||||||
import { SitesService } from '../common/services/sites.service';
|
import { SitesService } from '../../common/services/sites.service';
|
||||||
import { NodesApiService } from '../common/services/nodes-api.service';
|
import { NodesApiService } from '../../common/services/nodes-api.service';
|
||||||
|
|
||||||
const fakeResultSetPaging: ResultSetPaging = {
|
const fakeResultSetPaging: ResultSetPaging = {
|
||||||
list: {
|
list: {
|
@@ -214,10 +214,8 @@ h2.adf-search-results-label {
|
|||||||
.adf-datatable-list .adf-datatable-body .adf-datatable-row {
|
.adf-datatable-list .adf-datatable-body .adf-datatable-row {
|
||||||
min-height: 65px;
|
min-height: 65px;
|
||||||
|
|
||||||
.adf-datatable-cell-container {
|
@media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {
|
||||||
.adf-name-location-cell-location {
|
padding-top: 15px;
|
||||||
padding: 0 10px;
|
|
||||||
display: block;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.adf-name-location-cell-name {
|
.adf-name-location-cell-name {
|
||||||
@@ -239,4 +237,3 @@ h2.adf-search-results-label {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
@@ -20,17 +20,17 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testin
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { Node, NodeEntry, NodePaging, ResultSetPaging, Site, SiteEntry, SitePaging, SitePagingList, UserInfo } from '@alfresco/js-api';
|
import { Node, NodeEntry, NodePaging, ResultSetPaging, Site, SiteEntry, SitePaging, SitePagingList, UserInfo } from '@alfresco/js-api';
|
||||||
import { DataRow, ThumbnailService, DataColumn } from '@alfresco/adf-core';
|
import { DataRow, ThumbnailService, DataColumn } from '@alfresco/adf-core';
|
||||||
import { ContentService, UploadService, NodesApiService, SitesService, FileModel, FileUploadStatus, FileUploadCompleteEvent } from '../common';
|
import { ContentService, UploadService, NodesApiService, SitesService, FileModel, FileUploadStatus, FileUploadCompleteEvent } from '../../common';
|
||||||
import { of, throwError } from 'rxjs';
|
import { of, throwError } from 'rxjs';
|
||||||
import { DropdownBreadcrumbComponent } from '../breadcrumb';
|
import { DropdownBreadcrumbComponent } from '../../breadcrumb';
|
||||||
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||||
import { DocumentListService } from '../document-list/services/document-list.service';
|
import { DocumentListService } from '../../document-list/services/document-list.service';
|
||||||
import { DropdownSitesComponent } from '../site-dropdown/sites-dropdown.component';
|
import { DropdownSitesComponent } from '../site-dropdown/sites-dropdown.component';
|
||||||
import { NodeEntryEvent, ShareDataRow, ShareDataTableAdapter } from '../document-list';
|
import { NodeEntryEvent, ShareDataRow, ShareDataTableAdapter } from '../../document-list';
|
||||||
import { SearchQueryBuilderService } from '../search';
|
import { SearchQueryBuilderService } from '../../search';
|
||||||
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
||||||
import { mockContentModelTextProperty } from '../mock/content-model.mock';
|
import { mockContentModelTextProperty } from '../../mock/content-model.mock';
|
||||||
|
|
||||||
const fakeResultSetPaging: ResultSetPaging = {
|
const fakeResultSetPaging: ResultSetPaging = {
|
||||||
list: {
|
list: {
|
@@ -25,18 +25,18 @@ import {
|
|||||||
DataSorting,
|
DataSorting,
|
||||||
ShowHeaderMode
|
ShowHeaderMode
|
||||||
} from '@alfresco/adf-core';
|
} from '@alfresco/adf-core';
|
||||||
import { NodesApiService, UploadService, FileUploadCompleteEvent, FileUploadDeleteEvent, SitesService } from '../common';
|
import { NodesApiService, UploadService, FileUploadCompleteEvent, FileUploadDeleteEvent, SitesService } from '../../common';
|
||||||
import { UntypedFormControl } from '@angular/forms';
|
import { UntypedFormControl } from '@angular/forms';
|
||||||
import { Node, NodePaging, Pagination, SiteEntry, SitePaging, NodeEntry, SearchRequest, RequestScope } from '@alfresco/js-api';
|
import { Node, NodePaging, Pagination, SiteEntry, SitePaging, NodeEntry, SearchRequest, RequestScope } from '@alfresco/js-api';
|
||||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
import { DocumentListComponent } from '../../document-list/components/document-list.component';
|
||||||
import { RowFilter } from '../document-list/data/row-filter.model';
|
import { RowFilter } from '../../document-list/data/row-filter.model';
|
||||||
import { ImageResolver } from '../document-list/data/image-resolver.model';
|
import { ImageResolver } from '../../document-list/data/image-resolver.model';
|
||||||
import { CustomResourcesService } from '../document-list/services/custom-resources.service';
|
import { CustomResourcesService } from '../../document-list/services/custom-resources.service';
|
||||||
import { ShareDataRow } from '../document-list/data/share-data-row.model';
|
import { ShareDataRow } from '../../document-list/data/share-data-row.model';
|
||||||
import { NodeEntryEvent } from '../document-list/components/node.event';
|
import { NodeEntryEvent } from '../../document-list/components/node.event';
|
||||||
import { debounceTime, takeUntil } from 'rxjs/operators';
|
import { debounceTime, takeUntil } from 'rxjs/operators';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
import { SearchQueryBuilderService } from '../search';
|
import { SearchQueryBuilderService } from '../../search';
|
||||||
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
||||||
|
|
||||||
export type ValidationFunction = (entry: Node) => boolean;
|
export type ValidationFunction = (entry: Node) => boolean;
|
@@ -16,10 +16,9 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
import { ContentNodeSelectorPanelService } from './content-node-selector-panel.service';
|
||||||
import { mockContentModelDateProperty, mockContentModelTextProperty, mockConvertedSearchCategoriesFromModels } from '../mock/content-model.mock';
|
import { mockContentModelDateProperty, mockContentModelTextProperty, mockConvertedSearchCategoriesFromModels } from '../../mock/content-model.mock';
|
||||||
|
|
||||||
describe('ContentNodeSelectorPanelService', () => {
|
describe('ContentNodeSelectorPanelService', () => {
|
||||||
|
|
||||||
const contentNodeSelectorPanelService = new ContentNodeSelectorPanelService();
|
const contentNodeSelectorPanelService = new ContentNodeSelectorPanelService();
|
||||||
|
|
||||||
it('should support text type', () => {
|
it('should support text type', () => {
|
@@ -16,13 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { SearchCategory } from '../search/models/search-category.interface';
|
import { SearchCategory } from '../../search/models/search-category.interface';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class ContentNodeSelectorPanelService {
|
export class ContentNodeSelectorPanelService {
|
||||||
|
|
||||||
propertyTypes = ['d:text', 'd:date', 'd:datetime'];
|
propertyTypes = ['d:text', 'd:date', 'd:datetime'];
|
||||||
modelPropertyTypeToSearchFilterTypeMap = new Map<string, string>();
|
modelPropertyTypeToSearchFilterTypeMap = new Map<string, string>();
|
||||||
customModels: any[];
|
customModels: any[];
|
||||||
@@ -66,5 +65,4 @@ export class ContentNodeSelectorPanelService {
|
|||||||
isTypeSupported(dataType: string): boolean {
|
isTypeSupported(dataType: string): boolean {
|
||||||
return this.propertyTypes.includes(dataType);
|
return this.propertyTypes.includes(dataType);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@@ -29,7 +29,7 @@ import { ContentTestingModule } from '../testing/content.testing.module';
|
|||||||
import { DocumentListService } from '../document-list/services/document-list.service';
|
import { DocumentListService } from '../document-list/services/document-list.service';
|
||||||
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
import { DocumentListComponent } from '../document-list/components/document-list.component';
|
||||||
import { UploadModule } from '../upload';
|
import { UploadModule } from '../upload';
|
||||||
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel/content-node-selector-panel.component';
|
||||||
import { NodeAction } from '../document-list/models/node-action.enum';
|
import { NodeAction } from '../document-list/models/node-action.enum';
|
||||||
import { SitesService } from '../common/services/sites.service';
|
import { SitesService } from '../common/services/sites.service';
|
||||||
import { NodesApiService } from '../common/services/nodes-api.service';
|
import { NodesApiService } from '../common/services/nodes-api.service';
|
||||||
|
@@ -19,10 +19,8 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { MaterialModule } from '../material.module';
|
import { MaterialModule } from '../material.module';
|
||||||
|
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel/content-node-selector-panel.component';
|
||||||
import { ContentNodeSelectorPanelComponent } from './content-node-selector-panel.component';
|
|
||||||
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
import { ContentNodeSelectorComponent } from './content-node-selector.component';
|
||||||
import { SitesDropdownModule } from '../site-dropdown/sites-dropdown.module';
|
|
||||||
import { BreadcrumbModule } from '../breadcrumb/breadcrumb.module';
|
import { BreadcrumbModule } from '../breadcrumb/breadcrumb.module';
|
||||||
import { SearchModule } from '../search/search.module';
|
import { SearchModule } from '../search/search.module';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
@@ -31,6 +29,7 @@ import { NameLocationCellComponent } from './name-location-cell/name-location-ce
|
|||||||
import { UploadModule } from '../upload/upload.module';
|
import { UploadModule } from '../upload/upload.module';
|
||||||
import { SearchQueryBuilderService } from '../search/services/search-query-builder.service';
|
import { SearchQueryBuilderService } from '../search/services/search-query-builder.service';
|
||||||
import { ContentDirectiveModule } from '../directives/content-directive.module';
|
import { ContentDirectiveModule } from '../directives/content-directive.module';
|
||||||
|
import { DropdownSitesComponent } from './site-dropdown/sites-dropdown.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -39,23 +38,16 @@ import { ContentDirectiveModule } from '../directives/content-directive.module';
|
|||||||
CoreModule,
|
CoreModule,
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
SitesDropdownModule,
|
DropdownSitesComponent,
|
||||||
BreadcrumbModule,
|
BreadcrumbModule,
|
||||||
SearchModule,
|
SearchModule,
|
||||||
DocumentListModule,
|
DocumentListModule,
|
||||||
UploadModule,
|
UploadModule,
|
||||||
ContentDirectiveModule
|
ContentDirectiveModule,
|
||||||
],
|
NameLocationCellComponent
|
||||||
exports: [
|
|
||||||
ContentNodeSelectorPanelComponent,
|
|
||||||
NameLocationCellComponent,
|
|
||||||
ContentNodeSelectorComponent
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
ContentNodeSelectorPanelComponent,
|
|
||||||
NameLocationCellComponent,
|
|
||||||
ContentNodeSelectorComponent
|
|
||||||
],
|
],
|
||||||
|
exports: [ContentNodeSelectorPanelComponent, NameLocationCellComponent, ContentNodeSelectorComponent],
|
||||||
|
declarations: [ContentNodeSelectorPanelComponent, ContentNodeSelectorComponent],
|
||||||
providers: [SearchQueryBuilderService]
|
providers: [SearchQueryBuilderService]
|
||||||
})
|
})
|
||||||
export class ContentNodeSelectorModule {}
|
export class ContentNodeSelectorModule {}
|
||||||
|
@@ -27,9 +27,7 @@ describe('NameLocationCellComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [
|
imports: [NameLocationCellComponent]
|
||||||
NameLocationCellComponent
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(NameLocationCellComponent);
|
fixture = TestBed.createComponent(NameLocationCellComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
@@ -20,6 +20,7 @@ import { DataRow } from '@alfresco/adf-core';
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-name-location-cell',
|
selector: 'adf-name-location-cell',
|
||||||
|
standalone: true,
|
||||||
template: `
|
template: `
|
||||||
<div class="adf-name-location-cell-name adf-datatable-cell-value" [title]="name">{{ name }}</div>
|
<div class="adf-name-location-cell-name adf-datatable-cell-value" [title]="name">{{ name }}</div>
|
||||||
<div class="adf-name-location-cell-location adf-datatable-cell-value" [title]="path">{{ path }}</div>
|
<div class="adf-name-location-cell-location adf-datatable-cell-value" [title]="path">{{ path }}</div>
|
||||||
@@ -30,7 +31,6 @@ import { DataRow } from '@alfresco/adf-core';
|
|||||||
host: { class: 'adf-name-location-cell adf-datatable-content-cell' }
|
host: { class: 'adf-name-location-cell adf-datatable-content-cell' }
|
||||||
})
|
})
|
||||||
export class NameLocationCellComponent implements OnInit {
|
export class NameLocationCellComponent implements OnInit {
|
||||||
|
|
||||||
name: string = '';
|
name: string = '';
|
||||||
path: string = '';
|
path: string = '';
|
||||||
|
|
||||||
|
@@ -16,10 +16,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * from './name-location-cell/name-location-cell.component';
|
export * from './name-location-cell/name-location-cell.component';
|
||||||
|
export * from './site-dropdown/sites-dropdown.component';
|
||||||
export * from './content-node-selector.component-data.interface';
|
export * from './content-node-selector.component-data.interface';
|
||||||
export * from './content-node-selector-panel.component';
|
export * from './content-node-selector-panel/content-node-selector-panel.component';
|
||||||
export * from './content-node-selector.component';
|
export * from './content-node-selector.component';
|
||||||
export * from './content-node-dialog.service';
|
export * from './content-node-dialog.service';
|
||||||
export * from './content-node-selector-panel.service';
|
export * from './content-node-selector-panel/content-node-selector-panel.service';
|
||||||
|
|
||||||
export * from './content-node-selector.module';
|
export * from './content-node-selector.module';
|
||||||
|
@@ -25,9 +25,9 @@ import {
|
|||||||
getFakeSitePagingFirstPage,
|
getFakeSitePagingFirstPage,
|
||||||
getFakeSitePagingLastPage,
|
getFakeSitePagingLastPage,
|
||||||
getFakeSitePagingWithMembers
|
getFakeSitePagingWithMembers
|
||||||
} from '../mock';
|
} from '../../mock';
|
||||||
import { ContentTestingModule } from '../testing/content.testing.module';
|
import { ContentTestingModule } from '../../testing/content.testing.module';
|
||||||
import { SitesService } from '../common/services/sites.service';
|
import { SitesService } from '../../common/services/sites.service';
|
||||||
import { HarnessLoader } from '@angular/cdk/testing';
|
import { HarnessLoader } from '@angular/cdk/testing';
|
||||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
import { MatSelectHarness } from '@angular/material/select/testing';
|
@@ -18,10 +18,12 @@
|
|||||||
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
import { Component, EventEmitter, Input, OnInit, Output, ViewEncapsulation } from '@angular/core';
|
||||||
import { InfiniteSelectScrollDirective, AuthenticationService } from '@alfresco/adf-core';
|
import { InfiniteSelectScrollDirective, AuthenticationService } from '@alfresco/adf-core';
|
||||||
import { SitePaging, SiteEntry, Site } from '@alfresco/js-api';
|
import { SitePaging, SiteEntry, Site } from '@alfresco/js-api';
|
||||||
import { MatSelectChange } from '@angular/material/select';
|
import { MatSelectChange, MatSelectModule } from '@angular/material/select';
|
||||||
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
||||||
import { SitesService } from '../common/services/sites.service';
|
import { SitesService } from '../../common/services/sites.service';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
||||||
|
|
||||||
/* eslint-disable no-shadow */
|
/* eslint-disable no-shadow */
|
||||||
/* eslint-disable @typescript-eslint/naming-convention */
|
/* eslint-disable @typescript-eslint/naming-convention */
|
||||||
@@ -33,6 +35,8 @@ export enum Relations {
|
|||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-sites-dropdown',
|
selector: 'adf-sites-dropdown',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, TranslateModule, MatFormFieldModule, MatSelectModule, InfiniteSelectScrollDirective],
|
||||||
templateUrl: './sites-dropdown.component.html',
|
templateUrl: './sites-dropdown.component.html',
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
host: { class: 'adf-sites-dropdown' }
|
host: { class: 'adf-sites-dropdown' }
|
||||||
@@ -75,7 +79,7 @@ export class DropdownSitesComponent implements OnInit {
|
|||||||
* an empty model is emitted.
|
* an empty model is emitted.
|
||||||
*/
|
*/
|
||||||
@Output()
|
@Output()
|
||||||
change: EventEmitter<SiteEntry> = new EventEmitter();
|
change = new EventEmitter<SiteEntry>();
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
error = new EventEmitter<any>();
|
error = new EventEmitter<any>();
|
@@ -26,7 +26,6 @@ import { TagModule } from './tag/tag.module';
|
|||||||
import { DocumentListModule } from './document-list/document-list.module';
|
import { DocumentListModule } from './document-list/document-list.module';
|
||||||
import { UploadModule } from './upload/upload.module';
|
import { UploadModule } from './upload/upload.module';
|
||||||
import { SearchModule } from './search/search.module';
|
import { SearchModule } from './search/search.module';
|
||||||
import { SitesDropdownModule } from './site-dropdown/sites-dropdown.module';
|
|
||||||
import { BreadcrumbModule } from './breadcrumb/breadcrumb.module';
|
import { BreadcrumbModule } from './breadcrumb/breadcrumb.module';
|
||||||
import { VersionManagerModule } from './version-manager/version-manager.module';
|
import { VersionManagerModule } from './version-manager/version-manager.module';
|
||||||
import { ContentNodeSelectorModule } from './content-node-selector/content-node-selector.module';
|
import { ContentNodeSelectorModule } from './content-node-selector/content-node-selector.module';
|
||||||
@@ -49,6 +48,7 @@ import { ContentUserInfoModule } from './content-user-info/content-user-info.mod
|
|||||||
import { CategoriesModule } from './category/category.module';
|
import { CategoriesModule } from './category/category.module';
|
||||||
import { contentAuthLoaderFactory } from './auth-loader/content-auth-loader-factory';
|
import { contentAuthLoaderFactory } from './auth-loader/content-auth-loader-factory';
|
||||||
import { ContentAuthLoaderService } from './auth-loader/content-auth-loader.service';
|
import { ContentAuthLoaderService } from './auth-loader/content-auth-loader.service';
|
||||||
|
import { DropdownSitesComponent } from './content-node-selector/site-dropdown/sites-dropdown.component';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
@@ -64,7 +64,7 @@ import { ContentAuthLoaderService } from './auth-loader/content-auth-loader.serv
|
|||||||
ContentUserInfoModule,
|
ContentUserInfoModule,
|
||||||
UploadModule,
|
UploadModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
SitesDropdownModule,
|
DropdownSitesComponent,
|
||||||
BreadcrumbModule,
|
BreadcrumbModule,
|
||||||
ContentNodeSelectorModule,
|
ContentNodeSelectorModule,
|
||||||
ContentNodeShareModule,
|
ContentNodeShareModule,
|
||||||
@@ -90,7 +90,7 @@ import { ContentAuthLoaderService } from './auth-loader/content-auth-loader.serv
|
|||||||
ContentUserInfoModule,
|
ContentUserInfoModule,
|
||||||
UploadModule,
|
UploadModule,
|
||||||
SearchModule,
|
SearchModule,
|
||||||
SitesDropdownModule,
|
DropdownSitesComponent,
|
||||||
BreadcrumbModule,
|
BreadcrumbModule,
|
||||||
ContentNodeSelectorModule,
|
ContentNodeSelectorModule,
|
||||||
ContentNodeShareModule,
|
ContentNodeShareModule,
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
[allowFiltering]="allowFiltering"
|
[allowFiltering]="allowFiltering"
|
||||||
[isResizingEnabled]="isResizingEnabled"
|
[isResizingEnabled]="isResizingEnabled"
|
||||||
[blurOnResize]="blurOnResize"
|
[blurOnResize]="blurOnResize"
|
||||||
|
[displayCheckboxesOnHover]="displayCheckboxesOnHover"
|
||||||
(showRowContextMenu)="onShowRowContextMenu($event)"
|
(showRowContextMenu)="onShowRowContextMenu($event)"
|
||||||
(showRowActionsMenu)="onShowRowActionsMenu($event)"
|
(showRowActionsMenu)="onShowRowActionsMenu($event)"
|
||||||
(executeRowAction)="onExecuteRowAction($event)"
|
(executeRowAction)="onExecuteRowAction($event)"
|
||||||
|
@@ -340,6 +340,10 @@ export class DocumentListComponent extends DataTableSchema implements OnInit, On
|
|||||||
@Input()
|
@Input()
|
||||||
blurOnResize = true;
|
blurOnResize = true;
|
||||||
|
|
||||||
|
/** Display checkboxes in datatable rows on hover only */
|
||||||
|
@Input()
|
||||||
|
displayCheckboxesOnHover = false;
|
||||||
|
|
||||||
/** Emitted when the user clicks a list node */
|
/** Emitted when the user clicks a list node */
|
||||||
@Output()
|
@Output()
|
||||||
nodeClick = new EventEmitter<NodeEntityEvent>();
|
nodeClick = new EventEmitter<NodeEntityEvent>();
|
||||||
|
@@ -30,18 +30,19 @@ import { ContentNodeDialogService } from '../../content-node-selector/content-no
|
|||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class DocumentActionsService {
|
export class DocumentActionsService {
|
||||||
|
|
||||||
permissionEvent = new Subject<PermissionModel>();
|
permissionEvent = new Subject<PermissionModel>();
|
||||||
error = new Subject<Error>();
|
error = new Subject<Error>();
|
||||||
success = new Subject<string>();
|
success = new Subject<string>();
|
||||||
|
|
||||||
private handlers: { [id: string]: ContentActionHandler } = {};
|
private handlers: { [id: string]: ContentActionHandler } = {};
|
||||||
|
|
||||||
constructor(private nodeActionsService: NodeActionsService,
|
constructor(
|
||||||
|
private nodeActionsService: NodeActionsService,
|
||||||
private contentNodeDialogService: ContentNodeDialogService,
|
private contentNodeDialogService: ContentNodeDialogService,
|
||||||
private translation: TranslationService,
|
private translation: TranslationService,
|
||||||
private documentListService?: DocumentListService,
|
private documentListService?: DocumentListService,
|
||||||
private contentService?: ContentService) {
|
private contentService?: ContentService
|
||||||
|
) {
|
||||||
this.setupActionHandlers();
|
this.setupActionHandlers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -114,32 +115,34 @@ export class DocumentActionsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private prepareHandlers(actionObservable: Subject<string>): void {
|
private prepareHandlers(actionObservable: Subject<string>): void {
|
||||||
actionObservable.subscribe(
|
actionObservable.subscribe((fileOperationMessage) => {
|
||||||
(fileOperationMessage) => {
|
|
||||||
this.success.next(fileOperationMessage);
|
this.success.next(fileOperationMessage);
|
||||||
},
|
}, this.error.next.bind(this.error));
|
||||||
this.error.next.bind(this.error)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private deleteNode(node: NodeEntry, _target?: any, permission?: string): Observable<any> {
|
private deleteNode(node: NodeEntry, _target?: any, permission?: string): Observable<any> {
|
||||||
if (this.canExecuteAction(node)) {
|
if (this.canExecuteAction(node)) {
|
||||||
if (this.contentService.hasAllowableOperations(node.entry, permission)) {
|
if (this.contentService.hasAllowableOperations(node.entry, permission)) {
|
||||||
const handlerObservable = this.documentListService.deleteNode(node.entry.id);
|
const handlerObservable = this.documentListService.deleteNode(node.entry.id);
|
||||||
handlerObservable.subscribe(() => {
|
handlerObservable.subscribe(
|
||||||
|
() => {
|
||||||
const message = this.translation.instant('CORE.DELETE_NODE.SINGULAR', { name: node.entry.name });
|
const message = this.translation.instant('CORE.DELETE_NODE.SINGULAR', { name: node.entry.name });
|
||||||
this.success.next(message);
|
this.success.next(message);
|
||||||
}, () => {
|
},
|
||||||
|
() => {
|
||||||
const message = this.translation.instant('CORE.DELETE_NODE.ERROR_SINGULAR', { name: node.entry.name });
|
const message = this.translation.instant('CORE.DELETE_NODE.ERROR_SINGULAR', { name: node.entry.name });
|
||||||
this.error.next(message);
|
this.error.next(message);
|
||||||
});
|
}
|
||||||
|
);
|
||||||
return handlerObservable;
|
return handlerObservable;
|
||||||
} else {
|
} else {
|
||||||
this.permissionEvent.next(new PermissionModel({
|
this.permissionEvent.next(
|
||||||
|
new PermissionModel({
|
||||||
type: 'content',
|
type: 'content',
|
||||||
action: 'delete',
|
action: 'delete',
|
||||||
permission
|
permission
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
return throwError(new Error('No permission to delete'));
|
return throwError(new Error('No permission to delete'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -32,21 +32,21 @@ import { NodeAction } from '../models/node-action.enum';
|
|||||||
})
|
})
|
||||||
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
// eslint-disable-next-line @angular-eslint/directive-class-suffix
|
||||||
export class NodeActionsService {
|
export class NodeActionsService {
|
||||||
|
|
||||||
@Output()
|
@Output()
|
||||||
error = new EventEmitter<any>();
|
error = new EventEmitter<any>();
|
||||||
|
|
||||||
constructor(private contentDialogService: ContentNodeDialogService,
|
constructor(
|
||||||
|
private contentDialogService: ContentNodeDialogService,
|
||||||
public dialogRef: MatDialog,
|
public dialogRef: MatDialog,
|
||||||
public content: ContentService,
|
public content: ContentService,
|
||||||
private documentListService?: DocumentListService,
|
private documentListService?: DocumentListService,
|
||||||
private apiService?: AlfrescoApiService,
|
private apiService?: AlfrescoApiService,
|
||||||
private dialog?: MatDialog,
|
private dialog?: MatDialog,
|
||||||
private downloadService?: DownloadService) {}
|
private downloadService?: DownloadService
|
||||||
|
) {}
|
||||||
|
|
||||||
downloadNode(node: NodeEntry) {
|
downloadNode(node: NodeEntry) {
|
||||||
new NodeDownloadDirective(this.apiService, this.downloadService, this.dialog)
|
new NodeDownloadDirective(this.apiService, this.downloadService, this.dialog).downloadNode(node);
|
||||||
.downloadNode(node);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -102,14 +102,19 @@ export class NodeActionsService {
|
|||||||
* @param permission permission which is needed to apply the action
|
* @param permission permission which is needed to apply the action
|
||||||
* @returns operation result
|
* @returns operation result
|
||||||
*/
|
*/
|
||||||
private doFileOperation(action: NodeAction.COPY | NodeAction.MOVE, type: 'content' | 'folder', contentEntry: Node, permission?: string): Subject<string> {
|
private doFileOperation(
|
||||||
|
action: NodeAction.COPY | NodeAction.MOVE,
|
||||||
|
type: 'content' | 'folder',
|
||||||
|
contentEntry: Node,
|
||||||
|
permission?: string
|
||||||
|
): Subject<string> {
|
||||||
const observable = new Subject<string>();
|
const observable = new Subject<string>();
|
||||||
|
|
||||||
this.contentDialogService
|
this.contentDialogService.openCopyMoveDialog(action, contentEntry, permission).subscribe(
|
||||||
.openCopyMoveDialog(action, contentEntry, permission)
|
(selections: Node[]) => {
|
||||||
.subscribe((selections: Node[]) => {
|
|
||||||
const selection = selections[0];
|
const selection = selections[0];
|
||||||
this.documentListService[`${action.toLowerCase()}Node`].call(this.documentListService, contentEntry.id, selection.id)
|
this.documentListService[`${action.toLowerCase()}Node`]
|
||||||
|
.call(this.documentListService, contentEntry.id, selection.id)
|
||||||
.subscribe(
|
.subscribe(
|
||||||
observable.next.bind(observable, `OPERATION.SUCCESS.${type.toUpperCase()}.${action}`),
|
observable.next.bind(observable, `OPERATION.SUCCESS.${type.toUpperCase()}.${action}`),
|
||||||
observable.error.bind(observable)
|
observable.error.bind(observable)
|
||||||
@@ -118,7 +123,8 @@ export class NodeActionsService {
|
|||||||
(error) => {
|
(error) => {
|
||||||
observable.error(error);
|
observable.error(error);
|
||||||
return observable;
|
return observable;
|
||||||
});
|
}
|
||||||
|
);
|
||||||
return observable;
|
return observable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -51,6 +51,8 @@ $search-result-height: calc(100% - 60px);
|
|||||||
&-permission-search {
|
&-permission-search {
|
||||||
&-input {
|
&-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
padding-bottom: 0;
|
||||||
|
padding-top: 12px;
|
||||||
|
|
||||||
#{$mat-form-field-wrapper} {
|
#{$mat-form-field-wrapper} {
|
||||||
#{$mat-form-field-flex} {
|
#{$mat-form-field-flex} {
|
||||||
@@ -73,7 +75,7 @@ $search-result-height: calc(100% - 60px);
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.adf-permission-search-icon {
|
.adf-permission-search-icon:is(mat-icon) {
|
||||||
padding: 0 0 12px;
|
padding: 0 0 12px;
|
||||||
width: 1em;
|
width: 1em;
|
||||||
height: 1em;
|
height: 1em;
|
||||||
|
@@ -415,13 +415,13 @@ describe('SearchControlComponent', () => {
|
|||||||
it('should have positive transform translation', () => {
|
it('should have positive transform translation', () => {
|
||||||
userPreferencesService.setWithoutStore('textOrientation', 'ltr');
|
userPreferencesService.setWithoutStore('textOrientation', 'ltr');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(component.searchTextInput.subscriptAnimationState.params.transform).toBe('translateX(82%)');
|
expect(component.searchTextInput.subscriptAnimationState.params.transform).toBe('translateX(95%)');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have negative transform translation ', () => {
|
it('should have negative transform translation ', () => {
|
||||||
userPreferencesService.setWithoutStore('textOrientation', 'rtl');
|
userPreferencesService.setWithoutStore('textOrientation', 'rtl');
|
||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
expect(component.searchTextInput.subscriptAnimationState.params.transform).toBe('translateX(-82%)');
|
expect(component.searchTextInput.subscriptAnimationState.params.transform).toBe('translateX(-95%)');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
import { Component, OnInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { ContentNodeSelectorPanelService } from '../../../content-node-selector/content-node-selector-panel.service';
|
import { ContentNodeSelectorPanelService } from '../../../content-node-selector/content-node-selector-panel/content-node-selector-panel.service';
|
||||||
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
import { SearchQueryBuilderService } from '../../services/search-query-builder.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
|
@@ -1,18 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export * from './public-api';
|
|
@@ -1,20 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export * from './sites-dropdown.component';
|
|
||||||
|
|
||||||
export * from './sites-dropdown.module';
|
|
@@ -1,41 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { MaterialModule } from '../material.module';
|
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
||||||
|
|
||||||
import { DropdownSitesComponent } from './sites-dropdown.component';
|
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
MaterialModule,
|
|
||||||
FormsModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
CoreModule
|
|
||||||
],
|
|
||||||
exports: [
|
|
||||||
DropdownSitesComponent
|
|
||||||
],
|
|
||||||
declarations: [
|
|
||||||
DropdownSitesComponent
|
|
||||||
]
|
|
||||||
})
|
|
||||||
export class SitesDropdownModule {}
|
|
@@ -24,6 +24,7 @@
|
|||||||
[urlFile]="urlFileContent"
|
[urlFile]="urlFileContent"
|
||||||
[tracks]="tracks"
|
[tracks]="tracks"
|
||||||
[readOnly]="readOnly"
|
[readOnly]="readOnly"
|
||||||
|
[allowedEditActions]="allowedEditActions"
|
||||||
[viewerExtensions]="viewerExtensions"
|
[viewerExtensions]="viewerExtensions"
|
||||||
(downloadFile)="onDownloadFile()"
|
(downloadFile)="onDownloadFile()"
|
||||||
(navigateBefore)="onNavigateBeforeClick($event)"
|
(navigateBefore)="onNavigateBeforeClick($event)"
|
||||||
|
@@ -215,6 +215,10 @@ export class AlfrescoViewerComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
nodeEntry: NodeEntry;
|
nodeEntry: NodeEntry;
|
||||||
tracks: Track[] = [];
|
tracks: Track[] = [];
|
||||||
readOnly: boolean = true;
|
readOnly: boolean = true;
|
||||||
|
allowedEditActions: { [key: string]: boolean } = {
|
||||||
|
rotate: true,
|
||||||
|
crop: true
|
||||||
|
};
|
||||||
|
|
||||||
sidebarRightTemplateContext: { node: Node } = { node: null };
|
sidebarRightTemplateContext: { node: Node } = { node: null };
|
||||||
sidebarLeftTemplateContext: { node: Node } = { node: null };
|
sidebarLeftTemplateContext: { node: Node } = { node: null };
|
||||||
|
@@ -21,7 +21,6 @@ export * from './lib/document-list/index';
|
|||||||
export * from './lib/content-user-info/index';
|
export * from './lib/content-user-info/index';
|
||||||
export * from './lib/upload/index';
|
export * from './lib/upload/index';
|
||||||
export * from './lib/search/index';
|
export * from './lib/search/index';
|
||||||
export * from './lib/site-dropdown/index';
|
|
||||||
export * from './lib/breadcrumb/index';
|
export * from './lib/breadcrumb/index';
|
||||||
export * from './lib/version-manager/index';
|
export * from './lib/version-manager/index';
|
||||||
export * from './lib/content-node-selector/index';
|
export * from './lib/content-node-selector/index';
|
||||||
|
@@ -65,8 +65,7 @@
|
|||||||
"demo-shell/src/styles.scss",
|
"demo-shell/src/styles.scss",
|
||||||
"demo-shell/src/custom-style-dev.scss",
|
"demo-shell/src/custom-style-dev.scss",
|
||||||
"node_modules/cropperjs/dist/cropper.min.css",
|
"node_modules/cropperjs/dist/cropper.min.css",
|
||||||
"node_modules/pdfjs-dist/web/pdf_viewer.css",
|
"node_modules/pdfjs-dist/web/pdf_viewer.css"
|
||||||
|
|
||||||
],
|
],
|
||||||
"stylePreprocessorOptions": {
|
"stylePreprocessorOptions": {
|
||||||
"includePaths": ["lib", "lib/core/src/lib"]
|
"includePaths": ["lib", "lib/core/src/lib"]
|
||||||
|
@@ -1,124 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { applicationConfig, Meta, moduleMetadata, StoryFn } from '@storybook/angular';
|
|
||||||
import { ButtonsMenuComponent } from './buttons-menu.component';
|
|
||||||
import { ButtonsMenuModule } from './buttons-menu.module';
|
|
||||||
import { importProvidersFrom } from '@angular/core';
|
|
||||||
import { CoreStoryModule } from '../../..';
|
|
||||||
|
|
||||||
export default {
|
|
||||||
component: ButtonsMenuComponent,
|
|
||||||
title: 'Core/Buttons Menu/Buttons Menu',
|
|
||||||
decorators: [
|
|
||||||
moduleMetadata({
|
|
||||||
imports: [ButtonsMenuModule]
|
|
||||||
}),
|
|
||||||
applicationConfig({
|
|
||||||
providers: [importProvidersFrom(CoreStoryModule)]
|
|
||||||
})
|
|
||||||
],
|
|
||||||
argTypes: {
|
|
||||||
mobile: {
|
|
||||||
type: { name: 'boolean' },
|
|
||||||
name: 'isMobile',
|
|
||||||
description: 'Determines whether it is displayed on a mobile device',
|
|
||||||
control: {
|
|
||||||
disable: false
|
|
||||||
},
|
|
||||||
table: {
|
|
||||||
category: 'Component methods',
|
|
||||||
type: {
|
|
||||||
summary: '() => boolean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
isMenuEmpty: {
|
|
||||||
description: 'Determines whether it has anything to display',
|
|
||||||
table: {
|
|
||||||
category: 'Component properties',
|
|
||||||
type: {
|
|
||||||
summary: 'boolean'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
args: {
|
|
||||||
mobile: true
|
|
||||||
}
|
|
||||||
} as Meta<ButtonsMenuComponent>;
|
|
||||||
|
|
||||||
export const SixButtons: StoryFn = (args) => ({
|
|
||||||
props: {
|
|
||||||
...args,
|
|
||||||
isMenuEmpty: false,
|
|
||||||
isMobile() {
|
|
||||||
return args.mobile;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
template: `
|
|
||||||
<adf-buttons-action-menu>
|
|
||||||
<button mat-menu-item>
|
|
||||||
<mat-icon>settings</mat-icon><span> Settings </span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item>
|
|
||||||
<mat-icon>home</mat-icon><span> Home </span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item>
|
|
||||||
<mat-icon>search</mat-icon><span> Search </span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item>
|
|
||||||
<mat-icon>done</mat-icon><span> Done </span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item>
|
|
||||||
<mat-icon>delete</mat-icon><span> Delete </span>
|
|
||||||
</button>
|
|
||||||
<button mat-menu-item>
|
|
||||||
<mat-icon>block</mat-icon><span> Block </span>
|
|
||||||
</button>
|
|
||||||
</adf-buttons-action-menu>
|
|
||||||
`
|
|
||||||
});
|
|
||||||
|
|
||||||
export const OneButton: StoryFn = (args) => ({
|
|
||||||
props: {
|
|
||||||
...args,
|
|
||||||
isMenuEmpty: false,
|
|
||||||
isMobile() {
|
|
||||||
return args.mobile;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
template: `
|
|
||||||
<adf-buttons-action-menu>
|
|
||||||
<button mat-menu-item>
|
|
||||||
<mat-icon>settings</mat-icon><span> Settings </span>
|
|
||||||
</button>
|
|
||||||
</adf-buttons-action-menu>
|
|
||||||
`
|
|
||||||
});
|
|
||||||
|
|
||||||
export const NoButtons: StoryFn = (args) => ({
|
|
||||||
props: {
|
|
||||||
...args,
|
|
||||||
isMenuEmpty: true,
|
|
||||||
isMobile() {
|
|
||||||
return args.mobile;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
template: `
|
|
||||||
<adf-buttons-action-menu></adf-buttons-action-menu>`
|
|
||||||
});
|
|
@@ -1,36 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
import { CommonModule } from '@angular/common';
|
|
||||||
import { NgModule } from '@angular/core';
|
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
import { MatIconModule } from '@angular/material/icon';
|
|
||||||
import { MatMenuModule } from '@angular/material/menu';
|
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
|
||||||
import { ButtonsMenuComponent } from './buttons-menu.component';
|
|
||||||
|
|
||||||
@NgModule({
|
|
||||||
imports: [
|
|
||||||
CommonModule,
|
|
||||||
MatIconModule,
|
|
||||||
MatMenuModule,
|
|
||||||
TranslateModule
|
|
||||||
],
|
|
||||||
declarations: [ButtonsMenuComponent],
|
|
||||||
exports: [ButtonsMenuComponent, MatIconModule, MatMenuModule, MatButtonModule]
|
|
||||||
})
|
|
||||||
export class ButtonsMenuModule {}
|
|
@@ -1,18 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export * from './public-api';
|
|
@@ -1,19 +0,0 @@
|
|||||||
/*!
|
|
||||||
* @license
|
|
||||||
* Copyright © 2005-2024 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
* you may not use this file except in compliance with the License.
|
|
||||||
* You may obtain a copy of the License at
|
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
* See the License for the specific language governing permissions and
|
|
||||||
* limitations under the License.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export * from './buttons-menu.component';
|
|
||||||
export * from './buttons-menu.module';
|
|
@@ -30,6 +30,7 @@
|
|||||||
padding: 6px 0 8px 12px;
|
padding: 6px 0 8px 12px;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
width: 90%;
|
||||||
|
|
||||||
#{$mat-select-value} {
|
#{$mat-select-value} {
|
||||||
color: var(--adf-metadata-action-button-clear-color);
|
color: var(--adf-metadata-action-button-clear-color);
|
||||||
|
@@ -35,7 +35,6 @@ import { FormBaseModule } from './form/form-base.module';
|
|||||||
import { SidenavLayoutModule } from './layout/layout.module';
|
import { SidenavLayoutModule } from './layout/layout.module';
|
||||||
import { CommentsModule } from './comments/comments.module';
|
import { CommentsModule } from './comments/comments.module';
|
||||||
import { CommentListModule } from './comments/comment-list/comment-list.module';
|
import { CommentListModule } from './comments/comment-list/comment-list.module';
|
||||||
import { ButtonsMenuModule } from './buttons-menu/buttons-menu.module';
|
|
||||||
import { TemplateModule } from './templates/template.module';
|
import { TemplateModule } from './templates/template.module';
|
||||||
import { ClipboardModule } from './clipboard/clipboard.module';
|
import { ClipboardModule } from './clipboard/clipboard.module';
|
||||||
import { NotificationHistoryModule } from './notifications/notification-history.module';
|
import { NotificationHistoryModule } from './notifications/notification-history.module';
|
||||||
@@ -95,7 +94,6 @@ import { DynamicChipListModule } from './dynamic-chip-list';
|
|||||||
LanguageMenuModule,
|
LanguageMenuModule,
|
||||||
InfoDrawerModule,
|
InfoDrawerModule,
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
ButtonsMenuModule,
|
|
||||||
TemplateModule,
|
TemplateModule,
|
||||||
IconModule,
|
IconModule,
|
||||||
SortingPickerModule,
|
SortingPickerModule,
|
||||||
@@ -135,7 +133,6 @@ import { DynamicChipListModule } from './dynamic-chip-list';
|
|||||||
InfoDrawerModule,
|
InfoDrawerModule,
|
||||||
DataTableModule,
|
DataTableModule,
|
||||||
TranslateModule,
|
TranslateModule,
|
||||||
ButtonsMenuModule,
|
|
||||||
TemplateModule,
|
TemplateModule,
|
||||||
SortingPickerModule,
|
SortingPickerModule,
|
||||||
IconModule,
|
IconModule,
|
||||||
|
@@ -186,6 +186,7 @@
|
|||||||
<mat-checkbox
|
<mat-checkbox
|
||||||
[id]="'select-file-' + idx"
|
[id]="'select-file-' + idx"
|
||||||
[class.adf-datatable-checkbox-selected]="row.isSelected"
|
[class.adf-datatable-checkbox-selected]="row.isSelected"
|
||||||
|
[class.adf-datatable-hover-only]="displayCheckboxesOnHover"
|
||||||
[checked]="row.isSelected"
|
[checked]="row.isSelected"
|
||||||
[attr.aria-checked]="row.isSelected"
|
[attr.aria-checked]="row.isSelected"
|
||||||
role="checkbox"
|
role="checkbox"
|
||||||
|
@@ -160,17 +160,15 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
.adf-datatable-checkbox-cell {
|
.adf-datatable-hover-only {
|
||||||
&.adf-datatable-checkbox-single {
|
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.adf-datatable-checkbox-single {
|
.adf-datatable-hover-only {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
|
|
||||||
&:has(.adf-datatable-checkbox-selected) {
|
&.adf-datatable-checkbox-selected {
|
||||||
visibility: visible;
|
visibility: visible;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -453,6 +451,8 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* stylelint-disable media-feature-range-notation */
|
||||||
|
|
||||||
/* mobile phone */
|
/* mobile phone */
|
||||||
@media all and (max-width: 768px) {
|
@media all and (max-width: 768px) {
|
||||||
.adf-desktop-only.adf-ellipsis-cell {
|
.adf-desktop-only.adf-ellipsis-cell {
|
||||||
@@ -578,6 +578,7 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* stylelint-disable selector-class-pattern */
|
||||||
.cdk-drag-preview {
|
.cdk-drag-preview {
|
||||||
&.adf-datatable-cell-header {
|
&.adf-datatable-cell-header {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
@@ -641,7 +642,7 @@ $data-table-cell-min-width-file-size: $data-table-cell-min-width-1 !default;
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: inherit;
|
height: inherit;
|
||||||
|
|
||||||
.adf-datatable-body[role="rowgroup"] {
|
.adf-datatable-body[role='rowgroup'] {
|
||||||
.adf-datatable-row {
|
.adf-datatable-row {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: var(--adf-theme-background-card-color);
|
background-color: var(--adf-theme-background-card-color);
|
||||||
|
@@ -1329,6 +1329,36 @@ describe('DataTable', () => {
|
|||||||
expect(rows[1].getValue('icon')).toBe('directions_car');
|
expect(rows[1].getValue('icon')).toBe('directions_car');
|
||||||
expect(rows[2].getValue('icon')).toBe('local_shipping');
|
expect(rows[2].getValue('icon')).toBe('local_shipping');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('displayCheckboxesOnHover', () => {
|
||||||
|
const getCheckboxes = () =>
|
||||||
|
fixture.debugElement.queryAll(By.css('.adf-datatable-checkbox-single .adf-checkbox-sr-only')).map((row) => row.nativeElement);
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
dataTable.data = new ObjectDataTableAdapter([{ name: '1' }, { name: '2' }], [new ObjectDataColumn({ key: 'name' })]);
|
||||||
|
dataTable.multiselect = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should always display checkboxes when displayCheckboxesOnHover is set to false', () => {
|
||||||
|
dataTable.displayCheckboxesOnHover = false;
|
||||||
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
const checkboxes = getCheckboxes();
|
||||||
|
checkboxes.forEach((checkbox) => {
|
||||||
|
expect(checkbox.classList).not.toContain('adf-datatable-hover-only');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should display checkboxes on hover when displayCheckboxesOnHover is set to true', () => {
|
||||||
|
dataTable.displayCheckboxesOnHover = true;
|
||||||
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
const checkboxes = getCheckboxes();
|
||||||
|
checkboxes.forEach((checkbox) => {
|
||||||
|
expect(checkbox.classList).toContain('adf-datatable-hover-only');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Accesibility', () => {
|
describe('Accesibility', () => {
|
||||||
|
@@ -238,6 +238,12 @@ export class DataTableComponent implements OnInit, AfterContentInit, OnChanges,
|
|||||||
@Input()
|
@Input()
|
||||||
blurOnResize = true;
|
blurOnResize = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Flag that indicates if selection checkboxes inside row should be displayed on hover only.
|
||||||
|
*/
|
||||||
|
@Input()
|
||||||
|
displayCheckboxesOnHover = false;
|
||||||
|
|
||||||
headerFilterTemplate: TemplateRef<any>;
|
headerFilterTemplate: TemplateRef<any>;
|
||||||
noContentTemplate: TemplateRef<any>;
|
noContentTemplate: TemplateRef<any>;
|
||||||
noPermissionTemplate: TemplateRef<any>;
|
noPermissionTemplate: TemplateRef<any>;
|
||||||
|
@@ -206,7 +206,7 @@ describe('SearchTextInputComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
tick(100);
|
tick(100);
|
||||||
|
|
||||||
expect(component.subscriptAnimationState.params).toEqual({ transform: 'translateX(82%)' });
|
expect(component.subscriptAnimationState.params).toEqual({ transform: 'translateX(95%)' });
|
||||||
discardPeriodicTasks();
|
discardPeriodicTasks();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
@@ -237,7 +237,7 @@ describe('SearchTextInputComponent', () => {
|
|||||||
fixture.detectChanges();
|
fixture.detectChanges();
|
||||||
tick(100);
|
tick(100);
|
||||||
|
|
||||||
expect(component.subscriptAnimationState.params).toEqual({ transform: 'translateX(-82%)' });
|
expect(component.subscriptAnimationState.params).toEqual({ transform: 'translateX(-95%)' });
|
||||||
discardPeriodicTasks();
|
discardPeriodicTasks();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -33,14 +33,14 @@
|
|||||||
<mat-icon>zoom_in</mat-icon>
|
<mat-icon>zoom_in</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button *ngIf="!readOnly" id="viewer-rotate-button"
|
<button *ngIf="!readOnly && allowedEditActions.rotate" id="viewer-rotate-button"
|
||||||
title="{{ 'ADF_VIEWER.ARIA.ROTATE' | translate }}"
|
title="{{ 'ADF_VIEWER.ARIA.ROTATE' | translate }}"
|
||||||
attr.aria-label="{{ 'ADF_VIEWER.ARIA.ROTATE' | translate }}"
|
attr.aria-label="{{ 'ADF_VIEWER.ARIA.ROTATE' | translate }}"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
(click)="rotateImage()">
|
(click)="rotateImage()">
|
||||||
<mat-icon>rotate_left</mat-icon>
|
<mat-icon>rotate_left</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="!readOnly" id="viewer-crop-button"
|
<button *ngIf="!readOnly && allowedEditActions.crop" id="viewer-crop-button"
|
||||||
title="{{ 'ADF_VIEWER.ARIA.CROP' | translate }}"
|
title="{{ 'ADF_VIEWER.ARIA.CROP' | translate }}"
|
||||||
attr.aria-label="{{ 'ADF_VIEWER.ARIA.CROP' | translate }}"
|
attr.aria-label="{{ 'ADF_VIEWER.ARIA.CROP' | translate }}"
|
||||||
mat-icon-button
|
mat-icon-button
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
</adf-toolbar>
|
</adf-toolbar>
|
||||||
|
|
||||||
<adf-toolbar class="adf-secondary-toolbar" *ngIf="!readOnly && isEditing">
|
<adf-toolbar class="adf-secondary-toolbar" *ngIf="isEditing && !readOnly">
|
||||||
<button id="viewer-cancel-button"
|
<button id="viewer-cancel-button"
|
||||||
title="{{ 'ADF_VIEWER.ARIA.CANCEL' | translate }}"
|
title="{{ 'ADF_VIEWER.ARIA.CANCEL' | translate }}"
|
||||||
attr.aria-label="{{ 'ADF_VIEWER.ARIA.CANCEL' | translate }}"
|
attr.aria-label="{{ 'ADF_VIEWER.ARIA.CANCEL' | translate }}"
|
||||||
|
@@ -370,4 +370,36 @@ describe('Test Img viewer component ', () => {
|
|||||||
expect(component.reset).toHaveBeenCalled();
|
expect(component.reset).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('allowedEditActions', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = TestBed.createComponent(ImgViewerComponent);
|
||||||
|
element = fixture.nativeElement;
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should conditionally display rotate and crop buttons based on allowedEditActions', () => {
|
||||||
|
component.readOnly = false;
|
||||||
|
component.allowedEditActions = { rotate: true, crop: true };
|
||||||
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
let rotateButton = element.querySelector('#viewer-rotate-button');
|
||||||
|
let cropButton = element.querySelector('#viewer-crop-button');
|
||||||
|
|
||||||
|
// Check both buttons are visible when allowed
|
||||||
|
expect(rotateButton).not.toBeNull('Rotate button should be visible when allowed');
|
||||||
|
expect(cropButton).not.toBeNull('Crop button should be visible when allowed');
|
||||||
|
|
||||||
|
// Change allowedEditActions to disallow both actions
|
||||||
|
component.allowedEditActions = { rotate: false, crop: false };
|
||||||
|
fixture.detectChanges();
|
||||||
|
|
||||||
|
rotateButton = element.querySelector('#viewer-rotate-button');
|
||||||
|
cropButton = element.querySelector('#viewer-crop-button');
|
||||||
|
|
||||||
|
// Check both buttons are not visible when not allowed
|
||||||
|
expect(rotateButton).toBeNull('Rotate button should not be visible when disallowed');
|
||||||
|
expect(cropButton).toBeNull('Crop button should not be visible when disallowed');
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@@ -54,6 +54,12 @@ export class ImgViewerComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|||||||
@Input()
|
@Input()
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
|
|
||||||
|
@Input()
|
||||||
|
allowedEditActions: { [key: string]: boolean } = {
|
||||||
|
rotate: true,
|
||||||
|
crop: true
|
||||||
|
};
|
||||||
|
|
||||||
@Input()
|
@Input()
|
||||||
urlFile: string;
|
urlFile: string;
|
||||||
|
|
||||||
|
@@ -44,6 +44,7 @@
|
|||||||
<adf-img-viewer [urlFile]="urlFile"
|
<adf-img-viewer [urlFile]="urlFile"
|
||||||
[readOnly]="readOnly"
|
[readOnly]="readOnly"
|
||||||
[fileName]="internalFileName"
|
[fileName]="internalFileName"
|
||||||
|
[allowedEditActions]="allowedEditActions"
|
||||||
[blobFile]="blobFile"
|
[blobFile]="blobFile"
|
||||||
(error)="onUnsupportedFile()"
|
(error)="onUnsupportedFile()"
|
||||||
(submit)="onSubmitFile($event)"
|
(submit)="onSubmitFile($event)"
|
||||||
|
@@ -95,6 +95,17 @@ export class ViewerRenderComponent implements OnChanges, OnInit, OnDestroy {
|
|||||||
@Input()
|
@Input()
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls which actions are enabled in the viewer.
|
||||||
|
* Example:
|
||||||
|
* { rotate: true, crop: false } will enable rotation but disable cropping.
|
||||||
|
*/
|
||||||
|
@Input()
|
||||||
|
allowedEditActions: { [key: string]: boolean } = {
|
||||||
|
rotate: true,
|
||||||
|
crop: true
|
||||||
|
};
|
||||||
|
|
||||||
/** media subtitles for the media player*/
|
/** media subtitles for the media player*/
|
||||||
@Input()
|
@Input()
|
||||||
tracks: Track[] = [];
|
tracks: Track[] = [];
|
||||||
|
@@ -167,6 +167,7 @@
|
|||||||
[blobFile]="blobFile"
|
[blobFile]="blobFile"
|
||||||
[readOnly]="readOnly"
|
[readOnly]="readOnly"
|
||||||
(submitFile)="onSubmitFile($event)"
|
(submitFile)="onSubmitFile($event)"
|
||||||
|
[allowedEditActions]="allowedEditActions"
|
||||||
[urlFile]="urlFile"
|
[urlFile]="urlFile"
|
||||||
(isSaving)="allowNavigate = !$event"
|
(isSaving)="allowNavigate = !$event"
|
||||||
[tracks]="tracks"
|
[tracks]="tracks"
|
||||||
|
@@ -189,6 +189,17 @@ export class ViewerComponent<T> implements OnDestroy, OnInit, OnChanges {
|
|||||||
@Input()
|
@Input()
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controls which actions are enabled in the viewer.
|
||||||
|
* Example:
|
||||||
|
* { rotate: true, crop: false } will enable rotation but disable cropping.
|
||||||
|
*/
|
||||||
|
@Input()
|
||||||
|
allowedEditActions: { [key: string]: boolean } = {
|
||||||
|
rotate: true,
|
||||||
|
crop: true
|
||||||
|
};
|
||||||
|
|
||||||
/** media subtitles for the media player*/
|
/** media subtitles for the media player*/
|
||||||
@Input()
|
@Input()
|
||||||
tracks: Track[] = [];
|
tracks: Track[] = [];
|
||||||
|
@@ -32,7 +32,6 @@ export * from './lib/app-config/index';
|
|||||||
export * from './lib/form/index';
|
export * from './lib/form/index';
|
||||||
export * from './lib/layout/index';
|
export * from './lib/layout/index';
|
||||||
export * from './lib/comments/index';
|
export * from './lib/comments/index';
|
||||||
export * from './lib/buttons-menu/index';
|
|
||||||
export * from './lib/sorting-picker/index';
|
export * from './lib/sorting-picker/index';
|
||||||
export * from './lib/templates/index';
|
export * from './lib/templates/index';
|
||||||
export * from './lib/pipes/index';
|
export * from './lib/pipes/index';
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "extensions",
|
"name": "extensions",
|
||||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||||
"sourceRoot": "lib/extensions",
|
"sourceRoot": "lib/extensions/src",
|
||||||
"projectType": "library",
|
"projectType": "library",
|
||||||
"prefix": "adf",
|
"prefix": "adf",
|
||||||
"targets": {
|
"targets": {
|
||||||
|
@@ -7,6 +7,10 @@
|
|||||||
"extends": [
|
"extends": [
|
||||||
"plugin:@nrwl/nx/angular"
|
"plugin:@nrwl/nx/angular"
|
||||||
],
|
],
|
||||||
|
"parserOptions": {
|
||||||
|
"project": ["lib/insights/tsconfig.lib.json", "lib/insights/tsconfig.spec.json"],
|
||||||
|
"createDefaultProgram": true
|
||||||
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
"no-underscore-dangle": ["error", { "allowAfterThis": true }],
|
||||||
"@angular-eslint/no-output-native": "off",
|
"@angular-eslint/no-output-native": "off",
|
||||||
@@ -74,6 +78,10 @@
|
|||||||
{
|
{
|
||||||
"files": ["*.html"],
|
"files": ["*.html"],
|
||||||
"extends": ["plugin:@nrwl/nx/angular-template"],
|
"extends": ["plugin:@nrwl/nx/angular-template"],
|
||||||
|
"parserOptions": {
|
||||||
|
"project": ["lib/insights/tsconfig.lib.json", "lib/insights/tsconfig.spec.json"],
|
||||||
|
"createDefaultProgram": true
|
||||||
|
},
|
||||||
"rules": {
|
"rules": {
|
||||||
"@angular-eslint/template/no-autofocus": "error",
|
"@angular-eslint/template/no-autofocus": "error",
|
||||||
"@angular-eslint/template/no-positive-tabindex": "error"
|
"@angular-eslint/template/no-positive-tabindex": "error"
|
||||||
|
@@ -2,19 +2,17 @@
|
|||||||
Title: Buttons Menu Component
|
Title: Buttons Menu Component
|
||||||
Added: v2.4.0
|
Added: v2.4.0
|
||||||
Status: Active
|
Status: Active
|
||||||
Last reviewed: 2018-06-08
|
Last reviewed: 2024-06-21
|
||||||
---
|
---
|
||||||
|
|
||||||
# [Buttons Menu Component](../../../lib/core/src/lib/buttons-menu/buttons-menu.component.ts "Defined in buttons-menu.component.ts")
|
# Buttons Menu Component
|
||||||
|
|
||||||
Displays buttons on a responsive menu.
|
Displays buttons on a responsive menu.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
## Basic Usage
|
## Basic Usage
|
||||||
|
|
||||||
### [Transclusions](../../user-guide/transclusion.md)
|
|
||||||
|
|
||||||
Place the buttons for the menu inside this component's HTML tags.
|
Place the buttons for the menu inside this component's HTML tags.
|
||||||
They must use the following structure:
|
They must use the following structure:
|
||||||
|
|
||||||
@@ -42,16 +40,16 @@ They also make use of the Angular material directive `mat-menu-item`.
|
|||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
This component is fully responsive and it will display one of two different layouts
|
This component is fully responsive, and it will display one of two different layouts
|
||||||
depending on the screen size:
|
depending on the screen size:
|
||||||
|
|
||||||
**Desktop View**
|
**Desktop View**
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
**Mobile View**
|
**Mobile View**
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
The component has a property called `isMenuEmpty` that you can access from code. If this is
|
The component has a property called `isMenuEmpty` that you can access from code. If this is
|
||||||
set to true then the component will not show an empty menu with no buttons defined.
|
set to true then the component will not show an empty menu with no buttons defined.
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 8.8 KiB After Width: | Height: | Size: 8.8 KiB |
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { AdfDateFnsAdapter, ButtonsMenuModule, DownloadService, ToolbarComponent, ToolbarTitleComponent } from '@alfresco/adf-core';
|
import { AdfDateFnsAdapter, DownloadService, ToolbarComponent, ToolbarTitleComponent } from '@alfresco/adf-core';
|
||||||
import {
|
import {
|
||||||
AfterContentChecked,
|
AfterContentChecked,
|
||||||
Component,
|
Component,
|
||||||
@@ -45,6 +45,7 @@ import { MatInputModule } from '@angular/material/input';
|
|||||||
import { MatMenuModule } from '@angular/material/menu';
|
import { MatMenuModule } from '@angular/material/menu';
|
||||||
import { WIDGET_DIRECTIVES } from './widgets';
|
import { WIDGET_DIRECTIVES } from './widgets';
|
||||||
import { MatButtonModule } from '@angular/material/button';
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
import { ButtonsMenuComponent } from './buttons-menu/buttons-menu.component';
|
||||||
|
|
||||||
const FORMAT_DATE_ACTIVITI = 'YYYY-MM-DD';
|
const FORMAT_DATE_ACTIVITI = 'YYYY-MM-DD';
|
||||||
|
|
||||||
@@ -113,15 +114,15 @@ export interface ReportFormValues {
|
|||||||
MatIconModule,
|
MatIconModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
ToolbarComponent,
|
ToolbarComponent,
|
||||||
|
ToolbarTitleComponent,
|
||||||
MatFormFieldModule,
|
MatFormFieldModule,
|
||||||
MatInputModule,
|
MatInputModule,
|
||||||
MatMenuModule,
|
MatMenuModule,
|
||||||
ToolbarTitleComponent,
|
|
||||||
...WIDGET_DIRECTIVES,
|
...WIDGET_DIRECTIVES,
|
||||||
MatDialogModule,
|
MatDialogModule,
|
||||||
FormsModule,
|
FormsModule,
|
||||||
MatButtonModule,
|
MatButtonModule,
|
||||||
ButtonsMenuModule
|
ButtonsMenuComponent
|
||||||
],
|
],
|
||||||
templateUrl: './analytics-report-parameters.component.html',
|
templateUrl: './analytics-report-parameters.component.html',
|
||||||
styleUrls: ['./analytics-report-parameters.component.scss'],
|
styleUrls: ['./analytics-report-parameters.component.scss'],
|
||||||
|
@@ -16,12 +16,16 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { MaterialModule } from '../material.module';
|
import { Component } from '@angular/core';
|
||||||
import { CUSTOM_ELEMENTS_SCHEMA, Component } from '@angular/core';
|
import { ButtonsMenuComponent } from '@alfresco/adf-insights';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { CommonModule } from '@angular/common';
|
||||||
|
import { MatMenuModule } from '@angular/material/menu';
|
||||||
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-custom-container',
|
selector: 'adf-custom-container',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, ButtonsMenuComponent, MatMenuModule, MatIconModule],
|
||||||
template: `
|
template: `
|
||||||
<adf-buttons-action-menu>
|
<adf-buttons-action-menu>
|
||||||
<button mat-menu-item (click)="assignValue()"><mat-icon>settings</mat-icon><span>Button</span></button>
|
<button mat-menu-item (click)="assignValue()"><mat-icon>settings</mat-icon><span>Button</span></button>
|
||||||
@@ -50,9 +54,7 @@ describe('ButtonsMenuComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [ButtonsMenuComponent, CustomContainerComponent]
|
||||||
declarations: [CustomContainerComponent],
|
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(CustomContainerComponent);
|
fixture = TestBed.createComponent(CustomContainerComponent);
|
||||||
element = fixture.debugElement.nativeElement;
|
element = fixture.debugElement.nativeElement;
|
||||||
@@ -93,9 +95,8 @@ describe('ButtonsMenuComponent', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), MaterialModule],
|
imports: [ButtonsMenuComponent],
|
||||||
declarations: [CustomEmptyContainerComponent],
|
declarations: [CustomEmptyContainerComponent]
|
||||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(CustomEmptyContainerComponent);
|
fixture = TestBed.createComponent(CustomEmptyContainerComponent);
|
||||||
element = fixture.nativeElement;
|
element = fixture.nativeElement;
|
@@ -16,17 +16,20 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Component, ContentChildren, QueryList, AfterContentInit, ViewEncapsulation } from '@angular/core';
|
import { Component, ContentChildren, QueryList, AfterContentInit, ViewEncapsulation } from '@angular/core';
|
||||||
import { MatMenuItem } from '@angular/material/menu';
|
import { MatMenuItem, MatMenuModule } from '@angular/material/menu';
|
||||||
|
import { MatButtonModule } from '@angular/material/button';
|
||||||
|
import { MatIconModule } from '@angular/material/icon';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-buttons-action-menu',
|
selector: 'adf-buttons-action-menu',
|
||||||
|
standalone: true,
|
||||||
|
imports: [CommonModule, MatButtonModule, MatMenuModule, MatIconModule],
|
||||||
templateUrl: './buttons-menu.component.html',
|
templateUrl: './buttons-menu.component.html',
|
||||||
styleUrls: ['./buttons-menu.component.scss'],
|
styleUrls: ['./buttons-menu.component.scss'],
|
||||||
encapsulation: ViewEncapsulation.None
|
encapsulation: ViewEncapsulation.None
|
||||||
})
|
})
|
||||||
|
|
||||||
export class ButtonsMenuComponent implements AfterContentInit {
|
export class ButtonsMenuComponent implements AfterContentInit {
|
||||||
|
|
||||||
@ContentChildren(MatMenuItem) buttons: QueryList<MatMenuItem>;
|
@ContentChildren(MatMenuItem) buttons: QueryList<MatMenuItem>;
|
||||||
|
|
||||||
isMenuEmpty: boolean;
|
isMenuEmpty: boolean;
|
@@ -21,6 +21,7 @@ import { AnalyticsReportListComponent } from './components/analytics-report-list
|
|||||||
import { AnalyticsReportParametersComponent } from './components/analytics-report-parameters.component';
|
import { AnalyticsReportParametersComponent } from './components/analytics-report-parameters.component';
|
||||||
import { AnalyticsGeneratorComponent } from './components/analytics-generator.component';
|
import { AnalyticsGeneratorComponent } from './components/analytics-generator.component';
|
||||||
import { AnalyticsReportHeatMapComponent } from './components/analytics-report-heat-map.component';
|
import { AnalyticsReportHeatMapComponent } from './components/analytics-report-heat-map.component';
|
||||||
|
import { ButtonsMenuComponent } from './components/buttons-menu/buttons-menu.component';
|
||||||
|
|
||||||
export * from './components/analytics.component';
|
export * from './components/analytics.component';
|
||||||
export * from './components/analytics-report-heat-map.component';
|
export * from './components/analytics-report-heat-map.component';
|
||||||
@@ -28,12 +29,14 @@ export * from './components/analytics-generator.component';
|
|||||||
export * from './components/analytics-report-list.component';
|
export * from './components/analytics-report-list.component';
|
||||||
export * from './components/analytics-report-parameters.component';
|
export * from './components/analytics-report-parameters.component';
|
||||||
export * from './components/analytics.component';
|
export * from './components/analytics.component';
|
||||||
|
export * from './components/buttons-menu/buttons-menu.component';
|
||||||
|
|
||||||
export * from './services/analytics.service';
|
export * from './services/analytics.service';
|
||||||
export * from './components/widgets';
|
export * from './components/widgets';
|
||||||
|
|
||||||
export const ANALYTICS_PROCESS_DIRECTIVES = [
|
export const ANALYTICS_PROCESS_DIRECTIVES = [
|
||||||
...WIDGET_DIRECTIVES,
|
...WIDGET_DIRECTIVES,
|
||||||
|
ButtonsMenuComponent,
|
||||||
AnalyticsComponent,
|
AnalyticsComponent,
|
||||||
AnalyticsReportListComponent,
|
AnalyticsReportListComponent,
|
||||||
AnalyticsReportParametersComponent,
|
AnalyticsReportParametersComponent,
|
||||||
|
189
package-lock.json
generated
189
package-lock.json
generated
@@ -190,6 +190,16 @@
|
|||||||
"resolved": "lib/eslint-angular",
|
"resolved": "lib/eslint-angular",
|
||||||
"link": true
|
"link": true
|
||||||
},
|
},
|
||||||
|
"node_modules/@alfresco/js-api": {
|
||||||
|
"version": "7.9.0-9321526184",
|
||||||
|
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-7.9.0-9321526184.tgz",
|
||||||
|
"integrity": "sha512-VFN/DyWrUCUuZ1RMSKJp2MbPdoRDtffZo6rXnuTooNxvwyF/mr9VtkMM+JSp1Eo3r9oMRipr0BcNN8Hy1hKing==",
|
||||||
|
"dependencies": {
|
||||||
|
"event-emitter": "^0.3.5",
|
||||||
|
"superagent": "^9.0.1",
|
||||||
|
"tslib": "^2.6.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@ampproject/remapping": {
|
"node_modules/@ampproject/remapping": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz",
|
||||||
@@ -2171,6 +2181,109 @@
|
|||||||
"node": ">=6.9.0"
|
"node": ">=6.9.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@babel/helper-optimise-call-expression": {
|
||||||
|
"version": "7.22.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz",
|
||||||
|
"integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/types": "^7.22.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/helper-plugin-utils": {
|
||||||
|
"version": "7.24.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz",
|
||||||
|
"integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/helper-remap-async-to-generator": {
|
||||||
|
"version": "7.22.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz",
|
||||||
|
"integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/helper-annotate-as-pure": "^7.22.5",
|
||||||
|
"@babel/helper-environment-visitor": "^7.22.20",
|
||||||
|
"@babel/helper-wrap-function": "^7.22.20"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/helper-remap-async-to-generator/node_modules/@babel/helper-annotate-as-pure": {
|
||||||
|
"version": "7.22.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz",
|
||||||
|
"integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/types": "^7.22.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/helper-replace-supers": {
|
||||||
|
"version": "7.24.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.24.1.tgz",
|
||||||
|
"integrity": "sha512-QCR1UqC9BzG5vZl8BMicmZ28RuUBnHhAMddD8yHFHDRH9lLTZ9uUPehX8ctVPT8l0TKblJidqcgUUKGVrePleQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/helper-environment-visitor": "^7.22.20",
|
||||||
|
"@babel/helper-member-expression-to-functions": "^7.23.0",
|
||||||
|
"@babel/helper-optimise-call-expression": "^7.22.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@babel/core": "^7.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/helper-simple-access": {
|
||||||
|
"version": "7.22.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
|
||||||
|
"integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/types": "^7.22.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/helper-skip-transparent-expression-wrappers": {
|
||||||
|
"version": "7.22.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz",
|
||||||
|
"integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/types": "^7.22.5"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@babel/helper-split-export-declaration": {
|
||||||
|
"version": "7.18.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz",
|
||||||
|
"integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@babel/types": "^7.18.6"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=6.9.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@babel/helper-string-parser": {
|
"node_modules/@babel/helper-string-parser": {
|
||||||
"version": "7.24.7",
|
"version": "7.24.7",
|
||||||
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz",
|
"resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz",
|
||||||
@@ -8497,10 +8610,7 @@
|
|||||||
"color-convert": "^2.0.1"
|
"color-convert": "^2.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">= 10"
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nrwl/node/node_modules/chalk": {
|
"node_modules/@nrwl/node/node_modules/chalk": {
|
||||||
@@ -8508,27 +8618,28 @@
|
|||||||
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
|
||||||
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
"integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"optional": true,
|
||||||
"ansi-styles": "^4.1.0",
|
"os": [
|
||||||
"supports-color": "^7.1.0"
|
"linux"
|
||||||
},
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 10"
|
"node": ">= 10"
|
||||||
},
|
|
||||||
"funding": {
|
|
||||||
"url": "https://github.com/chalk/chalk?sponsor=1"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nrwl/node/node_modules/color-convert": {
|
"node_modules/@nrwl/nx-win32-arm64-msvc": {
|
||||||
"version": "2.0.1",
|
"version": "15.9.7",
|
||||||
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/@nrwl/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-15.9.7.tgz",
|
||||||
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
|
"integrity": "sha512-GSQ54hJ5AAnKZb4KP4cmBnJ1oC4ILxnrG1mekxeM65c1RtWg9NpBwZ8E0gU3xNrTv8ZNsBeKi/9UhXBxhsIh8A==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"optional": true,
|
||||||
"color-name": "~1.1.4"
|
"os": [
|
||||||
},
|
"win32"
|
||||||
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=7.0.0"
|
"node": ">= 10"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@nrwl/node/node_modules/color-name": {
|
"node_modules/@nrwl/node/node_modules/color-name": {
|
||||||
@@ -24141,6 +24252,15 @@
|
|||||||
"integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==",
|
"integrity": "sha512-iKuQcq+NdHqlAcwUY0o/HL69XQrUaQdMjmStJ8JFmUaiiQErlhrmuigkg/CU4E2J0IyUKUrMAgl36TvN67MqTw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"node_modules/csso/node_modules/source-map": {
|
||||||
|
"version": "0.6.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
||||||
|
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/cssstyle": {
|
"node_modules/cssstyle": {
|
||||||
"version": "4.0.1",
|
"version": "4.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/cssstyle/-/cssstyle-4.0.1.tgz",
|
||||||
@@ -25647,37 +25767,6 @@
|
|||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/escodegen": {
|
|
||||||
"version": "2.1.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz",
|
|
||||||
"integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==",
|
|
||||||
"dev": true,
|
|
||||||
"dependencies": {
|
|
||||||
"esprima": "^4.0.1",
|
|
||||||
"estraverse": "^5.2.0",
|
|
||||||
"esutils": "^2.0.2"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"escodegen": "bin/escodegen.js",
|
|
||||||
"esgenerate": "bin/esgenerate.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=6.0"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
|
||||||
"source-map": "~0.6.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/escodegen/node_modules/source-map": {
|
|
||||||
"version": "0.6.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
|
|
||||||
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
|
|
||||||
"dev": true,
|
|
||||||
"optional": true,
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/eslint": {
|
"node_modules/eslint": {
|
||||||
"version": "8.57.0",
|
"version": "8.57.0",
|
||||||
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
|
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
|
||||||
|
Reference in New Issue
Block a user