text.js

"use strict";
/***************************************************
* Licensed Materials - Property of HCL.
* (c)Copyright HCL America, Inc. 2023-2024
****************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
exports.middleBack = exports.middle = exports.matches = exports.lowerCase = exports.like = exports.length = exports.leftBack = exports.isTime = exports.fileDir = exports.ends = exports.contains = exports.compare = exports.begins = exports.ascii = exports.abstractSimple = exports.abstract = exports.value = exports.upper = exports.unicode = exports.unichar = exports.t = exports.substitute = exports.search = exports.rept = exports.replace = exports.proper = exports.pronetic = exports.numberValue = exports.mid = exports.lower = exports.len = exports.textJoin = exports.fixed = exports.find = exports.exact = exports.dollar = exports.dbcs = exports.concat = exports.concatenate = exports.code = exports.clean = exports.bahtText = exports.asc = exports.trim = exports.text = exports.right = exports.left = exports.char = exports._notes = exports._openFormula = void 0;
exports.textUnderline = exports.textSpacingSingle = exports.textSpacingOneAndAHalf = exports.textSpacingDouble = exports.textSetFontSize = exports.textSetFontFace = exports.textSetFontColor = exports.textReduceFont = exports.textPermanentPen = exports.textParagraphStyles = exports.textParagraph = exports.textOutdent = exports.textNumbers = exports.textNormal = exports.textItalic = exports.textFont = exports.textEnlargeFont = exports.textCycleSpacing = exports.textBullet = exports.textBold = exports.textAlignRight = exports.textAlignNone = exports.textAlignLeft = exports.textAlignFull = exports.textAlignCenter = exports.word = exports.wide = exports.upperCase = exports.toTime = exports.toNumber = exports.textToNumber = exports.rightBack = exports.replaceSubstring = exports.repeat = exports.properCase = exports.newLine = exports.narrow = void 0;
const tslib_1 = require("tslib");
/**
 * @file Text & Strings
 * @module text
 * @category Text
 */
const openf = tslib_1.__importStar(require("../openformula/text"));
exports._openFormula = openf;
const notesf = tslib_1.__importStar(require("../notes/text"));
const notesc = notesf; // notes commands are exposed in the notes functions source file; this notesc is just for visual cue
exports._notes = notesf;
const API = tslib_1.__importStar(require("../rosetta/API"));
const common_1 = require("../utils/common");
const error = tslib_1.__importStar(require("../utils/error"));
const utils = tslib_1.__importStar(require("../utils/common"));
//-----------------------------
// Rosetta text - common functions (exist in both OpenFormula and Notes Formula)
/**
 * Converts IBM Code Page 850 code number into the corresponding single character string.
 * @param {NumberOrNumberList} number Any number between 0 and 255. Non-integer numbers are truncated
 * to integers.If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.
 * @returns {TextOrTextList} A single character that corresponds to codeNumber.
 * and {@link https://docs.oasis-open.org/office/OpenDocument/v1.3/cs02/part4-formula/OpenDocument-v1.3-cs02-part4-formula.html#CHAR | docs.oasis-open.org}
 * @example rosettajs.Text.char(65);   // returns "A"
 * @example rosettajs.Text.char(237);  // returns "Ý"
 * @example rosettajs.Text.char(253);  // returns "²"
 * @example rosettajs.Text.char([65, 157, 'invalid', 169]);  // returns ["A", "Ø", error.value, "®"];
 */
function char(number) {
    if (API.isCurrentAPIOpenFormula()) {
        if (Array.isArray(number))
            return error.value;
        if (number instanceof Error)
            return number;
        return openf.CHAR(number);
    }
    else {
        return notesf.Char(number);
    }
}
exports.char = char;
/**
 * Searches a string from left to right and returns the leftmost characters of the string.
 * @param {TextOrTextList} text The string where you want to find the leftmost characters.
 * @param {number|string} param
 * -   Number: The number of characters to return. If the number is 2, the first two
 *     characters of the string are returned; if the number is 5, the first five
 *     characters are returned, and so on. If the number is negative, the entire string
 *     is returned. If using Open Formula implementation, _param_ must be a number and is optional with a default of 1.
 * -   String: A substring of stringToSearch. Left returns the characters to the left
 *     of subString. It finds subString by searching stringToSearch from left to right.
 *     A string is only valid for the Notes formula implementation and _param_ is required.
 * @returns {TextOrTextList} The leftmost characters in stringToSearch. The number of characters returned is determined
 * by either numberOfChars or subString. Left returns "" if subString is not found in stringToSearch.
 * and {@link https://docs.oasis-open.org/office/OpenDocument/v1.3/cs02/part4-formula/OpenDocument-v1.3-cs02-part4-formula.html#LEFT | docs.oasis-open.org}
 * @example rosettajs.left('Sale Price', 4); // returns 'Sale'
 * @example rosettajs.left('Sweden', 'en'); // returns 'Swed'
 * @example rosettajs.left(['Sweden', 'England'], 2); // returns ['Sw', 'En']
 */
function left(text, param) {
    var _a;
    if (!utils.isDefined(text)) {
        return error.value;
    }
    if (utils.anyIsError(text, param)) {
        return (_a = utils.anyError(text, param)) !== null && _a !== void 0 ? _a : error.value;
    }
    if (API.isCurrentAPIOpenFormula()) {
        if (utils.isDefined(param) && typeof param !== 'number') {
            return error.value;
        }
        let list = [];
        let txt = Array.isArray(text) ? text : [text];
        list = txt.map(txt => openf.LEFT(txt, param));
        return list.length === 1 ? list[0] : list;
    }
    else {
        if (param === undefined) {
            return error.value;
        }
        return notesf.Left(text, param);
    }
}
exports.left = left;
/**
 * Returns the rightmost characters in the string. You can specify the number of
 * rightmost characters you want returned, or you can indicate that you want all
 * the characters following a specific substring.
 * @param {TextOrTextList} text The string whose rightmost characters you want to find.
 * @param {number|string} param
 * -   Number: The number of characters to return. If the number is 2, the first two
 *     characters of the string are returned; if the number is 5, the first five
 *     characters are returned, and so on. If the number is negative, the entire string
 *     is returned. If using Open Formula implementation, _param_ must be a number and is optional with a default of 1.
 * -   String: A substring of stringToSearch. Left returns the characters to the left
 *     of subString. It finds subString by searching stringToSearch from left to right.
 *     A string is only valid for the Notes formula implementation and _param_ is required.
 * @returns {TextOrTextList} The rightmost characters in stringToSearch. The number of characters returned is determined by _param_.
 * Right returns "" if subString is not found in stringToSearch.
 *     and {@link https://docs.oasis-open.org/office/OpenDocument/v1.3/cs02/part4-formula/OpenDocument-v1.3-cs02-part4-formula.html#RIGHT | docs.oasis-open.org}
 * @example rosettajs.right('Sale Price', 5); // returns 'Price'
 * @example rosettajs.right('Lennard Wallace', " "); // returns 'Wallace'
 * @example rosettajs.right(['Lennard', 'Wallace'], 3); // returns ['ard', 'ace']
 */
