document.js

"use strict";
/***************************************************
* Licensed Materials - Property of HCL.
* (c)Copyright HCL America, Inc. 2023-2024
****************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
exports.docMark = exports.docLength = exports.v3EditPrevField = exports.v3EditNextField = exports.switchForm = exports.showProperties = exports.removeFromFolder = exports.emptyTrash = exports.moveToTrash = exports.discoverFolders = exports.chooseFolders = exports.undeleteDocument = exports.showParentPreview = exports.setTargetFrame = exports.openInNewWindow = exports.hardDeleteDocument = exports.docLock = exports.addToFolder = exports.isCategory = exports.setField = exports.responses = exports.prompt = exports.pickList = exports.docSiblings = exports.docParentNumber = exports.docDescendants = exports.docChildren = exports.docNumber = exports.docLevel = exports.isResponseDoc = exports.isUnavailable = exports.isNewDoc = exports.isDocTruncated = exports.isAvailable = exports.getFieldType = exports.getField = exports.formLanguage = exports.documentUniqueID = exports.docOmmittedLength = exports.docFields = exports.deleteField = exports.deleteDocument = exports.author = exports.attachments = exports.attachmentNames = exports.attachmentModifiedTimes = exports.attachmentLengths = exports.all = exports._notes_vmx = exports._notes = void 0;
exports.whichFolders = exports.formTestDocument = exports.unavailable = exports.policyIsFieldLocked = exports.noteID = exports.isDocBeingSaved = exports.isDocBeingRecalculated = exports.isDocBeingMailed = exports.isDocBeingLoaded = exports.isDocBeingEdited = exports.inheritedDocumentUniqueID = exports.getFocusTable = void 0;
const tslib_1 = require("tslib");
/**
 * @file Document
 * @module document
 * @category Document
 */
const notesf_base = tslib_1.__importStar(require("../notes/document"));
const notesf_vmx = tslib_1.__importStar(require("../notes/voltmx/document"));
const API = tslib_1.__importStar(require("../rosetta/API"));
const common_1 = require("../utils/common");
const notesf = () => API.isCurrentFrameworkVoltMX() ? notesf_vmx : notesf_base;
const notesc = notesf; // notes commands are exposed in the notes functions source file; this notesc is just for visual cue
exports._notes = notesf_base;
exports._notes_vmx = notesf_vmx;
/**
 * NOTE: allChildren and allDescendants are not implemented in the Rosetta API since they are only allowed
 * on the SELECT statement and can't be invoked outside of SELECT.
 */
/**
 * Returns the value True.
 * @returns {Promise<any>}
 */
const all = () => {
    return notesf().All();
};
exports.all = all;
/**
 * Returns a number or a number list containing the length of each attachment to
 * the current document. The number(s) returned are only approximations; the actual
 * size(s) of the attachment(s) may be slightly different.
 * @param {boolean} excludeMIMEBody
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function attachmentLengths(excludeMIMEBody = true) {
    return notesf().AttachmentLengths(excludeMIMEBody);
}
exports.attachmentLengths = attachmentLengths;
/**
 * Returns a datetime that displays the date on which the file attachment
 * associated with the current document was last modified. If the document contains
 * more than one file attachment, returns the modification dates in a datetime list.
 * @param {boolean} excludeMIMEBody
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function attachmentModifiedTimes(excludeMIMEBody = true) {
    return notesf().AttachmentModifiedTimes(excludeMIMEBody);
}
exports.attachmentModifiedTimes = attachmentModifiedTimes;
/**
 * Returns the operating system file names of any files attached to a document. If
 * there are multiple files attached, the names are returned as a multiple-value
 * text list.
 * @param {boolean} excludeMIMEBody
 * @returns {TextOrTextList}
 */
function attachmentNames(excludeMIMEBody = true) {
    return notesf().AttachmentNames(excludeMIMEBody);
}
exports.attachmentNames = attachmentNames;
/**
 * Returns the number of files attached to a document.
 * @param {boolean} excludeMIMEBody
 * @returns {number}
 */
