{"templates":{"components/fields/field-list.html":"
\n\t
\n\t\t\n\t\t\n\n\t\t
\n\t\t\t\n\t\t\t{{$ctrl.displayOptions.addButtonLabel}}\n\t\t
\n\t
\n
\n","components/fields/fields.html":"
\n
\n
\n
\n
\n \n\t\t\t\t\n
\n\n
\n \n \n
\n
\n
\n
\n
REMOVE
\n
\n
\n
\n
\n","components/reference-metrics/reference-metrics.html":"
\n\t
\n\t\t\n\t\t\n\t
\n
\n","components/reference-metrics/reference-pop-over.html":"
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t\t\n\t
\n
\n","data-components/aggregate/view.html":"
\n\t
\n\t
\n\t
\n\t
\n\t
\n\t\t\n\t
\n
\n","data-components/records/view.html":"
\n\t
\n\t
\n\t
\n
\n
\n\t
\n\t\t\n\t\t
\n\t\t\t\n\t\t
\n\t
\n
\n","data-components/word-count/stop-word-control.html":"STOP_WORDS","data-components/word-count/stop-word-source.html":"
\n\t
\n\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\tNO_STOPWORDS\n\t\t\t\t\n\t\t\t
\n\t\t\t\n\t\t
\n\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t
\n
","data-components/word-count/view.html":"
\n\t
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t
\n\t
\n\t
\n\t\t
\n\t
\n\t
\n\t\t
\n\t\t\t\n\t\t\t\n\t\t\t
\n\t\t\t
\n\t\t\t\n\t\t
\n\t
\n
"},"js":"!function(e){\"use strict\";function t(e){return{setIncludeBreakoutResponseCounts:function(t){return{type:e.SET_INCLUDE_BREAKOUT_RESPONSE_COUNTS,includeBreakoutResponseCounts:t}}}}t.$inject=[\"reporting.fieldsetComponent.aggregate.actionTypes\"],e.factory(\"reporting.fieldsetComponent.aggregate.actions\",t),e.constant(\"reporting.fieldsetComponent.aggregate.actionTypes\",{SET_INCLUDE_BREAKOUT_RESPONSE_COUNTS:\"SET_INCLUDE_BREAKOUT_RESPONSE_COUNTS\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){function r(r,o){var s=e.defer();if(i(r,o)){var c=r.data.fieldsetId||n.get(\"fieldSetId\");t.containsMisconfiguredMeasures(r.data.measures,r.data.dimensions,c).then(function(e){e?s.reject(d):s.resolve(!0)})}else s.reject(a);return s.promise}function i(e,t){return o(e)&&s(e,t.minDimensions,t.dimensions)}function o(e){return e.data.measures.length>0}function s(e,t,n){_.isNumber(n)||(n=1),_.isNumber(t)||(t=n);var r=e.data.dimensions.length+(e.data.measures.length>1);return r>=t&&n>=r}var a={errorType:\"NEW\",errorMessage:\"WIDGET_STATES.NEW\"},d={errorType:\"MISCONFIGURED\",errorMessage:\"WIDGET_STATES.MISCONFIGURED\"};return r}t.$inject=[\"$q\",\"reporting.fieldsetDataUtils.checkMeasureConfig\",\"rsEnvironment\"],e.factory(\"reporting.fieldsetComponent.aggregate.dataConfigValidator\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n,r,i,o){return function(s,a){return n(s,a).then(function(){var n,d={widgetId:a.widgetId};return n=s.data.referenceMetrics&&s.data.referenceMetrics.length>0?o.getReferenceMetricDataConfig(s.data.referenceMetrics).then(function(e){s.data.referenceMetrics=e}):e.when(),n.then(function(){return t.getAggregateResponseForCube(i.prepDataConfig(s),i.getRequestOption(a.widgetId,s,!0),d).then(function(e){return a.withDataDomain&&(e.domain=r(s.data.measures[0])),e})[\"catch\"](function(){return e.reject({errorType:\"ERROR\",errorMesssage:\"WIDGET_STATES.ERROR\"})})})})}}t.$inject=[\"$q\",\"reporting.fieldsetDecorator.genericFieldsetDecorator\",\"reporting.fieldsetComponent.aggregate.dataConfigValidator\",\"reporting.fieldsetComponent.aggregate.thresholdProvider\",\"reporting.fieldsetComponent.requestHelpers\",\"reporting.fieldsetComponent.components.referenceMetrics.dataHelper\"],e.factory(\"reporting.fieldsetComponent.aggregate.dataRetrieval\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){function n(e){return r[e]}var r={},i=e(\"translate\");return r={0:{measures:{max:1},dimensions:{disable:!0,x:{show:!1},y:{show:!1}},referenceMetrics:{enable:!1}},1:{measures:{max:100},dimensions:{x:{show:!0,label:i(\"DIMENSION\"),max:1},y:{show:!1}},referenceMetrics:{enable:!1}},2:{measures:{max:100},dimensions:{onSwap:_.noop,showSwap:!1,sortable:!1,x:{show:!0,label:i(\"ROWS\"),max:1},y:{show:!0,label:i(\"COLUMNS\"),max:1},removeUsedDimensionsFromAddMenu:!1},referenceMetrics:{enable:!1}}},function(e){var r;return r=n(e.dimensions)||{},r=t(e.type,r),r.withValueDetails=e.withValueDetails===!0,r}}t.$inject=[\"$filter\",\"reporting.fieldsetComponent.aggregate.widgetSpecificConfig\"],e.factory(\"reporting.fieldsetComponent.aggregate.mapWidgetSettings\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n,r,i,o){var s=o(r,\"filters\"),a=o(t,\"measures\"),d=o(i,\"referenceMetrics\");return function(o,c){switch(o=o||{},o.data=o.data||{},o=\"INIT\"===c.type?_.assign({},o,{data:_.assign({},o.data,{measures:t(o.data.measures,c,o),filters:r(o.data.filters,c),referenceMetrics:i(o.data.referenceMetrics,c),requestType:\"aggregate\"})}):_.assign({},o,{data:_.assign({},o.data,{measures:a(o.data.measures,c,o),filters:s(o.data.filters,c),referenceMetrics:d(o.data.referenceMetrics,c),requestType:\"aggregate\"})}),o=n(o,c),c.type){case e.SET_INCLUDE_BREAKOUT_RESPONSE_COUNTS:o=_.assign({},o,{data:_.assign({},o.data,{includeBreakoutResponseCounts:c.includeBreakoutResponseCounts===!0})})}return o}}t.$inject=[\"reporting.fieldsetComponent.aggregate.actionTypes\",\"reporting.measures.measuresReducers\",\"reporting.dimensions.reducers\",\"reporting.filters.filtersReducers\",\"reporting.fieldsetComponent.components.referenceMetrics.reducers\",\"widget.componentBase.createWrappedReducer\"],e.factory(\"reporting.fieldsetComponent.aggregate.reducers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(){return function(e){var t=n.DEFAULT;return n[e.metric]&&(t=n[e.metric]),t.id=e._id+e.field,t}}var n={nps:{min:-100,max:100},pearsonCorrelation:{min:-1,max:1},topBottomBox:{min:0,max:1},DEFAULT:{min:0,max:100}};e.factory(\"reporting.fieldsetComponent.aggregate.thresholdProvider\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){this.$onInit=function(){this.store.connect(_.partialRight(n,t),e,this.widget.status.dataConfigUpdated)(this)}}function n(e,t){return{config:e.dataConfig,widgetSettings:t(e.widgetSettings)}}e.directive(\"reporting.fieldsetComponent.aggregate.view\",[function(){return{templateUrl:\"reporting/fieldset-data-component/templates/data-components/aggregate/view.html\",bindToController:!0,scope:{widget:\"=\",store:\"=\"},controller:\"reporting.fieldsetComponent.aggregate.controller\",controllerAs:\"$ctrl\"}}]),t.$inject=[\"reporting.fieldsetComponent.aggregate.actions\",\"reporting.fieldsetComponent.aggregate.mapWidgetSettings\"],t.prototype.canIncludeBreakoutResponseCounts=function(){if(this.widgetSettings&&this.widgetSettings.withValueDetails){var e=-1!==_.findIndex(this.config.data.dimensions,{type:\"MeasureGroup\"}),t=-1!==_.findIndex(this.config.data.measures,{metric:\"topBottomBox\"});return!(e&&t)}return!1},e.controller(\"reporting.fieldsetComponent.aggregate.controller\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){var n={},r=e(\"translate\");return n[t.PIE]={measures:{enabledMetrics:[\"count\",\"sum\"],max:1,disableFilters:!0}},n[t.GAUGE]={measures:{max:1,disableFilters:!0}},n[t.BREAKDOWNBAR]={measures:{enabledMetrics:[\"count\",\"sum\"],max:1,disableFilters:!0}},n[t.BAR]={dimensions:{defaultValuesRow:!0,showSwap:!0,x:{label:r(\"X_AXIS\"),addLabel:r(\"SET_X_AXIS_DIMENSION\"),removeLabel:r(\"REMOVE\")},y:{label:r(\"DATA_SERIES\"),addLabel:r(\"SET_DATA_SERIES\"),removeLabel:r(\"REMOVE\")}}},function(e,t){return _.merge(t,n[e])}}t.$inject=[\"$filter\",\"widget.componentBase.WIDGET_TYPES\"],e.factory(\"reporting.fieldsetComponent.aggregate.widgetSpecificConfig\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{updateField:function(t,n){return{type:e.UPDATE_FIELD,field:t,index:n}},updateUserLabel:function(t,n){return{type:e.UPDATE_USER_LABEL,label:t,index:n}},addField:function(t){return{type:e.ADD_FIELD,field:t}},removeField:function(t){return{type:e.REMOVE_FIELD,fieldId:t}},reorderField:function(t,n){return{type:e.REORDER_FIELD,startIndex:t,endIndex:n}}}}t.$inject=[\"reporting.fieldsetComponent.components.fields.actionTypes\"],e.factory(\"reporting.fieldsetComponent.components.fields.actions\",t),e.constant(\"reporting.fieldsetComponent.components.fields.actionTypes\",{UPDATE_FIELD:\"FIELDS_DATA_MODEL.UPDATE_FIELD\",UPDATE_USER_LABEL:\"FIELDS_DATA_MODEL.UPDATE_USER_LABEL\",ADD_FIELD:\"FIELDS_DATA_MODEL.ADD_FIELD\",REMOVE_FIELD:\"FIELDS_DATA_MODEL.REMOVE_FIELD\",REORDER_FIELD:\"FIELDS_DATA_MODEL.REORDER_FIELD\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){var i=this;_.defaults(this.displayOptions,r),this.store.connect(n,t,this.widget.status.dataConfigUpdated)(this),this.getFieldLabel=function(e){return e.userLabel||e.label},this.getFieldName=function(e){return e.fieldName},this.menuSortOptions={axis:\"y\",stop:function(e,t){var n=t.item.sortable;i.reorderField(n.index,n.dropindex)}},this.getIcon=e}function n(e){return{fields:e.dataConfig.data.fields}}var r={menuLabel:\"FIELDS\",addButtonLabel:\"ADD_FIELDS\"};e.directive(\"reporting.fieldsetComponent.fieldList\",[function(){return{templateUrl:\"reporting/fieldset-data-component/templates/components/fields/field-list.html\",controller:t,controllerAs:\"$ctrl\",bindToController:!0,scope:{displayOptions:\"<\",getFields:\"&\",store:\"=\",widget:\"=\"}}}]),t.$inject=[\"reporting.fieldsetDataUtils.iconHelper\",\"reporting.fieldsetComponent.components.fields.actions\"]}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){function n(e,t,n){return e.index!==n?t:_.extend({},t,{userLabel:e.label||t.label})}function r(e,t){return _.remove(e,function(e){return e._id!==t})}function i(e,t,n){if(_.isNumber(t)&&_.isNumber(n)){var r=e.slice(0,t),i=e[t];return r=r.concat(e.slice(t+1)),r.splice(n,0,i),r}return e}function o(e,t){return _.isUndefined(e)||_.isUndefined(t)?!1:e.fieldId===t.value}function s(e){var n={_id:t(\"F\"),fieldId:e.value,fieldName:e.label,label:e.label,userLabel:e.label,type:e.type,values:[],valueInfo:{}};return\"DrillDown\"===n.type?n.components=e.components:\"DateTime\"===n.type&&(n.field+=\":week\"),n}return function(t,a){t=t||{},t.data=t.data||{},_.isArray(t.data.fields)||(t.data.fields=[]);var d,c;switch(a.type){case e.UPDATE_FIELD:o(t.data.fields[a.index],a.field)||(c=s(a.field),d=t.data.fields.slice(),d[a.index]=c,t=_.assign({},t,{data:_.assign({},t.data,{fields:d})}));break;case e.UPDATE_USER_LABEL:t.data.fields[a.index]&&(t=_.assign({},t,{data:_.assign({},t.data,{fields:_.map(t.data.fields,_.partial(n,a))})}));break;case e.REMOVE_FIELD:d=t.data.fields.slice(),t=_.assign({},t,{data:_.assign({},t.data,{fields:r(d,a.fieldId)})});break;case e.ADD_FIELD:d=t.data.fields.slice(),d.push(s(a.field)),t=_.assign({},t,{data:_.assign({},t.data,{fields:d})});break;case e.REORDER_FIELD:t=_.assign({},t,{data:_.assign({},t.data,{fields:i(t.data.fields,a.startIndex,a.endIndex)})})}return t}}t.$inject=[\"reporting.fieldsetComponent.components.fields.actionTypes\",\"reporting.fieldsetDataUtils.idGeneratorUtil\"],e.factory(\"reporting.fieldsetComponent.components.fields.reducers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{addReferenceMetric:function(){return{type:e.ADD_REFERENCE_METRIC}},removeReferenceMetric:function(t){return{type:e.REMOVE_REFERENCE_METRIC,referenceMetricId:t}}}}t.$inject=[\"reporting.fieldsetComponent.components.referenceMetrics.actionTypes\"],e.factory(\"reporting.fieldsetComponent.components.referenceMetrics.actions\",t),e.constant(\"reporting.fieldsetComponent.components.referenceMetrics.actionTypes\",{ADD_REFERENCE_METRIC:\"REFERENCE_METRICS_DATA_MODEL.ADD_REFERENCE_METRIC\",REMOVE_REFERENCE_METRIC:\"REFERENCE_METRICS_DATA_MODEL.REMOVE_REFERENCE_METRIC\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"reporting.fieldsetComponent.components.referenceMetrics.configHelpers\",[\"$filter\",\"reporting.fieldsetDataUtils.measuresHelpers\",\"reporting.fieldsetDataUtils.fieldConversion\",\"reporting.fieldsetDataUtils.checkMeasureConfig\",\"reporting.fieldsetComponent.components.referenceMetrics.referenceMetricTypes\",function(e,t,n,r,i){function o(e){return e=e||{},e.customLabelOn?e.customLabel:d(e)}function s(){return{_id:_.uniqueId(\"RM\"),customLabel:\"\",type:i.CONSTANT,color:\"black\",value:0,customLabelOn:!1,measure:n.fieldToMeasure({label:c(\"METRICS.COUNT\"),value:\"_recordId\",type:\"Id\",field:[]})}}function a(e){return r.containsMisconfiguredMeasures([e.measure],[])}function d(e){var n=c(\"CONSTANT\");if(e&&e.type===i.METRIC){var r=_.cloneDeep(e.measure);t.generateMeasureLabel(r),n=r.label}return n}var c=e(\"translate\");return{getLabel:o,generateNewReferenceMetricObject:s,getMisconfigured:a}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.factory(\"reporting.fieldsetComponent.components.referenceMetrics.dataHelper\",[\"$q\",\"reporting.fieldsetDataUtils.customMetrics\",\"reporting.fieldsetComponent.components.referenceMetrics.configHelpers\",\"reporting.fieldsetComponent.components.referenceMetrics.referenceMetricTypes\",function(e,t,n,r){function i(e){return e.type===r.CONSTANT}function o(e,t){return e.type===r.METRIC&&!t&&e.measure}function s(e,t){return o(e,t)||i(e)}return{getReferenceMetricDataConfig:function(t){return 0===t.length?e.when(t):e.all(_.map(t,function(e){return n.getMisconfigured(e)})).then(function(e){var r=[];return _.forEach(t,function(t,i){s(t,e[i])&&r.push(_.assign({},t,{label:n.getLabel(t)}))}),r})},removeOrUpdateCustomMetrics:function(e){_.remove(e,function(e){if(o(e)){var n=e.measure;if(t.isCustomMetric(n)){var r=!!t.updateCustomMetric(n);return!r}}})}}}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n){function r(e){var n=e.slice();return n.push(t.generateNewReferenceMetricObject()),n}function i(e,t){return _.filter(e,function(e){return e._id!==t})}return function(t,o){switch(t=t||[],o.type){case e.ADD_REFERENCE_METRIC:t=r(t);break;case e.REMOVE_REFERENCE_METRIC:t=i(t,o.referenceMetricId);break;default:t=_.map(t,function(e){return n(e,o)})}return t}}t.$inject=[\"reporting.fieldsetComponent.components.referenceMetrics.actionTypes\",\"reporting.fieldsetComponent.components.referenceMetrics.configHelpers\",\"reporting.fieldsetComponent.components.referenceMetric.reducers\"],e.factory(\"reporting.fieldsetComponent.components.referenceMetrics.reducers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.constant(\"reporting.fieldsetComponent.components.referenceMetrics.referenceMetricTypes\",{CONSTANT:\"constant\",METRIC:\"metric\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{updateType:function(t,n){return{type:e.UPDATE_METRIC_TYPE,referenceMetricId:t,metricType:n}},updateUserLabel:function(t,n){return{type:e.UPDATE_USER_LABEL,referenceMetricId:t,label:n}},updateValue:function(t,n){return{type:e.UPDATE_VALUE,referenceMetricId:t,value:n}},updateColor:function(t,n){return{type:e.UPDATE_COLOR,referenceMetricId:t,color:n}}}}t.$inject=[\"reporting.fieldsetComponent.components.referenceMetric.actionTypes\"],e.factory(\"reporting.fieldsetComponent.components.referenceMetric.actions\",t),e.constant(\"reporting.fieldsetComponent.components.referenceMetric.actionTypes\",{UPDATE_METRIC_TYPE:\"REFERENCE_METRIC_DATA_MODEL.UPDATE_METRIC_TYPE\",UPDATE_USER_LABEL:\"REFERENCE_METRIC_DATA_MODEL.UPDATE_USER_LABEL\",UPDATE_VALUE:\"REFERENCE_METRIC_DATA_MODEL.UPDATE_VALUE\",UPDATE_COLOR:\"REFERENCE_METRIC_DATA_MODEL.UPDATE_COLOR\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){function n(e,t){return e._id===t}return function(r,i){switch(r=r||{},i.type){case e.UPDATE_METRIC_TYPE:n(r,i.referenceMetricId)&&(r=_.assign({},r,{type:i.metricType}));break;case e.UPDATE_USER_LABEL:n(r,i.referenceMetricId)&&(r=_.assign({},r,{customLabelOn:!0,customLabel:i.label}));break;case e.UPDATE_VALUE:n(r,i.referenceMetricId)&&(r=_.assign({},r,{value:i.value}));break;case e.UPDATE_COLOR:n(r,i.referenceMetricId)&&(r=_.assign({},r,{color:i.color}));break;default:r=_.assign({},r,{measure:t(r.measure,i)})}return r}}t.$inject=[\"reporting.fieldsetComponent.components.referenceMetric.actionTypes\",\"reporting.measures.measureReducers\"],e.factory(\"reporting.fieldsetComponent.components.referenceMetric.reducers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";var t={menuLabel:\"REFERENCE_LINES\",addButtonLabel:\"ADD_REFERENCE_LINE\",removeButtonLabel:\"REMOVE_LINE\",typeLabel:\"LINE_TYPE\"};e.directive(\"reporting.fieldsetComponent.referenceMetrics\",[function(){return{templateUrl:\"reporting/fieldset-data-component/templates/components/reference-metrics/reference-metrics.html\",controller:\"reporting.fieldsetComponent.referenceMetricsController\",controllerAs:\"$ctrl\",bindToController:!0,scope:{displayOptions:\"<\",store:\"=\",widget:\"=\",widgetSettings:\"<\"}}}]),e.controller(\"reporting.fieldsetComponent.referenceMetricsController\",[\"$filter\",\"reporting.fieldsetComponent.components.referenceMetrics.actions\",\"reporting.fieldsetComponent.components.referenceMetric.actions\",\"reporting.measures.measureActions\",\"reporting.fieldsetComponent.components.referenceMetrics.configHelpers\",\"widget.componentBase.wrapExtendAction\",\"reporting.fieldsetComponent.components.referenceMetrics.referenceMetricTypes\",function(e,n,r,i,o,s,a){function d(e,t){o.getMisconfigured(e).then(function(n){t[e._id]=n})}function c(e){var t={},n={};return _.forEach(e.dataConfig.data.referenceMetrics,function(e){t[e._id]=o.getLabel(e),d(e,n)}),{referenceMetrics:e.dataConfig.data.referenceMetrics,misconfigured:n,labels:t}}var u=e(\"translate\");this.displayOptions=this.displayOptions||{},_.defaults(this.displayOptions,t);var l=s(_.merge({},n,r),{},\"referenceMetrics\"),f=s(i,{},\"referenceMetrics\");this.measureActions={},this.store.connect(c,l,this.widget.status.dataConfigUpdated)(this),this.store.bindActions(f,this.widget.status.dataConfigUpdated)(this.measureActions),angular.extend(this,{getReferenceMetricsTypes:function(){return[{label:u(\"BASED_ON_VALUE\"),value:a.CONSTANT},{label:u(\"BASED_ON_METRIC\"),value:a.METRIC}]},getLabelFromType:function(e){return _.find(this.getReferenceMetricsTypes(),function(t){return t.value===e}).label},getExistingMeasureGroup:function(){return null},isMetricType:function(e){return e.type===a.METRIC},isConstantType:function(e){return e.type===a.CONSTANT}})}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{updateRecordLimit:function(t){return{type:e.UPDATE_RECORD_LIMIT,limit:t}}}}t.$inject=[\"reporting.fieldsetComponent.records.actionTypes\"],e.factory(\"reporting.fieldsetComponent.records.actions\",t),e.constant(\"reporting.fieldsetComponent.records.actionTypes\",{UPDATE_RECORD_LIMIT:\"UPDATE_RECORD_LIMIT\"})}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){function t(t){var r=e.defer();return n(t)?r.resolve(!0):r.reject(i),r.promise}function n(e){return r(e)}function r(e){return e.data.fields.length>0}var i={errorType:\"NEW\",errorMessage:\"WIDGET_STATES.NEW\"};return t}t.$inject=[\"$q\"],e.factory(\"reporting.fieldsetComponent.records.dataConfigValidator\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,r,i,o){return function(s,a){return i(s).then(function(){var i=o.getRequestOption(a.widgetId,s),d={widgetId:a.widgetId},c=s.data.fieldsetId||t.get(\"fieldSetId\");return r.getRecordsResponseForGrid(c,_.merge(i,n(a.widgetId,s)),d)[\"catch\"](function(){return e.reject({errorType:\"ERROR\",errorMesssage:\"WIDGET_STATES.ERROR\"})})})}}function n(e,t){var n,s=t.data.fields,a=_.filter(t.data.filters,function(e){return e.filter});return n={limit:t.data.limit||o,filters:a,offset:t.data.offset||0,fields:s.concat(_.map(i,r)),useCache:!1},t.data.sortField&&t.data.sortOrder&&(n.sort={field:t.data.sortField,order:t.data.sortOrder}),n}function r(e){return{label:e,fieldId:e,hidden:!0}}var i=[\"_recordId\",\"_sourceId\"],o=10;t.$inject=[\"$q\",\"rsEnvironment\",\"reporting.fieldsetDecorator.genericFieldsetDecorator\",\"reporting.fieldsetComponent.records.dataConfigValidator\",\"reporting.fieldsetComponent.requestHelpers\"],e.factory(\"reporting.fieldsetComponent.records.dataRetrieval\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,i,o){return{getFields:function(s,a){var d={};_.each(n,function(e,t){d[t]=[]});var c=e.get(\"fieldSetId\");return t.getFields(c).then(function(e){return _.each(e,function(e,t){var n=e.type;if(\"Id\"===n)return void(\"_sourceMapId\"===t&&d[n].push(o.getSourceMapObject()));if(d[n]&&!r.includes(t)){var i={label:e.name,value:t,type:e.type};\"DrillDown\"===e.type&&(i.components=e.components),d[n].push(i)}}),i.getDimensionsForMenu({dimensionTypeMap:n,types:d,configDimensions:s,opt_currDimension:a,opt_removeUsedDimensionsFromAddMenu:!1})})}}}var n={EnumerableValue:\"Text\",EnumerableValueSet:\"Text\",EnumerableScalarValue:\"Number\",DateTime:\"Date\",DrillDown:\"DrillDown\",MeasureGroup:\"Field Group\",Id:\"Text\"},r=[\"_cachedDate\"];t.$inject=[\"rsEnvironment\",\"reporting.fieldsetDataUtils.fieldsetService\",\"reporting.fieldsetDataUtils.dimensionsHelpers\",\"reporting.filters.pseudoSourceMapHelper\"],e.factory(\"reporting.fieldsetComponent.records.FieldsHelper\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,r){return function(i,o){switch(i||(i={}),i.data||(i.data={}),i.data.limit||(i.data.limit=n),i=_.assign({},i,{data:_.assign({},i.data,{filters:r(i.data.filters,o)})}),i=t(i,o),o.type){case e.UPDATE_RECORD_LIMIT:_.isNumber(o.limit)&&(i=_.assign({},i,{data:_.assign({},i.data,{limit:o.limit})}))}return i}}var n=10;t.$inject=[\"reporting.fieldsetComponent.records.actionTypes\",\"reporting.fieldsetComponent.components.fields.reducers\",\"reporting.filters.filtersReducers\"],e.factory(\"reporting.fieldsetComponent.records.reducers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{filters:e.dataConfig.data.filters,nPerPage:e.dataConfig.data.limit}}var n={menuLabel:\"COLUMNS\",addButtonLabel:\"ADD_COLUMNS\",maxCount:100},r=[1,5,10,25];e.directive(\"reporting.fieldsetComponent.records.view\",[function(){return{templateUrl:\"reporting/fieldset-data-component/templates/data-components/records/view.html\",bindToController:!0,scope:{widget:\"=\",store:\"=\"},controller:\"reporting.fieldsetComponent.records.controller\",controllerAs:\"$ctrl\"}}]),e.controller(\"reporting.fieldsetComponent.records.controller\",[\"reporting.fieldsetComponent.records.FieldsHelper\",\"reporting.fieldsetComponent.records.actions\",function(e,i){var o=this;this.displayOptions=n,this.store.connect(t,i,this.widget.status.dataConfigUpdated)(this),this.getFields=function(t){return e.getFields(o.fields,t)},this.nPerPageOptions=r}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";window.__karma__&&(e.execute=_.noop),e.execute([\"widget.componentBase.dataComponentManager\",function(e){e.registerDataComponent({type:\"reporting-aggregate-data-component\",name:\"Reporting Aggregate Data Component\",directive:\"reporting.fieldsetComponent.aggregate.view\",reducer:\"reporting.fieldsetComponent.aggregate.reducers\",shape:\"DATA_CUBE\",getData:\"reporting.fieldsetComponent.aggregate.dataRetrieval\",preProcessors:\"reporting.fieldsetComponent.initConfig\"}),e.registerDataComponent({type:\"reporting-word-count-data-component\",name:\"Reporting Word Count Data Component\",directive:\"reporting.fieldsetComponent.wordCount.view\",reducer:\"reporting.fieldsetComponent.wordCount.reducers\",shape:\"DATA_CUBE\",getData:\"reporting.fieldsetComponent.wordCount.dataRetrieval\",preProcessors:\"reporting.fieldsetComponent.initConfig\"}),e.registerDataComponent({type:\"reporting-records-data-component\",name:\"Reporting Records Data Component\",directive:\"reporting.fieldsetComponent.records.view\",reducer:\"reporting.fieldsetComponent.records.reducers\",shape:\"DATA_GRID\",getData:\"reporting.fieldsetComponent.records.dataRetrieval\",preProcessors:\"reporting.fieldsetComponent.initConfig\"})}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,n,r,i,o,s,a,d){function c(e,n){var r=t.get(\"widgetFilterOverrides\");return e&&e.data&&r&&r[n]&&(e.data.filters=r[n]),e}function u(e){var t=e&&e.data&&e.data.filters||[];return n.setUserAttributeFilterValues(t).then(function(){return e})}function l(e){return p(e),f(e),e}function f(e){e.data&&(i(e),e.data.filters&&s(e.data.filters,e.data.fieldsetId),e.data.measures&&o.updateWidgetCustomMetrics(e.data.measures),r.regenerateMeasureLabel(e))}function p(e){var t;return t=d.addTitleTranslation(e),d.addLabelTranslation(e)||t}function g(e){return a.waitToLoad().then(function(){return e})}return function(t,n,r){return e.when(c(t,r.widgetId)).then(u).then(l).then(g)}}t.$inject=[\"$q\",\"rsEnvironment\",\"reporting.filters.defaultFilter.service\",\"reporting.fieldsetDataUtils.measuresHelpers\",\"reporting.fieldsetDataUtils.fixFieldsetConfig\",\"reporting.fieldsetDataUtils.customMetrics\",\"reporting.filters.fixFilterTypes\",\"dcWidgetLoad\",\"reporting.fieldsetDataUtils.translationService\"],e.factory(\"reporting.fieldsetComponent.initConfig\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t){return{prepDataConfig:function(t){return t.data.fieldsetId=t.data.fieldsetId||e.get(\"fieldSetId\"),t.data},getRequestOption:function(e,n,r){var i={requestTag:e+\"_\"+n.type,includeMeta:!!r,responseCountThreshold:t.getResponseCountThreshold(n)};return i}}}t.$inject=[\"rsEnvironment\",\"reporting.fieldsetDataUtils.responseCountThreshold\"],e.factory(\"reporting.fieldsetComponent.requestHelpers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){function t(t){var r=e.defer();return n(t)?r.resolve(!0):r.reject(i),r.promise}function n(e){return r(e)}function r(e){return e.data.fields.length>0}var i={errorType:\"NEW\",errorMessage:\"WIDGET_STATES.NEW\"};return t}t.$inject=[\"$q\"],e.factory(\"reporting.fieldsetComponent.wordCount.dataConfigValidator\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,r,i){function o(e,t){var r=i.getRequestOption(e,t,!0);return t.data.wordCountConfig.wordLimit&&(r.limit=t.data.wordCountConfig.wordLimit),t.data.wordCountConfig.stopWords&&(r.stopwords=t.data.wordCountConfig.stopWords),r.defaultLanguageCodes=n,r}return function(n,s){return r(n).then(function(){return t.getWordCountResponseForCube(i.prepDataConfig(n),o(s.widgetId,n),{widgetId:s.widgetId})[\"catch\"](function(){return e.reject({errorType:\"ERROR\",errorMesssage:\"WIDGET_STATES.ERROR\"})})})}}var n=[\"da\",\"nl\",\"en\",\"fi\",\"fr\",\"de\",\"hu\",\"it\",\"no\",\"pt\",\"ro\",\"ru\",\"es\",\"sv\",\"tr\"];t.$inject=[\"$q\",\"reporting.fieldsetDecorator.genericFieldsetDecorator\",\"reporting.fieldsetComponent.wordCount.dataConfigValidator\",\"reporting.fieldsetComponent.requestHelpers\"],e.factory(\"reporting.fieldsetComponent.wordCount.dataRetrieval\",t)}(angular.module(\"ripsaw.widgets\")),angular.module(\"ripsaw.widgets\").directive(\"ngEnter\",function(){return function(e,t,n){t.bind(\"keydown keypress\",function(t){13===t.which&&(e.$apply(function(){e.$eval(n.ngEnter)}),t.preventDefault())})}}),function(e){e.directive(\"reporting.fieldsetComponent.wordCount.stopWordControl\",[function(){return{templateUrl:\"reporting/fieldset-data-component/templates/data-components/word-count/stop-word-control.html\",bindToController:!0,scope:{stopWords:\"<\",updateStopWords:\"<\"},controller:\"reporting.fieldsetComponent.wordCount.stopWordControlController\",controllerAs:\"$ctrl\"}}]),e.controller(\"reporting.fieldsetComponent.wordCount.stopWordControlController\",[\"$timeout\",function(e){var t=/\\s+/g;angular.extend(this,{control:{editingStopWords:!1,textAreaInput:\"\"},deleteLabel:function(e){this.updateStopWords(_.without(this.stopWords,e))},editStopWords:function(t){var n=$(t.target),r=n.closest(\".popover-content\");this.control.textAreaInput=(this.stopWords||[]).join(\", \"),this.control.editingStopWords=!0,e(function(){r.find(\"textarea.form-control\").focus()})},finishEditStopWords:function(e){this.control.editingStopWords=!1,e&&(this.control.textAreaInput=this.control.textAreaInput.replace(t,\"\"),0===this.control.textAreaInput.length?this.updateStopWords([]):this.updateStopWords(_.uniq(this.control.textAreaInput.split(\",\"))))}})}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e,t,r){return function(i,o){switch(i=i||{},i.data=i.data||{},i.data.requestType=\"wordCount\",i.data.wordCountConfig=i.data.wordCountConfig||{},i=_.assign({},i,{data:_.assign({},i.data,{filters:r(i.data.filters,o)})}),i=t(i,o),o.type){case\"INIT\":if(!i.data.wordCountConfig.wordLimit||!i.data.wordCountConfig.stopWords){var s=_.cloneDeep(i.data.wordCountConfig);s.wordLimit=s.wordLimit||n.WORD_LIMIT,s.stopWords=s.stopWords||n.STOP_WORDS,i=_.assign({},i,{data:_.assign({},i.data,{wordCountConfig:s})})}break;case e.UPDATE_WORD_LIMIT:i.data.wordCountConfig.wordLimit!==o.limit&&(i=_.assign({},i,{data:_.assign({},i.data,{wordCountConfig:_.assign({},i.data.wordCountConfig,{wordLimit:o.limit})})}));break;case e.UPDATE_STOP_WORDS:_.isEqual(i.data.wordCountConfig.stopWords,o.stopWords)||(i=_.assign({},i,{data:_.assign({},i.data,{wordCountConfig:_.assign({},i.data.wordCountConfig,{stopWords:o.stopWords})})}))}return i}}var n={WORD_LIMIT:100,STOP_WORDS:[\"a\",\"the\"]};t.$inject=[\"reporting.fieldsetComponent.wordCount.actionTypes\",\"reporting.fieldsetComponent.components.fields.reducers\",\"reporting.filters.filtersReducers\"],e.factory(\"reporting.fieldsetComponent.wordCount.reducers\",t)}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";e.directive(\"reporting.fieldsetComponent.wordCount.view\",[function(){return{templateUrl:\"reporting/fieldset-data-component/templates/data-components/word-count/view.html\",bindToController:!0,scope:{widget:\"=\",store:\"=\"},controller:\"reporting.fieldsetComponent.wordCount.viewController\",controllerAs:\"$ctrl\"}}]),e.controller(\"reporting.fieldsetComponent.wordCount.viewController\",[\"$filter\",\"rsEnvironment\",\"reporting.fieldsetDataUtils.fieldsetService\",\"reporting.fieldsetComponent.components.fields.actions\",\"reporting.fieldsetComponent.wordCount.actions\",function(e,t,n,r,i){function o(e){return{filters:e.dataConfig.data.filters,field:e.dataConfig.data.fields[0],wordCountConfig:e.dataConfig.data.wordCountConfig}}function s(){var e=this;return n.getFields(f).then(function(t){var n=[];return _.forEach(t,function(t,r){\"FreeFormText\"===t.type&&n.push({value:r,type:\"FreeFormText\",label:t.name,selected:!(!e.fields||!e.fields[0]||e.fields[0].fieldId!==r)})}),n})}function a(){return!!this.field}function d(){var e=this.field&&this.field.label||u(\"SELECT_SOURCE\");return c(e)}function c(e){return e.length>l.maxFieldsButtonLength?e.substring(0,l.maxFieldsButtonLength-3)+\"...\":e}var u=e(\"translate\"),l={menuLabel:\"TEXT_SOURCE\",localizedStrings:{emptyText:u(\"NO_ITEMS_TO_DISPLAY\")},maxFieldsButtonLength:20};this.store.connect(o,_.merge(r,i),this.widget.status.dataConfigUpdated)(this),angular.extend(this,{displayOptions:l,getFields:s,getButtonLabel:d,fieldIsSet:a});var f=t.get(\"fieldSetId\")}])}(angular.module(\"ripsaw.widgets\")),function(e){\"use strict\";function t(e){return{updateWordLimit:function(t){return{type:e.UPDATE_WORD_LIMIT,limit:t}},updateStopWords:function(t){return{type:e.UPDATE_STOP_WORDS,stopWords:t}}}}t.$inject=[\"reporting.fieldsetComponent.wordCount.actionTypes\"],e.factory(\"reporting.fieldsetComponent.wordCount.actions\",t),e.constant(\"reporting.fieldsetComponent.wordCount.actionTypes\",{UPDATE_WORD_LIMIT:\"WORDCOUNT_DATA_COMPONENT.UPDATE_WORD_LIMIT\",UPDATE_STOP_WORDS:\"WORDCOUNT_DATA_COMPONENT.UPDATE_STOP_WORDS\"})}(angular.module(\"ripsaw.widgets\"));\n//# sourceMappingURL=fieldset-data-component.min.js.map","css":".label-toggle,.stop-word-link:hover{cursor:pointer}.widget-sidebar-group .field-button{background-color:#EFF1F6;border:none;color:#4E6158;padding:0}.widget-sidebar-group .field-button i.icon{font-size:1.2em;vertical-align:middle;color:#bbb}.widget-sidebar-group .field-button:hover{background-color:#DfE6EB}.widget-sidebar-group .field-list .checkbox-group li:not(:first-child){margin-top:4px}.widget-sidebar-group .field-list .checkbox-group{margin-left:-13px}.widget-sidebar-group .field-list .checkbox-group li{padding-left:0}.widget-sidebar-group .field-list .checkbox-group li .btn{margin-left:13px}.widget-sidebar-group .add-field-button{border-style:dashed;background-color:transparent;max-width:210px;padding-right:13px;height:auto;margin-top:16px}.reference-metrics .value-list{list-style:none;padding:0}.reference-metrics .value-list .value-node{position:relative;padding:0 23px;margin:0 -23px 4px}.reference-metrics .value-list .input-inline{width:160px}.reference-metrics .value-list .reference-config-btn{margin-left:0;max-width:170px;background-color:#DFEBE6;border-color:#DFEBE6}.reference-metrics .value-list .add-reference-button{border-style:dashed;background-color:transparent;padding-right:13px;height:auto}.reference-metrics .color-swatch{width:8px;height:14px;display:inline-block;margin:-3px 0 -3px -4px;border-radius:2px}.reference-metrics .reference-line-swatch{vertical-align:top;margin-top:10px}.label-toggle{display:inline-block;padding:3px 5px;margin:3px 0 0 3px;color:#999;font-weight:400;text-decoration:none;background:#E4E4E4;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.label-toggle .icon-x-sm{position:relative;top:5px;margin:-5px}.textbox-container{position:relative;min-height:200px;width:300px;padding:4px 8px 0}.textbox-container .form-control{position:absolute;top:4px;bottom:8px;left:8px;width:286px;min-height:186px;resize:none}.textbox-container .no-stopwords{position:absolute;top:90px;right:0;left:0;text-align:center;color:#A4A4A4}.button-area{padding:8px 8px 4px;border-top:1px solid #CCC;overflow:hidden}.button-area .btn{float:right;margin-left:8px}.invisible{visibility:hidden}","lang":{}}