New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

console-gui-tools

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

console-gui-tools - npm Package Compare versions

Comparing version 1.1.41 to 1.1.42

dist/components/InPageWidgetBuilder.d.ts

47

dist/components/layout/SingleLayout.js
import { ConsoleManager } from "../../ConsoleGui.js";
import { boxChars, truncate } from "../Utils.js";
/**

@@ -55,24 +56,22 @@ * @class SingleLayout

});
if (unformattedLine.length > this.CM.Screen.width - bsize) {
if (unformattedLine.length > this.CM.Screen.width - bsize) { // Need to truncate
const offset = 2;
newLine = [...JSON.parse(JSON.stringify(line))]; // Shallow copy because I just want to modify the values but not the original
let diff = unformattedLine.length - this.CM.Screen.width + 1;
// remove truncated text
for (let j = newLine.length - 1; j >= 0; j--) {
if (newLine[j].text.length > diff + offset) {
newLine[j].text = this.CM.truncate(newLine[j].text, (newLine[j].text.length - diff) - offset, true);
break;
}
else {
diff -= newLine[j].text.length;
newLine.splice(j, 1);
}
if (unformattedLine.length > this.CM.Screen.width - bsize) { // Need to truncate
const offset = 2;
newLine = [...JSON.parse(JSON.stringify(line))]; // Shallow copy because I just want to modify the values but not the original
let diff = unformattedLine.length - this.CM.Screen.width + 1;
// remove truncated text
for (let j = newLine.length - 1; j >= 0; j--) {
if (newLine[j].text.length > diff + offset) {
newLine[j].text = truncate(newLine[j].text, (newLine[j].text.length - diff) - offset, true);
break;
}
// Update unformatted line
unformattedLine = newLine.map((element) => element.text).join("");
else {
diff -= newLine[j].text.length;
newLine.splice(j, 1);
}
}
// Update unformatted line
unformattedLine = newLine.map((element) => element.text).join("");
}
if (this.options.boxed)
newLine.unshift({ text: "│", style: { color: this.options.boxColor, bold: this.boxBold } });
newLine.unshift({ text: boxChars["normal"].vertical, style: { color: this.options.boxColor, bold: this.boxBold } });
if (unformattedLine.length <= this.CM.Screen.width - bsize) {

@@ -82,3 +81,3 @@ newLine.push({ text: `${" ".repeat((this.CM.Screen.width - unformattedLine.length) - bsize)}`, style: { color: "" } });

if (this.options.boxed)
newLine.push({ text: "│", style: { color: this.options.boxColor, bold: this.boxBold } });
newLine.push({ text: boxChars["normal"].vertical, style: { color: this.options.boxColor, bold: this.boxBold } });
this.CM.Screen.write(...newLine);

@@ -94,9 +93,9 @@ }

this.isOdd = this.CM.Screen.width % 2 === 1;
const trimmedTitle = this.CM.truncate(this.pageTitle, this.CM.Screen.width - 2, false);
const trimmedTitle = truncate(this.pageTitle, this.CM.Screen.width - 2, false);
if (this.options.boxed) { // Draw pages with borders
if (this.options.showTitle) {
this.CM.Screen.write({ text: `┌─${trimmedTitle}${"─".repeat(this.CM.Screen.width - trimmedTitle.length - 3)}┐`, style: { color: this.options.boxColor, bold: this.boxBold } });
this.CM.Screen.write({ text: `${boxChars["normal"].topLeft}${boxChars["normal"].horizontal}${trimmedTitle}${boxChars["normal"].horizontal.repeat(this.CM.Screen.width - trimmedTitle.length - 3)}${boxChars["normal"].topRight}`, style: { color: this.options.boxColor, bold: this.boxBold } });
}
else {
this.CM.Screen.write({ text: `┌─${"─".repeat(this.CM.Screen.width - 3)}┐`, style: { color: this.options.boxColor, bold: this.boxBold } });
this.CM.Screen.write({ text: `${boxChars["normal"].topLeft}${boxChars["normal"].horizontal}${boxChars["normal"].horizontal.repeat(this.CM.Screen.width - 3)}${boxChars["normal"].topRight}`, style: { color: this.options.boxColor, bold: this.boxBold } });
}

@@ -106,3 +105,3 @@ this.page.getContent().forEach((line) => {

});
this.CM.Screen.write({ text: `└${"─".repeat(this.CM.Screen.width - 2)}┘`, style: { color: this.options.boxColor, bold: this.boxBold } });
this.CM.Screen.write({ text: `${boxChars["normal"].bottomLeft}${boxChars["normal"].horizontal.repeat(this.CM.Screen.width - 2)}${boxChars["normal"].bottomRight}`, style: { color: this.options.boxColor, bold: this.boxBold } });
}

@@ -120,2 +119,2 @@ else { // Draw pages without borders

export default Sing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gICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLkNNLlNjcmVlbi53cml0ZSh7IHRleHQ6IGDilIzilIAke1wi4pSAXCIucmVwZWF0KHRoaXMuQ00uU2NyZWVuLndpZHRoIC0gMyl94pSQYCwgc3R5bGU6IHsgY29sb3I6IHRoaXMub3B0aW9ucy5ib3hDb2xvciwgYm9sZDogdGhpcy5ib3hCb2xkIH0gfSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMucGFnZS5nZXRDb250ZW50KCkuZm9yRWFjaCgobGluZTogU3R5bGVkRWxlbWVudFtdKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5kcmF3TGluZShsaW5lKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIHRoaXMuQ00uU2NyZWVuLndyaXRlKHsgdGV4dDogYOKUlCR7XCLilIBcIi5yZXBlYXQodGhpcy5DTS5TY3JlZW4ud2lkdGggLSAyKX3ilJhgLCBzdHlsZTogeyBjb2xvcjogdGhpcy5vcHRpb25zLmJveENvbG9yLCBib2xkOiB0aGlzLmJveEJvbGQgfSB9KVxuICAgICAgICB9IGVsc2UgeyAvLyBEcmF3IHBhZ2VzIHdpdGhvdXQgYm9yZGVyc1xuICAgICAgICAgICAgaWYgKHRoaXMub3B0aW9ucy5zaG93VGl0bGUpIHtcbiAgICAgICAgICAgICAgICB0aGlzLkNNLlNjcmVlbi53cml0ZSh7IHRleHQ6IGAke3RyaW1tZWRUaXRsZX1gLCBzdHlsZTogeyBjb2xvcjogdGhpcy5vcHRpb25zLmJveENvbG9yLCBib2xkOiB0aGlzLmJveEJvbGQgfSB9KVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5wYWdlLmdldENvbnRlbnQoKS5mb3JFYWNoKChsaW5lOiBTdHlsZWRFbGVtZW50W10pID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLmRyYXdMaW5lKGxpbmUpXG4gICAgICAgICAgICB9KVxuICAgICAgICB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JpdGUoeyB0ZXh0OiBgJHtib3hDaGFyc1tcIm5vcm1hbFwiXS5ib3R0b21MZWZ0fSR7Ym94Q2hhcnNbXCJub3JtYWxcIl0uaG9yaXpvbnRhbC5yZXBlYXQodGhpcy5DTS5TY3JlZW4ud2lkdGggLSAyKX0ke2JveENoYXJzW1wibm9ybWFsXCJdLmJvdHRvbVJpZ2h0fWAsIHN0eWxlOiB7IGNvbG9yOiB0aGlzLm9wdGlvbnMuYm94Q29sb3IsIGJvbGQ6IHRoaXMuYm94Qm9sZCB9IH0pXG4gICAgICAgIH0gZWxzZSB7IC8vIERyYXcgcGFnZXMgd2l0aG91dCBib3JkZXJzXG4gICAgICAgICAgICBpZiAodGhpcy5vcHRpb25zLnNob3dUaXRsZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuQ00uU2NyZWVuLndyaXRlKHsgdGV4dDogYCR7dHJpbW1lZFRpdGxlfWAsIHN0eWxlOiB7IGNvbG9yOiB0aGlzLm9wdGlvbnMuYm94Q29sb3IsIGJvbGQ6IHRoaXMuYm94Qm9sZCB9IH0pXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0aGlzLnBhZ2UuZ2V0Q29udGVudCgpLmZvckVhY2goKGxpbmU6IFN0eWxlZEVsZW1lbnRbXSkgPT4ge1xuICAgICAgICAgICAgICAgIHRoaXMuZHJhd0xpbmUobGluZSlcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFNpbmdsZUxheW91dCJdfQ==

@@ -1,85 +0,3 @@

import { BackgroundColorName, ForegroundColorName } from "chalk";
import { SimplifiedStyledElement, StyledElement } from "./Utils.js";
/**
* @description The type containing all the possible styles for the text.
*
* @typedef {Object} StyleObject
* @prop {chalk.ForegroundColorName | ""} [color] - The color of the text taken from the chalk library.
* @prop {chalk.BackgroundColorName | ""} [backgroundColor] - The background color of the text taken from the chalk library.
* @prop {boolean} [italic] - If the text is italic.
* @prop {boolean} [bold] - If the text is bold.
* @prop {boolean} [dim] - If the text is dim.
* @prop {boolean} [underline] - If the text is underlined.
* @prop {boolean} [inverse] - If the text is inverse.
* @prop {boolean} [hidden] - If the text is hidden.
* @prop {boolean} [strikethrough] - If the text is strikethrough.
* @prop {boolean} [overline] - If the text is overlined.
*
* @example const textStyle = { color: "red", backgroundColor: "blue", bold: true, italic: true }
*
* @export
* @interface StyleObject
*/
export interface StyleObject {
color?: ForegroundColorName | "";
bg?: BackgroundColorName | "";
italic?: boolean;
bold?: boolean;
dim?: boolean;
underline?: boolean;
inverse?: boolean;
hidden?: boolean;
strikethrough?: boolean;
overline?: boolean;
}
/**
* @description The type of the single styled text, stored in a line of the PageBuilder.
*
* @typedef {Object} StyledElement
* @prop {string} text - The text of the styled text.
* @prop {StyleObject} style - The style of the styled text.
*
* @example const styledText = { text: "Hello", style: { color: "red", backgroundColor: "blue", bold: true, italic: true } }
*
* @export
* @interface StyledElement
*/
export interface StyledElement {
text: string;
style: StyleObject;
}
/**
* @description The type containing all the possible styles for the text and the text on the same level. It's used on the higher level.
*
* @typedef {Object} SimplifiedStyledElement
* @prop {string} text - The text of the styled text.
* @prop {chalk.ForegroundColorName | ""} [color] - The color of the text taken from the chalk library.
* @prop {chalk.BackgroundColorName | ""} [backgroundColor] - The background color of the text taken from the chalk library.
* @prop {boolean} [italic] - If the text is italic.
* @prop {boolean} [bold] - If the text is bold.
* @prop {boolean} [dim] - If the text is dim.
* @prop {boolean} [underline] - If the text is underlined.
* @prop {boolean} [inverse] - If the text is inverse.
* @prop {boolean} [hidden] - If the text is hidden.
* @prop {boolean} [strikethrough] - If the text is strikethrough.
* @prop {boolean} [overline] - If the text is overlined.
*
* @example const textStyle = { color: "red", backgroundColor: "blue", bold: true, italic: true }
*
* @export
* @interface SimplifiedStyledElement
*/
export interface SimplifiedStyledElement {
text: string;
color?: ForegroundColorName | "";
bg?: BackgroundColorName | "";
italic?: boolean;
bold?: boolean;
dim?: boolean;
underline?: boolean;
inverse?: boolean;
hidden?: boolean;
strikethrough?: boolean;
overline?: boolean;
}
/**
* @class PageBuilder

@@ -168,4 +86,12 @@ * @description Defines a new page:

decreaseScrollIndex(): void;
/**
* @description Clears the page.
* @returns {void}
* @memberOf PageBuilder
* @example page.clear()
* @since 1.2.0
*/
clear(): void;
}
export default PageBuilder;
//# sourceMappingURL=PageBuilder.d.ts.map

