@flowerforce/flower-core 4.0.1-beta.3 → 4.0.1-beta.5

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.
@@ -5,7 +5,7 @@ export type ActionWithPayload<T> = {
5
5
  payload: T;
6
6
  };
7
7
  type ReducerFunctionSign<T extends object, R> = (state: Record<string, Flower<T>>, action: ActionWithPayload<R>) => Record<string, Flower<T>> | void;
8
- export type CoreReducersFunctions<T extends Record<string, any> = Record<string, Flower<Record<string, any>>>> = {
8
+ export type CoreReducersFunctions<T extends Record<string, any> = Record<FlowCaseReducersNames, Flower<Record<string, any>>>> = {
9
9
  /**
10
10
  * @param state
11
11
  * @param action
@@ -235,10 +235,11 @@ export type CoreReducersFunctions<T extends Record<string, any> = Record<string,
235
235
  */
236
236
  >;
237
237
  };
238
+ export type FlowCaseReducersNames = 'historyAdd' | 'historyPrevToNode' | 'forceAddHistory' | 'historyPop' | 'restoreHistory' | 'replaceNode' | 'forceResetHistory' | 'destroy' | 'initNodes' | 'setCurrentNode' | 'node' | 'prevToNode' | 'next' | 'prev' | 'restart' | 'reset';
238
239
  type DataReducerFunctionSign<T extends object, R = object> = (state: Record<string, T>, action: ActionWithPayload<{
239
240
  rootName: string;
240
241
  } & R>) => Record<string, T> | void;
241
- export type DataReducersFunctions<T extends Record<string, any> = Record<string, Record<string, any>>> = {
242
+ export type DataReducersFunctions<T extends Record<string, any> = Record<DataCaseReducersNames, Record<string, any>>> = {
242
243
  /**
243
244
  * @param state
244
245
  * @param action
@@ -403,4 +404,5 @@ export type DataReducersFunctions<T extends Record<string, any> = Record<string,
403
404
  initialData: Record<string, any>;
404
405
  }>;
405
406
  };
407
+ export type DataCaseReducersNames = 'setFormSubmitted' | 'addCustomDataErrors' | 'addDataErrors' | 'fieldDirty' | 'fieldTouch' | 'fieldFocus' | 'removeDataErrors' | 'addData' | 'addDataByPath' | 'replaceData' | 'unsetData' | 'setIsDataValidating' | 'resetData' | 'initData';
406
408
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowerforce/flower-core",
3
- "version": "4.0.1-beta.3",
3
+ "version": "4.0.1-beta.5",
4
4
  "description": "Core functions for flowerJS",
5
5
  "repository": {
6
6
  "type": "git",