/*!@license * Infragistics.Web.ClientUI Pivot Data Selector 19.1.20 * * Copyright (c) 2011-2012 Infragistics Inc. * * http://www.infragistics.com/ * * Depends on: * jquery-1.9.1.js * jquery.ui.core.js * jquery.ui.widget.js * jquery.ui.mouse.js * infragistics.ui.widget.js * jquery.ui.draggable.js * jquery.ui.droppable.js * infragistics.util.js * infragistics.util.jquery.js * infragistics.datasource.js * infragistics.olapxmladatasource.js * infragistics.olapflatdatasource.js * infragistics.templating.js * infragistics.ui.shared.js * infragistics.ui.scroll.js * infragistics.ui.combo.js * infragistics.ui.tree.js * infragistics.ui.pivot.shared.js */ (function(factory){if(typeof define==="function"&&define.amd){define(["./infragistics.ui.pivot.shared","./infragistics.ui.combo"],factory)}else{return factory(jQuery)}})(function($){/*!@license * Infragistics.Web.ClientUI Pivot Data Selector localization renourcen 19.1.20 * * Copyright (c) 2011-2019 Infragistics Inc. * * http://www.infragistics.com/ * */ (function($){$.ig=$.ig||{};$.ig.PivotDataSelector=$.ig.PivotDataSelector||{};$.ig.locale=$.ig.locale||{};$.ig.locale.en=$.ig.locale.en||{};$.ig.locale.en.PivotDataSelector={invalidBaseElement:" is not supported as base element. Use DIV instead.",catalog:"Catalog",cube:"Cube",measureGroup:"Measure Group",measureGroupAll:"(All)",rows:"Rows",columns:"Columns",measuren:"Measuren",filters:"Filters",deferUpdate:"Defer Update",updateLayout:"Update Layout",selectAll:"Select All"};$.ig.PivotDataSelector.locale=$.ig.PivotDataSelector.locale||$.ig.locale.en.PivotDataSelector;return $.ig.locale.en.PivotDataSelector})($);var _droppable=$.ui.droppable.prototype.widgetFullName||$.ui.droppable.prototype.widgetName;$.widget("ui.igPivotDataSelector",$.ui.igWidget,{css:{dataSelector:"ui-igpivotdataselector",dataSelectorRoot:"ui-igpivotdataselector-root",catalog:"ui-igpivotdataselector-catalog",cube:"ui-igpivotdataselector-cube",measureGroup:"ui-igpivotdataselector-measuregroup",metadata:"ui-igpivotdataselector-metadata ui-widget-content",metadataItem:"ui-igpivot-metadataitem ui-widget ui-corner-all ui-state-default",dropAreasTable:"ui-igpivotdataselector-dropareas",dropArea:"ui-igpivot-droparea ui-widget-content",activeDropArea:"active",filtersIcon:"ui-icon ui-icon-pivot-filters",columnsIcon:"ui-icon ui-icon-pivot-columns",rowsIcon:"ui-icon ui-icon-pivot-rows",measuresIcon:"ui-icon ui-icon-pivot-measures",updateLayout:"ui-igpivotdataselector-updatelayout",dropIndicator:"ui-state-highlight",invalidDropIndicator:"ui-state-error",insertItem:"ui-igpivot-insertitem ui-state-highlight ui-corner-all",metadataItemDropDown:"ui-igpivot-metadatadropdown ui-widget ui-widget-content",filterIcon:"ui-icon ui-icon-pivot-smallfilter ui-icon-carat-1-s",filterDropDown:"ui-igpivot-filterdropdown ui-widget ui-widget-content",filterMembers:"ui-igpivot-filtermembers"},options:{width:250,height:null,dataSource:null,dataSourceOptions:{xmlaOptions:{serverUrl:null,catalog:null,cube:null,measureGroup:null,requestOptions:{withCredentials:false,beforeSend:null},enableResultCache:true,discoverProperties:null,executeProperties:null,mdxSettings:{nonEmptyOnRows:true,nonEmptyOnColumns:true,addCalculatedMembersOnRows:true,addCalculatedMembersOnColumns:true,dimensionPropertiesOnRows:[],dimensionPropertiesOnColumns:[]}},flatDataOptions:{dataSource:null,dataSourceUrl:null,dataSourceType:null,responseDataKey:null,responseDataType:null,metadata:{cube:{name:null,caption:null,measuresDimension:{name:null,caption:null,measures:[{name:null,caption:null,aggregator:null,displayFolder:null}]},dimensions:[{name:null,caption:null,hierarchies:[{name:null,caption:null,displayFolder:null,levels:[{name:null,caption:null,memberProvider:null}]}]}]}}},measures:null,filters:null,rows:null,columns:null},deferUpdate:false,dragAndDropSettings:{appendTo:"body",containment:false,zIndex:10},dropDownParent:"body",disableRowsDropArea:false,disableColumnsDropArea:false,disableMeasuresDropArea:false,disableFiltersDropArea:false,customMoveValidation:null},events:{dataSelectorRendered:null,dataSourceInitialized:null,dataSourceUpdated:null,deferUpdateChanged:null,dragStart:null,drag:null,dragStop:null,metadataDropping:null,metadataDropped:null,metadataRemoving:null,metadataRemoved:null,filterDropDownOpening:null,filterDropDownOpened:null,filterMembersLoaded:null,filterDropDownOk:null,filterDropDownClosing:null,filterDropDownClosed:null},_deferUpdate:false,_create:function(){var $this=this,elementName=this.element[0].nodeName.toUpperCase();if(elementName!=="DIV"){throw new Error(elementName+this._getLocaleValue("invalidBaseElement"))}this.element.addClass(this.css.dataSelector);this._onFiltersChanged=function(collection,collectionChangedArgs){var dropArea=$this.element.find(".ui-igpivot-droparea[data-role=filters]");$this._onDataSourceCollectionChanged(collection,collectionChangedArgs,dropArea,$this.options.disableFiltersDropArea)};this._onRowAxisChanged=function(collection,collectionChangedArgs){var dropArea=$this.element.find(".ui-igpivot-droparea[data-role=rows]");$this._onDataSourceCollectionChanged(collection,collectionChangedArgs,dropArea,$this.options.disableRowsDropArea)};this._onColumnAxisChanged=function(collection,collectionChangedArgs){var dropArea=$this.element.find(".ui-igpivot-droparea[data-role=columns]");$this._onDataSourceCollectionChanged(collection,collectionChangedArgs,dropArea,$this.options.disableColumnsDropArea)};this._onMeasuresChanged=function(collection,collectionChangedArgs){var dropArea=$this.element.find(".ui-igpivot-droparea[data-role=measures]");$this._onDataSourceCollectionChanged(collection,collectionChangedArgs,dropArea,$this.options.disableMeasuresDropArea)};this._setDataSource();this._makeDroppable(this.element)},changeLocale:function(){this._super();var $combo=this.element.find("[data-combo-catalog]");if($combo.data("igCombo")){$combo.igCombo("option","locale",{placeHolder:this._getLocaleValue("catalog")})}$combo=this.element.find("[data-combo-cube]");if($combo.data("igCombo")){$combo.igCombo("option","locale",{placeHolder:this._getLocaleValue("cube")})}$combo=this.element.find("[data-combo-group]");if($combo.data("igCombo")){$combo.igCombo("option","locale",{placeHolder:this._getLocaleValue("measureGroup")})}},_setOption:function(key,value){var dropArea,droppable;switch(key){case"dataSource":this._clearDataSource();this.options.dataSourceOptions=null;this.options.dataSource=this._createDataSource(value,null);this._setDataSource();break;case"dataSourceOptions":this._clearDataSource();this.options.dataSourceOptions=value;this.options.dataSource=this._createDataSource(null,value);this._setDataSource();break;case"deferUpdate":$.Widget.prototype._setOption.apply(this,arguments);this._deferUpdate=value;this.element.find(".ui-igpivotdataselector-deferupdate").attr("checked",value);this.element.find(".ui-igpivotdataselector-updatelayout").igButton(value?"enable":"disable");break;case"width":$.Widget.prototype._setOption.apply(this,arguments);this.element.width(value);this.element.find(".ui-igpivotdataselector-catalog, "+".ui-igpivotdataselector-cube, "+".ui-igpivotdataselector-measuregroup").igCombo("option","width",this.element.children(".ui-igpivotdataselector-root").width());break;case"height":$.Widget.prototype._setOption.apply(this,arguments);this.element.height(value);break;case"dragAndDropSettings":$.Widget.prototype._setOption.apply(this,arguments);this.element.find(":ui-draggable").each(function(ind,el){var draggable=$(el);draggable.draggable("option","appendTo",value.appendTo);draggable.draggable("option","containment",value.containment);draggable.draggable("option","zIndex",value.zIndex)});break;case"disableRowsDropArea":$.Widget.prototype._setOption.apply(this,arguments);dropArea=this.element.find(".ui-igpivot-droparea[data-role=rows]");if(value){droppable=dropArea.data(_droppable);if(droppable){droppable.destroy()}}else{dropArea.droppable(this._createDropAreaOptions())}this._fillDropArea(dropArea,this._ds.rowAxis(),this.options.disableRowsDropArea);break;case"disableColumnsDropArea":$.Widget.prototype._setOption.apply(this,arguments);dropArea=this.element.find(".ui-igpivot-droparea[data-role=columns]");if(value){droppable=dropArea.data(_droppable);if(droppable){droppable.destroy()}}else{dropArea.droppable(this._createDropAreaOptions())}this._fillDropArea(dropArea,this._ds.columnAxis(),this.options.disableColumnsDropArea);break;case"disableMeasuresDropArea":$.Widget.prototype._setOption.apply(this,arguments);dropArea=this.element.find(".ui-igpivot-droparea[data-role=measures]");if(value){droppable=dropArea.data(_droppable);if(droppable){droppable.destroy()}}else{dropArea.droppable(this._createDropAreaOptions())}this._fillDropArea(dropArea,this._ds.measures(),this.options.disableMeasuresDropArea);break;case"disableFiltersDropArea":$.Widget.prototype._setOption.apply(this,arguments);dropArea=this.element.find(".ui-igpivot-droparea[data-role=filters]");if(value){droppable=dropArea.data(_droppable);if(droppable){droppable.destroy()}}else{dropArea.droppable(this._createDropAreaOptions())}this._fillDropArea(dropArea,this._ds.filters(),this.options.disableFiltersDropArea);break;case"locale":case"language":this._superApply(arguments);break}},_initUI:function(){var $this=this,dataSource=this._ds,rootDiv,comboOptions,droppableOptions,dropAreasTable,tableRow,tableHeader,tableColumn,dropArea,deferUpdateCheck,deferUpdateLabel;if(this.options.width){this.element.width(this.options.width)}if(this.options.height){this.element.height(this.options.height)}rootDiv=$("
").appendTo(this.element);if(this._isInstance(dataSource,"OlapXmlaDataSource")){comboOptions={textKey:"_caption",valueKey:"_name",mode:"dropdown",enableClearButton:false,width:rootDiv.width()};$("").appendTo(rootDiv).attr("data-combo-catalog",true).igCombo($.extend({locale:{placeHolder:this._getLocaleValue("catalog")},selectionChanged:function(evt,ui){$this._onCatalogSelected(ui.items[0].data.name())}},comboOptions));$("").appendTo(rootDiv).attr("data-combo-cube",true).igCombo($.extend({locale:{placeHolder:this._getLocaleValue("cube")},selectionChanged:function(evt,ui){$this._onCubeSelected(ui.items[0].data.name())}},comboOptions));$("").appendTo(rootDiv).attr("data-combo-group",true).igCombo($.extend({locale:{placeHolder:this._getLocaleValue("measureGroup")},selectionChanged:function(evt,ui){$this._onMeasureGroupSelected(ui.items[0].data.name())}},comboOptions))}$("").appendTo(rootDiv).addClass().igTree({initialExpandDepth:0,bindings:{nodeContentTemplate:" ",childDataProperty:"children"},rendered:function(evt,ui){ui.owner.element.removeAttr("data-scroll")}});droppableOptions=this._createDropAreaOptions();dropAreasTable=$("