function right(text, param) {
    var _a;
    if (!utils.isDefined(text)) {
        return error.value;
    }
    if (utils.anyIsError(text, param)) {
        return (_a = utils.anyError(text, param)) !== null && _a !== void 0 ? _a : error.value;
    }
    if (API.isCurrentAPIOpenFormula()) {
        if (utils.isDefined(param) && typeof param !== 'number') {
            return error.value;
        }
        let list = [];
        let txt = Array.isArray(text) ? text : [text];
        list = txt.map(txt => openf.RIGHT(txt, param));
        return list.length === 1 ? list[0] : list;
    }
    else {
        if (param === undefined) {
            return error.value;
        }
        return notesf.Right(text, param);
    }
}
exports.right = right;
/**
 * Converts any value to a text string.
 * @param {*} value Any value you want to convert to text.
 * @param {TextOrTextList} format format strings used to determine how the text is returned. For Open Formula, the format is required and only the first format string is used.
 *
 * For Notes, the format is optional and can be up to four format strings. These determine how the text is returned.
 * If _value_ is already a string, _format_ is ignored. This parameter is currently not implemented for Notes Formula.
 * @returns {TextOrTextList} The _value_ you specified, converted to text. If you used any format-strings, they are applied.
 *     and {@link https://docs.oasis-open.org/office/OpenDocument/v1.3/cs02/part4-formula/OpenDocument-v1.3-cs02-part4-formula.html#TEXT | docs.oasis-open.org}
 * @example
 * rosettajs.Text.text(123.45); // Returns "123.45" if using Notes Formula implementation
 * @example
 * rosettajs.Text.text(0.285,"0.0%"); // Returns "28.5" if using Open Formula implementation
 *
 */
function text(value, format) {
    if (API.isCurrentAPIOpenFormula() && Array.isArray(format)) {
        format = format[0]; // Only one format supported
    }
    if (API.isCurrentAPIOpenFormula()) {
        const valueArray = Array.isArray(value) ? value : [value];
        const list = valueArray.map((txt) => openf.TEXT(txt, format));
        return list.length === 1 ? list[0] : list;
    }
    else {
        return notesf.Text(value, format);
    }
}
exports.text = text;
/**
 * Removes leading, trailing, and redundant spaces from a text string, or from each
 * element of a text list.
 * @param {TextOrTextList} text The text to trim.
 * @returns {TextOrTextList} The string, with extra spaces removed.
 *     and {@link https://docs.oasis-open.org/office/OpenDocument/v1.3/cs02/part4-formula/OpenDocument-v1.3-cs02-part4-formula.html#TRIM | docs.oasis-open.org}
 * @example rosettajs.trim(' more  spaces '); // returns 'more spaces'
 * @example rosettajs.trim(' more  spaces ','  less spaces  '); // returns ['more spaces', 'less spaces']
 */
function trim(text) {
    const txtList = Array.isArray(text) ? text : [text];
    const list = txtList.map(txt => API.isCurrentAPIOpenFormula() ? openf.TRIM(txt) : notesf.Trim(txt));
    return list.length === 1 ? list[0] : list;
}
exports.trim = trim;
//-----------------------------
// Open Formula text
/**
 * Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters.
 *
 * @param {*} text The text or a reference to a value that contains the text you want to change. If text does not contain any full-width letters, text is not changed.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function asc() {
    return openf.ASC();
}
exports.asc = asc;
/**
 * Converts a number to text, using the ß (baht) currency format.
 *
 * @param {number} number A number you want to convert to text, or a reference to a value containing a number, or a formula that evaluates to a number.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function bahtText() {
    return openf.BAHTTEXT();
}
exports.bahtText = bahtText;
/**
 * Removes all non-printable characters from text.
 *
 * @param {string} text Any worksheet information from which you want to remove nonprintable characters.
 * @returns {string} The text without the non-printable characters.
 * @example
 * rosettajs.Text.clean(`${rosettajs.Text.char(9)}Monthly report${rosettajs.Text.char(10)}`); // Removes the nonprintable characters CHAR(9) and CHAR(10) from the text string
 */
function clean(text) {
    return openf.CLEAN(text);
}
exports.clean = clean;
/**
 * Returns a numeric code for the first character in a text string.
 *
 * @param {string} text The text for which you want the code of the first character.
 * @returns {number} The character code for the first character in text.
 * @example
 * rosettajs.Text.code("A"); // Return 65
 */
function code(text) {
    return openf.CODE(text);
}
exports.code = code;
/**
 * Joins several text items into one text item.
 *
 * @param {string[]} items The items to join.
 * @returns {string} The concatenated string.
 * @example rosettajs.Text.concatenate("Tokyo", ", ", "Japan"); // Returns "Tokyo, Japan"
 */
function concatenate(...items) {
    return openf.CONCATENATE(...items);
}
exports.concatenate = concatenate;
/**
 * Joins several text items into one text item.
 *
 * @param {string[]} items The items to join.
 * @returns {string} The concatenated string.
 * @example rosettajs.Text.concat("The"," ","sun"," ","will"," ","come"," ","up"," ","tomorrow."); // Returns "The sun will come up tomorrow."
 */
function concat(...items) {
    return openf.CONCAT(...items);
}
exports.concat = concat;
function dbcs() {
    return openf.DBCS();
}
exports.dbcs = dbcs;
/**
 * Converts a number to text, using the $ (dollar) currency format.
 *
 * @param {number} number A number, a reference to a value containing a number, or a formula that evaluates to a number.
 * @param {number} [decimals] Optional. The number of digits to the right of the decimal point. If this is negative, the number is rounded to the left of the decimal point. If you omit decimals, it is assumed to be 2.
 * @returns {string} Text using currency format, with the decimals rounded to the number of places you specify.
 * @example
 * rosettajs.Text.dollar(1234.567); // Returns "$1,234.57"
 */
function dollar(number, decimals) {
    return openf.DOLLAR(number, decimals);
}
exports.dollar = dollar;
/**
 * Checks to see if two text values are identical.
 *
 * @param {string} text1 The first text string.
 * @param {string} text2 The second text string.
 * @returns True if the two values are identical. False if they are not identical.
 * @example
 * rosettajs.Text.exact("A","A"); // Returns true
 * @example
 * rosettajs.Text.exact("A","a"); // Returns false
 * @example
 * rosettajs.Text.exact("1",1); // Returns true
 */
function exact(text1, text2) {
    if (arguments.length !== 2) {
        return error.na;
    }
    return openf.EXACT(text1, text2);
}
exports.exact = exact;
/**
 * Locate one text string within a second text string, and return the number of the starting position of the first text string from the first character of the second text string.
 *
 * @param {string} find_text The text you want to find.
 * @param {string} within_text The text containing the text you want to find.
 * @param {number} [start_num] Specifies the character at which to start the search. The first character in within_text is character number 1. If you omit start_num, it is assumed to be 1.
 * @returns {number|Error} The number of the starting position or an error if the string was not found.
 * @example rosetta.Text.find("b","abcabc"); // Returns 2
 * @example rosetta.Text.find("b","abcabcabc",3); // Returns 5
 */