function attachments(excludeMIMEBody = true) {
    return notesf().Attachments(excludeMIMEBody);
}
exports.attachments = attachments;
/**
 * Returns a text list containing the names of the author(s) of the current document.
 * @returns {string[]} All the authors of the current document. For authors with hierarchical names, Notes/Domino returns the abbreviated form of the name (as in Denise Lee/Research/Acme),
 * rather than the canonical form (CN=Denise Lee/OU=Research/O=Acme).
 * @example
 * // If a document has one Authors field that contains: Mary Tsen, David Smith, Denise Lee/Research/Acme. This example returns: ["Mary Tsen", "David Smith", "Denise Lee/Research/Acme"]
 * rosettajs.Document.author();
 */
function author() {
    return notesf().Author();
}
exports.author = author;
/**
 * Deletes the current document.
 * @returns {Promise<any>}
 */
function deleteDocument() {
    return notesf().DeleteDocument();
}
exports.deleteDocument = deleteDocument;
/**
 * Deletes the value of an editable field.
 * @returns {void}
 */
function deleteField() {
    return notesf().DeleteField();
}
exports.deleteField = deleteField;
/**
 * Returns a list of all the fields in a document.

 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function docFields() {
    return notesf().DocFields();
}
exports.docFields = docFields;
/**
 * Returns the approximate number of bytes a truncated document lost during
 * replication. The bytes are the total number of bytes per attachment, OLE object,
 * large rich text field, or non-summary items that were too large, according to
 * the replication settings for the database, to be replicated.
 * @throws {Error} no plans to implement
 */
function docOmmittedLength() {
    return notesf().DocOmmittedLength();
}
exports.docOmmittedLength = docOmmittedLength;
/**
 * The universal ID, which uniquely identifies a document across all replicas of a
 * database. In text format, the universal ID is a 32-character combination of
 * hexadecimal digits (0-9, A-F).
 *
 * The universal ID is also known as the unique ID or UNID.
 * @returns {string}
 */
function documentUniqueID() {
    return notesf().DocumentUniqueID();
}
exports.documentUniqueID = documentUniqueID;
/**
 * Returns the language of the current form.
 * @throws {Error} no plans to implement
 */
function formLanguage() {
    return notesf().FormLanguage();
}
exports.formLanguage = formLanguage;
/**
 * Returns the value of a specified field.
 * @param {*} fieldName
 * @returns {*} value
 */
const getField = (fieldName) => {
    return notesf().GetField(fieldName);
};
exports.getField = getField;
/**
 * Returns the type of a specified field.
 * @param {*} fieldName  - uses current document
 * @returns {*} field type - possible return values - 'string', 'number', 'date', 'richtext', 'string[]', 'number[]', 'date[], 'richtext[]', and []'
 */
const getFieldType = (fieldName) => {
    return notesf().GetFieldType(fieldName);
};
exports.getFieldType = getFieldType;
/**
 * Checks a document for the existence of a field.
 * @param {*} field The field to check
 * @returns True indicates that the field is contained in the document. False indicates that the field is not contained in the document.
 * @example
 * // This formula returns the value of the Dept field if it exists in the document, otherwise it returns Consultant
 * if (voltmx.rosettajs.Document.isAvailable("Dept")) {
 *  return voltmx.rosettajs.Document.getField("Dept");
 * } else {
 *   return "Consultant";
 * }
 * @example
 * // This formula returns the value of the field named Topic if it exists in the document, otherwise it returns the value contained in the field named Subject.
 * if (voltmx.rosettajs.Document.isAvailable("Topic")) {
 *   return voltmx.rosettajs.Document.getField("Topic");
 * } else {
 *   return voltmx.rosettajs.Document.getField("Subject");
 * }
 * @example
 * // This formula, when added to a hotspot button, checks for the existence of the Priority field in a form, then sets its value if found or creates a new Priority field and sets its value, if not found
 * if (voltmx.rosettajs.Document.isAvailable("Priority")) {
 *   return voltmx.rosettajs.Document.setField("Priority", "High");
 * } else {
 *   return voltmx.rosettajs.Document.setField("Priority", "Medium");
 * }
 */
function isAvailable(field) {
    return notesf().IsAvailable(field);
}
exports.isAvailable = isAvailable;
/**
 * Indicates whether the current document has been truncated.
 * @throws {Error} no plans to implement
 */
