- Modified:
  - renaming the following constants in  `lib/types/ui/editor/INodes`:
    - NODE_TYPE_CONSTANT = "node:data:constant";
    - NODE_TYPE_DATA_TO_TOKEN = "node:logic:data-to-token";
    - NODE_TYPE_FLOW_OPERATION = "node:logic:flow";
    - NODE_TYPE_PLACE = "node:logic:place";
    - NODE_TYPE_TOKEN_TO_DATA = "node:logic:token-to-data";
    - NODE_TYPE_TRANSITION = "node:logic:transition";
    - NODE_TYPE_VAR = "node:data:constant";
    - NODE_TYPE_MODULE = "node:module";
  - updating `TServiceGetPortsReturn` (adding `label` and removing `type`)and `IServiceEditPage` (remove `getPorts`) in  `lib/types/ui/editor/IServiceEditPage`
  - relocating `IUiDefinition` to `lib/types/ui/helpers.interface`
    - influences `lib/ui/helpers.browser` and `lib/ui/helpers.nodejs`

- fixing Link.bat
This commit is contained in:
Martin Karkowski 2022-07-15 15:56:16 +02:00
parent 39d7fe720e
commit a919968f9c
10 changed files with 116 additions and 63 deletions

View File

@ -1,4 +1,4 @@
@echo off
set DIR=%~dp0
cd "%DIR%"
@ -7,8 +7,8 @@ if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
(npm link) && (
node contribute/toLinkBrowser.js
cp ./package.json ./build/package.json
cp -r .\dist-browser\ .\build\dist-browser
copy .\\package.json .\\build\\package.json
copy -r .\dist-browser\ .\build\dist-browser
cd ./build
@ -22,8 +22,8 @@ if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
) || (
node contribute/toLinkBrowser.js
cp ./package.json ./build/package.json
cp -r .\dist-browser\ .\build\dist-browser
copy ./package.json ./build/package.json
copy -r .\dist-browser\ .\build\dist-browser
cd ./build
@ -34,4 +34,6 @@ if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
cd "%DIR%"
node contribute/toNodejs.js
)
)
)
pause

View File

@ -140,4 +140,20 @@ Inital commit, which is working with the browser
- 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.
- Adapted `TRenderFunction` removing the args setting.
# 1.2.2
- Modified:
- renaming the following constants in `lib/types/ui/editor/INodes`:
- NODE_TYPE_CONSTANT = "node:data:constant";
- NODE_TYPE_DATA_TO_TOKEN = "node:logic:data-to-token";
- NODE_TYPE_FLOW_OPERATION = "node:logic:flow";
- NODE_TYPE_PLACE = "node:logic:place";
- NODE_TYPE_TOKEN_TO_DATA = "node:logic:token-to-data";
- NODE_TYPE_TRANSITION = "node:logic:transition";
- NODE_TYPE_VAR = "node:data:constant";
- NODE_TYPE_MODULE = "node:module";
- updating `TServiceGetPortsReturn` (adding `label` and removing `type`)and `IServiceEditPage` (remove `getPorts`) in `lib/types/ui/editor/IServiceEditPage`
- relocating `IUiDefinition` to `lib/types/ui/helpers.interface`
- influences `lib/ui/helpers.browser` and `lib/ui/helpers.nodejs`

View File

@ -1 +1 @@
1.2.1
1.2.2

View File

