{"version":3,"file":"asoftwareworld-form-builder-pro-api.mjs","sources":["../../src/components/api/image-crop/cropper-options.interface.ts","../../src/components/api/image-crop/cropper-position.interface.ts","../../src/components/api/image-crop/cropper.settings.ts","../../src/components/api/image-crop/dimensions.interface.ts","../../src/components/api/image-crop/exif-transform.interface.ts","../../src/components/api/image-crop/image-cropped-event.interface.ts","../../src/components/api/image-crop/image-transform.interface.ts","../../src/components/api/image-crop/move-start.interface.ts","../../src/components/api/editor-config.ts","../../src/components/api/control-option.ts","../../src/components/api/control.ts","../../src/components/api/control-personalization.ts","../../src/components/api/property-personalization.ts","../../src/components/api/public_api.ts","../../src/components/api/asoftwareworld-form-builder-pro-api.ts"],"sourcesContent":["/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { ImageTransform } from './image-transform.interface';\n\nexport interface CropperOptions {\n    format: OutputFormat;\n    maintainAspectRatio: boolean;\n    resetCropOnAspectRatioChange: boolean;\n    transform: ImageTransform;\n    aspectRatio: number;\n    resizeToWidth: number;\n    resizeToHeight: number;\n    cropperMinWidth: number;\n    cropperMinHeight: number;\n    cropperMaxHeight: number;\n    cropperMaxWidth: number;\n    cropperStaticWidth: number;\n    cropperStaticHeight: number;\n    canvasRotation: number;\n    initialStepSize: number;\n    roundCropper: boolean;\n    onlyScaleDown: boolean;\n    imageQuality: number;\n    autoCrop: boolean;\n    backgroundColor: string;\n    containWithinAspectRatio: boolean;\n    hideResizeSquares: boolean;\n    alignImage: 'left' | 'center';\n}\n\nexport type OutputFormat = 'png' | 'jpeg' | 'bmp' | 'webp' | 'ico';\nexport type OutputType = 'base64' | 'blob';\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nexport interface CropperPosition {\n    x1: number;\n    y1: number;\n    x2: number;\n    y2: number;\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { SimpleChanges } from '@angular/core';\nimport { CropperOptions, OutputFormat, OutputType } from './cropper-options.interface';\nimport { ImageTransform } from './image-transform.interface';\n\nexport class CropperSettings {\n    // From options\n    format: OutputFormat = 'png';\n    output: OutputType = 'blob';\n    maintainAspectRatio = true;\n    transform: ImageTransform = {};\n    aspectRatio = 1;\n    resetCropOnAspectRatioChange = true;\n    resizeToWidth = 0;\n    resizeToHeight = 0;\n    cropperMinWidth = 0;\n    cropperMinHeight = 0;\n    cropperMaxHeight = 0;\n    cropperMaxWidth = 0;\n    cropperStaticWidth = 0;\n    cropperStaticHeight = 0;\n    canvasRotation = 0;\n    initialStepSize = 3;\n    roundCropper = false;\n    onlyScaleDown = false;\n    imageQuality = 92;\n    autoCrop = true;\n    backgroundColor: string | null = null;\n    containWithinAspectRatio = false;\n    hideResizeSquares = false;\n    alignImage: 'left' | 'center' = 'center';\n    cropperFrameAriaLabel = 'Crop photo';\n\n    // Internal\n    cropperScaledMinWidth = 20;\n    cropperScaledMinHeight = 20;\n    cropperScaledMaxWidth = 20;\n    cropperScaledMaxHeight = 20;\n    stepSize = this.initialStepSize;\n\n    setOptions(options: Partial<CropperOptions>): void {\n        Object.keys(options)\n            .filter((k) => k in this)\n            .forEach((k) => ((this as any)[k] = (options as any)[k]));\n        this.validateOptions();\n    }\n\n    setOptionsFromChanges(changes: SimpleChanges): void {\n        Object.keys(changes)\n            .filter((k) => k in this)\n            .forEach((k) => ((this as any)[k] = changes[k].currentValue));\n        this.validateOptions();\n    }\n\n    private validateOptions(): void {\n        if (this.maintainAspectRatio && !this.aspectRatio) {\n            throw new Error('`aspectRatio` should > 0 when `maintainAspectRatio` is enabled');\n        }\n    }\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nexport interface Dimensions {\n    width: number;\n    height: number;\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nexport interface ExifTransform {\n    rotate: number;\n    flip: boolean;\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { CropperPosition } from './cropper-position.interface';\n\nexport interface ImageCroppedEvent {\n    base64?: string | null;\n    blob?: Blob | null;\n    objectUrl?: string | null;\n    width: number;\n    height: number;\n    cropperPosition: CropperPosition;\n    imagePosition: CropperPosition;\n    offsetImagePosition?: CropperPosition;\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nexport interface ImageTransform {\n    scale?: number;\n    rotate?: number;\n    flipH?: boolean;\n    flipV?: boolean;\n    translateH?: number;\n    translateV?: number;\n    translateUnit?: '%' | 'px';\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { ImageTransform } from './image-transform.interface';\n\nexport interface MoveStart {\n    active: boolean;\n    type: MoveTypes | null;\n    position: string | null;\n    transform?: ImageTransform;\n    x1: number;\n    y1: number;\n    x2: number;\n    y2: number;\n    clientX: number;\n    clientY: number;\n}\n\nexport enum MoveTypes {\n    Drag = 'drag',\n    Move = 'move',\n    Resize = 'resize',\n    Pinch = 'pinch'\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { HttpEvent } from '@angular/common/http';\nimport { ElementRef } from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport interface CustomClass {\n    name: string;\n    class: string;\n    tag?: string;\n}\n\nexport interface Font {\n    name: string;\n    class: string;\n}\n\nexport interface UploadResponse {\n    imageUrl: string;\n}\n\nexport interface ElementDOM {\n    elementDOM: ElementRef<HTMLElement>;\n\n    /**\n     *\n     * @param id The id of the child element\n     */\n    getChildById(id: string): HTMLElement;\n}\n\nexport interface AswEditorConfig {\n    editable?: boolean;\n    spellcheck?: boolean;\n    height?: 'auto' | string;\n    minHeight?: '0' | string;\n    maxHeight?: 'auto' | string;\n    width?: 'auto' | string;\n    minWidth?: '0' | string;\n    translate?: 'yes' | 'now' | string;\n    enableToolbar?: boolean;\n    showToolbar?: boolean;\n    placeholder?: string;\n    defaultParagraphSeparator?: string;\n    defaultFontSize?: '1' | '2' | '3' | '4' | '5' | '6' | '7' | string;\n    uploadUrl?: string;\n    upload?: (file: File) => Observable<HttpEvent<UploadResponse>>;\n    uploadWithCredentials?: boolean;\n    customClasses?: CustomClass[];\n    sanitize?: boolean;\n    toolbarPosition?: 'top' | 'bottom';\n    outline?: boolean;\n    toolbarHiddenButtons?: string[][];\n    rawPaste?: boolean;\n}\n\nexport const aswEditorConfig: AswEditorConfig = {\n    editable: true,\n    spellcheck: true,\n    height: 'auto',\n    minHeight: '0',\n    maxHeight: 'auto',\n    width: 'auto',\n    minWidth: '0',\n    translate: 'yes',\n    enableToolbar: true,\n    showToolbar: true,\n    placeholder: 'Enter text here...',\n    defaultParagraphSeparator: '',\n    defaultFontSize: '',\n    uploadUrl: 'v1/image',\n    uploadWithCredentials: false,\n    sanitize: true,\n    toolbarPosition: 'top',\n    outline: true\n};\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nimport { Control } from './control';\n\nexport interface ControlOption {\n    key: string;\n    value: string;\n    isChecked: boolean;\n    hideControl?: Control[];\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\nexport interface Control {\n    id: string;\n    guid?: string;\n    controlType?: string;\n    tooltip: string;\n    label: string;\n    isRequired: boolean;\n    isDisabled?: boolean;\n    customClass?: string;\n}\n\nexport interface StyleControl {\n    style: 'fill' | 'outline';\n}\n\nexport interface ApiResponse {\n    apiUrl?: string;\n    headers?: string;\n    body?: any;\n    method?: string;\n}\n\nexport enum CSSFrameworkEnum {\n    Material = 'material',\n    Bootstrap = 'bootstrap'\n}\n","export enum ControlPersonalizationEnum {\n    Header = 'header',\n    TextField = 'textfield',\n    TextArea = 'textarea',\n    Paragraph = 'paragraph',\n    Divider = 'divider',\n    SlideToggle = 'slide-toggle',\n    Button = 'button',\n    Autocomplete = 'autocomplete',\n    Select = 'select',\n    MultiSelect = 'multi-select',\n    Radio = 'radio',\n    Checkbox = 'checkbox',\n    Number = 'number',\n    Currency = 'currency',\n    Calculation = 'calculation',\n    Email = 'email',\n    PhoneNumber = 'phone-number',\n    Tags = 'tags',\n    URL = 'url',\n    Datepicker = 'datepicker',\n    GPS = 'gps',\n    Fileupload = 'fileupload',\n    Image = 'image',\n    Signature = 'signature',\n    Drawing = 'drawing',\n    QRCode = 'qr-code',\n    Columns = 'columns'\n}\n","export enum PropertyPersonalizationEnum {\n    UniqueId = 'uniqueId',\n    CustomCSSClass = 'customCSSClass',\n    InputMask = 'inputMask',\n    InputMaskCustomErrorMsg = 'inputMaskCustomErrorMsg',\n    MinLength = 'minLength',\n    MaxLength = 'maxLength'\n}\n","/**\n * @license\n * Copyright ASW (A Software World) All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file\n */\n\nexport * from './image-crop/cropper-options.interface';\nexport * from './image-crop/cropper-position.interface';\nexport * from './image-crop/cropper.settings';\nexport * from './image-crop/dimensions.interface';\nexport * from './image-crop/exif-transform.interface';\nexport * from './image-crop/image-cropped-event.interface';\nexport * from './image-crop/image-transform.interface';\nexport * from './image-crop/index';\nexport * from './image-crop/loaded-image.interface';\nexport * from './image-crop/move-start.interface';\nexport * from './editor-config';\nexport * from './control-option';\nexport * from './control-length';\nexport * from './control';\nexport * from './control-personalization';\nexport * from './property-personalization';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":"AAAA;;;;;;AAMG;;ACNH;;;;;;AAMG;;ACNH;;;;;;AAMG;MAMU,eAAe,CAAA;;IAExB,MAAM,GAAiB,KAAK;IAC5B,MAAM,GAAe,MAAM;IAC3B,mBAAmB,GAAG,IAAI;IAC1B,SAAS,GAAmB,EAAE;IAC9B,WAAW,GAAG,CAAC;IACf,4BAA4B,GAAG,IAAI;IACnC,aAAa,GAAG,CAAC;IACjB,cAAc,GAAG,CAAC;IAClB,eAAe,GAAG,CAAC;IACnB,gBAAgB,GAAG,CAAC;IACpB,gBAAgB,GAAG,CAAC;IACpB,eAAe,GAAG,CAAC;IACnB,kBAAkB,GAAG,CAAC;IACtB,mBAAmB,GAAG,CAAC;IACvB,cAAc,GAAG,CAAC;IAClB,eAAe,GAAG,CAAC;IACnB,YAAY,GAAG,KAAK;IACpB,aAAa,GAAG,KAAK;IACrB,YAAY,GAAG,EAAE;IACjB,QAAQ,GAAG,IAAI;IACf,eAAe,GAAkB,IAAI;IACrC,wBAAwB,GAAG,KAAK;IAChC,iBAAiB,GAAG,KAAK;IACzB,UAAU,GAAsB,QAAQ;IACxC,qBAAqB,GAAG,YAAY;;IAGpC,qBAAqB,GAAG,EAAE;IAC1B,sBAAsB,GAAG,EAAE;IAC3B,qBAAqB,GAAG,EAAE;IAC1B,sBAAsB,GAAG,EAAE;AAC3B,IAAA,QAAQ,GAAG,IAAI,CAAC,eAAe;AAE/B,IAAA,UAAU,CAAC,OAAgC,EAAA;AACvC,QAAA,MAAM,CAAC,IAAI,CAAC,OAAO;aACd,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,IAAI;AACvB,aAAA,OAAO,CAAC,CAAC,CAAC,MAAO,IAAY,CAAC,CAAC,CAAC,GAAI,OAAe,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,EAAE;;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