@grapecity/wijmo.angular2legacy.directivebase 5.20261.52 → 5.20262.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20261.52
3
+ * Wijmo Library 5.20262.60
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,4 @@
11
11
  *
12
12
  */
13
13
 
14
- "use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0});exports.WjValueAccessor=exports.WjOptions=exports.WjDirectiveBehavior=exports.WjComponentResolvedMetadata=exports.Ng2Utils=void 0;exports.WjValueAccessorFactory=WjValueAccessorFactory;exports.isNoopNgZoneLike=isNoopNgZoneLike;const i0=require("@angular/core"),core_1=require("@angular/core"),wijmo=require("@grapecity/wijmo");class WjOptions{}exports.WjOptions=WjOptions;(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){var t;const i=e.outputs||[],n=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(!i.length)return;const r=i.map(e=>e.split(":")).map(e=>{var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}});this.allImplEvents=r.filter(e=>!!e.implName).map(e=>e.implName);const s=r.filter(e=>e.implName&&e.exposeName);for(const e of s){const i=ResolvedMetadataUtils.getWjEventName(e.implName);if(!i)continue;const r={eventImpl:e.implName,event:e.exposeName},s=null!==(t=n[i])&&void 0!==t?t:n[e.exposeName];(null==s?void 0:s.length)&&(r.props=s.map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)})));this.changeEventMap.push(r)}for(const e of Object.keys(n)){if(e.indexOf(".")<0)continue;const t={eventImpl:null,event:e,props:n[e].map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}))};this.changeEventMap.push(t)}}}exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;class ResolvedMetadataUtils{static getChangeEventNameImplemented(e){return`${_b.getChangeEventNameExposed(e)}${_b.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}}(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";class WjDirectiveBehavior{static getHostElement(e,t){_c.ngZone=t?t.get(core_1.NgZone,null):null;return e.nativeElement}static attach(e,t,i,n){return new _c(e,t,i,n)}static getBehavior(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null}static getZone(e){var t;const i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone}static instantiateTemplate(e,t,i,n=!1,r={}){if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");const s=t.createEmbeddedView(i,r,t.length),o=s.rootNodes;let l;if(n&&1===o.length)l=o[0];else{const e=document.createElement("div");for(const t of o)e.appendChild(t);l=e}e&&e.appendChild(l);return{viewRef:s,rootElement:l}}constructor(e,t,i,n){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=n;this.nz=i.get(core_1.NgZone,null);this.cdRef=i.get(core_1.ChangeDetectorRef,null);this.appRef=i.get(core_1.ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId=""+ ++_c.siblingDirId);const r=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=r;this.resolvedTypeData=r;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}ngOnInit(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[_c.isInitializedPropAttr]=!0;setTimeout(()=>{if(!this.isDestroyed){this.directive[_c.initializedEventAttr].emit(void 0);this.requestCheck()}})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){const n=e[t];this.removeFromParentCollection(n,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){const e=this.elementRef.nativeElement,t=null==e?void 0:e.parentNode,i=t?Array.prototype.indexOf.call(t.childNodes,e):-1;this.directive.dispose();if(t&&i>-1&&Array.prototype.indexOf.call(t.childNodes,e)<0){e.textContent="";i<t.childNodes.length&&t.replaceChild(e,t.childNodes[i])}}this.injector[_c.behaviorRefProp]=null}}flushPendingEvents(){this.triggerPendingEvents(!0)}requestCheck(){this.performRequestCheck()}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(!t)return null;for(const i of Object.keys(t))if(t[i].indexOf(e)>-1)return i;return null}createEvents(){const e=this.resolvedTypeData.allImplEvents||[];for(const t of e)this.directive[t]=new core_1.EventEmitter(!1)}overrideDirectiveMethods(){const e=this.directive;if(!(e instanceof wijmo.Control&&e._resizeObserverCallback))return;const t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!core_1.NgZone.isInAngularZone()){const i=_c.getZone(this);if(i){i.run(()=>t(e));return}}t(e)}}.bind(e)}subscribeToEvents(e){const t=this.resolvedTypeData.changeEventMap||[],i=!!e;for(const e of t){i===e.event.indexOf(".")>-1&&this.addHandlers(e)}if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive,i=_c.evaluatePath(t,e.event);i&&i.addHandler((i,n)=>{this.runChangeDetectionAware(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this.triggerEvent(t[e.eventImpl],n,!(!e.props||!e.props.length))})})}triggerPropChangeEvents(e,t=!0){var i;if(null===(i=e.props)||void 0===i?void 0:i.length)for(const i of e.props){const e=this.getSignalFriendlyPropValue(this.directive[i.prop]);this.triggerEvent(this.directive[i.evImpl],e,t,!0)}}getSignalFriendlyPropValue(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e}triggerEvent(e,t,i,n=!1){if(i&&this.isAsyncBinding()){if(n){const i=this.pendingEvents.find(t=>t.event===e);i?i.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout(()=>this.triggerPendingEvents(!1),0))}else{e.emit(t);this.performRequestCheck()}}triggerPendingEvents(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{const e=this.pendingEvents.slice();this.pendingEvents.length=0;for(const t of e)t.event.emit(t.args);this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)}setupAsChild(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}}isAsyncBinding(){const e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}isChild(){return this.isParentInitializer()||this.isParentReferencer()}isParentInitializer(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]}isParentReferencer(){return!!this.typeData.parentRefProperty}getParentProp(){return this.directive[_c.parentPropertyAttr]}getParentReferenceProperty(){return this.typeData.parentRefProperty}parentInCtor(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()}initParent(){if(!this.parentBehavior)return;const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){const n=e[t];if(this.isParentCollection(n)){let e=this.isHostElement()?this.getSiblingIndex():-1;(e<0||e>=n.length)&&(e=n.length);this.insertIntoParentCollection(n,e,i);if(this.isHostElement()){const e=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(e,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){const t=this.getParentReferenceProperty();t&&(i[t]=e)}}getSiblingIndex(){const e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes,n=this.typeData.siblingId;let r=-1;for(let t=0;t<i.length;t++){const s=i[t];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===n){r++;if(s===e)return r}}return-1}handleSiblingInserted(e){var t;for(const i of e){if("childList"!==i.type||0===i.addedNodes.length)continue;if(!Array.from(i.addedNodes).some(e=>e===this.elementRef.nativeElement))continue;const e=this.getSiblingIndex(),n=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],r=this.directive,s=this.indexOfParentCollectionItem(n,r);if(e>=0&&s>=0&&e!==s){this.removeAtParentCollectionIndex(n,s);this.insertIntoParentCollection(n,Math.min(e,n.length),r)}}}isParentCollection(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))}indexOfParentCollectionItem(e,t){return this.isParentCollection(e)?e.indexOf(t):-1}insertIntoParentCollection(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))}removeAtParentCollectionIndex(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))}removeFromParentCollection(e,t){if(!this.isParentCollection(e))return;const i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}static evaluatePath(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)}detectZonelessMode(){const e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)}runChangeDetectionAware(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}}performRequestCheck(){if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then(()=>{var e;this.pendingCheck=!1;this.isDestroyed||(this.appRef?this.appRef.tick():null===(e=this.cdRef)||void 0===e||e.detectChanges())})}}}exports.WjDirectiveBehavior=WjDirectiveBehavior;(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:core_1.Injectable}],ctorParameters:()=>[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]});class Ng2Utils{static getChangeEventNameImplemented(e){return`${_d.getChangeEventNameExposed(e)}${_d.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}static equals(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t}}exports.Ng2Utils=Ng2Utils;(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";class WjValueAccessor{constructor(e){this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=e=>{};this.onTouchedFn=()=>{};this.handleDirectiveValueChanged=(e,t)=>{var i;if(!this.onChangeFn||!this.directive||!this.ngModelProp)return;const n=this.directive[this.ngModelProp],r=Array.isArray(n)?n.slice():n;let s=this.modelValue;""===s&&(s=null);if(!(this.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(n)||Ng2Utils.equals(s,n))||Array.isArray(n)){this.modelValue=r;this.onChangeFn(r);null===(i=this.getBehavior())||void 0===i||i.requestCheck()}};this.handleDirectiveLostFocus=()=>{var e;this.onTouchedFn();null===(e=this.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){var t,i,n;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){const e=null===(n=this.directive)||void 0===n?void 0:n.initialized;this.initSubscription=null==e?void 0:e.subscribe(()=>{this.clearInitWrite();this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()})}this.scheduleInitWriteIfNeeded()}}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouchedFn=e}setDisabledState(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}}updateDirective(){var e;if(this.isFirstChange()&&(null===this.modelValue||void 0===this.modelValue))return;this.ensureNgModelProp();if(!this.directive||!this.ngModelProp)return;const t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}applyDirectiveValue(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()}ensureSubscribed(){var e;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){const t=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(t){const e=this.directive[t];e&&"function"==typeof e.addHandler?e.addHandler(this.handleDirectiveValueChanged,this):e&&"function"==typeof e.subscribe&&(this.changeSubscription=e.subscribe(()=>this.handleDirectiveValueChanged(this.directive,null)))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}}ensureNgModelProp(){var e,t;if(!this.ngModelProp&&this.directive){const i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],n=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||n}}ensureInitSubscriptionDisposed(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}}clearDeferredWrite(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}}clearInitWrite(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}}scheduleInitWriteIfNeeded(){var e;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout(()=>{var e;this.initWriteHandle=null;if(this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.directive.isInitialized){this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}else this.scheduleInitWriteIfNeeded()},0)}}scheduleDeferredWriteIfNeeded(){const e=this.getBehavior();if(!this.directive||!this.ngModelProp||(null==e?void 0:e.isDestroyed))return;if(this.isDirectiveValueSynchronized()){this.clearDeferredWrite();return}if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts){this.clearDeferredWrite();return}this.clearDeferredWrite();this.deferredWriteAttempts++;const t=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout(()=>{var e;this.deferredWriteHandle=null;this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed)&&this.applyDirectiveValue()},t)}isDirectiveValueSynchronized(){if(!this.directive||!this.ngModelProp)return!0;return areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])}normalizeModelValue(e){return""===e?null:e}getDeferredWriteDelay(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))}getBehavior(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior}isFirstChange(){return this.writeCount<2}}exports.WjValueAccessor=WjValueAccessor;(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((e,i)=>areEquivalentValue(e,t[i]))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}
14
+ "use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0});exports.WjValueAccessor=exports.WjOptions=exports.WjDirectiveBehavior=exports.WjComponentResolvedMetadata=exports.Ng2Utils=void 0;exports.WjValueAccessorFactory=WjValueAccessorFactory;exports.isNoopNgZoneLike=isNoopNgZoneLike;const i0=require("@angular/core"),core_1=require("@angular/core"),wijmo=require("@grapecity/wijmo");class WjOptions{}exports.WjOptions=WjOptions;(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){var t;const i=e.outputs||[],n=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(!i.length)return;const r=i.map(e=>e.split(":")).map(e=>{var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}});this.allImplEvents=r.filter(e=>!!e.implName).map(e=>e.implName);const s=r.filter(e=>e.implName&&e.exposeName);for(const e of s){const i=ResolvedMetadataUtils.getWjEventName(e.implName);if(!i)continue;const r={eventImpl:e.implName,event:e.exposeName},s=null!==(t=n[i])&&void 0!==t?t:n[e.exposeName];(null==s?void 0:s.length)&&(r.props=s.map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)})));this.changeEventMap.push(r)}for(const e of Object.keys(n)){if(e.indexOf(".")<0)continue;const t={eventImpl:null,event:e,props:n[e].map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}))};this.changeEventMap.push(t)}}}exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;class ResolvedMetadataUtils{static getChangeEventNameImplemented(e){return`${_b.getChangeEventNameExposed(e)}${_b.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}}(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";class WjDirectiveBehavior{static getHostElement(e,t){_c.ngZone=t?t.get(core_1.NgZone,null):null;return e.nativeElement}static attach(e,t,i,n){return new _c(e,t,i,n)}static getBehavior(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null}static getZone(e){var t;const i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone}static instantiateTemplate(e,t,i,n=!1,r={}){if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");const s=t.createEmbeddedView(i,r,t.length),o=s.rootNodes;let l;if(n&&1===o.length)l=o[0];else{const e=document.createElement("div");for(const t of o)e.appendChild(t);l=e}e&&e.appendChild(l);return{viewRef:s,rootElement:l}}constructor(e,t,i,n){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=n;this.nz=i.get(core_1.NgZone,null);this.cdRef=i.get(core_1.ChangeDetectorRef,null);this.appRef=i.get(core_1.ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId=""+ ++_c.siblingDirId);const r=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=r;this.resolvedTypeData=r;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}ngOnInit(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[_c.isInitializedPropAttr]=!0;setTimeout(()=>{if(!this.isDestroyed){this.directive[_c.initializedEventAttr].emit(void 0);this.requestCheck()}})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){const n=e[t];this.removeFromParentCollection(n,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){const e=this.elementRef.nativeElement,t=null==e?void 0:e.parentNode,i=t?Array.prototype.indexOf.call(t.childNodes,e):-1;this.directive.dispose();if(t&&i>-1&&Array.prototype.indexOf.call(t.childNodes,e)<0){e.textContent="";i<t.childNodes.length&&t.replaceChild(e,t.childNodes[i])}}this.injector[_c.behaviorRefProp]=null}}flushPendingEvents(){this.triggerPendingEvents(!0)}requestCheck(){this.performRequestCheck()}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(!t)return null;for(const i of Object.keys(t))if(t[i].indexOf(e)>-1)return i;return null}createEvents(){const e=this.resolvedTypeData.allImplEvents||[];for(const t of e)this.directive[t]=new core_1.EventEmitter(!1)}overrideDirectiveMethods(){const e=this.directive;if(!(e instanceof wijmo.Control&&e._resizeObserverCallback))return;const t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!core_1.NgZone.isInAngularZone()){const i=_c.getZone(this);if(i){i.run(()=>t(e));return}}t(e)}}.bind(e)}subscribeToEvents(e){const t=this.resolvedTypeData.changeEventMap||[],i=!!e;for(const e of t){i===e.event.indexOf(".")>-1&&this.addHandlers(e)}if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive,i=_c.evaluatePath(t,e.event);i&&i.addHandler((i,n)=>{this.runChangeDetectionAware(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this.triggerEvent(t[e.eventImpl],n,!(!e.props||!e.props.length))})})}triggerPropChangeEvents(e,t=!0){var i;if(null===(i=e.props)||void 0===i?void 0:i.length)for(const i of e.props){const e=this.getSignalFriendlyPropValue(this.directive[i.prop]);this.triggerEvent(this.directive[i.evImpl],e,t,!0)}}getSignalFriendlyPropValue(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e}triggerEvent(e,t,i,n=!1){if(i&&this.isAsyncBinding()){if(n){const i=this.pendingEvents.find(t=>t.event===e);i?i.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout(()=>this.triggerPendingEvents(!1),0))}else{e.emit(t);this.performRequestCheck()}}triggerPendingEvents(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{const e=this.pendingEvents.slice();this.pendingEvents.length=0;for(const t of e)t.event.emit(t.args);this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)}setupAsChild(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}}isAsyncBinding(){const e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}isChild(){return this.isParentInitializer()||this.isParentReferencer()}isParentInitializer(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]}isParentReferencer(){return!!this.typeData.parentRefProperty}getParentProp(){return this.directive[_c.parentPropertyAttr]}getParentReferenceProperty(){return this.typeData.parentRefProperty}parentInCtor(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()}initParent(){if(!this.parentBehavior)return;const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){const n=e[t];if(this.isParentCollection(n)){let e=this.isHostElement()?this.getSiblingIndex():-1;(e<0||e>=n.length)&&(e=n.length);this.insertIntoParentCollection(n,e,i);if(this.isHostElement()){const e=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(e,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){const t=this.getParentReferenceProperty();t&&(i[t]=e)}}getSiblingIndex(){const e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes,n=this.typeData.siblingId;let r=-1;for(let t=0;t<i.length;t++){const s=i[t];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===n){r++;if(s===e)return r}}return-1}handleSiblingInserted(e){var t;for(const i of e){if("childList"!==i.type||0===i.addedNodes.length)continue;if(!Array.from(i.addedNodes).some(e=>e===this.elementRef.nativeElement))continue;const e=this.getSiblingIndex(),n=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],r=this.directive,s=this.indexOfParentCollectionItem(n,r);if(e>=0&&s>=0&&e!==s){this.removeAtParentCollectionIndex(n,s);this.insertIntoParentCollection(n,Math.min(e,n.length),r)}}}isParentCollection(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))}indexOfParentCollectionItem(e,t){return this.isParentCollection(e)?e.indexOf(t):-1}insertIntoParentCollection(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))}removeAtParentCollectionIndex(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))}removeFromParentCollection(e,t){if(!this.isParentCollection(e))return;const i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}static evaluatePath(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)}detectZonelessMode(){const e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)}runChangeDetectionAware(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}}performRequestCheck(){if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then(()=>{var e;this.pendingCheck=!1;this.isDestroyed||(this.appRef?this.appRef.tick():null===(e=this.cdRef)||void 0===e||e.detectChanges())})}}}exports.WjDirectiveBehavior=WjDirectiveBehavior;(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:core_1.Injectable}],ctorParameters:()=>[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]});class Ng2Utils{static getChangeEventNameImplemented(e){return`${_d.getChangeEventNameExposed(e)}${_d.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}static equals(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t}}exports.Ng2Utils=Ng2Utils;(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";class WjValueAccessor{constructor(e){this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=e=>{};this.onTouchedFn=()=>{};this.handleDirectiveValueChanged=(e,t)=>{var i;if(!this.onChangeFn||!this.directive||!this.ngModelProp)return;const n=this.directive[this.ngModelProp],r=Array.isArray(n)?n.slice():n;let s=this.modelValue;""===s&&(s=null);if(!(this.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(n)||Ng2Utils.equals(s,n))||Array.isArray(n)){this.modelValue=r;this.onChangeFn(r);null===(i=this.getBehavior())||void 0===i||i.requestCheck()}};this.handleDirectiveLostFocus=()=>{var e;this.onTouchedFn();null===(e=this.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){var t,i,n;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){const e=null===(n=this.directive)||void 0===n?void 0:n.initialized;this.initSubscription=null==e?void 0:e.subscribe(()=>{this.clearInitWrite();this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()})}this.scheduleInitWriteIfNeeded()}}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouchedFn=e}setDisabledState(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}}updateDirective(){var e;if(this.isFirstChange()&&(null===this.modelValue||void 0===this.modelValue))return;this.ensureNgModelProp();if(!this.directive||!this.ngModelProp)return;const t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}applyDirectiveValue(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()}ensureSubscribed(){var e;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){const t=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(t){const e=this.directive[t];e&&"function"==typeof e.addHandler?e.addHandler(this.handleDirectiveValueChanged,this):e&&"function"==typeof e.subscribe&&(this.changeSubscription=e.subscribe(()=>this.handleDirectiveValueChanged(this.directive,null)))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}}ensureNgModelProp(){var e,t;if(!this.ngModelProp&&this.directive){const i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],n=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||n}}ensureInitSubscriptionDisposed(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}}clearDeferredWrite(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}}clearInitWrite(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}}scheduleInitWriteIfNeeded(){var e;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout(()=>{var e;this.initWriteHandle=null;if(this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.directive.isInitialized){this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}else this.scheduleInitWriteIfNeeded()},0)}}scheduleDeferredWriteIfNeeded(){const e=this.getBehavior();if(!this.directive||!this.ngModelProp||(null==e?void 0:e.isDestroyed))return;if(this.isDirectiveValueSynchronized()){this.clearDeferredWrite();return}if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts){this.clearDeferredWrite();return}this.clearDeferredWrite();this.deferredWriteAttempts++;const t=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout(()=>{var e;this.deferredWriteHandle=null;this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed)&&this.applyDirectiveValue()},t)}isDirectiveValueSynchronized(){if(!this.directive||!this.ngModelProp)return!0;return areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])}normalizeModelValue(e){return""===e?null:e}getDeferredWriteDelay(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))}getBehavior(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior}isFirstChange(){return this.writeCount<2}}exports.WjValueAccessor=WjValueAccessor;(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((e,i)=>areEquivalentValue(e,t[i]))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}
package/es2015-esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20261.52
3
+ * Wijmo Library 5.20262.60
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,4 @@
11
11
  *
