@mescius/wijmo.angular2.directivebase 5.20252.44 → 5.20261.45-nightly.d20260105.t014601

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.20252.44
3
+ * Wijmo Library 5.20261.45-nightly.d20260105.t014601
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 __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const core_1=require("@angular/core"),wijmo=__importStar(require("@mescius/wijmo"));class WjOptions{}WjOptions.asyncBindings=!0;exports.WjOptions=WjOptions;class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){let t=this.changeEventMap,i=e.outputs,r=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(!i||!i.length)return;let n=i.map(e=>e.split(":")).map(e=>({implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}));this.allImplEvents=n.map(e=>e.implName);let s=n.filter(e=>e.implName&&e.exposeName);for(let e of s){if(Ng2Utils.getWjEventName(e.implName)){let i={eventImpl:e.implName,event:e.exposeName},n=r[e.exposeName];n&&n.length&&(i.props=n.map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)})));t.push(i)}}for(let e in r)if(e.indexOf(".")>-1){let i={eventImpl:null,event:e,props:r[e].map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}))};t.push(i)}}}exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;class WjDirectiveBehavior{constructor(e,t,i,r){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();let n=this.nz=i.get(core_1.NgZone);n&&(this.nzRun=n.run.bind(n));this.injectedParent=r;let s=this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];null==s.siblingId&&(s.siblingId=++WjDirectiveBehavior.siblingDirId+"");let o=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];o?this.resolvedTypeData=o:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=o=this.resolvedTypeData=new WjComponentResolvedMetadata(s);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,s.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}static getHostElement(e,t){WjDirectiveBehavior.ngZone=t.get(core_1.NgZone);return e.nativeElement}static attach(e,t,i,r){return new WjDirectiveBehavior(e,t,i,r)}static getZone(e){const t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone}ngOnInit(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout(()=>{this.isDestroyed||this.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){let i=this.parentBehavior.directive,r=this._getParentProp();if(!this.parentBehavior.isDestroyed&&i&&r&&e){let n=i[r];if(wijmo.isArray(n)&&n){var t=n.indexOf(e);t>=0&&n.splice(t,1)}}}if(e instanceof wijmo.Control&&e.hostElement){let t=this.elementRef.nativeElement,i=t&&t.parentNode,r=i?Array.prototype.indexOf.call(i.childNodes,t):-1;e.dispose();if(r>-1&&Array.prototype.indexOf.call(i.childNodes,t)<0){t.textContent="";r<i.childNodes.length&&i.replaceChild(t,i.childNodes[r])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}}static instantiateTemplate(e,t,i,r=!1,n={}){var s,o=t.createEmbeddedView(i,n,t.length),a=o.rootNodes;if(r&&1===a.length)s=a[0];else{s=document.createElement("div");for(let e of a)s.appendChild(e)}e&&e.appendChild(s);return{viewRef:o,rootElement:s}}getPropChangeEvent(e){let t=this.typeData.changeEvents;if(t)for(let i in t)if(t[i].indexOf(e)>-1)return i;return null}_createEvents(){let e=this.resolvedTypeData.allImplEvents;for(let t of e)this.directive[t]=new core_1.EventEmitter(!1)}_overrideDirectiveMethods(){const e=this.directive;if(e instanceof wijmo.Control){const t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){core_1.NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run(()=>{t(e)})}.bind(e)}}subscribeToEvents(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(let i of t)e!==i.event.indexOf(".")<0&&this.addHandlers(i);if(e)for(let e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){let t=this.directive;WjDirectiveBehavior.evaluatePath(t,e.event).addHandler((i,r)=>{this.nzRun(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this._triggerEvent(t[e.eventImpl],r,e.props&&e.props.length>0)})})}triggerPropChangeEvents(e,t=!0){let i=this.directive;if(e.props&&e.props.length)for(let r of e.props)this._triggerEvent(i[r.evImpl],i[r.prop],t)}_setupAsChild(){if(this._isChild()){this._isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}}_isAsyncBinding(){let e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}_isChild(){return this._isParentInitializer()||this._isParentReferencer()}_isParentInitializer(){return null!=this.directive[WjDirectiveBehavior.parPropAttr]}_isParentReferencer(){return!!this.typeData.parentRefProperty}_getParentProp(){return this.directive[WjDirectiveBehavior.parPropAttr]}_getParentReferenceProperty(){return this.typeData.parentRefProperty}_useParentObj(){return!1}_parentInCtor(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()}_initParent(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){this._getParentProp();let r=e[t];if(wijmo.isArray(r)){let e=this._isHostElement(),t=e?this._getSiblingIndex():-1;(t<0||t>=r.length)&&(t=r.length);r.splice(t,0,i);if(e){const e=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(e,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}}_getSiblingIndex(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=-1,n=this.typeData.siblingId,s=0;s<i.length;s++){var o=i[s];if(1==o.nodeType&&o.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==n){++r;if(o===e)return r}}return-1}_siblingInserted(e){for(let t of e)if("childList"===t.type&&t.addedNodes.length>0){if(Array.from(t.addedNodes).some(e=>e===this.elementRef.nativeElement)){const e=this._getSiblingIndex(),t=this.parentBehavior.directive[this._getParentProp()],i=this.directive,r=t.indexOf(i);if(e>=0&&r>=0&&e!==r){t.splice(r,1);const n=Math.min(e,t.length);t.splice(n,0,i)}}}}_isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}_triggerEvent(e,t,i){if(i&&this._isAsyncBinding()){let i={event:e,args:t};this._pendingEvents.push(i);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout(()=>{this._triggerPendingEvents(!1)},0))}else e.emit(t)}_triggerPendingEvents(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(this.isDestroyed)return;let t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(let e of t)e.event.emit(e.args);e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}flushPendingEvents(){this._triggerPendingEvents(!0)}static evaluatePath(e,t){this._pathBinding.path=t;return this._pathBinding.getValue(e)}static getBehavior(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null}}WjDirectiveBehavior.directiveTypeDataProp="meta";WjDirectiveBehavior.directiveResolvedTypeDataProp="_wjResolvedMeta";WjDirectiveBehavior.BehaviourRefProp="_wjBehaviour";WjDirectiveBehavior.parPropAttr="wjProperty";WjDirectiveBehavior.wjModelPropAttr="wjModelProperty";WjDirectiveBehavior.initializedEventAttr="initialized";WjDirectiveBehavior.isInitializedPropAttr="isInitialized";WjDirectiveBehavior.siblingDirIdAttr="wj-directive-id";WjDirectiveBehavior.asyncBindingUpdatePropAttr="asyncBindings";WjDirectiveBehavior.siblingDirId=0;WjDirectiveBehavior.wijmoComponentProviderId="WjComponent";WjDirectiveBehavior.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};WjDirectiveBehavior._pathBinding=new wijmo.Binding("");exports.WjDirectiveBehavior=WjDirectiveBehavior;class Ng2Utils{static initEvents(e,t){var i=[];for(let e of t){let t=e.props;e.event&&e.eventImpl&&i.push(e.eventImpl+":"+e.event);if(t&&t.length)for(let e of t)i.push(e.evImpl+":"+e.evExposed)}return i}static getChangeEventNameImplemented(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventNameImplemented(e){return e+Ng2Utils.wjEventImplementSuffix}static getWjEventName(e){if(e){const t=Ng2Utils.wjEventImplementSuffix;let i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null}static getBaseType(e){let t;return e&&(t=Object.getPrototypeOf(e.prototype))&&t.constructor}static getAnnotations(e){return Reflect.getMetadata("annotations",e)}static getAnnotation(e,t){if(t&&e)for(let i of e)if(i instanceof t)return i;return null}static getTypeAnnotation(e,t,i){for(let r=e;r;r=i?null:Ng2Utils.getBaseType(r)){let e=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(r),t);if(e)return e}return null}static equals(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t}static _copy(e,t,i,r,n){if(e&&t)for(let s in t)if(r||"_"!==s[0]){let r=t[s];if(!n||n(s,r)){let t=e[s];wijmo.isArray(r)?e[s]=(!wijmo.isArray(t)||i?[]:t).concat(r):void 0!==r&&(e[s]=r)}}}}Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";exports.Ng2Utils=Ng2Utils;class WjValueAccessor{constructor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=e=>{};this._onTouched=()=>{};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){let e=this._directive.initialized;this._dirInitEh=e.subscribe(()=>{this._updateDirective();this._ensureInitEhUnsubscribed()})}}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){let t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)}_updateDirective(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){let e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}}_ensureSubscribed(){if(this._isSubscribed)return;let e=this._directive;if(e){this._ensureNgModelProp();let t=this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];if(t){let i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}_ensureNgModelProp(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])}_ensureInitEhUnsubscribed(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}}_isFirstChange(){return this._writeQnt<2}_dirValChgEh(e,t){if(this._onChange&&this._directive&&this._ngModelProp){let e=this._directive[this._ngModelProp],t=this._modelValue;""===t&&(t=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(t)&&_isNullOrEmpty(e)||Ng2Utils.equals(t,e))||wijmo.isArray(e)){this._modelValue=e;this._onChange(e)}}}_dirLostFocusEh(e,t){this._onTouched&&this._onTouched()}}exports.WjValueAccessor=WjValueAccessor;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}exports.WjValueAccessorFactory=WjValueAccessorFactory;function _isNullOrEmpty(e){return null==e||""===e}
14
+ "use strict";var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});const core_1=require("@angular/core"),wijmo=__importStar(require("@mescius/wijmo"));class WjOptions{}WjOptions.asyncBindings=!0;exports.WjOptions=WjOptions;class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){const t=this.changeEventMap,i=e.outputs,n=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(!i||!i.length)return;const r=i.map(e=>e.split(":")).map(e=>({implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}));this.allImplEvents=r.map(e=>e.implName);const s=r.filter(e=>e.implName&&e.exposeName);for(const e of s){if(Ng2Utils.getWjEventName(e.implName)){const i={eventImpl:e.implName,event:e.exposeName},r=n[e.exposeName];r&&r.length&&(i.props=r.map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)})));t.push(i)}}for(const e in n)if(e.indexOf(".")>-1){const i={eventImpl:null,event:e,props:n[e].map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}))};t.push(i)}}}exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;class WjDirectiveBehavior{constructor(e,t,i,n){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();this.nz=i.get(core_1.NgZone);const r=this.nz;r&&(this.nzRun=r.run.bind(r));this.injectedParent=n;this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];const s=this.typeData;null==s.siblingId&&(s.siblingId=""+ ++WjDirectiveBehavior.siblingDirId);let o=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];o?this.resolvedTypeData=o:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=o=this.resolvedTypeData=new WjComponentResolvedMetadata(s);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,s.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}static getHostElement(e,t){WjDirectiveBehavior.ngZone=t.get(core_1.NgZone);return e.nativeElement}static attach(e,t,i,n){return new WjDirectiveBehavior(e,t,i,n)}static getZone(e){const t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone}ngOnInit(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout(()=>{this.isDestroyed||this.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){const t=this.parentBehavior.directive,i=this._getParentProp();if(!this.parentBehavior.isDestroyed&&t&&i&&e){const n=t[i];if(wijmo.isArray(n)&&n){const t=n.indexOf(e);t>=0&&n.splice(t,1)}}}if(e instanceof wijmo.Control&&e.hostElement){const t=this.elementRef.nativeElement,i=t&&t.parentNode,n=i?Array.prototype.indexOf.call(i.childNodes,t):-1;e.dispose();if(n>-1&&Array.prototype.indexOf.call(i.childNodes,t)<0){t.textContent="";n<i.childNodes.length&&i.replaceChild(t,i.childNodes[n])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}}static instantiateTemplate(e,t,i,n=!1,r={}){var s,o=t.createEmbeddedView(i,r,t.length),a=o.rootNodes;if(n&&1===a.length)s=a[0];else{s=document.createElement("div");for(const e of a)s.appendChild(e)}e&&e.appendChild(s);return{viewRef:o,rootElement:s}}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(t)for(const i in 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){const t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){core_1.NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run(()=>{t(e)})}.bind(e)}}subscribeToEvents(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(const i of t)e!==i.event.indexOf(".")<0&&this.addHandlers(i);if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive;WjDirectiveBehavior.evaluatePath(t,e.event).addHandler((i,n)=>{this.nzRun(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this._triggerEvent(t[e.eventImpl],n,e.props&&e.props.length>0)})})}triggerPropChangeEvents(e,t=!0){const i=this.directive;if(e.props&&e.props.length)for(const n of e.props)this._triggerEvent(i[n.evImpl],i[n.prop],t)}_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.parPropAttr]}_isParentReferencer(){return!!this.typeData.parentRefProperty}_getParentProp(){return this.directive[WjDirectiveBehavior.parPropAttr]}_getParentReferenceProperty(){return this.typeData.parentRefProperty}_useParentObj(){return!1}_parentInCtor(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()}_initParent(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){const n=e[t];if(wijmo.isArray(n)){let e=this._isHostElement(),t=e?this._getSiblingIndex():-1;(t<0||t>=n.length)&&(t=n.length);n.splice(t,0,i);if(e){const e=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(e,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}}_getSiblingIndex(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes;let n=-1;const r=this.typeData.siblingId;for(let t=0;t<i.length;t++){const s=i[t];if(1==s.nodeType&&s.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==r){++n;if(s===e)return n}}return-1}_siblingInserted(e){for(const t of e)if("childList"===t.type&&t.addedNodes.length>0){if(Array.from(t.addedNodes).some(e=>e===this.elementRef.nativeElement)){const e=this._getSiblingIndex(),t=this.parentBehavior.directive[this._getParentProp()],i=this.directive,n=t.indexOf(i);if(e>=0&&n>=0&&e!==n){t.splice(n,1);const r=Math.min(e,t.length);t.splice(r,0,i)}}}}_isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}_triggerEvent(e,t,i){if(i&&this._isAsyncBinding()){const i={event:e,args:t};this._pendingEvents.push(i);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout(()=>{this._triggerPendingEvents(!1)},0))}else e.emit(t)}_triggerPendingEvents(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(this.isDestroyed)return;const t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(const e of t)e.event.emit(e.args);e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}flushPendingEvents(){this._triggerPendingEvents(!0)}static evaluatePath(e,t){WjDirectiveBehavior._pathBinding.path=t;return WjDirectiveBehavior._pathBinding.getValue(e)}static getBehavior(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null}}WjDirectiveBehavior.directiveTypeDataProp="meta";WjDirectiveBehavior.directiveResolvedTypeDataProp="_wjResolvedMeta";WjDirectiveBehavior.BehaviourRefProp="_wjBehaviour";WjDirectiveBehavior.parPropAttr="wjProperty";WjDirectiveBehavior.wjModelPropAttr="wjModelProperty";WjDirectiveBehavior.initializedEventAttr="initialized";WjDirectiveBehavior.isInitializedPropAttr="isInitialized";WjDirectiveBehavior.siblingDirIdAttr="wj-directive-id";WjDirectiveBehavior.asyncBindingUpdatePropAttr="asyncBindings";WjDirectiveBehavior.siblingDirId=0;WjDirectiveBehavior.wijmoComponentProviderId="WjComponent";WjDirectiveBehavior.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};WjDirectiveBehavior._pathBinding=new wijmo.Binding("");exports.WjDirectiveBehavior=WjDirectiveBehavior;class Ng2Utils{static initEvents(e,t){var i=[];for(const e of t){const t=e.props;e.event&&e.eventImpl&&i.push(`${e.eventImpl}:${e.event}`);if(t&&t.length)for(const e of t)i.push(`${e.evImpl}:${e.evExposed}`)}return i}static getChangeEventNameImplemented(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(e){const t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null}static getBaseType(e){if(!e)return null;const t=Object.getPrototypeOf(e.prototype);return t&&t.constructor}static getAnnotations(e){return Reflect.getMetadata("annotations",e)}static getAnnotation(e,t){if(t&&e)for(const i of e)if(i instanceof t)return i;return null}static getTypeAnnotation(e,t,i){for(let n=e;n;n=i?null:Ng2Utils.getBaseType(n)){const e=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(n),t);if(e)return e}return null}static equals(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t}static _copy(e,t,i,n,r){if(e&&t)for(const s in t)if(n||"_"!==s[0]){const n=t[s];if(!r||r(s,n)){const t=e[s];wijmo.isArray(n)?e[s]=(!wijmo.isArray(t)||i?[]:t).concat(n):void 0!==n&&(e[s]=n)}}}}Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";exports.Ng2Utils=Ng2Utils;class WjValueAccessor{constructor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=e=>{};this._onTouched=()=>{};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){const e=this._directive.initialized;this._dirInitEh=e.subscribe(()=>{this._updateDirective();this._ensureInitEhUnsubscribed()})}}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){const t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)}_updateDirective(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){let e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}}_ensureSubscribed(){if(this._isSubscribed)return;const e=this._directive;if(e){this._ensureNgModelProp();this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];const t=this._ngModelProp;if(t){const i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}_ensureNgModelProp(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])}_ensureInitEhUnsubscribed(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}}_isFirstChange(){return this._writeQnt<2}_dirValChgEh(e,t){if(this._onChange&&this._directive&&this._ngModelProp){let e=this._directive[this._ngModelProp],t=this._modelValue;""===t&&(t=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(t)&&_isNullOrEmpty(e)||Ng2Utils.equals(t,e))||wijmo.isArray(e)){this._modelValue=e;this._onChange(e)}}}_dirLostFocusEh(e,t){this._onTouched&&this._onTouched()}}exports.WjValueAccessor=WjValueAccessor;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}exports.WjValueAccessorFactory=WjValueAccessorFactory;function _isNullOrEmpty(e){return null==e||""===e}
package/es2015-esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.45-nightly.d20260105.t014601
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import{EventEmitter,NgZone}from"@angular/core";import*as wijmo from"@mescius/wijmo";import * as ɵngcc0 from '@angular/core';
15
- export class WjOptions{}WjOptions.asyncBindings=!0;export class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){let t=this.changeEventMap,i=e.outputs,r=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(!i||!i.length)return;let n=i.map(e=>e.split(":")).map(e=>({implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}));this.allImplEvents=n.map(e=>e.implName);let s=n.filter(e=>e.implName&&e.exposeName);for(let e of s){if(Ng2Utils.getWjEventName(e.implName)){let i={eventImpl:e.implName,event:e.exposeName},n=r[e.exposeName];n&&n.length&&(i.props=n.map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)})));t.push(i)}}for(let e in r)if(e.indexOf(".")>-1){let i={eventImpl:null,event:e,props:r[e].map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}))};t.push(i)}}}export class WjDirectiveBehavior{constructor(e,t,i,r){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();let n=this.nz=i.get(NgZone);n&&(this.nzRun=n.run.bind(n));this.injectedParent=r;let s=this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];null==s.siblingId&&(s.siblingId=++WjDirectiveBehavior.siblingDirId+"");let o=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];o?this.resolvedTypeData=o:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=o=this.resolvedTypeData=new WjComponentResolvedMetadata(s);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,s.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}static getHostElement(e,t){WjDirectiveBehavior.ngZone=t.get(NgZone);return e.nativeElement}static attach(e,t,i,r){return new WjDirectiveBehavior(e,t,i,r)}static getZone(e){const t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone}ngOnInit(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout(()=>{this.isDestroyed||this.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){let i=this.parentBehavior.directive,r=this._getParentProp();if(!this.parentBehavior.isDestroyed&&i&&r&&e){let n=i[r];if(wijmo.isArray(n)&&n){var t=n.indexOf(e);t>=0&&n.splice(t,1)}}}if(e instanceof wijmo.Control&&e.hostElement){let t=this.elementRef.nativeElement,i=t&&t.parentNode,r=i?Array.prototype.indexOf.call(i.childNodes,t):-1;e.dispose();if(r>-1&&Array.prototype.indexOf.call(i.childNodes,t)<0){t.textContent="";r<i.childNodes.length&&i.replaceChild(t,i.childNodes[r])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}}static instantiateTemplate(e,t,i,r=!1,n={}){var s,o=t.createEmbeddedView(i,n,t.length),a=o.rootNodes;if(r&&1===a.length)s=a[0];else{s=document.createElement("div");for(let e of a)s.appendChild(e)}e&&e.appendChild(s);return{viewRef:o,rootElement:s}}getPropChangeEvent(e){let t=this.typeData.changeEvents;if(t)for(let i in t)if(t[i].indexOf(e)>-1)return i;return null}_createEvents(){let e=this.resolvedTypeData.allImplEvents;for(let t of e)this.directive[t]=new EventEmitter(!1)}_overrideDirectiveMethods(){const e=this.directive;if(e instanceof wijmo.Control){const t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run(()=>{t(e)})}.bind(e)}}subscribeToEvents(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(let i of t)e!==i.event.indexOf(".")<0&&this.addHandlers(i);if(e)for(let e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){let t=this.directive;WjDirectiveBehavior.evaluatePath(t,e.event).addHandler((i,r)=>{this.nzRun(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this._triggerEvent(t[e.eventImpl],r,e.props&&e.props.length>0)})})}triggerPropChangeEvents(e,t=!0){let i=this.directive;if(e.props&&e.props.length)for(let r of e.props)this._triggerEvent(i[r.evImpl],i[r.prop],t)}_setupAsChild(){if(this._isChild()){this._isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}}_isAsyncBinding(){let e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e}_isChild(){return this._isParentInitializer()||this._isParentReferencer()}_isParentInitializer(){return null!=this.directive[WjDirectiveBehavior.parPropAttr]}_isParentReferencer(){return!!this.typeData.parentRefProperty}_getParentProp(){return this.directive[WjDirectiveBehavior.parPropAttr]}_getParentReferenceProperty(){return this.typeData.parentRefProperty}_useParentObj(){return!1}_parentInCtor(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()}_initParent(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){this._getParentProp();let r=e[t];if(wijmo.isArray(r)){let e=this._isHostElement(),t=e?this._getSiblingIndex():-1;(t<0||t>=r.length)&&(t=r.length);r.splice(t,0,i);if(e){const e=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(e,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}}_getSiblingIndex(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=-1,n=this.typeData.siblingId,s=0;s<i.length;s++){var o=i[s];if(1==o.nodeType&&o.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==n){++r;if(o===e)return r}}return-1}_siblingInserted(e){for(let t of e)if("childList"===t.type&&t.addedNodes.length>0){if(Array.from(t.addedNodes).some(e=>e===this.elementRef.nativeElement)){const e=this._getSiblingIndex(),t=this.parentBehavior.directive[this._getParentProp()],i=this.directive,r=t.indexOf(i);if(e>=0&&r>=0&&e!==r){t.splice(r,1);const n=Math.min(e,t.length);t.splice(n,0,i)}}}}_isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}_triggerEvent(e,t,i){if(i&&this._isAsyncBinding()){let i={event:e,args:t};this._pendingEvents.push(i);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout(()=>{this._triggerPendingEvents(!1)},0))}else e.emit(t)}_triggerPendingEvents(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(this.isDestroyed)return;let t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(let e of t)e.event.emit(e.args);e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}flushPendingEvents(){this._triggerPendingEvents(!0)}static evaluatePath(e,t){this._pathBinding.path=t;return this._pathBinding.getValue(e)}static getBehavior(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null}}
15
+ export class WjOptions{}WjOptions.asyncBindings=!0;export class WjComponentResolvedMetadata{constructor(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}resolveChangeEventMap(e){const t=this.changeEventMap,i=e.outputs,n=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(!i||!i.length)return;const r=i.map(e=>e.split(":")).map(e=>({implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}));this.allImplEvents=r.map(e=>e.implName);const s=r.filter(e=>e.implName&&e.exposeName);for(const e of s){if(Ng2Utils.getWjEventName(e.implName)){const i={eventImpl:e.implName,event:e.exposeName},r=n[e.exposeName];r&&r.length&&(i.props=r.map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)})));t.push(i)}}for(const e in n)if(e.indexOf(".")>-1){const i={eventImpl:null,event:e,props:n[e].map(e=>({prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}))};t.push(i)}}}export class WjDirectiveBehavior{constructor(e,t,i,n){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=e=>e();this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();this.nz=i.get(NgZone);const r=this.nz;r&&(this.nzRun=r.run.bind(r));this.injectedParent=n;this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];const s=this.typeData;null==s.siblingId&&(s.siblingId=""+ ++WjDirectiveBehavior.siblingDirId);let o=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];o?this.resolvedTypeData=o:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=o=this.resolvedTypeData=new WjComponentResolvedMetadata(s);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,s.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}static getHostElement(e,t){WjDirectiveBehavior.ngZone=t.get(NgZone);return e.nativeElement}static attach(e,t,i,n){return new WjDirectiveBehavior(e,t,i,n)}static getZone(e){const t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone}ngOnInit(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)}ngAfterViewInit(){this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout(()=>{this.isDestroyed||this.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)})}ngOnDestroy(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){const t=this.parentBehavior.directive,i=this._getParentProp();if(!this.parentBehavior.isDestroyed&&t&&i&&e){const n=t[i];if(wijmo.isArray(n)&&n){const t=n.indexOf(e);t>=0&&n.splice(t,1)}}}if(e instanceof wijmo.Control&&e.hostElement){const t=this.elementRef.nativeElement,i=t&&t.parentNode,n=i?Array.prototype.indexOf.call(i.childNodes,t):-1;e.dispose();if(n>-1&&Array.prototype.indexOf.call(i.childNodes,t)<0){t.textContent="";n<i.childNodes.length&&i.replaceChild(t,i.childNodes[n])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}}static instantiateTemplate(e,t,i,n=!1,r={}){var s,o=t.createEmbeddedView(i,r,t.length),a=o.rootNodes;if(n&&1===a.length)s=a[0];else{s=document.createElement("div");for(const e of a)s.appendChild(e)}e&&e.appendChild(s);return{viewRef:o,rootElement:s}}getPropChangeEvent(e){const t=this.typeData.changeEvents;if(t)for(const i in 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){const t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run(()=>{t(e)})}.bind(e)}}subscribeToEvents(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(const i of t)e!==i.event.indexOf(".")<0&&this.addHandlers(i);if(e)for(const e of t)this.triggerPropChangeEvents(e,!0)}addHandlers(e){const t=this.directive;WjDirectiveBehavior.evaluatePath(t,e.event).addHandler((i,n)=>{this.nzRun(()=>{this.isInitialized&&this.triggerPropChangeEvents(e);e.eventImpl&&this._triggerEvent(t[e.eventImpl],n,e.props&&e.props.length>0)})})}triggerPropChangeEvents(e,t=!0){const i=this.directive;if(e.props&&e.props.length)for(const n of e.props)this._triggerEvent(i[n.evImpl],i[n.prop],t)}_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.parPropAttr]}_isParentReferencer(){return!!this.typeData.parentRefProperty}_getParentProp(){return this.directive[WjDirectiveBehavior.parPropAttr]}_getParentReferenceProperty(){return this.typeData.parentRefProperty}_useParentObj(){return!1}_parentInCtor(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()}_initParent(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){const n=e[t];if(wijmo.isArray(n)){let e=this._isHostElement(),t=e?this._getSiblingIndex():-1;(t<0||t>=n.length)&&(t=n.length);n.splice(t,0,i);if(e){const e=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(e,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}}_getSiblingIndex(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;const i=t.childNodes;let n=-1;const r=this.typeData.siblingId;for(let t=0;t<i.length;t++){const s=i[t];if(1==s.nodeType&&s.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==r){++n;if(s===e)return n}}return-1}_siblingInserted(e){for(const t of e)if("childList"===t.type&&t.addedNodes.length>0){if(Array.from(t.addedNodes).some(e=>e===this.elementRef.nativeElement)){const e=this._getSiblingIndex(),t=this.parentBehavior.directive[this._getParentProp()],i=this.directive,n=t.indexOf(i);if(e>=0&&n>=0&&e!==n){t.splice(n,1);const r=Math.min(e,t.length);t.splice(r,0,i)}}}}_isHostElement(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE}_triggerEvent(e,t,i){if(i&&this._isAsyncBinding()){const i={event:e,args:t};this._pendingEvents.push(i);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout(()=>{this._triggerPendingEvents(!1)},0))}else e.emit(t)}_triggerPendingEvents(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(this.isDestroyed)return;const t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(const e of t)e.event.emit(e.args);e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}flushPendingEvents(){this._triggerPendingEvents(!0)}static evaluatePath(e,t){WjDirectiveBehavior._pathBinding.path=t;return WjDirectiveBehavior._pathBinding.getValue(e)}static getBehavior(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null}}
16
16
  WjDirectiveBehavior.ɵfac = function WjDirectiveBehavior_Factory(t) { ɵngcc0.ɵɵinvalidFactory(); };
