PageSourceSearch

https://www.base.be/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-YXBLHLUP.js

js base.be collected 2026-10-01 11:43:51 UTC 5,707 bytes, 1 lines download raw bytes

1import{a as y}from"/etc/designs/aff-telenetgroup/ng/dist/telenetgroup-app/chunk-WXUJ2XVZ.js";import*as p from"@angular/core";import{inject as h,ChangeDetectorRef as w,DestroyRef as $}from"@angular/core";import{Actions as R,Store as U,ofActionDispatched as k,withNgxsPlugin as v}from"@ngxs/store";import{getActionTypeFromInstance as P,setValue as i,getValue as m}from"@ngxs/store/plugins";import{takeUntilDestroyed as l}from"@angular/core/rxjs-interop";import{FormGroupDirective as C}from"@angular/forms";import{distinctUntilChanged as D,debounceTime as V}from"rxjs";var d=(()=>{class e{payload;static type="[Forms] Update Form Status";constructor(r){this.payload=r}}return e})(),f=(()=>{class e{payload;static type="[Forms] Update Form Value";constructor(r){this.payload=r}}return e})(),u=(()=>{class e{payload;static type="[Forms] Update Form";constructor(r){this.payload=r}}return e})(),F=(()=>{class e{payload;static type="[Forms] Update Form Dirty";constructor(r){this.payload=r}}return e})(),G=(()=>{class e{payload;static type="[Forms] Set Form Dirty";constructor(r){this.payload=r}}return e})(),j=(()=>{class e{payload;static type="[Forms] Set Form Pristine";constructor(r){this.payload=r}}return e})(),g=(()=>{class e{payload;static type="[Forms] Update Form Errors";constructor(r){this.payload=r}}return e})(),x=(()=>{class e{payload;static type="[Forms] Set Form Disabled";constructor(r){this.payload=r}}return e})(),M=(()=>{class e{payload;static type="[Forms] Set Form Enabled";constructor(r){this.payload=r}}return e})(),b=(()=>{class e{payload;static type="[Forms] Reset Form";constructor(r){this.payload=r}}return e})(),N=(()=>{class e{handle(r,t,c){let o=P(t),s=r;if(o===f.type||o===u.type||o===b.type){let{value:n}=t.payload,_=Array.isArray(n)?n.slice():A(n)?y({},n):n,S=this.joinPathWithPropertyPath(t);s=i(s,S,_)}if(o===b.type){let n=m(s,`${t.payload.path}.model`);s=i(s,`${t.payload.path}`,{model:n})}return(o===d.type||o===u.type)&&(s=i(s,`${t.payload.path}.status`,t.payload.status)),(o===g.type||o===u.type)&&(s=i(s,`${t.payload.path}.errors`,y({},t.payload.errors))),(o===F.type||o===u.type)&&(s=i(s,`${t.payload.path}.dirty`,t.payload.dirty)),o===G.type&&(s=i(s,`${t.payload}
1.dirty`,!0)),o===j.type&&(s=i(s,`${t.payload}.dirty`,!1)),o===x.type&&(s=i(s,`${t.payload}.disabled`,!0)),o===M.type&&(s=i(s,`${t.payload}.disabled`,!1)),c(s,t)}joinPathWithPropertyPath({payload:r}){let t=`${r.path}.model`;return r.propertyPath&&(t+=`.${r.propertyPath}`),t}static \u0275fac=function(t){return new(t||e)};static \u0275prov=p.\u0275\u0275defineInjectable({token:e,factory:e.\u0275fac})}return e})();function A(e){return e!==null&&typeof e=="object"}var H=(()=>{class e{path=null;set debounce(r){this._debounce=Number(r)}get debounce(){return this._debounce}_debounce=100;set clearDestroy(r){this._clearDestroy=r!=null&&`${r}`!="false"}get clearDestroy(){return this._clearDestroy}_clearDestroy=!1;_updating=!1;_actions$=h(R);_store=h(U);_formGroupDirective=h(C);_cd=h(w);_destroyRef=h($);constructor(){this._destroyRef.onDestroy(()=>{this.clearDestroy&&this._store.dispatch(new u({path:this.path,value:null,dirty:null,status:null,errors:null}))})}ngOnInit(){this._actions$.pipe(k(b),l(this._destroyRef)).subscribe(t=>{t.payload.path===this.path&&(this.form.reset(t.payload.value),this.updateFormStateWithRawValue(!0),this._cd.markForCheck())}),this.getStateStream(`${this.path}.model`).subscribe(t=>{this._updating||!t||(this.form.patchValue(t),this._cd.markForCheck())}),this.getStateStream(`${this.path}.dirty`).subscribe(t=>{this.form.dirty===t||typeof t!="boolean"||(t?this.form.markAsDirty():this.form.markAsPristine(),this._cd.markForCheck())}),this._store.selectOnce(t=>m(t,this.path)).pipe(l(this._destroyRef)).subscribe(()=>{this._store.dispatch([new f({path:this.path,value:this.form.getRawValue()}),new d({path:this.path,status:this.form.status}),new F({path:this.path,dirty:this.form.dirty})])}),this.getStateStream(`${this.path}.disabled`).subscribe(t=>{this.form.disabled===t||typeof t!="boolean"||(t?this.form.disable():this.form.enable(),this._cd.markForCheck())}),this._formGroupDirective.valueChanges.pipe(D((t,c)=>JSON.stringify(t)===JSON.stringify(c)),this.debounceChange()).subscribe(()=>{this.updateFormStateWithRawValue()}),this._formGroupDirective.statusChanges.pipe(D(),this.debounceChange()).subscribe(t=>{this._store.dispatch(new d({status:t,path:this.path}))})}updateFormStateWithRawValue(r){if(this._updating)return;let t=this._formGroupDirective.control.getRawValue(),c=[new f({path:this.path,value:t}),new F({path:this.path,dirty:this._formGroupDirective.dirty}),new g({path:this.path,errors:this._formGroupDirective.errors})];r&&c.push(new d({path:this.path,status:this._formGroupDirective.status})),this._updating=!0,this._store.dispatch(c).subscribe({error:()=>this._updating=!1,complete:()=>this._updating=!1})}debounceChange(){return this._formGroupDirective.control.updateOn!=="change"||this._debounce<0?t=>t.pipe(l(this._destroyRef)):t=>t.pipe(V(this._debounce),l(this._destroyRef))}get form(){return this._formGroupDirective.form}getStateStream(r){return this._store.select(t=>m(t,r)).pipe(l(this._destroyRef))}static \u0275fac=function(t){return new(t||e)};static \u0275dir=p.\u0275\u0275defineDirective({type:e,selectors:[["","ngxsForm",""]],inputs:{path:[0,"ngxsForm","path"],debounce:[0,"ngxsFormDebounce","debounce"],clearDestroy:[0,"ngxsFormClearOnDestroy","clearDestroy"]}})}return e})(),K=(()=>{class e{static forRoot(){return{ngModule:e,providers:[v(N)]}}static \u0275fac=function(t){return new(t||e)};static \u0275mod=p.\u0275\u0275defineNgModule({type:e});static \u0275inj=p.\u0275\u0275defineInjector({})}return e})();export{H as a,K as b};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.