function isDocTruncated() {
    return notesf().IsDocTruncated();
}
exports.isDocTruncated = isDocTruncated;
/**
 * For a document being edited, indicates if the document has been saved to disk.
 * @returns 1 (True) if the document being edited has not yet been saved to disk. Returns 0 (False) if the document has been saved.
 */
function isNewDoc() {
    return notesf().IsNewDoc();
}
exports.isNewDoc = isNewDoc;
/**
 * Indicates whether a field name exists in a document.
 *
 * CAUTION: Do not confuse &#64;IsUnavailable with &#64;Unavailable. &#64;Unavailable deletes fields and can cause serious damage if used unintentionally in place of &#64;IsUnavailable.
 *
 * @param {*} field The field to check.
 * @returns True indicates that the field is not contained in the document. False indicates that the field is contained in the document.
 * @example
 * // Returns Consultant if the field Dept does not exist; if Dept does exist, the value contained in Dept is returned.
 * if (voltmx.rosettajs.Document.isUnavailable("Dept")) {
 *   return "Consultant";
 * } else {
 *   return voltmx.rosettajs.Document.getField("Dept");
 * }
 */
function isUnavailable(field) {
    return notesf().IsUnavailable(field);
}
exports.isUnavailable = isUnavailable;
/**
 * Indicates whether a document is a response to another document.
 * @returns Returns true if the document is a response document. Returns false if the document is not a response document.
 * Returns false for new documents, since &#64;IsResponseDoc doesn't recognize a document type until after the document is saved
 * @see For further information, see {@link https://help.hcltechsw.com/dom_designer/14.0.0/basic/H_ISRESPONSEDOC.html | hcltechsw.com}
 * @example
 * // Returns Response if the document is a response; Topic if the document is not a response.
 * if (voltmx.rosettajs.Document.isResponseDoc()) {
 *  return "Response";
 * } else {
 * return "Topic";
 * }
 */
function isResponseDoc() {
    return notesf().IsResponseDoc() === 1;
}
exports.isResponseDoc = isResponseDoc;
/**
 * Returns a text string that represents the level of the document or category.
 * @returns The level of the document or category.
 * @example
 * rosettajs.Document.docLevel(); // This example of a main document in a category returns 2
 * @example
 * rosettajs.Document.docLevel; // This example of a response document in a category returns 3
 */
function docLevel() {
    return notesf().DocLevel();
}
exports.docLevel = docLevel;
/**
 * Returns a string representing the entry number of the current document or category. For example, 2.3 indicates
 * that the document is the third entry following the second entry.
 * @param {string} [separator] Optional. Indicates a separator to be used in the document number instead of "." (period); must be one character.
 * An empty string (""), Tells the function to return the least significant item of the document number (in other words, its rightmost component).
 * @returns The value that represents the document number of the document or category in the view.
 * @example
 * rosettajs.Document.docNumber(); // This example returns 37.1.3 for entry 37.1.3
 * @example
 * rosettajs.Document.docNumber("-"); // This example returns 37-1-3 for entry 37.1.3
 * @example
 * rosettajs.Document.docNumber(""); // This example returns 3 for entry 37.1.3
 */
function docNumber(separator) {
    return notesf().DocNumber(separator);
}
exports.docNumber = docNumber;
/**
 * Returns the number of child documents or categories belonging to the current document or category.
 * Only immediate responses count as children. For example, the responses to a main document are its children,
 * but the responses to a response document are not.
 *
 * The parameter descriptions are:
 * - defaultString The text to return. If a "%" is used in the string, it will be replaced with the number of
 * children documents or categories. Example: "% Responses."
 * - zero-string The text to return if the document or category has no children, such as "No Responses."
 * - one-string The text to return if the document or category has just one child, such as "One Response."
 *
 * @param {string} string1 If this is the only argument, it is the defaultString. If there are
 * more than two arguments, this is the zero-string.
 * @param {string} string2 If there are two arguments, it is the defaultString. If there are
 * three arguments, this is the one-string.
 * @param {string} string3 This is the defaultString.
 * @returns {string} The return value depends on how you call docChildren:
 * - numChildren If docChildren is called with no parameters, then the number of child documents belonging to
 * the current document or category is returned. You cannot convert special text to a number.
 * - childString If docChildren is called with one or more parameters, it returns the appropriate string, based
 * on the number of child documents belonging to the current document or category. You cannot convert special text
 * to a number.
 * @example
 * rosettajs.document.docChildren(); // This example returns 3 if there are 3 responses
 * @example
 * // This example returns 3 Responses. The appropriate number is substituted for %. If the document doesn't have any responses, this formula returns 0 Responses.
 * rosettajs.document.docChildren("% Responses");
 * @example
 * // This example returns 3 Responses. This time, if the document doesn't have any responses, the formula returns the message No Responses.
 * rosettajs.document.docChildren("No Responses";"% Responses");
 * @example
 * // This example returns There are 3 Responses. If the document has one response, the message is 1 Response; if the document has no responses, the message is No Responses.
 * rosettajs.document.docChildren("No Responses";"1 Response";"There are % Responses.");
 */
