/*! * * Wijmo Library 5.20261.52 * https://developer.mescius.com/wijmo * * Copyright(c) MESCIUS inc. All rights reserved. * * Licensed under the End-User License Agreement For MESCIUS Wijmo Software. * us.sales@mescius.com * https://developer.mescius.com/wijmo/licensing * */ /** * {@module wijmo.angular2.directivebase} * Basic Wijmo for Angular 2 module containing internal common services and platform options. * * wijmo.angular2.directivebase is an external TypeScript module that can be imported to your code * using its ambient module name. For example: * *
import * as wjBase from 'wijmo/wijmo.angular2.directivebase';
 *  
 * wjBase.WjOptions.asyncBindings = false;
* */ /** * */ export declare var ___keepComment: any; import * as i0 from '@angular/core'; import { EventEmitter, NgZone, ElementRef, Injector, ViewContainerRef, TemplateRef, EmbeddedViewRef } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; /** * Exposes global options for the Wijmo for Angular 2 interop. */ export declare class WjOptions { /** * Indicates whether Wijmo components update binding sources of the two-way bound properties asynchronously * or synchronously. * * If this property is set to true (default) then changes to the Wijmo components' properties * with two-way bindings (like WjInputNumber.value) will cause the component to update a binding * source property asynchronously, after the current change detection cycle is completed. * Otherwise, if this property is set to false, the binding source will be updated immediately. * A corresponding property change event (like WjInputNumber.valueChanged) is also triggered * asynchronously or synchronously depending on this property value, after the binding source * was updated. * * This global setting can be changed for specific instances of Wijmo components, by assigning * the component's asyncBindings property with a specific boolean value. * * Transition to asynchronous binding source updates has happened in Wijmo version 350. Before that version, * binding sources were updated immediately after the component's property change. In some cases this * could lead to the ExpressionChangedAfterItHasBeenCheckedError exception in the applications running * Angular in the debug mode. For example, if your component's property value is set to 0.12345, and * you two-way bind it to the value property of the WjInputNumber component with the format * property set to 'n2', the WjInputNumber immediately converts this value to 0.12. This change, * in turn, causes Angular to update your component property (the source of this binding), so that its * value changes from 0.12345 to 0.12. If this source update is performed synchronously then the binding * source property changes its value during the same change detection cycle, which is prohibited by Angular. * If Angular runs in debug mode then it executes a special check after every change detection cycle, which * detects this change and raises the ExpressionChangedAfterItHasBeenCheckedError exception. * Asynchronous binding source updates resolve this problem, because the binding source property * is updated after the current change detection cycle has finished. * * If the ExpressionChangedAfterItHasBeenCheckedError is not an issue for you, and parts of * you application logic are sensible to a moment when binding source update happens, you can change * this functionality by setting the global asyncBindings property to false. This should be * done before the first Wijmo component was instantiated by your application logic, and the best * place to do it is the file where you declare the application's root NgModule. This can be done * with the code like this: *
import * as wjBase from 'wijmo/wijmo.angular2.directivebase';
     * wjBase.WjOptions.asyncBindings = false;
* * Alternatively, you can change the update mode for the specific component using its own * asyncBindings property. For example: *
<wj-input-number [asyncBindings]="false" [(value)]="amount"></wj-input-number>
*/ static asyncBindings: boolean; static zonelessMode: boolean | 'auto'; } export declare function isNoopNgZoneLike(ngZone: any): boolean; export interface IWjMetaBase { selector: string; inputs: string[]; outputs: string[]; providers: any[]; } export interface IWjComponentMeta extends IWjMetaBase { template: string; } export interface IWjDirectiveMeta extends IWjMetaBase { exportAs: string; } export type ChangePropertyEvent = { prop: string; evExposed: string; evImpl: string; }; export type EventPropertiesItem = { event: string; eventImpl: string | null; props?: ChangePropertyEvent[]; }; export type EventProperties = EventPropertiesItem[]; export interface IWjComponentMetadata { changeEvents?: { [event: string]: string[]; }; outputs?: string[]; siblingId?: string; parentRefProperty?: string; } export interface IPendingEvent { event: EventEmitter; args: any; } export declare class WjComponentResolvedMetadata { readonly changeEventMap: EventProperties; allImplEvents: string[]; constructor(rawMeta: IWjComponentMetadata); private resolveChangeEventMap; } export declare class WjDirectiveBehavior { static directiveTypeDataProp: string; static directiveResolvedTypeDataProp: string; static behaviorRefProp: string; static parentPropertyAttr: string; static wjModelPropertyAttr: string; static initializedEventAttr: string; static isInitializedPropAttr: string; static siblingDirIdAttr: string; static asyncBindingUpdatePropAttr: string; static siblingDirId: number; static wijmoComponentProviderId: string; static ngZone: NgZone | null; static outsideZoneEvents: Record; private static readonly pathBinding; directive: any; typeData: IWjComponentMetadata; resolvedTypeData: WjComponentResolvedMetadata; elementRef: ElementRef; injector: Injector; injectedParent: any; parentBehavior: WjDirectiveBehavior | null; isInitialized: boolean; isDestroyed: boolean; readonly nz: NgZone | null; nzRun: (fn: () => void) => void; private readonly cdRef; private readonly appRef; private readonly isZoneless; private siblingInsertedObserver; private pendingEvents; private pendingEventsTimeout; private pendingCheck; static getHostElement(hostElRef: ElementRef, injector?: Injector): HTMLElement; static attach(directive: object, elementRef: ElementRef, injector: Injector, injectedParent: any): WjDirectiveBehavior; static getBehavior(directive: any): WjDirectiveBehavior | null; static getZone(directive: any): NgZone | null; static instantiateTemplate(parent: HTMLElement | null, viewContainerRef: ViewContainerRef, templateRef: TemplateRef | null, useTemplateRoot?: boolean, dataContext?: any): { viewRef: EmbeddedViewRef; rootElement: Element; }; constructor(directive: any, elementRef: ElementRef, injector: Injector, injectedParent: any); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; flushPendingEvents(): void; requestCheck(): void; getPropChangeEvent(propName: string): string | null; private createEvents; private overrideDirectiveMethods; private subscribeToEvents; private addHandlers; private triggerPropChangeEvents; private getSignalFriendlyPropValue; private triggerEvent; private triggerPendingEvents; private setupAsChild; private isAsyncBinding; private isChild; private isParentInitializer; private isParentReferencer; private getParentProp; private getParentReferenceProperty; private parentInCtor; private initParent; private getSiblingIndex; private handleSiblingInserted; private isParentCollection; private indexOfParentCollectionItem; private insertIntoParentCollection; private removeAtParentCollectionIndex; private removeFromParentCollection; private isHostElement; private static evaluatePath; private detectZonelessMode; private runChangeDetectionAware; private performRequestCheck; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export declare class Ng2Utils { static changeEventImplementSuffix: string; static wjEventImplementSuffix: string; static getChangeEventNameImplemented(propertyName: string): string; static getChangeEventNameExposed(propertyName: string): string; static getWjEventName(ngEventName: string): string | null; static equals(valueA: any, valueB: any): boolean; } export declare class WjValueAccessor implements ControlValueAccessor { private static readonly maxDeferredWriteAttempts; private static readonly maxDeferredWriteDelayMs; private static readonly maxInitWriteAttempts; private writeCount; private directive; private behavior; private ngModelProp; private modelValue; private isSubscribed; private changeSubscription; private directiveUpdateCount; private initSubscription; private deferredWriteHandle; private deferredWriteAttempts; private initWriteHandle; private initWriteAttempts; private onChangeFn; private onTouchedFn; constructor(directive: any); writeValue(value: any): void; registerOnChange(fn: (_: any) => void): void; registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; private updateDirective; private applyDirectiveValue; private ensureSubscribed; private ensureNgModelProp; private ensureInitSubscriptionDisposed; private clearDeferredWrite; private clearInitWrite; private scheduleInitWriteIfNeeded; private scheduleDeferredWriteIfNeeded; private isDirectiveValueSynchronized; private normalizeModelValue; private getDeferredWriteDelay; private getBehavior; private isFirstChange; private handleDirectiveValueChanged; private handleDirectiveLostFocus; } export declare function WjValueAccessorFactory(directive: any): WjValueAccessor;