function find(find_text, within_text, start_num = 0) {
    if (arguments.length < 2) {
        return error.na;
    }
    return openf.FIND(find_text, within_text, start_num);
}
exports.find = find;
/**
 * Formats a number as text with a fixed number of decimals.
 *
 * @param {number} number The number you want to round and convert to text.
 * @param {number} decimals Optional. The number of digits to the right of the decimal point.
 * @param {boolean} no_commas Optional. A logical value that, if TRUE, prevents FIXED from including commas in the returned text.
 * @returns {string} The string representation of the number
 * @example
 * rosettajs.Text.fixed(1234.567, 1); // Returns "1234.6"
 * @example
 * rosettajs.Text.fixed(-1234.567, -1, true); // Returns "-1230"
 */
function fixed(number, decimals = 2, no_commas = false) {
    return openf.FIXED(number, decimals, no_commas);
}
exports.fixed = fixed;
/**
 * Combines the text from multiple ranges and/or strings.
 * @param {*} delimiter A text string, either empty, or one or more characters enclosed by double quotes, or a reference to a valid text string. If a number is supplied, it will be treated as text.
 * @param {boolean} ignore_empty If TRUE, ignores empty values.
 * @param {string[]} args Text item to be joined. A text string, or array of strings, such as a range of values.
 * @returns {string} The string containing the joined text.
 * @example
 * rosettajs.Text.textJoin(" ",TRUE, "The", "sun", "will", "come", "up", "tomorrow."); // Returns "The sun will come up tomorrow."
 */
function textJoin(delimiter, ignore_empty, ...args) {
    return openf.TEXTJOIN(delimiter, ignore_empty, ...args);
}
exports.textJoin = textJoin;
/**
 * Returns the number of characters in a text string
 *
 * @param {string} text The text whose length you want to find. Spaces count as characters.
 * @returns {number} The number of characters in text.
 * @example
 * rosetta.Text.len("Hi There"); // Returns 8
 * @example
 * rosetta.Text.len(""); // Returns 0
 * @example
 * rosetta.Text.len(55); // Returns 2. Number are automatically converted to strings.
 */
function len(text) {
    if (arguments.length === 0) {
        return error.error;
    }
    return openf.LEN(text);
}
exports.len = len;
/**
 * Converts text to lowercase.
 *
 * @param {string} text The text you want to convert to lowercase. LOWER does not change characters in text that are not letters.
 * @returns {string} The lower case text.
 * @example
 * rosetta.Text.lower("HELLObc7"); // Returns "hellobc7"
 */
function lower(text) {
    if (arguments.length === 0) {
        return error.value;
    }
    return openf.LOWER(text);
}
exports.lower = lower;
/**
 * Returns a specific number of characters from a text string starting at the position you specify
 *
 * @param {string} text The text string containing the characters you want to extract.
 * @param {number} start_num The position of the first character you want to extract in text. The first character in text has start_num 1, and so on.
 * @param {number} num_chars Specifies the number of characters you want MID to return from text.
 * @returns {string} The text from the starting position.
 * @example
 * rosettajs.Text.mid("123456789",5,3); // Returns "567"
 * @example
 * rosettajs.Text.mid("123456789",20,3); // Returns "". If Start is beyond string, return empty string.
 */
function mid(text, start_num, num_chars) {
    return openf.MID(text, start_num, num_chars);
}
exports.mid = mid;
/**
 * Converts text to number in a locale-independent manner.
 *
 * @param {string} text The text to convert to a number.
 * @param {string} [decimal_separator="."] Optional. The character used to separate the integer and fractional part of the result.
 * @param {string} [group_separator=","] Optional. The character used to separate groupings of numbers, such as thousands from hundreds and millions from thousands.
 * @returns {number} The number represented by the text.
 * @example
 * rosettajs.Text.numberValue("2.500,27",",","."); // Returns 2,500.27
 */
function numberValue(text, decimal_separator, group_separator) {
    return openf.NUMBERVALUE(text, decimal_separator, group_separator);
}
exports.numberValue = numberValue;
function pronetic() {
    return openf.PRONETIC();
}
exports.pronetic = pronetic;
/**
 * Capitalizes the first letter in each word of a text value.
 *
 * @param {string} text Text enclosed in quotation marks, a formula that returns text, or a reference to a value containing the text you want to partially capitalize.
 * @returns {string} The text with all words starting with a capital letter.
 * @example
 * rosettajs.Text.proper("hello there"); // Returns "Hello There"
 * @example
 * rosettajs.Text.proper("HELLO.THERE"); // Returns "Hello.There". Words are separated by spaces, punctuation, etc.
 */
function proper(text) {
    return openf.PROPER(text);
}
exports.proper = proper;
/**
 * Replaces characters within text
 *
 * @param {string} old_text Text in which you want to replace some characters.
 * @param {number} start The starting character position in old_text that you want REPLACE to replace with new_text.
 * @param {number} length The number of characters in old_text that you want REPLACEB to replace with new_text.
 * @param {string} new_text The text that will replace characters in old_text.
 * @returns {string} The text with the characters replaced.
 * @example
 * rosettajs.Text.replace("123456789",5,3,"Q"); // Returns "1234Q89"
 */
function replace(old_text, start, length, new_text) {
    return openf.REPLACE(old_text, start, length, new_text);
}
exports.replace = replace;
/**
 * Repeats text a given number of times.
 *
 * @param {string} text The text you want to repeat.
 * @param {number} number_times A positive number specifying the number of times to repeat text.
 * @returns {string} The string containing the repeating text.
 * @example
 * rosettajs.Text.rept("X",3); // Returns "XXX"
 * @example
 * rosettajs.Text.rept("X",0); // Returns ""
 */
function rept(text, number_times) {
    return openf.REPT(text, number_times);
}
exports.rept = rept;
/**
 * Finds one text value within another (not case-sensitive)
 *
 * @param {string} find_text The text that you want to find.
 * @param {string} within_text The text in which you want to search for the value of the find_text argument.
 * @param {number} [start_num] Optional. The character number in the within_text argument at which you want to start searching.
 * @returns {number|Error} The starting index of find_text in within_text or an Error if find_text is not found.
 * @example
 * rosettajs.Text.search('e', 'Statements', 6); // Returns 7
 * @example
 * rosettajs.Text.search('margin', 'Profit Margin'); // Returns 8
 */
function search(find_text, within_text, start_num) {
    return openf.SEARCH(find_text, within_text, start_num);
}
exports.search = search;
/**
 * Substitutes new text for old text in a text string.
 *
 * @param {string} text The text or the reference to a value containing text for which you want to substitute characters.
 * @param {string} old_text The text you want to replace.
 * @param {string} new_text The text you want to replace old_text with.
 * @param {number} [instance_num] Optional. Specifies which occurrence of old_text you want to replace with new_text. If you specify instance_num, only that instance of old_text is replaced. Otherwise, every occurrence of old_text in text is changed to new_text.
 * @returns {string} The string with the substituted text.
 * @example
 * rosettajs.Text.substitute("121212","2","ab"); // Returns "1ab1ab1ab"
 * @example
 * rosettajs.Text.substitute("121212","2","ab",2); // Returns "121ab12"
 * @example
 * rosettajs.Text.substitute("Hello","x","ab"); // If not found, returns unchanged
 */
