{"templates":{"widget-body.html":"
\n","widget-options-footer.html":"\n","widget-options.html":""},"js":"!function(t){\"use strict\";t.constant(\"reporting.productBase.actionTypes\",{SET_TITLE_TEXT:\"SET_TITLE_TEXT\",SET_TITLE_ALIGN:\"SET_TITLE_ALIGN\",SET_DESCRIPTION_TEXT:\"SET_DESCRIPTION_TEXT\",SET_SUBTITLE_TEXT:\"SET_SUBTITLE_TEXT\",SET_SHOW_RESPONSE_COUNT:\"SET_SHOW_RESPONSE_COUNT\",SET_INTERACTION_TYPE:\"SET_INTERACTION_TYPE\"})}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.factory(\"reporting.productBase.actions\",[\"reporting.productBase.actionTypes\",function(t){function e(e){return{type:t.SET_TITLE_TEXT,text:e}}function n(e){return{type:t.SET_TITLE_ALIGN,align:e}}function r(e){return{type:t.SET_DESCRIPTION_TEXT,text:e}}function i(e){return{type:t.SET_SUBTITLE_TEXT,text:e}}function o(e){return{type:t.SET_SHOW_RESPONSE_COUNT,showResponseCount:e}}function a(e){return{type:t.SET_INTERACTION_TYPE,interactionType:e}}return{setTitleText:e,setTitleAlign:n,setDescriptionText:r,setSubtitleText:i,setShowResponseCount:o,setInteractionType:a}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.factory(\"reporting.productBase.dataComponentSelector\",[\"widget.componentBase.WIDGET_TYPES\",\"reporting.productBase.dataComponentTypes\",function(t,e){return function(n,r){var i=e.AGGREGATE_DATA_COMPONENT;return n.type===t.WORD_CLOUD?i=e.WORD_COUNT_DATA_COMPONENT:\"DATA_GRID\"===n.shape&&(i=e.RECORDS_DATA_COMPONENT),_.find(r,function(t){return t.type===i})||r[0]}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.constant(\"reporting.productBase.dataComponentTypes\",{WORD_COUNT_DATA_COMPONENT:\"reporting-word-count-data-component\",AGGREGATE_DATA_COMPONENT:\"reporting-aggregate-data-component\",RECORDS_DATA_COMPONENT:\"reporting-records-data-component\"})}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";function e(t,e){function n(t){var e=t&&t.data&&t.data.fields&&t.data.fields[0];return e&&(e.field=e.fieldId),e}function r(t){var r;return r=t.type===e.WORD_COUNT_DATA_COMPONENT?n(t):t&&t.data&&t.data.dimensions&&t.data.dimensions[0]}function i(t){return t&&t.data&&t.data.filters}return function(e,n,o){var a=r(n),s=i(n);t.modifyFilterByValue(a,o,s)}}e.$inject=[\"reporting.widgetBase.modifyPageFiltersService\",\"reporting.productBase.dataComponentTypes\"],t.factory(\"reporting.productBase.widgetBase.interactionHandler\",e)}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.execute([\"widget.componentBase.override\",\"qstrap.swatchService\",function(t,e){var n={};t.set(t.OVERRIDES.GET_COLOR_PALETTE,function(){return{group:\"custom\",name:\"customDefault\",startIndex:0,isReversed:!1}}),t.set(t.OVERRIDES.GET_CUSTOM_COLOR_PALETTES,function(){return n.customDefault=e.get(),n})}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";function e(t,e,n){function r(t,e){_.forEach(t,function(t,e){t._id=e});var n=_.groupBy(t,function(t){return t.type}),r=[];return _.forEach(e,function(t){r=r.concat(n[t]||[])}),_.sample(r)}function i(){var t=e.get(\"fieldsetDef\");return t?n.fieldToMeasure(r(t.fields,[\"EnumerableScalarValue\",\"ScalarValue\"])):n.fieldToMeasure(u)}function o(){var t=e.get(\"fieldsetDef\");return t?n.fieldToDimension(r(t.fields,[\"EnumerableValueSet\",\"EnumerableValue\"]),\"Row\"):{}}function a(t){return{title:{text:t||\"\"}}}var s=t(\"translate\"),u={value:\"_recordId\",type:\"Id\",label:s(\"COUNT\")};return{getMeasure:i,getDimension:o,getTitle:a}}e.$inject=[\"$filter\",\"rsEnvironment\",\"reporting.widgetBase.options.fieldConversion\"],t.factory(\"reporting.productBase.automaticWidgetGenerationHelper\",e)}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";function e(t,e,n){function r(){var t=e.getMeasure();return{dataConfig:{type:n.AGGREGATE_DATA_COMPONENT,data:{measures:[t],dimensions:[],filters:[]}},productConfig:e.getTitle(t.label)}}function i(){var t=e.getMeasure(),r=e.getDimension();return{dataConfig:{type:n.AGGREGATE_DATA_COMPONENT,data:{measures:[t],dimensions:[r],filters:[]}},productConfig:e.getTitle(t.label)}}function o(t){return 0===t.dimensions?r():i()}return function(e,n,r){var i;return t.shouldPreconfigure(r.widgetId)&&(\"DATA_CUBE\"===n.shape&&(i=o(n)),t.clearPreconfiguration(r.widgetId)),i}}e.$inject=[\"dcWidgetPreconfiguration\",\"reporting.productBase.automaticWidgetGenerationHelper\",\"reporting.productBase.dataComponentTypes\"],t.factory(\"reporting.productBase.widgetPreconfiguration\",e)}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.factory(\"reporting.productBase.reducers\",[\"reporting.productBase.actionTypes\",function(t){return function(e,n){switch(e=e||{},e.title=e.title||{},e.subtitle=e.subtitle||{},e.description=e.description||{},e.interactionType=e.interactionType||\"ADD_PAGE_FILTER\",n.type){case t.SET_TITLE_TEXT:e.title.text=n.text;break;case t.SET_TITLE_ALIGN:e.title.align=n.align;break;case t.SET_DESCRIPTION_TEXT:e.description.text=n.text;break;case t.SET_SUBTITLE_TEXT:e.subtitle.text=n.text;break;case t.SET_SHOW_RESPONSE_COUNT:e.showResponseCount=!!n.showResponseCount;break;case t.SET_INTERACTION_TYPE:e.interactionType=n.interactionType}return e}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.execute([\"widget.componentBase.productComponentManager\",function(t){t.registerProductComponent({name:\"Reporting Product Wrapper\",view:\"reporting.productBase.widgetBody\",configView:\"reporting.productBase.widgetOptions\",configFooterView:\"reporting.productBase.widgetOptionsFooter\",reducer:\"reporting.productBase.reducers\",dataComponentSelector:\"reporting.productBase.dataComponentSelector\",widgetPreconfiguration:\"reporting.productBase.widgetPreconfiguration\"})}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";var e=\".widget\";t.factory(\"reporting.productBase.widgetBase.bootstrap\",[\"reporting.widgetBase.widgetFactory\",\"reporting.widgetBase.scrollService\",\"reporting.widgetBase.utils\",\"reporting.productBase.actions\",\"reporting.productBase.widgetBase.statusMapper\",\"reporting.productBase.widgetBase.widgetOptions.isFieldsetWidget\",\"reporting.productBase.widgetBase.widgetOptions.disableScrollbars\",\"dashboards.api.events.EventManager\",function(t,n,r,i,o,a,s,u){function d(t){var e=_.merge(t.dataConfig,{options:t.productConfig});return{config:e,widgetSettings:t.widgetSettings}}function c(e,n,r){var i=t.fieldsetWidget;return a(n)||(i=t.baseWidget),i(e,r)}return function(t,a){var p=t.widget;p.store.connect(d,i,_.bind(p.saveConfiguration,p))(t);var g=t.widgetSettings.type,T={disableScrollBars:s(g),disableAutoSaveOnLeavingEditMode:!0,dontAddWidgetToScope:!0,exports:{getDSVData:p.dataExportService.getDataExporter()}},l=c(t,g,T),f=new u(p.widgetId);o(p,l,f),T.disableScrollBars&&n.hideScrollbars(a,e),angular.extend(t,{widgetBaseWidget:l}),a.on(\"$destroy\",function(){l.events.trigger(\"unload\"),l.events=null,r.cleanUp(t,a)})}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.factory(\"reporting.productBase.widgetBase.statusMapper\",[\"widget.componentBase.status\",function(t){return function(e,n,r){e.store.observe(\"status\",function(e){switch(e){case t.COMPLETED:n.status.setOk();break;case t.RENDERING:n.status.setRendering();break;case t.FETCHING_DATA:n.status.setLoading()}}),r.on(\"ripsaw.widgets.\"+e.widgetId+\".pageFiltersChanged\",e.status.dataConfigUpdated),n.on(\"resize\",e.status.resized)}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.factory(\"reporting.productBase.widgetBase.widgetOptions.disableScrollbars\",[\"widget.componentBase.WIDGET_TYPES\",function(t){var e=[t.PIE,t.BREAKDOWNBAR,t.GAUGE,t.WORD_CLOUD];return function(t){return-1!==e.indexOf(t)}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.factory(\"reporting.productBase.widgetBase.widgetOptions.isFieldsetWidget\",[\"widget.componentBase.WIDGET_TYPES\",function(t){var e=[t.PIE,t.BREAKDOWNBAR,t.GAUGE];return function(t){return-1!==e.indexOf(t)}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";function e(t){return{showInteractionMenu:t.widgetSettings.supportsInteractions,interactionType:t.productConfig.interactionType,widgetType:t.widgetSettings.type,dataConfig:t.dataConfig,dataProperties:t.data.dataProperties}}t.directive(\"reporting.productBase.widgetBody\",[\"reporting.productBase.widgetBase.bootstrap\",\"reporting.productBase.widgetBase.interactionHandler\",function(t,n){return{restrict:\"A\",templateUrl:\"reporting/product-base-component/templates/widget-body.html\",link:function(r,i){function o(){r.info&&r.info.widgetOptions&&_.merge(r.info.widgetOptions,r.dataProperties)}r.store.connect(e,{})(r),t(r,i),r.showInteractionMenu?r.widget.interactions.elementClicked.addListener(function(t){\"NONE\"!==r.interactionType&&n(r.widgetType,r.dataConfig,t.label)}):r.widget.interactions.elementClicked.remove(),r.widget.onDataConfigUpdated(function(){r.widgetBaseWidget.events.trigger(\"updateResponseCount\")}),r.widget.onDataLoaded(o)}}}])}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";function e(){return{templateUrl:\"reporting/product-base-component/templates/widget-options-footer.html\",controller:n,controllerAs:\"$ctrl\"}}function n(t,e){t.store.connect(r,e,_.bind(t.widget.saveConfiguration,t.widget))(this),this.onChange=function(t){this.setInteractionType(t.value)}}function r(t){return{showInteractionMenu:t.widgetSettings.supportsInteractions,interactionType:t.productConfig.interactionType}}n.$inject=[\"$scope\",\"reporting.productBase.actions\"],t.directive(\"reporting.productBase.widgetOptionsFooter\",e)}(angular.module(\"ripsaw.widgets\")),function(t){\"use strict\";t.directive(\"reporting.productBase.widgetOptions\",[function(){return{restrict:\"A\",templateUrl:\"reporting/product-base-component/templates/widget-options.html\"}}])}(angular.module(\"ripsaw.widgets\"));\n//# sourceMappingURL=product-base-component.min.js.map","css":".widget-container .widget .product-view-component .widget-header{padding:0 0 8px}.view-body{padding-top:12px}","lang":{}}