@kwirthmagnify/kwirth-common-front 0.5.40 → 0.5.41

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.
@@ -11,6 +11,6 @@ const UserPicker = ({ users, value, onChange, label = 'User', size = 'small', fu
11
11
  const selected = (_a = users.find(u => u.id === value)) !== null && _a !== void 0 ? _a : null;
12
12
  return (react_1.default.createElement(material_1.Autocomplete, { options: users, value: selected, disabled: disabled, size: size, fullWidth: fullWidth, getOptionLabel: u => u.name, isOptionEqualToValue: (a, b) => a.id === b.id, onChange: (_e, u) => onChange(u === null || u === void 0 ? void 0 : u.id), renderOption: (props, u) => (react_1.default.createElement("li", Object.assign({}, props, { key: u.id, style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start', gap: 0 } }),
13
13
  react_1.default.createElement("span", null, u.name),
14
- (u.id !== u.name || u.idp) && (react_1.default.createElement("span", { style: { fontSize: 11, opacity: 0.6 } }, [u.id !== u.name ? u.id : undefined, u.idp].filter(Boolean).join(' · '))))), renderInput: p => react_1.default.createElement(material_1.TextField, Object.assign({}, p, { label: label })) }));
14
+ react_1.default.createElement("span", { style: { fontSize: 11, opacity: 0.6 } }, [u.id, u.idp].filter(Boolean).join(' · ')))), renderInput: p => react_1.default.createElement(material_1.TextField, Object.assign({}, p, { label: label })) }));
15
15
  };
16
16
  exports.UserPicker = UserPicker;
package/dist/index.d.ts CHANGED
@@ -15,6 +15,20 @@ export interface IClusterEndpoint {
15
15
  url: string;
16
16
  accessString: string;
17
17
  source: boolean;
18
+ id: string;
19
+ }
20
+ export declare enum ERemoteConnState {
21
+ CONNECTED = "connected",
22
+ RECONNECTING = "reconnecting",
23
+ DOWN = "down"
24
+ }
25
+ export interface IRemoteChannelHandlers {
26
+ onMessage: (clusterId: string, msg: any) => void;
27
+ onState: (clusterId: string, state: ERemoteConnState) => void;
28
+ }
29
+ export interface IRemoteChannelHandle {
30
+ send: (clusterId: string, msg: any) => void;
31
+ close: () => void;
18
32
  }
19
33
  export interface IChannelObject {
20
34
  clusterName: string;
@@ -37,6 +51,7 @@ export interface IChannelObject {
37
51
  selectCluster?: (clusterName: string) => void;
38
52
  openClusterManager?: () => void;
39
53
  getClusters?: () => IClusterEndpoint[];
54
+ openRemoteChannels?: (clusterNames: string[], instanceConfig: any, handlers: IRemoteChannelHandlers) => IRemoteChannelHandle;
40
55
  frontChannels?: Map<string, TChannelConstructor>;
41
56
  notifications?: any[];
42
57
  webSocket?: WebSocket;
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DialogTitleHelp = exports.HelpButton = exports.UserPicker = exports.MsgBoxWaitCancel = exports.MsgBoxWait = exports.MsgBoxYesNoCancel = exports.MsgBoxYesNo = exports.MsgBoxOkCancel = exports.MsgBoxOkError = exports.MsgBoxOkWarning = exports.MsgBoxOk = exports.MsgBoxButtons = exports.MiniGauge = exports.MarkdownViewer = exports.cleanANSI = exports.MetricDefinition = exports.ENotifyLevel = exports.EChannelRefreshAction = exports.useKeyboard = void 0;
3
+ exports.DialogTitleHelp = exports.HelpButton = exports.UserPicker = exports.MsgBoxWaitCancel = exports.MsgBoxWait = exports.MsgBoxYesNoCancel = exports.MsgBoxYesNo = exports.MsgBoxOkCancel = exports.MsgBoxOkError = exports.MsgBoxOkWarning = exports.MsgBoxOk = exports.MsgBoxButtons = exports.MiniGauge = exports.MarkdownViewer = exports.cleanANSI = exports.MetricDefinition = exports.ERemoteConnState = exports.ENotifyLevel = exports.EChannelRefreshAction = exports.useKeyboard = void 0;
4
4
  const react_1 = require("react");
5
5
  const kwirth_common_1 = require("@kwirthmagnify/kwirth-common");
6
6
  Object.defineProperty(exports, "EChannelRefreshAction", { enumerable: true, get: function () { return kwirth_common_1.EChannelRefreshAction; } });
@@ -28,6 +28,13 @@ const useKeyboard = (onEscape, id) => {
28
28
  }, [onEscape, id]);
29
29
  };
30
30
  exports.useKeyboard = useKeyboard;
31
+ // Estado de una conexión remota gestionada por el core (federación multi-cluster). Nunca string literals.
32
+ var ERemoteConnState;
33
+ (function (ERemoteConnState) {
34
+ ERemoteConnState["CONNECTED"] = "connected";
35
+ ERemoteConnState["RECONNECTING"] = "reconnecting";
36
+ ERemoteConnState["DOWN"] = "down";
37
+ })(ERemoteConnState || (exports.ERemoteConnState = ERemoteConnState = {}));
31
38
  class MetricDefinition {
32
39
  constructor() {
33
40
  this.metric = '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kwirthmagnify/kwirth-common-front",
3
- "version": "0.5.40",
3
+ "version": "0.5.41",
4
4
  "description": "Frontend channel interfaces for Kwirth plugins and channels",
5
5
  "scripts": {
6
6
  "build": "del .\\dist\\* /s /q && tsc"