function substitute(text, old_text, new_text, instance_num) {
    if (arguments.length < 3) {
        return error.na;
    }
    return openf.SUBSTITUTE(text, old_text, new_text, instance_num);
}
exports.substitute = substitute;
/**
 * Return the text (if text), else return 0-length Text value
 *
 * @param {*} value The value you want to test if text.
 * @returns {string} Returns _value_ if it is a string; otherwise an empty string.
 * @example
 * rosettajs.Text.t("HI"); // Returns "HI"
 * @example
 * rosettajs.Text.t(5); // Return ""
 */
function t(value) {
    return openf.T(value);
}
exports.t = t;
/**
 * Returns the character specified by the code number.
 *
 * @param {number} number A number between 1 and 255 specifying which character you want. The character is from the character set used by your computer. Note: Excel for the web supports only CHAR(9), CHAR(10), CHAR(13), and CHAR(32) and above.
 * @returns {string} The character specified by the code number.
 * @example
 * rosetta.Text.unichar(65); // Returns "A"
 */
function unichar(number) {
    return openf.UNICHAR(number);
}
exports.unichar = unichar;
/**
 * Returns a numeric code for the first character in a text string.
 *
 * @param {string} text The text for which you want the code of the first character.
 * @returns {number} The character code for the first character in text.
 * @example
 * rosetta.Text.unicode("A"); // Return 65
 */
function unicode(text) {
    return openf.CODE(text);
}
exports.unicode = unicode;
/**
 * Converts text to uppercase.
 *
 * @param {string} text The text you want converted to uppercase. Text can be a reference or text string.
 * @returns {string} The text converted to uppercase.
 * @example rosetta.Text.upper("Habc7"); // Returns "HABC7"
 */
function upper(text) {
    return openf.UPPER(text);
}
exports.upper = upper;
/**
 * Converts a text argument to a number.
 *
 * @param {string} text The text enclosed in quotation marks or a reference to a value containing the text you want to convert.
 * @returns The number represented by the text.
 * @example rosetta.Text.value("6"); // Returns 6
 * @example rosetta.Text.value("1E5"); // Returns 100000. Works with exponential notation.
 * @example rosetta.Text.value("7.25"); // Returns 7.25. Works with fractions.
 * @example rosetta.Text.value("50%"); // Returns 0.5. Works with percentages.
 */
function value(text) {
    return openf.VALUE(text);
}
exports.value = value;
//-----------------------------
// Notes @functions text
/**
 * Abbreviates the contents of one or more fields by:
 * - Selecting the most significant words in a body of text
 * - Abbreviating common words
 * - Dropping vowels from words
 * - Removing unnecessary text or characters, such as mail headers or white space
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function abstract() {
    return notesf.Abstract();
}
exports.abstract = abstract;
/**
 * Creates a short abstract of a text or rich text field. Simpler and more
 * efficient than using @Abstract.
 * @param {TextOrTextList} bodyFields Any number of fields containing the text to abstract. May be text or rich text fields.
 * If Notes/Domino cannot locate a field by name, it uses the string literal instead.
 * Enclose each field name in quotes and separate multiple names with colons: "Sales":"Figures".
 * @returns {TextOrTextList} Returns the first 100 characters or first 2 paragraphs of text, whichever is smaller.
 * All newline and tab characters are converted into spaces, and all empty paragraphs (containing only a newline character) are ignored.
 * If the parameter is a single field, a text value is returned.
 * If the parameter is a list of field names, then a text list is returned with each list element containing the abstracted text of the corresponding field in the parameter list.
 * If a field parameter is of an invalid type, or can't be found, the text returned is the string of the field parameter.
 * @example
 * // If the field "Verse" contains the rich text:
 * // "One bright day
 * // in the middle of
 * // the night"
 * rosettajs.Text.abstractSimple("Verse");  // returns "One bright day in the middle of"
 * @example
 * // If the field "Critics" contains the rich text:
 * // "When asked to comment on the movie, the reviewer stated that it was one of the year's best, and certainly would find a place on many award lists."
 * rosettajs.Text.abstractSimple("Critics");  // returns "When asked to comment on the movie, the reviewer stated that it was one of the year's best, and cert"
 */
function abstractSimple(bodyFields) {
    return notesf.AbstractSimple(bodyFields);
}
exports.abstractSimple = abstractSimple;
/**
 * Converts an LMBCS (Lotus Multi-Byte Character Set) string to an ASCII string.
 * @param {TextOrTextList} text An LMBCS string.
 * @param {boolean} [option] "ALLINRANGE" will return a null string ("") if any characters
 * in the original string cannot be represented by ASCII codes 32 to 127.
 * @returns {TextOrTextList} The original string, with each character converted to an ASCII-compliant character.
 * Any character that can't be represented by ASCII codes 32 to 127 is replaced with a question
 * mark (?). If you specify "ALLINRANGE" and there are characters that can't be represented by
 * ASCII codes 32 to 127, returns a null string ("").
 * @example
 * rosettajs.Text.ascii( "Çüé" ); // returns Cue
 * @example
 * // Returns a null string ("") since the last 2 characters can't be represented by ASCII codes 32 to 127
 * rosettajs.Text.ascii("Çü飥", "ALLINRANGE");
 * @example
 * rosettajs.Text.ascii(["Çü飥", "Çüé", "Abc"]);  // returns ['Cue??', 'Cue', 'Abc']
 */
function ascii(text, option) {
    return notesf.Ascii(text, option);
}
exports.ascii = ascii;
/**
 * Determines whether a particular substring is stored at the beginning of another string.
 *
 * This function is case-sensitive. If the either parameter is a list, the function tests each element
 * of the second parameter against each element of the first parameter and returns true if any match occurs.
 *
 * @param {string} within_text Any string.
 * @param {string} find_text The string you want to search for at the beginning of string.
 * @returns {boolean} true if substring is contained within string, beginning from the first letter.
 * Returns false if not. This function is case-sensitive. If the either parameter is a list,
 * the function tests each element of the second parameter against each element of the first parameter
 * and returns true if any match occurs.
 * @example rosettajs.Text.begins('Miriam-McGovern','Miriam');  // returns true
 * @example rosettajs.Text.begins('Miriam-McGovern',['Abc','Miri']);  // returns true
 * @example rosettajs.Text.begins(['John Jones','Mary Hill'],['Mi', 'Pa']);  // returns false;
 */
