[ACS-8001] content enrichment menu component

This commit is contained in:
Mykyta Maliarchuk
2024-06-11 13:23:56 +02:00
committed by Mykyta Maliarchuk
parent 548592b329
commit a1cbcfca33
54 changed files with 1134 additions and 183 deletions

View File

@@ -16,20 +16,23 @@ export interface BaseCardViewUpdate {
itemUpdated$: Subject<UpdateNotification>;
itemClicked$: Subject<ClickNotification>;
updateItem$: Subject<CardViewBaseItemModel>;
predictionStatusChanged$: Subject<PredictionStatusUpdate[]>;
update(property: CardViewBaseItemModel, newValue: any);
clicked(property: CardViewBaseItemModel);
updateElement(notification: CardViewBaseItemModel);
onPredictionStatusChanged(notification: PredictionStatusUpdate[]);
}
```
## Properties
| Name | Type | Description |
| ---- | ---- | ----------- |
| itemUpdated$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`UpdateNotification`](../../../lib/core/src/lib/card-view/interfaces/update-notification.interface.ts)`>` | The current updated item. |
| itemClicked$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`ClickNotification`](../../../lib/core/src/lib/card-view/interfaces/click-notification.interface.ts)`>` | The current clicked item. |
| updateItem$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts)`>` | The current model for the update item. |
| Name | Type | Description |
|--------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| itemUpdated$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`UpdateNotification`](../../../lib/core/src/lib/card-view/interfaces/update-notification.interface.ts)`>` | The current updated item. |
| itemClicked$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`ClickNotification`](../../../lib/core/src/lib/card-view/interfaces/click-notification.interface.ts)`>` | The current clicked item. |
| updateItem$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts)`>` | The current model for the update item. |
| predictionStatusChanged$ | [`Subject`](http://reactivex.io/documentation/subject.html)`<`[`PredictionStatusUpdate[]`](./prediction-status-update.interface.md)`>` | The current model for items with irrelevant predictions. |
### Methods
@@ -48,6 +51,10 @@ export interface BaseCardViewUpdate {
Update updateItem$ observable.
- notification:\_ [`CardViewBaseItemModel`](../../../lib/core/src/lib/card-view/models/card-view-baseitem.model.ts) - The notification.
- **onPredictionStatusChanged**(notification: [`PredictionStatusUpdate[]`](./prediction-status-update.interface.md))<br/>
Update predictionStatusChanged$ observable.
- notification:\_ [`PredictionStatusUpdate[]`](./prediction-status-update.interface.md) - The notification.
## See also
- [CardViewUpdate service](../services/card-view-update.service.md)

View File

@@ -2,7 +2,7 @@
Title: Card View Item interface
Added: v2.0.0
Status: Active
Last reviewed: 2018-05-08
Last reviewed: 2024-06-11
---
# [Card View Item interface](../../../lib/core/src/lib/card-view/interfaces/card-view-item.interface.ts "Defined in card-view-item.interface.ts")
@@ -22,22 +22,24 @@ export interface CardViewItem {
editable?: boolean;
icon?: string;
data?: any;
prediction?: Prediction;
}
```
### Properties
| Name | Type | Default | Description |
| ---- | ---- | ------- | ----------- |
| label | string | "" | Item label |
| value | any | | The original data value for the item |
| key | string | "" | Identifying key (important when editing the item) |
| default | any | | The default value to display if the value is empty |
| displayValue | string | "" | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
| clickable | boolean | false | Toggles whether the item is clickable |
| icon | string | | The material icon to show beside clickable items |
| data | any | null | Any custom data which is needed to be provided and stored in the model for any reason. During an update or a click event this can be a container of any custom data which can be useful for 3rd party codes. |
| Name | Type | Default | Description |
|--------------|------------|---------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| label | string | "" | Item label |
| value | any | | The original data value for the item |
| key | string | "" | Identifying key (important when editing the item) |
| default | any | | The default value to display if the value is empty |
| displayValue | string | "" | The value to display |
| editable | boolean | false | Toggles whether the item is editable |
| clickable | boolean | false | Toggles whether the item is clickable |
| icon | string | | The material icon to show beside clickable items |
| data | any | null | Any custom data which is needed to be provided and stored in the model for any reason. During an update or a click event this can be a container of any custom data which can be useful for 3rd party codes. |
| prediction | Prediction | | Property prediction |
## Details

View File

@@ -0,0 +1,28 @@
---
Title: Prediction Status Update Interface
Added: v6.10.0
Status: Active
Last reviewed: 2024-06-11
---
# [Prediction Status Update Interface](../../../lib/core/src/lib/prediction/interfaces/prediction-status-update.interface.ts "Defined in prediction-status-update.interface.ts")
## Basic usage
```ts
export interface PredictionStatusUpdate {
key: string;
previousValue?: any;
}
```
## Properties
| Name | Type | Description |
|---------------|----------|-------------------------------|
| key | `string` | Key of the property. |
| previousValue | `any` | Previous human entered value. |
## See also
- [BaseCardViewUpdate interface](../interfaces/base-card-view-update.interface.md)