mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Fetch the userInfo once loggedIn and expose the capability of admin (#7682)
* Fetch the userInfo once loggedIn and expose the cabilibility of admin * Rollback method * Return same use if defined * Use the same pepleContent service for UserInfoCOmpnent * Remove useless import * Use interface * Use angular resolver instead of guard * Remove fdescribe * Fix linting * Regenerate doc * Improve doc * Fix optional * Fix the unit test * Fix comment * Fix lint * Fix unit * Add fetch user as part of the ssoGuard * Fix unit test after fetch * Add additional unit * Fix await
This commit is contained in:
@@ -21,7 +21,7 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
- [Column Template](#column-template)
|
||||
- [Styling Techniques](#styling-techniques)
|
||||
- [Using the copyContent option](#using-the-copycontent-option)
|
||||
- [Exapmple of column customData](#example-of-column-customData)
|
||||
- [Example of column customData](#example-of-column-customdata)
|
||||
- [See also](#see-also)
|
||||
|
||||
## Basic Usage
|
||||
@@ -44,18 +44,18 @@ Defines column properties for DataTable, Tasklist, Document List and other compo
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| id | `string` | '' | Column identifier. |
|
||||
| copyContent | `boolean` | | Enables/disables a [Clipboard directive](../../core/directives/clipboard.directive.md) to allow copying of cell contents. |
|
||||
| cssClass | `string` | | Additional CSS class to be applied to column (header and cells). |
|
||||
| customData | `any` | | You can specify any custom data which can be used by any specific feature |
|
||||
| draggable | `boolean` | false | Toggles drag and drop for header column. |
|
||||
| editable | `boolean` | false | Toggles the editing support of the column data. |
|
||||
| focus | `boolean` | true | Enable or disable cell focus |
|
||||
| format | `string` | | Value format (if supported by the parent component), for example format of the date. |
|
||||
| formatTooltip | `Function` | | Custom tooltip formatter function. |
|
||||
| id | `string` | "" | Column identifier. |
|
||||
| isHidden | `boolean` | false | Hides columns |
|
||||
| key | `string` | | Data source key. Can be either a column/property key like `title` or a property path like `createdBy.name`. |
|
||||
| sortable | `boolean` | true | Toggles ability to sort by this column, for example by clicking the column header. |
|
||||
| customData | `Generic` | any | Any feature specific data |
|
||||
| draggable | `boolean` | false | Toggles drag and drop for header column. |
|
||||
| isHidden | `boolean` | false | Hides columns |
|
||||
| sortingKey | `string` | | When using server side sorting the column used by the api call where the sorting will be performed |
|
||||
| srTitle | `string` | | Title to be used for screen readers. |
|
||||
| title | `string` | "" | Display title of the column, typically used for column headers. You can use the i18n resource key to get it translated automatically. |
|
||||
@@ -363,7 +363,7 @@ HTML `<data-column>` element example:
|
||||
<data-column [customData]="MyCustomData" key="id" title="Id"></data-column>
|
||||
```
|
||||
|
||||
You can use generic type for `DataColumn` in order to get intellisense working e.g.
|
||||
You can use generic type for [`DataColumn`](../../../lib/core/datatable/data/data-column.model.ts) in order to get intellisense working e.g.
|
||||
|
||||
```ts
|
||||
const dataColumn: DataColumn<{ shouldPerformActionIfDisplayed: boolean }> = {
|
||||
|
@@ -375,6 +375,7 @@ Learm more about styling your datatable: [Customizing the component's styles](#c
|
||||
| display | `string` | DisplayMode.List | Selects the display mode of the table. Can be "list" or "gallery". |
|
||||
| fallbackThumbnail | `string` | | Fallback image for rows where the thumbnail is missing. |
|
||||
| loading | `boolean` | false | Flag that indicates if the datatable is in loading state and needs to show the loading template (see the docs to learn how to configure a loading template). |
|
||||
| mainTableAction | `boolean` | true | Toggles main data table action column. |
|
||||
| multiselect | `boolean` | false | Toggles multiple row selection, which renders checkboxes at the beginning of each row. |
|
||||
| noPermission | `boolean` | false | Flag that indicates if the datatable should show the "no permission" template. |
|
||||
| resolverFn | `Function` | null | Custom resolver function which is used to parse dynamic column objects see the docs to learn how to configure a resolverFn. |
|
||||
@@ -384,6 +385,7 @@ Learm more about styling your datatable: [Customizing the component's styles](#c
|
||||
| rows | `any[]` | \[] | The rows that the datatable will show. |
|
||||
| selectionMode | `string` | "single" | Row selection mode. Can be none, `single` or `multiple`. For `multiple` mode, you can use Cmd (macOS) or Ctrl (Win) modifier key to toggle selection for multiple rows. |
|
||||
| showHeader | `ShowHeaderMode` | | Toggles the header. |
|
||||
| showMainDatatableActions | `boolean` | false | Toggles the main datatable action. |
|
||||
| sorting | `any[]` | \[] | Define the sort order of the datatable. Possible values are : [`created`, `desc`], [`created`, `asc`], [`due`, `desc`], [`due`, `asc`] |
|
||||
| stickyHeader | `boolean` | false | Toggles the sticky header mode. |
|
||||
|
||||
@@ -391,13 +393,12 @@ Learm more about styling your datatable: [Customizing the component's styles](#c
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| columnOrderChanged | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataColumn`](../../../lib/core/datatable/data/data-column.model.ts)`<>[]>` | Emitted after dragging and dropping column header. |
|
||||
| executeRowAction | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowActionEvent`](../../../lib/core/datatable/components/data-row-action.event.ts)`>` | Emitted when the user executes a row action. |
|
||||
| rowClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user clicks a row. |
|
||||
| rowDblClick | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataRowEvent`](../../../lib/core/datatable/data/data-row-event.model.ts)`>` | Emitted when the user double-clicks a row. |
|
||||
| showRowActionsMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the actions menu is displayed for a row. |
|
||||
| showRowContextMenu | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataCellEvent`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted before the context menu is displayed for a row. |
|
||||
| columnOrderChanged | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<`[`DataColumn`](../../../lib/core/datatable/components/data-cell.event.ts)`>` | Emitted after dragging and dropping column header. |
|
||||
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -27,7 +27,7 @@ based on the field type or the metadata information.
|
||||
|
||||
| Name | Type | Default value | Description |
|
||||
| ---- | ---- | ------------- | ----------- |
|
||||
| field | [`FormFieldModel`](../../core/models/form-field.model.md) | null | Contains all the necessary data needed to determine what UI [`Widget`](../../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the `FormFieldModel` definitions. |
|
||||
| field | [`FormFieldModel`](../../core/models/form-field.model.md) | null | Contains all the necessary data needed to determine what UI Widget to use when rendering the field in the form. You would typically not create this data manually but instead create the form in APS and export it to get to all the [`FormFieldModel`](../../core/models/form-field.model.md) definitions. |
|
||||
|
||||
## Details
|
||||
|
||||
|
@@ -38,7 +38,7 @@ Displays the Start [`Form`](../../../lib/process-services/src/lib/task-list/mode
|
||||
| nameNode | `string` | | Name to assign to the new node where the metadata are stored. |
|
||||
| nodeId | `string` | | Content Services node ID for the form metadata. |
|
||||
| path | `string` | | Path of the folder where the metadata will be stored. |
|
||||
| processDefinitionId | `string` | | [Definition](../../../lib/cli/node_modules/@alfresco/js-api/src/api/content-rest-api/model/definition.ts) ID of the process to start, this parameter can not be use in combination with processId |
|
||||
| processDefinitionId | `string` | | Definition ID of the process to start, this parameter can not be use in combination with processId |
|
||||
| processId | `string` | | Process ID of the process to start, this parameter can not be use in combination with processDefinitionId |
|
||||
| readOnly | `boolean` | false | Toggle readonly state of the form. Forces all form widgets to render as readonly if enabled. |
|
||||
| readOnlyForm | `boolean` | false | Is the form read-only (ie, can't be edited)? |
|
||||
|
Reference in New Issue
Block a user