-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathsmart-webcomponents-angular-validator.js.map
1 lines (1 loc) · 12.8 KB
/
smart-webcomponents-angular-validator.js.map
1
{"version":3,"file":"smart-webcomponents-angular-validator.js","sources":["ng://smart-webcomponents-angular/validator/smart.element.ts","ng://smart-webcomponents-angular/validator/smart.validator.ts","ng://smart-webcomponents-angular/validator/smart.validator.module.ts","ng://smart-webcomponents-angular/validator/smart-webcomponents-angular-validator.ts"],"sourcesContent":["\ndeclare global {\n interface Window {\n Smart: any;\n}\n}\n\n\nimport { ElementRef, Input, Output, EventEmitter } from '@angular/core';\nimport { ElementRenderMode } from './../index';\n\nexport class BaseElement {\n constructor(ref: ElementRef) {\n const that = this;\n this.nativeElement = ref.nativeElement as any;\n\n that.nativeElement.onAttached = () => {\n that.onAttach.emit(that.nativeElement);\n }\n\n that.nativeElement.onDetached = () => {\n that.onDetach.emit(that.nativeElement);\n }\n }\n\n @Output() onCreate: EventEmitter<any> = new EventEmitter();\n @Output() onReady: EventEmitter<any> = new EventEmitter();\n @Output() onAttach: EventEmitter<any> = new EventEmitter();\n @Output() onDetach: EventEmitter<any> = new EventEmitter();\n\n public nativeElement: any;\n\n public addEventListener(type: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions = false): void {\n this.nativeElement.addEventListener(type, listener, options);\n\t}\n\n\tpublic removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions = false): void {\n\t\tthis.nativeElement.removeEventListener(type, listener, options);\n\t}\n\n\tpublic dispatchEvent(event: Event): boolean {\n\t\treturn this.nativeElement.dispatchEvent(event);\n\t}\n\n\tpublic blur(): void {\n\t\tthis.nativeElement.blur();\n\t}\n\n\tpublic click(): void {\n\t\tthis.nativeElement.click();\n\t}\n\n\tpublic focus(options?: FocusOptions): void {\n\t\tthis.nativeElement.focus(options);\n\t}\n\n/** @description Sets or gets the language. Used in conjunction with the property messages. */\n\t@Input()\n\tget locale(): string {\n\t\treturn this.nativeElement ? this.nativeElement.locale : undefined;\n\t}\n\tset locale(value: string) {\n\t\tthis.nativeElement ? this.nativeElement.locale = value : undefined;\n\t}\n\n\t/** @description Callback used to customize the format of the messages that are returned from the Localization Module. */\n\t@Input()\n\tget localizeFormatFunction(): any {\n\t\treturn this.nativeElement ? this.nativeElement.localizeFormatFunction : undefined;\n\t}\n\tset localizeFormatFunction(value: any) {\n\t\tthis.nativeElement ? this.nativeElement.localizeFormatFunction = value : undefined;\n\t}\n\n\t/** @description Sets or gets an object specifying strings used in the widget that can be localized. Used in conjunction with the property locale. */\n\t@Input()\n\tget messages(): any {\n\t\treturn this.nativeElement ? this.nativeElement.messages : undefined;\n\t}\n\tset messages(value: any) {\n\t\tthis.nativeElement ? this.nativeElement.messages = value : undefined;\n\t}\n\n\t/** @description Sets or gets the value indicating whether the element is aligned to support locales using right-to-left fonts. */\n\t@Input()\n\tget rightToLeft(): boolean {\n\t\treturn this.nativeElement ? this.nativeElement.rightToLeft : undefined;\n\t}\n\tset rightToLeft(value: boolean) {\n\t\tthis.nativeElement ? this.nativeElement.rightToLeft = value : undefined;\n\t}\n\n\t/** @description Determines the theme. Theme defines the look of the element */\n\t@Input()\n\tget theme(): string {\n\t\treturn this.nativeElement ? this.nativeElement.theme : undefined;\n\t}\n\tset theme(value: string) {\n\t\tthis.nativeElement ? this.nativeElement.theme = value : undefined;\n\t}\n}\n\nexport const Smart: any = window.Smart;\n\n","import { Validator } from './../index';\nimport { ValidatorRuleType, ValidatorRule, ElementRenderMode} from './../index';\nimport { Component, Directive, AfterViewInit, ElementRef, Input, OnInit, OnChanges, OnDestroy, SimpleChanges, Output, EventEmitter } from '@angular/core';\nimport { BaseElement, Smart } from './smart.element';\nexport { ValidatorRuleType, ValidatorRule, ElementRenderMode} from './../index';\nexport { Smart } from './smart.element';\nexport { Validator } from './../index';\n\n\n@Directive({\n\texportAs: 'jqxValidator',\tselector: 'jqxValidator, [jqxValidator]'\n})\n\nexport class ValidatorComponent extends BaseElement implements OnInit, AfterViewInit, OnDestroy, OnChanges {\n\tconstructor(ref: ElementRef<Validator>) {\n\t\tsuper(ref);\n\t\tthis.nativeElement = ref.nativeElement as Validator;\n\t}\n\n\tprivate eventHandlers: any[] = [];\n\n\tpublic nativeElement: Validator;\n\t/** @description Creates the component on demand.\n\t * @param properties An optional object of properties, which will be added to the template binded ones.\n\t */\n\tpublic createComponent(properties = {}): any {\n \tthis.nativeElement = <Validator>document.createElement('jqxValidator');\n\t\tfor (let propertyName in properties) { \n \t\t\tthis.nativeElement[propertyName] = properties[propertyName];\n\t\t}\n\t\treturn this.nativeElement;\n\t}\n\t/** @description */\n\t@Input()\n\tget rules(): ValidatorRule[] {\n\t\treturn this.nativeElement ? this.nativeElement.rules : undefined;\n\t}\n\tset rules(value: ValidatorRule[]) {\n\t\tthis.nativeElement ? this.nativeElement.rules = value : undefined;\n\t}\n\n\t/** @description A valid CSS selector of an element on the page to be used as a container for validation error messages. */\n\t@Input()\n\tget validationSummarySelector(): string {\n\t\treturn this.nativeElement ? this.nativeElement.validationSummarySelector : undefined;\n\t}\n\tset validationSummarySelector(value: string) {\n\t\tthis.nativeElement ? this.nativeElement.validationSummarySelector = value : undefined;\n\t}\n\n\t/** @description Clears the error messages. \n\t*/\n public reset(): void {\n if (this.nativeElement.isRendered) {\n this.nativeElement.reset();\n }\n else\n {\n this.nativeElement.whenRendered(() => {\n this.nativeElement.reset();\n });\n }\n }\n\n\t/** @description Opens the dropDown. \n\t* @param {Function} result?. A callback function to call when validating inputs.\n\t*/\n public validate(result?: Function): void {\n if (this.nativeElement.isRendered) {\n this.nativeElement.validate(result);\n }\n else\n {\n this.nativeElement.whenRendered(() => {\n this.nativeElement.validate(result);\n });\n }\n }\n\n\n\tget isRendered(): boolean {\n\t\treturn this.nativeElement ? this.nativeElement.isRendered : false;\n\t}\n\n\tngOnInit() {\n\t}\n\n ngAfterViewInit() {\n const that = this;\n\n that.onCreate.emit(that.nativeElement);\n\n\t\tSmart.Render();\n\n\t\tthis.nativeElement.classList.add('smart-angular');\n\n\t\tthis.nativeElement.whenRendered(() => { that.onReady.emit(that.nativeElement); });\n\t\tthis.listen();\n\t}\n\n\tngOnDestroy() {\n\t\tthis.unlisten();\n\t}\n\n\tngOnChanges(changes: SimpleChanges) {\n\t\tif (this.nativeElement && this.nativeElement.isRendered) {\n\t\t\tfor (const propName in changes) {\n\t\t\t\tif (changes.hasOwnProperty(propName)) {\n\t\t\t\t\tthis.nativeElement[propName] = changes[propName].currentValue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/** @description Add event listeners. */\n\tprivate listen(): void {\n const that = this;\n\t}\n\n\t/** @description Remove event listeners. */\n\tprivate unlisten(): void {\n const that = this;\n\t}\n}\n","import { NgModule } from '@angular/core';\n\nimport { ValidatorComponent } from './smart.validator';\nimport { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';\n\n@NgModule({\n declarations: [ValidatorComponent],\n\tschemas: [CUSTOM_ELEMENTS_SCHEMA],\n\texports: [ValidatorComponent]\n})\n\nexport class ValidatorModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {BaseElement as ɵa} from './smart.element';"],"names":["tslib_1.__decorate"],"mappings":";;;MAWa,WAAW;IACpB,YAAY,GAAe;QAajB,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;QACjD,YAAO,GAAsB,IAAI,YAAY,EAAE,CAAC;QAChD,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;QACjD,aAAQ,GAAsB,IAAI,YAAY,EAAE,CAAC;QAfvD,MAAM,IAAI,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,aAAoB,CAAC;QAE9C,IAAI,CAAC,aAAa,CAAC,UAAU,GAAG;YAC5B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;SAC1C,CAAA;QAED,IAAI,CAAC,aAAa,CAAC,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