function begins(within_text, find_text) {
    return notesf.Begins(within_text, find_text);
}
exports.begins = begins;
/**
 * Compares the alphabetic order of the elements in two lists pair-wise.
 *
 * @param textlist1 {string[]} A list of strings to compare. If _textlist1_ is shorter than _textlist2_, the last element in _textlist1_ is repeated until it reaches the same length as _textlist2_.
 * @param textlist2 {string[]} A list of strings to compare. If _textlist2_ is shorter than _textlist1_, the last element in _textlist2_ is repeated until it reaches the same length as _textlist1_.
 * @param {string|string[]} [options] You can use the following keywords to specify the compare options:
 * - "ACCENTSENSITIVE"
 * - "ACCENTINSENSITIVE"
 * - "CASESENSITIVE"
 * - "CASEINSENSITIVE"
 * - "PITCHSENSITIVE"
 * - "PITCHINSENSITIVE"
 *
 * By default, the following keywords are used for the compare:
 * <pre>["CASESENSITIVE", "ACCENTSENSITIVE", "PITCHSENSITIVE"]</pre>
 * @returns {number[]} Each element is the result of comparing the corresponding elements in the text lists, and is one of three values:
 * - 0 if the elements in the two lists are equal.
 * - -1 if the element in the first list is less than the element in the second list.
 * - 1 if the element in the first list is greater than the element in the second list.
 * @example rosettajs.Text.compare("Boston", "boston", "CASESENSITIVE"); // Returns 1
 * @example
 * // Compares a list to the value "N" and returns [-1, 1, -1, 0, 0]. Boston and Moscow result in -1 (less than N), Tokyo results in 1 (greater than N), and n and N result in 0 (equal to N).
 * rosettajs.Text.text(rosettajs.Text.compare(["Boston", "Tokyo", "Moscow", "N", "n"], "N", "CASEINSENSITIVE"));
 */
function compare(textlist1, textlist2, options = [common_1.CompareOptions.CASESENSITIVE, common_1.CompareOptions.ACCENTSENSITIVE, common_1.CompareOptions.PITCHSENSITIVE]) {
    return notesf.Compare(textlist1, textlist2, options);
}
exports.compare = compare;
/**
 * Determines whether a substring is stored within a string.
 *
 * This function is case-sensitive. If either parameter is a list, the function returns true if any element of
 * the first parameter contains any element of the second parameter.
 *
 * @param {TextOrTextList} within_text The string(s) you want to search.
 * @param {TextOrTextList} find_text The string(s) you want to search for in string.
 * @returns {boolean} True if any substring is contained in one of the strings. False if no substrings are contained in any of the strings.
 * @example rosettajs.Textcontains('Miriam-McGovern','iam');  // returns 1
 * @example rosettajs.Text.contains('Miriam-McGovern',['Abc','McG']);  // returns 1
 * @example rosettajs.Text.contains(['John Jones','Mary Hill'],['hi', 'Pa']);  // returns 0;
 */
function contains(within_text, find_text) {
    return notesf.Contains(within_text, find_text);
}
exports.contains = contains;
/**
 * Determines if a substring is at the end of a string.
 *
 * This function is case-sensitive. If the either parameter is a list, the function tests each element
 * of the second parameter against each element of the first parameter and returns 1 if any match occurs.
 *
 * @param {TextOrTextList} within_text Text or text string. Any string.
 * @param {TextOrTextList} find_text Text or text string. The string you want to search for at the beginning of string.
 * @returns {boolean} True indicates that the _find_text_ is at the end of _within_test_. Otherwise false if not.
 * @example rosettajs.Text.ends('Miriam-McGovern','McGovern');  // returns 1
 * @example rosettajs.Text.ends('Miriam-McGovern',['Abc','Vern']);  // returns 0
 * @example rosettajs.Text.ends(['John Jones','Mary Hill'],['Ma', 'Hill']);  // returns 1
 */
function ends(within_text, find_text) {
    return notesf.Ends(within_text, find_text);
}
exports.ends = ends;
/**
 * Returns the directory portion of a path name, that is, the path name minus the file name.
 * @param {TextOrTextList} pathname Path name of a file.
 * @returns {TextOrTextList} The directory part of the path name.
 * @example
 * rosettajs.Text.fileDir("c:\\europe.dat"); // Returns "c:\"
 * @example
 * rosettajs.Text.fileDir("c:\\market\\data\\europe.dat":"\\europe.dat"); // Returns "c:\" : "\"
 * @example
 * rosettajs.fileDir("europe.dat"); // Returns Null
 */
function fileDir(pathname) {
    return notesf.FileDir(pathname);
}
exports.fileDir = fileDir;
/**
 * Indicates whether a value is a time-date (or a time-date list).
 * @param {*} value any value
 * @returns {boolean} True if the value ia a time-date or a time-date list. Othewise false.
 * @example
 * rosettajs.Text.isTime("08/31/2002"); // Returns true
 * @example
 * rosettajs.Text.isTime(123); // Returns false
 */
function isTime(value) {
    return notesf.IsTime(value);
}
exports.isTime = isTime;
/**
 * Searches a string from right to left and returns a substring.
 * @param {TextOrTextList} stringToSearch The string where you want to find the leftmost characters.
 * @param {number} param Counting from right to left, the number of characters to skip. All the characters
 * to the left of that number of characters are returned. If the number is negative, the entire string is returned.
 * @returns {string} Text or text list. The leftmost characters in stringToSearch. The number
 * of characters returned is determined by either numToSkip or startString.
 * @example rosettajs.Text.leftBack('Sale Price', 4); // returns 'Sale P'
 * @example rosettajs.Text.leftBack('Sweden', 'en'); // returns 'Swed'
 * @example rosettajs.Text.leftBack(['Sweden', 'England'], 2); // returns ['Swed', 'Engl']
 */
function leftBack(stringToSearch, param) {
    return notesf.LeftBack(stringToSearch, param);
}
exports.leftBack = leftBack;
/**
 * Returns the number of characters in a text string.
 * @param {TextOrTextList} text A single string with the length you want to find, or a list of strings.
 * @returns {NumberOrNumberList} If the parameter is a text string, length returns the number of characters in
 * the specified string, including spaces and punctuation. If the argument is a text list, length searches the
 * list of strings and returns the number of characters in each string as a number list.
 * @example rosettajs.Text.length('four'); // returns 4
 * @example rosettajs.Text.length('four', 'seven'); // returns [4, 5]
 * @example rosettajs.Text.length('four', 12); // returns [4, 0]
 */
function length(text) {
    return notesf.Length(text);
}
exports.length = length;
/**
 * Matches a string with a pattern. It is case-sensitive.
 *
 * @param {TextOrTextList} text The value to be tested to see if it matches _pattern_.
 * @param {TextOrTextList} pattern The sequence of characters to search for within _text_. May also contain any of the wildcard characters listed as follows:
 *    - C where C is any character. Matches any single, non-special, character C.
 *    - _ (Underscore) Matches any single character.
 *    - % Matches any sequence of zero or more characters.
 * @param {string} [escape] A character to use before a wildcard character to indicate that it should be treated literally.
 * @returns {boolean} True if the _pattern_ matches the _text_. False if the _pattern_ does not matches the _text_.
 * @example
 * // Return false. The underscore matches only a single character.
 * rosettajs.Text.like( "A big test", "A_test");
 * @example
 * // Returns true because the match is true for one element of the first parameter.
 * rosettajs.Text.like( ["A big test", "A big exam"], "%test" );
 * @example
 * // Returns true. The first percent matches "100." The "/%" matches the percent sign because "/" is specified as the escape character. The last percent matches "ement."
 * rosettajs.Text.like( "A 100% improvement", "A %/% improv%", "/" )
 */
