@kwirthmagnify/kwirth-common-front 0.5.33 → 0.5.35
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/DialogTitleHelp.d.ts +8 -0
- package/dist/DialogTitleHelp.js +13 -0
- package/dist/HelpButton.js +14 -1
- package/dist/MsgBox.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +3 -1
- package/package.json +49 -49
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DialogTitleHelp = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const material_1 = require("@mui/material");
|
|
9
|
+
const HelpButton_1 = require("./HelpButton");
|
|
10
|
+
const DialogTitleHelp = ({ section, docsUrl, children }) => (react_1.default.createElement(material_1.DialogTitle, { sx: { display: 'flex', alignItems: 'center', justifyContent: 'space-between', gap: 1 } },
|
|
11
|
+
react_1.default.createElement(material_1.Box, { component: 'span' }, children),
|
|
12
|
+
react_1.default.createElement(HelpButton_1.HelpButton, { section: section, docsUrl: docsUrl })));
|
|
13
|
+
exports.DialogTitleHelp = DialogTitleHelp;
|
package/dist/HelpButton.js
CHANGED
|
@@ -14,10 +14,23 @@ const icons_material_1 = require("@mui/icons-material");
|
|
|
14
14
|
const DEFAULT_DOCS_URL = 'http://localhost:4000'; // fallback si no hay docsUrl configurado
|
|
15
15
|
const HelpButton = ({ docsUrl, section }) => {
|
|
16
16
|
const open = () => {
|
|
17
|
+
var _a, _b, _c, _d;
|
|
17
18
|
const base = (docsUrl || DEFAULT_DOCS_URL).replace(/\/+$/, '');
|
|
18
19
|
// Popup del navegador (ventana aparte, no pestaña): las features de tamaño fuerzan el popup.
|
|
20
|
+
// Tamaño: 60% ancho × 80% alto de la pantalla ACTUAL. Centrado en su monitor (multi-monitor) vía
|
|
21
|
+
// availLeft/availTop (origen del monitor donde está la ventana). left/top solo los respeta si es popup real.
|
|
22
|
+
const scr = window.screen;
|
|
23
|
+
const sw = scr.availWidth;
|
|
24
|
+
const sh = scr.availHeight;
|
|
25
|
+
const width = Math.round(sw * 0.6);
|
|
26
|
+
const height = Math.round(sh * 0.8);
|
|
27
|
+
const originX = (_b = (_a = scr.availLeft) !== null && _a !== void 0 ? _a : window.screenX) !== null && _b !== void 0 ? _b : 0;
|
|
28
|
+
const originY = (_d = (_c = scr.availTop) !== null && _c !== void 0 ? _c : window.screenY) !== null && _d !== void 0 ? _d : 0;
|
|
29
|
+
const left = Math.round(originX + (sw - width) / 2);
|
|
30
|
+
const top = Math.round(originY + (sh - height) / 2);
|
|
31
|
+
const features = `popup=yes,width=${width},height=${height},left=${left},top=${top},scrollbars=yes,resizable=yes`;
|
|
19
32
|
// Nombre estable → clics sucesivos reusan la misma ventana (navega a la nueva sección).
|
|
20
|
-
const w = window.open(`${base}/#/${section}`, 'kwirth-guide',
|
|
33
|
+
const w = window.open(`${base}/#/${section}`, 'kwirth-guide', features);
|
|
21
34
|
if (w) {
|
|
22
35
|
w.opener = null;
|
|
23
36
|
w.focus();
|
package/dist/MsgBox.js
CHANGED
|
@@ -63,7 +63,7 @@ const MsgBoxWaitShow = (title, message, onClose, buttons, icon, onResult) => {
|
|
|
63
63
|
return (react_1.default.createElement(material_1.Dialog, { open: true },
|
|
64
64
|
react_1.default.createElement(material_1.DialogTitle, null, title),
|
|
65
65
|
react_1.default.createElement(material_1.DialogContent, null,
|
|
66
|
-
react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'center', alignContent: 'center', sx: { mx: 2
|
|
66
|
+
react_1.default.createElement(material_1.Stack, { direction: 'row', alignItems: 'center', alignContent: 'center', sx: { mx: 2 } },
|
|
67
67
|
react_1.default.createElement(material_1.Box, null,
|
|
68
68
|
react_1.default.createElement(material_1.CircularProgress, { size: 50 })),
|
|
69
69
|
typeof (message) === 'string' ?
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,8 @@ export { UserPicker } from './UserPicker';
|
|
|
101
101
|
export type { IUserPickerProps } from './UserPicker';
|
|
102
102
|
export { HelpButton } from './HelpButton';
|
|
103
103
|
export type { IHelpButtonProps } from './HelpButton';
|
|
104
|
+
export { DialogTitleHelp } from './DialogTitleHelp';
|
|
105
|
+
export type { IDialogTitleHelpProps } from './DialogTitleHelp';
|
|
104
106
|
export interface ITabSummary {
|
|
105
107
|
name: string;
|
|
106
108
|
description: string;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
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.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; } });
|
|
@@ -57,3 +57,5 @@ var UserPicker_1 = require("./UserPicker");
|
|
|
57
57
|
Object.defineProperty(exports, "UserPicker", { enumerable: true, get: function () { return UserPicker_1.UserPicker; } });
|
|
58
58
|
var HelpButton_1 = require("./HelpButton");
|
|
59
59
|
Object.defineProperty(exports, "HelpButton", { enumerable: true, get: function () { return HelpButton_1.HelpButton; } });
|
|
60
|
+
var DialogTitleHelp_1 = require("./DialogTitleHelp");
|
|
61
|
+
Object.defineProperty(exports, "DialogTitleHelp", { enumerable: true, get: function () { return DialogTitleHelp_1.DialogTitleHelp; } });
|
package/package.json
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@kwirthmagnify/kwirth-common-front",
|
|
3
|
-
"version": "0.5.
|
|
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.29",
|
|
22
|
-
"react-markdown": "^10.1.0"
|
|
23
|
-
},
|
|
24
|
-
"peerDependencies": {
|
|
25
|
-
"@mui/icons-material": ">=5.0.0",
|
|
26
|
-
"@mui/material": ">=5.0.0",
|
|
27
|
-
"react": ">=18.0.0"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@emotion/react": "^11.14.0",
|
|
31
|
-
"@emotion/styled": "^11.14.1",
|
|
32
|
-
"@mui/icons-material": "^7.3.11",
|
|
33
|
-
"@mui/material": "^7.3.11",
|
|
34
|
-
"@types/react": "^18.3.0",
|
|
35
|
-
"react": "^18.3.0",
|
|
36
|
-
"typescript": "^5.8.3"
|
|
37
|
-
},
|
|
38
|
-
"exports": {
|
|
39
|
-
".": {
|
|
40
|
-
"types": "./dist/index.d.ts",
|
|
41
|
-
"default": "./dist/index.js"
|
|
42
|
-
},
|
|
43
|
-
"./icons": {
|
|
44
|
-
"types": "./dist/kwirthicons.d.ts",
|
|
45
|
-
"default": "./dist/kwirthicons.js"
|
|
46
|
-
},
|
|
47
|
-
"./package.json": "./package.json"
|
|
48
|
-
}
|
|
49
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@kwirthmagnify/kwirth-common-front",
|
|
3
|
+
"version": "0.5.35",
|
|
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.29",
|
|
22
|
+
"react-markdown": "^10.1.0"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@mui/icons-material": ">=5.0.0",
|
|
26
|
+
"@mui/material": ">=5.0.0",
|
|
27
|
+
"react": ">=18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@emotion/react": "^11.14.0",
|
|
31
|
+
"@emotion/styled": "^11.14.1",
|
|
32
|
+
"@mui/icons-material": "^7.3.11",
|
|
33
|
+
"@mui/material": "^7.3.11",
|
|
34
|
+
"@types/react": "^18.3.0",
|
|
35
|
+
"react": "^18.3.0",
|
|
36
|
+
"typescript": "^5.8.3"
|
|
37
|
+
},
|
|
38
|
+
"exports": {
|
|
39
|
+
".": {
|
|
40
|
+
"types": "./dist/index.d.ts",
|
|
41
|
+
"default": "./dist/index.js"
|
|
42
|
+
},
|
|
43
|
+
"./icons": {
|
|
44
|
+
"types": "./dist/kwirthicons.d.ts",
|
|
45
|
+
"default": "./dist/kwirthicons.js"
|
|
46
|
+
},
|
|
47
|
+
"./package.json": "./package.json"
|
|
48
|
+
}
|
|
49
|
+
}
|