updating to version 1.2.1
This commit is contained in:
parent
6eaeeb760e
commit
338a488ec7
@ -132,3 +132,12 @@ Inital commit, which is working with the browser
|
|||||||
- `lib/types/index`: Exporting `ui` elements
|
- `lib/types/index`: Exporting `ui` elements
|
||||||
- Fixes:
|
- Fixes:
|
||||||
- `types/nope/nopeInstanceManager.interface`: Fixing Type of createInstance. Now the Type `I` extends `INopeModule` instead of being set to `IGenericNopeModule`
|
- `types/nope/nopeInstanceManager.interface`: Fixing Type of createInstance. Now the Type `I` extends `INopeModule` instead of being set to `IGenericNopeModule`
|
||||||
|
|
||||||
|
# 1.2.1
|
||||||
|
- Added:
|
||||||
|
- `types/ui/helpers.interface`: Added the ui section in `IRenderData`. This contains the following props: `fullscreen` (INopeObservable<boolean>) to controll the fullscreen / ge the state. Additionally the functions `openFullscreen`, `closeFullScreen` and `getTheme` have been added. Added type `IUiTheme`
|
||||||
|
- Modified:
|
||||||
|
- Renamed `IEditPage` to `IServiceEditPage`
|
||||||
|
- Renamed `NODE_TYPE_COMPOSED` to `NODE_TYPE_GROUP`
|
||||||
|
- Adapted `TRenderConfigureServicePage`, `TRenderInstancePage` and `TInstanceManagerPage` by adding `Extension`-Type
|
||||||
|
- Adapted `TRenderFunction` removing the args setting.
|
@ -1 +1 @@
|
|||||||
1.2.0
|
1.2.1
|
@ -22,7 +22,7 @@ export type VALID_PORTS =
|
|||||||
| PORT_PRODUCE_TOKEN
|
| PORT_PRODUCE_TOKEN
|
||||||
| PORT_REQUIRE_TOKEN;
|
| PORT_REQUIRE_TOKEN;
|
||||||
|
|
||||||
export type NODE_TYPE_COMPOSED = "node:composed";
|
export type NODE_TYPE_GROUP = "node:group";
|
||||||
export type NODE_TYPE_CONSTANT = "data:constant";
|
export type NODE_TYPE_CONSTANT = "data:constant";
|
||||||
export type NODE_TYPE_DATA_TO_TOKEN = "logic:data-to-token";
|
export type NODE_TYPE_DATA_TO_TOKEN = "logic:data-to-token";
|
||||||
export type NODE_TYPE_FLOW_OPERATION = "logic:flow";
|
export type NODE_TYPE_FLOW_OPERATION = "logic:flow";
|
||||||
@ -32,7 +32,7 @@ export type NODE_TYPE_TRANSITION = "logic:transition";
|
|||||||
export type NODE_TYPE_VAR = "data:constant";
|
export type NODE_TYPE_VAR = "data:constant";
|
||||||
|
|
||||||
export type VALID_NODES =
|
export type VALID_NODES =
|
||||||
| NODE_TYPE_COMPOSED
|
| NODE_TYPE_GROUP
|
||||||
| NODE_TYPE_CONSTANT
|
| NODE_TYPE_CONSTANT
|
||||||
| NODE_TYPE_DATA_TO_TOKEN
|
| NODE_TYPE_DATA_TO_TOKEN
|
||||||
| NODE_TYPE_FLOW_OPERATION
|
| NODE_TYPE_FLOW_OPERATION
|
||||||
@ -62,7 +62,7 @@ export const VALID_PORTS: Array<VALID_PORTS> = [
|
|||||||
PORT_REQUIRE_TOKEN,
|
PORT_REQUIRE_TOKEN,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const NODE_TYPE_COMPOSED: NODE_TYPE_COMPOSED = "node:composed";
|
export const NODE_TYPE_GROUP: NODE_TYPE_GROUP = "node:group";
|
||||||
export const NODE_TYPE_CONSTANT: NODE_TYPE_CONSTANT = "data:constant";
|
export const NODE_TYPE_CONSTANT: NODE_TYPE_CONSTANT = "data:constant";
|
||||||
export const NODE_TYPE_DATA_TO_TOKEN: NODE_TYPE_DATA_TO_TOKEN =
|
export const NODE_TYPE_DATA_TO_TOKEN: NODE_TYPE_DATA_TO_TOKEN =
|
||||||
"logic:data-to-token";
|
"logic:data-to-token";
|
||||||
@ -74,7 +74,7 @@ export const NODE_TYPE_TRANSITION: NODE_TYPE_TRANSITION = "logic:transition";
|
|||||||
export const NODE_TYPE_VAR: NODE_TYPE_VAR = "data:constant";
|
export const NODE_TYPE_VAR: NODE_TYPE_VAR = "data:constant";
|
||||||
|
|
||||||
export const VALID_NODES: Array<VALID_NODES> = [
|
export const VALID_NODES: Array<VALID_NODES> = [
|
||||||
NODE_TYPE_COMPOSED,
|
NODE_TYPE_GROUP,
|
||||||
NODE_TYPE_CONSTANT,
|
NODE_TYPE_CONSTANT,
|
||||||
NODE_TYPE_DATA_TO_TOKEN,
|
NODE_TYPE_DATA_TO_TOKEN,
|
||||||
NODE_TYPE_FLOW_OPERATION,
|
NODE_TYPE_FLOW_OPERATION,
|
||||||
@ -96,6 +96,8 @@ export interface IBaseNode {
|
|||||||
width: number;
|
width: number;
|
||||||
height: number;
|
height: number;
|
||||||
};
|
};
|
||||||
|
group?: number | string;
|
||||||
|
isGroup?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IPort {
|
export interface IPort {
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
import { TRenderFunctionResult } from "../layout.interface";
|
import { TRenderFunctionResult } from "../layout.interface";
|
||||||
import { IPort } from "./INodes";
|
import { IPort } from "./INodes";
|
||||||
|
|
||||||
export interface IEditPage<T = any> extends TRenderFunctionResult {
|
export interface IServiceEditPage<T = any> extends TRenderFunctionResult {
|
||||||
/**
|
/**
|
||||||
* Function, which must return the current service-data.
|
* Function, which must return the current service-data.
|
||||||
*
|
*
|
||||||
@ -14,7 +14,7 @@ export interface IEditPage<T = any> extends TRenderFunctionResult {
|
|||||||
* @return {boolean}
|
* @return {boolean}
|
||||||
* @memberof IEditPage
|
* @memberof IEditPage
|
||||||
*/
|
*/
|
||||||
getData(): any;
|
getData(): T;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function which must return true, if the Entered-
|
* Function which must return true, if the Entered-
|
@ -5,7 +5,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export * from "./IEdges";
|
export * from "./IEdges";
|
||||||
export * from "./IEditPage";
|
export * from "./IServiceEditPage";
|
||||||
export * from "./IEdges";
|
export * from "./IEdges";
|
||||||
// export * from "./INetwork";
|
// export * from "./INetwork";
|
||||||
export * from "./INodes";
|
export * from "./INodes";
|
||||||
|
@ -4,13 +4,13 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { IRenderData } from "../helpers.interface";
|
import { IRenderData } from "../helpers.interface";
|
||||||
import { IEditPage } from "./IEditPage";
|
import { IServiceEditPage } from "./IServiceEditPage";
|
||||||
import { PN } from "./INodes";
|
import { PN } from "./INodes";
|
||||||
|
|
||||||
/** Helper to configurate a service */
|
/** Helper to configurate a service */
|
||||||
export type TRenderConfigureServicePage<T extends PN> = (
|
export type TRenderConfigureServicePage<T extends PN, Extension = {}> = (
|
||||||
div: HTMLDivElement,
|
div: HTMLDivElement,
|
||||||
options: IRenderData & {
|
options: IRenderData & {
|
||||||
input: T;
|
input: T;
|
||||||
}
|
} & Extension
|
||||||
) => IEditPage;
|
) => IServiceEditPage;
|
||||||
|
@ -142,6 +142,25 @@ export type TcreateLayoutOptions = {
|
|||||||
colors?: any;
|
colors?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type IUiTheme = {
|
||||||
|
colors: {
|
||||||
|
primary: string;
|
||||||
|
secondary: string;
|
||||||
|
success: string;
|
||||||
|
info: string;
|
||||||
|
warning: string;
|
||||||
|
danger: string;
|
||||||
|
light: string;
|
||||||
|
dark: string;
|
||||||
|
};
|
||||||
|
font: {
|
||||||
|
size: number;
|
||||||
|
type: string;
|
||||||
|
color: string;
|
||||||
|
computedFont: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
/** Helper for the provided data: */
|
/** Helper for the provided data: */
|
||||||
export interface IRenderData {
|
export interface IRenderData {
|
||||||
helpers: {
|
helpers: {
|
||||||
@ -400,6 +419,25 @@ export interface IRenderData {
|
|||||||
}): void;
|
}): void;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
ui: {
|
||||||
|
/**
|
||||||
|
* Contains a Flag to toggle the ui into fullscreen or not.
|
||||||
|
*/
|
||||||
|
readonly fullscreen: INopeObservable<boolean>;
|
||||||
|
/**
|
||||||
|
* Function, used to set the system to Fullscreen
|
||||||
|
*/
|
||||||
|
openFullscreen(): void;
|
||||||
|
/**
|
||||||
|
* Function, used to close the fullscreen.
|
||||||
|
*/
|
||||||
|
closeFullscreen(): void;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a defintion of the currently used colors.
|
||||||
|
*/
|
||||||
|
getTheme(): IUiTheme;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
logger: ILogger;
|
logger: ILogger;
|
||||||
dispatcher: INopeDispatcher;
|
dispatcher: INopeDispatcher;
|
||||||
|
@ -944,16 +944,14 @@ export type TRenderFunctionResult = {
|
|||||||
export type TRenderFunction<
|
export type TRenderFunction<
|
||||||
I,
|
I,
|
||||||
O extends TRenderFunctionResult = TRenderFunctionResult,
|
O extends TRenderFunctionResult = TRenderFunctionResult,
|
||||||
D extends IMinProvidedDataSet = IMinProvidedDataSet,
|
D extends IMinProvidedDataSet = IMinProvidedDataSet
|
||||||
A = any
|
|
||||||
> = (
|
> = (
|
||||||
div: HTMLElement,
|
div: HTMLDivElement,
|
||||||
options: {
|
options: {
|
||||||
input: I;
|
input: I;
|
||||||
setVisibilityOfPanel: (value: boolean) => void;
|
setVisibilityOfPanel: (value: boolean) => void;
|
||||||
layout: IBasicLayoutComponent<D>;
|
layout: IBasicLayoutComponent<D>;
|
||||||
},
|
}
|
||||||
args: A
|
|
||||||
) => O;
|
) => O;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1092,13 +1090,12 @@ export interface IBasicLayoutComponent<
|
|||||||
*/
|
*/
|
||||||
openDynamicW2UiPanel<
|
openDynamicW2UiPanel<
|
||||||
I = any,
|
I = any,
|
||||||
A = any,
|
|
||||||
O extends TRenderFunctionResult = TRenderFunctionResult
|
O extends TRenderFunctionResult = TRenderFunctionResult
|
||||||
>(options: {
|
>(options: {
|
||||||
/** Input which is fowarded to the render Function "render" */
|
/** Input which is fowarded to the render Function "render" */
|
||||||
input?: I;
|
input?: I;
|
||||||
/** Callback which will be called to create the element */
|
/** Callback which will be called to create the element */
|
||||||
render: TRenderFunction<I, O, D, A>;
|
render: TRenderFunction<I, O, D>;
|
||||||
/** Appends the Panel or replaces it. */
|
/** Appends the Panel or replaces it. */
|
||||||
append?: boolean;
|
append?: boolean;
|
||||||
/** Show the Panel on creating */
|
/** Show the Panel on creating */
|
||||||
|
@ -15,18 +15,24 @@ import { IRenderData } from "./helpers.interface";
|
|||||||
import { TRenderFunctionResult } from "./layout.interface";
|
import { TRenderFunctionResult } from "./layout.interface";
|
||||||
|
|
||||||
/** Helper used, to render the instance details */
|
/** Helper used, to render the instance details */
|
||||||
export type TRenderInstancePage<T extends INopeModule = INopeModule> = (
|
export type TRenderInstancePage<
|
||||||
|
T extends INopeModule = INopeModule,
|
||||||
|
Extension = {}
|
||||||
|
> = (
|
||||||
/** The DIV Element */
|
/** The DIV Element */
|
||||||
div: HTMLDivElement,
|
div: HTMLDivElement,
|
||||||
/** The Provided Options used by the function to create the ui */
|
/** The Provided Options used by the function to create the ui */
|
||||||
options: IRenderData & {
|
options: IRenderData & {
|
||||||
/** The Instance to Render. */
|
/** The Instance to Render. */
|
||||||
input: T & IGenericNopeModule;
|
input: T & IGenericNopeModule;
|
||||||
}
|
} & Extension
|
||||||
) => TRenderFunctionResult;
|
) => TRenderFunctionResult;
|
||||||
|
|
||||||
/** UI to define an instance. */
|
/** UI to define an instance. */
|
||||||
export type TInstanceManagerPage<T extends INopeModule = INopeModule> = (
|
export type TInstanceManagerPage<
|
||||||
|
T extends INopeModule = INopeModule,
|
||||||
|
Extension = {}
|
||||||
|
> = (
|
||||||
/** The DIV Element */
|
/** The DIV Element */
|
||||||
div: HTMLDivElement,
|
div: HTMLDivElement,
|
||||||
/** The Provided Options used by the function to create the ui */
|
/** The Provided Options used by the function to create the ui */
|
||||||
@ -42,5 +48,5 @@ export type TInstanceManagerPage<T extends INopeModule = INopeModule> = (
|
|||||||
}
|
}
|
||||||
) => Promise<T & IGenericNopeModule>;
|
) => Promise<T & IGenericNopeModule>;
|
||||||
instances: Array<INopeModuleDescription>;
|
instances: Array<INopeModuleDescription>;
|
||||||
}
|
} & Extension
|
||||||
) => void;
|
) => void;
|
||||||
|
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "nope",
|
"name": "nope",
|
||||||
"version": "1.1.1",
|
"version": "1.2.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "nope",
|
"name": "nope",
|
||||||
"version": "1.1.1",
|
"version": "1.2.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"argparse": "^2.0.1",
|
"argparse": "^2.0.1",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nope",
|
"name": "nope",
|
||||||
"version": "1.2.0",
|
"version": "1.2.1",
|
||||||
"description": "NoPE Runtime for Nodejs. For Browser-Support please use nope-browser",
|
"description": "NoPE Runtime for Nodejs. For Browser-Support please use nope-browser",
|
||||||
"files": [
|
"files": [
|
||||||
"dist-nodejs/**/*",
|
"dist-nodejs/**/*",
|
||||||
|
Loading…
Reference in New Issue
Block a user