function docChildren(string1, string2, string3) {
    return notesf().DocChildren(string1, string2, string3);
}
exports.docChildren = docChildren;
/**
 * Returns the number of descendant documents or subcategories belonging to the current document or category.
 * Only immediate responses count as children. Where docChildren only counts direct descendants, docDescendants counts all descendants,
 * regardless of level.
 *
 * The parameter descriptions are:
 * - defaultString The text to return. If a "%" is used in the string, it will be replaced with the number of
 * descendant documents or categories. Example: "% Responses."
 * - zero-string The text to return if the document or category has no descendants, such as "No Responses."
 * - one-string The text to return if the document or category has just one descendant, such as "One Response."
 *
 * @param {string} string1 If this is the only argument, it is the defaultString. If there are
 * more than two arguments, this is the zero-string.
 * @param {string} string2 If there are two arguments, it is the defaultString. If there are
 * three arguments, this is the one-string.
 * @param {string} string3 This is the defaultString.
 * @returns {string} The return value depends on how you call docDescendants:
 * - numDescendants If docDescendants is called with no parameters, then the number of descendant documents belonging to
 * the current document or category is returned.
 * - descendantString If docDescendants is called with one or more parameters, it returns the appropriate string, based
 * on the number of descendant documents belonging to the current document or category.
 * @example
 * rosettajs.document.docDescendants(); // This example returns 3 if there are 3 responses
 * @example
 * // This example returns 3 Responses. The appropriate number is substituted for %. If the document doesn't have any responses, this formula returns 0 Responses.
 * rosettajs.document.docDescendants("% Responses");
 * @example
 * // This example returns 3 Responses. This time, if the document doesn't have any responses, the formula returns the message No Responses.
 * rosettajs.document.docDescendants("No Responses";"% Responses");
 * @example
 * // This example returns There are 3 Responses. If the document has one response, the message is 1 Response; if the document has no responses, the message is No Responses.
 * rosettajs.document.docDescendants("No Responses";"1 Response";"There are % Responses.");
 */
function docDescendants(string1, string2, string3) {
    return notesf().DocDescendants(string1, string2, string3);
}
exports.docDescendants = docDescendants;
/**
 * Returns a string that represents the entry number of the parent view entry. Both the current view entry and the parent can be either documents or categories.
 * @param {string} [separator] Optional. Indicates a separator to be used in the parent document number instead of "." (period); must be one character.
 * An empty string (""), Tells the function to return the least significant item of the parent document number (in other words, its rightmost component).
 * @returns {string} The value that represents the parent document number of the document or category in the view.
 * @example
 * rosettajs.Document.docParentNumber(); // This example returns 37.1 for entry 37.1.3
 * @example
 * rosettajs.Document.docParentNumber("-"); // This example returns 37-1 for entry 37.1.3
 * @example
 * rosettajs.Document.docParentNumber(""); // This example returns 1 for entry 37.1.3
 */