@ -23,13 +23,14 @@ export type VALID_PORTS =
| PORT_REQUIRE_TOKEN;
export type NODE_TYPE_GROUP = "node:group";
export type NODE_TYPE_CONSTANT = "data:constant";
export type NODE_TYPE_DATA_TO_TOKEN = "logic:data-to-token";
export type NODE_TYPE_FLOW_OPERATION = "logic:flow";
export type NODE_TYPE_PLACE = "logic:place";
export type NODE_TYPE_TOKEN_TO_DATA = "logic:token-to-data";
export type NODE_TYPE_TRANSITION = "logic:transition";
export type NODE_TYPE_VAR = "data:constant";
export type NODE_TYPE_CONSTANT = "node:data:constant";
export type NODE_TYPE_DATA_TO_TOKEN = "node:logic:data-to-token";
export type NODE_TYPE_FLOW_OPERATION = "node:logic:flow";
export type NODE_TYPE_PLACE = "node:logic:place";
export type NODE_TYPE_TOKEN_TO_DATA = "node:logic:token-to-data";
export type NODE_TYPE_TRANSITION = "node:logic:transition";
export type NODE_TYPE_VAR = "node:data:constant";
export type NODE_TYPE_MODULE = "node:module";
export type VALID_NODES =
| NODE_TYPE_GROUP
@ -40,6 +41,7 @@ export type VALID_NODES =
| NODE_TYPE_TOKEN_TO_DATA
| NODE_TYPE_TRANSITION
| NODE_TYPE_VAR
| NODE_TYPE_MODULE
| VALID_PORTS;
export const PORT_AVOID_TOKEN: PORT_AVOID_TOKEN = "flow.input.avoid";
@ -63,15 +65,18 @@ export const VALID_PORTS: Array<VALID_PORTS> = [
];
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 = "node:data:constant";
export const NODE_TYPE_DATA_TO_TOKEN: NODE_TYPE_DATA_TO_TOKEN =
"logic:data-to-token";
export const NODE_TYPE_FLOW_OPERATION: NODE_TYPE_FLOW_OPERATION = "logic:flow";
export const NODE_TYPE_PLACE: NODE_TYPE_PLACE = "logic:place";
"node:logic:data-to-token";
export const NODE_TYPE_FLOW_OPERATION: NODE_TYPE_FLOW_OPERATION =
"node:logic:flow";
export const NODE_TYPE_PLACE: NODE_TYPE_PLACE = "node:logic:place";
export const NODE_TYPE_TOKEN_TO_DATA: NODE_TYPE_TOKEN_TO_DATA =
"logic:token-to-data";
export const NODE_TYPE_TRANSITION: NODE_TYPE_TRANSITION = "logic:transition";
export const NODE_TYPE_VAR: NODE_TYPE_VAR = "data:constant";
"node:logic:token-to-data";
export const NODE_TYPE_TRANSITION: NODE_TYPE_TRANSITION =
"node:logic:transition";
export const NODE_TYPE_VAR: NODE_TYPE_VAR = "node:data:constant";
export const NODE_TYPE_MODULE: NODE_TYPE_MODULE = "node:module";
export const VALID_NODES: Array<VALID_NODES> = [
NODE_TYPE_GROUP,
@ -81,6 +86,7 @@ export const VALID_NODES: Array<VALID_NODES> = [
NODE_TYPE_PLACE,
NODE_TYPE_TOKEN_TO_DATA,
NODE_TYPE_TRANSITION,
NODE_TYPE_MODULE,
NODE_TYPE_VAR,
];
VALID_PORTS.map((id) => VALID_NODES.push(id));

View File

@ -4,7 +4,6 @@
*/
import { TRenderFunctionResult } from "../layout.interface";
import { IPort } from "./INodes";
/**
* Type to define the Ports of a UI:
@ -12,13 +11,11 @@ import { IPort } from "./INodes";
export type TServiceGetPortsReturn = {
inputs: {
id: string;
label: String;
type: IPort["type"];
label: string;
}[];
outputs: {
id: string;
label: String;
type: IPort["type"];
label: string;
}[];
};
@ -48,9 +45,4 @@ export interface IServiceEditPage<T = any> extends TRenderFunctionResult {
* Element showing the type of the edit panel.
*/
type: "node" | "edge";
/**
* Helper to define the Ports.
*/
getPorts?: TGetPorts;
}

View File

@ -7,7 +7,12 @@ import * as go from "gojs";
import { ILogger } from "js-logger";
import * as plotly from "plotly.js";
import { IJsonSchema } from "../IJSONSchema";
import { INopeDispatcher, INopeObservable } from "../nope/index";
import {
IClassDescription,
IFunctionOptions,
INopeDispatcher,
INopeObservable,
} from "../nope/index";
import {
IMinProvidedDataSet,
IPanel,
@ -142,6 +147,59 @@ export type TcreateLayoutOptions = {
colors?: any;
};
export interface IUiDefinition {
/**
* Contains the ui-defintions of the Functions
*/
functions: {
/**
* index - Function ID:
*/
[index: string]: {
/**
* The provided UI-Functions
*/
ui: IFunctionOptions["ui"];
/**
* Original ID of the Function.
*/
id: string;
};
};
/**
* Contains all UIs for the class
*/
classes: {
/**
* Index = Class-Identifier.
*/
[index: string]: {
/**
* The UI Defintion of the Class.
*/
ui?: IClassDescription["ui"];
/**
* Name of the Package
*/
package: string;
/**
* Path of the defintio file.
*/
path?: string;
/**
* Class identifier
*/
class: string;
/**
* The Methods of the class
*/
methods: {
[index: string]: IFunctionOptions["ui"];
};
};
};
}
export type IUiTheme = {
colors: {
primary: string;
@ -439,6 +497,10 @@ export interface IRenderData {
getTheme(): IUiTheme;
};
};
/**
* Contains the information about the session.
*/
session: IUiDefinition;
logger: ILogger;
dispatcher: INopeDispatcher;
libraries: TLibraries;

View File

@ -1,10 +1,5 @@
import { stringifyWithFunctions } from "../helpers/jsonMethods";
import {
IClassDescription,
IFunctionOptions,
IGenericNopeModule,
INopeModule,
} from "../types";
import { IGenericNopeModule, INopeModule } from "../types";
import { TRenderInstancePage } from "../types/ui";
/**
@ -21,23 +16,3 @@ export function convertInstanceRenderPage<I extends INopeModule>(
): string {
return stringifyWithFunctions(callback);
}
export interface IUiDefinition {
functions: {
[index: string]: {
ui: IFunctionOptions["ui"];
id: string;
};
};
classes: {
[index: string]: {
ui?: IClassDescription["ui"];
package: string;
class: string;
path: string;
methods: {
[index: string]: IFunctionOptions["ui"];
};
};
};
}

View File

@ -13,7 +13,7 @@ import {
stringifyWithFunctions,
} from "../index.browser";
import { listFunctions, listPackages } from "../index.nodejs";
import { IUiDefinition } from "./helpers.browser";
import { IUiDefinition } from "../types/ui";
/**
* Helper Function to write a default configuration.

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "nope",
"version": "1.2.0",
"version": "1.2.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "nope",
"version": "1.2.0",
"version": "1.2.1",
"license": "MIT",
"dependencies": {
"argparse": "^2.0.1",

View File

@ -1,6 +1,6 @@
{
"name": "nope",
"version": "1.2.1",
"version": "1.2.2",
"description": "NoPE Runtime for Nodejs. For Browser-Support please use nope-browser",
"files": [
"dist-nodejs/**/*",