@flowerforce/flower-react 3.5.1-beta.2 → 4.0.3-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +261 -202
- package/dist/index.cjs.js +214 -630
- package/dist/index.esm.js +184 -604
- package/dist/src/components/Flower.d.ts +7 -7
- package/dist/src/components/FlowerAction.d.ts +2 -3
- package/dist/src/components/FlowerComponent.d.ts +2 -4
- package/dist/src/components/FlowerFlow.d.ts +2 -3
- package/dist/src/components/FlowerNavigate/FlowerNavigate.d.ts +3 -0
- package/dist/src/components/FlowerNavigate/WrapperComponent.d.ts +3 -3
- package/dist/src/components/FlowerNavigate/index.d.ts +2 -4
- package/dist/src/components/FlowerNavigate/useFlowerNavigate.d.ts +1 -1
- package/dist/src/components/FlowerNode.d.ts +2 -3
- package/dist/src/components/FlowerRoute.d.ts +2 -3
- package/dist/src/components/FlowerServer.d.ts +2 -3
- package/dist/src/components/FlowerStart.d.ts +3 -4
- package/dist/src/components/index.d.ts +10 -0
- package/dist/src/components/useFlower/utils.d.ts +20 -0
- package/dist/src/components/useFlower.d.ts +2 -3
- package/dist/src/features/index.d.ts +2 -0
- package/dist/src/features/reducer/flowerReducer.d.ts +6 -0
- package/dist/src/{selectors.d.ts → features/selectors/selectors.d.ts} +474 -363
- package/dist/src/index.d.ts +5 -33
- package/dist/src/provider/index.d.ts +1 -0
- package/dist/src/provider/provider.d.ts +8 -0
- package/dist/src/types/FlowContext.d.ts +6 -0
- package/dist/src/types/FlowerHooks.d.ts +27 -0
- package/dist/src/{components/types → types}/FlowerProvider.d.ts +3 -3
- package/dist/src/types/index.d.ts +10 -0
- package/package.json +5 -2
- package/dist/src/components/FlowerField.d.ts +0 -4
- package/dist/src/components/FlowerRule.d.ts +0 -4
- package/dist/src/components/FlowerValue.d.ts +0 -4
- package/dist/src/components/types/FlowerField.d.ts +0 -124
- package/dist/src/components/types/FlowerHooks.d.ts +0 -72
- package/dist/src/components/types/FlowerRule.d.ts +0 -35
- package/dist/src/components/types/FlowerValue.d.ts +0 -33
- package/dist/src/components/useFlowerForm.d.ts +0 -26
- package/dist/src/context.d.ts +0 -10
- package/dist/src/provider.d.ts +0 -25
- package/dist/src/reducer.d.ts +0 -7
- /package/dist/src/{components/types → types}/DefaultNode.d.ts +0 -0
- /package/dist/src/{components/types → types}/FlowerComponent.d.ts +0 -0
- /package/dist/src/{components/types → types}/FlowerFlow.d.ts +0 -0
- /package/dist/src/{components/types → types}/FlowerNavigate.d.ts +0 -0
- /package/dist/src/{components/types → types}/FlowerNode.d.ts +0 -0
- /package/dist/src/{components/types → types}/FlowerRoute.d.ts +0 -0
- /package/dist/src/{components/types → types}/FlowerServer.d.ts +0 -0
@@ -1,15 +1,15 @@
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
2
|
-
type
|
2
|
+
type FlowerInitialState = {
|
3
3
|
startId?: string;
|
4
4
|
current?: string;
|
5
5
|
history?: string[];
|
6
6
|
};
|
7
|
-
type FlowerClientProps = PropsWithChildren
|
7
|
+
type FlowerClientProps = PropsWithChildren<{
|
8
8
|
name: string;
|
9
9
|
destroyOnUnmount?: boolean;
|
10
10
|
startId?: string | null;
|
11
|
-
|
12
|
-
|
13
|
-
}
|
14
|
-
declare const
|
15
|
-
export
|
11
|
+
initialState?: FlowerInitialState;
|
12
|
+
initialData?: Record<string, unknown>;
|
13
|
+
}>;
|
14
|
+
export declare const Flower: ({ children, name, destroyOnUnmount, startId, initialState, initialData }: FlowerClientProps) => React.JSX.Element | null;
|
15
|
+
export {};
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { FlowerNodeDefaultProps } from '
|
3
|
-
declare const
|
4
|
-
export default component;
|
2
|
+
import { FlowerNodeDefaultProps } from '../types/DefaultNode';
|
3
|
+
export declare const FlowerAction: ({ children, onEnter, onExit }: FlowerNodeDefaultProps) => React.JSX.Element;
|
@@ -1,4 +1,2 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
declare const component: React.MemoExoticComponent<({ children }: FlowerComponentProps) => React.ReactNode>;
|
4
|
-
export default component;
|
1
|
+
import { FlowerComponentProps } from '../types/FlowerComponent';
|
2
|
+
export declare const FlowerComponent: ({ children }: FlowerComponentProps) => import("react").ReactNode;
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { FlowerFlowProps } from '
|
3
|
-
declare const
|
4
|
-
export default component;
|
2
|
+
import { FlowerFlowProps } from '../types/FlowerFlow';
|
3
|
+
export declare const FlowerFlow: ({ children, onEnter, onExit }: FlowerFlowProps) => React.JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
declare function
|
3
|
-
declare const
|
4
|
-
export
|
2
|
+
declare function _FlowerNavigateWrapper({ hidden, Component, onNavigate, ...props }: any): any;
|
3
|
+
export declare const FlowerNavigateWrapper: React.MemoExoticComponent<typeof _FlowerNavigateWrapper>;
|
4
|
+
export {};
|
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
declare const component: React.MemoExoticComponent<({ children, flowName: forceFlowName, action, route, node, rules, alwaysDisplay, }: FlowerNavigateProps) => React.JSX.Element | (string | number | Iterable<React.ReactNode> | React.JSX.Element)[] | null | undefined>;
|
4
|
-
export default component;
|
1
|
+
export * from './FlowerNavigate';
|
2
|
+
export * from './useFlowerNavigate';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { FlowerNavigateProps } from '
|
1
|
+
import { FlowerNavigateProps } from '../../types/FlowerNavigate';
|
2
2
|
type UseFlowerNavigateProps = Pick<FlowerNavigateProps, 'flowName' | 'node' | 'route' | 'action'>;
|
3
3
|
export declare const useFlowerNavigate: ({ flowName, action, route, node }: UseFlowerNavigateProps) => {
|
4
4
|
onNavigate: () => void;
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { FlowerNodeProps } from '
|
3
|
-
declare const
|
4
|
-
export default component;
|
2
|
+
import { FlowerNodeProps } from '../types/FlowerNode';
|
3
|
+
export declare const FlowerNode: ({ children, onEnter, onExit }: FlowerNodeProps) => React.JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { FlowerRouteProps } from '
|
3
|
-
declare const
|
4
|
-
export default component;
|
2
|
+
import { FlowerRouteProps } from '../types/FlowerRoute';
|
3
|
+
export declare const FlowerRoute: ({ autostart, children, onEnter, onExit }: FlowerRouteProps) => React.JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { FlowerServerProps } from '
|
3
|
-
declare const
|
4
|
-
export default component;
|
2
|
+
import { FlowerServerProps } from '../types/FlowerServer';
|
3
|
+
export declare const FlowerServer: ({ children }: FlowerServerProps) => React.JSX.Element;
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
|
-
declare
|
3
|
-
|
4
|
-
export default component;
|
1
|
+
declare function _FlowerStart(): null;
|
2
|
+
export declare const FlowerStart: typeof _FlowerStart;
|
3
|
+
export {};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from './Flower';
|
2
|
+
export * from './FlowerAction';
|
3
|
+
export * from './FlowerComponent';
|
4
|
+
export * from './FlowerFlow';
|
5
|
+
export * from './FlowerNavigate';
|
6
|
+
export * from './FlowerNode';
|
7
|
+
export * from './FlowerRoute';
|
8
|
+
export * from './FlowerServer';
|
9
|
+
export * from './FlowerStart';
|
10
|
+
export * from './useFlower';
|
@@ -0,0 +1,20 @@
|
|
1
|
+
export declare const makeActionPayloadOnPrev: (flowName: string | undefined, params: any) => {
|
2
|
+
type: string;
|
3
|
+
payload: Record<string, any>;
|
4
|
+
};
|
5
|
+
export declare const makeActionPayloadOnReset: (flowName: string | undefined, params: any) => {
|
6
|
+
type: string;
|
7
|
+
payload: Record<string, any>;
|
8
|
+
};
|
9
|
+
export declare const makeActionPayloadOnNode: (flowName: string | undefined, params: any) => {
|
10
|
+
type: string;
|
11
|
+
payload: Record<string, any>;
|
12
|
+
};
|
13
|
+
export declare const makeActionPayloadOnNext: (flowName: string | undefined, params: any) => {
|
14
|
+
type: string;
|
15
|
+
payload: Record<string, any>;
|
16
|
+
};
|
17
|
+
export declare const makeActionPayloadOnRestart: (flowName: string | undefined, params: any) => {
|
18
|
+
type: string;
|
19
|
+
payload: Record<string, any>;
|
20
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { UseFlower } from '
|
1
|
+
import { UseFlower } from '../types/FlowerHooks';
|
2
2
|
/** This hook allows you to read flow informations, such as the flowName and ID of the current node.
|
3
3
|
*
|
4
4
|
* It also exposes all the functions to navigate within the flow:
|
@@ -17,5 +17,4 @@ import { UseFlower } from './types/FlowerHooks';
|
|
17
17
|
*
|
18
18
|
* @param {string} name - optional parameter, if flowName exist, name is not used
|
19
19
|
*/
|
20
|
-
declare const useFlower: UseFlower;
|
21
|
-
export default useFlower;
|
20
|
+
export declare const useFlower: UseFlower;
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { Flower, REDUCER_NAME } from '@flowerforce/flower-core';
|
2
|
+
import { REDUCERS_TYPES } from '@flowerforce/flower-react-store';
|
3
|
+
export declare const flowerReducer: import("@reduxjs/toolkit").Slice<Record<string, Flower<Record<string, any>>>, import("@flowerforce/flower-core").CoreReducersFunctions, REDUCER_NAME.FLOWER_FLOW, REDUCER_NAME.FLOWER_FLOW, import("@reduxjs/toolkit").SliceSelectors<Record<string, Flower<Record<string, any>>>>>;
|
4
|
+
export declare const flowerActions: import("@reduxjs/toolkit").CaseReducerActions<import("@flowerforce/flower-core").CoreReducersFunctions, REDUCER_NAME.FLOWER_FLOW>;
|
5
|
+
export declare const flowerFlowReducer: import("redux").Reducer<Record<string, Flower<Record<string, any>>>>;
|
6
|
+
export declare const reducerFlower: REDUCERS_TYPES;
|