function like(text, pattern, escape) {
    return notesf.Like(text, pattern, escape);
}
exports.like = like;
/**
 * Converts the uppercase letters in the specified string to lowercase.
 * @param {TextOrTextList} text The string you want to convert to lowercase.
 * @returns {TextOrTextList} The string, converted to lowercase letters.
 * @example rosettajs.Text.lowerCase('ABcd'); // returns 'abcd'
 * @example rosettajs.Text.lowerCase('ABcd', 'efGH'); // returns ['abcd', 'efgh']
 */
function lowerCase(text) {
    return notesf.LowerCase(text);
}
exports.lowerCase = lowerCase;
/**
 * Tests a string for a pattern string. Because the pattern string can contain a number of "wildcard" characters
 * and logical symbols, you can test for complex character patterns.
 * @param {TextOrTextList} text The string you want to scan in quotes. You can also enter the field name of a field
 * that contains the string you want to scan; do not surround the field name in quotes.
 * @param {TextOrTextList} pattern The pattern you want to scan for in string surrounded by quotation marks.
 * May contain wildcard characters and symbols (see the following table). The following symbols require a preceding
 * backslash unless the pattern is enclosed in braces { } as a set: ?, *, &, !, |, \, +. The symbols require two
 * preceding backslashes instead of one if the pattern is specified as a literal. This is because the backslash is an
 * escape character in string literals, so "\?" passes "?" to the matching engine, where it is treated as a wildcard,
 * while "\\?" passes "\?" to the matching engine, where it is treated as a question mark character.
 * The wildcard characters and symbols are as follows:
 * - C Where C is any character. Matches any single, non-special character C (or c)
 * - ? Matches any single character
 * - * Matches any string (any number of characters)
 * - {ABC} Matches any character in set ABC
 * - {A-FL-R} Matches any character in the sets A...F and L...R
 * - +C Matches any number of occurrences of C (or c)
 * - ! Complements logical meaning of the pattern (logical NOT)
 * - | Performs logical OR of two patterns
 * - & Performs logical AND of two patterns
 *
 * @returns {boolean} True if _text_ contains the pattern. False if _text_ does not contain the pattern.
 * @example
 * rosettajs.Text.matches("A big test", "a?????test"); // Returns true
 * @example
 * rosettajs.Text.matches("A big test", "a?test"); // Returns false
 * @example
 * // Throws error, "Value cannot be a letter" if input contains any lowercase or uppercase letter between A and Z
 * if(rosettajs.Text.matches(rosettajs.Text.text(input), "+{A-z}")) throw new Error("Value cannot be a letter");
 */
function matches(text, pattern) {
    return notesf.Matches(text, pattern);
}
exports.matches = matches;
/**
 * Returns any substring from the middle of a string. The middle is found by scanning the string from left to right,
 * and parameters determine where the middle begins and ends.
 * @param {TextOrTextList} text Any string
 * @param {number|string} start If a number, a character position in _text_ that indicates where you want the middle to begin,
 * always counting from left to right. The middle begins one character after the _start_.
 *
 * If a string, a substring of _text_ that indicates where you want the middle to begin, always counting from
 * left to right. The middle begins one character after the end of _start_.
 * @param {number|string} end If a number, the number of characters that you want in the middle. If _end_ is negative, the middle
 * starts at _start_ and continues from right to left. If end is positive, the middle starts one character
 * past _start_ and continues from left to right.
 *
 * If a string, a substring of _text_ that indicates the end of the middle. Returns all the characters between
 * _start_ and _end_.
 * @returns {TextOrTextList} The substring from the middle of _text_, which begins at the _start_ you specify and ends
 * at the _end_ you specify, or after _end_ characters have been reached.
 * @example rosettajs.Text.middle('North Carolina', ' ', 3); // returns 'Car'
 * @example rosettajs.Text.middle('This is the text', 4, 'text); // returns ' is the '
 * @example rosettajs.Text.middle(["Hello world", "This is the time"], 0, " "); // returns ['Hello', 'This']
 */
function middle(text, start, end) {
    return notesf.Middle(text, start, end);
}
exports.middle = middle;
/**
 * Returns any substring from the middle of a string. The middle is found by
 * scanning the string from right to left, and parameters determine where the middle
 * begins and ends.
 * @param {TextOrTextList} text Any string.
 * @param {number|string} start If a number, a character position in _text_ that indicates where you want the middle to begin, always
 * counting from right to left. The middle begins one character after the _start_. Always add 1 to this number; the end
 * of the string is marked by one non-visible character and must be counted in the offset.
 *
 * If a string, a substring of _text_ that indicates where you want the middle to begin, always counting from right to left.
 * The middle begins one character after the end of start.
 * @param {number|string} end If a number, The number of characters that you want in the middle. If end is negative, the middle
 * starts at _start_ and continues from right to left. If end is positive, the middle starts one character
 * past _start_ and continues from left to right.
 *
 * If a string, a substring of string that indicates the end of the middle. Returns all the characters between
 * _start_ and _end_.
 * @returns {TextOrTextList} The substring from the middle of string, which begins at the offset or startString you specify
 * and ends at the endstring you specify, or after the numberchars have been reached.
 * @example rosettajs.Text.middleBack('Fluid Flow', 0, 5); // returns 'Flow'
 * @example rosettajs.Text.middleBack('This is the text', 'text', 'is'); // returns ' the '
 * @example rosettajs.Text.middleBack(["Hello world", "This is the time"], 0, " "); // returns ["world", "time"]
 */
function middleBack(text, start, end) {
    return notesf.MiddleBack(text, start, end);
}
exports.middleBack = middleBack;
/**
 * Converts full-pitch alphanumeric characters (double byte characters -- DBCS) in the specified string to half-pitch
 * alphanumeric characters (single byte characters -- SBCS). This function works in Japanese, Korean, Simplified Chinese,
 * and traditional Chinese environments. In the Japanese environment, this function can convert full-pitch Katakana as well.
 * @param {TextOrTextList} text The string that you want to convert to single byte characters.
 * @returns {TextOrTextList} The string converted to single byte characters.
 * @example rosettajs.Text.narrow("0123456789ABCDEFGHI"); // returns "0123456789ABCDEFGHI"
 * @example rosettajs.Text.narrow(["0123456789ABCDEFGHI", "アイウABCエオカㄱㄲㄳ"]); // returns ["0123456789ABCDEFGHI", "アイウABCエオカᄀᄁᆪ"]
 */
function narrow(text) {
    return notesf.Narrow(text);
}
exports.narrow = narrow;
/**
 * Returns a new line (carriage return) into a text string.
 * @returns {string} The new line character
 * @example
 * // Returns "Hi
 * // There"
 * var greeting = "Hi" + rosettajs.Text.newLine() + "There";
 *
 */
