Merged PR 173: Implements API methods through right click + more (read desc)

- Implements API methods through right click
- Refactor events
- Refactor usage of setHistory and setHistoryCurrentStep into a single function
- Update ContainerOperations documentations
- Added AddContainers in order to add multiple containers + refactor AddContainer to use it
- Fix regression
- Fix AddContainer at index
This commit is contained in:
Eric Nguyen 2022-08-30 14:45:29 +00:00
parent 79c6874240
commit 57e6c9a156
20 changed files with 652 additions and 291 deletions

12
src/Interfaces/IAction.ts Normal file
View file

@ -0,0 +1,12 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { AddMethod } from '../Enums/AddMethod';
import { IImage } from './IImage';
export interface IAction {
Id: string
CustomLogo: IImage
Label: string
Description: string
Action: string
AddingBehavior: AddMethod
}

View file

@ -2,6 +2,7 @@
import React from 'react';
import { AddMethod } from '../Enums/AddMethod';
import { XPositionReference } from '../Enums/XPositionReference';
import { IAction } from './IAction';
import { IMargin } from './IMargin';
/** Model of available container used in application configuration */
@ -20,5 +21,6 @@ export interface IAvailableContainer {
CustomSVG?: string
DefaultChildType?: string
Style?: React.CSSProperties
Actions?: IAction[]
UserData?: object
}

View file

@ -0,0 +1,14 @@
import { IContainerModel } from './IContainerModel';
import { IHistoryState } from './IHistoryState';
/* eslint-disable @typescript-eslint/naming-convention */
export interface ISetContainerListRequest {
/** Name of the action declared in the API */
Action: string
/** Selected container */
Container: IContainerModel
/** Current application state */
ApplicationState: IHistoryState
}

View file

@ -0,0 +1,6 @@
/* eslint-disable @typescript-eslint/naming-convention */
import { IContainerModel } from './IContainerModel';
export interface ISetContainerListResponse {
Containers: IContainerModel[]
}