12
12
  */
13
13
 
14
- var _a,_b,_c,_d,_e;import*as i0 from"@angular/core";import{NgZone,ChangeDetectorRef,ApplicationRef,EventEmitter,Injectable}from"@angular/core";import*as wijmo from"@grapecity/wijmo";class WjOptions{}(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){var t;const i=e.outputs||[],n=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(!i.length)return;const r=i.map(e=>e.split(":")).map(e=>{var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}});this.allImplEvents=r.filter(e=>!!e.implName).map(e=>e.implName);const s=r.filter(e=>e.implName&&e.exposeName);for(const e of s){const i=ResolvedMetadataUtils.getWjEventName(e.implName);if(!i)continue;const r={eventImpl:e.implName,event:e.exposeName},s=null!==(t=n[i])&&void 0!==t?t:n[e.exposeName];(null==s?void 0:s.length)&&(r.props=s.map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)})));this.changeEventMap.push(r)}for(const e of Object.keys(n)){if(e.indexOf(".")<0)continue;const t={eventImpl:null,event:e,props:n[e].map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}))};this.changeEventMap.push(t)}}}class ResolvedMetadataUtils{static getChangeEventNameImplemented(e){return`${_b.getChangeEventNameExposed(e)}${_b.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}}(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";class WjDirectiveBehavior{static getHostElement(e,t){_c.ngZone=t?t.get(NgZone,null):null;return e.nativeElement}static attach(e,t,i,n){return new _c(e,t,i,n)}static getBehavior(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null}static getZone(e){var t;const i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone}static instantiateTemplate(e,t,i,n=!1,r={}){if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");const s=t.createEmbeddedView(i,r,t.length),o=s.rootNodes;let l;if(n&&1===o.length)l=o[0];else{const e=document.createElement("div");for(const t of o)e.appendChild(t);l=e}e&&e.appendChild(l);return{viewRef:s,rootElement:l}}constructor(e,t,i,n){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=n;this.nz=i.get(NgZone,null);this.cdRef=i.get(ChangeDetectorRef,null);this.appRef=i.get(ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId=""+ ++_c.siblingDirId);const r=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=r;this.resolvedTypeData=r;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}ngOnInit(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[_c.isInitializedPropAttr]=!0;setTimeout(()=>{if(!this.isDestroyed){this.directive[_c.initializedEventAttr].emit(void 0);this.requestCheck()}})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){const n=e[t];this.removeFromParentCollection(n,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){const e=this.elementRef.nativeElement,t=null==e?void 0:e.parentNode,i=t?Array.prototype.indexOf.call(t.childNodes,e):-1;this.directive.dispose();if(t&&i>-1&&Array.prototype.indexOf.call(t.childNodes,e)<0){e.textContent="";i<t.childNodes.length&&t.replaceChild(e,t.childNodes[i])}}this.injector[_c.behaviorRefProp]=null}}flushPendingEvents(){this.triggerPendingEvents(!0)}requestCheck(){this.performRequestCheck()}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(!t)return null;for(const i of Object.keys(t))if(t[i].indexOf(e)>-1)return i;return null}createEvents(){const e=this.resolvedTypeData.allImplEvents||[];for(const t of e)this.directive[t]=new EventEmitter(!1)}overrideDirectiveMethods(){const e=this.directive;if(!(e instanceof wijmo.Control&&e._resizeObserverCallback))return;const t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!NgZone.isInAngularZone()){const i=_c.getZone(this);if(i){i.run(()=>t(e));return}}t(e)}}.bind(e)}subscribeToEvents(e){const t=this.resolvedTypeData.changeEventMap||[],i=!!e;for(const e of t){i===e.event.indexOf(".")>-1&&this.addHandlers(e)}if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive,i=_c.evaluatePath(t,e.event);i&&i.addHandler((i,n)=>{this.runChangeDetectionAware(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this.triggerEvent(t[e.eventImpl],n,!(!e.props||!e.props.length))})})}triggerPropChangeEvents(e,t=!0){var i;if(null===(i=e.props)||void 0===i?void 0:i.length)for(const i of e.props){const e=this.getSignalFriendlyPropValue(this.directive[i.prop]);this.triggerEvent(this.directive[i.evImpl],e,t,!0)}}getSignalFriendlyPropValue(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e}triggerEvent(e,t,i,n=!1){if(i&&this.isAsyncBinding()){if(n){const i=this.pendingEvents.find(t=>t.event===e);i?i.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout(()=>this.triggerPendingEvents(!1),0))}else{e.emit(t);this.performRequestCheck()}}triggerPendingEvents(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{const e=this.pendingEvents.slice();this.pendingEvents.length=0;for(const t of e)t.event.emit(t.args);this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)}setupAsChild(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}}isAsyncBinding(){const e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}isChild(){return this.isParentInitializer()||this.isParentReferencer()}isParentInitializer(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]}isParentReferencer(){return!!this.typeData.parentRefProperty}getParentProp(){return this.directive[_c.parentPropertyAttr]}getParentReferenceProperty(){return this.typeData.parentRefProperty}parentInCtor(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()}initParent(){if(!this.parentBehavior)return;const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){const n=e[t];if(this.isParentCollection(n)){let e=this.isHostElement()?this.getSiblingIndex():-1;(e<0||e>=n.length)&&(e=n.length);this.insertIntoParentCollection(n,e,i);if(this.isHostElement()){const e=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(e,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){const t=this.getParentReferenceProperty();t&&(i[t]=e)}}getSiblingIndex(){const e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes,n=this.typeData.siblingId;let r=-1;for(let t=0;t<i.length;t++){const s=i[t];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===n){r++;if(s===e)return r}}return-1}handleSiblingInserted(e){var t;for(const i of e){if("childList"!==i.type||0===i.addedNodes.length)continue;if(!Array.from(i.addedNodes).some(e=>e===this.elementRef.nativeElement))continue;const e=this.getSiblingIndex(),n=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],r=this.directive,s=this.indexOfParentCollectionItem(n,r);if(e>=0&&s>=0&&e!==s){this.removeAtParentCollectionIndex(n,s);this.insertIntoParentCollection(n,Math.min(e,n.length),r)}}}isParentCollection(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))}indexOfParentCollectionItem(e,t){return this.isParentCollection(e)?e.indexOf(t):-1}insertIntoParentCollection(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))}removeAtParentCollectionIndex(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))}removeFromParentCollection(e,t){if(!this.isParentCollection(e))return;const i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}static evaluatePath(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)}detectZonelessMode(){const e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)}runChangeDetectionAware(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}}performRequestCheck(){if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then(()=>{var e;this.pendingCheck=!1;this.isDestroyed||(this.appRef?this.appRef.tick():null===(e=this.cdRef)||void 0===e||e.detectChanges())})}}}(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:Injectable}],ctorParameters:()=>[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]});class Ng2Utils{static getChangeEventNameImplemented(e){return`${_d.getChangeEventNameExposed(e)}${_d.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}static equals(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t}}(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";class WjValueAccessor{constructor(e){this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=e=>{};this.onTouchedFn=()=>{};this.handleDirectiveValueChanged=(e,t)=>{var i;if(!this.onChangeFn||!this.directive||!this.ngModelProp)return;const n=this.directive[this.ngModelProp],r=Array.isArray(n)?n.slice():n;let s=this.modelValue;""===s&&(s=null);if(!(this.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(n)||Ng2Utils.equals(s,n))||Array.isArray(n)){this.modelValue=r;this.onChangeFn(r);null===(i=this.getBehavior())||void 0===i||i.requestCheck()}};this.handleDirectiveLostFocus=()=>{var e;this.onTouchedFn();null===(e=this.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){var t,i,n;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){const e=null===(n=this.directive)||void 0===n?void 0:n.initialized;this.initSubscription=null==e?void 0:e.subscribe(()=>{this.clearInitWrite();this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()})}this.scheduleInitWriteIfNeeded()}}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouchedFn=e}setDisabledState(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}}updateDirective(){var e;if(this.isFirstChange()&&(null===this.modelValue||void 0===this.modelValue))return;this.ensureNgModelProp();if(!this.directive||!this.ngModelProp)return;const t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}applyDirectiveValue(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()}ensureSubscribed(){var e;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){const t=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(t){const e=this.directive[t];e&&"function"==typeof e.addHandler?e.addHandler(this.handleDirectiveValueChanged,this):e&&"function"==typeof e.subscribe&&(this.changeSubscription=e.subscribe(()=>this.handleDirectiveValueChanged(this.directive,null)))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}}ensureNgModelProp(){var e,t;if(!this.ngModelProp&&this.directive){const i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],n=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||n}}ensureInitSubscriptionDisposed(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}}clearDeferredWrite(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}}clearInitWrite(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}}scheduleInitWriteIfNeeded(){var e;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout(()=>{var e;this.initWriteHandle=null;if(this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.directive.isInitialized){this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}else this.scheduleInitWriteIfNeeded()},0)}}scheduleDeferredWriteIfNeeded(){const e=this.getBehavior();if(!this.directive||!this.ngModelProp||(null==e?void 0:e.isDestroyed))return;if(this.isDirectiveValueSynchronized()){this.clearDeferredWrite();return}if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts){this.clearDeferredWrite();return}this.clearDeferredWrite();this.deferredWriteAttempts++;const t=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout(()=>{var e;this.deferredWriteHandle=null;this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed)&&this.applyDirectiveValue()},t)}isDirectiveValueSynchronized(){if(!this.directive||!this.ngModelProp)return!0;return areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])}normalizeModelValue(e){return""===e?null:e}getDeferredWriteDelay(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))}getBehavior(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior}isFirstChange(){return this.writeCount<2}}(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((e,i)=>areEquivalentValue(e,t[i]))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}export{Ng2Utils,WjComponentResolvedMetadata,WjDirectiveBehavior,WjOptions,WjValueAccessor,WjValueAccessorFactory,isNoopNgZoneLike};
14
+ var _a,_b,_c,_d,_e;import*as i0 from"@angular/core";import{NgZone,ChangeDetectorRef,ApplicationRef,EventEmitter,Injectable}from"@angular/core";import*as wijmo from"@grapecity/wijmo";class WjOptions{}(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){var t;const i=e.outputs||[],n=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(!i.length)return;const r=i.map(e=>e.split(":")).map(e=>{var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}});this.allImplEvents=r.filter(e=>!!e.implName).map(e=>e.implName);const s=r.filter(e=>e.implName&&e.exposeName);for(const e of s){const i=ResolvedMetadataUtils.getWjEventName(e.implName);if(!i)continue;const r={eventImpl:e.implName,event:e.exposeName},s=null!==(t=n[i])&&void 0!==t?t:n[e.exposeName];(null==s?void 0:s.length)&&(r.props=s.map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)})));this.changeEventMap.push(r)}for(const e of Object.keys(n)){if(e.indexOf(".")<0)continue;const t={eventImpl:null,event:e,props:n[e].map(e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}))};this.changeEventMap.push(t)}}}class ResolvedMetadataUtils{static getChangeEventNameImplemented(e){return`${_b.getChangeEventNameExposed(e)}${_b.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}}(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";class WjDirectiveBehavior{static getHostElement(e,t){_c.ngZone=t?t.get(NgZone,null):null;return e.nativeElement}static attach(e,t,i,n){return new _c(e,t,i,n)}static getBehavior(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null}static getZone(e){var t;const i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone}static instantiateTemplate(e,t,i,n=!1,r={}){if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");const s=t.createEmbeddedView(i,r,t.length),o=s.rootNodes;let l;if(n&&1===o.length)l=o[0];else{const e=document.createElement("div");for(const t of o)e.appendChild(t);l=e}e&&e.appendChild(l);return{viewRef:s,rootElement:l}}constructor(e,t,i,n){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=n;this.nz=i.get(NgZone,null);this.cdRef=i.get(ChangeDetectorRef,null);this.appRef=i.get(ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId=""+ ++_c.siblingDirId);const r=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=r;this.resolvedTypeData=r;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}ngOnInit(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[_c.isInitializedPropAttr]=!0;setTimeout(()=>{if(!this.isDestroyed){this.directive[_c.initializedEventAttr].emit(void 0);this.requestCheck()}})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){const n=e[t];this.removeFromParentCollection(n,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){const e=this.elementRef.nativeElement,t=null==e?void 0:e.parentNode,i=t?Array.prototype.indexOf.call(t.childNodes,e):-1;this.directive.dispose();if(t&&i>-1&&Array.prototype.indexOf.call(t.childNodes,e)<0){e.textContent="";i<t.childNodes.length&&t.replaceChild(e,t.childNodes[i])}}this.injector[_c.behaviorRefProp]=null}}flushPendingEvents(){this.triggerPendingEvents(!0)}requestCheck(){this.performRequestCheck()}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(!t)return null;for(const i of Object.keys(t))if(t[i].indexOf(e)>-1)return i;return null}createEvents(){const e=this.resolvedTypeData.allImplEvents||[];for(const t of e)this.directive[t]=new EventEmitter(!1)}overrideDirectiveMethods(){const e=this.directive;if(!(e instanceof wijmo.Control&&e._resizeObserverCallback))return;const t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!NgZone.isInAngularZone()){const i=_c.getZone(this);if(i){i.run(()=>t(e));return}}t(e)}}.bind(e)}subscribeToEvents(e){const t=this.resolvedTypeData.changeEventMap||[],i=!!e;for(const e of t){i===e.event.indexOf(".")>-1&&this.addHandlers(e)}if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive,i=_c.evaluatePath(t,e.event);i&&i.addHandler((i,n)=>{this.runChangeDetectionAware(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this.triggerEvent(t[e.eventImpl],n,!(!e.props||!e.props.length))})})}triggerPropChangeEvents(e,t=!0){var i;if(null===(i=e.props)||void 0===i?void 0:i.length)for(const i of e.props){const e=this.getSignalFriendlyPropValue(this.directive[i.prop]);this.triggerEvent(this.directive[i.evImpl],e,t,!0)}}getSignalFriendlyPropValue(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e}triggerEvent(e,t,i,n=!1){if(i&&this.isAsyncBinding()){if(n){const i=this.pendingEvents.find(t=>t.event===e);i?i.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout(()=>this.triggerPendingEvents(!1),0))}else{e.emit(t);this.performRequestCheck()}}triggerPendingEvents(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{const e=this.pendingEvents.slice();this.pendingEvents.length=0;for(const t of e)t.event.emit(t.args);this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)}setupAsChild(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}}isAsyncBinding(){const e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}isChild(){return this.isParentInitializer()||this.isParentReferencer()}isParentInitializer(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]}isParentReferencer(){return!!this.typeData.parentRefProperty}getParentProp(){return this.directive[_c.parentPropertyAttr]}getParentReferenceProperty(){return this.typeData.parentRefProperty}parentInCtor(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()}initParent(){if(!this.parentBehavior)return;const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){const n=e[t];if(this.isParentCollection(n)){let e=this.isHostElement()?this.getSiblingIndex():-1;(e<0||e>=n.length)&&(e=n.length);this.insertIntoParentCollection(n,e,i);if(this.isHostElement()){const e=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(e,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){const t=this.getParentReferenceProperty();t&&(i[t]=e)}}getSiblingIndex(){const e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes,n=this.typeData.siblingId;let r=-1;for(let t=0;t<i.length;t++){const s=i[t];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===n){r++;if(s===e)return r}}return-1}handleSiblingInserted(e){var t;for(const i of e){if("childList"!==i.type||0===i.addedNodes.length)continue;if(!Array.from(i.addedNodes).some(e=>e===this.elementRef.nativeElement))continue;const e=this.getSiblingIndex(),n=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],r=this.directive,s=this.indexOfParentCollectionItem(n,r);if(e>=0&&s>=0&&e!==s){this.removeAtParentCollectionIndex(n,s);this.insertIntoParentCollection(n,Math.min(e,n.length),r)}}}isParentCollection(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))}indexOfParentCollectionItem(e,t){return this.isParentCollection(e)?e.indexOf(t):-1}insertIntoParentCollection(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))}removeAtParentCollectionIndex(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))}removeFromParentCollection(e,t){if(!this.isParentCollection(e))return;const i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}static evaluatePath(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)}detectZonelessMode(){const e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)}runChangeDetectionAware(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}}performRequestCheck(){if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then(()=>{var e;this.pendingCheck=!1;this.isDestroyed||(this.appRef?this.appRef.tick():null===(e=this.cdRef)||void 0===e||e.detectChanges())})}}}(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:Injectable}],ctorParameters:()=>[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]});class Ng2Utils{static getChangeEventNameImplemented(e){return`${_d.getChangeEventNameExposed(e)}${_d.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(!e)return null;const t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}static equals(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t}}(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";class WjValueAccessor{constructor(e){this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=e=>{};this.onTouchedFn=()=>{};this.handleDirectiveValueChanged=(e,t)=>{var i;if(!this.onChangeFn||!this.directive||!this.ngModelProp)return;const n=this.directive[this.ngModelProp],r=Array.isArray(n)?n.slice():n;let s=this.modelValue;""===s&&(s=null);if(!(this.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(n)||Ng2Utils.equals(s,n))||Array.isArray(n)){this.modelValue=r;this.onChangeFn(r);null===(i=this.getBehavior())||void 0===i||i.requestCheck()}};this.handleDirectiveLostFocus=()=>{var e;this.onTouchedFn();null===(e=this.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){var t,i,n;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){const e=null===(n=this.directive)||void 0===n?void 0:n.initialized;this.initSubscription=null==e?void 0:e.subscribe(()=>{this.clearInitWrite();this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()})}this.scheduleInitWriteIfNeeded()}}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouchedFn=e}setDisabledState(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}}updateDirective(){var e;if(this.isFirstChange()&&(null===this.modelValue||void 0===this.modelValue))return;this.ensureNgModelProp();if(!this.directive||!this.ngModelProp)return;const t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}applyDirectiveValue(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()}ensureSubscribed(){var e;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){const t=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(t){const e=this.directive[t];e&&"function"==typeof e.addHandler?e.addHandler(this.handleDirectiveValueChanged,this):e&&"function"==typeof e.subscribe&&(this.changeSubscription=e.subscribe(()=>this.handleDirectiveValueChanged(this.directive,null)))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}}ensureNgModelProp(){var e,t;if(!this.ngModelProp&&this.directive){const i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],n=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||n}}ensureInitSubscriptionDisposed(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}}clearDeferredWrite(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}}clearInitWrite(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}}scheduleInitWriteIfNeeded(){var e;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout(()=>{var e;this.initWriteHandle=null;if(this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.directive.isInitialized){this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}else this.scheduleInitWriteIfNeeded()},0)}}scheduleDeferredWriteIfNeeded(){const e=this.getBehavior();if(!this.directive||!this.ngModelProp||(null==e?void 0:e.isDestroyed))return;if(this.isDirectiveValueSynchronized()){this.clearDeferredWrite();return}if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts){this.clearDeferredWrite();return}this.clearDeferredWrite();this.deferredWriteAttempts++;const t=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout(()=>{var e;this.deferredWriteHandle=null;this.directive&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed)&&this.applyDirectiveValue()},t)}isDirectiveValueSynchronized(){if(!this.directive||!this.ngModelProp)return!0;return areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])}normalizeModelValue(e){return""===e?null:e}getDeferredWriteDelay(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))}getBehavior(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior}isFirstChange(){return this.writeCount<2}}(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((e,i)=>areEquivalentValue(e,t[i]))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}export{Ng2Utils,WjComponentResolvedMetadata,WjDirectiveBehavior,WjOptions,WjValueAccessor,WjValueAccessorFactory,isNoopNgZoneLike};
package/es2022-fesm.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20261.52
3
+ * Wijmo Library 5.20262.60
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,4 @@
11
11
  *
12
12
  */
13
13
 
14
- import*as i0 from"@angular/core";import{NgZone,ChangeDetectorRef,ApplicationRef,EventEmitter,Injectable}from"@angular/core";import*as wijmo from"@grapecity/wijmo";class WjOptions{static{this.asyncBindings=!0}static{this.zonelessMode="auto"}}function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){const t=e.outputs||[],i=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(!t.length)return;const s=t.map((e=>e.split(":"))).map((e=>({implName:e[0]?.trim(),exposeName:e[1]?.trim()})));this.allImplEvents=s.filter((e=>!!e.implName)).map((e=>e.implName));const n=s.filter((e=>e.implName&&e.exposeName));for(const e of n){const t=ResolvedMetadataUtils.getWjEventName(e.implName);if(!t)continue;const s={eventImpl:e.implName,event:e.exposeName},n=i[t]??i[e.exposeName];n?.length&&(s.props=n.map((e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}))));this.changeEventMap.push(s)}for(const e of Object.keys(i)){if(e.indexOf(".")<0)continue;const t={eventImpl:null,event:e,props:i[e].map((e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)})))};this.changeEventMap.push(t)}}}class ResolvedMetadataUtils{static{this.changeEventImplementSuffix="PC"}static{this.wijmoEventImplementSuffix="Ng"}static getChangeEventNameImplemented(e){return`${ResolvedMetadataUtils.getChangeEventNameExposed(e)}${ResolvedMetadataUtils.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return`${e}Change`}static getWjEventName(e){if(!e)return null;const t=ResolvedMetadataUtils.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}}class WjDirectiveBehavior{static{this.directiveTypeDataProp="meta"}static{this.directiveResolvedTypeDataProp="_wjResolvedMeta"}static{this.behaviorRefProp="_wjBehaviour"}static{this.parentPropertyAttr="wjProperty"}static{this.wjModelPropertyAttr="wjModelProperty"}static{this.initializedEventAttr="initialized"}static{this.isInitializedPropAttr="isInitialized"}static{this.siblingDirIdAttr="wj-directive-id"}static{this.asyncBindingUpdatePropAttr="asyncBindings"}static{this.siblingDirId=0}static{this.wijmoComponentProviderId="WjComponent"}static{this.ngZone=null}static{this.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0}}static{this.pathBinding=new wijmo.Binding("")}static getHostElement(e,t){WjDirectiveBehavior.ngZone=t?t.get(NgZone,null):null;return e.nativeElement}static attach(e,t,i,s){return new WjDirectiveBehavior(e,t,i,s)}static getBehavior(e){return e?e[WjDirectiveBehavior.behaviorRefProp]??null:null}static getZone(e){const t=WjDirectiveBehavior.getBehavior(e);return t?.nz??WjDirectiveBehavior.ngZone}static instantiateTemplate(e,t,i,s=!1,n={}){if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");const r=t.createEmbeddedView(i,n,t.length),o=r.rootNodes;let a;if(s&&1===o.length)a=o[0];else{const e=document.createElement("div");for(const t of o)e.appendChild(t);a=e}e&&e.appendChild(a);return{viewRef:r,rootElement:a}}constructor(e,t,i,s){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=s;this.nz=i.get(NgZone,null);this.cdRef=i.get(ChangeDetectorRef,null);this.appRef=i.get(ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId=""+ ++WjDirectiveBehavior.siblingDirId);const n=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=n;this.resolvedTypeData=n;e[WjDirectiveBehavior.behaviorRefProp]=this;i[WjDirectiveBehavior.behaviorRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}ngOnInit(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout((()=>{if(!this.isDestroyed){this.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0);this.requestCheck()}}))}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){const s=e[t];this.removeFromParentCollection(s,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){const e=this.elementRef.nativeElement,t=e?.parentNode,i=t?Array.prototype.indexOf.call(t.childNodes,e):-1;this.directive.dispose();if(t&&i>-1&&Array.prototype.indexOf.call(t.childNodes,e)<0){e.textContent="";i<t.childNodes.length&&t.replaceChild(e,t.childNodes[i])}}this.injector[WjDirectiveBehavior.behaviorRefProp]=null}}flushPendingEvents(){this.triggerPendingEvents(!0)}requestCheck(){this.performRequestCheck()}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(!t)return null;for(const i of Object.keys(t))if(t[i].indexOf(e)>-1)return i;return null}createEvents(){const e=this.resolvedTypeData.allImplEvents||[];for(const t of e)this.directive[t]=new EventEmitter(!1)}overrideDirectiveMethods(){const e=this.directive;if(!(e instanceof wijmo.Control&&e._resizeObserverCallback))return;const t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!NgZone.isInAngularZone()){const i=WjDirectiveBehavior.getZone(this);if(i){i.run((()=>t(e)));return}}t(e)}}.bind(e)}subscribeToEvents(e){const t=this.resolvedTypeData.changeEventMap||[],i=!!e;for(const e of t){i===e.event.indexOf(".")>-1&&this.addHandlers(e)}if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive,i=WjDirectiveBehavior.evaluatePath(t,e.event);i&&i.addHandler(((i,s)=>{this.runChangeDetectionAware((()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this.triggerEvent(t[e.eventImpl],s,!(!e.props||!e.props.length))}))}))}triggerPropChangeEvents(e,t=!0){if(e.props?.length)for(const i of e.props){const e=this.getSignalFriendlyPropValue(this.directive[i.prop]);this.triggerEvent(this.directive[i.evImpl],e,t,!0)}}getSignalFriendlyPropValue(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e}triggerEvent(e,t,i,s=!1){if(i&&this.isAsyncBinding()){if(s){const i=this.pendingEvents.find((t=>t.event===e));i?i.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout((()=>this.triggerPendingEvents(!1)),0))}else{e.emit(t);this.performRequestCheck()}}triggerPendingEvents(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{const e=this.pendingEvents.slice();this.pendingEvents.length=0;for(const t of e)t.event.emit(t.args);this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)}setupAsChild(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}}isAsyncBinding(){const e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}isChild(){return this.isParentInitializer()||this.isParentReferencer()}isParentInitializer(){return null!==this.directive[WjDirectiveBehavior.parentPropertyAttr]&&void 0!==this.directive[WjDirectiveBehavior.parentPropertyAttr]}isParentReferencer(){return!!this.typeData.parentRefProperty}getParentProp(){return this.directive[WjDirectiveBehavior.parentPropertyAttr]}getParentReferenceProperty(){return this.typeData.parentRefProperty}parentInCtor(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()}initParent(){if(!this.parentBehavior)return;const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){const s=e[t];if(this.isParentCollection(s)){let e=this.isHostElement()?this.getSiblingIndex():-1;(e<0||e>=s.length)&&(e=s.length);this.insertIntoParentCollection(s,e,i);if(this.isHostElement()){const e=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(e,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){const t=this.getParentReferenceProperty();t&&(i[t]=e)}}getSiblingIndex(){const e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes,s=this.typeData.siblingId;let n=-1;for(let t=0;t<i.length;t++){const r=i[t];if(1===r.nodeType&&r.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)===s){n++;if(r===e)return n}}return-1}handleSiblingInserted(e){for(const t of e){if("childList"!==t.type||0===t.addedNodes.length)continue;if(!Array.from(t.addedNodes).some((e=>e===this.elementRef.nativeElement)))continue;const e=this.getSiblingIndex(),i=this.parentBehavior?.directive[this.getParentProp()],s=this.directive,n=this.indexOfParentCollectionItem(i,s);if(e>=0&&n>=0&&e!==n){this.removeAtParentCollectionIndex(i,n);this.insertIntoParentCollection(i,Math.min(e,i.length),s)}}}isParentCollection(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))}indexOfParentCollectionItem(e,t){return this.isParentCollection(e)?e.indexOf(t):-1}insertIntoParentCollection(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))}removeAtParentCollectionIndex(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))}removeFromParentCollection(e,t){if(!this.isParentCollection(e))return;const i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}static evaluatePath(e,t){WjDirectiveBehavior.pathBinding.path=t;return WjDirectiveBehavior.pathBinding.getValue(e)}detectZonelessMode(){const e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)}runChangeDetectionAware(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}}performRequestCheck(){if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then((()=>{this.pendingCheck=!1;this.isDestroyed||(this.appRef?this.appRef.tick():this.cdRef?.detectChanges())}))}}static{this.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:WjDirectiveBehavior,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable})}static{this.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:WjDirectiveBehavior})}}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:Injectable}],ctorParameters:()=>[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]});class Ng2Utils{static{this.changeEventImplementSuffix="PC"}static{this.wjEventImplementSuffix="Ng"}static getChangeEventNameImplemented(e){return`${Ng2Utils.getChangeEventNameExposed(e)}${Ng2Utils.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return`${e}Change`}static getWjEventName(e){if(!e)return null;const t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}static equals(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t}}class WjValueAccessor{static{this.maxDeferredWriteAttempts=20}static{this.maxDeferredWriteDelayMs=32}static{this.maxInitWriteAttempts=20}constructor(e){this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=e=>{};this.onTouchedFn=()=>{};this.handleDirectiveValueChanged=(e,t)=>{if(!this.onChangeFn||!this.directive||!this.ngModelProp)return;const i=this.directive[this.ngModelProp],s=Array.isArray(i)?i.slice():i;let n=this.modelValue;""===n&&(n=null);if(!(this.directiveUpdateCount>0&&isNullOrEmpty(n)&&isNullOrEmpty(i)||Ng2Utils.equals(n,i))||Array.isArray(i)){this.modelValue=s;this.onChangeFn(s);this.getBehavior()?.requestCheck()}};this.handleDirectiveLostFocus=()=>{this.onTouchedFn();this.getBehavior()?.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){!this.directive?.isInitialized&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(this.directive?.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){const e=this.directive?.initialized;this.initSubscription=e?.subscribe((()=>{this.clearInitWrite();this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}))}this.scheduleInitWriteIfNeeded()}}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouchedFn=e}setDisabledState(e){if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;this.getBehavior()?.requestCheck()}}updateDirective(){if(this.isFirstChange()&&(null===this.modelValue||void 0===this.modelValue))return;this.ensureNgModelProp();if(!this.directive||!this.ngModelProp)return;const e=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=e}finally{this.directiveUpdateCount--}this.getBehavior()?.requestCheck();this.ensureSubscribed()}applyDirectiveValue(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()}ensureSubscribed(){if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){const e=this.getBehavior()?.getPropChangeEvent(this.ngModelProp);if(e){const t=this.directive[e];t&&"function"==typeof t.addHandler?t.addHandler(this.handleDirectiveValueChanged,this):t&&"function"==typeof t.subscribe&&(this.changeSubscription=t.subscribe((()=>this.handleDirectiveValueChanged(this.directive,null))))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}}ensureNgModelProp(){if(!this.ngModelProp&&this.directive){const e=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],t=this.getBehavior()?.typeData?.defaultModelProperty||null;this.ngModelProp=e||t}}ensureInitSubscriptionDisposed(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}}clearDeferredWrite(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}}clearInitWrite(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}}scheduleInitWriteIfNeeded(){if(this.directive&&!this.directive.isInitialized&&!this.getBehavior()?.isDestroyed)if(this.initWriteAttempts>=WjValueAccessor.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout((()=>{this.initWriteHandle=null;if(this.directive&&!this.getBehavior()?.isDestroyed)if(this.directive.isInitialized){this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}else this.scheduleInitWriteIfNeeded()}),0)}}scheduleDeferredWriteIfNeeded(){const e=this.getBehavior();if(!this.directive||!this.ngModelProp||e?.isDestroyed)return;if(this.isDirectiveValueSynchronized()){this.clearDeferredWrite();return}if(this.deferredWriteAttempts>=WjValueAccessor.maxDeferredWriteAttempts){this.clearDeferredWrite();return}this.clearDeferredWrite();this.deferredWriteAttempts++;const t=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout((()=>{this.deferredWriteHandle=null;this.directive&&!this.getBehavior()?.isDestroyed&&this.applyDirectiveValue()}),t)}isDirectiveValueSynchronized(){if(!this.directive||!this.ngModelProp)return!0;return areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])}normalizeModelValue(e){return""===e?null:e}getDeferredWriteDelay(){return Math.min(WjValueAccessor.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))}getBehavior(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior}isFirstChange(){return this.writeCount<2}}function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every(((e,i)=>areEquivalentValue(e,t[i])))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}export{Ng2Utils,WjComponentResolvedMetadata,WjDirectiveBehavior,WjOptions,WjValueAccessor,WjValueAccessorFactory,isNoopNgZoneLike};
14
+ import*as i0 from"@angular/core";import{NgZone,ChangeDetectorRef,ApplicationRef,EventEmitter,Injectable}from"@angular/core";import*as wijmo from"@grapecity/wijmo";class WjOptions{static{this.asyncBindings=!0}static{this.zonelessMode="auto"}}function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){const t=e.outputs||[],i=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(!t.length)return;const s=t.map((e=>e.split(":"))).map((e=>({implName:e[0]?.trim(),exposeName:e[1]?.trim()})));this.allImplEvents=s.filter((e=>!!e.implName)).map((e=>e.implName));const n=s.filter((e=>e.implName&&e.exposeName));for(const e of n){const t=ResolvedMetadataUtils.getWjEventName(e.implName);if(!t)continue;const s={eventImpl:e.implName,event:e.exposeName},n=i[t]??i[e.exposeName];n?.length&&(s.props=n.map((e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}))));this.changeEventMap.push(s)}for(const e of Object.keys(i)){if(e.indexOf(".")<0)continue;const t={eventImpl:null,event:e,props:i[e].map((e=>({prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)})))};this.changeEventMap.push(t)}}}class ResolvedMetadataUtils{static{this.changeEventImplementSuffix="PC"}static{this.wijmoEventImplementSuffix="Ng"}static getChangeEventNameImplemented(e){return`${ResolvedMetadataUtils.getChangeEventNameExposed(e)}${ResolvedMetadataUtils.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return`${e}Change`}static getWjEventName(e){if(!e)return null;const t=ResolvedMetadataUtils.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}}class WjDirectiveBehavior{static{this.directiveTypeDataProp="meta"}static{this.directiveResolvedTypeDataProp="_wjResolvedMeta"}static{this.behaviorRefProp="_wjBehaviour"}static{this.parentPropertyAttr="wjProperty"}static{this.wjModelPropertyAttr="wjModelProperty"}static{this.initializedEventAttr="initialized"}static{this.isInitializedPropAttr="isInitialized"}static{this.siblingDirIdAttr="wj-directive-id"}static{this.asyncBindingUpdatePropAttr="asyncBindings"}static{this.siblingDirId=0}static{this.wijmoComponentProviderId="WjComponent"}static{this.ngZone=null}static{this.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0}}static{this.pathBinding=new wijmo.Binding("")}static getHostElement(e,t){WjDirectiveBehavior.ngZone=t?t.get(NgZone,null):null;return e.nativeElement}static attach(e,t,i,s){return new WjDirectiveBehavior(e,t,i,s)}static getBehavior(e){return e?e[WjDirectiveBehavior.behaviorRefProp]??null:null}static getZone(e){const t=WjDirectiveBehavior.getBehavior(e);return t?.nz??WjDirectiveBehavior.ngZone}static instantiateTemplate(e,t,i,s=!1,n={}){if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");const r=t.createEmbeddedView(i,n,t.length),o=r.rootNodes;let a;if(s&&1===o.length)a=o[0];else{const e=document.createElement("div");for(const t of o)e.appendChild(t);a=e}e&&e.appendChild(a);return{viewRef:r,rootElement:a}}constructor(e,t,i,s){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=s;this.nz=i.get(NgZone,null);this.cdRef=i.get(ChangeDetectorRef,null);this.appRef=i.get(ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId=""+ ++WjDirectiveBehavior.siblingDirId);const n=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=n;this.resolvedTypeData=n;e[WjDirectiveBehavior.behaviorRefProp]=this;i[WjDirectiveBehavior.behaviorRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}ngOnInit(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout((()=>{if(!this.isDestroyed){this.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0);this.requestCheck()}}))}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){const s=e[t];this.removeFromParentCollection(s,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){const e=this.elementRef.nativeElement,t=e?.parentNode,i=t?Array.prototype.indexOf.call(t.childNodes,e):-1;this.directive.dispose();if(t&&i>-1&&Array.prototype.indexOf.call(t.childNodes,e)<0){e.textContent="";i<t.childNodes.length&&t.replaceChild(e,t.childNodes[i])}}this.injector[WjDirectiveBehavior.behaviorRefProp]=null}}flushPendingEvents(){this.triggerPendingEvents(!0)}requestCheck(){this.performRequestCheck()}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(!t)return null;for(const i of Object.keys(t))if(t[i].indexOf(e)>-1)return i;return null}createEvents(){const e=this.resolvedTypeData.allImplEvents||[];for(const t of e)this.directive[t]=new EventEmitter(!1)}overrideDirectiveMethods(){const e=this.directive;if(!(e instanceof wijmo.Control&&e._resizeObserverCallback))return;const t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!NgZone.isInAngularZone()){const i=WjDirectiveBehavior.getZone(this);if(i){i.run((()=>t(e)));return}}t(e)}}.bind(e)}subscribeToEvents(e){const t=this.resolvedTypeData.changeEventMap||[],i=!!e;for(const e of t){i===e.event.indexOf(".")>-1&&this.addHandlers(e)}if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive,i=WjDirectiveBehavior.evaluatePath(t,e.event);i&&i.addHandler(((i,s)=>{this.runChangeDetectionAware((()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this.triggerEvent(t[e.eventImpl],s,!(!e.props||!e.props.length))}))}))}triggerPropChangeEvents(e,t=!0){if(e.props?.length)for(const i of e.props){const e=this.getSignalFriendlyPropValue(this.directive[i.prop]);this.triggerEvent(this.directive[i.evImpl],e,t,!0)}}getSignalFriendlyPropValue(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e}triggerEvent(e,t,i,s=!1){if(i&&this.isAsyncBinding()){if(s){const i=this.pendingEvents.find((t=>t.event===e));i?i.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout((()=>this.triggerPendingEvents(!1)),0))}else{e.emit(t);this.performRequestCheck()}}triggerPendingEvents(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{const e=this.pendingEvents.slice();this.pendingEvents.length=0;for(const t of e)t.event.emit(t.args);this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)}setupAsChild(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}}isAsyncBinding(){const e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}isChild(){return this.isParentInitializer()||this.isParentReferencer()}isParentInitializer(){return null!==this.directive[WjDirectiveBehavior.parentPropertyAttr]&&void 0!==this.directive[WjDirectiveBehavior.parentPropertyAttr]}isParentReferencer(){return!!this.typeData.parentRefProperty}getParentProp(){return this.directive[WjDirectiveBehavior.parentPropertyAttr]}getParentReferenceProperty(){return this.typeData.parentRefProperty}parentInCtor(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()}initParent(){if(!this.parentBehavior)return;const e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){const s=e[t];if(this.isParentCollection(s)){let e=this.isHostElement()?this.getSiblingIndex():-1;(e<0||e>=s.length)&&(e=s.length);this.insertIntoParentCollection(s,e,i);if(this.isHostElement()){const e=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(e,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){const t=this.getParentReferenceProperty();t&&(i[t]=e)}}getSiblingIndex(){const e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes,s=this.typeData.siblingId;let n=-1;for(let t=0;t<i.length;t++){const r=i[t];if(1===r.nodeType&&r.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)===s){n++;if(r===e)return n}}return-1}handleSiblingInserted(e){for(const t of e){if("childList"!==t.type||0===t.addedNodes.length)continue;if(!Array.from(t.addedNodes).some((e=>e===this.elementRef.nativeElement)))continue;const e=this.getSiblingIndex(),i=this.parentBehavior?.directive[this.getParentProp()],s=this.directive,n=this.indexOfParentCollectionItem(i,s);if(e>=0&&n>=0&&e!==n){this.removeAtParentCollectionIndex(i,n);this.insertIntoParentCollection(i,Math.min(e,i.length),s)}}}isParentCollection(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))}indexOfParentCollectionItem(e,t){return this.isParentCollection(e)?e.indexOf(t):-1}insertIntoParentCollection(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))}removeAtParentCollectionIndex(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))}removeFromParentCollection(e,t){if(!this.isParentCollection(e))return;const i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}static evaluatePath(e,t){WjDirectiveBehavior.pathBinding.path=t;return WjDirectiveBehavior.pathBinding.getValue(e)}detectZonelessMode(){const e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)}runChangeDetectionAware(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}}performRequestCheck(){if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then((()=>{this.pendingCheck=!1;this.isDestroyed||(this.appRef?this.appRef.tick():this.cdRef?.detectChanges())}))}}static{this.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:WjDirectiveBehavior,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable})}static{this.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:WjDirectiveBehavior})}}i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:Injectable}],ctorParameters:()=>[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]});class Ng2Utils{static{this.changeEventImplementSuffix="PC"}static{this.wjEventImplementSuffix="Ng"}static getChangeEventNameImplemented(e){return`${Ng2Utils.getChangeEventNameExposed(e)}${Ng2Utils.changeEventImplementSuffix}`}static getChangeEventNameExposed(e){return`${e}Change`}static getWjEventName(e){if(!e)return null;const t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null}static equals(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t}}class WjValueAccessor{static{this.maxDeferredWriteAttempts=20}static{this.maxDeferredWriteDelayMs=32}static{this.maxInitWriteAttempts=20}constructor(e){this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=e=>{};this.onTouchedFn=()=>{};this.handleDirectiveValueChanged=(e,t)=>{if(!this.onChangeFn||!this.directive||!this.ngModelProp)return;const i=this.directive[this.ngModelProp],s=Array.isArray(i)?i.slice():i;let n=this.modelValue;""===n&&(n=null);if(!(this.directiveUpdateCount>0&&isNullOrEmpty(n)&&isNullOrEmpty(i)||Ng2Utils.equals(n,i))||Array.isArray(i)){this.modelValue=s;this.onChangeFn(s);this.getBehavior()?.requestCheck()}};this.handleDirectiveLostFocus=()=>{this.onTouchedFn();this.getBehavior()?.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){!this.directive?.isInitialized&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(this.directive?.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){const e=this.directive?.initialized;this.initSubscription=e?.subscribe((()=>{this.clearInitWrite();this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}))}this.scheduleInitWriteIfNeeded()}}registerOnChange(e){this.onChangeFn=e}registerOnTouched(e){this.onTouchedFn=e}setDisabledState(e){if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;this.getBehavior()?.requestCheck()}}updateDirective(){if(this.isFirstChange()&&(null===this.modelValue||void 0===this.modelValue))return;this.ensureNgModelProp();if(!this.directive||!this.ngModelProp)return;const e=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=e}finally{this.directiveUpdateCount--}this.getBehavior()?.requestCheck();this.ensureSubscribed()}applyDirectiveValue(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()}ensureSubscribed(){if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){const e=this.getBehavior()?.getPropChangeEvent(this.ngModelProp);if(e){const t=this.directive[e];t&&"function"==typeof t.addHandler?t.addHandler(this.handleDirectiveValueChanged,this):t&&"function"==typeof t.subscribe&&(this.changeSubscription=t.subscribe((()=>this.handleDirectiveValueChanged(this.directive,null))))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}}ensureNgModelProp(){if(!this.ngModelProp&&this.directive){const e=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],t=this.getBehavior()?.typeData?.defaultModelProperty||null;this.ngModelProp=e||t}}ensureInitSubscriptionDisposed(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}}clearDeferredWrite(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}}clearInitWrite(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}}scheduleInitWriteIfNeeded(){if(this.directive&&!this.directive.isInitialized&&!this.getBehavior()?.isDestroyed)if(this.initWriteAttempts>=WjValueAccessor.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout((()=>{this.initWriteHandle=null;if(this.directive&&!this.getBehavior()?.isDestroyed)if(this.directive.isInitialized){this.applyDirectiveValue();this.ensureInitSubscriptionDisposed()}else this.scheduleInitWriteIfNeeded()}),0)}}scheduleDeferredWriteIfNeeded(){const e=this.getBehavior();if(!this.directive||!this.ngModelProp||e?.isDestroyed)return;if(this.isDirectiveValueSynchronized()){this.clearDeferredWrite();return}if(this.deferredWriteAttempts>=WjValueAccessor.maxDeferredWriteAttempts){this.clearDeferredWrite();return}this.clearDeferredWrite();this.deferredWriteAttempts++;const t=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout((()=>{this.deferredWriteHandle=null;this.directive&&!this.getBehavior()?.isDestroyed&&this.applyDirectiveValue()}),t)}isDirectiveValueSynchronized(){if(!this.directive||!this.ngModelProp)return!0;return areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])}normalizeModelValue(e){return""===e?null:e}getDeferredWriteDelay(){return Math.min(WjValueAccessor.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))}getBehavior(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior}isFirstChange(){return this.writeCount<2}}function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every(((e,i)=>areEquivalentValue(e,t[i])))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}export{Ng2Utils,WjComponentResolvedMetadata,WjDirectiveBehavior,WjOptions,WjValueAccessor,WjValueAccessorFactory,isNoopNgZoneLike};
package/es5-esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20261.52
3
+ * Wijmo Library 5.20262.60
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,4 @@
11
11
  *
12
12
  */
13
13
 
14
- var _a,_b,_c,_d,_e;import*as i0 from"@angular/core";import{NgZone,ChangeDetectorRef,ApplicationRef,EventEmitter,Injectable}from"@angular/core";import*as wijmo from"@grapecity/wijmo";var WjOptions=function WjOptions(){};(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t,i=e.outputs||[],n=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(i.length){var r=i.map((function(e){return e.split(":")})).map((function(e){var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}}));this.allImplEvents=r.filter((function(e){return!!e.implName})).map((function(e){return e.implName}));for(var o=0,s=r.filter((function(e){return e.implName&&e.exposeName}));o<s.length;o++){var a=s[o],l=ResolvedMetadataUtils.getWjEventName(a.implName);if(l){var c={eventImpl:a.implName,event:a.exposeName},h=null!==(t=n[l])&&void 0!==t?t:n[a.exposeName];(null==h?void 0:h.length)&&(c.props=h.map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}})));this.changeEventMap.push(c)}}for(var v=0,d=Object.keys(n);v<d.length;v++){var u=d[v];if(!(u.indexOf(".")<0)){c={eventImpl:null,event:u,props:n[u].map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}}))};this.changeEventMap.push(c)}}}};return WjComponentResolvedMetadata}(),ResolvedMetadataUtils=function(){function ResolvedMetadataUtils(){}ResolvedMetadataUtils.getChangeEventNameImplemented=function(e){return"".concat(_b.getChangeEventNameExposed(e)).concat(_b.changeEventImplementSuffix)};ResolvedMetadataUtils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};ResolvedMetadataUtils.getWjEventName=function(e){if(!e)return null;var t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};return ResolvedMetadataUtils}();(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,n){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=n;this.nz=i.get(NgZone,null);this.cdRef=i.get(ChangeDetectorRef,null);this.appRef=i.get(ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId="".concat(++_c.siblingDirId));var r=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=r;this.resolvedTypeData=r;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){_c.ngZone=t?t.get(NgZone,null):null;return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,n){return new _c(e,t,i,n)};WjDirectiveBehavior.getBehavior=function(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null};WjDirectiveBehavior.getZone=function(e){var t,i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,n,r){void 0===n&&(n=!1);void 0===r&&(r={});if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");var o,s=t.createEmbeddedView(i,r,t.length),a=s.rootNodes;if(n&&1===a.length)o=a[0];else{for(var l=document.createElement("div"),c=0,h=a;c<h.length;c++){var v=h[c];l.appendChild(v)}o=l}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[_c.isInitializedPropAttr]=!0;setTimeout((function(){if(!e.isDestroyed){e.directive[_c.initializedEventAttr].emit(void 0);e.requestCheck()}}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){var n=e[t];this.removeFromParentCollection(n,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){var r=this.elementRef.nativeElement,o=null==r?void 0:r.parentNode,s=o?Array.prototype.indexOf.call(o.childNodes,r):-1;this.directive.dispose();if(o&&s>-1&&Array.prototype.indexOf.call(o.childNodes,r)<0){r.textContent="";s<o.childNodes.length&&o.replaceChild(r,o.childNodes[s])}}this.injector[_c.behaviorRefProp]=null}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this.triggerPendingEvents(!0)};WjDirectiveBehavior.prototype.requestCheck=function(){this.performRequestCheck()};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(!t)return null;for(var i=0,n=Object.keys(t);i<n.length;i++){var r=n[i];if(t[r].indexOf(e)>-1)return r}return null};WjDirectiveBehavior.prototype.createEvents=function(){for(var e=0,t=this.resolvedTypeData.allImplEvents||[];e<t.length;e++){var i=t[e];this.directive[i]=new EventEmitter(!1)}};WjDirectiveBehavior.prototype.overrideDirectiveMethods=function(){var e=this.directive;if(e instanceof wijmo.Control&&e._resizeObserverCallback){var t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!NgZone.isInAngularZone()){var n=_c.getZone(this);if(n){n.run((function(){return t(e)}));return}}t(e)}}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){for(var t=this.resolvedTypeData.changeEventMap||[],i=!!e,n=0,r=t;n<r.length;n++){i===(a=r[n]).event.indexOf(".")>-1&&this.addHandlers(a)}if(e)for(var o=0,s=t;o<s.length;o++){var a=s[o];this.triggerPropChangeEvents(a,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive,n=_c.evaluatePath(i,e.event);n&&n.addHandler((function(n,r){t.runChangeDetectionAware((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t.triggerEvent(i[e.eventImpl],r,!(!e.props||!e.props.length))}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){var i;void 0===t&&(t=!0);if(null===(i=e.props)||void 0===i?void 0:i.length)for(var n=0,r=e.props;n<r.length;n++){var o=r[n],s=this.getSignalFriendlyPropValue(this.directive[o.prop]);this.triggerEvent(this.directive[o.evImpl],s,t,!0)}};WjDirectiveBehavior.prototype.getSignalFriendlyPropValue=function(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e};WjDirectiveBehavior.prototype.triggerEvent=function(e,t,i,n){var r=this;void 0===n&&(n=!1);if(i&&this.isAsyncBinding()){if(n){var o=this.pendingEvents.find((function(t){return t.event===e}));o?o.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout((function(){return r.triggerPendingEvents(!1)}),0))}else{e.emit(t);this.performRequestCheck()}};WjDirectiveBehavior.prototype.triggerPendingEvents=function(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{var t=this.pendingEvents.slice();this.pendingEvents.length=0;for(var i=0,n=t;i<n.length;i++){var r=n[i];r.event.emit(r.args)}this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)};WjDirectiveBehavior.prototype.setupAsChild=function(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype.isAsyncBinding=function(){var e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype.isChild=function(){return this.isParentInitializer()||this.isParentReferencer()};WjDirectiveBehavior.prototype.isParentInitializer=function(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.getParentProp=function(){return this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.parentInCtor=function(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()};WjDirectiveBehavior.prototype.initParent=function(){if(this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){var n=e[t];if(this.isParentCollection(n)){var r=this.isHostElement()?this.getSiblingIndex():-1;(r<0||r>=n.length)&&(r=n.length);this.insertIntoParentCollection(n,r,i);if(this.isHostElement()){var o=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(o,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){var s=this.getParentReferenceProperty();s&&(i[s]=e)}}};WjDirectiveBehavior.prototype.getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,n=this.typeData.siblingId,r=-1,o=0;o<i.length;o++){var s=i[o];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===n){r++;if(s===e)return r}}return-1};WjDirectiveBehavior.prototype.handleSiblingInserted=function(e){for(var t,i=this,n=0,r=e;n<r.length;n++){var o=r[n];if("childList"===o.type&&0!==o.addedNodes.length){if(Array.from(o.addedNodes).some((function(e){return e===i.elementRef.nativeElement}))){var s=this.getSiblingIndex(),a=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],l=this.directive,c=this.indexOfParentCollectionItem(a,l);if(s>=0&&c>=0&&s!==c){this.removeAtParentCollectionIndex(a,c);this.insertIntoParentCollection(a,Math.min(s,a.length),l)}}}}};WjDirectiveBehavior.prototype.isParentCollection=function(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))};WjDirectiveBehavior.prototype.indexOfParentCollectionItem=function(e,t){return this.isParentCollection(e)?e.indexOf(t):-1};WjDirectiveBehavior.prototype.insertIntoParentCollection=function(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))};WjDirectiveBehavior.prototype.removeAtParentCollectionIndex=function(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))};WjDirectiveBehavior.prototype.removeFromParentCollection=function(e,t){if(this.isParentCollection(e)){var i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}};WjDirectiveBehavior.prototype.isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.evaluatePath=function(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)};WjDirectiveBehavior.prototype.detectZonelessMode=function(){var e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)};WjDirectiveBehavior.prototype.runChangeDetectionAware=function(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}};WjDirectiveBehavior.prototype.performRequestCheck=function(){var e=this;if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then((function(){var t;e.pendingCheck=!1;e.isDestroyed||(e.appRef?e.appRef.tick():null===(t=e.cdRef)||void 0===t||t.detectChanges())}))}};return WjDirectiveBehavior}();(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]}});var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.getChangeEventNameImplemented=function(e){return"".concat(_d.getChangeEventNameExposed(e)).concat(_d.changeEventImplementSuffix)};Ng2Utils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};Ng2Utils.getWjEventName=function(e){if(!e)return null;var t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};Ng2Utils.equals=function(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t};return Ng2Utils}();(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";var WjValueAccessor=function(){function WjValueAccessor(e){var t=this;this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=function(e){};this.onTouchedFn=function(){};this.handleDirectiveValueChanged=function(e,i){var n;if(t.onChangeFn&&t.directive&&t.ngModelProp){var r=t.directive[t.ngModelProp],o=Array.isArray(r)?r.slice():r,s=t.modelValue;""===s&&(s=null);if(!(t.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(r)||Ng2Utils.equals(s,r))||Array.isArray(r)){t.modelValue=o;t.onChangeFn(o);null===(n=t.getBehavior())||void 0===n||n.requestCheck()}}};this.handleDirectiveLostFocus=function(){var e;t.onTouchedFn();null===(e=t.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t,i,n,r=this;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){var o=null===(n=this.directive)||void 0===n?void 0:n.initialized;this.initSubscription=null==o?void 0:o.subscribe((function(){r.clearInitWrite();r.applyDirectiveValue();r.ensureInitSubscriptionDisposed()}))}this.scheduleInitWriteIfNeeded()}};WjValueAccessor.prototype.registerOnChange=function(e){this.onChangeFn=e};WjValueAccessor.prototype.registerOnTouched=function(e){this.onTouchedFn=e};WjValueAccessor.prototype.setDisabledState=function(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}};WjValueAccessor.prototype.updateDirective=function(){var e;if(!this.isFirstChange()||null!==this.modelValue&&void 0!==this.modelValue){this.ensureNgModelProp();if(this.directive&&this.ngModelProp){var t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}}};WjValueAccessor.prototype.applyDirectiveValue=function(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()};WjValueAccessor.prototype.ensureSubscribed=function(){var e,t=this;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){var i=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(i){var n=this.directive[i];n&&"function"==typeof n.addHandler?n.addHandler(this.handleDirectiveValueChanged,this):n&&"function"==typeof n.subscribe&&(this.changeSubscription=n.subscribe((function(){return t.handleDirectiveValueChanged(t.directive,null)})))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}};WjValueAccessor.prototype.ensureNgModelProp=function(){var e,t;if(!this.ngModelProp&&this.directive){var i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],n=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||n}};WjValueAccessor.prototype.ensureInitSubscriptionDisposed=function(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}};WjValueAccessor.prototype.clearDeferredWrite=function(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}};WjValueAccessor.prototype.clearInitWrite=function(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}};WjValueAccessor.prototype.scheduleInitWriteIfNeeded=function(){var e,t=this;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout((function(){var e;t.initWriteHandle=null;if(t.directive&&!(null===(e=t.getBehavior())||void 0===e?void 0:e.isDestroyed))if(t.directive.isInitialized){t.applyDirectiveValue();t.ensureInitSubscriptionDisposed()}else t.scheduleInitWriteIfNeeded()}),0)}};WjValueAccessor.prototype.scheduleDeferredWriteIfNeeded=function(){var e=this,t=this.getBehavior();if(this.directive&&this.ngModelProp&&!(null==t?void 0:t.isDestroyed))if(this.isDirectiveValueSynchronized())this.clearDeferredWrite();else if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts)this.clearDeferredWrite();else{this.clearDeferredWrite();this.deferredWriteAttempts++;var i=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout((function(){var t;e.deferredWriteHandle=null;e.directive&&!(null===(t=e.getBehavior())||void 0===t?void 0:t.isDestroyed)&&e.applyDirectiveValue()}),i)}};WjValueAccessor.prototype.isDirectiveValueSynchronized=function(){return!this.directive||!this.ngModelProp||areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])};WjValueAccessor.prototype.normalizeModelValue=function(e){return""===e?null:e};WjValueAccessor.prototype.getDeferredWriteDelay=function(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))};WjValueAccessor.prototype.getBehavior=function(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior};WjValueAccessor.prototype.isFirstChange=function(){return this.writeCount<2};return WjValueAccessor}();(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((function(e,i){return areEquivalentValue(e,t[i])}))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}export{Ng2Utils,WjComponentResolvedMetadata,WjDirectiveBehavior,WjOptions,WjValueAccessor,WjValueAccessorFactory,isNoopNgZoneLike};
14
+ var _a,_b,_c,_d,_e;import*as i0 from"@angular/core";import{NgZone,ChangeDetectorRef,ApplicationRef,EventEmitter,Injectable}from"@angular/core";import*as wijmo from"@grapecity/wijmo";var WjOptions=function WjOptions(){};(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t,i=e.outputs||[],n=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(i.length){var r=i.map((function(e){return e.split(":")})).map((function(e){var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}}));this.allImplEvents=r.filter((function(e){return!!e.implName})).map((function(e){return e.implName}));for(var o=0,s=r.filter((function(e){return e.implName&&e.exposeName}));o<s.length;o++){var a=s[o],l=ResolvedMetadataUtils.getWjEventName(a.implName);if(l){var c={eventImpl:a.implName,event:a.exposeName},h=null!==(t=n[l])&&void 0!==t?t:n[a.exposeName];(null==h?void 0:h.length)&&(c.props=h.map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}})));this.changeEventMap.push(c)}}for(var v=0,d=Object.keys(n);v<d.length;v++){var u=d[v];if(!(u.indexOf(".")<0)){c={eventImpl:null,event:u,props:n[u].map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}}))};this.changeEventMap.push(c)}}}};return WjComponentResolvedMetadata}(),ResolvedMetadataUtils=function(){function ResolvedMetadataUtils(){}ResolvedMetadataUtils.getChangeEventNameImplemented=function(e){return"".concat(_b.getChangeEventNameExposed(e)).concat(_b.changeEventImplementSuffix)};ResolvedMetadataUtils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};ResolvedMetadataUtils.getWjEventName=function(e){if(!e)return null;var t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};return ResolvedMetadataUtils}();(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,n){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=n;this.nz=i.get(NgZone,null);this.cdRef=i.get(ChangeDetectorRef,null);this.appRef=i.get(ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId="".concat(++_c.siblingDirId));var r=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=r;this.resolvedTypeData=r;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){_c.ngZone=t?t.get(NgZone,null):null;return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,n){return new _c(e,t,i,n)};WjDirectiveBehavior.getBehavior=function(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null};WjDirectiveBehavior.getZone=function(e){var t,i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,n,r){void 0===n&&(n=!1);void 0===r&&(r={});if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");var o,s=t.createEmbeddedView(i,r,t.length),a=s.rootNodes;if(n&&1===a.length)o=a[0];else{for(var l=document.createElement("div"),c=0,h=a;c<h.length;c++){var v=h[c];l.appendChild(v)}o=l}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[_c.isInitializedPropAttr]=!0;setTimeout((function(){if(!e.isDestroyed){e.directive[_c.initializedEventAttr].emit(void 0);e.requestCheck()}}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){var n=e[t];this.removeFromParentCollection(n,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){var r=this.elementRef.nativeElement,o=null==r?void 0:r.parentNode,s=o?Array.prototype.indexOf.call(o.childNodes,r):-1;this.directive.dispose();if(o&&s>-1&&Array.prototype.indexOf.call(o.childNodes,r)<0){r.textContent="";s<o.childNodes.length&&o.replaceChild(r,o.childNodes[s])}}this.injector[_c.behaviorRefProp]=null}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this.triggerPendingEvents(!0)};WjDirectiveBehavior.prototype.requestCheck=function(){this.performRequestCheck()};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(!t)return null;for(var i=0,n=Object.keys(t);i<n.length;i++){var r=n[i];if(t[r].indexOf(e)>-1)return r}return null};WjDirectiveBehavior.prototype.createEvents=function(){for(var e=0,t=this.resolvedTypeData.allImplEvents||[];e<t.length;e++){var i=t[e];this.directive[i]=new EventEmitter(!1)}};WjDirectiveBehavior.prototype.overrideDirectiveMethods=function(){var e=this.directive;if(e instanceof wijmo.Control&&e._resizeObserverCallback){var t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!NgZone.isInAngularZone()){var n=_c.getZone(this);if(n){n.run((function(){return t(e)}));return}}t(e)}}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){for(var t=this.resolvedTypeData.changeEventMap||[],i=!!e,n=0,r=t;n<r.length;n++){i===(a=r[n]).event.indexOf(".")>-1&&this.addHandlers(a)}if(e)for(var o=0,s=t;o<s.length;o++){var a=s[o];this.triggerPropChangeEvents(a,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive,n=_c.evaluatePath(i,e.event);n&&n.addHandler((function(n,r){t.runChangeDetectionAware((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t.triggerEvent(i[e.eventImpl],r,!(!e.props||!e.props.length))}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){var i;void 0===t&&(t=!0);if(null===(i=e.props)||void 0===i?void 0:i.length)for(var n=0,r=e.props;n<r.length;n++){var o=r[n],s=this.getSignalFriendlyPropValue(this.directive[o.prop]);this.triggerEvent(this.directive[o.evImpl],s,t,!0)}};WjDirectiveBehavior.prototype.getSignalFriendlyPropValue=function(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e};WjDirectiveBehavior.prototype.triggerEvent=function(e,t,i,n){var r=this;void 0===n&&(n=!1);if(i&&this.isAsyncBinding()){if(n){var o=this.pendingEvents.find((function(t){return t.event===e}));o?o.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout((function(){return r.triggerPendingEvents(!1)}),0))}else{e.emit(t);this.performRequestCheck()}};WjDirectiveBehavior.prototype.triggerPendingEvents=function(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{var t=this.pendingEvents.slice();this.pendingEvents.length=0;for(var i=0,n=t;i<n.length;i++){var r=n[i];r.event.emit(r.args)}this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)};WjDirectiveBehavior.prototype.setupAsChild=function(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype.isAsyncBinding=function(){var e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype.isChild=function(){return this.isParentInitializer()||this.isParentReferencer()};WjDirectiveBehavior.prototype.isParentInitializer=function(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.getParentProp=function(){return this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.parentInCtor=function(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()};WjDirectiveBehavior.prototype.initParent=function(){if(this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){var n=e[t];if(this.isParentCollection(n)){var r=this.isHostElement()?this.getSiblingIndex():-1;(r<0||r>=n.length)&&(r=n.length);this.insertIntoParentCollection(n,r,i);if(this.isHostElement()){var o=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(o,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){var s=this.getParentReferenceProperty();s&&(i[s]=e)}}};WjDirectiveBehavior.prototype.getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,n=this.typeData.siblingId,r=-1,o=0;o<i.length;o++){var s=i[o];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===n){r++;if(s===e)return r}}return-1};WjDirectiveBehavior.prototype.handleSiblingInserted=function(e){for(var t,i=this,n=0,r=e;n<r.length;n++){var o=r[n];if("childList"===o.type&&0!==o.addedNodes.length){if(Array.from(o.addedNodes).some((function(e){return e===i.elementRef.nativeElement}))){var s=this.getSiblingIndex(),a=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],l=this.directive,c=this.indexOfParentCollectionItem(a,l);if(s>=0&&c>=0&&s!==c){this.removeAtParentCollectionIndex(a,c);this.insertIntoParentCollection(a,Math.min(s,a.length),l)}}}}};WjDirectiveBehavior.prototype.isParentCollection=function(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))};WjDirectiveBehavior.prototype.indexOfParentCollectionItem=function(e,t){return this.isParentCollection(e)?e.indexOf(t):-1};WjDirectiveBehavior.prototype.insertIntoParentCollection=function(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))};WjDirectiveBehavior.prototype.removeAtParentCollectionIndex=function(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))};WjDirectiveBehavior.prototype.removeFromParentCollection=function(e,t){if(this.isParentCollection(e)){var i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}};WjDirectiveBehavior.prototype.isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.evaluatePath=function(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)};WjDirectiveBehavior.prototype.detectZonelessMode=function(){var e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)};WjDirectiveBehavior.prototype.runChangeDetectionAware=function(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}};WjDirectiveBehavior.prototype.performRequestCheck=function(){var e=this;if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then((function(){var t;e.pendingCheck=!1;e.isDestroyed||(e.appRef?e.appRef.tick():null===(t=e.cdRef)||void 0===t||t.detectChanges())}))}};return WjDirectiveBehavior}();(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:Injectable}],ctorParameters:function(){return[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]}});var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.getChangeEventNameImplemented=function(e){return"".concat(_d.getChangeEventNameExposed(e)).concat(_d.changeEventImplementSuffix)};Ng2Utils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};Ng2Utils.getWjEventName=function(e){if(!e)return null;var t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};Ng2Utils.equals=function(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t};return Ng2Utils}();(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";var WjValueAccessor=function(){function WjValueAccessor(e){var t=this;this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=function(e){};this.onTouchedFn=function(){};this.handleDirectiveValueChanged=function(e,i){var n;if(t.onChangeFn&&t.directive&&t.ngModelProp){var r=t.directive[t.ngModelProp],o=Array.isArray(r)?r.slice():r,s=t.modelValue;""===s&&(s=null);if(!(t.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(r)||Ng2Utils.equals(s,r))||Array.isArray(r)){t.modelValue=o;t.onChangeFn(o);null===(n=t.getBehavior())||void 0===n||n.requestCheck()}}};this.handleDirectiveLostFocus=function(){var e;t.onTouchedFn();null===(e=t.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t,i,n,r=this;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){var o=null===(n=this.directive)||void 0===n?void 0:n.initialized;this.initSubscription=null==o?void 0:o.subscribe((function(){r.clearInitWrite();r.applyDirectiveValue();r.ensureInitSubscriptionDisposed()}))}this.scheduleInitWriteIfNeeded()}};WjValueAccessor.prototype.registerOnChange=function(e){this.onChangeFn=e};WjValueAccessor.prototype.registerOnTouched=function(e){this.onTouchedFn=e};WjValueAccessor.prototype.setDisabledState=function(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}};WjValueAccessor.prototype.updateDirective=function(){var e;if(!this.isFirstChange()||null!==this.modelValue&&void 0!==this.modelValue){this.ensureNgModelProp();if(this.directive&&this.ngModelProp){var t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}}};WjValueAccessor.prototype.applyDirectiveValue=function(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()};WjValueAccessor.prototype.ensureSubscribed=function(){var e,t=this;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){var i=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(i){var n=this.directive[i];n&&"function"==typeof n.addHandler?n.addHandler(this.handleDirectiveValueChanged,this):n&&"function"==typeof n.subscribe&&(this.changeSubscription=n.subscribe((function(){return t.handleDirectiveValueChanged(t.directive,null)})))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}};WjValueAccessor.prototype.ensureNgModelProp=function(){var e,t;if(!this.ngModelProp&&this.directive){var i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],n=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||n}};WjValueAccessor.prototype.ensureInitSubscriptionDisposed=function(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}};WjValueAccessor.prototype.clearDeferredWrite=function(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}};WjValueAccessor.prototype.clearInitWrite=function(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}};WjValueAccessor.prototype.scheduleInitWriteIfNeeded=function(){var e,t=this;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout((function(){var e;t.initWriteHandle=null;if(t.directive&&!(null===(e=t.getBehavior())||void 0===e?void 0:e.isDestroyed))if(t.directive.isInitialized){t.applyDirectiveValue();t.ensureInitSubscriptionDisposed()}else t.scheduleInitWriteIfNeeded()}),0)}};WjValueAccessor.prototype.scheduleDeferredWriteIfNeeded=function(){var e=this,t=this.getBehavior();if(this.directive&&this.ngModelProp&&!(null==t?void 0:t.isDestroyed))if(this.isDirectiveValueSynchronized())this.clearDeferredWrite();else if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts)this.clearDeferredWrite();else{this.clearDeferredWrite();this.deferredWriteAttempts++;var i=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout((function(){var t;e.deferredWriteHandle=null;e.directive&&!(null===(t=e.getBehavior())||void 0===t?void 0:t.isDestroyed)&&e.applyDirectiveValue()}),i)}};WjValueAccessor.prototype.isDirectiveValueSynchronized=function(){return!this.directive||!this.ngModelProp||areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])};WjValueAccessor.prototype.normalizeModelValue=function(e){return""===e?null:e};WjValueAccessor.prototype.getDeferredWriteDelay=function(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))};WjValueAccessor.prototype.getBehavior=function(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior};WjValueAccessor.prototype.isFirstChange=function(){return this.writeCount<2};return WjValueAccessor}();(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((function(e,i){return areEquivalentValue(e,t[i])}))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}export{Ng2Utils,WjComponentResolvedMetadata,WjDirectiveBehavior,WjOptions,WjValueAccessor,WjValueAccessorFactory,isNoopNgZoneLike};
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20261.52
3
+ * Wijmo Library 5.20262.60
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20261.52
3
+ * Wijmo Library 5.20262.60
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,4 +11,4 @@
11
11
  *
12
12
  */
13
13
 
14
- "use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0});exports.WjValueAccessor=exports.WjOptions=exports.WjDirectiveBehavior=exports.WjComponentResolvedMetadata=exports.Ng2Utils=void 0;exports.WjValueAccessorFactory=WjValueAccessorFactory;exports.isNoopNgZoneLike=isNoopNgZoneLike;var i0=require("@angular/core"),core_1=require("@angular/core"),wijmo=require("@grapecity/wijmo"),WjOptions=function WjOptions(){};exports.WjOptions=WjOptions;(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t,i=e.outputs||[],r=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(i.length){var n=i.map((function(e){return e.split(":")})).map((function(e){var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}}));this.allImplEvents=n.filter((function(e){return!!e.implName})).map((function(e){return e.implName}));for(var o=0,s=n.filter((function(e){return e.implName&&e.exposeName}));o<s.length;o++){var a=s[o],l=ResolvedMetadataUtils.getWjEventName(a.implName);if(l){var c={eventImpl:a.implName,event:a.exposeName},h=null!==(t=r[l])&&void 0!==t?t:r[a.exposeName];(null==h?void 0:h.length)&&(c.props=h.map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}})));this.changeEventMap.push(c)}}for(var v=0,d=Object.keys(r);v<d.length;v++){var u=d[v];if(!(u.indexOf(".")<0)){c={eventImpl:null,event:u,props:r[u].map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}}))};this.changeEventMap.push(c)}}}};return WjComponentResolvedMetadata}();exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;var ResolvedMetadataUtils=function(){function ResolvedMetadataUtils(){}ResolvedMetadataUtils.getChangeEventNameImplemented=function(e){return"".concat(_b.getChangeEventNameExposed(e)).concat(_b.changeEventImplementSuffix)};ResolvedMetadataUtils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};ResolvedMetadataUtils.getWjEventName=function(e){if(!e)return null;var t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};return ResolvedMetadataUtils}();(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,r){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=r;this.nz=i.get(core_1.NgZone,null);this.cdRef=i.get(core_1.ChangeDetectorRef,null);this.appRef=i.get(core_1.ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId="".concat(++_c.siblingDirId));var n=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=n;this.resolvedTypeData=n;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){_c.ngZone=t?t.get(core_1.NgZone,null):null;return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,r){return new _c(e,t,i,r)};WjDirectiveBehavior.getBehavior=function(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null};WjDirectiveBehavior.getZone=function(e){var t,i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,r,n){void 0===r&&(r=!1);void 0===n&&(n={});if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");var o,s=t.createEmbeddedView(i,n,t.length),a=s.rootNodes;if(r&&1===a.length)o=a[0];else{for(var l=document.createElement("div"),c=0,h=a;c<h.length;c++){var v=h[c];l.appendChild(v)}o=l}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[_c.isInitializedPropAttr]=!0;setTimeout((function(){if(!e.isDestroyed){e.directive[_c.initializedEventAttr].emit(void 0);e.requestCheck()}}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){var r=e[t];this.removeFromParentCollection(r,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){var n=this.elementRef.nativeElement,o=null==n?void 0:n.parentNode,s=o?Array.prototype.indexOf.call(o.childNodes,n):-1;this.directive.dispose();if(o&&s>-1&&Array.prototype.indexOf.call(o.childNodes,n)<0){n.textContent="";s<o.childNodes.length&&o.replaceChild(n,o.childNodes[s])}}this.injector[_c.behaviorRefProp]=null}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this.triggerPendingEvents(!0)};WjDirectiveBehavior.prototype.requestCheck=function(){this.performRequestCheck()};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(!t)return null;for(var i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];if(t[n].indexOf(e)>-1)return n}return null};WjDirectiveBehavior.prototype.createEvents=function(){for(var e=0,t=this.resolvedTypeData.allImplEvents||[];e<t.length;e++){var i=t[e];this.directive[i]=new core_1.EventEmitter(!1)}};WjDirectiveBehavior.prototype.overrideDirectiveMethods=function(){var e=this.directive;if(e instanceof wijmo.Control&&e._resizeObserverCallback){var t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!core_1.NgZone.isInAngularZone()){var r=_c.getZone(this);if(r){r.run((function(){return t(e)}));return}}t(e)}}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){for(var t=this.resolvedTypeData.changeEventMap||[],i=!!e,r=0,n=t;r<n.length;r++){i===(a=n[r]).event.indexOf(".")>-1&&this.addHandlers(a)}if(e)for(var o=0,s=t;o<s.length;o++){var a=s[o];this.triggerPropChangeEvents(a,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive,r=_c.evaluatePath(i,e.event);r&&r.addHandler((function(r,n){t.runChangeDetectionAware((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t.triggerEvent(i[e.eventImpl],n,!(!e.props||!e.props.length))}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){var i;void 0===t&&(t=!0);if(null===(i=e.props)||void 0===i?void 0:i.length)for(var r=0,n=e.props;r<n.length;r++){var o=n[r],s=this.getSignalFriendlyPropValue(this.directive[o.prop]);this.triggerEvent(this.directive[o.evImpl],s,t,!0)}};WjDirectiveBehavior.prototype.getSignalFriendlyPropValue=function(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e};WjDirectiveBehavior.prototype.triggerEvent=function(e,t,i,r){var n=this;void 0===r&&(r=!1);if(i&&this.isAsyncBinding()){if(r){var o=this.pendingEvents.find((function(t){return t.event===e}));o?o.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout((function(){return n.triggerPendingEvents(!1)}),0))}else{e.emit(t);this.performRequestCheck()}};WjDirectiveBehavior.prototype.triggerPendingEvents=function(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{var t=this.pendingEvents.slice();this.pendingEvents.length=0;for(var i=0,r=t;i<r.length;i++){var n=r[i];n.event.emit(n.args)}this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)};WjDirectiveBehavior.prototype.setupAsChild=function(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype.isAsyncBinding=function(){var e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype.isChild=function(){return this.isParentInitializer()||this.isParentReferencer()};WjDirectiveBehavior.prototype.isParentInitializer=function(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.getParentProp=function(){return this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.parentInCtor=function(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()};WjDirectiveBehavior.prototype.initParent=function(){if(this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){var r=e[t];if(this.isParentCollection(r)){var n=this.isHostElement()?this.getSiblingIndex():-1;(n<0||n>=r.length)&&(n=r.length);this.insertIntoParentCollection(r,n,i);if(this.isHostElement()){var o=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(o,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){var s=this.getParentReferenceProperty();s&&(i[s]=e)}}};WjDirectiveBehavior.prototype.getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=this.typeData.siblingId,n=-1,o=0;o<i.length;o++){var s=i[o];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===r){n++;if(s===e)return n}}return-1};WjDirectiveBehavior.prototype.handleSiblingInserted=function(e){for(var t,i=this,r=0,n=e;r<n.length;r++){var o=n[r];if("childList"===o.type&&0!==o.addedNodes.length){if(Array.from(o.addedNodes).some((function(e){return e===i.elementRef.nativeElement}))){var s=this.getSiblingIndex(),a=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],l=this.directive,c=this.indexOfParentCollectionItem(a,l);if(s>=0&&c>=0&&s!==c){this.removeAtParentCollectionIndex(a,c);this.insertIntoParentCollection(a,Math.min(s,a.length),l)}}}}};WjDirectiveBehavior.prototype.isParentCollection=function(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))};WjDirectiveBehavior.prototype.indexOfParentCollectionItem=function(e,t){return this.isParentCollection(e)?e.indexOf(t):-1};WjDirectiveBehavior.prototype.insertIntoParentCollection=function(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))};WjDirectiveBehavior.prototype.removeAtParentCollectionIndex=function(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))};WjDirectiveBehavior.prototype.removeFromParentCollection=function(e,t){if(this.isParentCollection(e)){var i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}};WjDirectiveBehavior.prototype.isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.evaluatePath=function(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)};WjDirectiveBehavior.prototype.detectZonelessMode=function(){var e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)};WjDirectiveBehavior.prototype.runChangeDetectionAware=function(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}};WjDirectiveBehavior.prototype.performRequestCheck=function(){var e=this;if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then((function(){var t;e.pendingCheck=!1;e.isDestroyed||(e.appRef?e.appRef.tick():null===(t=e.cdRef)||void 0===t||t.detectChanges())}))}};return WjDirectiveBehavior}();exports.WjDirectiveBehavior=WjDirectiveBehavior;(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.18",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:core_1.Injectable}],ctorParameters:function(){return[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]}});var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.getChangeEventNameImplemented=function(e){return"".concat(_d.getChangeEventNameExposed(e)).concat(_d.changeEventImplementSuffix)};Ng2Utils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};Ng2Utils.getWjEventName=function(e){if(!e)return null;var t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};Ng2Utils.equals=function(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t};return Ng2Utils}();exports.Ng2Utils=Ng2Utils;(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";var WjValueAccessor=function(){function WjValueAccessor(e){var t=this;this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=function(e){};this.onTouchedFn=function(){};this.handleDirectiveValueChanged=function(e,i){var r;if(t.onChangeFn&&t.directive&&t.ngModelProp){var n=t.directive[t.ngModelProp],o=Array.isArray(n)?n.slice():n,s=t.modelValue;""===s&&(s=null);if(!(t.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(n)||Ng2Utils.equals(s,n))||Array.isArray(n)){t.modelValue=o;t.onChangeFn(o);null===(r=t.getBehavior())||void 0===r||r.requestCheck()}}};this.handleDirectiveLostFocus=function(){var e;t.onTouchedFn();null===(e=t.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t,i,r,n=this;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){var o=null===(r=this.directive)||void 0===r?void 0:r.initialized;this.initSubscription=null==o?void 0:o.subscribe((function(){n.clearInitWrite();n.applyDirectiveValue();n.ensureInitSubscriptionDisposed()}))}this.scheduleInitWriteIfNeeded()}};WjValueAccessor.prototype.registerOnChange=function(e){this.onChangeFn=e};WjValueAccessor.prototype.registerOnTouched=function(e){this.onTouchedFn=e};WjValueAccessor.prototype.setDisabledState=function(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}};WjValueAccessor.prototype.updateDirective=function(){var e;if(!this.isFirstChange()||null!==this.modelValue&&void 0!==this.modelValue){this.ensureNgModelProp();if(this.directive&&this.ngModelProp){var t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}}};WjValueAccessor.prototype.applyDirectiveValue=function(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()};WjValueAccessor.prototype.ensureSubscribed=function(){var e,t=this;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){var i=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(i){var r=this.directive[i];r&&"function"==typeof r.addHandler?r.addHandler(this.handleDirectiveValueChanged,this):r&&"function"==typeof r.subscribe&&(this.changeSubscription=r.subscribe((function(){return t.handleDirectiveValueChanged(t.directive,null)})))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}};WjValueAccessor.prototype.ensureNgModelProp=function(){var e,t;if(!this.ngModelProp&&this.directive){var i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],r=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||r}};WjValueAccessor.prototype.ensureInitSubscriptionDisposed=function(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}};WjValueAccessor.prototype.clearDeferredWrite=function(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}};WjValueAccessor.prototype.clearInitWrite=function(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}};WjValueAccessor.prototype.scheduleInitWriteIfNeeded=function(){var e,t=this;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout((function(){var e;t.initWriteHandle=null;if(t.directive&&!(null===(e=t.getBehavior())||void 0===e?void 0:e.isDestroyed))if(t.directive.isInitialized){t.applyDirectiveValue();t.ensureInitSubscriptionDisposed()}else t.scheduleInitWriteIfNeeded()}),0)}};WjValueAccessor.prototype.scheduleDeferredWriteIfNeeded=function(){var e=this,t=this.getBehavior();if(this.directive&&this.ngModelProp&&!(null==t?void 0:t.isDestroyed))if(this.isDirectiveValueSynchronized())this.clearDeferredWrite();else if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts)this.clearDeferredWrite();else{this.clearDeferredWrite();this.deferredWriteAttempts++;var i=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout((function(){var t;e.deferredWriteHandle=null;e.directive&&!(null===(t=e.getBehavior())||void 0===t?void 0:t.isDestroyed)&&e.applyDirectiveValue()}),i)}};WjValueAccessor.prototype.isDirectiveValueSynchronized=function(){return!this.directive||!this.ngModelProp||areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])};WjValueAccessor.prototype.normalizeModelValue=function(e){return""===e?null:e};WjValueAccessor.prototype.getDeferredWriteDelay=function(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))};WjValueAccessor.prototype.getBehavior=function(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior};WjValueAccessor.prototype.isFirstChange=function(){return this.writeCount<2};return WjValueAccessor}();exports.WjValueAccessor=WjValueAccessor;(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((function(e,i){return areEquivalentValue(e,t[i])}))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}
14
+ "use strict";var _a,_b,_c,_d,_e;Object.defineProperty(exports,"__esModule",{value:!0});exports.WjValueAccessor=exports.WjOptions=exports.WjDirectiveBehavior=exports.WjComponentResolvedMetadata=exports.Ng2Utils=void 0;exports.WjValueAccessorFactory=WjValueAccessorFactory;exports.isNoopNgZoneLike=isNoopNgZoneLike;var i0=require("@angular/core"),core_1=require("@angular/core"),wijmo=require("@grapecity/wijmo"),WjOptions=function WjOptions(){};exports.WjOptions=WjOptions;(_a=WjOptions).asyncBindings=!0;_a.zonelessMode="auto";function isNoopNgZoneLike(e){return!e||!e._inner&&!e._outer&&("function"==typeof e.run&&"function"==typeof e.runGuarded&&"function"==typeof e.runOutsideAngular&&"function"==typeof e.runTask)}var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t,i=e.outputs||[],r=e.changeEvents||{};this.changeEventMap.splice(0,this.changeEventMap.length);this.allImplEvents=[];if(i.length){var n=i.map((function(e){return e.split(":")})).map((function(e){var t,i;return{implName:null===(t=e[0])||void 0===t?void 0:t.trim(),exposeName:null===(i=e[1])||void 0===i?void 0:i.trim()}}));this.allImplEvents=n.filter((function(e){return!!e.implName})).map((function(e){return e.implName}));for(var o=0,s=n.filter((function(e){return e.implName&&e.exposeName}));o<s.length;o++){var a=s[o],l=ResolvedMetadataUtils.getWjEventName(a.implName);if(l){var c={eventImpl:a.implName,event:a.exposeName},h=null!==(t=r[l])&&void 0!==t?t:r[a.exposeName];(null==h?void 0:h.length)&&(c.props=h.map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}})));this.changeEventMap.push(c)}}for(var v=0,d=Object.keys(r);v<d.length;v++){var u=d[v];if(!(u.indexOf(".")<0)){c={eventImpl:null,event:u,props:r[u].map((function(e){return{prop:e,evExposed:ResolvedMetadataUtils.getChangeEventNameExposed(e),evImpl:ResolvedMetadataUtils.getChangeEventNameImplemented(e)}}))};this.changeEventMap.push(c)}}}};return WjComponentResolvedMetadata}();exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;var ResolvedMetadataUtils=function(){function ResolvedMetadataUtils(){}ResolvedMetadataUtils.getChangeEventNameImplemented=function(e){return"".concat(_b.getChangeEventNameExposed(e)).concat(_b.changeEventImplementSuffix)};ResolvedMetadataUtils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};ResolvedMetadataUtils.getWjEventName=function(e){if(!e)return null;var t=_b.wijmoEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};return ResolvedMetadataUtils}();(_b=ResolvedMetadataUtils).changeEventImplementSuffix="PC";_b.wijmoEventImplementSuffix="Ng";var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,r){this.parentBehavior=null;this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.siblingInsertedObserver=null;this.pendingEvents=[];this.pendingEventsTimeout=null;this.pendingCheck=!1;this.directive=e;this.elementRef=t;this.injector=i;this.injectedParent=r;this.nz=i.get(core_1.NgZone,null);this.cdRef=i.get(core_1.ChangeDetectorRef,null);this.appRef=i.get(core_1.ApplicationRef,null);this.isZoneless=this.detectZonelessMode();this.nz&&!this.isZoneless&&(this.nzRun=this.nz.run.bind(this.nz));this.overrideDirectiveMethods();this.typeData=e.constructor[_c.directiveTypeDataProp]||{};null!==this.typeData.siblingId&&void 0!==this.typeData.siblingId||(this.typeData.siblingId="".concat(++_c.siblingDirId));var n=e.constructor[_c.directiveResolvedTypeDataProp]||new WjComponentResolvedMetadata(this.typeData);e.constructor[_c.directiveResolvedTypeDataProp]=n;this.resolvedTypeData=n;e[_c.behaviorRefProp]=this;i[_c.behaviorRefProp]=this;e[_c.isInitializedPropAttr]=!1;this.createEvents();this.setupAsChild();this.isHostElement()&&this.elementRef.nativeElement.setAttribute(_c.siblingDirIdAttr,this.typeData.siblingId);this.subscribeToEvents(!1);e instanceof wijmo.Control&&(e.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){_c.ngZone=t?t.get(core_1.NgZone,null):null;return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,r){return new _c(e,t,i,r)};WjDirectiveBehavior.getBehavior=function(e){var t;return e&&null!==(t=e[_c.behaviorRefProp])&&void 0!==t?t:null};WjDirectiveBehavior.getZone=function(e){var t,i=_c.getBehavior(e);return null!==(t=null==i?void 0:i.nz)&&void 0!==t?t:_c.ngZone};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,r,n){void 0===r&&(r=!1);void 0===n&&(n={});if(!i)throw new Error("A templateRef is required to instantiate a Wijmo Angular template.");var o,s=t.createEmbeddedView(i,n,t.length),a=s.rootNodes;if(r&&1===a.length)o=a[0];else{for(var l=document.createElement("div"),c=0,h=a;c<h.length;c++){var v=h[c];l.appendChild(v)}o=l}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this.initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[_c.isInitializedPropAttr]=!0;setTimeout((function(){if(!e.isDestroyed){e.directive[_c.initializedEventAttr].emit(void 0);e.requestCheck()}}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;if(this.siblingInsertedObserver){this.siblingInsertedObserver.disconnect();this.siblingInsertedObserver=null}if(this.isChild()&&this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(!this.parentBehavior.isDestroyed&&e&&t&&i){var r=e[t];this.removeFromParentCollection(r,i)}}if(this.directive instanceof wijmo.Control&&this.directive.hostElement){var n=this.elementRef.nativeElement,o=null==n?void 0:n.parentNode,s=o?Array.prototype.indexOf.call(o.childNodes,n):-1;this.directive.dispose();if(o&&s>-1&&Array.prototype.indexOf.call(o.childNodes,n)<0){n.textContent="";s<o.childNodes.length&&o.replaceChild(n,o.childNodes[s])}}this.injector[_c.behaviorRefProp]=null}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this.triggerPendingEvents(!0)};WjDirectiveBehavior.prototype.requestCheck=function(){this.performRequestCheck()};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(!t)return null;for(var i=0,r=Object.keys(t);i<r.length;i++){var n=r[i];if(t[n].indexOf(e)>-1)return n}return null};WjDirectiveBehavior.prototype.createEvents=function(){for(var e=0,t=this.resolvedTypeData.allImplEvents||[];e<t.length;e++){var i=t[e];this.directive[i]=new core_1.EventEmitter(!1)}};WjDirectiveBehavior.prototype.overrideDirectiveMethods=function(){var e=this.directive;if(e instanceof wijmo.Control&&e._resizeObserverCallback){var t=e._resizeObserverCallback.bind(e),i=this;e._resizeObserverCallback=function(e){if(i.isZoneless){t(e);i.requestCheck()}else{if(!core_1.NgZone.isInAngularZone()){var r=_c.getZone(this);if(r){r.run((function(){return t(e)}));return}}t(e)}}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){for(var t=this.resolvedTypeData.changeEventMap||[],i=!!e,r=0,n=t;r<n.length;r++){i===(a=n[r]).event.indexOf(".")>-1&&this.addHandlers(a)}if(e)for(var o=0,s=t;o<s.length;o++){var a=s[o];this.triggerPropChangeEvents(a,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive,r=_c.evaluatePath(i,e.event);r&&r.addHandler((function(r,n){t.runChangeDetectionAware((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t.triggerEvent(i[e.eventImpl],n,!(!e.props||!e.props.length))}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){var i;void 0===t&&(t=!0);if(null===(i=e.props)||void 0===i?void 0:i.length)for(var r=0,n=e.props;r<n.length;r++){var o=n[r],s=this.getSignalFriendlyPropValue(this.directive[o.prop]);this.triggerEvent(this.directive[o.evImpl],s,t,!0)}};WjDirectiveBehavior.prototype.getSignalFriendlyPropValue=function(e){return wijmo.isArray(e)?Array.prototype.slice.call(e):e};WjDirectiveBehavior.prototype.triggerEvent=function(e,t,i,r){var n=this;void 0===r&&(r=!1);if(i&&this.isAsyncBinding()){if(r){var o=this.pendingEvents.find((function(t){return t.event===e}));o?o.args=t:this.pendingEvents.push({event:e,args:t})}else this.pendingEvents.push({event:e,args:t});null===this.pendingEventsTimeout&&(this.pendingEventsTimeout=setTimeout((function(){return n.triggerPendingEvents(!1)}),0))}else{e.emit(t);this.performRequestCheck()}};WjDirectiveBehavior.prototype.triggerPendingEvents=function(e){if(null!==this.pendingEventsTimeout){clearTimeout(this.pendingEventsTimeout);this.pendingEventsTimeout=null}if(!this.isDestroyed)do{var t=this.pendingEvents.slice();this.pendingEvents.length=0;for(var i=0,r=t;i<r.length;i++){var n=r[i];n.event.emit(n.args)}this.performRequestCheck()}while(e&&!this.isDestroyed&&this.pendingEvents.length)};WjDirectiveBehavior.prototype.setupAsChild=function(){if(this.isChild()){this.isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=_c.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype.isAsyncBinding=function(){var e=this.directive[_c.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype.isChild=function(){return this.isParentInitializer()||this.isParentReferencer()};WjDirectiveBehavior.prototype.isParentInitializer=function(){return null!==this.directive[_c.parentPropertyAttr]&&void 0!==this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.getParentProp=function(){return this.directive[_c.parentPropertyAttr]};WjDirectiveBehavior.prototype.getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype.parentInCtor=function(){return this.isParentReferencer()&&""===this.getParentReferenceProperty()};WjDirectiveBehavior.prototype.initParent=function(){if(this.parentBehavior){var e=this.parentBehavior.directive,t=this.getParentProp(),i=this.directive;if(this.isParentInitializer()&&t){var r=e[t];if(this.isParentCollection(r)){var n=this.isHostElement()?this.getSiblingIndex():-1;(n<0||n>=r.length)&&(n=r.length);this.insertIntoParentCollection(r,n,i);if(this.isHostElement()){var o=this.elementRef.nativeElement;this.siblingInsertedObserver=new MutationObserver(this.handleSiblingInserted.bind(this));this.siblingInsertedObserver.observe(o,{childList:!0})}}else e[t]=i}if(this.isParentReferencer()&&!this.parentInCtor()){var s=this.getParentReferenceProperty();s&&(i[s]=e)}}};WjDirectiveBehavior.prototype.getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=this.typeData.siblingId,n=-1,o=0;o<i.length;o++){var s=i[o];if(1===s.nodeType&&s.getAttribute(_c.siblingDirIdAttr)===r){n++;if(s===e)return n}}return-1};WjDirectiveBehavior.prototype.handleSiblingInserted=function(e){for(var t,i=this,r=0,n=e;r<n.length;r++){var o=n[r];if("childList"===o.type&&0!==o.addedNodes.length){if(Array.from(o.addedNodes).some((function(e){return e===i.elementRef.nativeElement}))){var s=this.getSiblingIndex(),a=null===(t=this.parentBehavior)||void 0===t?void 0:t.directive[this.getParentProp()],l=this.directive,c=this.indexOfParentCollectionItem(a,l);if(s>=0&&c>=0&&s!==c){this.removeAtParentCollectionIndex(a,c);this.insertIntoParentCollection(a,Math.min(s,a.length),l)}}}}};WjDirectiveBehavior.prototype.isParentCollection=function(e){return!!e&&(wijmo.isArray(e)||"object"==typeof e&&"number"==typeof e.length&&"function"==typeof e.indexOf&&("function"==typeof e.splice||"function"==typeof e.insert))};WjDirectiveBehavior.prototype.indexOfParentCollectionItem=function(e,t){return this.isParentCollection(e)?e.indexOf(t):-1};WjDirectiveBehavior.prototype.insertIntoParentCollection=function(e,t,i){this.isParentCollection(e)&&("function"!=typeof e.splice?"function"!=typeof e.insert?"function"==typeof e.push&&e.push(i):e.insert(t,i):e.splice(t,0,i))};WjDirectiveBehavior.prototype.removeAtParentCollectionIndex=function(e,t){!this.isParentCollection(e)||t<0||("function"!=typeof e.removeAt?"function"==typeof e.splice&&e.splice(t,1):e.removeAt(t))};WjDirectiveBehavior.prototype.removeFromParentCollection=function(e,t){if(this.isParentCollection(e)){var i=this.indexOfParentCollectionItem(e,t);i>-1&&this.removeAtParentCollectionIndex(e,i)}};WjDirectiveBehavior.prototype.isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.evaluatePath=function(e,t){_c.pathBinding.path=t;return _c.pathBinding.getValue(e)};WjDirectiveBehavior.prototype.detectZonelessMode=function(){var e=WjOptions.zonelessMode;return!0===e||!1===e?e:!this.nz||isNoopNgZoneLike(this.nz)};WjDirectiveBehavior.prototype.runChangeDetectionAware=function(e){if(!this.isZoneless&&this.nz)this.nzRun(e);else{e();this.performRequestCheck()}};WjDirectiveBehavior.prototype.performRequestCheck=function(){var e=this;if(this.isZoneless&&(this.appRef||this.cdRef)&&!this.isDestroyed&&!this.pendingCheck){this.pendingCheck=!0;Promise.resolve().then((function(){var t;e.pendingCheck=!1;e.isDestroyed||(e.appRef?e.appRef.tick():null===(t=e.cdRef)||void 0===t||t.detectChanges())}))}};return WjDirectiveBehavior}();exports.WjDirectiveBehavior=WjDirectiveBehavior;(_c=WjDirectiveBehavior).directiveTypeDataProp="meta";_c.directiveResolvedTypeDataProp="_wjResolvedMeta";_c.behaviorRefProp="_wjBehaviour";_c.parentPropertyAttr="wjProperty";_c.wjModelPropertyAttr="wjModelProperty";_c.initializedEventAttr="initialized";_c.isInitializedPropAttr="isInitialized";_c.siblingDirIdAttr="wj-directive-id";_c.asyncBindingUpdatePropAttr="asyncBindings";_c.siblingDirId=0;_c.wijmoComponentProviderId="WjComponent";_c.ngZone=null;_c.outsideZoneEvents={pointermove:!0,pointerover:!0,mousemove:!0,wheel:!0,touchmove:!0,pointerenter:!0,pointerleave:!0,pointerout:!0,mouseover:!0,mouseenter:!0,mouseleave:!0,mouseout:!0};_c.pathBinding=new wijmo.Binding("");_c.ɵfac=i0.ɵɵngDeclareFactory({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c,deps:"invalid",target:i0.ɵɵFactoryTarget.Injectable});_c.ɵprov=i0.ɵɵngDeclareInjectable({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:_c});i0.ɵɵngDeclareClassMetadata({minVersion:"12.0.0",version:"20.3.27",ngImport:i0,type:WjDirectiveBehavior,decorators:[{type:core_1.Injectable}],ctorParameters:function(){return[{type:void 0},{type:i0.ElementRef},{type:i0.Injector},{type:void 0}]}});var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.getChangeEventNameImplemented=function(e){return"".concat(_d.getChangeEventNameExposed(e)).concat(_d.changeEventImplementSuffix)};Ng2Utils.getChangeEventNameExposed=function(e){return"".concat(e,"Change")};Ng2Utils.getWjEventName=function(e){if(!e)return null;var t=_d.wjEventImplementSuffix,i=e.length-t.length;return i>0&&e.slice(i)===t?e.slice(0,i):null};Ng2Utils.equals=function(e,t){return Number.isNaN(e)&&Number.isNaN(t)||wijmo.DateTime.equals(e,t)||e===t};return Ng2Utils}();exports.Ng2Utils=Ng2Utils;(_d=Ng2Utils).changeEventImplementSuffix="PC";_d.wjEventImplementSuffix="Ng";var WjValueAccessor=function(){function WjValueAccessor(e){var t=this;this.writeCount=0;this.ngModelProp=null;this.isSubscribed=!1;this.changeSubscription=null;this.directiveUpdateCount=0;this.initSubscription=null;this.deferredWriteHandle=null;this.deferredWriteAttempts=0;this.initWriteHandle=null;this.initWriteAttempts=0;this.onChangeFn=function(e){};this.onTouchedFn=function(){};this.handleDirectiveValueChanged=function(e,i){var r;if(t.onChangeFn&&t.directive&&t.ngModelProp){var n=t.directive[t.ngModelProp],o=Array.isArray(n)?n.slice():n,s=t.modelValue;""===s&&(s=null);if(!(t.directiveUpdateCount>0&&isNullOrEmpty(s)&&isNullOrEmpty(n)||Ng2Utils.equals(s,n))||Array.isArray(n)){t.modelValue=o;t.onChangeFn(o);null===(r=t.getBehavior())||void 0===r||r.requestCheck()}}};this.handleDirectiveLostFocus=function(){var e;t.onTouchedFn();null===(e=t.getBehavior())||void 0===e||e.requestCheck()};this.directive=e;this.behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t,i,r,n=this;!(null===(t=this.directive)||void 0===t?void 0:t.isInitialized)&&isNullOrEmpty(e)&&!isNullOrEmpty(this.modelValue)||(this.modelValue=e);this.writeCount++;this.clearDeferredWrite();this.deferredWriteAttempts=0;this.clearInitWrite();this.initWriteAttempts=0;this.applyDirectiveValue();if(null===(i=this.directive)||void 0===i?void 0:i.isInitialized)this.ensureInitSubscriptionDisposed();else{if(!this.initSubscription){var o=null===(r=this.directive)||void 0===r?void 0:r.initialized;this.initSubscription=null==o?void 0:o.subscribe((function(){n.clearInitWrite();n.applyDirectiveValue();n.ensureInitSubscriptionDisposed()}))}this.scheduleInitWriteIfNeeded()}};WjValueAccessor.prototype.registerOnChange=function(e){this.onChangeFn=e};WjValueAccessor.prototype.registerOnTouched=function(e){this.onTouchedFn=e};WjValueAccessor.prototype.setDisabledState=function(e){var t;if(this.directive instanceof wijmo.Control){this.directive.isDisabled=e;null===(t=this.getBehavior())||void 0===t||t.requestCheck()}};WjValueAccessor.prototype.updateDirective=function(){var e;if(!this.isFirstChange()||null!==this.modelValue&&void 0!==this.modelValue){this.ensureNgModelProp();if(this.directive&&this.ngModelProp){var t=this.normalizeModelValue(this.modelValue);this.directiveUpdateCount++;try{this.directive[this.ngModelProp]=t}finally{this.directiveUpdateCount--}null===(e=this.getBehavior())||void 0===e||e.requestCheck();this.ensureSubscribed()}}};WjValueAccessor.prototype.applyDirectiveValue=function(){this.updateDirective();this.scheduleDeferredWriteIfNeeded()};WjValueAccessor.prototype.ensureSubscribed=function(){var e,t=this;if(!this.isSubscribed&&this.directive){this.ensureNgModelProp();if(this.ngModelProp){var i=null===(e=this.getBehavior())||void 0===e?void 0:e.getPropChangeEvent(this.ngModelProp);if(i){var r=this.directive[i];r&&"function"==typeof r.addHandler?r.addHandler(this.handleDirectiveValueChanged,this):r&&"function"==typeof r.subscribe&&(this.changeSubscription=r.subscribe((function(){return t.handleDirectiveValueChanged(t.directive,null)})))}}this.directive instanceof wijmo.Control&&this.directive.lostFocus.addHandler(this.handleDirectiveLostFocus,this);this.isSubscribed=!0}};WjValueAccessor.prototype.ensureNgModelProp=function(){var e,t;if(!this.ngModelProp&&this.directive){var i=this.directive[WjDirectiveBehavior.wjModelPropertyAttr],r=(null===(t=null===(e=this.getBehavior())||void 0===e?void 0:e.typeData)||void 0===t?void 0:t.defaultModelProperty)||null;this.ngModelProp=i||r}};WjValueAccessor.prototype.ensureInitSubscriptionDisposed=function(){if(this.initSubscription){this.initSubscription.unsubscribe();this.initSubscription=null}};WjValueAccessor.prototype.clearDeferredWrite=function(){if(null!==this.deferredWriteHandle){clearTimeout(this.deferredWriteHandle);this.deferredWriteHandle=null}};WjValueAccessor.prototype.clearInitWrite=function(){if(null!==this.initWriteHandle){clearTimeout(this.initWriteHandle);this.initWriteHandle=null}};WjValueAccessor.prototype.scheduleInitWriteIfNeeded=function(){var e,t=this;if(this.directive&&!this.directive.isInitialized&&!(null===(e=this.getBehavior())||void 0===e?void 0:e.isDestroyed))if(this.initWriteAttempts>=_e.maxInitWriteAttempts)this.clearInitWrite();else{this.clearInitWrite();this.initWriteAttempts++;this.initWriteHandle=setTimeout((function(){var e;t.initWriteHandle=null;if(t.directive&&!(null===(e=t.getBehavior())||void 0===e?void 0:e.isDestroyed))if(t.directive.isInitialized){t.applyDirectiveValue();t.ensureInitSubscriptionDisposed()}else t.scheduleInitWriteIfNeeded()}),0)}};WjValueAccessor.prototype.scheduleDeferredWriteIfNeeded=function(){var e=this,t=this.getBehavior();if(this.directive&&this.ngModelProp&&!(null==t?void 0:t.isDestroyed))if(this.isDirectiveValueSynchronized())this.clearDeferredWrite();else if(this.deferredWriteAttempts>=_e.maxDeferredWriteAttempts)this.clearDeferredWrite();else{this.clearDeferredWrite();this.deferredWriteAttempts++;var i=this.getDeferredWriteDelay();this.deferredWriteHandle=setTimeout((function(){var t;e.deferredWriteHandle=null;e.directive&&!(null===(t=e.getBehavior())||void 0===t?void 0:t.isDestroyed)&&e.applyDirectiveValue()}),i)}};WjValueAccessor.prototype.isDirectiveValueSynchronized=function(){return!this.directive||!this.ngModelProp||areEquivalentValue(this.normalizeModelValue(this.modelValue),this.directive[this.ngModelProp])};WjValueAccessor.prototype.normalizeModelValue=function(e){return""===e?null:e};WjValueAccessor.prototype.getDeferredWriteDelay=function(){return Math.min(_e.maxDeferredWriteDelayMs,2*Math.max(0,this.deferredWriteAttempts-1))};WjValueAccessor.prototype.getBehavior=function(){!this.behavior&&this.directive&&(this.behavior=WjDirectiveBehavior.getBehavior(this.directive));return this.behavior};WjValueAccessor.prototype.isFirstChange=function(){return this.writeCount<2};return WjValueAccessor}();exports.WjValueAccessor=WjValueAccessor;(_e=WjValueAccessor).maxDeferredWriteAttempts=20;_e.maxDeferredWriteDelayMs=32;_e.maxInitWriteAttempts=20;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function isNullOrEmpty(e){return null==e||""===e}function areEquivalentValue(e,t){return!(!isNullOrEmpty(e)||!isNullOrEmpty(t))||(!!areEquivalentArrays(e,t)||(isCellRangeLike(e)&&isCellRangeLike(t)?e.row===t.row&&e.col===t.col&&e.row2===t.row2&&e.col2===t.col2:Ng2Utils.equals(e,t)))}function areEquivalentArrays(e,t){return!(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)&&e.every((function(e,i){return areEquivalentValue(e,t[i])}))}function isCellRangeLike(e){return!!e&&"object"==typeof e&&"number"==typeof e.row&&"number"==typeof e.col&&"number"==typeof e.row2&&"number"==typeof e.col2}
package/package.json CHANGED
@@ -1,27 +1,9 @@
1
1
  {
2
2
  "name": "@grapecity/wijmo.angular2legacy.directivebase",
3
- "version": "5.20261.52",
4
- "sideEffects": false,
5
- "peerDependencies": {
6
- "@angular/common": ">=20.3.18",
7
- "@angular/core": ">=20.3.18",
8
- "@angular/forms": ">=20.3.18"
9
- },
3
+ "version": "5.20262.60",
10
4
  "module": "./es5-esm.js",
11
- "typings": "./index.d.ts",
12
- "exports": {
13
- "./package.json": {
14
- "default": "./package.json"
15
- },
16
- ".": {
17
- "types": "./index.d.ts",
18
- "default": "./es2022-fesm.mjs",
19
- "import": "./es2022-fesm.mjs",
20
- "require": "./index.js"
21
- }
22
- },
23
5
  "dependencies": {
24
- "@grapecity/wijmo": "5.20261.52"
6
+ "@grapecity/wijmo": "5.20262.60"
25
7
  },
26
8
  "description": "UI library for pure JS, Angular, React, Vue and more...",
27
9
  "author": "MESCIUS inc",