function docParentNumber(separator) {
    return notesf().DocParentNumber(separator);
}
exports.docParentNumber = docParentNumber;
/**
 * Returns a string that represents the total number of entries at the same level as a view entry (document or category).
 * The returned total includes the document itself. For example, if the document is entry 8.2, and entries 8.1, 8.3, and 8.4 also exist, then there are four
 * document siblings.
 * @returns {string} The number of entries at the same level as the document or category.
 * @example
 * // Returns Response 1 of 4 to Current Vacation Policy if the document is one of four responses to a document with the string Current® Vacation Policy in the Topic field
 * if (voltmx.rosettajs.Document.isNewDoc()) {
 *  return "New Document";
 * } else {
 * return "Response " + voltmx.rosettajs.Document.docNumber(" ") + " of " + voltmx.rosettajs.Document.docSiblings() + " to " + voltmx.rosettajs.Document.getField("Topic");
 * }
 */
function docSiblings() {
    return notesf().DocSiblings();
}
exports.docSiblings = docSiblings;
/**
 * Displays a modal window that contains either:
 * - A view you specify from which the user can select one or more documents.
 * &#64;pickList returns a column value from the selected document(s).
 * - A dialog box, displaying information from all available Domino® Directories.
 * The user can select one or more person, group, server, room, or resource names,
 * and &#64;pickList returns those names.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function pickList() {
    return notesf().PickList();
}
exports.pickList = pickList;
/**
 * Get html to generate a prompt.
 * @param style - The type of prompt to generate
 * @param title - The title for the prompt
 * @param [promptString] - Optional. Text to display with the prompt
 * @param [defaultChoice] - Optional. Default choice to select when the prompt is displayed.
 * @param [choiceList] - Optional. The list of avaliable choices
 * @returns A promise that will inject the code for the prompt into the document.
 */
function prompt(style, title, promptString, defaultChoice, choiceList) {
    if (!style) {
        return Promise.reject(new Error('Insufficient arguments'));
    }
    if (choiceList && !Array.isArray(choiceList)) {
        return Promise.reject(new Error('Invalid list type'));
    }
    let boxStyle = '';
    if (Array.isArray(style)) {
        // get prompt type
        style = style.filter(function (item) {
            return item.toUpperCase() !== 'NOSORT';
        });
        // style param is valid only [type] or [type, 'NOSORT']
        if (style.length > 1) {
            return Promise.reject(new Error('Invalid Prompt type'));
        }
        boxStyle = style[0];
    }
    else {
        boxStyle = style;
        choiceList === null || choiceList === void 0 ? void 0 : choiceList.sort(Intl.Collator().compare); // sort choiceList by default
    }
    style = common_1.PromptStyle[boxStyle.toUpperCase()] || '';
    if (!style) {
        return Promise.reject(new Error('Invalid Prompt type'));
    }
    return notesf().Prompt(style, title, promptString, defaultChoice, choiceList);
}
exports.prompt = prompt;
/**
 * Returns the number of responses (in the current view) to the document.
 * @returns {number} value. The number of responses to the document.
 * @example
 * // Returns 5 if there are five responses to the document.
 * voltmx.rosettajs.responses();
 * @example
 * // Returns the string "No one has responded to this document" if there are no responses to the current document; otherwise a blank is returned.
 * if (voltmx.rosettajs.responses() === 0) {
 *  return "No one has responded to this document";
 * } else {
 * return " ";
 * }
 */
function responses() {
    return notesf().Responses();
}
exports.responses = responses;
/**
 * Assigns a value to a field stored within a document (use &#64;set for temporary
 * variables). This is similar to using the FIELD keyword, except that &#64;setField
 * can be used within another &#64;function. If the field does not exist, this
 * command creates it and applies the specified value to it.
 * @param {string} fieldName The name of a field in the current document.
 * @param {*} value The value to set the field.
 */
function setField(fieldName, value) {
    return notesf().SetField(fieldName, value);
}
exports.setField = setField;
/**
 * Returns a specified string if the current document of a view is defined as a category.
 * @param [trueString] {string} A string to return if an item in the view row is a category.
 * @param [falseString] {string} A string to return if no item in the row is a category.
 * @returns If no parameters are specified, the function returns an asterisk (&#42;) if the current document is a category.
 * Otherwise returns an empty string. If trueString is specified, returns trueString instead
 * of asterisk (&#42;). If falseString is specified, returns falseString instead of an empty string.
 * @see For further information, see {@link https://help.hcltechsw.com/dom_designer/14.0.0/basic/H_ISCATEGORY.html | hcltechsw.com}
 * @example
 * // This example returns * if the row is a category, or nothing if the row is not a category.
 * voltmx.rosettajs.isCategory();
 * @example
 * // This example returns C if the row is a category, or nothing if the row is not a category.
 * voltmx.rosettajs.isCategory("C");
 * @example
 * // This example returns Y if the row is a category, or N if the row is not a category.
 * voltmx.rosettajs.isCategory("Y", "N");
 */
