@kwirthmagnify/kwirth-common-front 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +61 -0
- package/dist/index.js +6 -0
- package/package.json +31 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { EInstanceConfigView, EChannelRefreshAction, ENotifyLevel, IChannelMessageAction, IChannelSettings, IChannelRequirements } from '@kwirthmagnify/kwirth-common';
|
|
3
|
+
export { EChannelRefreshAction, ENotifyLevel };
|
|
4
|
+
export type { EInstanceConfigView, IChannelMessageAction, IChannelSettings, IChannelRequirements };
|
|
5
|
+
export type TChannelConstructor = (new () => IChannel) | undefined;
|
|
6
|
+
export interface IChannelObject {
|
|
7
|
+
clusterName: string;
|
|
8
|
+
view: EInstanceConfigView;
|
|
9
|
+
namespace: string;
|
|
10
|
+
group: string;
|
|
11
|
+
pod: string;
|
|
12
|
+
container: string;
|
|
13
|
+
instanceId: string;
|
|
14
|
+
instanceConfig: any;
|
|
15
|
+
config: any;
|
|
16
|
+
data: any;
|
|
17
|
+
accessString?: string;
|
|
18
|
+
isElectron: boolean;
|
|
19
|
+
channelId: string;
|
|
20
|
+
frontChannels?: Map<string, TChannelConstructor>;
|
|
21
|
+
notifications?: any[];
|
|
22
|
+
webSocket?: WebSocket;
|
|
23
|
+
clusterUrl?: string;
|
|
24
|
+
clusterInfo?: any;
|
|
25
|
+
channelSettings?: IChannelSettings;
|
|
26
|
+
updateChannelSettings?: (channelSettings: IChannelSettings) => void;
|
|
27
|
+
createTab?: (resource: any, start: boolean, settings: any) => void;
|
|
28
|
+
readChannelUserPreferences?: (channelId: string) => Promise<any>;
|
|
29
|
+
writeChannelUserPreferences?: (channelId: string, data: any) => Promise<boolean>;
|
|
30
|
+
setPalette?: (palette: string) => void;
|
|
31
|
+
notify?: (channelId: string | undefined, level: ENotifyLevel, message: string) => void;
|
|
32
|
+
exit?: () => void;
|
|
33
|
+
}
|
|
34
|
+
export interface ISetupProps {
|
|
35
|
+
onChannelSetupClosed: (channel: IChannel, channelSettings: IChannelSettings, start: boolean, defaultValues: boolean) => void;
|
|
36
|
+
channel: IChannel;
|
|
37
|
+
setupConfig?: IChannelSettings;
|
|
38
|
+
channelObject: IChannelObject;
|
|
39
|
+
instanceSettings?: any;
|
|
40
|
+
}
|
|
41
|
+
export interface IContentProps {
|
|
42
|
+
channelObject: IChannelObject;
|
|
43
|
+
}
|
|
44
|
+
export interface IChannel {
|
|
45
|
+
SetupDialog: FC<ISetupProps>;
|
|
46
|
+
TabContent: FC<IContentProps>;
|
|
47
|
+
readonly channelId: string;
|
|
48
|
+
requirements: IChannelRequirements;
|
|
49
|
+
getScope(): string;
|
|
50
|
+
getChannelIcon(): JSX.Element;
|
|
51
|
+
getSetupVisibility(): boolean;
|
|
52
|
+
setSetupVisibility(visibility: boolean): void;
|
|
53
|
+
processChannelMessage(channelObject: IChannelObject, wsEvent: MessageEvent): IChannelMessageAction;
|
|
54
|
+
initChannel(channelObject: IChannelObject): Promise<boolean>;
|
|
55
|
+
startChannel(channelObject: IChannelObject): boolean;
|
|
56
|
+
pauseChannel(channelObject: IChannelObject): boolean;
|
|
57
|
+
continueChannel(channelObject: IChannelObject): boolean;
|
|
58
|
+
stopChannel(channelObject: IChannelObject): boolean;
|
|
59
|
+
socketDisconnected(channelObject: IChannelObject): boolean;
|
|
60
|
+
socketReconnect(channelObject: IChannelObject): boolean;
|
|
61
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ENotifyLevel = exports.EChannelRefreshAction = void 0;
|
|
4
|
+
const kwirth_common_1 = require("@kwirthmagnify/kwirth-common");
|
|
5
|
+
Object.defineProperty(exports, "EChannelRefreshAction", { enumerable: true, get: function () { return kwirth_common_1.EChannelRefreshAction; } });
|
|
6
|
+
Object.defineProperty(exports, "ENotifyLevel", { enumerable: true, get: function () { return kwirth_common_1.ENotifyLevel; } });
|
package/package.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kwirthmagnify/kwirth-common-front",
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"description": "Frontend channel interfaces for Kwirth plugins and channels",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build": "del .\\dist\\* /s /q && tsc"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"access": "public",
|
|
10
|
+
"main": "dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"main": "dist/index.js",
|
|
13
|
+
"module": "dist/index.js",
|
|
14
|
+
"types": "dist/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"author": "Julio Fernandez",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@kwirthmagnify/kwirth-common": "^0.5.0"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"react": ">=18.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@types/react": "^18.3.0",
|
|
28
|
+
"react": "^18.3.0",
|
|
29
|
+
"typescript": "^5.8.3"
|
|
30
|
+
}
|
|
31
|
+
}
|