17
17
  WjDirectiveBehavior.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: WjDirectiveBehavior });WjDirectiveBehavior.directiveTypeDataProp="meta";WjDirectiveBehavior.directiveResolvedTypeDataProp="_wjResolvedMeta";WjDirectiveBehavior.BehaviourRefProp="_wjBehaviour";WjDirectiveBehavior.parPropAttr="wjProperty";WjDirectiveBehavior.wjModelPropAttr="wjModelProperty";WjDirectiveBehavior.initializedEventAttr="initialized";WjDirectiveBehavior.isInitializedPropAttr="isInitialized";WjDirectiveBehavior.siblingDirIdAttr="wj-directive-id";WjDirectiveBehavior.asyncBindingUpdatePropAttr="asyncBindings";WjDirectiveBehavior.siblingDirId=0;WjDirectiveBehavior.wijmoComponentProviderId="WjComponent";WjDirectiveBehavior.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};WjDirectiveBehavior._pathBinding=new wijmo.Binding("");
18
- export class Ng2Utils{static initEvents(e,t){var i=[];for(let e of t){let t=e.props;e.event&&e.eventImpl&&i.push(e.eventImpl+":"+e.event);if(t&&t.length)for(let e of t)i.push(e.evImpl+":"+e.evExposed)}return i}static getChangeEventNameImplemented(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventNameImplemented(e){return e+Ng2Utils.wjEventImplementSuffix}static getWjEventName(e){if(e){const t=Ng2Utils.wjEventImplementSuffix;let i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null}static getBaseType(e){let t;return e&&(t=Object.getPrototypeOf(e.prototype))&&t.constructor}static getAnnotations(e){return Reflect.getMetadata("annotations",e)}static getAnnotation(e,t){if(t&&e)for(let i of e)if(i instanceof t)return i;return null}static getTypeAnnotation(e,t,i){for(let r=e;r;r=i?null:Ng2Utils.getBaseType(r)){let e=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(r),t);if(e)return e}return null}static equals(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t}static _copy(e,t,i,r,n){if(e&&t)for(let s in t)if(r||"_"!==s[0]){let r=t[s];if(!n||n(s,r)){let t=e[s];wijmo.isArray(r)?e[s]=(!wijmo.isArray(t)||i?[]:t).concat(r):void 0!==r&&(e[s]=r)}}}}Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";export class WjValueAccessor{constructor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=e=>{};this._onTouched=()=>{};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){let e=this._directive.initialized;this._dirInitEh=e.subscribe(()=>{this._updateDirective();this._ensureInitEhUnsubscribed()})}}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){let t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)}_updateDirective(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){let e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}}_ensureSubscribed(){if(this._isSubscribed)return;let e=this._directive;if(e){this._ensureNgModelProp();let t=this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];if(t){let i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}_ensureNgModelProp(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])}_ensureInitEhUnsubscribed(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}}_isFirstChange(){return this._writeQnt<2}_dirValChgEh(e,t){if(this._onChange&&this._directive&&this._ngModelProp){let e=this._directive[this._ngModelProp],t=this._modelValue;""===t&&(t=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(t)&&_isNullOrEmpty(e)||Ng2Utils.equals(t,e))||wijmo.isArray(e)){this._modelValue=e;this._onChange(e)}}}_dirLostFocusEh(e,t){this._onTouched&&this._onTouched()}}export function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function _isNullOrEmpty(e){return null==e||""===e}
18
+ export class Ng2Utils{static initEvents(e,t){var i=[];for(const e of t){const t=e.props;e.event&&e.eventImpl&&i.push(`${e.eventImpl}:${e.event}`);if(t&&t.length)for(const e of t)i.push(`${e.evImpl}:${e.evExposed}`)}return i}static getChangeEventNameImplemented(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix}static getChangeEventNameExposed(e){return e+"Change"}static getWjEventName(e){if(e){const t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null}static getBaseType(e){if(!e)return null;const t=Object.getPrototypeOf(e.prototype);return t&&t.constructor}static getAnnotations(e){return Reflect.getMetadata("annotations",e)}static getAnnotation(e,t){if(t&&e)for(const i of e)if(i instanceof t)return i;return null}static getTypeAnnotation(e,t,i){for(let n=e;n;n=i?null:Ng2Utils.getBaseType(n)){const e=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(n),t);if(e)return e}return null}static equals(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t}static _copy(e,t,i,n,r){if(e&&t)for(const s in t)if(n||"_"!==s[0]){const n=t[s];if(!r||r(s,n)){const t=e[s];wijmo.isArray(n)?e[s]=(!wijmo.isArray(t)||i?[]:t).concat(n):void 0!==n&&(e[s]=n)}}}}Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";export class WjValueAccessor{constructor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=e=>{};this._onTouched=()=>{};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}writeValue(e){this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){const e=this._directive.initialized;this._dirInitEh=e.subscribe(()=>{this._updateDirective();this._ensureInitEhUnsubscribed()})}}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){const t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)}_updateDirective(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){let e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}}_ensureSubscribed(){if(this._isSubscribed)return;const e=this._directive;if(e){this._ensureNgModelProp();this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];const t=this._ngModelProp;if(t){const i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}_ensureNgModelProp(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])}_ensureInitEhUnsubscribed(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}}_isFirstChange(){return this._writeQnt<2}_dirValChgEh(e,t){if(this._onChange&&this._directive&&this._ngModelProp){let e=this._directive[this._ngModelProp],t=this._modelValue;""===t&&(t=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(t)&&_isNullOrEmpty(e)||Ng2Utils.equals(t,e))||wijmo.isArray(e)){this._modelValue=e;this._onChange(e)}}}_dirLostFocusEh(e,t){this._onTouched&&this._onTouched()}}export function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function _isNullOrEmpty(e){return null==e||""===e}
package/es5-esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.45-nightly.d20260105.t014601
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import{EventEmitter,NgZone}from"@angular/core";import*as wijmo from"@mescius/wijmo";import * as ɵngcc0 from '@angular/core';
15
- var WjOptions=function(){function WjOptions(){}WjOptions.asyncBindings=!0;return WjOptions}();export{WjOptions};var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t=this.changeEventMap,i=e.outputs,r=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(i&&i.length){var n=i.map((function(e){return e.split(":")})).map((function(e){return{implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}}));this.allImplEvents=n.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];if(Ng2Utils.getWjEventName(a.implName)){var v={eventImpl:a.implName,event:a.exposeName},h=r[a.exposeName];h&&h.length&&(v.props=h.map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}})));t.push(v)}}for(var c in r)if(c.indexOf(".")>-1){v={eventImpl:null,event:c,props:r[c].map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}}))};t.push(v)}}};return WjComponentResolvedMetadata}();export{WjComponentResolvedMetadata};var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,r){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();var n=this.nz=i.get(NgZone);n&&(this.nzRun=n.run.bind(n));this.injectedParent=r;var o=this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];null==o.siblingId&&(o.siblingId=++WjDirectiveBehavior.siblingDirId+"");var s=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];s?this.resolvedTypeData=s:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=s=this.resolvedTypeData=new WjComponentResolvedMetadata(o);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,o.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){WjDirectiveBehavior.ngZone=t.get(NgZone);return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,r){return new WjDirectiveBehavior(e,t,i,r)};WjDirectiveBehavior.getZone=function(e){var t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout((function(){e.isDestroyed||e.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){var t=this.parentBehavior.directive,i=this._getParentProp();if(!this.parentBehavior.isDestroyed&&t&&i&&e){var r=t[i];if(wijmo.isArray(r)&&r){var n=r.indexOf(e);n>=0&&r.splice(n,1)}}}if(e instanceof wijmo.Control&&e.hostElement){var o=this.elementRef.nativeElement,s=o&&o.parentNode,a=s?Array.prototype.indexOf.call(s.childNodes,o):-1;e.dispose();if(a>-1&&Array.prototype.indexOf.call(s.childNodes,o)<0){o.textContent="";a<s.childNodes.length&&s.replaceChild(o,s.childNodes[a])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,r,n){void 0===r&&(r=!1);void 0===n&&(n={});var o,s=t.createEmbeddedView(i,n,t.length),a=s.rootNodes;if(r&&1===a.length)o=a[0];else{o=document.createElement("div");for(var v=0,h=a;v<h.length;v++){var c=h[v];o.appendChild(c)}}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(t)for(var i in t)if(t[i].indexOf(e)>-1)return i;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){var t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run((function(){t(e)}))}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(var i=0,r=t;i<r.length;i++){e!==(s=r[i]).event.indexOf(".")<0&&this.addHandlers(s)}if(e)for(var n=0,o=t;n<o.length;n++){var s=o[n];this.triggerPropChangeEvents(s,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive;WjDirectiveBehavior.evaluatePath(i,e.event).addHandler((function(r,n){t.nzRun((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t._triggerEvent(i[e.eventImpl],n,e.props&&e.props.length>0)}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){void 0===t&&(t=!0);var i=this.directive;if(e.props&&e.props.length)for(var r=0,n=e.props;r<n.length;r++){var o=n[r];this._triggerEvent(i[o.evImpl],i[o.prop],t)}};WjDirectiveBehavior.prototype._setupAsChild=function(){if(this._isChild()){this._isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype._isAsyncBinding=function(){var e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype._isChild=function(){return this._isParentInitializer()||this._isParentReferencer()};WjDirectiveBehavior.prototype._isParentInitializer=function(){return null!=this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._getParentProp=function(){return this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._useParentObj=function(){return!1};WjDirectiveBehavior.prototype._parentInCtor=function(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()};WjDirectiveBehavior.prototype._initParent=function(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){this._getParentProp();var r=e[t];if(wijmo.isArray(r)){var n=this._isHostElement(),o=n?this._getSiblingIndex():-1;(o<0||o>=r.length)&&(o=r.length);r.splice(o,0,i);if(n){var s=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(s,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}};WjDirectiveBehavior.prototype._getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=-1,n=this.typeData.siblingId,o=0;o<i.length;o++){var s=i[o];if(1==s.nodeType&&s.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==n){++r;if(s===e)return r}}return-1};WjDirectiveBehavior.prototype._siblingInserted=function(e){for(var t=this,i=0,r=e;i<r.length;i++){var n=r[i];if("childList"===n.type&&n.addedNodes.length>0){if(Array.from(n.addedNodes).some((function(e){return e===t.elementRef.nativeElement}))){var o=this._getSiblingIndex(),s=this.parentBehavior.directive[this._getParentProp()],a=this.directive,v=s.indexOf(a);if(o>=0&&v>=0&&o!==v){s.splice(v,1);var h=Math.min(o,s.length);s.splice(h,0,a)}}}}};WjDirectiveBehavior.prototype._isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.prototype._triggerEvent=function(e,t,i){var r=this;if(i&&this._isAsyncBinding()){var n={event:e,args:t};this._pendingEvents.push(n);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout((function(){r._triggerPendingEvents(!1)}),0))}else e.emit(t)};WjDirectiveBehavior.prototype._triggerPendingEvents=function(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(!this.isDestroyed){var t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(var i=0,r=t;i<r.length;i++){var n=r[i];n.event.emit(n.args)}e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this._triggerPendingEvents(!0)};WjDirectiveBehavior.evaluatePath=function(e,t){this._pathBinding.path=t;return this._pathBinding.getValue(e)};WjDirectiveBehavior.getBehavior=function(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null};WjDirectiveBehavior.directiveTypeDataProp="meta";WjDirectiveBehavior.directiveResolvedTypeDataProp="_wjResolvedMeta";WjDirectiveBehavior.BehaviourRefProp="_wjBehaviour";WjDirectiveBehavior.parPropAttr="wjProperty";WjDirectiveBehavior.wjModelPropAttr="wjModelProperty";WjDirectiveBehavior.initializedEventAttr="initialized";WjDirectiveBehavior.isInitializedPropAttr="isInitialized";WjDirectiveBehavior.siblingDirIdAttr="wj-directive-id";WjDirectiveBehavior.asyncBindingUpdatePropAttr="asyncBindings";WjDirectiveBehavior.siblingDirId=0;WjDirectiveBehavior.wijmoComponentProviderId="WjComponent";WjDirectiveBehavior.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};WjDirectiveBehavior._pathBinding=new wijmo.Binding("");
15
+ var WjOptions=function(){function WjOptions(){}WjOptions.asyncBindings=!0;return WjOptions}();export{WjOptions};var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t=this.changeEventMap,i=e.outputs,r=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(i&&i.length){var n=i.map((function(e){return e.split(":")})).map((function(e){return{implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}}));this.allImplEvents=n.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];if(Ng2Utils.getWjEventName(a.implName)){var v={eventImpl:a.implName,event:a.exposeName},h=r[a.exposeName];h&&h.length&&(v.props=h.map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}})));t.push(v)}}for(var c in r)if(c.indexOf(".")>-1){v={eventImpl:null,event:c,props:r[c].map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}}))};t.push(v)}}};return WjComponentResolvedMetadata}();export{WjComponentResolvedMetadata};var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,r){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();this.nz=i.get(NgZone);var n=this.nz;n&&(this.nzRun=n.run.bind(n));this.injectedParent=r;this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];var o=this.typeData;null==o.siblingId&&(o.siblingId=""+ ++WjDirectiveBehavior.siblingDirId);var s=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];s?this.resolvedTypeData=s:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=s=this.resolvedTypeData=new WjComponentResolvedMetadata(o);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,o.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){WjDirectiveBehavior.ngZone=t.get(NgZone);return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,r){return new WjDirectiveBehavior(e,t,i,r)};WjDirectiveBehavior.getZone=function(e){var t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout((function(){e.isDestroyed||e.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){var t=this.parentBehavior.directive,i=this._getParentProp();if(!this.parentBehavior.isDestroyed&&t&&i&&e){var r=t[i];if(wijmo.isArray(r)&&r){var n=r.indexOf(e);n>=0&&r.splice(n,1)}}}if(e instanceof wijmo.Control&&e.hostElement){var o=this.elementRef.nativeElement,s=o&&o.parentNode,a=s?Array.prototype.indexOf.call(s.childNodes,o):-1;e.dispose();if(a>-1&&Array.prototype.indexOf.call(s.childNodes,o)<0){o.textContent="";a<s.childNodes.length&&s.replaceChild(o,s.childNodes[a])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,r,n){void 0===r&&(r=!1);void 0===n&&(n={});var o,s=t.createEmbeddedView(i,n,t.length),a=s.rootNodes;if(r&&1===a.length)o=a[0];else{o=document.createElement("div");for(var v=0,h=a;v<h.length;v++){var c=h[v];o.appendChild(c)}}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(t)for(var i in t)if(t[i].indexOf(e)>-1)return i;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){var t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run((function(){t(e)}))}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(var i=0,r=t;i<r.length;i++){e!==(s=r[i]).event.indexOf(".")<0&&this.addHandlers(s)}if(e)for(var n=0,o=t;n<o.length;n++){var s=o[n];this.triggerPropChangeEvents(s,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive;WjDirectiveBehavior.evaluatePath(i,e.event).addHandler((function(r,n){t.nzRun((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t._triggerEvent(i[e.eventImpl],n,e.props&&e.props.length>0)}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){void 0===t&&(t=!0);var i=this.directive;if(e.props&&e.props.length)for(var r=0,n=e.props;r<n.length;r++){var o=n[r];this._triggerEvent(i[o.evImpl],i[o.prop],t)}};WjDirectiveBehavior.prototype._setupAsChild=function(){if(this._isChild()){this._isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype._isAsyncBinding=function(){var e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype._isChild=function(){return this._isParentInitializer()||this._isParentReferencer()};WjDirectiveBehavior.prototype._isParentInitializer=function(){return null!=this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._getParentProp=function(){return this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._useParentObj=function(){return!1};WjDirectiveBehavior.prototype._parentInCtor=function(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()};WjDirectiveBehavior.prototype._initParent=function(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){var r=e[t];if(wijmo.isArray(r)){var n=this._isHostElement(),o=n?this._getSiblingIndex():-1;(o<0||o>=r.length)&&(o=r.length);r.splice(o,0,i);if(n){var s=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(s,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}};WjDirectiveBehavior.prototype._getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=-1,n=this.typeData.siblingId,o=0;o<i.length;o++){var s=i[o];if(1==s.nodeType&&s.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==n){++r;if(s===e)return r}}return-1};WjDirectiveBehavior.prototype._siblingInserted=function(e){for(var t=this,i=0,r=e;i<r.length;i++){var n=r[i];if("childList"===n.type&&n.addedNodes.length>0){if(Array.from(n.addedNodes).some((function(e){return e===t.elementRef.nativeElement}))){var o=this._getSiblingIndex(),s=this.parentBehavior.directive[this._getParentProp()],a=this.directive,v=s.indexOf(a);if(o>=0&&v>=0&&o!==v){s.splice(v,1);var h=Math.min(o,s.length);s.splice(h,0,a)}}}}};WjDirectiveBehavior.prototype._isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.prototype._triggerEvent=function(e,t,i){var r=this;if(i&&this._isAsyncBinding()){var n={event:e,args:t};this._pendingEvents.push(n);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout((function(){r._triggerPendingEvents(!1)}),0))}else e.emit(t)};WjDirectiveBehavior.prototype._triggerPendingEvents=function(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(!this.isDestroyed){var t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(var i=0,r=t;i<r.length;i++){var n=r[i];n.event.emit(n.args)}e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this._triggerPendingEvents(!0)};WjDirectiveBehavior.evaluatePath=function(e,t){WjDirectiveBehavior._pathBinding.path=t;return WjDirectiveBehavior._pathBinding.getValue(e)};WjDirectiveBehavior.getBehavior=function(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null};WjDirectiveBehavior.directiveTypeDataProp="meta";WjDirectiveBehavior.directiveResolvedTypeDataProp="_wjResolvedMeta";WjDirectiveBehavior.BehaviourRefProp="_wjBehaviour";WjDirectiveBehavior.parPropAttr="wjProperty";WjDirectiveBehavior.wjModelPropAttr="wjModelProperty";WjDirectiveBehavior.initializedEventAttr="initialized";WjDirectiveBehavior.isInitializedPropAttr="isInitialized";WjDirectiveBehavior.siblingDirIdAttr="wj-directive-id";WjDirectiveBehavior.asyncBindingUpdatePropAttr="asyncBindings";WjDirectiveBehavior.siblingDirId=0;WjDirectiveBehavior.wijmoComponentProviderId="WjComponent";WjDirectiveBehavior.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};WjDirectiveBehavior._pathBinding=new wijmo.Binding("");
16
16
  WjDirectiveBehavior.ɵfac = function WjDirectiveBehavior_Factory(t) { ɵngcc0.ɵɵinvalidFactory(); };
17
17
  WjDirectiveBehavior.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: WjDirectiveBehavior });
18
- return WjDirectiveBehavior}();export{WjDirectiveBehavior};var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.initEvents=function(e,t){for(var i=[],r=0,n=t;r<n.length;r++){var o=n[r],s=o.props;o.event&&o.eventImpl&&i.push(o.eventImpl+":"+o.event);if(s&&s.length)for(var a=0,v=s;a<v.length;a++){var h=v[a];i.push(h.evImpl+":"+h.evExposed)}}return i};Ng2Utils.getChangeEventNameImplemented=function(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix};Ng2Utils.getChangeEventNameExposed=function(e){return e+"Change"};Ng2Utils.getWjEventNameImplemented=function(e){return e+Ng2Utils.wjEventImplementSuffix};Ng2Utils.getWjEventName=function(e){if(e){var t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null};Ng2Utils.getBaseType=function(e){var t;return e&&(t=Object.getPrototypeOf(e.prototype))&&t.constructor};Ng2Utils.getAnnotations=function(e){return Reflect.getMetadata("annotations",e)};Ng2Utils.getAnnotation=function(e,t){if(t&&e)for(var i=0,r=e;i<r.length;i++){var n=r[i];if(n instanceof t)return n}return null};Ng2Utils.getTypeAnnotation=function(e,t,i){for(var r=e;r;r=i?null:Ng2Utils.getBaseType(r)){var n=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(r),t);if(n)return n}return null};Ng2Utils.equals=function(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t};Ng2Utils._copy=function(e,t,i,r,n){if(e&&t)for(var o in t)if(r||"_"!==o[0]){var s=t[o];if(!n||n(o,s)){var a=e[o];wijmo.isArray(s)?e[o]=(!wijmo.isArray(a)||i?[]:a).concat(s):void 0!==s&&(e[o]=s)}}};Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";return Ng2Utils}();export{Ng2Utils};var WjValueAccessor=function(){function WjValueAccessor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=function(e){};this._onTouched=function(){};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t=this;this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){var i=this._directive.initialized;this._dirInitEh=i.subscribe((function(){t._updateDirective();t._ensureInitEhUnsubscribed()}))}};WjValueAccessor.prototype.registerOnChange=function(e){this._onChange=e};WjValueAccessor.prototype.registerOnTouched=function(e){this._onTouched=e};WjValueAccessor.prototype.setDisabledState=function(e){var t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)};WjValueAccessor.prototype._updateDirective=function(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){var e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}};WjValueAccessor.prototype._ensureSubscribed=function(){if(!this._isSubscribed){var e=this._directive;if(e){this._ensureNgModelProp();var t=this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];if(t){var i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}};WjValueAccessor.prototype._ensureNgModelProp=function(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])};WjValueAccessor.prototype._ensureInitEhUnsubscribed=function(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}};WjValueAccessor.prototype._isFirstChange=function(){return this._writeQnt<2};WjValueAccessor.prototype._dirValChgEh=function(e,t){if(this._onChange&&this._directive&&this._ngModelProp){var i=this._directive[this._ngModelProp],r=this._modelValue;""===r&&(r=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(r)&&_isNullOrEmpty(i)||Ng2Utils.equals(r,i))||wijmo.isArray(i)){this._modelValue=i;this._onChange(i)}}};WjValueAccessor.prototype._dirLostFocusEh=function(e,t){this._onTouched&&this._onTouched()};return WjValueAccessor}();export{WjValueAccessor};export function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function _isNullOrEmpty(e){return null==e||""===e}
18
+ return WjDirectiveBehavior}();export{WjDirectiveBehavior};var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.initEvents=function(e,t){for(var i=[],r=0,n=t;r<n.length;r++){var o=n[r],s=o.props;o.event&&o.eventImpl&&i.push(o.eventImpl+":"+o.event);if(s&&s.length)for(var a=0,v=s;a<v.length;a++){var h=v[a];i.push(h.evImpl+":"+h.evExposed)}}return i};Ng2Utils.getChangeEventNameImplemented=function(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix};Ng2Utils.getChangeEventNameExposed=function(e){return e+"Change"};Ng2Utils.getWjEventName=function(e){if(e){var t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null};Ng2Utils.getBaseType=function(e){if(!e)return null;var t=Object.getPrototypeOf(e.prototype);return t&&t.constructor};Ng2Utils.getAnnotations=function(e){return Reflect.getMetadata("annotations",e)};Ng2Utils.getAnnotation=function(e,t){if(t&&e)for(var i=0,r=e;i<r.length;i++){var n=r[i];if(n instanceof t)return n}return null};Ng2Utils.getTypeAnnotation=function(e,t,i){for(var r=e;r;r=i?null:Ng2Utils.getBaseType(r)){var n=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(r),t);if(n)return n}return null};Ng2Utils.equals=function(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t};Ng2Utils._copy=function(e,t,i,r,n){if(e&&t)for(var o in t)if(r||"_"!==o[0]){var s=t[o];if(!n||n(o,s)){var a=e[o];wijmo.isArray(s)?e[o]=(!wijmo.isArray(a)||i?[]:a).concat(s):void 0!==s&&(e[o]=s)}}};Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";return Ng2Utils}();export{Ng2Utils};var WjValueAccessor=function(){function WjValueAccessor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=function(e){};this._onTouched=function(){};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t=this;this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){var i=this._directive.initialized;this._dirInitEh=i.subscribe((function(){t._updateDirective();t._ensureInitEhUnsubscribed()}))}};WjValueAccessor.prototype.registerOnChange=function(e){this._onChange=e};WjValueAccessor.prototype.registerOnTouched=function(e){this._onTouched=e};WjValueAccessor.prototype.setDisabledState=function(e){var t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)};WjValueAccessor.prototype._updateDirective=function(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){var e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}};WjValueAccessor.prototype._ensureSubscribed=function(){if(!this._isSubscribed){var e=this._directive;if(e){this._ensureNgModelProp();this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];var t=this._ngModelProp;if(t){var i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}};WjValueAccessor.prototype._ensureNgModelProp=function(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])};WjValueAccessor.prototype._ensureInitEhUnsubscribed=function(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}};WjValueAccessor.prototype._isFirstChange=function(){return this._writeQnt<2};WjValueAccessor.prototype._dirValChgEh=function(e,t){if(this._onChange&&this._directive&&this._ngModelProp){var i=this._directive[this._ngModelProp],r=this._modelValue;""===r&&(r=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(r)&&_isNullOrEmpty(i)||Ng2Utils.equals(r,i))||wijmo.isArray(i)){this._modelValue=i;this._onChange(i)}}};WjValueAccessor.prototype._dirLostFocusEh=function(e,t){this._onTouched&&this._onTouched()};return WjValueAccessor}();export{WjValueAccessor};export function WjValueAccessorFactory(e){return new WjValueAccessor(e)}function _isNullOrEmpty(e){return null==e||""===e}
package/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.45-nightly.d20260105.t014601
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -11,17 +11,17 @@
11
11
  *
12
12
  */
13
13
  /**
14
- * {@module wijmo.angular2.directivebase}
15
- * Basic Wijmo for Angular 2 module containing internal common services and platform options.
16
- *
17
- * <b>wijmo.angular2.directivebase</b> is an external TypeScript module that can be imported to your code
18
- * using its ambient module name. For example:
19
- *
20
- * <pre>import * as wjBase from 'wijmo/wijmo.angular2.directivebase';
21
- * &nbsp;
22
- * wjBase.WjOptions.asyncBindings = false;</pre>
23
- *
24
- */
14
+ * {@module wijmo.angular2.directivebase}
15
+ * Basic Wijmo for Angular 2 module containing internal common services and platform options.
16
+ *
17
+ * <b>wijmo.angular2.directivebase</b> is an external TypeScript module that can be imported to your code
18
+ * using its ambient module name. For example:
19
+ *
20
+ * <pre>import * as wjBase from 'wijmo/wijmo.angular2.directivebase';
21
+ * &nbsp;
22
+ * wjBase.WjOptions.asyncBindings = false;</pre>
23
+ *
24
+ */
25
25
  /**
26
26
  *
27
27
  */
@@ -35,47 +35,47 @@ import * as ng2 from '@angular/core';
35
35
  */
36
36
  export declare class WjOptions {
37
37
  /**
38
- * Indicates whether Wijmo components update binding sources of the two-way bound properties asynchronously
39
- * or synchronously.
40
- *
41
- * If this property is set to true (default) then changes to the Wijmo components' properties
42
- * with two-way bindings (like WjInputNumber.value) will cause the component to update a binding
43
- * source property asynchronously, after the current change detection cycle is completed.
44
- * Otherwise, if this property is set to false, the binding source will be updated immediately.
45
- * A corresponding property change event (like WjInputNumber.valueChanged) is also triggered
46
- * asynchronously or synchronously depending on this property value, after the binding source
47
- * was updated.
48
- *
49
- * This global setting can be changed for specific instances of Wijmo components, by assigning
50
- * the component's <b>asyncBindings</b> property with a specific boolean value.
51
- *
52
- * Transition to asynchronous binding source updates has happened in Wijmo version 350. Before that version,
53
- * binding sources were updated immediately after the component's property change. In some cases this
54
- * could lead to the <b>ExpressionChangedAfterItHasBeenCheckedError</b> exception in the applications running
55
- * Angular in the debug mode. For example, if your component's property value is set to 0.12345, and
56
- * you two-way bind it to the <b>value</b> property of the <b>WjInputNumber</b> component with the <b>format</b>
57
- * property set to <b>'n2'</b>, the WjInputNumber immediately converts this value to 0.12. This change,
58
- * in turn, causes Angular to update your component property (the source of this binding), so that its
59
- * value changes from 0.12345 to 0.12. If this source update is performed synchronously then the binding
60
- * source property changes its value during the same change detection cycle, which is prohibited by Angular.
61
- * If Angular runs in debug mode then it executes a special check after every change detection cycle, which
62
- * detects this change and raises the <b>ExpressionChangedAfterItHasBeenCheckedError</b> exception.
63
- * Asynchronous binding source updates resolve this problem, because the binding source property
64
- * is updated after the current change detection cycle has finished.
65
- *
66
- * If the <b>ExpressionChangedAfterItHasBeenCheckedError</b> is not an issue for you, and parts of
67
- * you application logic are sensible to a moment when binding source update happens, you can change
68
- * this functionality by setting the global <b>asyncBindings</b> property to false. This should be
69
- * done before the first Wijmo component was instantiated by your application logic, and the best
70
- * place to do it is the file where you declare the application's root NgModule. This can be done
71
- * with the code like this:
72
- * <pre>import * as wjBase from 'wijmo/wijmo.angular2.directivebase';
73
- * wjBase.WjOptions.asyncBindings = false;</pre>
74
- *
75
- * Alternatively, you can change the update mode for the specific component using its own
76
- * <b>asyncBindings</b> property. For example:
77
- * <pre>&lt;wj-input-number [asyncBindings]="false" [(value)]="amount"&gt;&lt;/wj-input-number&gt;</pre>
78
- */
38
+ * Indicates whether Wijmo components update binding sources of the two-way bound properties asynchronously
39
+ * or synchronously.
40
+ *
41
+ * If this property is set to true (default) then changes to the Wijmo components' properties
42
+ * with two-way bindings (like WjInputNumber.value) will cause the component to update a binding
43
+ * source property asynchronously, after the current change detection cycle is completed.
44
+ * Otherwise, if this property is set to false, the binding source will be updated immediately.
45
+ * A corresponding property change event (like WjInputNumber.valueChanged) is also triggered
46
+ * asynchronously or synchronously depending on this property value, after the binding source
47
+ * was updated.
48
+ *
49
+ * This global setting can be changed for specific instances of Wijmo components, by assigning
50
+ * the component's <b>asyncBindings</b> property with a specific boolean value.
51
+ *
52
+ * Transition to asynchronous binding source updates has happened in Wijmo version 350. Before that version,
53
+ * binding sources were updated immediately after the component's property change. In some cases this
54
+ * could lead to the <b>ExpressionChangedAfterItHasBeenCheckedError</b> exception in the applications running
55
+ * Angular in the debug mode. For example, if your component's property value is set to 0.12345, and
56
+ * you two-way bind it to the <b>value</b> property of the <b>WjInputNumber</b> component with the <b>format</b>
57
+ * property set to <b>'n2'</b>, the WjInputNumber immediately converts this value to 0.12. This change,
58
+ * in turn, causes Angular to update your component property (the source of this binding), so that its
59
+ * value changes from 0.12345 to 0.12. If this source update is performed synchronously then the binding
60
+ * source property changes its value during the same change detection cycle, which is prohibited by Angular.
61
+ * If Angular runs in debug mode then it executes a special check after every change detection cycle, which
62
+ * detects this change and raises the <b>ExpressionChangedAfterItHasBeenCheckedError</b> exception.
63
+ * Asynchronous binding source updates resolve this problem, because the binding source property
64
+ * is updated after the current change detection cycle has finished.
65
+ *
66
+ * If the <b>ExpressionChangedAfterItHasBeenCheckedError</b> is not an issue for you, and parts of
67
+ * you application logic are sensible to a moment when binding source update happens, you can change
68
+ * this functionality by setting the global <b>asyncBindings</b> property to false. This should be
69
+ * done before the first Wijmo component was instantiated by your application logic, and the best
70
+ * place to do it is the file where you declare the application's root NgModule. This can be done
71
+ * with the code like this:
72
+ * <pre>import * as wjBase from 'wijmo/wijmo.angular2.directivebase';
73
+ * wjBase.WjOptions.asyncBindings = false;</pre>
74
+ *
75
+ * Alternatively, you can change the update mode for the specific component using its own
76
+ * <b>asyncBindings</b> property. For example:
77
+ * <pre>&lt;wj-input-number [asyncBindings]="false" [(value)]="amount"&gt;&lt;/wj-input-number&gt;</pre>
78
+ */
79
79
  static asyncBindings: boolean;
80
80
  }
81
81
  export interface IWjMetaBase {
@@ -133,18 +133,18 @@ export declare class WjDirectiveBehavior {
133
133
  static wijmoComponentProviderId: string;
134
134
  static ngZone: NgZone;
135
135
  static outsideZoneEvents: {
136
- 'pointermove': boolean;
137
- 'pointerover': boolean;
138
- 'mousemove': boolean;
139
- 'wheel': boolean;
140
- 'touchmove': boolean;
141
- 'pointerenter': boolean;
142
- 'pointerleave': boolean;
143
- 'pointerout': boolean;
144
- 'mouseover': boolean;
145
- 'mouseenter': boolean;
146
- 'mouseleave': boolean;
147
- 'mouseout': boolean;
136
+ pointermove: boolean;
137
+ pointerover: boolean;
138
+ mousemove: boolean;
139
+ wheel: boolean;
140
+ touchmove: boolean;
141
+ pointerenter: boolean;
142
+ pointerleave: boolean;
143
+ pointerout: boolean;
144
+ mouseover: boolean;
145
+ mouseenter: boolean;
146
+ mouseleave: boolean;
147
+ mouseout: boolean;
148
148
  };
149
149
  private static _pathBinding;
150
150
  private _siblingInsertedMO;
@@ -168,7 +168,7 @@ export declare class WjDirectiveBehavior {
168
168
  ngOnInit(): void;
169
169
  ngAfterViewInit(): void;
170
170
  ngOnDestroy(): void;
171
- static instantiateTemplate(parent: HTMLElement, viewContainerRef: ng2.ViewContainerRef, templateRef: ng2.TemplateRef<any>, /*domRenderer: ng2.Renderer,*/ useTemplateRoot?: boolean, dataContext?: any): {
171
+ static instantiateTemplate(parent: HTMLElement, viewContainerRef: ng2.ViewContainerRef, templateRef: ng2.TemplateRef<any>, useTemplateRoot?: boolean, dataContext?: any): {
172
172
  viewRef: ng2.EmbeddedViewRef<any>;
173
173
  rootElement: Element;
174
174
  };
@@ -202,10 +202,9 @@ export declare class WjDirectiveBehavior {
202
202
  export declare class Ng2Utils {
203
203
  static changeEventImplementSuffix: string;
204
204
  static wjEventImplementSuffix: string;
205
- static initEvents(directiveType: any, changeEvents: EventPropertiesItem[]): string[];
205
+ static initEvents(_directiveType: any, changeEvents: EventPropertiesItem[]): string[];
206
206
  static getChangeEventNameImplemented(propertyName: any): string;
207
207
  static getChangeEventNameExposed(propertyName: any): string;
208
- private static getWjEventNameImplemented;
209
208
  static getWjEventName(ngEventName: string): string;
210
209
  static getBaseType(type: any): any;
211
210
  static getAnnotations(type: any): any[];
package/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  *
3
- * Wijmo Library 5.20252.44
3
+ * Wijmo Library 5.20261.45-nightly.d20260105.t014601
4
4
  * https://developer.mescius.com/wijmo
5
5
  *
6
6
  * Copyright(c) MESCIUS inc. All rights reserved.
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  "use strict";var ɵngcc0 = require('@angular/core');
15
- var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@angular/core"),wijmo=__importStar(require("@mescius/wijmo")),WjOptions=function(){function WjOptions(){}WjOptions.asyncBindings=!0;return WjOptions}();exports.WjOptions=WjOptions;var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t=this.changeEventMap,i=e.outputs,r=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(i&&i.length){var n=i.map((function(e){return e.split(":")})).map((function(e){return{implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}}));this.allImplEvents=n.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];if(Ng2Utils.getWjEventName(a.implName)){var v={eventImpl:a.implName,event:a.exposeName},h=r[a.exposeName];h&&h.length&&(v.props=h.map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}})));t.push(v)}}for(var c in r)if(c.indexOf(".")>-1){v={eventImpl:null,event:c,props:r[c].map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}}))};t.push(v)}}};return WjComponentResolvedMetadata}();exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,r){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();var n=this.nz=i.get(core_1.NgZone);n&&(this.nzRun=n.run.bind(n));this.injectedParent=r;var o=this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];null==o.siblingId&&(o.siblingId=++WjDirectiveBehavior.siblingDirId+"");var s=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];s?this.resolvedTypeData=s:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=s=this.resolvedTypeData=new WjComponentResolvedMetadata(o);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,o.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){WjDirectiveBehavior.ngZone=t.get(core_1.NgZone);return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,r){return new WjDirectiveBehavior(e,t,i,r)};WjDirectiveBehavior.getZone=function(e){var t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout((function(){e.isDestroyed||e.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){var t=this.parentBehavior.directive,i=this._getParentProp();if(!this.parentBehavior.isDestroyed&&t&&i&&e){var r=t[i];if(wijmo.isArray(r)&&r){var n=r.indexOf(e);n>=0&&r.splice(n,1)}}}if(e instanceof wijmo.Control&&e.hostElement){var o=this.elementRef.nativeElement,s=o&&o.parentNode,a=s?Array.prototype.indexOf.call(s.childNodes,o):-1;e.dispose();if(a>-1&&Array.prototype.indexOf.call(s.childNodes,o)<0){o.textContent="";a<s.childNodes.length&&s.replaceChild(o,s.childNodes[a])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,r,n){void 0===r&&(r=!1);void 0===n&&(n={});var o,s=t.createEmbeddedView(i,n,t.length),a=s.rootNodes;if(r&&1===a.length)o=a[0];else{o=document.createElement("div");for(var v=0,h=a;v<h.length;v++){var c=h[v];o.appendChild(c)}}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(t)for(var i in t)if(t[i].indexOf(e)>-1)return i;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){var t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){core_1.NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run((function(){t(e)}))}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(var i=0,r=t;i<r.length;i++){e!==(s=r[i]).event.indexOf(".")<0&&this.addHandlers(s)}if(e)for(var n=0,o=t;n<o.length;n++){var s=o[n];this.triggerPropChangeEvents(s,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive;WjDirectiveBehavior.evaluatePath(i,e.event).addHandler((function(r,n){t.nzRun((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t._triggerEvent(i[e.eventImpl],n,e.props&&e.props.length>0)}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){void 0===t&&(t=!0);var i=this.directive;if(e.props&&e.props.length)for(var r=0,n=e.props;r<n.length;r++){var o=n[r];this._triggerEvent(i[o.evImpl],i[o.prop],t)}};WjDirectiveBehavior.prototype._setupAsChild=function(){if(this._isChild()){this._isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype._isAsyncBinding=function(){var e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype._isChild=function(){return this._isParentInitializer()||this._isParentReferencer()};WjDirectiveBehavior.prototype._isParentInitializer=function(){return null!=this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._getParentProp=function(){return this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._useParentObj=function(){return!1};WjDirectiveBehavior.prototype._parentInCtor=function(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()};WjDirectiveBehavior.prototype._initParent=function(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){this._getParentProp();var r=e[t];if(wijmo.isArray(r)){var n=this._isHostElement(),o=n?this._getSiblingIndex():-1;(o<0||o>=r.length)&&(o=r.length);r.splice(o,0,i);if(n){var s=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(s,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}};WjDirectiveBehavior.prototype._getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=-1,n=this.typeData.siblingId,o=0;o<i.length;o++){var s=i[o];if(1==s.nodeType&&s.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==n){++r;if(s===e)return r}}return-1};WjDirectiveBehavior.prototype._siblingInserted=function(e){for(var t=this,i=0,r=e;i<r.length;i++){var n=r[i];if("childList"===n.type&&n.addedNodes.length>0){if(Array.from(n.addedNodes).some((function(e){return e===t.elementRef.nativeElement}))){var o=this._getSiblingIndex(),s=this.parentBehavior.directive[this._getParentProp()],a=this.directive,v=s.indexOf(a);if(o>=0&&v>=0&&o!==v){s.splice(v,1);var h=Math.min(o,s.length);s.splice(h,0,a)}}}}};WjDirectiveBehavior.prototype._isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.prototype._triggerEvent=function(e,t,i){var r=this;if(i&&this._isAsyncBinding()){var n={event:e,args:t};this._pendingEvents.push(n);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout((function(){r._triggerPendingEvents(!1)}),0))}else e.emit(t)};WjDirectiveBehavior.prototype._triggerPendingEvents=function(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(!this.isDestroyed){var t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(var i=0,r=t;i<r.length;i++){var n=r[i];n.event.emit(n.args)}e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this._triggerPendingEvents(!0)};WjDirectiveBehavior.evaluatePath=function(e,t){this._pathBinding.path=t;return this._pathBinding.getValue(e)};WjDirectiveBehavior.getBehavior=function(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null};WjDirectiveBehavior.directiveTypeDataProp="meta";WjDirectiveBehavior.directiveResolvedTypeDataProp="_wjResolvedMeta";WjDirectiveBehavior.BehaviourRefProp="_wjBehaviour";WjDirectiveBehavior.parPropAttr="wjProperty";WjDirectiveBehavior.wjModelPropAttr="wjModelProperty";WjDirectiveBehavior.initializedEventAttr="initialized";WjDirectiveBehavior.isInitializedPropAttr="isInitialized";WjDirectiveBehavior.siblingDirIdAttr="wj-directive-id";WjDirectiveBehavior.asyncBindingUpdatePropAttr="asyncBindings";WjDirectiveBehavior.siblingDirId=0;WjDirectiveBehavior.wijmoComponentProviderId="WjComponent";WjDirectiveBehavior.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};WjDirectiveBehavior._pathBinding=new wijmo.Binding("");
15
+ var __importStar=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var i in e)Object.hasOwnProperty.call(e,i)&&(t[i]=e[i]);t.default=e;return t};Object.defineProperty(exports,"__esModule",{value:!0});var core_1=require("@angular/core"),wijmo=__importStar(require("@mescius/wijmo")),WjOptions=function(){function WjOptions(){}WjOptions.asyncBindings=!0;return WjOptions}();exports.WjOptions=WjOptions;var WjComponentResolvedMetadata=function(){function WjComponentResolvedMetadata(e){this.changeEventMap=[];this.allImplEvents=[];this.resolveChangeEventMap(e)}WjComponentResolvedMetadata.prototype.resolveChangeEventMap=function(e){var t=this.changeEventMap,i=e.outputs,r=e.changeEvents||{};t.splice(0,t.length);this.allImplEvents=[];if(i&&i.length){var n=i.map((function(e){return e.split(":")})).map((function(e){return{implName:e[0].trim(),exposeName:e[1]&&e[1].trim()}}));this.allImplEvents=n.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];if(Ng2Utils.getWjEventName(a.implName)){var v={eventImpl:a.implName,event:a.exposeName},h=r[a.exposeName];h&&h.length&&(v.props=h.map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}})));t.push(v)}}for(var c in r)if(c.indexOf(".")>-1){v={eventImpl:null,event:c,props:r[c].map((function(e){return{prop:e,evExposed:Ng2Utils.getChangeEventNameExposed(e),evImpl:Ng2Utils.getChangeEventNameImplemented(e)}}))};t.push(v)}}};return WjComponentResolvedMetadata}();exports.WjComponentResolvedMetadata=WjComponentResolvedMetadata;var WjDirectiveBehavior=function(){function WjDirectiveBehavior(e,t,i,r){this._pendingEvents=[];this.isInitialized=!1;this.isDestroyed=!1;this.nzRun=function(e){return e()};this.directive=e;this.elementRef=t;this.injector=i;this._overrideDirectiveMethods();this.nz=i.get(core_1.NgZone);var n=this.nz;n&&(this.nzRun=n.run.bind(n));this.injectedParent=r;this.typeData=e.constructor[WjDirectiveBehavior.directiveTypeDataProp];var o=this.typeData;null==o.siblingId&&(o.siblingId=""+ ++WjDirectiveBehavior.siblingDirId);var s=e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp];s?this.resolvedTypeData=s:e.constructor[WjDirectiveBehavior.directiveResolvedTypeDataProp]=s=this.resolvedTypeData=new WjComponentResolvedMetadata(o);e[WjDirectiveBehavior.BehaviourRefProp]=this;i[WjDirectiveBehavior.BehaviourRefProp]=this;e[WjDirectiveBehavior.isInitializedPropAttr]=!1;this._createEvents();this._setupAsChild();this._isHostElement()&&t.nativeElement.setAttribute(WjDirectiveBehavior.siblingDirIdAttr,o.siblingId);this.subscribeToEvents(!1);this.directive instanceof wijmo.Control&&(this.directive.workingAs="Angular2")}WjDirectiveBehavior.getHostElement=function(e,t){WjDirectiveBehavior.ngZone=t.get(core_1.NgZone);return e.nativeElement};WjDirectiveBehavior.attach=function(e,t,i,r){return new WjDirectiveBehavior(e,t,i,r)};WjDirectiveBehavior.getZone=function(e){var t=WjDirectiveBehavior.getBehavior(e);return t&&t.nz||WjDirectiveBehavior.ngZone};WjDirectiveBehavior.prototype.ngOnInit=function(){this.isInitialized=!0;this._initParent();this.subscribeToEvents(!0)};WjDirectiveBehavior.prototype.ngAfterViewInit=function(){var e=this;this.directive[WjDirectiveBehavior.isInitializedPropAttr]=!0;setTimeout((function(){e.isDestroyed||e.directive[WjDirectiveBehavior.initializedEventAttr].emit(void 0)}))};WjDirectiveBehavior.prototype.ngOnDestroy=function(){if(!this.isDestroyed){this.isDestroyed=!0;var e=this.directive;this._siblingInsertedMO&&this._siblingInsertedMO.disconnect();if(this._isChild()&&this.parentBehavior){var t=this.parentBehavior.directive,i=this._getParentProp();if(!this.parentBehavior.isDestroyed&&t&&i&&e){var r=t[i];if(wijmo.isArray(r)&&r){var n=r.indexOf(e);n>=0&&r.splice(n,1)}}}if(e instanceof wijmo.Control&&e.hostElement){var o=this.elementRef.nativeElement,s=o&&o.parentNode,a=s?Array.prototype.indexOf.call(s.childNodes,o):-1;e.dispose();if(a>-1&&Array.prototype.indexOf.call(s.childNodes,o)<0){o.textContent="";a<s.childNodes.length&&s.replaceChild(o,s.childNodes[a])}}this.injector[WjDirectiveBehavior.BehaviourRefProp]=null}};WjDirectiveBehavior.instantiateTemplate=function(e,t,i,r,n){void 0===r&&(r=!1);void 0===n&&(n={});var o,s=t.createEmbeddedView(i,n,t.length),a=s.rootNodes;if(r&&1===a.length)o=a[0];else{o=document.createElement("div");for(var v=0,h=a;v<h.length;v++){var c=h[v];o.appendChild(c)}}e&&e.appendChild(o);return{viewRef:s,rootElement:o}};WjDirectiveBehavior.prototype.getPropChangeEvent=function(e){var t=this.typeData.changeEvents;if(t)for(var i in t)if(t[i].indexOf(e)>-1)return i;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){var t=e._resizeObserverCallback.bind(e);e._resizeObserverCallback=function(e){core_1.NgZone.isInAngularZone()?t(e):WjDirectiveBehavior.getZone(this).run((function(){t(e)}))}.bind(e)}};WjDirectiveBehavior.prototype.subscribeToEvents=function(e){var t=this.resolvedTypeData.changeEventMap;e=!!e;for(var i=0,r=t;i<r.length;i++){e!==(s=r[i]).event.indexOf(".")<0&&this.addHandlers(s)}if(e)for(var n=0,o=t;n<o.length;n++){var s=o[n];this.triggerPropChangeEvents(s,!0)}};WjDirectiveBehavior.prototype.addHandlers=function(e){var t=this,i=this.directive;WjDirectiveBehavior.evaluatePath(i,e.event).addHandler((function(r,n){t.nzRun((function(){t.isInitialized&&t.triggerPropChangeEvents(e);e.eventImpl&&t._triggerEvent(i[e.eventImpl],n,e.props&&e.props.length>0)}))}))};WjDirectiveBehavior.prototype.triggerPropChangeEvents=function(e,t){void 0===t&&(t=!0);var i=this.directive;if(e.props&&e.props.length)for(var r=0,n=e.props;r<n.length;r++){var o=n[r];this._triggerEvent(i[o.evImpl],i[o.prop],t)}};WjDirectiveBehavior.prototype._setupAsChild=function(){if(this._isChild()){this._isHostElement()&&(this.elementRef.nativeElement.style.display="none");this.parentBehavior=WjDirectiveBehavior.getBehavior(this.injectedParent)}};WjDirectiveBehavior.prototype._isAsyncBinding=function(){var e=this.directive[WjDirectiveBehavior.asyncBindingUpdatePropAttr];return null==e?WjOptions.asyncBindings:e};WjDirectiveBehavior.prototype._isChild=function(){return this._isParentInitializer()||this._isParentReferencer()};WjDirectiveBehavior.prototype._isParentInitializer=function(){return null!=this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._isParentReferencer=function(){return!!this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._getParentProp=function(){return this.directive[WjDirectiveBehavior.parPropAttr]};WjDirectiveBehavior.prototype._getParentReferenceProperty=function(){return this.typeData.parentRefProperty};WjDirectiveBehavior.prototype._useParentObj=function(){return!1};WjDirectiveBehavior.prototype._parentInCtor=function(){return this._isParentReferencer()&&""==this._getParentReferenceProperty()};WjDirectiveBehavior.prototype._initParent=function(){if(this.parentBehavior&&!this._useParentObj()){var e=this.parentBehavior.directive,t=this._getParentProp(),i=this.directive;if(this._isParentInitializer()){var r=e[t];if(wijmo.isArray(r)){var n=this._isHostElement(),o=n?this._getSiblingIndex():-1;(o<0||o>=r.length)&&(o=r.length);r.splice(o,0,i);if(n){var s=this.elementRef.nativeElement;this._siblingInsertedMO=new MutationObserver(this._siblingInserted.bind(this));this._siblingInsertedMO.observe(s,{childList:!0})}}else e[t]=i}this._isParentReferencer()&&!this._parentInCtor()&&(i[this._getParentReferenceProperty()]=e)}};WjDirectiveBehavior.prototype._getSiblingIndex=function(){var e=this.elementRef.nativeElement,t=e.parentElement;if(!t)return-1;for(var i=t.childNodes,r=-1,n=this.typeData.siblingId,o=0;o<i.length;o++){var s=i[o];if(1==s.nodeType&&s.getAttribute(WjDirectiveBehavior.siblingDirIdAttr)==n){++r;if(s===e)return r}}return-1};WjDirectiveBehavior.prototype._siblingInserted=function(e){for(var t=this,i=0,r=e;i<r.length;i++){var n=r[i];if("childList"===n.type&&n.addedNodes.length>0){if(Array.from(n.addedNodes).some((function(e){return e===t.elementRef.nativeElement}))){var o=this._getSiblingIndex(),s=this.parentBehavior.directive[this._getParentProp()],a=this.directive,v=s.indexOf(a);if(o>=0&&v>=0&&o!==v){s.splice(v,1);var h=Math.min(o,s.length);s.splice(h,0,a)}}}}};WjDirectiveBehavior.prototype._isHostElement=function(){return this.elementRef.nativeElement.nodeType===Node.ELEMENT_NODE};WjDirectiveBehavior.prototype._triggerEvent=function(e,t,i){var r=this;if(i&&this._isAsyncBinding()){var n={event:e,args:t};this._pendingEvents.push(n);null==this._pendingEventsTO&&(this._pendingEventsTO=setTimeout((function(){r._triggerPendingEvents(!1)}),0))}else e.emit(t)};WjDirectiveBehavior.prototype._triggerPendingEvents=function(e){if(null!=this._pendingEventsTO){clearTimeout(this._pendingEventsTO);this._pendingEventsTO=null}if(!this.isDestroyed){var t=[].concat(this._pendingEvents);this._pendingEvents.splice(0,this._pendingEvents.length);for(var i=0,r=t;i<r.length;i++){var n=r[i];n.event.emit(n.args)}e&&this._pendingEvents.length&&this._triggerPendingEvents(!0)}};WjDirectiveBehavior.prototype.flushPendingEvents=function(){this._triggerPendingEvents(!0)};WjDirectiveBehavior.evaluatePath=function(e,t){WjDirectiveBehavior._pathBinding.path=t;return WjDirectiveBehavior._pathBinding.getValue(e)};WjDirectiveBehavior.getBehavior=function(e){return e?e[WjDirectiveBehavior.BehaviourRefProp]:null};WjDirectiveBehavior.directiveTypeDataProp="meta";WjDirectiveBehavior.directiveResolvedTypeDataProp="_wjResolvedMeta";WjDirectiveBehavior.BehaviourRefProp="_wjBehaviour";WjDirectiveBehavior.parPropAttr="wjProperty";WjDirectiveBehavior.wjModelPropAttr="wjModelProperty";WjDirectiveBehavior.initializedEventAttr="initialized";WjDirectiveBehavior.isInitializedPropAttr="isInitialized";WjDirectiveBehavior.siblingDirIdAttr="wj-directive-id";WjDirectiveBehavior.asyncBindingUpdatePropAttr="asyncBindings";WjDirectiveBehavior.siblingDirId=0;WjDirectiveBehavior.wijmoComponentProviderId="WjComponent";WjDirectiveBehavior.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};WjDirectiveBehavior._pathBinding=new wijmo.Binding("");
16
16
  WjDirectiveBehavior.ɵfac = function WjDirectiveBehavior_Factory(t) { ɵngcc0.ɵɵinvalidFactory(); };
17
17
  WjDirectiveBehavior.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: WjDirectiveBehavior });
18
- return WjDirectiveBehavior}();exports.WjDirectiveBehavior=WjDirectiveBehavior;var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.initEvents=function(e,t){for(var i=[],r=0,n=t;r<n.length;r++){var o=n[r],s=o.props;o.event&&o.eventImpl&&i.push(o.eventImpl+":"+o.event);if(s&&s.length)for(var a=0,v=s;a<v.length;a++){var h=v[a];i.push(h.evImpl+":"+h.evExposed)}}return i};Ng2Utils.getChangeEventNameImplemented=function(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix};Ng2Utils.getChangeEventNameExposed=function(e){return e+"Change"};Ng2Utils.getWjEventNameImplemented=function(e){return e+Ng2Utils.wjEventImplementSuffix};Ng2Utils.getWjEventName=function(e){if(e){var t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null};Ng2Utils.getBaseType=function(e){var t;return e&&(t=Object.getPrototypeOf(e.prototype))&&t.constructor};Ng2Utils.getAnnotations=function(e){return Reflect.getMetadata("annotations",e)};Ng2Utils.getAnnotation=function(e,t){if(t&&e)for(var i=0,r=e;i<r.length;i++){var n=r[i];if(n instanceof t)return n}return null};Ng2Utils.getTypeAnnotation=function(e,t,i){for(var r=e;r;r=i?null:Ng2Utils.getBaseType(r)){var n=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(r),t);if(n)return n}return null};Ng2Utils.equals=function(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t};Ng2Utils._copy=function(e,t,i,r,n){if(e&&t)for(var o in t)if(r||"_"!==o[0]){var s=t[o];if(!n||n(o,s)){var a=e[o];wijmo.isArray(s)?e[o]=(!wijmo.isArray(a)||i?[]:a).concat(s):void 0!==s&&(e[o]=s)}}};Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";return Ng2Utils}();exports.Ng2Utils=Ng2Utils;var WjValueAccessor=function(){function WjValueAccessor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=function(e){};this._onTouched=function(){};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t=this;this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){var i=this._directive.initialized;this._dirInitEh=i.subscribe((function(){t._updateDirective();t._ensureInitEhUnsubscribed()}))}};WjValueAccessor.prototype.registerOnChange=function(e){this._onChange=e};WjValueAccessor.prototype.registerOnTouched=function(e){this._onTouched=e};WjValueAccessor.prototype.setDisabledState=function(e){var t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)};WjValueAccessor.prototype._updateDirective=function(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){var e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}};WjValueAccessor.prototype._ensureSubscribed=function(){if(!this._isSubscribed){var e=this._directive;if(e){this._ensureNgModelProp();var t=this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];if(t){var i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}};WjValueAccessor.prototype._ensureNgModelProp=function(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])};WjValueAccessor.prototype._ensureInitEhUnsubscribed=function(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}};WjValueAccessor.prototype._isFirstChange=function(){return this._writeQnt<2};WjValueAccessor.prototype._dirValChgEh=function(e,t){if(this._onChange&&this._directive&&this._ngModelProp){var i=this._directive[this._ngModelProp],r=this._modelValue;""===r&&(r=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(r)&&_isNullOrEmpty(i)||Ng2Utils.equals(r,i))||wijmo.isArray(i)){this._modelValue=i;this._onChange(i)}}};WjValueAccessor.prototype._dirLostFocusEh=function(e,t){this._onTouched&&this._onTouched()};return WjValueAccessor}();exports.WjValueAccessor=WjValueAccessor;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}exports.WjValueAccessorFactory=WjValueAccessorFactory;function _isNullOrEmpty(e){return null==e||""===e}
18
+ return WjDirectiveBehavior}();exports.WjDirectiveBehavior=WjDirectiveBehavior;var Ng2Utils=function(){function Ng2Utils(){}Ng2Utils.initEvents=function(e,t){for(var i=[],r=0,n=t;r<n.length;r++){var o=n[r],s=o.props;o.event&&o.eventImpl&&i.push(o.eventImpl+":"+o.event);if(s&&s.length)for(var a=0,v=s;a<v.length;a++){var h=v[a];i.push(h.evImpl+":"+h.evExposed)}}return i};Ng2Utils.getChangeEventNameImplemented=function(e){return Ng2Utils.getChangeEventNameExposed(e)+Ng2Utils.changeEventImplementSuffix};Ng2Utils.getChangeEventNameExposed=function(e){return e+"Change"};Ng2Utils.getWjEventName=function(e){if(e){var t=Ng2Utils.wjEventImplementSuffix,i=e.length-t.length;if(i>0&&e.substr(i)===t)return e.substr(0,i)}return null};Ng2Utils.getBaseType=function(e){if(!e)return null;var t=Object.getPrototypeOf(e.prototype);return t&&t.constructor};Ng2Utils.getAnnotations=function(e){return Reflect.getMetadata("annotations",e)};Ng2Utils.getAnnotation=function(e,t){if(t&&e)for(var i=0,r=e;i<r.length;i++){var n=r[i];if(n instanceof t)return n}return null};Ng2Utils.getTypeAnnotation=function(e,t,i){for(var r=e;r;r=i?null:Ng2Utils.getBaseType(r)){var n=Ng2Utils.getAnnotation(Ng2Utils.getAnnotations(r),t);if(n)return n}return null};Ng2Utils.equals=function(e,t){return e!=e&&t!=t||wijmo.DateTime.equals(e,t)||e===t};Ng2Utils._copy=function(e,t,i,r,n){if(e&&t)for(var o in t)if(r||"_"!==o[0]){var s=t[o];if(!n||n(o,s)){var a=e[o];wijmo.isArray(s)?e[o]=(!wijmo.isArray(a)||i?[]:a).concat(s):void 0!==s&&(e[o]=s)}}};Ng2Utils.changeEventImplementSuffix="PC";Ng2Utils.wjEventImplementSuffix="Ng";return Ng2Utils}();exports.Ng2Utils=Ng2Utils;var WjValueAccessor=function(){function WjValueAccessor(e){this._writeQnt=0;this._isSubscribed=!1;this._dirUpdateQnt=0;this._onChange=function(e){};this._onTouched=function(){};this._directive=e;this._behavior=WjDirectiveBehavior.getBehavior(e)}WjValueAccessor.prototype.writeValue=function(e){var t=this;this._modelValue=e;++this._writeQnt;if(this._directive.isInitialized){this._ensureInitEhUnsubscribed();this._updateDirective()}else if(!this._dirInitEh){var i=this._directive.initialized;this._dirInitEh=i.subscribe((function(){t._updateDirective();t._ensureInitEhUnsubscribed()}))}};WjValueAccessor.prototype.registerOnChange=function(e){this._onChange=e};WjValueAccessor.prototype.registerOnTouched=function(e){this._onTouched=e};WjValueAccessor.prototype.setDisabledState=function(e){var t=this._directive;t instanceof wijmo.Control&&(t.isDisabled=e)};WjValueAccessor.prototype._updateDirective=function(){if(!this._isFirstChange()||null!=this._modelValue){this._ensureNgModelProp();if(this._directive&&this._ngModelProp){var e=this._modelValue;""===e&&(e=null);this._dirUpdateQnt++;try{this._directive[this._ngModelProp]=e}finally{this._dirUpdateQnt--}}this._ensureSubscribed()}};WjValueAccessor.prototype._ensureSubscribed=function(){if(!this._isSubscribed){var e=this._directive;if(e){this._ensureNgModelProp();this._ngModelProp=e[WjDirectiveBehavior.wjModelPropAttr];var t=this._ngModelProp;if(t){var i=this._behavior.getPropChangeEvent(t);i&&e[i].addHandler(this._dirValChgEh,this)}e instanceof wijmo.Control&&e.lostFocus.addHandler(this._dirLostFocusEh,this);this._isSubscribed=!0}}};WjValueAccessor.prototype._ensureNgModelProp=function(){!this._ngModelProp&&this._directive&&(this._ngModelProp=this._directive[WjDirectiveBehavior.wjModelPropAttr])};WjValueAccessor.prototype._ensureInitEhUnsubscribed=function(){if(this._dirInitEh){this._dirInitEh.unsubscribe();this._dirInitEh=null}};WjValueAccessor.prototype._isFirstChange=function(){return this._writeQnt<2};WjValueAccessor.prototype._dirValChgEh=function(e,t){if(this._onChange&&this._directive&&this._ngModelProp){var i=this._directive[this._ngModelProp],r=this._modelValue;""===r&&(r=null);if(!(this._dirUpdateQnt>0&&_isNullOrEmpty(r)&&_isNullOrEmpty(i)||Ng2Utils.equals(r,i))||wijmo.isArray(i)){this._modelValue=i;this._onChange(i)}}};WjValueAccessor.prototype._dirLostFocusEh=function(e,t){this._onTouched&&this._onTouched()};return WjValueAccessor}();exports.WjValueAccessor=WjValueAccessor;function WjValueAccessorFactory(e){return new WjValueAccessor(e)}exports.WjValueAccessorFactory=WjValueAccessorFactory;function _isNullOrEmpty(e){return null==e||""===e}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mescius/wijmo.angular2.directivebase",
3
- "version": "5.20252.44",
3
+ "version": "5.20261.45-nightly.d20260105.t014601",
4
4
  "description": "UI library for pure JS, Angular, React, Vue and more...",
5
5
  "author": "MESCIUS inc",
6
6
  "license": "Commercial",
7
7
  "main": "./index.js",
8
8
  "types": "./index.d.ts",
9
9
  "dependencies": {
10
- "@mescius/wijmo": "5.20252.44"
10
+ "@mescius/wijmo": "5.20261.45-nightly.d20260105.t014601"
11
11
  },
12
12
  "homepage": "https://developer.mescius.com/wijmo",
13
13
  "bugs": {