function isCategory(trueString, falseString) {
    return notesf().IsCategory(trueString, falseString);
}
exports.isCategory = isCategory;
/* --------------------------------------------------------------- */
/* Moved from Miscellaneous category                               */
/**
 * Adds current document to one folder while removing it from another. NULL string
 * can be substituted for either argument to skip the action.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function addToFolder() {
    return notesf().AddToFolder();
}
exports.addToFolder = addToFolder;
/**
 * Locks, unlocks, returns the locked status of the current document, or indicates
 * if a database has document locking enabled.
 * @throws {Error} no plans to implement
 */
function docLock() {
    return notesf().DocLock();
}
exports.docLock = docLock;
/**
 * In an agent that runs a formula, &#64;HardDeleteDocument permanently removes the
 * document currently being processed from the database if the database has soft
 * deletions enabled. If the database does not have soft deletions enabled,
 * &#64;HardDeleteDocument performs the same action as @DeleteDocument.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function hardDeleteDocument() {
    return notesf().HardDeleteDocument();
}
exports.hardDeleteDocument = hardDeleteDocument;
/**
 * Opens the specified document within a new window.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function openInNewWindow() {
    return notesf().OpenInNewWindow();
}
exports.openInNewWindow = openInNewWindow;
/**
 * Allows you to specify a target frame when opening a view, page, or frameset, or
 * when composing or editing a document.
 * @throws {Error} no plans to implement
 */
function setTargetFrame() {
    return notesf().SetTargetFrame();
}
exports.setTargetFrame = setTargetFrame;
/**
 * Displays the parent document preview pane.
 * @throws {Error} no plans to implement
 */
function showParentPreview() {
    return notesf().ShowParentPreview();
}
exports.showParentPreview = showParentPreview;
/**
 * In a database with "Allow soft deletions" selected, this command restores a
 * deleted document.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function undeleteDocument() {
    return notesf().UndeleteDocument();
}
exports.undeleteDocument = undeleteDocument;
/**
 * Displays the Folders dialog box, which allows you to select a folder in which to
 * file the current document.
 * @throws {Error} no plans to implement
 */
function chooseFolders() {
    return notesc().ChooseFolders();
}
exports.chooseFolders = chooseFolders;
/**
 * Displays the "Folders containing current document" dialog box.
 * @throws {Error} no plans to implement
 */
function discoverFolders() {
    return notesc().DiscoverFolders();
}
exports.discoverFolders = discoverFolders;
/**
 * Marks the currently selected document for deletion.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function moveToTrash() {
    return notesc().MoveToTrash();
}
exports.moveToTrash = moveToTrash;
/**
 * Deletes documents marked for deletion in a database.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function emptyTrash() {
    return notesc().EmptyTrash();
}
exports.emptyTrash = emptyTrash;
/**
 * Removes the selected document from the current folder.
 * @throws {Error} method not implemented
 * @TODO this needs to be implemented
 */
function removeFromFolder() {
    return notesc().RemoveFromFolder();
}
exports.removeFromFolder = removeFromFolder;
/**
 * Displays the Properties box for the currently selected Notes® object. For
 * example, if a document is selected in a view, displays the document Properties
 * box; if a field is selected on a form, displays the field Properties box.
 * @throws {Error} no plans to implement
 */
function showProperties() {
    return notesc().ShowProperties();
}
exports.showProperties = showProperties;
/**
 * Changes the form used to display the current document.
 * @throws {Error} no plans to implement
 */
function switchForm() {
    return notesc().SwitchForm();
}
exports.switchForm = switchForm;
/**
 * In a document in Edit mode, moves the insertion point to the next editable field.
 * @throws {Error} no plans to implement
 */
function v3EditNextField() {
    return notesc().V3EditNextField();
}
exports.v3EditNextField = v3EditNextField;
/**
 * In a document in Edit mode, moves the insertion point to the first editable field.
 * @throws {Error} no plans to implement
 */
function v3EditPrevField() {
    return notesc().V3EditPrevField();
}
exports.v3EditPrevField = v3EditPrevField;
/**
 * Returns the approximate size of a document in bytes.
 * @throws {Error} No plans to implement
 */
function docLength() {
    return notesf().DocLength();
}
exports.docLength = docLength;
/**
 * In an agent that runs a formula, indicates whether or not you want to save the
 * changes to a document.
 * @throws {Error} No plans to implement
 */
function docMark() {
    return notesf().DocMark();
}
exports.docMark = docMark;
/**
 * Returns the name, current row, or current column of the table that is in focus.

 * @throws {Error} No plans to implement
 */
function getFocusTable() {
    return notesf().GetFocusTable();
}
exports.getFocusTable = getFocusTable;
/**
 * The unique ID of the current document's inheritance parent. See
 * &#64;documentUniqueID for a description of unique IDs.
 * @throws {Error} No plans to implement
 */
function inheritedDocumentUniqueID() {
    return notesf().InheritedDocumentUniqueID();
}
exports.inheritedDocumentUniqueID = inheritedDocumentUniqueID;
/**
 * Checks the current status of the document and returns 1 (True) if the document
 * is being edited; otherwise returns 0 (False).
 * @throws {Error} No plans to implement
 */
function isDocBeingEdited() {
    return notesf().IsDocBeingEdited();
}
exports.isDocBeingEdited = isDocBeingEdited;
/**
 * Checks the current status of the document and returns 1 (True) if the document
 * is being loaded into memory for display; otherwise returns 0 (False).
 * @throws {Error} No plans to implement
 */
function isDocBeingLoaded() {
    return notesf().IsDocBeingLoaded();
}
exports.isDocBeingLoaded = isDocBeingLoaded;
/**
 * Checks the current status of the document and returns 1 (True) if the document
 * is being mailed; otherwise, returns 0 (False).
 * @throws {Error} No plans to implement
 */
function isDocBeingMailed() {
    return notesf().IsDocBeingMailed();
}
exports.isDocBeingMailed = isDocBeingMailed;
/**
 * Checks the current status of the document and returns 1 (True) if the document
 * is being recalculated; otherwise, returns 0 (False).
 * @throws {Error} No plans to implement
 */
function isDocBeingRecalculated() {
    return notesf().IsDocBeingRecalculated();
}
exports.isDocBeingRecalculated = isDocBeingRecalculated;
/**
 * Checks the current status of the document and returns 1 (True) if the document
 * is being saved; otherwise, returns 0 (False).
 * @throws {Error} No plans to implement
 */
function isDocBeingSaved() {
    return notesf().IsDocBeingSaved();
}
exports.isDocBeingSaved = isDocBeingSaved;
/**
 * The ID number of the current document.
 * @throws {Error} No plans to implement
 */
function noteID() {
    return notesf().NoteID();
}
exports.noteID = noteID;
/**
 * Indicates whether a field is locked by an administration policy and cannot be
 * modified.
 * @throws {Error} No plans to implement
 */
function policyIsFieldLocked() {
    return notesf().PolicyIsFieldLocked();
}
exports.policyIsFieldLocked = policyIsFieldLocked;
/**
 * Deletes the value of an editable field.
 * @throws {Error} No plans to implement
 */
function unavailable() {
    return notesf().Unavailable();
}
exports.unavailable = unavailable;
/**
 * Creates a document using the current form or Page, so you can test its fields,
 * formulas, and scripts.
 * @throws {Error} no plans to implement
 */
function formTestDocument() {
    return notesc().FormTestDocument();
}
exports.formTestDocument = formTestDocument;
/**
 * Returns the names of the folders containing the current document.
 * @throws {Error} no plans to implement
 */
function whichFolders() {
    return notesf().WhichFolders();
}
exports.whichFolders = whichFolders;
//# sourceMappingURL=document.js.map