console-gui-tools
Advanced tools
Comparing version
@@ -57,2 +57,8 @@ import { ForegroundColor } from "chalk"; | ||
*/ | ||
setPage(page: PageBuilder, index: number): void; | ||
/** | ||
* @description This function is used to overwrite the page content. | ||
* @param {PageBuilder} page the page to be added | ||
* @memberof DoubleLayout | ||
*/ | ||
setPage1(page: PageBuilder): void; | ||
@@ -66,2 +72,17 @@ /** | ||
/** | ||
* @description This function is used to set the page titles. | ||
* @param {string[]} titles the titles of the pages | ||
* @memberof DoubleLayout | ||
* @example layout.setTitles(["Page 1", "Page 2"]) | ||
*/ | ||
setTitles(titles: string[]): void; | ||
/** | ||
* @description This function is used to set the page title at the given index. | ||
* @param {string} title the title of the page | ||
* @param {number} index the index of the page | ||
* @memberof DoubleLayout | ||
* @example layout.setTitle("Page 1", 0) | ||
*/ | ||
setTitle(title: string, index: number): void; | ||
/** | ||
* @description This function is used to enable or disable the layout border. | ||
@@ -91,4 +112,25 @@ * @param {boolean} border enable or disable the border | ||
/** | ||
* @description This function is used to change the page ratio. | ||
* @param {Array<number>} ratio the ratio of pages | ||
* @memberof QuadLayout | ||
* @example layout.setRatio([0.4, 0.6]) | ||
*/ | ||
setRatio(ratio: [number, number]): void; | ||
/** | ||
* @description This function is used to increase the page ratio by the given ratio to add. (Only works if the direction is horizontal) | ||
* @param {number} quantity the ratio to add | ||
* @memberof QuadLayout | ||
* @example layout.increaseRatio(0.01) | ||
*/ | ||
increaseRatio(quantity: number): void; | ||
/** | ||
* @description This function is used to decrease the page ratio by the given ratio to subtract. (Only works if the direction is horizontal). | ||
* @param {number} quantity the ratio to subtract | ||
* @memberof QuadLayout | ||
* @example layout.decreaseRatio(0.01) | ||
*/ | ||
decreaseRatio(quantity: number): void; | ||
/** | ||
* @description This function is used to draw a single line of the layout to the screen. It also trim the line if it is too long. | ||
* @param {Array<object>} line the line to be drawn | ||
* @param {Array<StyledElement>} line the line to be drawn | ||
* @param {number} lineIndex the index of the selected line | ||
@@ -95,0 +137,0 @@ * @memberof DoubleLayout |
@@ -23,5 +23,5 @@ import { ConsoleManager } from "../../ConsoleGui.js"; | ||
/** @const {string} page2Title The title of page2. */ | ||
this.page2Title = this.options.page2Title || this.CM.logPageTitle; | ||
this.page2Title = this.options.page2Title || ""; | ||
/** @const {string} page1Title The application title. */ | ||
this.page1Title = this.options.page1Title || this.CM.applicationTitle; | ||
this.page1Title = this.options.page1Title || ""; | ||
} | ||
@@ -33,2 +33,15 @@ /** | ||
*/ | ||
setPage(page, index) { | ||
if (index == 0) { | ||
this.page1 = page; | ||
} | ||
else { | ||
this.page2 = page; | ||
} | ||
} | ||
/** | ||
* @description This function is used to overwrite the page content. | ||
* @param {PageBuilder} page the page to be added | ||
* @memberof DoubleLayout | ||
*/ | ||
setPage1(page) { this.page1 = page; } | ||
@@ -42,2 +55,27 @@ /** | ||
/** | ||
* @description This function is used to set the page titles. | ||
* @param {string[]} titles the titles of the pages | ||
* @memberof DoubleLayout | ||
* @example layout.setTitles(["Page 1", "Page 2"]) | ||
*/ | ||
setTitles(titles) { | ||
this.page1Title = titles[0]; | ||
this.page2Title = titles[1]; | ||
} | ||
/** | ||
* @description This function is used to set the page title at the given index. | ||
* @param {string} title the title of the page | ||
* @param {number} index the index of the page | ||
* @memberof DoubleLayout | ||
* @example layout.setTitle("Page 1", 0) | ||
*/ | ||
setTitle(title, index) { | ||
if (index == 0) { | ||
this.page1Title = title; | ||
} | ||
else { | ||
this.page2Title = title; | ||
} | ||
} | ||
/** | ||
* @description This function is used to enable or disable the layout border. | ||
@@ -76,4 +114,41 @@ * @param {boolean} border enable or disable the border | ||
/** | ||
* @description This function is used to change the page ratio. | ||
* @param {Array<number>} ratio the ratio of pages | ||
* @memberof QuadLayout | ||
* @example layout.setRatio([0.4, 0.6]) | ||
*/ | ||
setRatio(ratio) { | ||
this.proportions = ratio; | ||
} | ||
/** | ||
* @description This function is used to increase the page ratio by the given ratio to add. (Only works if the direction is horizontal) | ||
* @param {number} quantity the ratio to add | ||
* @memberof QuadLayout | ||
* @example layout.increaseRatio(0.01) | ||
*/ | ||
increaseRatio(quantity) { | ||
if (this.options.direction == "horizontal") { | ||
if (this.proportions[0] < 0.9) { | ||
this.proportions[0] = Number((this.proportions[0] + quantity).toFixed(2)); | ||
this.proportions[1] = Number((this.proportions[1] - quantity).toFixed(2)); | ||
} | ||
} | ||
} | ||
/** | ||
* @description This function is used to decrease the page ratio by the given ratio to subtract. (Only works if the direction is horizontal). | ||
* @param {number} quantity the ratio to subtract | ||
* @memberof QuadLayout | ||
* @example layout.decreaseRatio(0.01) | ||
*/ | ||
decreaseRatio(quantity) { | ||
if (this.options.direction == "horizontal") { | ||
if (this.proportions[0] > 0.1) { | ||
this.proportions[0] = Number((this.proportions[0] - quantity).toFixed(2)); | ||
this.proportions[1] = Number((this.proportions[1] + quantity).toFixed(2)); | ||
} | ||
} | ||
} | ||
/** | ||
* @description This function is used to draw a single line of the layout to the screen. It also trim the line if it is too long. | ||
* @param {Array<object>} line the line to be drawn | ||
* @param {Array<StyledElement>} line the line to be drawn | ||
* @param {number} lineIndex the index of the selected line | ||
@@ -116,3 +191,3 @@ * @memberof DoubleLayout | ||
else { | ||
newLine[i] = JSON.parse(JSON.stringify(secondLine)); | ||
newLine[i] = i === 0 ? JSON.parse(JSON.stringify(line)) : JSON.parse(JSON.stringify(secondLine)); | ||
} | ||
@@ -123,3 +198,3 @@ let diff = e.length - this.realWidth[i] + 1; | ||
if (newLine[i][j].text.length > diff + offset) { | ||
newLine[i][j].text = this.CM.truncate(newLine[i][j].text, (newLine[i][j].text.length - diff) - offset, true); | ||
newLine[i][j].text = this.CM.truncate(newLine[i][j].text, (newLine[i][j].text.length - diff) - offset, false); | ||
break; | ||
@@ -245,2 +320,2 @@ } | ||
export default DoubleLayout; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRG91YmxlTGF5b3V0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2Nv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Rpb25zLmRpcmVjdGlvbiB8fCB0aGlzLm9wdGlvbnMuZGlyZWN0aW9uID09PSBcInZlcnRpY2FsXCIgPyBcInZlcnRpY2FsXCIgOiBcImhvcml6b250YWxcIlxuICAgICAgICBjb25zdCBic2l6ZSA9IHRoaXMub3B0aW9ucy5ib3hlZCA/IGRpciA9PT0gXCJ2ZXJ0aWNhbFwiID8gMiA6IDMgOiAwXG4gICAgICAgIGxldCB1bmZvcm1hdHRlZExpbmUgPSBbXCJcIl1cbiAgICAgICAgbGV0IG5ld0xpbmUgPSBbXG4gICAgICAgICAgICBbLi4ubGluZV1cbiAgICAgICAgXVxuICAgICAgICBpZiAoZGlyID09PSBcInZlcnRpY2FsXCIpIHtcbiAgICAgICAgICAgIGxpbmUuZm9yRWFjaChlbGVtZW50ID0+IHtcbiAgICAgICAgICAgICAgICB1bmZvcm1hdHRlZExpbmVbMF0gKz0gZWxlbWVudC50ZXh0XG4gICAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbmV3TGluZSA9IFtcbiAgICAgICAgICAgICAgICBbLi4ubGluZV0sXG4gICAgICAgICAgICAgICAgWy4uLnNlY29uZExpbmU/IHNlY29uZExpbmUgOiBsaW5lXVxuICAgICAgICAgICAgXVxuICAgICAgICAgICAgdW5mb3JtYXR0ZWRMaW5lLnB1c2goXCJcIilcbiAgICAgICAgICAgIGxpbmUuZm9yRWFjaCgoZWxlbWVudCA6IFN0eWxlZEVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgICAgICB1bmZvcm1hdHRlZExpbmVbMF0gKz0gZWxlbWVudC50ZXh0XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgc2Vjb25kTGluZT8uZm9yRWFjaCgoZWxlbWVudCA6IFN0eWxlZEVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgICAgICB1bmZvcm1hdHRlZExpbmVbMV0gKz0gZWxlbWVudC50ZXh0XG4gICAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICAgIGlmICh1bmZvcm1hdHRlZExpbmUuZmlsdGVyKChlLCBpKSA9PiBlLmxlbmd0aCA+IHRoaXMucmVhbFdpZHRoW2ldIC0gYnNpemUpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHVuZm9ybWF0dGVkTGluZSA9IHVuZm9ybWF0dGVkTGluZS5tYXAoKGUsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoZS5sZW5ndGggPiB0aGlzLnJlYWxXaWR0aFtpXSAtIGJzaXplKSB7IC8vIE5lZWQgdG8gdHJ1bmNhdGVcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gMlxuICAgICAgICAgICAgICAgICAgICBpZiAoZGlyID09PSBcInZlcnRpY2FsXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xpbmVbaV0gPSBbLi4uSlNPTi5wYXJzZShKU09OLnN0cmluZ2lmeShsaW5lKSldIC8vIFNoYWxsb3cgY29weSBiZWNhdXNlIEkganVzdCB3YW50IHRvIG1vZGlmeSB0aGUgdmFsdWVzIGJ1dCBub3QgdGhlIG9yaWdpbmFsXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdMaW5lW2ldID0gSlNPTi5wYXJzZShKU09OLnN0cmluZ2lmeShzZWNvbmRMaW5lKSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlmZiA9IGUubGVuZ3RoIC0gdGhpcy5yZWFsV2lkdGhbaV0gKyAxXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gcmVtb3ZlIHRydW5jYXRlZCB0ZXh0XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSBuZXdMaW5lW2ldLmxlbmd0aCAtIDE7IGogPj0gMDsgai0tKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV3TGluZVtpXVtqXS50ZXh0Lmxlbmd0aCA+IGRpZmYgKyBvZmZzZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMaW5lW2ldW2pdLnRleHQgPSB0aGlzLkNNLnRydW5jYXRlKG5ld0xpbmVbaV1bal0udGV4dCwgKG5ld0xpbmVbaV1bal0udGV4dC5sZW5ndGggLSBkaWZmKSAtIG9mZnNldCwgdHJ1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaWZmIC09IG5ld0xpbmVbaV1bal0udGV4dC5sZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMaW5lW2ldLnNwbGljZShqLCAxKVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIFVwZGF0ZSB1bmZvcm1hdHRlZCBsaW5lXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXdMaW5lW2ldLm1hcChlbGVtZW50ID0+IGVsZW1lbnQudGV4dCkuam9pbihcIlwiKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZVxuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgICBpZiAoZGlyID09PSBcInZlcnRpY2FsXCIpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLm9wdGlvbnMuYm94ZWQpIG5ld0xpbmVbMF0udW5zaGlmdCh7IHRleHQ6IFwi4pSCXCIsIHN0eWxlOiB7IGNvbG9yOiB0aGlzLnNlbGVjdGVkID09PSBpbmRleCA/IHRoaXMub3B0aW9ucy5ib3hDb2xvciA6IFwid2hpdGVcIiwgYm9sZDogdGhpcy5ib3hCb2xkIH0gfSlcbiAgICAgICAgICAgIGlmICh1bmZvcm1hdHRlZExpbmVbMF0ubGVuZ3RoIDw9IHRoaXMuQ00uU2NyZWV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YmUgZHJhd25cbiAgICAgKiBAcGFyYW0ge251bWJlcn0gbGluZUluZGV4IHRoZSBpbmRleCBvZiB0aGUgc2VsZWN0ZWQgbGluZVxuICAgICAqIEBtZW1iZXJvZiBEb3VibGVMYXlvdXRcbiAgICAgKiBAcmV0dXJucyB7dm9pZH1cbiAgICAgKi9cbiAgICBwcml2YXRlIGRyYXdMaW5lKGxpbmUgOiAgQXJyYXk8U3R5bGVkRWxlbWVudD4sIHNlY29uZExpbmU/IDogQXJyYXk8U3R5bGVkRWxlbWVudD4sIGluZGV4ID0gMCk6IHZvaWQge1xuICAgICAgICBjb25zdCBkaXIgPSAhdGhpcy5vcHRpb25zLmRpcmVjdGlvbiB8fCB0aGlzLm9wdGlvbnMuZGlyZWN0aW9uID09PSBcInZlcnRpY2FsXCIgPyBcInZlcnRpY2FsXCIgOiBcImhvcml6b250YWxcIlxuICAgICAgICBjb25zdCBic2l6ZSA9IHRoaXMub3B0aW9ucy5ib3hlZCA/IGRpciA9PT0gXCJ2ZXJ0aWNhbFwiID8gMiA6IDMgOiAwXG4gICAgICAgIGxldCB1bmZvcm1hdHRlZExpbmUgPSBbXCJcIl1cbiAgICAgICAgbGV0IG5ld0xpbmUgPSBbXG4gICAgICAgICAgICBbLi4ubGluZV1cbiAgICAgICAgXVxuICAgICAgICBpZiAoZGlyID09PSBcInZlcnRpY2FsXCIpIHtcbiAgICAgICAgICAgIGxpbmUuZm9yRWFjaChlbGVtZW50ID0+IHtcbiAgICAgICAgICAgICAgICB1bmZvcm1hdHRlZExpbmVbMF0gKz0gZWxlbWVudC50ZXh0XG4gICAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgbmV3TGluZSA9IFtcbiAgICAgICAgICAgICAgICBbLi4ubGluZV0sXG4gICAgICAgICAgICAgICAgWy4uLnNlY29uZExpbmU/IHNlY29uZExpbmUgOiBsaW5lXVxuICAgICAgICAgICAgXVxuICAgICAgICAgICAgdW5mb3JtYXR0ZWRMaW5lLnB1c2goXCJcIilcbiAgICAgICAgICAgIGxpbmUuZm9yRWFjaCgoZWxlbWVudCA6IFN0eWxlZEVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgICAgICB1bmZvcm1hdHRlZExpbmVbMF0gKz0gZWxlbWVudC50ZXh0XG4gICAgICAgICAgICB9KVxuICAgICAgICAgICAgc2Vjb25kTGluZT8uZm9yRWFjaCgoZWxlbWVudCA6IFN0eWxlZEVsZW1lbnQpID0+IHtcbiAgICAgICAgICAgICAgICB1bmZvcm1hdHRlZExpbmVbMV0gKz0gZWxlbWVudC50ZXh0XG4gICAgICAgICAgICB9KVxuICAgICAgICB9XG4gICAgICAgIGlmICh1bmZvcm1hdHRlZExpbmUuZmlsdGVyKChlLCBpKSA9PiBlLmxlbmd0aCA+IHRoaXMucmVhbFdpZHRoW2ldIC0gYnNpemUpLmxlbmd0aCA+IDApIHtcbiAgICAgICAgICAgIHVuZm9ybWF0dGVkTGluZSA9IHVuZm9ybWF0dGVkTGluZS5tYXAoKGUsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoZS5sZW5ndGggPiB0aGlzLnJlYWxXaWR0aFtpXSAtIGJzaXplKSB7IC8vIE5lZWQgdG8gdHJ1bmNhdGVcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gMlxuICAgICAgICAgICAgICAgICAgICBpZiAoZGlyID09PSBcInZlcnRpY2FsXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xpbmVbaV0gPSBbLi4uSlNPTi5wYXJzZShKU09OLnN0cmluZ2lmeShsaW5lKSldIC8vIFNoYWxsb3cgY29weSBiZWNhdXNlIEkganVzdCB3YW50IHRvIG1vZGlmeSB0aGUgdmFsdWVzIGJ1dCBub3QgdGhlIG9yaWdpbmFsXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXdMaW5lW2ldID0gaSA9PT0gMCA/IEpTT04ucGFyc2UoSlNPTi5zdHJpbmdpZnkobGluZSkpIDogSlNPTi5wYXJzZShKU09OLnN0cmluZ2lmeShzZWNvbmRMaW5lKSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsZXQgZGlmZiA9IGUubGVuZ3RoIC0gdGhpcy5yZWFsV2lkdGhbaV0gKyAxXG5cbiAgICAgICAgICAgICAgICAgICAgLy8gcmVtb3ZlIHRydW5jYXRlZCB0ZXh0XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSBuZXdMaW5lW2ldLmxlbmd0aCAtIDE7IGogPj0gMDsgai0tKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV3TGluZVtpXVtqXS50ZXh0Lmxlbmd0aCA+IGRpZmYgKyBvZmZzZXQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMaW5lW2ldW2pdLnRleHQgPSB0aGlzLkNNLnRydW5jYXRlKG5ld0xpbmVbaV1bal0udGV4dCwgKG5ld0xpbmVbaV1bal0udGV4dC5sZW5ndGggLSBkaWZmKSAtIG9mZnNldCwgZmFsc2UpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlmZiAtPSBuZXdMaW5lW2ldW2pdLnRleHQubGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGluZVtpXS5zcGxpY2UoaiwgMSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBVcGRhdGUgdW5mb3JtYXR0ZWQgbGluZVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbmV3TGluZVtpXS5tYXAoZWxlbWVudCA9PiBlbGVtZW50LnRleHQpLmpvaW4oXCJcIilcbiAgICAgICAgICAgICAg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naHQ7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmRyYXdMaW5lKHAxW2ldIHx8IFt7IHRleHQ6IFwiXCIsIHN0eWxlOiB7IGNvbG9yOiBcIlwiIH0gfV0sIHAyW2ldIHx8IFt7IHRleHQ6IFwiXCIsIHN0eWxlOiB7IGNvbG9yOiBcIlwiIH0gfV0pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBEb3VibGVMYXlvdXQiXX0= |
/// <reference types="node" /> | ||
import { EventEmitter } from "events"; | ||
import DoubleLayout, { DoubleLayoutOptions } from "./components/layout/DoubleLayout.js"; | ||
import PageBuilder from "./components/PageBuilder.js"; | ||
@@ -12,2 +11,3 @@ import Screen from "./components/Screen.js"; | ||
import OptionPopup from "./components/widgets/OptionPopup.js"; | ||
import LayoutManager, { LayoutOptions } from "./components/layout/LayoutManager.js"; | ||
/** | ||
@@ -38,6 +38,6 @@ * @description This type is used to define the parameters of the KeyListener event (keypress). | ||
* @prop {string} [title] - The title of the ConsoleGui. | ||
* @prop {0 | 1 | "popup"} [logLocation] - The location of the logs. | ||
* @prop {0 | 1 | 2 | 3 | "popup"} [logLocation] - The location of the logs. | ||
* @prop {string} [showLogKey] - The key to show the log. | ||
* @prop {number} [logPageSize] - The size of the log page. | ||
* @prop {DoubleLayoutOptions} [layoutOptions] - The options of the layout. | ||
* @prop {LayoutOptions} [layoutOptions] - The options of the layout. | ||
* | ||
@@ -48,6 +48,6 @@ * @export | ||
export interface ConsoleGuiOptions { | ||
logLocation?: 0 | 1 | "popup"; | ||
logLocation?: 0 | 1 | 2 | 3 | "popup"; | ||
showLogKey?: string; | ||
logPageSize?: number; | ||
layoutOptions?: DoubleLayoutOptions; | ||
layoutOptions?: LayoutOptions; | ||
title?: string; | ||
@@ -79,7 +79,8 @@ } | ||
}; | ||
logLocation: 0 | 1 | "popup"; | ||
logLocation: 0 | 1 | 2 | 3 | "popup"; | ||
logPageSize: number; | ||
logPageTitle: string; | ||
pages: PageBuilder[]; | ||
layoutOptions: DoubleLayoutOptions; | ||
layoutOptions: LayoutOptions; | ||
layout: LayoutManager; | ||
changeLayoutKey: string; | ||
@@ -90,7 +91,18 @@ changeLayoutkeys: string[]; | ||
stdOut: PageBuilder; | ||
layout: DoubleLayout; | ||
constructor(options?: ConsoleGuiOptions | undefined); | ||
/** | ||
* @description This method is used to get the log page size. | ||
* @returns {number} The log page size. | ||
* @memberof ConsoleManager | ||
* @example CM.getLogPageSize() | ||
*/ | ||
getLogPageSize(): number; | ||
setLogPageSize(rows: number): void; | ||
/** | ||
* @description This method is used to set the log page size. | ||
* @param {number} size - The new log page size. | ||
* @returns {void} | ||
* @example CM.setLogPageSize(10) | ||
*/ | ||
setLogPageSize(size: number): void; | ||
/** | ||
* @description This function is used to make the ConsoleManager handle the key events when no widgets are showed. | ||
@@ -140,3 +152,3 @@ * Inside this function are defined all the keys that can be pressed and the actions to do when they are pressed. | ||
* @param {number} [pageNumber] - The page number to set. 0 is the first page, 1 is the second page. | ||
* @param {string} [title] - The title of the page to overwrite the default title. Default is null. | ||
* @param {string | null} [title] - The title of the page to overwrite the default title. Default is null. | ||
* @memberof ConsoleManager | ||
@@ -149,6 +161,7 @@ * @example CM.setPage(p, 0) | ||
* @param {Array<PageBuilder>} pages - The page to set as home page. | ||
* @param {string[] | null} [titles] - The titles of the page to overwrite the default titles. Default is null. | ||
* @memberof ConsoleManager | ||
* @example CM.setPages([p1, p2], 0) | ||
*/ | ||
setPages(pages: Array<PageBuilder>): void; | ||
setPages(pages: Array<PageBuilder>, titles?: string[] | null): void; | ||
/** | ||
@@ -155,0 +168,0 @@ * @description This function is used to refresh the screen. It do the following sequence: Clear the screen, draw layout, draw widgets and finally print the screen to the stdOut. |
import { EventEmitter } from "events"; | ||
import readline from "readline"; | ||
import DoubleLayout from "./components/layout/DoubleLayout.js"; | ||
import PageBuilder from "./components/PageBuilder.js"; | ||
@@ -12,2 +11,3 @@ import Screen from "./components/Screen.js"; | ||
import OptionPopup from "./components/widgets/OptionPopup.js"; | ||
import LayoutManager from "./components/layout/LayoutManager.js"; | ||
/** | ||
@@ -45,4 +45,2 @@ * @class ConsoleManager | ||
this.logPageTitle = "LOGS"; | ||
/** @const {Array<PageBuilder>} homePage - The main application */ | ||
this.pages = [new PageBuilder(), new PageBuilder()]; | ||
this.layoutOptions = { | ||
@@ -54,2 +52,3 @@ showTitle: true, | ||
changeFocusKey: "ctrl+l", | ||
type: "double", | ||
direction: "vertical", | ||
@@ -89,25 +88,41 @@ }; | ||
} | ||
/** @const {Array<PageBuilder>} homePage - The main application */ | ||
switch (this.layoutOptions.type) { | ||
case "single": | ||
this.pages = [new PageBuilder()]; | ||
break; | ||
case "double": | ||
this.pages = [new PageBuilder(), new PageBuilder()]; | ||
break; | ||
case "triple": | ||
this.pages = [new PageBuilder(), new PageBuilder(), new PageBuilder()]; | ||
break; | ||
case "quad": | ||
this.pages = [new PageBuilder(), new PageBuilder(), new PageBuilder(), new PageBuilder()]; | ||
break; | ||
default: | ||
this.pages = [new PageBuilder(), new PageBuilder()]; | ||
break; | ||
} | ||
/** @const {PageBuilder} stdOut - The logs page */ | ||
this.stdOut = new PageBuilder(); | ||
this.stdOut.setRowsPerPage(this.logPageSize); | ||
/** @const {DoubleLayout} layout - The layout instance */ | ||
/** @const {LayoutManager} layout - The layout instance */ | ||
this.layout = new LayoutManager(this.pages, this.layoutOptions); | ||
if (this.logLocation === "popup") { | ||
this.layout = new DoubleLayout(this.pages[0], this.pages[1], this.layoutOptions); | ||
this.setPages(this.pages); | ||
} | ||
else if (typeof this.logLocation === "number") { | ||
if (this.logLocation === 0) { | ||
this.layout = new DoubleLayout(this.stdOut, this.pages[0], this.layoutOptions); | ||
this.layout.page1Title = this.logPageTitle; | ||
this.layout.page2Title = this.applicationTitle; | ||
} | ||
else { | ||
this.layout = new DoubleLayout(this.pages[0], this.stdOut, this.layoutOptions); | ||
this.layout.page1Title = this.applicationTitle; | ||
this.layout.page2Title = this.logPageTitle; | ||
} | ||
this.setPage(this.stdOut, this.logLocation); | ||
this.pages.forEach((page, index) => { | ||
if (index !== this.logLocation) { | ||
this.setPage(page, index); | ||
} | ||
}); | ||
this.layout.setTitle(this.logPageTitle, this.logLocation); | ||
} | ||
else { | ||
this.layout = new DoubleLayout(this.pages[0], this.stdOut, this.layoutOptions); | ||
this.layout.page1Title = this.applicationTitle; | ||
this.layout.page2Title = this.logPageTitle; | ||
this.setPages([...this.pages, this.stdOut]); | ||
this.layout.setTitle(this.applicationTitle, 0); | ||
this.layout.setTitle(this.logPageTitle, 1); | ||
} | ||
@@ -121,7 +136,19 @@ this.addGenericListeners(); | ||
} | ||
/** | ||
* @description This method is used to get the log page size. | ||
* @returns {number} The log page size. | ||
* @memberof ConsoleManager | ||
* @example CM.getLogPageSize() | ||
*/ | ||
getLogPageSize() { | ||
return this.logPageSize; | ||
} | ||
setLogPageSize(rows) { | ||
this.logPageSize = rows; | ||
/** | ||
* @description This method is used to set the log page size. | ||
* @param {number} size - The new log page size. | ||
* @returns {void} | ||
* @example CM.setLogPageSize(10) | ||
*/ | ||
setLogPageSize(size) { | ||
this.logPageSize = size; | ||
} | ||
@@ -168,8 +195,3 @@ /** | ||
if (key.name === "down") { | ||
if (this.layout.getSelected() === 0) { | ||
this.layout.page1.decreaseScrollIndex(); | ||
} | ||
else { | ||
this.layout.page2.decreaseScrollIndex(); | ||
} | ||
this.layout.pages[this.layout.getSelected()].decreaseScrollIndex(); | ||
this.refresh(); | ||
@@ -179,11 +201,18 @@ return; | ||
else if (key.name === "up") { | ||
if (this.layout.getSelected() === 0) { | ||
this.layout.page1.increaseScrollIndex(); | ||
} | ||
else { | ||
this.layout.page2.increaseScrollIndex(); | ||
} | ||
this.layout.pages[this.layout.getSelected()].increaseScrollIndex(); | ||
this.refresh(); | ||
return; | ||
} | ||
if (this.layoutOptions.type !== "single") { | ||
if (key.name === "left") { | ||
this.layout.decreaseRatio(0.01); | ||
this.refresh(); | ||
return; | ||
} | ||
else if (key.name === "right") { | ||
this.layout.increaseRatio(0.01); | ||
this.refresh(); | ||
return; | ||
} | ||
} | ||
this.emit("keypressed", key); | ||
@@ -245,14 +274,14 @@ } | ||
if (this.logLocation === "popup") { | ||
this.layout.setPage1(page); | ||
this.layout.setPage(page, 0); | ||
} | ||
else if (typeof this.logLocation === "number") { | ||
if (this.logLocation === 0) { | ||
this.layout.setPage2(page); | ||
this.layout.setPage(page, 1); | ||
} | ||
else { | ||
this.layout.setPage1(page); | ||
this.layout.setPage(page, 0); | ||
} | ||
} | ||
else { | ||
this.layout.setPage1(page); | ||
this.layout.setPage(page, 1); | ||
} | ||
@@ -265,3 +294,3 @@ this.refresh(); | ||
* @param {number} [pageNumber] - The page number to set. 0 is the first page, 1 is the second page. | ||
* @param {string} [title] - The title of the page to overwrite the default title. Default is null. | ||
* @param {string | null} [title] - The title of the page to overwrite the default title. Default is null. | ||
* @memberof ConsoleManager | ||
@@ -272,38 +301,10 @@ * @example CM.setPage(p, 0) | ||
this.pages[pageNumber] = page; | ||
if (this.logLocation === "popup") { | ||
if (pageNumber === 0) { | ||
this.layout.setPage1(this.pages[pageNumber]); | ||
if (title) | ||
this.layout.page1Title = title; | ||
if (typeof this.logLocation === "number") { | ||
if (this.logLocation === pageNumber) { | ||
this.pages[this.logLocation] = this.stdOut; | ||
} | ||
else { | ||
this.layout.setPage2(this.pages[pageNumber]); | ||
if (title) | ||
this.layout.page2Title = title; | ||
} | ||
} | ||
else if (typeof this.logLocation === "number") { | ||
if (this.logLocation === 0) { | ||
this.layout.setPage2(this.pages[pageNumber]); | ||
if (title) | ||
this.layout.page2Title = title; | ||
} | ||
else { | ||
this.layout.setPage1(this.pages[pageNumber]); | ||
if (title) | ||
this.layout.page1Title = title; | ||
} | ||
} | ||
else { | ||
if (pageNumber === 0) { | ||
this.layout.setPage1(this.pages[pageNumber]); | ||
if (title) | ||
this.layout.page1Title = title; | ||
} | ||
else { | ||
this.layout.setPage2(this.pages[pageNumber]); | ||
if (title) | ||
this.layout.page2Title = title; | ||
} | ||
} | ||
this.layout.setPage(this.pages[pageNumber], pageNumber); | ||
if (title) | ||
this.layout.setTitle(title, pageNumber); | ||
this.refresh(); | ||
@@ -314,23 +315,18 @@ } | ||
* @param {Array<PageBuilder>} pages - The page to set as home page. | ||
* @param {string[] | null} [titles] - The titles of the page to overwrite the default titles. Default is null. | ||
* @memberof ConsoleManager | ||
* @example CM.setPages([p1, p2], 0) | ||
*/ | ||
setPages(pages) { | ||
this.pages = pages; | ||
if (this.logLocation === "popup") { | ||
this.layout.setPage1(this.pages[0]); | ||
this.layout.setPage2(this.pages[1]); | ||
} | ||
else if (typeof this.logLocation === "number") { | ||
if (this.logLocation === 0) { | ||
this.layout.setPage2(this.pages[0]); | ||
setPages(pages, titles = null) { | ||
pages.forEach((page, index) => { | ||
if (typeof this.logLocation === "number" && this.logLocation === index) { | ||
return; | ||
} | ||
else { | ||
this.layout.setPage1(this.pages[0]); | ||
this.pages[index] = page; | ||
} | ||
} | ||
else { | ||
this.layout.setPage1(this.pages[0]); | ||
this.layout.setPage2(this.pages[1]); | ||
} | ||
}); | ||
this.layout.setPages(this.pages); | ||
if (titles) | ||
this.layout.setTitles(titles); | ||
this.refresh(); | ||
@@ -432,2 +428,2 @@ } | ||
export { PageBuilder, ConsoleManager, OptionPopup, InputPopup, ConfirmPopup, ButtonPopup, CustomPopup, FileSelectorPopup }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uc29sZUd1aS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9Db25zb2xlR3VpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxRQUFRLENBQUE7QUFDckMsT0FBTyxRQUFRLE1BQU0sVUFBVSxDQUFBO0FBQy9CLE9BQU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G4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxvZ0xvY2F0aW9uID0gb3B0aW9ucy5sb2dMb2NhdGlvbiA+IDAgPyBvcHRpb25zLmxvZ0xvY2F0aW9uIDogMFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMubG9nTG9jYXRpb24gPT09IFwicG9wdXBcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubG9nTG9jYXRpb24gPSBcInBvcHVwXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNob3dMb2dLZXkgPSBvcHRpb25zLnNob3dMb2dLZXkgfHwgXCJvXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2dMb2NhdGlvbiA9IDFcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5sb2dQYWdlU2l6ZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvZ1BhZ2VTaXplID0gb3B0aW9ucy5sb2dQYWdlU2l6ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMubGF5b3V0T3B0aW9ucyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxheW91dE9wdGlvbnMgPSBvcHRpb25zLmxheW91dE9wdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMubGF5b3V0T3B0aW9ucy5jaGFuZ2VGb2N1c0tleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGFuZ2VMYXlvdXRLZXkgPSBvcHRpb25zLmxheW91dE9wdGlvbnMuY2hhbmdlRm9jdXNLZXlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy50aXRsZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwcGxpY2F0aW9uVGl0bGUgPSBvcHRpb25zLnRpdGxlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvKiogQGNvbnN0IHtQYWdlQnVpbGRlcn0gc3RkT3V0IC0gVGhlIGxvZ3MgcGFnZSAqL1xuICAgICAgICAgICAgdGhpcy5zdGRPdXQgPSBuZXcgUGFnZUJ1aWxkZXIoKVxuICAgICAgICAgICAgdGhpcy5zdGRPdXQuc2V0Um93c1BlclBhZ2UodGhpcy5sb2dQYWdlU2l6ZSlcblxuICAgICAgICAgICAgLyoqIEBjb25zdCB7RG91YmxlTGF5b3V0fSBsYXlvdXQgLSBUaGUgbGF5b3V0IGluc3RhbmNlICovXG4gICAgICAgICAgICBpZiAodGhpcy5sb2dMb2NhdGlvbiA9PT0gXCJwb3B1cFwiKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXlvdXQgPSBuZXcgRG91YmxlTGF5b3V0KHRoaXMucGFnZXNbMF0sIHRoaXMucGFnZXNbMV0sIHRoaXMubGF5b3V0T3B0aW9ucylcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHRoaXMubG9nTG9jYXRpb24gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5sb2dMb2NhdGlvbiA9PT0gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxheW91dCA9IG5ldyBEb3VibGVMYXlvdXQodGhpcy5zdGRPdXQsIHRoaXMucGFnZXNbMF0sIHRoaXMubGF5b3V0T3B0aW9ucylcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXlvdXQucGFnZTFUaXRsZSA9IHRoaXMubG9nUGFnZVRpdGxlXG4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2V5LmN0cmwgJiYga2V5Lm5hbWUgPT09IHRoaXMuY2hhbmdlTGF5b3V0a2V5c1sxXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZSA9IHRydWVcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY2hhbmdlTGF5b3V0a2V5c1swXSA9PSBcIm1ldGFcIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5LmFsdCAmJiBrZXkubmFtZSA9PT0gdGhpcy5jaGFuZ2VMYXlvdXRrZXlzWzFdKVxuICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlID0gdHJ1ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodGhpcy5jaGFuZ2VMYXlvdXRrZXlzWzBdID09IFwic2hpZnRcIikge1xuICAgICAgICAgICAgICAgICAgICBpZiAoa2V5LnNoaWZ0ICYmIGtleS5uYW1lID09PSB0aGlzLmNoYW5nZUxheW91dGtleXNbMV0pXG4gICAgICAgICAgICAgICAgICAgICAgICBjaGFuZ2UgPSB0cnVlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoa2V5Lm5hbWUgPT09IHRoaXMuY2hhbmdlTGF5b3V0a2V5c1swXSlcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlID0gdHJ1ZVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodGhpcy5zaG93TG9nS2V5ICYmIGtleS5uYW1lID09PSB0aGlzLnNob3dMb2dLZXkpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnNob3dMb2dQb3B1cCgpXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChjaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxheW91dC5jaGFuZ2VMYXlvdXQoKVxuICAgICAgICAgICAgICAgIHRoaXMucmVmcmVzaCgpXG4gICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChrZXkuY3RybCAmJiBrZXkubmFtZSA9PT0gXCJjXCIpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmVtaXQoXCJleGl0XCIpXG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyh0aGlzLndpZGdldHNDb2xsZWN0aW9uKS5sZW5ndGggPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGtleS5uYW1lID09PSBcImRvd25cIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubGF5b3V0LmdldFNlbGVjdGVkKCkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxheW91dC5wYWdlMS5kZWNyZWFzZVNjcm9sbEluZGV4KClcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXlvdXQucGFnZTIuZGVjcmVhc2VTY3JvbGxJbmRleCgpXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlZnJlc2goKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoa2V5Lm5hbWUgPT09IFwidXBcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRoaXMubGF5b3V0LmdldFNlbGVjdGVkKCkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxheW91dC5wYWdlMS5pbmNyZWFzZVNjcm9sbEluZGV4KClcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sYXlvdXQucGFnZTIuaW5jcmVhc2VTY3JvbGxJbmRleCgpXG4g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sZSkgdGhpcy5sYXlvdXQucGFnZTJUaXRsZSA9IHRpdGxlXG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSBpZiAodHlwZW9mIHRoaXMubG9nTG9jYXRpb24gPT09IFwibnVtYmVyXCIpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLmxvZ0xvY2F0aW9uID09PSAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXlvdXQuc2V0UGFnZTIodGhpcy5wYWdlc1twYWdlTnVtYmVyXSlcbiAgICAgICAgICAgICAgICBpZiAodGl0bGUpIHRoaXMubGF5b3V0LnBhZ2UyVGl0bGUgPSB0aXRsZVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLmxheW91dC5zZXRQYWdlMSh0aGlzLnBhZ2VzW3BhZ2VOdW1iZXJdKVxuICAgICAgICAgICAgICAgIGlmICh0aXRsZSkgdGhpcy5sYXlvdXQucGFnZTFUaXRsZSA9IHRpdGxlXG4gICAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBpZiAocGFnZU51bWJlciA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHRoaXMubGF5b3V0LnNldFBhZ2UxKHRoaXMucGFnZXNbcGFnZU51bWJlcl0pXG4gICAgICAgICAgICAgICAgaWYgKHRpdGxlKSB0aGlzLmxheW91dC5wYWdlMVRpdGxlID0gdGl0bGVcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXlvdXQuc2V0UGFnZTIodGhpcy5wYWdlc1twYWdlTnVtYmVyXSlcbiAgICAgICAgICAgICAgICBpZiAodGl0bGUpIHRoaXMubGF5b3V0LnBhZ2UyVGl0bGUgPSB0aXRsZVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIHRoaXMucmVmcmVzaCgpXG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogQGRlc2NyaXB0aW9uIFRoaXMgZn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VNYW5hZ2VyLmluc3RhbmNlID0gdGhpc1xuXG4gICAgICAgICAgICAvKiogQGNvbnN0IHtTY3JlZW59IFNjcmVlbiAtIFRoZSBzY3JlZW4gaW5zdGFuY2UgKi9cbiAgICAgICAgICAgIHRoaXMuU2NyZWVuID0gbmV3IFNjcmVlbih0aGlzLlRlcm1pbmFsKVxuICAgICAgICAgICAgdGhpcy5TY3JlZW4ub24oXCJlcnJvclwiLCAoZXJyKSA9PiB7XG4gICAgICAgICAgICAgICAgdGhpcy5lcnJvcihlcnIpXG4gICAgICAgICAgICB9KVxuXG4gICAgICAgICAgICB0aGlzLndpZGdldHNDb2xsZWN0aW9uID0gW11cbiAgICAgICAgICAgIHRoaXMuZXZlbnRMaXN0ZW5lcnNDb250YWluZXIgPSB7fVxuXG4gICAgICAgICAgICAvKiogQGNvbnN0IHtudW1iZXIgfCAncG9wdXAnfSBsb2dMb2NhdGlvbiAtIENob29zZSB3aGVyZSB0aGUgbG9ncyBhcmUgZGlzcGxheWVkOiBudW1iZXIgKDAsMSkgLSB0byBwb3QgdGhlbSBvbiBvbmUgb2YgdGhlIHR3byBsYXlvdXRzLCBzdHJpbmcgKFwicG9wdXBcIikgLSB0byBwdXQgdGhlbSBvbiBhIEN1c3RvbVBvcHVwIHRoYXQgY2FuIGJlIGRpc3BsYXllZCBvbiB0aGUgd2luZG93LiAqL1xuICAgICAgICAgICAgdGhpcy5sb2dMb2NhdGlvbiA9IDFcbiAgICAgICAgICAgIHRoaXMubG9nUGFnZVNpemUgPSAxMFxuICAgICAgICAgICAgdGhpcy5sb2dQYWdlVGl0bGUgPSBcIkxPR1NcIlxuICAgICAgICAgICAgXG4gICAgICAgICAgICB0aGlzLmxheW91dE9wdGlvbnMgPSB7XG4gICAgICAgICAgICAgICAgc2hvd1RpdGxlOiB0cnVlLFxuICAgICAgICAgICAgICAgIGJveGVkOiB0cnVlLFxuICAgICAgICAgICAgICAgIGJveENvbG9yOiBcImN5YW5cIixcbiAgICAgICAgICAgICAgICBib3hTdHlsZTogXCJib2xkXCIsXG4gICAgICAgICAgICAgICAgY2hhbmdlRm9jdXNLZXk6IFwiY3RybCtsXCIsXG4gICAgICAgICAgICAgICAgdHlwZTogXCJkb3VibGVcIixcbiAgICAgICAgICAgICAgICBkaXJlY3Rpb246IFwidmVydGljYWxcIixcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIFxuICAgICAgICAgICAgLyoqIEBjb25zdCB7c3RyaW5nfSBjaGFuZ2VMYXlvdXRLZXkgLSBUaGUga2V5IG9yIGNvbWJpbmF0aW9uIHRvIHN3aXRjaCB0aGUgc2VsZWN0ZWQgcGFnZSAqL1xuICAgICAgICAgICAgdGhpcy5jaGFuZ2VMYXlvdXRLZXkgPSB0aGlzLmxheW91dE9wdGlvbnMuY2hhbmdlRm9jdXNLZXlcbiAgICAgICAgICAgIHRoaXMuY2hhbmdlTGF5b3V0a2V5cyA9IHRoaXMuY2hhbmdlTGF5b3V0S2V5LnNwbGl0KFwiK1wiKVxuICAgICAgICAgICAgdGhpcy5hcHBsaWNhdGlvblRpdGxlID0gXCJcIlxuICAgICAgICAgICAgXG4gICAgICAgICAgICBpZiAob3B0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmIChvcHRpb25zLmxvZ0xvY2F0aW9uICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLmxvZ0xvY2F0aW9uID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzLmxvZ0xvY2F0aW9uID0gb3B0aW9ucy5sb2dMb2NhdGlvbiA+IDAgPyBvcHRpb25zLmxvZ0xvY2F0aW9uIDogMFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMubG9nTG9jYXRpb24gPT09IFwicG9wdXBcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubG9nTG9jYXRpb24gPSBcInBvcHVwXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNob3dMb2dLZXkgPSBvcHRpb25zLnNob3dMb2dLZXkgfHwgXCJvXCJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5sb2dMb2NhdGlvbiA9IDFcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy5sb2dQYWdlU2l6ZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxvZ1BhZ2VTaXplID0gb3B0aW9ucy5sb2dQYWdlU2l6ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMubGF5b3V0T3B0aW9ucyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmxheW91dE9wdGlvbnMgPSBvcHRpb25zLmxheW91dE9wdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9wdGlvbnMubGF5b3V0T3B0aW9ucy5jaGFuZ2VGb2N1c0tleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jaGFuZ2VMYXlvdXRLZXkgPSBvcHRpb25zLmxheW91dE9wdGlvbnMuY2hhbmdlRm9jdXNLZXlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAob3B0aW9ucy50aXRsZSkge1xuICAgICAgICAgICAgICAgICAgICB0aGlzLmFwcGxpY2F0aW9uVGl0bGUgPSBvcHRpb25zLnRpdGxlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgXG4gICAgICAgICAgICAvKiogQGNvbnN0IHtBcnJheTxQYWdlQ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ICBjaGFuZ2UgPSB0cnVlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmNoYW5nZUxheW91dGtleXNbMF0gPT0gXCJtZXRhXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGtleS5hbHQgJiYga2V5Lm5hbWUgPT09IHRoaXMuY2hhbmdlTGF5b3V0a2V5c1sxXSlcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZSA9IHRydWVcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuY2hhbmdlTGF5b3V0a2V5c1swXSA9PSBcInNoaWZ0XCIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGtleS5zaGlmdCAmJiBrZXkubmFtZSA9PT0gdGhpcy5jaGFuZ2VMYXlvdXRrZXlzWzFdKVxuICAgICAgICAgICAgICAgICAgICAgICAgY2hhbmdlID0gdHJ1ZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgaWYgKGtleS5uYW1lID09PSB0aGlzLmNoYW5nZUxheW91dGtleXNbMF0pXG4gICAgICAgICAgICAgICAgICAgIGNoYW5nZSA9IHRydWVcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKHRoaXMuc2hvd0xvZ0tleSAmJiBrZXkubmFtZSA9PT0gdGhpcy5zaG93TG9nS2V5KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5zaG93TG9nUG9wdXAoKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoY2hhbmdlKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5sYXlvdXQuY2hhbmdlTGF5b3V0KClcbiAgICAgICAgICAgICAgICB0aGlzLnJlZnJlc2goKVxuICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoa2V5LmN0cmwgJiYga2V5Lm5hbWUgPT09IFwiY1wiKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5lbWl0KFwiZXhpdFwiKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LmtleXModGhpcy53aWRnZXRzQ29sbGVjdGlvbikubGVuZ3RoID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChrZXkubmFtZSA9PT0gXCJkb3duXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGF5b3V0LnBhZ2VzW3RoaXMubGF5b3V0LmdldFNlbGVjdGVkKCldLmRlY3JlYXNlU2Nyb2xsSW5kZXgoKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWZyZXNoKClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGtleS5uYW1lID09PSBcInVwXCIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGF5b3V0LnBhZ2VzW3RoaXMubGF5b3V0LmdldFNlbGVjdGVkKCldLmluY3JlYXNlU2Nyb2xsSW5kZXgoKVxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5yZWZyZXNoKClcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLmxheW91dE9wdGlvbnMudHlwZSAhPT0gXCJzaW5nbGVcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGtleS5uYW1lID09PSBcImxlZnRcIikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMubGF5b3V0LmRlY3JlYXNlUmF0aW8oMC4wMSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnJlZnJlc2goKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVyblxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmI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FyeSA/XG4gICAgICAgICAgICBzdWJTdHJpbmcuc3Vic3RyaW5nKDAsIHN1YlN0cmluZy5sYXN0SW5kZXhPZihcIiBcIikpIDpcbiAgICAgICAgICAgIHN1YlN0cmluZykgKyBcIuKAplwiXG4gICAgfVxufVxuXG5leHBvcnQge1xuICAgIFBhZ2VCdWlsZGVyLFxuICAgIENvbnNvbGVNYW5hZ2VyLFxuICAgIE9wdGlvblBvcHVwLFxuICAgIElucHV0UG9wdXAsXG4gICAgQ29uZmlybVBvcHVwLFxuICAgIEJ1dHRvblBvcHVwLFxuICAgIEN1c3RvbVBvcHVwLFxuICAgIEZpbGVTZWxlY3RvclBvcHVwXG59Il19 |
{ | ||
"name": "console-gui-tools", | ||
"version": "1.1.30", | ||
"version": "1.1.31", | ||
"description": "A simple library to draw option menu, text popup or other widgets and layout on a Node.js console.", | ||
@@ -17,3 +17,3 @@ "main": "dist/ConsoleGui.js", | ||
"test": "npm run build && node ./examples/tcp_simulator.mjs", | ||
"start": "npm run build && node ./dist/ConsoqleGui.js", | ||
"start": "npm run build && node ./dist/ConsoleGui.js", | ||
"docs": "node ./docgen.cjs" | ||
@@ -35,3 +35,10 @@ }, | ||
"ncurses", | ||
"tui" | ||
"tui", | ||
"terminal", | ||
"command-line", | ||
"logs", | ||
"terminal-graphics", | ||
"consoleapp", | ||
"terminal-colors", | ||
"terminal-ui" | ||
], | ||
@@ -38,0 +45,0 @@ "author": "Elia Lazzari", |
@@ -1,7 +0,4 @@ | ||
# console-gui-tools | ||
A simple library to draw option menu, text popup or other widgets and layout on a Node.js console. | ||
# console-gui-tools | ||
[](https://npmjs.com/package/console-gui-tools) [](https://npmjs.com/package/console-gui-tools)  | ||
# console-gui-tools | ||
A simple Node.js library to create Console Apps like a wizard (or maybe if you like old style colored screen or something like "teletext" programs 😂) | ||
@@ -59,3 +56,4 @@ Apart from jokes, it is a library that allows you to create a screen divided into a part with everything you want to see (such as variable values) and another in which the logs run. | ||
changeFocusKey: 'ctrl+l', // The key or the combination that will change the focus between the two layouts | ||
direction: 'vertical', // Set to 'horizontal' to enable horizontal layout | ||
type: "double", // Can be "single", "double" or "quad" to choose the layout type | ||
direction: 'vertical', // Set to 'horizontal' to enable horizontal layout (only for "double" layout) | ||
boxColor: 'yellow', // The color of the box | ||
@@ -185,10 +183,7 @@ boxStyle: 'bold', // The style of the box (bold) | ||
### NEW DRAWING ALGORYTM | ||
### New drawing algorytm | ||
 | ||
All the page is prerendered before printing on the console to prevent noisy flickering. | ||
Introduced new styling design pattern: | ||
Each page need to be created with the new class | ||
@@ -264,4 +259,57 @@ ```js | ||
The new Screen class is used internally by the ConsoleManager. | ||
## Layout | ||
The application instance needs to output the content through a layout class. | ||
In the "layoutOptions" provided to the ConsoleManager, we can set the layout: | ||
<details><summary>boxed: Set to true to enable boxed layout mode (default: true)</summary> | ||
| boxed: true | boxed: false | | ||
| ----------- | ------------ | | ||
|  |  | | ||
</details> | ||
- showTitle: Set to false to hide titles (default: true, on title per page) | ||
- changeFocusKey: The key or the combination that will change the focus between the pages of the layout (default: 'ctrl+l') | ||
<details><summary>type: Can be "single", "double" or "quad" to choose the layout type (default: "double")</summary> | ||
| type: "single" | type: "double" | type: "quad" | | ||
| -------------- | -------------- | ------------ | | ||
|  |  |  | | ||
</details> | ||
- direction: Set to 'horizontal' to enable horizontal layout (only for "double" layout) | ||
- boxColor: The color of the box (default: 'yellow') | ||
- boxStyle: The style of the box (default: 'bold') | ||
To draw multiple pages, we need to use the setPage or setPages methods: | ||
```js | ||
GUI.setPage(p, 0) // Add the first page without explicit name (default: application title) | ||
const p1 = new PageBuilder() | ||
p1.addRow({ text: "SECOND PAGE", color: "green" }) | ||
const P2 = new PageBuilder() | ||
P2.addRow({ text: "THIRD PAGE", color: "cyan" }) | ||
GUI.setPage(p1, 1, "Top Right") | ||
GUI.setPage(P2, 2, "Bottom Left") | ||
// Or if we want to add the pages in the same order (only one render): | ||
GUI.setPages([p, p1, P2], ["App Title", "Top Right", "Bottom Left"]) | ||
``` | ||
<details><summary>Changing the layout aspect ratio</summary> | ||
If we are in quad layout mode or double horizontal layout, we can change the aspect ratio of the layout rows by pressing the "left" and "right" keys: | ||
 | ||
> If you are using the quad layout mode the arrow keys will change the aspect ratio of the layout selected row (the top or the bottom row, depending on the selected page) | ||
</details> | ||
# Widgets | ||
## To create an option popup (select) | ||
@@ -434,2 +482,3 @@ ```js | ||
Colors and styles are managed using [Chalk](https://github.com/chalk/chalk) | ||
 | ||
@@ -436,0 +485,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
601649
34.74%42
27.27%4835
33.64%487
11.19%