// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
require({cache:{"url:jimu/dijit/templates/RelationshipConfig.html":'\x3cdiv\x3e\r\n  \x3ctable class\x3d"setting-table" cellpadding\x3d"0" cellspacing\x3d"0" cellpadding\x3d"10px" style\x3d"width:100%;"\x3e\r\n    \x3ctbody\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"value-td" colspan\x3d"2"\x3e\r\n          \x3cspan data-dojo-attach-point\x3d"titleLabel"\x3e\x3c/span\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n      \x3ctr\x3e\r\n        \x3ctd class\x3d"fields-td"\x3e\r\n          \x3cdiv data-dojo-attach-point\x3d"fieldsTable" data-dojo-type\x3d"jimu/dijit/SimpleTable" data-dojo-props\x3d\'fields:[{name:"visibility",title:"${nls.visibility}",type:"checkbox"},{name:"name",title:"${nls.name}",type:"text",editable:false},{name:"alias",title:"${nls.alias}",type:"text",editable:true},{name:"actions",title:"${nls.actions}",type:"actions",actions:["up","down"]}]\'\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n        \x3ctd class\x3d"delete-td" nowrap\x3e\r\n          \x3cdiv class\x3d"delete" data-dojo-attach-point\x3d"btnDelete" data-dojo-attach-event\x3d"click:_destroySelf"\x3e\x3c/div\x3e\r\n        \x3c/td\x3e\r\n      \x3c/tr\x3e\r\n    \x3c/tbody\x3e\r\n  \x3c/table\x3e\r\n  \x3cdiv data-dojo-attach-point\x3d"loading" data-dojo-type\x3d"jimu/dijit/LoadingIndicator"\x3e\x3c/div\x3e\r\n\x3c/div\x3e\r\n'}});
define("dojo/_base/declare dijit/_WidgetBase dijit/_TemplatedMixin dijit/_WidgetsInTemplateMixin dojo/text!./templates/RelationshipConfig.html dojo/dom-construct dojo/_base/lang dojo/_base/array ../utils".split(" "),function(h,k,l,m,n,f,g,e,p){return h([k,l,m],{_def:null,declaredClass:"jimu.dijit.RelationshipConfig",baseClass:"jimu-single-filter",templateString:n,fields:null,config:null,title:"",postCreate:function(){this.inherited(arguments);this.fields&&this.setFields(this.fields)},getConfig:function(){var a=
{tableId:this.tableId,fields:[]},b=this.fieldsTable.getRows();e.forEach(b,g.hitch(this,function(c){var d=this.fieldsTable.getRowData(c);d.visibility&&a.fields.push({name:d.name,alias:d.alias,type:c.fieldType,showInInfoWindow:!0})}));return a},setFields:function(a,b){a instanceof Array&&0<a.length&&(this._setFields(a,b),this.loading.hide())},setTitle:function(a){this.title=a;f.empty(this.titleLabel);f.create("div",{innerHTML:p.sanitizeHTML(a)},this.titleLabel)},clear:function(){this.fieldsTable.clear()},
_setFields:function(a,b){this.fields=e.filter(a,function(c){return"esriFieldTypeGeometry"!==c.type});0<this.fields.length&&e.forEach(this.fields,g.hitch(this,function(c){var d=!1;b instanceof Array&&0<=e.indexOf(b,c.name)&&(d=!0);this._addRow(c,d)}))},_addRow:function(a,b){b=this.fieldsTable.addRow({visibility:b,name:a.name,alias:a.alias||a.name});b.success&&(b.tr.fieldType=a.type)},_destroySelf:function(){this.destroy()}})});