asposewordscloud
Version:
Aspose.Words Cloud SDK for Node.js
103 lines (102 loc) • 4.04 kB
JavaScript
/*
* --------------------------------------------------------------------------------
* <copyright company="Aspose" file="formFieldTextInput.ts">
* Copyright (c) 2025 Aspose.Words for Cloud
* </copyright>
* <summary>
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* </summary>
* --------------------------------------------------------------------------------
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.FormFieldTextInput = exports.importsMapFormFieldTextInput = void 0;
const formField_1 = require("./formField");
exports.importsMapFormFieldTextInput = {
FormField: formField_1.FormField,
};
/**
* FormField text input element.
*/
class FormFieldTextInput extends formField_1.FormField {
/**
* Returns attribute type map
*/
static getAttributeTypeMap() {
return super.getAttributeTypeMap().concat(FormFieldTextInput.attributeTypeMap);
}
constructor(init) {
super(init);
Object.assign(this, init);
}
collectFilesContent(_resultFilesContent) {
}
validate() {
super.validate();
if (this.textInputFormat === null || this.textInputFormat === undefined) {
throw new Error('Property TextInputFormat in FormFieldTextInput is required.');
}
if (this.textInputDefault === null || this.textInputDefault === undefined) {
throw new Error('Property TextInputDefault in FormFieldTextInput is required.');
}
}
}
exports.FormFieldTextInput = FormFieldTextInput;
/**
* Attribute type map
*/
FormFieldTextInput.attributeTypeMap = [
{
name: "textInputFormat",
baseName: "TextInputFormat",
type: "string",
},
{
name: "textInputType",
baseName: "TextInputType",
type: "FormFieldTextInput.TextInputTypeEnum",
},
{
name: "textInputDefault",
baseName: "TextInputDefault",
type: "string",
},
{
name: "maxLength",
baseName: "MaxLength",
type: "number",
}
];
/**
* Enums for FormFieldTextInput
*/
// tslint:disable:quotemark
// tslint:disable-next-line:no-namespace
(function (FormFieldTextInput) {
let TextInputTypeEnum;
(function (TextInputTypeEnum) {
TextInputTypeEnum[TextInputTypeEnum["Regular"] = 'Regular'] = "Regular";
TextInputTypeEnum[TextInputTypeEnum["Number"] = 'Number'] = "Number";
TextInputTypeEnum[TextInputTypeEnum["Date"] = 'Date'] = "Date";
TextInputTypeEnum[TextInputTypeEnum["CurrentDate"] = 'CurrentDate'] = "CurrentDate";
TextInputTypeEnum[TextInputTypeEnum["CurrentTime"] = 'CurrentTime'] = "CurrentTime";
TextInputTypeEnum[TextInputTypeEnum["Calculated"] = 'Calculated'] = "Calculated";
})(TextInputTypeEnum = FormFieldTextInput.TextInputTypeEnum || (FormFieldTextInput.TextInputTypeEnum = {}));
})(FormFieldTextInput = exports.FormFieldTextInput || (exports.FormFieldTextInput = {}));
// tslint:enable:quotemark
;