UNPKG

@asoftwareworld/form-builder-pro

Version:

ASW Form Builder Pro helps you with rapid development and designed web forms which includes several controls. The key feature of Form Builder is to make your content attractive and effective. We can customize our control at run time and preview the same b

220 lines (204 loc) 6.85 kB
/** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ class CropperSettings { // From options format = 'png'; output = 'blob'; maintainAspectRatio = true; transform = {}; aspectRatio = 1; resetCropOnAspectRatioChange = true; resizeToWidth = 0; resizeToHeight = 0; cropperMinWidth = 0; cropperMinHeight = 0; cropperMaxHeight = 0; cropperMaxWidth = 0; cropperStaticWidth = 0; cropperStaticHeight = 0; canvasRotation = 0; initialStepSize = 3; roundCropper = false; onlyScaleDown = false; imageQuality = 92; autoCrop = true; backgroundColor = null; containWithinAspectRatio = false; hideResizeSquares = false; alignImage = 'center'; cropperFrameAriaLabel = 'Crop photo'; // Internal cropperScaledMinWidth = 20; cropperScaledMinHeight = 20; cropperScaledMaxWidth = 20; cropperScaledMaxHeight = 20; stepSize = this.initialStepSize; setOptions(options) { Object.keys(options) .filter((k) => k in this) .forEach((k) => (this[k] = options[k])); this.validateOptions(); } setOptionsFromChanges(changes) { Object.keys(changes) .filter((k) => k in this) .forEach((k) => (this[k] = changes[k].currentValue)); this.validateOptions(); } validateOptions() { if (this.maintainAspectRatio && !this.aspectRatio) { throw new Error('`aspectRatio` should > 0 when `maintainAspectRatio` is enabled'); } } } /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ var MoveTypes; (function (MoveTypes) { MoveTypes["Drag"] = "drag"; MoveTypes["Move"] = "move"; MoveTypes["Resize"] = "resize"; MoveTypes["Pinch"] = "pinch"; })(MoveTypes || (MoveTypes = {})); /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ const aswEditorConfig = { editable: true, spellcheck: true, height: 'auto', minHeight: '0', maxHeight: 'auto', width: 'auto', minWidth: '0', translate: 'yes', enableToolbar: true, showToolbar: true, placeholder: 'Enter text here...', defaultParagraphSeparator: '', defaultFontSize: '', uploadUrl: 'v1/image', uploadWithCredentials: false, sanitize: true, toolbarPosition: 'top', outline: true }; /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ var CSSFrameworkEnum; (function (CSSFrameworkEnum) { CSSFrameworkEnum["Material"] = "material"; CSSFrameworkEnum["Bootstrap"] = "bootstrap"; })(CSSFrameworkEnum || (CSSFrameworkEnum = {})); var ControlPersonalizationEnum; (function (ControlPersonalizationEnum) { ControlPersonalizationEnum["Header"] = "header"; ControlPersonalizationEnum["TextField"] = "textfield"; ControlPersonalizationEnum["TextArea"] = "textarea"; ControlPersonalizationEnum["Paragraph"] = "paragraph"; ControlPersonalizationEnum["Divider"] = "divider"; ControlPersonalizationEnum["SlideToggle"] = "slide-toggle"; ControlPersonalizationEnum["Button"] = "button"; ControlPersonalizationEnum["Autocomplete"] = "autocomplete"; ControlPersonalizationEnum["Select"] = "select"; ControlPersonalizationEnum["MultiSelect"] = "multi-select"; ControlPersonalizationEnum["Radio"] = "radio"; ControlPersonalizationEnum["Checkbox"] = "checkbox"; ControlPersonalizationEnum["Number"] = "number"; ControlPersonalizationEnum["Currency"] = "currency"; ControlPersonalizationEnum["Calculation"] = "calculation"; ControlPersonalizationEnum["Email"] = "email"; ControlPersonalizationEnum["PhoneNumber"] = "phone-number"; ControlPersonalizationEnum["Tags"] = "tags"; ControlPersonalizationEnum["URL"] = "url"; ControlPersonalizationEnum["Datepicker"] = "datepicker"; ControlPersonalizationEnum["GPS"] = "gps"; ControlPersonalizationEnum["Fileupload"] = "fileupload"; ControlPersonalizationEnum["Image"] = "image"; ControlPersonalizationEnum["Signature"] = "signature"; ControlPersonalizationEnum["Drawing"] = "drawing"; ControlPersonalizationEnum["QRCode"] = "qr-code"; ControlPersonalizationEnum["Columns"] = "columns"; })(ControlPersonalizationEnum || (ControlPersonalizationEnum = {})); var PropertyPersonalizationEnum; (function (PropertyPersonalizationEnum) { PropertyPersonalizationEnum["UniqueId"] = "uniqueId"; PropertyPersonalizationEnum["CustomCSSClass"] = "customCSSClass"; PropertyPersonalizationEnum["InputMask"] = "inputMask"; PropertyPersonalizationEnum["InputMaskCustomErrorMsg"] = "inputMaskCustomErrorMsg"; PropertyPersonalizationEnum["MinLength"] = "minLength"; PropertyPersonalizationEnum["MaxLength"] = "maxLength"; })(PropertyPersonalizationEnum || (PropertyPersonalizationEnum = {})); /** * @license * Copyright ASW (A Software World) All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file */ /** * Generated bundle index. Do not edit. */ export { CSSFrameworkEnum, ControlPersonalizationEnum, CropperSettings, MoveTypes, PropertyPersonalizationEnum, aswEditorConfig }; //# sourceMappingURL=asoftwareworld-form-builder-pro-api.mjs.map