Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@appbaseio/reactivecore

Package Overview
Dependencies
Maintainers
6
Versions
289
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appbaseio/reactivecore - npm Package Compare versions

Comparing version 9.14.7 to 9.14.8

2

lib/actions/value.js

@@ -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.setValue=setValue;exports.resetValuesToDefault=resetValuesToDefault;exports.setInternalValue=setInternalValue;exports.patchValue=patchValue;exports.clearValues=clearValues;var _constants=require('../utils/constants');var _helper=require('../utils/helper');var _constants2=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 setValue(component,value,label,showFilter,URLParams,componentType,category,meta,updateSource){return function(dispatch,getState){var _getState=getState(),urlValues=_getState.urlValues,selectedValues=_getState.selectedValues,watchMan=_getState.watchMan,props=_getState.props;var reference=updateSource;if((0,_helper.isEqual)(urlValues[component],value)){reference='URL';}var componentsToReset={};var isResultComponent=[_constants.componentTypes.reactiveList,_constants.componentTypes.reactiveMap].includes(props[component].componentType);var previousValue=selectedValues[component]&&selectedValues[component].value;if(!(0,_helper.isEqual)(previousValue,value)&&props[component]&&!isResultComponent){var componentList=[component];var watchList=watchMan[component]||[];componentList=[].concat(_toConsumableArray(componentList),_toConsumableArray(watchList));componentList.forEach(function(comp){var componentProps=props[comp];if(reference!=='URL'&&componentProps&&[_constants.componentTypes.reactiveList,_constants.componentTypes.reactiveMap].includes(componentProps.componentType)){if(selectedValues[comp]!==null){componentsToReset[comp]=null;}}});}if(isResultComponent){if(value<2&&(!previousValue||previousValue<2)){return;}}dispatch({type:_constants2.SET_VALUE,component:component,reference:reference,value:value,label:label,showFilter:showFilter,URLParams:URLParams,componentType:componentType,category:category,meta:meta,componentsToReset:componentsToReset});};}function resetValuesToDefault(clearAllBlacklistComponents){return function(dispatch,getState){var _getState2=getState(),selectedValues=_getState2.selectedValues,componentProps=_getState2.props;var defaultValues={};var valueToSet=void 0;Object.keys(selectedValues).forEach(function(component){if(!(Array.isArray(clearAllBlacklistComponents)&&clearAllBlacklistComponents.includes(component))){if(!componentProps[component]||!componentProps[component].componentType||!componentProps[component].defaultValue){valueToSet=null;}else if([_constants.componentTypes.rangeSlider,_constants.componentTypes.rangeInput,_constants.componentTypes.ratingsFilter,_constants.componentTypes.dateRange].includes(componentProps[component].componentType)){valueToSet=typeof componentProps[component].defaultValue==='object'?[componentProps[component].defaultValue.start,componentProps[component].defaultValue.end]:null;}else if([_constants.componentTypes.multiDropdownList,_constants.componentTypes.multiDataList,_constants.componentTypes.multiList,_constants.componentTypes.singleDataList,_constants.componentTypes.singleDropdownList,_constants.componentTypes.singleList,_constants.componentTypes.tagCloud,_constants.componentTypes.toggleButton,_constants.componentTypes.multiDropdownRange,_constants.componentTypes.multiRange,_constants.componentTypes.singleDropdownRange,_constants.componentTypes.singleRange,_constants.componentTypes.dataSearch,_constants.componentTypes.datePicker].includes(componentProps[component].componentType)){valueToSet=componentProps[component].defaultValue;}else if([_constants.componentTypes.categorySearch].includes(componentProps[component].componentType)){valueToSet=componentProps[component].defaultValue?componentProps[component].defaultValue.term:'';}if(!(0,_helper.isEqual)(selectedValues[component].value,valueToSet)){defaultValues=_extends({},defaultValues,_defineProperty({},component,_extends({},selectedValues[component],{value:valueToSet})));}}});dispatch({type:_constants2.RESET_TO_DEFAULT,defaultValues:defaultValues});};}function setInternalValue(component,value,componentType,category,meta){return{type:_constants2.SET_INTERNAL_VALUE,component:component,value:value,componentType:componentType,category:category,meta:meta};}function patchValue(component,payload){return{type:_constants2.PATCH_VALUE,component:component,payload:payload};}function clearValues(){var resetValues=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var clearAllBlacklistComponents=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return{type:_constants2.CLEAR_VALUES,resetValues:resetValues,clearAllBlacklistComponents:clearAllBlacklistComponents};}
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.setValue=setValue;exports.resetValuesToDefault=resetValuesToDefault;exports.setInternalValue=setInternalValue;exports.patchValue=patchValue;exports.clearValues=clearValues;var _constants=require('../utils/constants');var _helper=require('../utils/helper');var _constants2=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 setValue(component,value,label,showFilter,URLParams,componentType,category,meta,updateSource){return function(dispatch,getState){var _getState=getState(),urlValues=_getState.urlValues,selectedValues=_getState.selectedValues,watchMan=_getState.watchMan,props=_getState.props;var reference=updateSource;if((0,_helper.isEqual)(urlValues[component],value)){reference='URL';}var componentsToReset={};var isResultComponent=[_constants.componentTypes.reactiveList,_constants.componentTypes.reactiveMap].includes(props[component]&&props[component].componentType);var previousValue=selectedValues[component]&&selectedValues[component].value;if(!(0,_helper.isEqual)(previousValue,value)&&props[component]&&!isResultComponent){var componentList=[component];var watchList=watchMan[component]||[];componentList=[].concat(_toConsumableArray(componentList),_toConsumableArray(watchList));componentList.forEach(function(comp){var componentProps=props[comp];if(reference!=='URL'&&componentProps&&[_constants.componentTypes.reactiveList,_constants.componentTypes.reactiveMap].includes(componentProps.componentType)){if(selectedValues[comp]!==null){componentsToReset[comp]=null;}}});}if(isResultComponent){if(value<2&&(!previousValue||previousValue<2)){return;}}dispatch({type:_constants2.SET_VALUE,component:component,reference:reference,value:value,label:label,showFilter:showFilter,URLParams:URLParams,componentType:componentType,category:category,meta:meta,componentsToReset:componentsToReset});};}function resetValuesToDefault(clearAllBlacklistComponents){return function(dispatch,getState){var _getState2=getState(),selectedValues=_getState2.selectedValues,componentProps=_getState2.props;var defaultValues={};var valueToSet=void 0;Object.keys(selectedValues).forEach(function(component){if(!(Array.isArray(clearAllBlacklistComponents)&&clearAllBlacklistComponents.includes(component))){if(!componentProps[component]||!componentProps[component].componentType||!componentProps[component].defaultValue){valueToSet=null;}else if([_constants.componentTypes.rangeSlider,_constants.componentTypes.rangeInput,_constants.componentTypes.ratingsFilter,_constants.componentTypes.dateRange].includes(componentProps[component].componentType)){valueToSet=typeof componentProps[component].defaultValue==='object'?[componentProps[component].defaultValue.start,componentProps[component].defaultValue.end]:null;}else if([_constants.componentTypes.multiDropdownList,_constants.componentTypes.multiDataList,_constants.componentTypes.multiList,_constants.componentTypes.singleDataList,_constants.componentTypes.singleDropdownList,_constants.componentTypes.singleList,_constants.componentTypes.tagCloud,_constants.componentTypes.toggleButton,_constants.componentTypes.multiDropdownRange,_constants.componentTypes.multiRange,_constants.componentTypes.singleDropdownRange,_constants.componentTypes.singleRange,_constants.componentTypes.dataSearch,_constants.componentTypes.datePicker].includes(componentProps[component].componentType)){valueToSet=componentProps[component].defaultValue;}else if([_constants.componentTypes.categorySearch].includes(componentProps[component].componentType)){valueToSet=componentProps[component].defaultValue?componentProps[component].defaultValue.term:'';}if(!(0,_helper.isEqual)(selectedValues[component].value,valueToSet)){defaultValues=_extends({},defaultValues,_defineProperty({},component,_extends({},selectedValues[component],{value:valueToSet})));}}});dispatch({type:_constants2.RESET_TO_DEFAULT,defaultValues:defaultValues});};}function setInternalValue(component,value,componentType,category,meta){return{type:_constants2.SET_INTERNAL_VALUE,component:component,value:value,componentType:componentType,category:category,meta:meta};}function patchValue(component,payload){return{type:_constants2.PATCH_VALUE,component:component,payload:payload};}function clearValues(){var resetValues=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var clearAllBlacklistComponents=arguments.length>1&&arguments[1]!==undefined?arguments[1]:[];return{type:_constants2.CLEAR_VALUES,resetValues:resetValues,clearAllBlacklistComponents:clearAllBlacklistComponents};}
{
"name": "@appbaseio/reactivecore",
"version": "9.14.7",
"version": "9.14.8",
"description": "Core architecture of reactive UI libraries",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc