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

reshow-return

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

reshow-return - npm Package Compare versions

Comparing version 0.17.36 to 0.17.37

6

build/cjs/src/ui/organisms/Return.js

@@ -12,3 +12,3 @@ "use strict";

var _jsxRuntime = require("react/jsx-runtime");
var _excluded = ["children", "backfillProps"];
var _excluded = ["children", "backfillProps"]; // @ts-check
/**

@@ -21,3 +21,2 @@ * @typedef {object} GetReturnOptions

*/
/**

@@ -27,6 +26,5 @@ * @typedef {object} ReturnProps

* @property {import("../../connectOptions").InitStatesProps} initStates
* @property {import("react").ReactChild} [children]
* @property {import("react").ReactChild} [children]
* @property {boolean} [backfillProps]
*/
/**

@@ -33,0 +31,0 @@ * @param {GetReturnOptions} props

@@ -10,5 +10,20 @@ "use strict";

var _callFunc = _interopRequireDefault(require("call-func"));
var _reshowConstant = require("reshow-constant");
var _Return = _interopRequireDefault(require("./ui/organisms/Return.js"));
// @ts-check
/**
* @template StateType
* @typedef {import('reshow-flux-base').DispatchType<StateType>} DispatchType
*/
/**
* @template ChildrenType
* @param {string[]} initRenderKeys
* @param {ChildrenType[]} initChildren
* @returns {[React.ReactElement[], DispatchType<ChildrenType>, DispatchType<any>]}
*/
var usePartialRender = function usePartialRender(initRenderKeys, initChildren) {
var _useReduceStore = (0, _reshowFlux.useReduceStore)(null, function () {
var _useReduceStore = (0, _reshowFlux.useReduceStore)(function (state, action) {
return (0, _reshowFlux.mergeMap)(state, action);
}, function () {
return (0, _reshowFlux.Map)((0, _callFunc["default"])(initChildren));

@@ -32,3 +47,7 @@ }),

*/
return (renderKeys && renderKeys.map ? renderKeys : []).map(function (name) {
return ((0, _reshowConstant.IS_ARRAY)(renderKeys) ? renderKeys : []).map(
/**
* @param {string} name
*/
function (name) {
return buildReturn({

@@ -38,3 +57,7 @@ key: name,

initStates: [name]
}, function (props) {
},
/**
* @param {any} props
*/
function (props) {
return props[props.name] || null;

@@ -41,0 +64,0 @@ });

{
"version": "0.17.36",
"version": "0.17.37",
"name": "reshow-return",

@@ -4,0 +4,0 @@ "repository": {

@@ -9,3 +9,3 @@ export default Return;

export type ReturnProps = {
store: import("reshow-flux-base").StoreObject;
store: import("reshow-flux-base").StoreObject<any>;
initStates: import("../../connectOptions").InitStatesProps;

@@ -18,3 +18,3 @@ children?: import("react").ReactChild;

*/
declare function Return(props: ReturnProps): JSX.Element;
declare function Return(props: ReturnProps): import("react/jsx-runtime").JSX.Element;
declare namespace Return {

@@ -41,4 +41,4 @@ export { displayName };

export function getReturn({ displayName, useConnect, cleanProps, options, }?: GetReturnOptions): {
(props: ReturnProps): JSX.Element;
(props: ReturnProps): import("react/jsx-runtime").JSX.Element;
displayName: string;
};
export default usePartialRender;
declare function usePartialRender(initRenderKeys: any, initChildren: any): any[];
export type DispatchType<StateType> = import('reshow-flux-base').DispatchType<StateType>;
/**
* @template StateType
* @typedef {import('reshow-flux-base').DispatchType<StateType>} DispatchType
*/
/**
* @template ChildrenType
* @param {string[]} initRenderKeys
* @param {ChildrenType[]} initChildren
* @returns {[React.ReactElement[], DispatchType<ChildrenType>, DispatchType<any>]}
*/
declare function usePartialRender<ChildrenType>(initRenderKeys: string[], initChildren: ChildrenType[]): [import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>[], DispatchType<ChildrenType>, DispatchType<any>];

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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