PageSourceSearch

https://brunswickcommunitygarden.org/chunk-7PUHGF7L.js

js brunswickcommunitygarden.org collected 2026-10-04 04:48:55 UTC 5,388 bytes, 1 lines download raw bytes

1import{b as H}from"./chunk-XUWTXBJI.js";import{e as B}from"./chunk-G72XQVEA.js";import{a as A,g as W}from"./chunk-Z7SBAHQQ.js";import{E as q,F as U,h as j,o as E,z as k}from"./chunk-BJG2EUOY.js";import{i as L}from"./chunk-47PYUJVP.js";import{b as D}from"./chunk-COVAZGM3.js";import{$c as I,Dc as v,Ea as d,Ec as l,F as N,Fa as o,Hc as y,Ob as T,Qa as f,Tb as F,Tc as c,Uc as m,Zc as M,_c as P,dc as g,nc as V,pc as S,qc as w,rc as x,sc as s,tc as p,u,ua as C,yb as r,yc as b}from"./chunk-LBMBSTLT.js";function O(n,h){if(n&1&&(s(0,"mat-option",5),c(1),p()),n&2){let e=h.$implicit,i=l(2);y("value",e[i.parent_id]),r(),m(e[i.parent_name])}}function R(n,h){if(n&1){let e=b();s(0,"mat-form-field",2)(1,"mat-label"),c(2),p(),s(3,"mat-select",4,0),I("ngModelChange",function(t){d(e);let a=l();return P(a.parentValue,t)||(a.parentValue=t),o(t)}),v("selectionChange",function(t){d(e);let a=l();return o(a.getChildValues(t))})("ngModelChange",function(){d(e);let t=l();return o(t.checkValidity())}),w(5,O,2,2,"mat-option",5,S),p()()}if(n&2){let e=l();r(2),m(e.parentLabel),r(),g("disabled",e.disabled||e.parentSettings&&!e.parentSettings.is_editable)("required",e.parentSettings&&e.parentSettings.field_require),M("ngModel",e.parentValue),r(2),x(e.parents)}}function J(n,h){if(n&1&&(s(0,"mat-option",5),c(1),p()),n&2){let e=h.$implicit,i=l(2);y("value",e[i.child_id]),r(),m(e[i.child_name])}}function z(n,h){if(n&1){let e=b();s(0,"mat-form-field",3)(1,"mat-label"),c(2),p(),s(3,"mat-select",4,1),I("ngModelChange",function(t){d(e);let a=l();return P(a.childValue,t)||(a.childValue=t),o(t)}),v("selectionChange",function(){d(e);let t=l();return o(t.updateUpdatedFlag())})("ngModelChange",function(){d(e);let t=l();return o(t.checkValidity())}),w(5,J,2,2,"mat-option",5,S),p()()}if(n&2){let e=l();r(2),m(e.childLabel),r(),g("disabled",e.disabled||e.childSettings&&!e.childSettings.is_editable)("required",e.childSettings&&e.childSettings.field_require),M("ngModel",e.childValue),r(2),x(e.filteredChildren)}}var re=(()=>{class n{constructor(){this.apiService=C(D),this.formHelperService=C(L),this.parentLabel="Parent Label",this.childLabel="Child Label",this.parent_id="Parent Id",this.parent_name="Parent Name",this.child_id="Child Id",this.child_name="Child Name",this.child_parent_id="Child Parent Id",this.parent_object="ParentNa",this.child_object="ChildNa",this.originalParentValue="",this.originalChildValue="",this.parentValue="",this.childValue="",this.parentColumnName="",this.childColumnName="",this.disabled=!1,this.dropdownUpdated=new f,this.fieldsValid=new f,this.updated=!1,this.parents=[],this.children=[],this.filteredChildren=[]}ngOnInit(){this.getData()}getData(){let e=this.parent_object!="ParentNa"?this.apiService.getData(this.parent_object,!1,[],""):u(null),i=this.child_object!="ChildNa"?this.apiService.getData(this.child_object,!1,[],""):u(null);N([e,i]).subscribe(([t,a])=>{t&&t.statusCode=="Success"&&t.data.Items&&(this.parents=this.formHelperService.sortArray(t.data.Items,"sort")),a&&a.statusCode=="Success"&&a.data.Items&&(this.children=this.formHelperService.sortArray(a.data.Items,"sort"),this.parentValue&&this.filterChildArray(this.parentValue)),this.checkValidity()})}getChildValues(e){this.updateUpdatedFlag(),this.filterChildArray(e.value)}filterChildArray(e){this.filteredChildren=this.children.filter(i=>i[this.child_parent_id]==e)}updateUpdatedFlag(){this.parentValue!=this.originalParentValue||this.childValue!=this.originalChildValue?this.updated=!0:this.updated=!1,this.dropdownUpdated.emit(this.updated)}getDataToSave(){var e=[];return this.parentValue!=this.originalParentValue&&e.push({field_name:this.parentColumnName,field_value:this.parentValue}),this.childValue!=this.originalChildValue&&e.push({field_name:this.childColumnName,field_value:this.childValue}),e}checkValidity(){let e=this.isFieldValid(this.parentSettings,this.parentValue),i=this.isFieldValid(this.childSettings,this.childValue);this.fieldsValid.emit(e&&i)}isFieldValid(e,i){return e&&e.is_editable===!1||!e||e.field_require===!1?!0:!!i}static{this.\u0275fac=function(i){return new(i||n)}}static{this.\u0275cmp=T({type:n,selectors:[["app-parent-child-dropdown"]],inputs:{parentLabel:"parentLabel",childLabel:"childLabel",parent_id:"parent_id",parent_name:"parent_name",child_id:"child_id",child_name:"child_
1name",child_parent_id:"child_parent_id",parent_object:"parent_object",child_object:"child_object",originalParentValue:"originalParentValue",originalChildValue:"originalChildValue",parentValue:"parentValue",childValue:"childValue",parentColumnName:"parentColumnName",childColumnName:"childColumnName",disabled:"disabled",parentSettings:"parentSettings",childSettings:"childSettings"},outputs:{dropdownUpdated:"dropdownUpdated",fieldsValid:"fieldsValid"},decls:2,vars:2,consts:[["parentModel","ngModel"],["childModel","ngModel"],["appearance","fill",1,"col-sm-6",2,"padding-right","10px"],["appearance","fill",1,"col-sm-6"],[3,"ngModelChange","selectionChange","disabled","required","ngModel"],[3,"value"]],template:function(i,t){if(i&1&&F(0,R,7,4,"mat-form-field",2)(1,z,7,4,"mat-form-field",3),i&2){let a,_;V(!t.parentSettings||(!((a=t.parentSettings.is_field_visible)!==null&&a!==void 0)||a)?0:-1),r(),V(!t.childSettings||(!((_=t.childSettings.is_field_visible)!==null&&_!==void 0)||_)?1:-1)}},dependencies:[W,A,H,U,j,k,q,E,B],encapsulation:2})}}return n})();export{re as a};

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.