1 import {VnfMember} from "../../../models/VnfMember";
2 import {Observable} from "rxjs";
3 import {CustomTableColumnDefinition} from "./elements-table.component";
5 export class ElementTableRowModel extends VnfMember {
6 isSelected: boolean = false;
10 /*******************************************************************************************************************************
12 * @type: popup type (VPN, NETWORK, VNFGROUP)
14 * @description: popup upper message
15 * @topButtonText: (optional)
17 * @action: button action
18 * @backAction : arrow back button action (can close the modal/move to next step)
19 * @uniqObjectField: uniq object field that we can find in O(1)
20 * @maxSelectRow: max number of row that user can select (default = no limit)(optional)
21 * @getElements: function that should return Observable<any[]> of collection of elements to show in the table
22 * @noElementsMsg : when there are no element some message should shown
23 * @searchFields : extra information in the left section
24 * @criteria: extra criteria on table content (optional)
25 * @tableHeaders : table headers
26 * @tableContent: table td's information.
28 ******************************************************************************************************************************/
30 export class ModalInformation {
32 currentCriteriaInfo? : Object;
34 description ?: string;
37 action ?: (...args) => any
41 action ?: (...args)=> any
43 backAction? : (...args) => any;
44 uniqObjectField : string;
45 maxSelectRow ?: number;
46 getElements : (...args) => Observable<any[]>;
47 noElementsMsg : string;
48 searchFields: ISearchField[];
49 criteria ?: ICriteria[];
50 tableHeaders : CustomTableColumnDefinition[];
51 tableContent : ITableContent[];
52 serviceModelId: string;
56 export interface ISearchField {
64 export interface ICriteria {
67 onInit?: (...args) => Observable<string>;
68 onChange? : (...arg) => void;
71 isRequired ?: boolean;
76 export interface ITableContent {
78 contents : {id : string[], value : string[], prefix ?: string, type? : string}[];
81 export enum SearchFieldItemType {