@@ -145,4 +145,14 @@ /**

}
/**
* @description Clears the page.
* @returns {void}
* @memberOf PageBuilder
* @example page.clear()
* @since 1.2.0
*/
clear() {
this.content = [];
}
}
export default PageBuilder;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiUGFnZUJ1aWxkZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY29tcG9uZW50cy9QYWdlQnVpbGRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF3RkE7Ozs7Ozs7O0dBUUc7QUFDSCxNQUFNLE9BQU8sV0FBVztJQUtwQixZQUFtQixXQUFXLEdBQUcsR0FBRztRQUNoQyxJQUFJLENBQUMsV0FBVyxHQUFHLFdBQVcsQ0FBQTtRQUU5Qjs7O1dBR0c7UUFDSCxJQUFJLENBQUMsV0FBVyxHQUFHLENBQUMsQ0FBQTtRQUVwQjs7O1dBR0c7UUFDSCxJQUFJLENBQUMsT0FBTyxHQUFHLEVBQUUsQ0FBQTtJQUNyQixDQUFDO0lBRUQ7Ozs7Ozs7O09BUUc7SUFDSSxNQUFNLENBQUMsR0FBRyxJQUErQjtRQUM1QyxnRUFBZ0U7UUFDaEUsTUFBTSxJQUFJLEdBQW9CLEVBQUUsQ0FBQTtRQUNoQyxLQUFLLElBQUksQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLEdBQUcsSUFBSSxDQUFDLE1BQU0sRUFBRSxDQUFDLEVBQUUsRUFBRTtZQUNsQyxNQUFNLEdBQUcsR0FBNEIsSUFBSSxDQUFDLENBQUMsQ0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bGQ6IGFyZy5ib2xkID8gYXJnLmJvbGQgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIGRpbTogYXJnLmRpbSA/IGFyZy5kaW0gOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIHVuZGVybGluZTogYXJnLnVuZGVybGluZSA/IGFyZy51bmRlcmxpbmUgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIGludmVyc2U6IGFyZy5pbnZlcnNlID8gYXJnLmludmVyc2UgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIGhpZGRlbjogYXJnLmhpZGRlbiA/IGFyZy5oaWRkZW4gOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIHN0cmlrZXRocm91Z2g6IGFyZy5zdHJpa2V0aHJvdWdoID8gYXJnLnN0cmlrZXRocm91Z2ggOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgICAgIG92ZXJsaW5lOiBhcmcub3ZlcmxpbmUgPyBhcmcub3ZlcmxpbmUgOiB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgICB0aGlzLmNvbnRlbnQucHVzaChfcm93KVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIEBkZXNjcmlwdGlvbiBBZGQgYW4gZW1wdHkgcm93IHRvIHRoZSBwYWdlLiAobGlrZSA8YnIgLz4gaW4gSFRNTClcbiAgICAgKiBAcGFyYW0ge251bWJlcn0gW2NvdW50PTFdIC0gVGhlIG51bWJlciBvZiBlbXB0eSByb3dzIHRvIGFkZC5cbiAgICAgKiBAcmV0dXJucyB7dm9pZH1cbiAgICAgKiBAbWVtYmVyT2YgUGFnZUJ1aWxkZXJcbiAgICAgKiBAZXhhbXBsZSBwYWdlLmFkZEVtcHR5Um93KClcbiAgICAgKiBwYWdlLmFkZEVtcHR5Um93KDIpXG4gICAgICovXG4gICAgcHVibGljIGFkZFNw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m9sbEluZGV4KCk6IHZvaWQge1xuICAgICAgICBpZiAodGhpcy5zY3JvbGxJbmRleCA+IDApIHtcbiAgICAgICAgICAgIHRoaXMuc2Nyb2xsSW5kZXgtLVxuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGRlc2NyaXB0aW9uIENsZWFycyB0aGUgcGFnZS5cbiAgICAgKiBAcmV0dXJucyB7dm9pZH1cbiAgICAgKiBAbWVtYmVyT2YgUGFnZUJ1aWxkZXJcbiAgICAgKiBAZXhhbXBsZSBwYWdlLmNsZWFyKClcbiAgICAgKiBAc2luY2UgMS4yLjBcbiAgICAgKi9cbiAgICBwdWJsaWMgY2xlYXIoKTogdm9pZCB7XG4gICAgICAgIHRoaXMuY29udGVudCA9IFtdXG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBQYWdlQnVpbGRlciJdfQ==
/// <reference types="node" />
/// <reference types="node" />
import { EventEmitter } from "events";
import { StyledElement, StyleObject } from "./PageBuilder.js";
import { StyledElement, StyleObject } from "./Utils.js";
/**

@@ -6,0 +6,0 @@ * @description The type containing all the possible styles for the text and the index array.

@@ -208,2 +208,2 @@ import { EventEmitter } from "events";

export default Screen;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2NyZWVuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbXBvbmVudHMvU2NyZWVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDckMsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXpCLEtBQUssQ0FBQyxLQUFLLEdBQUcsQ0FBQyxDQUFBO0FBMkJmOzs7Ozs7R0FNRztBQUNILE1BQU0sT0FBTyxNQUFPLFNBQVEsWUFBWTtJQVFwQyxZQUFZLFNBQTZCO1FBQ3JDLEt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sIGNvbG9yOiAnd2hpdGUnIH0sIHsgdGV4dDogJ0hlbGxvIFdvcmxkJywgY29sb3I6ICd3aGl0ZScgfSlcbiAgICAgKi9cbiAgICB3cml0ZSguLi5hcmdzOiBTdHlsZWRFbGVtZW50W10pOiB2b2lkIHtcbiAgICAgICAgdGhpcy5jdXJyZW50WSsrXG4gICAgICAgIGlmICh0aGlzLmN1cnNvci55IDwgdGhpcy5idWZmZXIubGVuZ3RoKSB7XG4gICAgICAgICAgICBsZXQgcm93ID0gXCJcIlxuICAgICAgICAgICAgY29uc3QgbmV3U3R5bGVJbmRleCA9IFtdXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyZ3MubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICBjb25zdCBhcmcgPSBhcmdzW2ldXG4gICAgICAgICAgICAgICAgaWYgKGFyZy50ZXh0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdHh0ID0gYXJnLnRleHQudG9TdHJpbmcoKVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHlsZTogU3R5bGVJbmRleE9iamVjdCA9IHsgLi4uYXJnLnN0eWxlLCBpbmRleDogW3Jvdy5sZW5ndGgsIHJvdy5sZW5ndGggKyB0eHQubGVuZ3RoXSB9XG4gICAgICAgICAgICAgICAgICAgIG5ld1N0eWxlSW5kZXgucHVzaChzdHlsZSlcbiAgICAgICAgICAgICAgICAgICAgcm93ICs9IHR4dFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRTdHlsZUluZGV4ID0gdGhpcy5idWZmZXJbdGhpcy5jdXJzb3IueV0uc3R5bGVJbmRleFxuXG4gICAgICAgICAgICAvLyBOb3cgcmVjYWxjdWxhdGUgdGhlIHN0eWxlSW5kZXggZm9yIHRoZSBjdXJyZW50IHJvdyBtaXhpbmcgdGhlIG9sZCBvbmUgd2l0aC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B0aW9uIFRoaXMgbWV0aG9kIGlzIHVzZWQgdG8gc29ydCBhbiBhcnJheSBvZiBzdHlsZUluZGV4IG9iamVjdHMgYnkgY2hpbGQgaW5kZXhbMF0uXG4gICAgICogQHBhcmFtIHtTdHlsZUluZGV4T2JqZWN0fSBhIC0gVGhlIGZpcnN0IG9iamVjdCB0byBjb21wYXJlLlxuICAgICAqIEBwYXJhbSB7U3R5bGVJbmRleE9iamVjdH0gYiAtIFRoZSBzZWNvbmQgb2JqZWN0IHRvIGNvbXBhcmUuXG4gICAgICogQHJldHVybnMge251bWJlcn1cbiAgICAgKiBAbWVtYmVyT2YgU2NyZWVuXG4gICAgICogQGV4YW1wbGUgbWVyZ2VkLnNvcnQodGhpcy5zb3J0QnlJbmRleClcbiAgICAgKi9cbiAgICBzb3J0QnlJbmRleChhOiBTdHlsZUluZGV4T2JqZWN0LCBiOiBTdHlsZUluZGV4T2JqZWN0KTogbnVtYmVyIHtcbiAgICAgICAgaWYgKGEuaW5kZXhbMF0gPCBiLmluZGV4WzBdKSB7XG4gICAgICAgICAgICByZXR1cm4gLTFcbiAgICAgICAgfSBlbHNlIGlmIChhLmluZGV4WzBdID4gYi5pbmRleFswXSkge1xuICAgICAgICAgICAgcmV0dXJuIDFcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAwXG4gICAgICAgIH1cbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFNjcmVlbiJdfQ==
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2NyZWVuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbXBvbmVudHMvU2NyZWVuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDckMsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBRXp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BieSBpbmRleFswXVxuICAgICAgICBtZXJnZWQuc29ydCh0aGlzLnNvcnRCeUluZGV4KVxuICAgICAgICByZXR1cm4gbWVyZ2VkXG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGRlc2NyaXB0aW9uIFRoaXMgbWV0aG9kIGlzIHVzZWQgdG8gc29ydCBhbiBhcnJheSBvZiBzdHlsZUluZGV4IG9iamVjdHMgYnkgY2hpbGQgaW5kZXhbMF0uXG4gICAgICogQHBhcmFtIHtTdHlsZUluZGV4T2JqZWN0fSBhIC0gVGhlIGZpcnN0IG9iamVjdCB0byBjb21wYXJlLlxuICAgICAqIEBwYXJhbSB7U3R5bGVJbmRleE9iamVjdH0gYiAtIFRoZSBzZWNvbmQgb2JqZWN0IHRvIGNvbXBhcmUuXG4gICAgICogQHJldHVybnMge251bWJlcn1cbiAgICAgKiBAbWVtYmVyT2YgU2NyZWVuXG4gICAgICogQGV4YW1wbGUgbWVyZ2VkLnNvcnQodGhpcy5zb3J0QnlJbmRleClcbiAgICAgKi9cbiAgICBzb3J0QnlJbmRleChhOiBTdHlsZUluZGV4T2JqZWN0LCBiOiBTdHlsZUluZGV4T2JqZWN0KTogbnVtYmVyIHtcbiAgICAgICAgaWYgKGEuaW5kZXhbMF0gPCBiLmluZGV4WzBdKSB7XG4gICAgICAgICAgICByZXR1cm4gLTFcbiAgICAgICAgfSBlbHNlIGlmIChhLmluZGV4WzBdID4gYi5pbmRleFswXSkge1xuICAgICAgICAgICAgcmV0dXJuIDFcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHJldHVybiAwXG4gICAgICAgIH1cbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFNjcmVlbiJdfQ==
/// <reference types="node" />
import { EventEmitter } from "events";
import { ConsoleManager, KeyListenerArgs } from "../../ConsoleGui.js";
import { PhisicalValues } from "../Utils.js";
/**

@@ -48,28 +49,2 @@ * @class ButtonPopup

constructor(id: string, title?: string, message?: string, buttons?: string[], visible?: boolean);
boxChars: {
normal: {
topLeft: string;
topRight: string;
bottomLeft: string;
bottomRight: string;
horizontal: string;
vertical: string;
};
selected: {
topLeft: string;
topRight: string;
bottomLeft: string;
bottomRight: string;
horizontal: string;
vertical: string;
};
hovered: {
topLeft: string;
topRight: string;
bottomLeft: string;
bottomRight: string;
horizontal: string;
vertical: string;
};
};
/**

@@ -102,2 +77,10 @@ * @description This function is used to make the ConsoleManager handle the key events when the popup is showed.

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof ButtonPopup
* @private
* @returns {ButtonPopup} The instance of the ButtonPopup.
* @memberof ButtonPopup
*/
getPosition(): PhisicalValues;
/**
* @description This function is used to add the ButtonPopup key listener callback to te ConsoleManager.

@@ -104,0 +87,0 @@ * @returns {ButtonPopup} The instance of the ButtonPopup.

@@ -58,3 +58,3 @@ import ButtonPopup from "./ButtonPopup.js";

}
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -67,3 +67,3 @@ //delete this

this.emit("cancel");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -76,3 +76,3 @@ //delete this

this.CM.emit("exit");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -90,2 +90,2 @@ //delete this

export default ConfirmPopup;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uZmlybVBvcHVwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbXBvbmVudHMvd2lkZ2V0cy9Db25maXJtUG9wdXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxXQUFXLE1BQU0sa0JBQWtCLENBQUE7QUFFMUM7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBaUJHO0FBQ0gsTUFBTSxPQUFPLFlBQWEsU0FBUSxXQUFXO0lBQ3pDLFlBQW1CLEVBQVUsRUF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IC0xKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wYXJzaW5nTW91c2VGcmFtZSA9IGZhbHNlXG4gICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICB9IC8vIENvbnRpbnVlIG9ubHkgaWYgdGhlIHJlc3VsdCBpcyAwXG4gICAgICAgICAgICBzd2l0Y2ggKGtleS5uYW1lKSB7XG4gICAgICAgICAgICBjYXNlIFwibGVmdFwiOlxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlbGVjdGVkID4gMCAmJiB0aGlzLnNlbGVjdGVkIDw9IHRoaXMuYnV0dG9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZC0tXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlIFwicmlnaHRcIjpcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zZWxlY3RlZCA+PSAwICYmIHRoaXMuc2VsZWN0ZWQgPCB0aGlzLmJ1dHRvbnMubGVuZ3RoIC0gMSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkKytcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgXCJyZXR1cm5cIjpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlbGVjdGVkID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjb25maXJtXCIpXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjYW5jZWxcIilcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aGlzLkNNLnVuUmVnaXN0ZXJXaWRnZXQodGhpcylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgY2FzZSBcImVzY2FwZVwiOlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5lbWl0KFwiY2FuY2VsXCIpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuQ00udW5SZWdpc3RlcldpZGdldCh0aGlzKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlIFwicVwiOlxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS5lbWl0KFwiZXhpdFwiKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLkNNLnVuUmVnaXN0ZXJXaWRnZXQodGhpcylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5DTS5yZWZyZXNoKClcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29uZmlybVBvcHVwIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uZmlybVBvcHVwLmpzIiwic291c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oZWNrUmVzdWx0ID0gdGhpcy5DTS5tb3VzZS5pc01vdXNlRnJhbWUoa2V5LCB0aGlzLnBhcnNpbmdNb3VzZUZyYW1lKVxuICAgICAgICAgICAgaWYgKGNoZWNrUmVzdWx0ID09PSAxKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wYXJzaW5nTW91c2VGcmFtZSA9IHRydWVcbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY2hlY2tSZXN1bHQgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5wYXJzaW5nTW91c2VGcmFtZSA9IGZhbHNlXG4gICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICB9IC8vIENvbnRpbnVlIG9ubHkgaWYgdGhlIHJlc3VsdCBpcyAwXG4gICAgICAgICAgICBzd2l0Y2ggKGtleS5uYW1lKSB7XG4gICAgICAgICAgICBjYXNlIFwibGVmdFwiOlxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlbGVjdGVkID4gMCAmJiB0aGlzLnNlbGVjdGVkIDw9IHRoaXMuYnV0dG9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZC0tXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlIFwicmlnaHRcIjpcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zZWxlY3RlZCA+PSAwICYmIHRoaXMuc2VsZWN0ZWQgPCB0aGlzLmJ1dHRvbnMubGVuZ3RoIC0gMSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnNlbGVjdGVkKytcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgXCJyZXR1cm5cIjpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLnNlbGVjdGVkID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjb25maXJtXCIpXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjYW5jZWxcIilcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0aGlzLkNNLnVucmVnaXN0ZXJQb3B1cCh0aGlzKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlIFwiZXNjYXBlXCI6XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjYW5jZWxcIilcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS51bnJlZ2lzdGVyUG9wdXAodGhpcylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgY2FzZSBcInFcIjpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuQ00uZW1pdChcImV4aXRcIilcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS51bnJlZ2lzdGVyUG9wdXAodGhpcylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5DTS5yZWZyZXNoKClcbiAgICAgICAgfVxuICAgIH1cbn1cblxuZXhwb3J0IGRlZmF1bHQgQ29uZmlybVBvcHVwIl19

@@ -5,2 +5,3 @@ /// <reference types="node" />

import PageBuilder from "../PageBuilder.js";
import { PhisicalValues } from "../Utils.js";
/**

@@ -94,2 +95,10 @@ * @class CustomPopup

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof CustomPopup
* @private
* @returns {CustomPopup} The instance of the CustomPopup.
* @memberof CustomPopup
*/
getPosition(): PhisicalValues;
/**
* @description This function is used to add the CustomPopup key listener callback to te ConsoleManager.

@@ -96,0 +105,0 @@ * @returns {CustomPopup} The instance of the CustomPopup.

import { EventEmitter } from "events";
import { ConsoleManager } from "../../ConsoleGui.js";
import { boxChars, truncate } from "../Utils.js";
/**

@@ -98,4 +99,4 @@ * @class CustomPopup

};
if (this.CM.widgetsCollection[this.id]) {
this.CM.unRegisterWidget(this);
if (this.CM.popupCollection[this.id]) {
this.CM.unregisterPopup(this);
const message = `CustomPopup ${this.id} already exists.`;

@@ -105,3 +106,3 @@ this.CM.error(message);

}
this.CM.registerWiget(this);
this.CM.registerPopup(this);
}

@@ -135,3 +136,3 @@ /**

this.emit("confirm");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -144,3 +145,3 @@ //delete this

this.emit("cancel");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -153,3 +154,3 @@ //delete this

this.CM.emit("exit");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -229,2 +230,12 @@ //delete this

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof CustomPopup
* @private
* @returns {CustomPopup} The instance of the CustomPopup.
* @memberof CustomPopup
*/
getPosition() {
return this.absoluteValues;
}
/**
* @description This function is used to add the CustomPopup key listener callback to te ConsoleManager.

@@ -272,3 +283,3 @@ * @returns {CustomPopup} The instance of the CustomPopup.

if (newLine[i].text.length > diff + offset) {
newLine[i].text = this.CM.truncate(newLine[i].text, (newLine[i].text.length - diff) - offset, true);
newLine[i].text = truncate(newLine[i].text, (newLine[i].text.length - diff) - offset, true);
break;

@@ -287,7 +298,7 @@ }

}
newLine.unshift({ text: "│", style: { color: "white" } });
newLine.unshift({ text: boxChars["normal"].vertical, style: { color: "white" } });
if (unformattedLine.length <= width) {
newLine.push({ text: `${" ".repeat((width - unformattedLine.length))}`, style: { color: "" } });
}
newLine.push({ text: "│", style: { color: "white" } });
newLine.push({ text: boxChars["normal"].vertical, style: { color: "white" } });
this.CM.Screen.write(...newLine);

@@ -305,9 +316,9 @@ }

const x = Math.round((this.CM.Screen.width / 2) - (windowWidth / 2));
let header = "┌";
let header = boxChars["normal"].topLeft;
for (let i = 0; i < windowWidth; i++) {
header += "─";
header += boxChars["normal"].horizontal;
}
header += "┐\n";
header += `│${" ".repeat(halfWidth)}${this.title}${" ".repeat(windowWidth - halfWidth - this.title.length)}│\n`;
header += "├" + "─".repeat(windowWidth) + "┤\n";
header += `${boxChars["normal"].topRight}\n`;
header += `${boxChars["normal"].vertical}${" ".repeat(halfWidth)}${this.title}${" ".repeat(windowWidth - halfWidth - this.title.length)}${boxChars["normal"].vertical}\n`;
header += `${boxChars["normal"].left}${boxChars["normal"].horizontal.repeat(windowWidth)}${boxChars["normal"].right}\n`;
const windowDesign = `${header}`;

@@ -326,3 +337,3 @@ const windowDesignLines = windowDesign.split("\n");

this.CM.Screen.cursorTo(x + this.offsetX, this.marginTop + _content.length + windowDesignLines.length - 1 + this.offsetY);
this.CM.Screen.write({ text: `└${"─".repeat(windowWidth)}┘`, style: { color: "white" } });
this.CM.Screen.write({ text: `${boxChars["normal"].bottomLeft}${boxChars["normal"].horizontal.repeat(windowWidth)}${boxChars["normal"].bottomRight}`, style: { color: "white" } });
this.absoluteValues = {

@@ -338,2 +349,2 @@ x: centerScreen + this.offsetX,

export default CustomPopup;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ3VzdG9tUG9wdXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy93aWRnZXRzL0N1c3RvbVBvcHVwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDckMsT0FBTyxFQUFFLGNBQWMsRUFBbUIsTUFBTSxxQkFBcUIsQ0FBQTtBQUlyRTs7Ozs7Ozs7Ozs7Ozs7Ozs7OztHQW1CRztBQUNILE1BQU0sT0FBTyxXQUFZLFNBQVEsWUFBWTtJQXVCekMsWUFBbUIsRUFBVSxFQUFFLEtBQWEsRUFBRSxPQUFvQixFQUFFLEtBQWEsRUFBRSxPQUFPLEdBQUcsS0FBSztRQUM5RixLQUFLLEVBQUUsQ0FBQTtRQWhCWCxzQkFBaUIsR0FBRyxLQUFLLENBQUE7UUFXekIsYUFBUSxHQUFHLEtBQUssQ0FBQTtRQUNoQixjQUFTLEdBQTZCLEVBQUUsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxFQUFFLENBQUE7UUFDcEQsWUFBTyxHQUFHLEtBQUssQ0FBQTtRQXdOZjs7OztXQUlHO1FBQ0ssa0JBQWEsR0FBRyxDQUFDLEtBQWlCLEVBQUUsRUFBRTtZQUMxQyxNQUFNLENBQUMsR0FBRyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQTtZQUN0QixNQUFNLENBQUMsR0FBRyxLQUFLLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQTtZQUV0Qix5QkFBeUI7WUFDekIsSUFBSSxDQUFDLEdBQUcsSUFBSSx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VzdWx0ID09PSAxKSB7XG4gICAgICAgICAgICB0aGlzLnBhcnNpbmdNb3VzZUZyYW1lID0gdHJ1ZVxuICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgIH0gZWxzZSBpZiAoY2hlY2tSZXN1bHQgPT09IC0xKSB7XG4gICAgICAgICAgICB0aGlzLnBhcnNpbmdNb3VzZUZyYW1lID0gZmFsc2VcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICB9IC8vIENvbnRpbnVlIG9ubHkgaWYgdGhlIHJlc3VsdCBpcyAwXG4gICAgICAgIHN3aXRjaCAoa2V5Lm5hbWUpIHtcbiAgICAgICAgY2FzZSBcInVwXCI6XG4gICAgICAgICAgICB0aGlzLmNvbnRlbnQuaW5jcmVhc2VTY3JvbGxJbmRleCgpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIFwiZG93blwiOlxuICAgICAgICAgICAgdGhpcy5jb250ZW50LmRlY3JlYXNlU2Nyb2xsSW5kZXgoKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSBcInJldHVyblwiOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuZW1pdChcImNvbmZpcm1cIilcbiAgICAgICAgICAgICAgICB0aGlzLkNNLnVuUmVnaXN0ZXJXaWRnZXQodGhpcylcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgIC8vZGVsZXRlIHRoaXNcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgXCJlc2NhcGVcIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjYW5jZWxcIilcbiAgICAgICAgICAgICAgICB0aGlzLkNNLnVuUmVnaXN0ZXJXaWRnZXQodGhpcylcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgIC8vZGVsZXRlIHRoaXNcbiAgICAgICAgIC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ICAgICAgICBjYXNlIFwidXBcIjpcbiAgICAgICAgICAgIHRoaXMuY29udGVudC5pbmNyZWFzZVNjcm9sbEluZGV4KClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgXCJkb3duXCI6XG4gICAgICAgICAgICB0aGlzLmNvbnRlbnQuZGVjcmVhc2VTY3JvbGxJbmRleCgpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIFwicmV0dXJuXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5lbWl0KFwiY29uZmlybVwiKVxuICAgICAgICAgICAgICAgIHRoaXMuQ00udW5yZWdpc3RlclBvcHVwKHRoaXMpXG4gICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIFwiZXNjYXBlXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5lbWl0KFwiY2FuY2VsXCIpXG4gICAgICAgICAgICAgICAgdGhpcy5DTS51bnJlZ2lzdGVyUG9wdXAodGhpcylcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgIC8vZGVsZXRlIHRoaXNcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgXCJxXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5DTS5lbWl0KFwiZXhpdFwiKVxuICAgICAgICAgICAgICAgIHRoaXMuQ00udW5yZWdpc3RlclBvcHVwKHRoaXMpXG4gICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgYnJlYWtcbiAgICAg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dXaWR0aClcbiAgICAgICAgfSlcbiAgICAgICAgdGhpcy5DTS5TY3JlZW4uY3Vyc29yVG8oeCArIHRoaXMub2Zmc2V0WCwgdGhpcy5tYXJnaW5Ub3AgKyBfY29udGVudC5sZW5ndGggKyB3aW5kb3dEZXNpZ25MaW5lcy5sZW5ndGggLSAxICsgdGhpcy5vZmZzZXRZKVxuICAgICAgICB0aGlzLkNNLlNjcmVlbi53cml0ZSh7IHRleHQ6IGAke2JveENoYXJzW1wibm9ybWFsXCJdLmJvdHRvbUxlZnR9JHtib3hDaGFyc1tcIm5vcm1hbFwiXS5ob3Jpem9udGFsLnJlcGVhdCh3aW5kb3dXaWR0aCl9JHtib3hDaGFyc1tcIm5vcm1hbFwiXS5ib3R0b21SaWdodH1gLCBzdHlsZTogeyBjb2xvcjogXCJ3aGl0ZVwiIH0gfSlcbiAgICAgICAgXG4gICAgICAgIHRoaXMuYWJzb2x1dGVWYWx1ZXMgPSB7XG4gICAgICAgICAgICB4OiBjZW50ZXJTY3JlZW4gKyB0aGlzLm9mZnNldFgsXG4gICAgICAgICAgICB5OiB0aGlzLm1hcmdpblRvcCArIHRoaXMub2Zmc2V0WSxcbiAgICAgICAgICAgIHdpZHRoOiB3aW5kb3dXaWR0aCxcbiAgICAgICAgICAgIGhlaWdodDogd2luZG93RGVzaWduTGluZXMubGVuZ3RoLFxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzXG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBDdXN0b21Qb3B1cCJdfQ==
/// <reference types="node" />
import { EventEmitter } from "events";
import { ConsoleManager, KeyListenerArgs } from "../../ConsoleGui.js";
import { PhisicalValues } from "../Utils.js";
/**

@@ -126,2 +127,10 @@ * @description The file descriptions for the file selector popup.

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof FileSelectorPopup
* @private
* @returns {FileSelectorPopup} The instance of the FileSelectorPopup.
* @memberof FileSelectorPopup
*/
getPosition(): PhisicalValues;
/**
* @description This function is used to add the FileSelectorPopup key listener callback to te ConsoleManager.

@@ -128,0 +137,0 @@ * @returns {FileSelectorPopup} The instance of the FileSelectorPopup.

/// <reference types="node" />
import { EventEmitter } from "events";
import { ConsoleManager, KeyListenerArgs } from "../../ConsoleGui.js";
import { PhisicalValues } from "../Utils.js";
/**

@@ -92,2 +93,10 @@ * @class InputPopup

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof InputPopup
* @private
* @returns {InputPopup} The instance of the InputPopup.
* @memberof InputPopup
*/
getPosition(): PhisicalValues;
/**
* @description This function is used to add the InputPopup key listener callback to te ConsoleManager.

@@ -94,0 +103,0 @@ * @returns {InputPopup} The instance of the InputPopup.

import { EventEmitter } from "events";
import { ConsoleManager } from "../../ConsoleGui.js";
import { boxChars } from "../Utils.js";
/**

@@ -103,4 +104,4 @@ * @class InputPopup

};
if (this.CM.widgetsCollection[this.id]) {
this.CM.unRegisterWidget(this);
if (this.CM.popupCollection[this.id]) {
this.CM.unregisterPopup(this);
const message = `InputPopup ${this.id} already exists.`;

@@ -110,3 +111,3 @@ this.CM.error(message);

}
this.CM.registerWiget(this);
this.CM.registerPopup(this);
}

@@ -172,3 +173,3 @@ /**

this.emit("confirm", Number(this.value));
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -181,3 +182,3 @@ //delete this

this.emit("cancel");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -190,3 +191,3 @@ //delete this

this.CM.emit("exit");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -235,3 +236,3 @@ //delete this

this.emit("confirm", this.value);
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -244,3 +245,3 @@ //delete this

this.emit("cancel");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -253,3 +254,3 @@ //delete this

this.CM.emit("exit");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -318,2 +319,12 @@ //delete this

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof InputPopup
* @private
* @returns {InputPopup} The instance of the InputPopup.
* @memberof InputPopup
*/
getPosition() {
return this.absoluteValues;
}
/**
* @description This function is used to add the InputPopup key listener callback to te ConsoleManager.

@@ -361,17 +372,17 @@ * @returns {InputPopup} The instance of the InputPopup.

const halfWidth = Math.round((windowWidth - this.title.length) / 2);
let header = "┌";
let header = boxChars["normal"].topLeft;
for (let i = 0; i < windowWidth; i++) {
header += "─";
header += boxChars["normal"].horizontal;
}
header += "┐\n";
header += `│${" ".repeat(halfWidth)}${this.title}${" ".repeat(windowWidth - halfWidth - this.title.length)}│\n`;
header += "├" + "─".repeat(windowWidth) + "┤\n";
let footer = "└";
header += `${boxChars["normal"].topRight}\n`;
header += `${boxChars["normal"].vertical}${" ".repeat(halfWidth)}${this.title}${" ".repeat(windowWidth - halfWidth - this.title.length)}${boxChars["normal"].vertical}\n`;
header += `${boxChars["normal"].left}${boxChars["normal"].horizontal.repeat(windowWidth)}${boxChars["normal"].right}\n`;
let footer = boxChars["normal"].bottomLeft;
for (let i = 0; i < windowWidth; i++) {
footer += "─";
footer += boxChars["normal"].horizontal;
}
footer += "┘\n";
footer += `${boxChars["normal"].bottomRight}\n`;
let content = "";
// Draw an input field
content += `│${"> "}${this.value}█${" ".repeat(windowWidth - this.value.toString().length - 3)}│\n`;
content += `${boxChars["normal"].vertical}${"> "}${this.value}█${" ".repeat(windowWidth - this.value.toString().length - 3)}${boxChars["normal"].vertical}\n`;
const windowDesign = `${header}${content}${footer}`;

@@ -394,2 +405,2 @@ const windowDesignLines = windowDesign.split("\n");

export default InputPopup;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5wdXRQb3B1cC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wb25lbnRz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AgICAgICAgICAgIC8vIFRvIGNoYW5nZSB0aGUgc2lnbiBJIGNoZWNrIGZvciB0aGUga2V5cyBcIitcIiBhbmQgXCItXCJcbiAgICAgICAgfSBlbHNlIGlmIChrZXkuc2VxdWVuY2UgPT09IFwiLVwiKSB7XG4gICAgICAgICAgICB0aGlzLnZhbHVlID0gdiAqIC0xXG4gICAgICAgIH0gZWxzZSBpZiAoa2V5LnNlcXVlbmNlID09PSBcIitcIikge1xuICAgICAgICAgICAgdGhpcy52YWx1ZSA9IE1hdGguYWJzKHYpXG4gICAgICAgIH0gZWxzZSBpZiAoa2V5LnNlcXVlbmNlID09PSBcIi5cIiB8fCBrZXkuc2VxdWVuY2UgPT09IFwiLFwiKSB7XG4gICAgICAgICAgICBpZiAodGhpcy52YWx1ZS50b1N0cmluZygpLmluZGV4T2YoXCIuXCIpID09PSAtMSkge1xuICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2ICsgXCIuXCJcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHN3aXRjaCAoa2V5Lm5hbWUpIHtcbiAgICAgICAgICAgIGNhc2UgXCJiYWNrc3BhY2VcIjpcbiAgICAgICAgICAgICAgICAvLyBJZiBiYWNrc3BhY2UgaXMgcHJlc3NlZCBJIHJlbW92ZSB0aGUgbGFzdCBjaGFyYWN0ZXIgZnJvbSB0aGUgdHlwZWQgdmFsdWVcbiAgICAgICAgICAgICAgICBpZiAodGhpcy52YWx1ZS50b1N0cmluZygpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMudmFsdWUudG9TdHJpbmcoKS5pbmRleE9mKFwiLlwiKSA9PT0gdGhpcy52YWx1ZS50b1N0cmluZygpLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2LnRvU3RyaW5nKClcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzLnZhbHVlLnRvU3RyaW5nKCkuaW5kZXhPZihcIi5cIikgPT09IHRoaXMudmFsdWUudG9TdHJpbmcoKS5sZW5ndGggLSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gdGhpcy52YWx1ZS50b1N0cmluZygpLnNsaWNlKDAsIHRoaXMudmFsdWUudG9TdHJpbmcoKS5sZW5ndGggLSAxKVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IE51bWJlcih2LnRvU3RyaW5nKCkuc2xpY2UoMCwgdi50b1N0cmluZygpLmxlbmd0aCAtIDEpKVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlIFwicmV0dXJuXCI6XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjb25maXJtXCIsIE51bWJlcih0aGlzLnZhbHVlKSlcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS51blJlZ2lzdGVyV2lkZ2V0KHRoaXMpXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgpXG4gICAgICAgICAgICAgICAgICAgIC8vZGVsZXRlIHRoaXNcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgXCJlc2NhcGVcIjpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZW1pdChcImNhbmNlbFwiKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLkNNLnVuUmVnaXN0ZXJXaWRnZXQodGhpcylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICA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gICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjb25maXJtXCIsIHRoaXMudmFsdWUpXG4gICAgICAgICAgICAgICAgdGhpcy5DTS51blJlZ2lzdGVyV2lkZ2V0KHRoaXMpXG4gICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIFwiZXNjYXBlXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5lbWl0KFwiY2FuY2VsXCIpXG4gICAgICAgICAgICAgICAgdGhpcy5DTS51blJlZ2lzdGVyV2lkZ2V0KHRoaXMpXG4gICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIFwicVwiOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuQ00uZW1pdChcImV4aXRcIilcbiAgICAgICAgICAgICAgICB0aGlzLkNNLnVuUmVnaXN0ZXJXaWRnZXQodGhpcylcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgIC8vZGVsZXRlIHRoaXNcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICAgIHRoaXMuQ00ucmVmcmVzaCgpXG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGRlc2NyaXB0aW9uIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCB0byBnZXQgdGhlIHZhbHVlIG9mIHRoZSBpbnB1dC5cbiAgICAgKiBAcmV0dXJucyB7c3RyaW5nIHwgbnVtYmVyfSBUaGUgdmFsdWUgb2YgdGhlIGl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YS54XG4gICAgICAgIGNvbnN0IHkgPSBldmVudC5kYXRhLnlcblxuICAgICAgICAvL3RoaXMuQ00ubG9nKGV2ZW50Lm5hbWUpXG4gICAgICAgIGlmICh4ID4gdGhpcy5hYnNvbHV0ZVZhbHVlcy54ICYmIHggPCB0aGlzLmFic29sdXRlVmFsdWVzLnggKyB0aGlzLmFic29sdXRlVmFsdWVzLndpZHRoICYmIHkgPiB0aGlzLmFic29sdXRlVmFsdWVzLnkgJiYgeSA8IHRoaXMuYWJzb2x1dGVWYWx1ZXMueSArIHRoaXMuYWJzb2x1dGVWYWx1ZXMuaGVpZ2h0KSB7XG4gICAgICAgICAgICAvLyBUaGUgbW91c2UgaXMgaW5zaWRlIHRoZSBwb3B1cFxuICAgICAgICAgICAgLy90aGlzLkNNLmxvZyhcIk1vdXNlIGluc2lkZSBwb3B1cFwiKVxuICAgICAgICAgICAgaWYgKGV2ZW50Lm5hbWUgPT09IFwiTU9VU0VfV0hFRUxfRE9XTlwiKSB7XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMubnVtZXJpYykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gTnVtYmVyKHRoaXMudmFsdWUpIC0gMVxuICAgICAgICAgICAgICAgICAgICB0aGlzLkNNLnJlZnJlc2goKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmZvY3VzZWQgPSB0cnVlXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGV2ZW50Lm5hbWUgPT09IFwiTU9VU0VfV0hFRUxfVVBcIikge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLm51bWVyaWMpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IE51bWJlcih0aGlzLnZhbHVlKSArIDFcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS5yZWZyZXNoKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5mb2N1c2VkID0gdHJ1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mluZyBvZiB0aGUgaW5wdXQuXG4gICAgICogQHBhcmFtIHtPYmplY3R9IGtleSAtIFRoZSBrZXkgb2JqZWN0LlxuICAgICAqIEBtZW1iZXJvZiBJbnB1dFBvcHVwXG4gICAgICovXG4gICAgcHVibGljIGtleUxpc3RuZXJOdW1lcmljKF9zdHI6IHN0cmluZywga2V5OiBLZXlMaXN0ZW5lckFyZ3MpOiB2b2lkIHtcbiAgICAgICAgY29uc3QgY2hlY2tSZXN1bHQgPSB0aGlzLkNNLm1vdXNlLmlzTW91c2VGcmFtZShrZXksIHRoaXMucGFyc2luZ01vdXNlRnJhbWUpXG4gICAgICAgIGlmIChjaGVja1Jlc3VsdCA9PT0gMSkge1xuICAgICAgICAgICAgdGhpcy5wYXJzaW5nTW91c2VGcmFtZSA9IHRydWVcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICB9IGVsc2UgaWYgKGNoZWNrUmVzdWx0ID09PSAtMSkge1xuICAgICAgICAgICAgdGhpcy5wYXJzaW5nTW91c2VGcmFtZSA9IGZhbHNlXG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgfSAvLyBDb250aW51ZSBvbmx5IGlmIHRoZSByZXN1bHQgaXMgMFxuICAgICAgICBsZXQgdiA9IE51bWJlcih0aGlzLnZhbHVlKVxuICAgICAgICBpZiAoTnVtYmVyLmlzTmFOKHYpKSB7XG4gICAgICAgICAgICB2ID0gMFxuICAgICAgICB9XG4gICAgICAgIGlmICghTnVtYmVyLmlzTmFOKE51bWJlcihrZXkubmFtZSkpKSB7XG4gICAgICAgICAgICBpZiAodi50b1N0cmluZygpLmxlbmd0aCA8IDIwKSB7XG4gICAgICAgICAgICAgICAgbGV0IHRtcCA9IHRoaXMudmFsdWUudG9TdHJpbmcoKVxuICAgICAgICAgICAgICAgIHRtcCArPSBrZXkubmFtZVxuICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSBOdW1iZXIodG1wKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVG8gY2hhbmdlIHRoZSBzaWduIEkgY2hlY2sgZm9yIHRoZSBrZXlzIFwiK1wiIGFuZCBcIi1cIlxuICAgICAgICB9IGVsc2UgaWYgKGtleS5zZXF1ZW5jZSA9PT0gXCItXCIpIHtcbiAgICAgICAgICAgIHRoaXMudmFsdWUgPSB2ICogLTFcbiAgICAgICAgfSBlbHNlIGlmIChrZXkuc2VxdWVuY2UgPT09IFwiK1wiKSB7XG4gICAgICAgICAgICB0aGlzLnZhbHVlID0gTWF0aC5hYnModilcbiAgICAgICAgfSBlbHNlIGlmIChrZXkuc2VxdWVuY2UgPT09IFwiLlwiIHx8IGtleS5zZXF1ZW5jZSA9PT0gXCIsXCIpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnZhbHVlLnRvU3RyaW5nKCkuaW5kZXhPZihcIi5cIikgPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHYgKyBcIi5cIlxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgc3dpdGNoIChrZXkubmFtZSkge1xuICAgICAgICAgICAgY2FzZSBcImJhY2tzcGFjZVwiOlxuICAgICAgICAgICAgICAgIC8vIElmIGJhY2tzcGFjZSBpcyBwcmVzc2VkIEkgcmVtb3ZlIHRoZSBsYXN0IGNoYXJhY3RlciBmcm9tIHRoZSB0eXBlZCB2YWx1ZVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnZhbHVlLnRvU3RyaW5nKCkubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGhpcy52YWx1ZS50b1N0cmluZygpLmluZGV4T2YoXCIuXCIpID09PSB0aGlzLnZhbHVlLnRvU3RyaW5nKCkubGVuZ3RoIC0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHYudG9TdHJpbmcoKVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXMudmFsdWUudG9TdHJpbmcoKS5pbmRleE9mKFwiLlwiKSA9PT0gdGhpcy52YWx1ZS50b1N0cmluZygpLmxlbmd0aCAtIDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMudmFsdWUgPSB0aGlzLnZhbHVlLnRvU3RyaW5nKCkuc2xpY2UoMCwgdGhpcy52YWx1ZS50b1N0cmluZygpLmxlbmd0aCAtIDEpXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gTnVtYmVyKHYudG9TdHJpbmcoKS5zbGljZSgwLCB2LnRvU3RyaW5nKCkubGVuZ3RoIC0gMSkpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgIGNhc2UgXCJyZXR1cm5cIjpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZW1pdChcImNvbmZpcm1cIiwgTnVtYmVyKHRoaXMudmFsdWUpKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLkNNLnVucmVnaXN0ZXJQb3B1cCh0aGlzKVxuICAgICAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgICBjYXNlIFwiZXNjYXBlXCI6XG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjYW5jZWxcIilcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS51bnJlZ2lzdGVyUG9wdXAodGhpcylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgY2FzZSBcInFcIjpcbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuQ00uZW1pdChcImV4aXRcIilcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS51bnJlZ2lzdGVyUG9wdXAodGhpcylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMuQ00ucmVmcmVzaCgpXG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGRlc2NyaXB0aW9uIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCB0byBtYWtlIHRoZSBDb25zb2xlTWFuYWdlciBoYW5kbGUgdGhlIGtleSBldmVudHMgd2hlbiB0aGUgaW5wdXQgaXMgdGV4dCBhbmQgaXQgaXMgc2hvd2VkLlxuICAgICAqIEluc2lkZSB0aGlzIGZ1bmN0aW9uIGFyZSBkZWZpbmVkIGFsbCB0aGUga2V5cyB0aGF0IGNhbiBiZSBwcmVzc2VkIGFuZCB0aGUgYWN0aW9ucyB0byBkbyB3aGVuIHRoZXkgYXJlIHByZXNzZWQuXG4gICAgICogQHBhcmFtIHtzdHJpbmd9IF9zdHIgLSBUaGUgc3RyaW5nIG9mIHRoZSBpbnB1dC5cbiAgICAgKiBAcGFyYW0ge09iamVjdH0ga2V5IC0gVGhlIGtleSBvYmplY3QuXG4gICAgICogQG1lbWJlcm9mIElucHV0UG9wdXBcbiAgICAgKi9cbiAgICBwdWJsaWMga2V5TGlzdG5lclRleHQoX3N0cjogc3RyaW5nLCBrZXk6IEtleUxpc3RlbmVyQXJncyk6IHZvaWQge1xuICAgICAgICBjb25zdCBjaGVja1Jlc3VsdCA9IHRoaXMuQ00ubW91c2UuaXNNb3VzZUZyYW1lKGtleSwgdGhpcy5wYXJzaW5nTW91c2VGcmFtZSlcbiAgICAgICAgaWYgKGNoZWNrUmVzdWx0ID09PSAxKSB7XG4gICAgICAgICAgICB0aGlzLnBhcnNpbmdNb3VzZUZyYW1lID0gdHJ1ZVxuICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgIH0gZWxzZSBpZiAoY2hlY2tSZXN1bHQgPT09IC0xKSB7XG4gICAgICAgICAgICB0aGlzLnBhcnNpbmdNb3VzZUZyYW1lID0gZmFsc2VcbiAgICAgICAgICAgIHJldHVyblxuICAgICAgICB9IC8vIENvbnRpbnVlIG9ubHkgaWYgdGhlIHJlc3VsdCBpcyAwXG4gICAgICAgIGNvbnN0IHYgPSB0aGlzLnZhbHVlXG4gICAgICAgIGlmICh2LnRvU3RyaW5nKCkubGVuZ3RoIDwgMjApIHtcbiAgICAgICAgICAgIGxldCB0bXAgPSB2LnRvU3RyaW5nKClcbiAgICAgICAgICAgIHRtcCArPSBrZXkubmFtZVxuICAgICAgICAgICAgdGhpcy52YWx1ZSA9IHRtcFxuICAgICAgICB9XG4gICAgICAgIHN3aXRjaCAoa2V5Lm5hbWUpIHtcbiAgICAgICAgY2FzZSBcImJhY2tzcGFjZVwiOlxuICAgICAgICAgICAgLy8gSWYgYmFja3NwYWNlIGlzIHByZXNzZWQgSSByZW1vdmUgdGhlIGxhc3QgY2hhcmFjdGVyIGZyb20gdGhlIHR5cGVkIHZhbHVlXG4gICAgICAgICAgICBpZiAodi50b1N0cmluZygpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZhbHVlID0gdi50b1N0cmluZygpLnNsaWNlKDAsIHYudG9TdHJpbmcoKS5sZW5ndGggLSAxKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSBcInJldHVyblwiOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuZW1pdChcImNvbmZpcm1cIiwgdGhpcy52YWx1ZSlcbiAgICAgICAgICAgICAgICB0aGlzLkNNLnVucmVnaXN0ZXJQb3B1cCh0aGlzKVxuICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgpXG4gICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSBcImVzY2FwZVwiOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuZW1pdChcImNhbmNlbFwiKVxuICAgICAgICAgICAgICAgIHRoaXMuQ00udW5yZWdpc3RlclBvcHVwKHRoaXMpXG4gICAgICAgICAgICAgICAgdGhpcy5oaWRlKClcbiAgICAgICAgICAgICAgICAvL2RlbGV0ZSB0aGlzXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIFwicVwiOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuQ00uZW1pdChcImV4aXRcIilcbiAgICAgICAgICAgICAgICB0aGlzLkNNLnVucmVnaXN0ZXJQb3B1cCh0aGlzKVxuICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgpXG4gICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIH1cbiAgICAgICAgdGhpcy5DTS5yZWZyZXNoKClcbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBAZGVzY3JpcHRpb24gVGhpcyBmdW5jdGlvbiBpcyB1c2VkIHRvIGdldCB0aGUgdmFsdWUgb2YgdGhlIGlucHV0LlxuICAgICAqIEByZXR1cm5zIHtzdHJpbmcgfCBudW1iZXJ9IFRoZSB2YWx1ZSBvZiB0aGUgaW5wdXQuXG4gICAgICogQG1lbWJlcm9mIElucHV0UG9wdXBcbiA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C0gMVxuICAgICAgICAgICAgICAgICAgICB0aGlzLkNNLnJlZnJlc2goKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmZvY3VzZWQgPSB0cnVlXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGV2ZW50Lm5hbWUgPT09IFwiTU9VU0VfV0hFRUxfVVBcIikge1xuICAgICAgICAgICAgICAgIGlmICh0aGlzLm51bWVyaWMpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy52YWx1ZSA9IE51bWJlcih0aGlzLnZhbHVlKSArIDFcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5DTS5yZWZyZXNoKClcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5mb2N1c2VkID0gdHJ1ZVxuICAgICAgICAgICAgfSBlbHNlIGlmIChldmVudC5uYW1lID09PSBcIk1PVVNFX0xFRlRfQlVUVE9OX1BSRVNTRURcIikge1xuICAgICAgICAgICAgICAgIC8vIGZpbmQgdGhlIHNlbGVjdGVkIGluZGV4IG9mIHRoZSBjbGljayBhbmQgc2V0IGl0IGFzIHNlbGVjdGVkXG4gICAgICAgICAgICAgICAgdGhpcy5mb2N1c2VkID0gdHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhpcy5mb2N1c2VkID0gZmFsc2VcbiAgICAgICAgfVxuICAgICAgICBpZiAoZXZlbnQubmFtZSA9PT0gXCJNT1VTRV9EUkFHXCIgJiYgZXZlbnQuZGF0YS5sZWZ0ID09PSB0cnVlICYmIHRoaXMuZHJhZ2dpbmcgPT09IGZhbHNlICYmIHRoaXMuZm9jdXNlZCkge1xuICAgICAgICAgICAgLy8gY2hlY2sgaWYgdGhlIG1vdXNlIGlzIG9uIHRoZSBoZWFkZXIgb2YgdGhlIHBvcHVwIChmaXJzdCB0aHJlZSBsaW5lcylcbiAgICAgICAgICAgIGlmICh4ID4gdGhpcy5hYnNvbHV0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5wdXRQb3B1cCJdfQ==
/// <reference types="node" />
import { EventEmitter } from "events";
import { ConsoleManager, KeyListenerArgs } from "../../ConsoleGui.js";
import { PhisicalValues } from "../Utils.js";
/**

@@ -86,2 +87,10 @@ * @class OptionPopup

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof OptionPopup
* @private
* @returns {OptionPopup} The instance of the OptionPopup.
* @memberof OptionPopup
*/
getPosition(): PhisicalValues;
/**
* @description This function is used to add the OptionPopup key listener callback to te ConsoleManager.

@@ -88,0 +97,0 @@ * @returns {OptionPopup} The instance of the OptionPopup.

import { EventEmitter } from "events";
import { ConsoleManager } from "../../ConsoleGui.js";
import { boxChars } from "../Utils.js";
/**

@@ -113,4 +114,4 @@ * @class OptionPopup

};
if (this.CM.widgetsCollection[this.id]) {
this.CM.unRegisterWidget(this);
if (this.CM.popupCollection[this.id]) {
this.CM.unregisterPopup(this);
const message = `OptionPopup ${this.id} already exists.`;

@@ -120,3 +121,3 @@ this.CM.error(message);

}
this.CM.registerWiget(this);
this.CM.registerPopup(this);
}

@@ -192,3 +193,3 @@ adaptOptions() {

this.emit("confirm", this.selected);
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -201,3 +202,3 @@ //delete this

this.emit("cancel");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -210,3 +211,3 @@ //delete this

this.CM.emit("exit");
this.CM.unRegisterWidget(this);
this.CM.unregisterPopup(this);
this.hide();

@@ -275,2 +276,12 @@ //delete this

/**
* @description This function is used to return the PhisicalValues of the popup (x, y, width, height).
* @memberof OptionPopup
* @private
* @returns {OptionPopup} The instance of the OptionPopup.
* @memberof OptionPopup
*/
getPosition() {
return this.absoluteValues;
}
/**
* @description This function is used to add the OptionPopup key listener callback to te ConsoleManager.

@@ -313,17 +324,17 @@ * @returns {OptionPopup} The instance of the OptionPopup.

const halfWidth = Math.round((windowWidth - this.title.length) / 2);
let header = "┌";
let header = boxChars["normal"].topLeft;
for (let i = 0; i < windowWidth; i++) {
header += "─";
header += boxChars["normal"].horizontal;
}
header += "┐\n";
header += `│${" ".repeat(halfWidth)}${this.title}${" ".repeat(windowWidth - halfWidth - this.title.length)}│\n`;
header += "├" + "─".repeat(windowWidth) + "┤\n";
let footer = "└";
header += `${boxChars["normal"].topRight}\n`;
header += `${boxChars["normal"].vertical}${" ".repeat(halfWidth)}${this.title}${" ".repeat(windowWidth - halfWidth - this.title.length)}${boxChars["normal"].vertical}\n`;
header += `${boxChars["normal"].left}${boxChars["normal"].horizontal.repeat(windowWidth)}${boxChars["normal"].right}\n`;
let footer = boxChars["normal"].bottomLeft;
for (let i = 0; i < windowWidth; i++) {
footer += "─";
footer += boxChars["normal"].horizontal;
}
footer += "┘\n";
footer += `${boxChars["normal"].bottomRight}\n`;
let content = "";
this.adaptOptions().forEach((option) => {
content += `│${option === this.selected ? "<" : " "} ${option}${option === this.selected ? " >" : " "}${" ".repeat(windowWidth - option.toString().length - 4)}│\n`;
content += `${boxChars["normal"].vertical}${option === this.selected ? "<" : " "} ${option}${option === this.selected ? " >" : " "}${" ".repeat(windowWidth - option.toString().length - 4)}${boxChars["normal"].vertical}\n`;
});

@@ -347,2 +358,2 @@ const windowDesign = `${header}${content}${footer}`;

export default OptionPopup;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiT3B0aW9uUG9wdXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy93aWRnZXRzL09wdGlvblBvcHVwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDckMsT0FBTyxFQUFFLGNBQWMsRUFBbUIsTUFBTSxxQkFBcUIsQ0FBQTtBQUdyRTs7Ozs7Ozs7Ozs7Ozs7Ozs7O0dBa0JHO0FBQ0gsTUFB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ge1xuICAgICAgICAgICAgdGhpcy5wYXJzaW5nTW91c2VGcmFtZSA9IGZhbHNlXG4gICAgICAgICAgICByZXR1cm5cbiAgICAgICAgfSAvLyBDb250aW51ZSBvbmx5IGlmIHRoZSByZXN1bHQgaXMgMFxuICAgICAgICBzd2l0Y2ggKGtleS5uYW1lKSB7XG4gICAgICAgIGNhc2UgXCJkb3duXCI6XG4gICAgICAgICAgICB0aGlzLnNldFNlbGVjdGVkKHRoaXMub3B0aW9uc1sodGhpcy5vcHRpb25zLmluZGV4T2YodGhpcy5zZWxlY3RlZCkgKyAxKSAlIHRoaXMub3B0aW9ucy5sZW5ndGhdKVxuICAgICAgICAgICAgaWYgKHRoaXMuQ00uU2NyZWVuLmhlaWdodCAtIHRoaXMubWFyZ2luVG9wIC0gNCA8IHRoaXMub3B0aW9ucy5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zZWxlY3RlZCA9PT0gdGhpcy5vcHRpb25zW3RoaXMuYWRhcHRPcHRpb25zKCkubGVuZ3RoICsgdGhpcy5zdGFydEluZGV4XSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXJ0SW5kZXgrK1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zdGFydEluZGV4ID0gMFxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSBcInVwXCI6XG4gICAgICAgICAgICB0aGlzLnNldFNlbGVjdGVkKHRoaXMub3B0aW9uc1sodGhpcy5vcHRpb25zLmluZGV4T2YodGhpcy5zZWxlY3RlZCkgLSAxICsgdGhpcy5vcHRpb25zLmxlbmd0aCkgJSB0aGlzLm9wdGlvbnMubGVuZ3RoXSlcbiAgICAgICAgICAgIGlmICh0aGlzLnN0YXJ0SW5kZXggPiAwICYmIHRoaXMuc2VsZWN0ZWQgPT09IHRoaXMuYWRhcHRPcHRpb25zKClbMF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KSAtIHRoaXMuYWRhcHRPcHRpb25zKCkubGVuZ3RoICsgdGhpcy5vcHRpb25zLmxlbmd0aCkgJSB0aGlzLm9wdGlvbnMubGVuZ3RoXSlcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5zdGFydEluZGV4ID4gdGhpcy5hZGFwdE9wdGlvbnMoKS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGFydEluZGV4IC09IHRoaXMuYWRhcHRPcHRpb25zKCkubGVuZ3RoXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGFydEluZGV4ID0gMFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICBjYXNlIFwicmV0dXJuXCI6XG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgdGhpcy5lbWl0KFwiY29uZmlybVwiLCB0aGlzLnNlbGVjdGVkKVxuICAgICAgICAgICAgICAgIHRoaXMuQ00udW5SZWdpc3RlcldpZGdldCh0aGlzKVxuICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgpXG4gICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSBcImVzY2FwZVwiOlxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHRoaXMuZW1pdChcImNhbmNlbFwiKVxuICAgICAgICAgICAgICAgIHRoaXMuQ00udW5SZWdpc3RlcldpZGdldCh0aGlzKVxuICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgpXG4gICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSBcInFcIjpcbiAgICAgICAgICAgIHtcbiA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ZW5ndGggKyB0aGlzLnN0YXJ0SW5kZXhdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXJ0SW5kZXgrK1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGFydEluZGV4ID0gMFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aGlzLmZvY3VzZWQgPSB0cnVlXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGV2ZW50Lm5hbWUgPT09IFwiTU9VU0VfV0hFRUxfVVBcIikge1xuICAgICAgICAgICAgICAgIHRoaXMuc2V0U2VsZWN0ZWQodGhpcy5vcHRpb25zWyh0aGlzLm9wdGlvbnMuaW5kZXhPZih0aGlzLnNlbGVjdGVkKSAtIDEgKyB0aGlzLm9wdGlvbnMubGVuZ3RoKSAlIHRoaXMub3B0aW9ucy5sZW5ndGhdKVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnN0YXJ0SW5kZXggPiAwICYmIHRoaXMuc2VsZWN0ZWQgPT09IHRoaXMuYWRhcHRPcHRpb25zKClbMF0pIHtcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zdGFydEluZGV4LS1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdGhpcy5mb2N1c2VkID0gdHJ1ZVxuICAgICAgICAgICAgfSBlbHNlIGlmIChldmVudC5uYW1lID09PSBcIk1PVVNFX0xFRlRfQlVUVE9OX1BSRVNTRURcIikge1xuICAgICAgICAgICAgICAgIC8vIGZpbmQgdGhlIHNlbGVjdGVkIGluZGV4IG9mIHRoZSBjbGljayBhbmQgc2V0IGl0IGFzIHNlbGVjdGVkXG4gICAgICAgICAgICAgICAgY29uc3QgaW5kZXggPSB5IC0gdGhpcy5hYnNvbHV0ZVZhbHVlcy55IC0gNFxuICAgICAgICAgICAgICAgIGlmIChpbmRleCA+PSAwICYmIGluZGV4IDwgd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XggPiB0aGlzLmFkYXB0T3B0aW9ucygpLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXJ0SW5kZXggLT0gdGhpcy5hZGFwdE9wdGlvbnMoKS5sZW5ndGhcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLnN0YXJ0SW5kZXggPSAwXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgXCJyZXR1cm5cIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjb25maXJtXCIsIHRoaXMuc2VsZWN0ZWQpXG4gICAgICAgICAgICAgICAgdGhpcy5DTS51bnJlZ2lzdGVyUG9wdXAodGhpcylcbiAgICAgICAgICAgICAgICB0aGlzLmhpZGUoKVxuICAgICAgICAgICAgICAgIC8vZGVsZXRlIHRoaXNcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgIGNhc2UgXCJlc2NhcGVcIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJjYW5jZWxcIilcbiAgICAgICAgICAgICAgICB0aGlzLkNNLnVucmVnaXN0ZXJQb3B1cCh0aGlzKVxuICAgICAgICAgICAgICAgIHRoaXMuaGlkZSgpXG4gICAgICAgICAgICAgICAgLy9kZWxldGUgdGhpc1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgY2FzZSBcInFcIjpcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICB0aGlzLkNNLmVtaXQoXCJleGl0XCIpXG4gICAgICAgICAgICAgICAgdGhpcy5DTS51bnJlZ2lzdGVyUG9wdXAodGhpcylcbiAgICAgICAgICAgICAgICB0aGlzL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uZm9yRWFjaCgobGluZSwgaW5kZXgpID0+IHtcbiAgICAgICAgICAgIHRoaXMuQ00uU2NyZWVuLmN1cnNvclRvKGNlbnRlclNjcmVlbiArIHRoaXMub2Zmc2V0WCwgdGhpcy5tYXJnaW5Ub3AgKyBpbmRleCArIHRoaXMub2Zmc2V0WSlcbiAgICAgICAgICAgIHRoaXMuQ00uU2NyZWVuLndyaXRlKHsgdGV4dDogbGluZSwgc3R5bGU6IHsgY29sb3I6IFwid2hpdGVcIiB9IH0pXG4gICAgICAgIH0pXG4gICAgICAgIHRoaXMuYWJzb2x1dGVWYWx1ZXMgPSB7XG4gICAgICAgICAgICB4OiBjZW50ZXJTY3JlZW4gKyB0aGlzLm9mZnNldFgsXG4gICAgICAgICAgICB5OiB0aGlzLm1hcmdpblRvcCArIHRoaXMub2Zmc2V0WSxcbiAgICAgICAgICAgIHdpZHRoOiB3aW5kb3dXaWR0aCxcbiAgICAgICAgICAgIGhlaWdodDogd2luZG93RGVzaWduTGluZXMubGVuZ3RoLFxuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzXG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBPcHRpb25Qb3B1cCJdfQ==

@@ -5,2 +5,3 @@ /// <reference types="node" />

import PageBuilder from "./components/PageBuilder.js";
import InPageWidgetBuilder from "./components/InPageWidgetBuilder.js";
import Screen from "./components/Screen.js";

@@ -13,4 +14,7 @@ import CustomPopup from "./components/widgets/CustomPopup.js";

import OptionPopup from "./components/widgets/OptionPopup.js";
import { Control } from "./components/widgets/Control.js";
import { Button } from "./components/widgets/Button.js";
import LayoutManager, { LayoutOptions } from "./components/layout/LayoutManager.js";
import { MouseEvent, MouseManager } from "./components/MouseManager.js";
import { PhisicalValues, StyledElement, SimplifiedStyledElement, StyleObject } from "./components/Utils.js";
/**

@@ -46,2 +50,4 @@ * @description This type is used to define the parameters of the KeyListener event (keypress).

* @prop {LayoutOptions} [layoutOptions] - The options of the layout.
* @prop {boolean} [enableMouse] - If the mouse should be enabled.
* @prop {boolean} [overrideConsole = true] - If the console.log|warn|error|info should be overridden.
*

@@ -58,2 +64,3 @@ * @export

enableMouse?: boolean;
overrideConsole: boolean;
}

@@ -80,3 +87,4 @@ /**

Screen: Screen;
widgetsCollection: any[];
popupCollection: any[];
controlsCollection: Control[];
eventListenersContainer: {

@@ -152,14 +160,26 @@ [key: string]: (_str: string, key: KeyListenerArgs) => void;

/**
* @description This function is used to register a widget. The widget is stored in the widgetsCollection object. That is called by the widgets in show().
* @param {Widget} widget - The widget to register.
* @description This function is used to register a popup. The popup is stored in the popupCollection object. That is called by the popups in show().
* @param {popup} popup - The popup to register.
* @memberof ConsoleManager
*/
registerWiget(widget: any): void;
registerPopup(popup: any): void;
/**
* @description This function is used to unregister a widget. The widget is removed from the widgetsCollection object. That is called by the widgets in hide().
* @param {string} id - The id of the widget.
* @description This function is used to unregister a popup. The popup is removed from the popupCollection object. That is called by the popups in hide().
* @param {string} id - The id of the popup.
* @memberof ConsoleManager
*/
unRegisterWidget(widget: any): void;
unregisterPopup(popup: any): void;
/**
* @description This function is used to register a control. The control is stored in the controlCollection object. That is called by the controls in show().
* @param {control} control - The control to register.
* @memberof ConsoleManager
*/
registerControl(control: any): void;
/**
* @description This function is used to unregister a control. The control is removed from the controlCollection object. That is called by the controls in hide().
* @param {string} id - The id of the control.
* @memberof ConsoleManager
*/
unregisterControl(control: any): void;
/**
* @description This function is used to set the home page. It also refresh the screen.

@@ -237,12 +257,14 @@ * @param {PageBuilder} page - The page to set as home page.

/**
* @description This function is used to truncate a string adding ... at the end.
* @param {string} str - The string to truncate.
* @param {number} n - The number of characters to keep.
* @param {boolean} useWordBoundary - If true, the truncation will be done at the end of the word.
* @description This function is used to override the console.log, console.error, console.warn and console.info functions.
* @memberof ConsoleManager
* @example CM.truncate("Hello world", 5, true) // "Hello..."
* @example CM.overrideConsole()
* @example console.log("Hello world") // Will be logged in the log page.
* @example console.error("Anomaly detected") // Will be logged in the log page.
* @example console.warn("Anomaly detected") // Will be logged in the log page.
* @example console.info("Anomaly detected") // Will be logged in the log page.
* @since 1.1.42
*/
truncate(str: string, n: number, useWordBoundary: boolean): string;
private overrideConsole;
}
export { PageBuilder, ConsoleManager, OptionPopup, InputPopup, ConfirmPopup, ButtonPopup, CustomPopup, FileSelectorPopup };
export { PageBuilder, InPageWidgetBuilder, ConsoleManager, OptionPopup, InputPopup, ConfirmPopup, ButtonPopup, CustomPopup, FileSelectorPopup, Control, Button, PhisicalValues, StyledElement, SimplifiedStyledElement, StyleObject };
//# sourceMappingURL=ConsoleGui.d.ts.map
{
"name": "console-gui-tools",
"version": "1.1.41",
"version": "1.1.42",
"description": "A simple library to draw option menu, text popup or other widgets and layout on a Node.js console.",

@@ -5,0 +5,0 @@ "main": "dist/ConsoleGui.js",

@@ -56,2 +56,5 @@ # console-gui-tools

### options.overrideConsole
Override the console.log, console.info, console.warn, console.error, console.debug functions to print the logs on the screen.
### options.layoutOptions

@@ -320,2 +323,55 @@ The options that will be passed to the layout.

# Widgets
There are two types of widgets: the "popup" widgets and the "control" widgets.
## Control widgets (since 1.1.42) [New!](docs/Control.md)
The control widgets are the widgets that are displayed on the page and are not "popup" widgets.
They has an absolute position and size and are not affected by the layout.
Introduced since the version 1.1.42 of the library.
Currently there is only the base class for the control widgets, "Control" class and the "Button" class.
It is possible to create a custom control widget by extending the Control class and implementing the draw method.
Example:
```ts
const widget1 = new InPageWidgetBuilder()
widget1.addRow({ text: "┌────────┐", color: "yellow", style: "bold" })
widget1.addRow({ text: "│ START! │", color: "yellow", style: "bold" })
widget1.addRow({ text: "└────────┘", color: "yellow", style: "bold" })
const button1 = new Control("btn1", true, { x: 30, y: 18, width: 10, height: 3 }, widget1)
button1.on("relativeMouse", (event) => {
if (event.name === "MOUSE_LEFT_BUTTON_RELEASED") console.log("Button clicked!")
})
```
Result:
![InPageWidget](https://user-images.githubusercontent.com/14907987/202858694-82ca7f26-2a7a-4210-92da-fbbd40ad10b4.gif)
### Button (since 1.2.0) [New!](docs/Button.md)
The button is a control widget that basically do the previous example for you in a simpler way.
`new Button(id, text, width, height, x, y, style, visible, enabled, onClick, onRelease)`
<p>This class is an overload of Control that is used to create a button.</p>
<p><img src="https://user-images.githubusercontent.com/14907987/202866824-047503fc-9af6-4990-aa9a-57a3d691f6b0.gif" alt="Button"></p>
<p>Emits the following events:</p>
<ul>
<li>&quot;click&quot; when the user confirm</li>
<li>&quot;relese&quot; when the user cancel</li>
</ul>
**Example**
```js
new Button("btnRun", "Run me!", 10, 3, 21, 18,
{
color: "magentaBright",
bold: true,
italic: true,
borderColor: "green"
},
() => {
GUI.log("Button clicked!")
})
```
In the next versions of the library, more control widgets will be added as Control extensions.
## Popup widgets
## To create an option popup (select)

@@ -462,3 +518,4 @@ ```js

## Console.log and other logging tools
To log you have to use the following functions:
By default (since version 1.1.42) the console.log|warn|error|info are replaced by a custom function that will show the message in the apposite GUI space. To disable this override you can set the option `overrideConsole` to false in the options object of the constructor.
They are replaced by theese functions (that are also available in the ConsoleManager instance):

@@ -481,5 +538,4 @@ ```js

This library is in development now. New componets will come asap.
> This library is in development now. New componets will come asap.
## License and copyright

@@ -486,0 +542,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc