open.js

"use strict";
/***************************************************
* Licensed Materials - Property of HCL.
* (c)Copyright HCL America, Inc. 2023-2024
****************************************************/
Object.defineProperty(exports, "__esModule", { value: true });
exports.openView = exports.openDocument = exports.openPage = exports.openNavigator = exports.openHelpDocument = exports.openFrameset = exports.openCalendar = exports._notes_vmx = exports._notes = void 0;
const tslib_1 = require("tslib");
/**
 * @file Open
 * @module open
 * @category Open
 */
const notesc_base = tslib_1.__importStar(require("../notes/open"));
const notesc_vmx = tslib_1.__importStar(require("../notes/voltmx/open"));
const API = tslib_1.__importStar(require("../rosetta/API"));
const notesc = () => API.isCurrentFrameworkVoltMX() ? notesc_vmx : notesc_base;
exports._notes = notesc_base;
exports._notes_vmx = notesc_vmx;
//-----------------------------
// Notes @Commands open
/**
 * Opens a mail file to the Calendar view.
 * @throws {Error} no plans to implement
 */
function openCalendar() {
    return notesc().OpenCalendar();
}
exports.openCalendar = openCalendar;
/**
 * Opens a frameset defined for the current database. Framesets provide a way for
 * designers to display several pages at the same time. A frame is actually one
 * page; a frameset is a collection of pages. Page designers can create links
 * between frames. A major advantage of framesets is the ability to leave one page
 * constant as users scroll or link to other pages.
 * @throws {Error} no plans to implement
 */
function openFrameset() {
    return notesc().OpenFrameset();
}
exports.openFrameset = openFrameset;
/**
 * Allows you to create your own context-sensitive help documents. To use this
 * command, you must first create a view that has a sorted first column containing
 * key values that uniquely identify each help document. @Command([OpenHelpDocument])
 * searches this sorted view for the specified key value and, if found, displays
 * the associated help document in a separate Help window.
 * @throws {Error} no plans to implement
 */
function openHelpDocument() {
    return notesc().OpenHelpDocument();
}
exports.openHelpDocument = openHelpDocument;
/**
 * Opens a navigator defined for the selected database.
 * @throws {Error} no plans to implement
 */
function openNavigator() {
    return notesc().OpenNavigator();
}
exports.openNavigator = openNavigator;
/**
 * Opens a page defined for the current database. A page is a design element that
 * structures and displays information, including text, graphics, applets, and
 * links. Unlike a form, a page cannot contain fields, subforms, layout regions,
 * and some embedded controls.
 * @throws {Error} no plans to implement
 */
function openPage() {
    return notesc().OpenPage();
}
exports.openPage = openPage;
/**
 * Opens a document.
 * @returns {Promise<boolean>}
 */
function openDocument(writeOrReadOnly, UNID) {
    return notesc().OpenDocument(writeOrReadOnly, UNID);
}
exports.openDocument = openDocument;
/**
 * Opens the specified view in the current database.
 * @returns {Promise<boolean>}
 */
function openView() {
    return notesc().OpenView();
}
exports.openView = openView;
//# sourceMappingURL=open.js.map