@appbaseio/reactivecore
Advanced tools
Comparing version 9.13.1 to 9.13.2
@@ -1,1 +0,1 @@ | ||
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};exports.default=compositeAggsReducer;var _constants=require('../constants');function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}return arr2;}else{return Array.from(arr);}}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}function compositeAggsReducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var action=arguments[1];if(action.type===_constants.UPDATE_COMPOSITE_AGGS){var aggsResponse=Object.values(action.aggregations)&&Object.values(action.aggregations)[0];var fieldName=Object.keys(action.aggregations)[0];if(!aggsResponse)return state;var buckets=aggsResponse.buckets||[];var parsedAggs=buckets.map(function(bucket){var doc_count=bucket.doc_count,key=bucket.key,hitsData=bucket[fieldName];var flatData={};var _source={};if(hitsData&&hitsData.hits){var _hitsData$hits$hits$=hitsData.hits.hits[0];_source=_hitsData$hits$hits$._source;flatData=_objectWithoutProperties(_hitsData$hits$hits$,['_source']);}return _extends({_doc_count:doc_count,_key:typeof key==='string'?key:key[fieldName],top_hits:hitsData},flatData,_source);});return _extends({},state,_defineProperty({},action.component,action.append?[].concat(_toConsumableArray(state[action.component]),_toConsumableArray(parsedAggs)):parsedAggs));}return state;} | ||
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};exports.default=compositeAggsReducer;var _constants=require('../constants');function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i<arr.length;i++){arr2[i]=arr[i];}return arr2;}else{return Array.from(arr);}}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}function compositeAggsReducer(){var state=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var action=arguments[1];if(action.type===_constants.UPDATE_COMPOSITE_AGGS){var aggsResponse=Object.values(action.aggregations)&&Object.values(action.aggregations)[0];var fieldName=Object.keys(action.aggregations)[0];if(!aggsResponse)return state;var buckets=[];if(aggsResponse.buckets&&Array.isArray(aggsResponse.buckets)){buckets=aggsResponse.buckets;}var parsedAggs=buckets.map(function(bucket){var doc_count=bucket.doc_count,key=bucket.key,hitsData=bucket[fieldName];var flatData={};var _source={};if(hitsData&&hitsData.hits){var _hitsData$hits$hits$=hitsData.hits.hits[0];_source=_hitsData$hits$hits$._source;flatData=_objectWithoutProperties(_hitsData$hits$hits$,['_source']);}return _extends({_doc_count:doc_count,_key:typeof key==='string'?key:key[fieldName],top_hits:hitsData},flatData,_source);});return _extends({},state,_defineProperty({},action.component,action.append?[].concat(_toConsumableArray(state[action.component]),_toConsumableArray(parsedAggs)):parsedAggs));}return state;} |
{ | ||
"name": "@appbaseio/reactivecore", | ||
"version": "9.13.1", | ||
"version": "9.13.2", | ||
"description": "Core architecture of reactive UI libraries", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
179308
6