function newLine() {
    return notesf.NewLine();
}
exports.newLine = newLine;
/**
 * Converts the words in a string to proper-name capitalization: the first letter
 * of each word becomes uppercase, all others become lowercase.
 * @param {TextOrTextList} text. The string you want to convert.
 * @returns {TextOrTextList} The string, converted to proper-name capitalization.
 * @example rosettajs.Text.properCase('a title case'); // returns 'A Title Case'
 * @example rosettajs.Text.properCase('a title case','is awaiting trial'); // returns ['A Title Case','Is Awaiting Trial']
 */
function properCase(text) {
    return notesf.ProperCase(text);
}
exports.properCase = properCase;
/**
 * Repeats a string a specified number of times.
 * @param {TextOrTextList} text The string you want to repeat.
 * @param {Number} number The number of times you want to repeat string.
 * @param {Number} [maxchar] The maximum number of characters you want returned. Repeat truncates the result to this number.
 * @returns {TextOrTextList} The string, repeated number times until numberchars (if specified) is reached.
 * @example rosettajs.Text.repeat('multiple ', 3); // returns 'multiple multiple multiple '
 * @example rosettajs.Text.repeat(['multiple ', 'hits '], 3); // returns ['multiple multiple multiple ', 'hits hits hits ']
 * @example rosettajs.Text.repeat(['multiple ', 'hits '], 3, 10); // returns ['multiple m', 'hits hits ']
 */
function repeat(text, number, maxchar) {
    return notesf.Repeat(text, number, maxchar);
}
exports.repeat = repeat;
/**
 * Replaces specific words or phrases in a string with new words or phrases that
 * you specify. Case sensitive.
 * @param {TextOrTextList} source The string whose contents you want to modify.
 * @param {TextOrTextList} from A list containing the words or phrases that you want to replace.
 * @param {TextOrTextList} to A list containing the replacement words or phrases.
 * @returns {TextOrTextList} The sourceList, with any values from fromList replaced by the corresponding value in toList.
 * If none of the values in fromList matched the values in sourceList, then sourceList is returned unaltered.
 * @example rosettajs.Text.replaceSubstring("I like apples", "like", "hate"); // returns 'I hate apples'
 * @example rosettajs.Text.replaceSubstring("I like apples", ["like", "apples"], ["hate", "peaches"]); // returns 'I hate peaches'
 * @example rosettajs.Text.replaceSubstring(["I like apples", "I like bananas"], ["like", "I"], ["hates", "He"]); // returns ["He hates apples", "He hates bananas"]
 */
function replaceSubstring(source, from, to) {
    return notesf.ReplaceSubstring(source, from, to);
}
exports.replaceSubstring = replaceSubstring;
/**
 * Returns the rightmost characters in a string.
 * @param {TextOrTextList} text The string whose rightmost characters you want to find.
 * @param {number| string} param If a number, counting from left to right, the number of characters to skip. All the characters
 * following that number are returned.
 *
 * If a string, A substring of _text_. Returns all the characters following _param_. It finds
 * _param_ by searching _text_ from right to left.
 * @returns {TextOrTextList} The rightmost characters in _text_. The number of characters returned is determined by _param_.
 * @example rosettajs.Text.rightBack('Sale Price', 5); // returns 'Price'
 * @example rosettajs.Text.rightBack('Lennard Wallace', " "); // returns 'Wallace'
 * @example rosettajs.Text.rightBack(['Lennard', 'Wallace'], 3); // returns ['nard', 'lace']
 */
function rightBack(text, param) {
    return notesf.RightBack(text, param);
}
exports.rightBack = rightBack;
/**
 * Converts a text string to a number, where possible.
 * @param {TextOrTextList} text The string you want to convert to a number. If the string contains both numbers and letters,
 * it must begin with a number to be converted properly. For example, the string "12ABC" converts to 12, but
 * "ABC12" produces an error.
 * @returns {NumberOrNumberList} The string, converted to a number.
 * @example rosettajs.Text.textToNumber('2500'); // returns 2500
 * @example rosettajs.Text.textToNumber('2500-xyz', '250.5abc', '333'); // returns [2500, 250.5, 333]
 */
function textToNumber(text) {
    return notesf.TextToNumber(text);
}
exports.textToNumber = textToNumber;
/**
 * Converts a value to a number.
 * @param {string|number} value Text, number, or list thereof. A value that cannot be
 * converted returns the error, "The value cannot be converted to a Number."
 * @returns Number or number list. The value converted to a number.
 * @example rosettajs.Text.toNumber('2500'); // returns 2500
 * @example "rosettajs.Text.toNumber('2500', '250.5', '333'); // returns [2500, 250.5, 333]
 */
function toNumber(value) {
    return notesf.ToNumber(value);
}
exports.toNumber = toNumber;
/**
 * Converts a value with a data type of text or time to a date-time value.
 * @param {DateOrDateList} time_text The value to convert. A value that cannot be converted returns the error,
 * "The value cannot be converted to a Number."
 * @returns {DateOrDateList} The value converted to a date object.
 * @example
 * // Returns Date values [02/29/2008, 03/01/2008]
 * rosettajs.Text.toTime(["2/29/08", "3/1/08"]);
 * @example
 * // Return Date with value returns 08/31/2021
 * rosettajs.Text.adjust(rosettajs.Text.toTime("08/29/21"),0,0,2,0,0,0);
 */
function toTime(time_text) {
    return notesf.ToTime(time_text);
}
exports.toTime = toTime;
/**
 * Converts the lowercase letters in the specified string to uppercase.
 * @param {TextOrTextList} text The string you want to convert to uppercase.
 * @returns {TextOrTextList} The string, converted to uppercase letters.
 * @example rosettajs.Text.upperCase('to upper case please'); // returns 'TO UPPER CASE PLEASE'
 * @example rosettajs.Text.upperCase('ABcd', 'efGH'); // returns ['ABCD', 'EFGH']
 */
function upperCase(text) {
    return notesf.UpperCase(text);
}
exports.upperCase = upperCase;
/**
 * Converts half-pitch alphanumeric characters (single-byte characters -- SBCS) in
 * the specified string to full-pitch alphanumeric characters (double-byte
 * characters -- DBCS). This function works in Japanese, Korean, Simplified
 * Chinese, and traditional Chinese environments. In the Japanese environment, this
 * function can convert half-pitch Katakana as well.
 * @param {TextOrTextList} text The string you want to convert to double-byte characters.
 * @returns {TextOrTextList} The string converted to double-byte characters.
 * @example rosettajs.Text.wide("0123456789ABCDEFGHI"); // returns "0123456789ABCDEFGHI"
 * @example rosettajs.Text.wide(["0123456789ABCDEFGHI", "アイウABCエオカᄀᄁᆪ"]); // returns ["0123456789ABCDEFGHI", "アイウABCエオカㄱㄲㄳ"]
 */
