Comparing version 2.5.7 to 2.5.8
@@ -5,2 +5,6 @@ # Change Log | ||
## 2.5.8 - 2022-01-25 | ||
- Add `previousLocation` 5th argument to `urlToAction`. | ||
## 2.5.7 - 2022-01-20 | ||
@@ -7,0 +11,0 @@ |
@@ -136,2 +136,10 @@ import { AnyAction, Reducer, Middleware, compose, StoreEnhancer, Store, Action } from 'redux'; | ||
initial?: boolean; | ||
}, previousLocation: { | ||
method: 'PUSH' | 'REPLACE' | 'POP' | null; | ||
pathname: string; | ||
search: string; | ||
searchParams: Record<string, any>; | ||
hash: string; | ||
hashParams: Record<string, any>; | ||
url: string; | ||
}) => any>; | ||
@@ -138,0 +146,0 @@ actionToUrl?: (logic: LogicType) => { |
@@ -134,2 +134,10 @@ import { Reducer, Store, Action as ReduxAction, Middleware, StoreEnhancer, compose, AnyAction } from 'redux'; | ||
initial?: boolean; | ||
}, previousLocation: { | ||
method: 'PUSH' | 'REPLACE' | 'POP' | null; | ||
pathname: string; | ||
search: string; | ||
searchParams: Record<string, any>; | ||
hash: string; | ||
hashParams: Record<string, any>; | ||
url: string; | ||
}) => any>; | ||
@@ -136,0 +144,0 @@ actionToUrl?: (logic: LogicType) => { |
{ | ||
"name": "kea", | ||
"version": "2.5.7", | ||
"version": "2.5.8", | ||
"description": "Smart front-end architecture", | ||
@@ -5,0 +5,0 @@ "author": "Marius Andra", |
@@ -215,5 +215,3 @@ import { Reducer, Store, Action as ReduxAction, Middleware, StoreEnhancer, compose, AnyAction } from 'redux' | ||
windowValues?: WindowValuesDefinitions<LogicType> | ((logic: LogicType) => WindowValuesDefinitions<LogicType>) | ||
urlToAction?: ( | ||
logic: LogicType, | ||
) => Record< | ||
urlToAction?: (logic: LogicType) => Record< | ||
string, | ||
@@ -234,7 +232,14 @@ ( | ||
}, | ||
previousLocation: { | ||
method: 'PUSH' | 'REPLACE' | 'POP' | null | ||
pathname: string | ||
search: string | ||
searchParams: Record<string, any> | ||
hash: string | ||
hashParams: Record<string, any> | ||
url: string | ||
}, | ||
) => any | ||
> | ||
actionToUrl?: ( | ||
logic: LogicType, | ||
) => { | ||
actionToUrl?: (logic: LogicType) => { | ||
[K in keyof LogicType['actionCreators']]?: ( | ||
@@ -269,3 +274,3 @@ payload: Record<string, any>, | ||
Actions = Record<string, AnyFunction>, | ||
LogicProps = Props | ||
LogicProps = Props, | ||
> extends Logic { | ||
@@ -304,5 +309,6 @@ actionCreators: { | ||
type ActionCreatorForPayloadBuilder<B extends AnyFunction> = ( | ||
...args: Parameters<B> | ||
) => { type: string; payload: ReturnType<B> } | ||
type ActionCreatorForPayloadBuilder<B extends AnyFunction> = (...args: Parameters<B>) => { | ||
type: string | ||
payload: ReturnType<B> | ||
} | ||
@@ -309,0 +315,0 @@ type ActionForPayloadBuilder<B extends AnyFunction> = (...args: Parameters<B>) => void |
300463
7302