function wide(text) {
    return notesf.Wide(text);
}
exports.wide = wide;
/**
 * Returns the specified word from a text string. A "word" is defined as the part of a string that
 * is delimited by the defined separator character. For example, if you specify a space (" ") as
 * the separator, then a word is any series of characters preceded by and followed by a space
 * (or the beginning or end of the string).
 * @param {TextOrTextList} text  The string you want to scan.
 * @param {string} separator The character that you want used to delimit a word in the string.
 * @param {number} number A position indicating which word you want returned from string. A positive number
 * refers to the position of the word starting from the beginning where 1 is the first word. A
 * negative number refers to the position of the word starting from the end where -1 is the last word.
 * @returns {TextOrTextList} The word that holds the position specified by the number in the string; for example,
 * if number is 3, returns the third word in the string. If a text list is used, returns
 * (in list format) a word from each list that holds the specified position. Returns an empty string
 * if number is out of range, except that 0 is equivalent to 1.
 * @example
 * rosettajs.Text.word("Larson, Collins, and Jensen", " ", 2); // Returns "Collins,"
 * @example
 * rosettajs.Text.word("Larson,James,M.", ",", 3); // Returns "M."
 */
function word(text, separator, number) {
    return notesf.Word(text, separator, number);
}
exports.word = word;
//-----------------------------
// Notes @Commands text
/**
 * Centers the current text.
 * @throws {Error} no plans to implement
 */
function textAlignCenter() {
    return notesc.TextAlignCenter();
}
exports.textAlignCenter = textAlignCenter;
/**
 * Aligns text along the left margin.
 * @throws {Error} no plans to implement
 */
function textAlignFull() {
    return notesc.TextAlignFull();
}
exports.textAlignFull = textAlignFull;
/**
 * Aligns text along the left margin.
 * @throws {Error} no plans to implement
 */
function textAlignLeft() {
    return notesc.TextAlignLeft();
}
exports.textAlignLeft = textAlignLeft;
/**
 * Reverses the previously specified alignment settings.
 * @throws {Error} no plans to implement
 */
function textAlignNone() {
    return notesc.TextAlignNone();
}
exports.textAlignNone = textAlignNone;
/**
 * Aligns text along the right margin.
 * @throws {Error} no plans to implement
 */
function textAlignRight() {
    return notesc.TextAlignRight();
}
exports.textAlignRight = textAlignRight;
/**
 * Makes the selected and subsequently entered text bold. This command is a toggle;
 * selecting it again removes the bold.
 * @throws {Error} no plans to implement
 */
function textBold() {
    return notesc.TextBold();
}
exports.textBold = textBold;
/**
 * Applies the bullet attribute to selected and subsequently entered text.
 * @throws {Error} no plans to implement
 */
function textBullet() {
    return notesc.TextBullet();
}
exports.textBullet = textBullet;
/**
 * Resets the interline spacing below the selected text to single, one and a half,
 * or double.
 * @throws {Error} no plans to implement
 */
function textCycleSpacing() {
    return notesc.TextCycleSpacing();
}
exports.textCycleSpacing = textCycleSpacing;
/**
 * Increases selected and subsequently entered text to the next larger point size.
 * @throws {Error} no plans to implement
 */
function textEnlargeFont() {
    return notesc.TextEnlargeFont();
}
exports.textEnlargeFont = textEnlargeFont;
/**
 * Displays the Properties box for the current text, where the user can select the
 * typeface, size, color, and style attributes.
 * @throws {Error} no plans to implement
 */
function textFont() {
    return notesc.TextFont();
}
exports.textFont = textFont;
/**
 * Italicizes the selected and subsequently entered text. This command is a toggle;
 * selecting it a second time removes the italics.
 * @throws {Error} no plans to implement
 */
function textItalic() {
    return notesc.TextItalic();
}
exports.textItalic = textItalic;
/**
 * Removes all style attributes from selected and subsequently entered text.
 * @throws {Error} no plans to implement
 */
function textNormal() {
    return notesc.TextNormal();
}
exports.textNormal = textNormal;
/**
 * Applies the numbers attribute to selected and subsequently entered text.
 * @throws {Error} no plans to implement
 */
function textNumbers() {
    return notesc.TextNumbers();
}
exports.textNumbers = textNumbers;
/**
 * Outdents selected and subsequently entered text by narrowing its left margin.
 * @throws {Error} no plans to implement
 */
function textOutdent() {
    return notesc.TextOutdent();
}
exports.textOutdent = textOutdent;
/**
 * Displays the Paragraph Alignment panel of the Text Properties box.
 * @throws {Error} no plans to implement
 */
function textParagraph() {
    return notesc.TextParagraph();
}
exports.textParagraph = textParagraph;
/**
 * Displays the Paragraph Styles panel of the Text Properties box.
 * @throws {Error} no plans to implement
 */
function textParagraphStyles() {
    return notesc.TextParagraphStyles();
}
exports.textParagraphStyles = textParagraphStyles;
/**
 * Toggles the permanent pen.
 * @throws {Error} no plans to implement
 */
function textPermanentPen() {
    return notesc.TextPermanentPen();
}
exports.textPermanentPen = textPermanentPen;
/**
 * Decreases the selected text to the next smaller point size.
 * @throws {Error} no plans to implement
 */
function textReduceFont() {
    return notesc.TextReduceFont();
}
exports.textReduceFont = textReduceFont;
/**
 * Displays selected or subsequently entered text using the specified color.
 * @throws {Error} no plans to implement
 */
function textSetFontColor() {
    return notesc.TextSetFontColor();
}
exports.textSetFontColor = textSetFontColor;
/**
 * Displays selected or subsequently entered text using the specified typeface.
 * @throws {Error} no plans to implement
 */
function textSetFontFace() {
    return notesc.TextSetFontFace();
}
exports.textSetFontFace = textSetFontFace;
/**
 * Displays text using the specified point size.
 * @throws {Error} no plans to implement
 */
function textSetFontSize() {
    return notesc.TextSetFontSize();
}
exports.textSetFontSize = textSetFontSize;
/**
 * Sets Interline spacing below the selected text to double.
 * @throws {Error} no plans to implement
 */
function textSpacingDouble() {
    return notesc.TextSpacingDouble();
}
exports.textSpacingDouble = textSpacingDouble;
/**
 * Sets interline spacing below the selected text to one and a half.
 * @throws {Error} no plans to implement
 */
function textSpacingOneAndAHalf() {
    return notesc.TextSpacingOneAndAHalf();
}
exports.textSpacingOneAndAHalf = textSpacingOneAndAHalf;
/**
 * Sets interline spacing below the selected text to single.
 * @throws {Error} no plans to implement
 */
function textSpacingSingle() {
    return notesc.TextSpacingSingle();
}
exports.textSpacingSingle = textSpacingSingle;
/**
 * Underlines selected and subsequently entered text. This command is a toggle;
 * selecting it a second time removes the underlining.
 * @throws {Error} no plans to implement
 */
function textUnderline() {
    return notesc.TextUnderline();
}
exports.textUnderline = textUnderline;
//# sourceMappingURL=text.js.map