@flowerforce/flower-core 3.2.0 → 3.2.2

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/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 3.2.2 (2024-08-28)
2
+
3
+
4
+ ### 🩹 Fixes
5
+
6
+ - resolves RulesObject type and circular dependency ([894eced](https://github.com/flowerforce/flower/commit/894eced))
7
+
8
+ ## 3.2.1 (2024-08-27)
9
+
10
+
11
+ ### 🩹 Fixes
12
+
13
+ - rulesOperators example fixed ([f1def97](https://github.com/flowerforce/flower/commit/f1def97))
14
+
1
15
  ## 3.2.0 (2024-07-23)
2
16
 
3
17
 
package/dist/index.cjs.js CHANGED
@@ -449,6 +449,8 @@ const createFormData = (form) => {
449
449
  };
450
450
  };
451
451
 
452
+ const devtoolState = {};
453
+
452
454
  const { generateNodes, hasNode, makeObjectRules, generateRulesName, findValidRule, getPath } = CoreUtils;
453
455
  /**
454
456
  * These functions are Redux reducers used in a Flux architecture for managing state transitions and updates in a Flower application.
@@ -842,33 +844,9 @@ const FlowerCoreStateSelectors = {
842
844
  }
843
845
  };
844
846
 
845
- exports.RulesModes = void 0;
846
- (function (RulesModes) {
847
- RulesModes["$and"] = "$and";
848
- RulesModes["$or"] = "$or";
849
- })(exports.RulesModes || (exports.RulesModes = {}));
850
- var RulesOperators;
851
- (function (RulesOperators) {
852
- RulesOperators["$exist"] = "$exist";
853
- RulesOperators["$eq"] = "$eq";
854
- RulesOperators["$ne"] = "$ne";
855
- RulesOperators["$gt"] = "$gt";
856
- RulesOperators["$gte"] = "$gte";
857
- RulesOperators["$lt"] = "$lt";
858
- RulesOperators["$lte"] = "$lte";
859
- RulesOperators["$strGt"] = "$strGt";
860
- RulesOperators["$strGte"] = "$strGte";
861
- RulesOperators["$strLt"] = "$strLt";
862
- RulesOperators["$strLte"] = "$strLte";
863
- RulesOperators["$in"] = "$in";
864
- RulesOperators["$nin"] = "$nin";
865
- RulesOperators["$all"] = "$all";
866
- RulesOperators["$regex"] = "$regex";
867
- })(RulesOperators || (RulesOperators = {}));
868
-
869
847
  exports.RulesOperators = void 0;
870
848
  (function (RulesOperators) {
871
- RulesOperators["$exist"] = "$exist";
849
+ RulesOperators["$exists"] = "$exists";
872
850
  RulesOperators["$eq"] = "$eq";
873
851
  RulesOperators["$ne"] = "$ne";
874
852
  RulesOperators["$gt"] = "$gt";
@@ -884,8 +862,11 @@ exports.RulesOperators = void 0;
884
862
  RulesOperators["$all"] = "$all";
885
863
  RulesOperators["$regex"] = "$regex";
886
864
  })(exports.RulesOperators || (exports.RulesOperators = {}));
887
-
888
- const devtoolState = {};
865
+ exports.RulesModes = void 0;
866
+ (function (RulesModes) {
867
+ RulesModes["$and"] = "$and";
868
+ RulesModes["$or"] = "$or";
869
+ })(exports.RulesModes || (exports.RulesModes = {}));
889
870
 
890
871
  exports.CoreUtils = CoreUtils;
891
872
  exports.Emitter = Emitter;
package/dist/index.esm.js CHANGED
@@ -447,6 +447,8 @@ const createFormData = (form) => {
447
447
  };
448
448
  };
449
449
 
450
+ const devtoolState = {};
451
+
450
452
  const { generateNodes, hasNode, makeObjectRules, generateRulesName, findValidRule, getPath } = CoreUtils;
451
453
  /**
452
454
  * These functions are Redux reducers used in a Flux architecture for managing state transitions and updates in a Flower application.
@@ -840,33 +842,9 @@ const FlowerCoreStateSelectors = {
840
842
  }
841
843
  };
842
844
 
843
- var RulesModes;
844
- (function (RulesModes) {
845
- RulesModes["$and"] = "$and";
846
- RulesModes["$or"] = "$or";
847
- })(RulesModes || (RulesModes = {}));
848
- var RulesOperators$1;
849
- (function (RulesOperators) {
850
- RulesOperators["$exist"] = "$exist";
851
- RulesOperators["$eq"] = "$eq";
852
- RulesOperators["$ne"] = "$ne";
853
- RulesOperators["$gt"] = "$gt";
854
- RulesOperators["$gte"] = "$gte";
855
- RulesOperators["$lt"] = "$lt";
856
- RulesOperators["$lte"] = "$lte";
857
- RulesOperators["$strGt"] = "$strGt";
858
- RulesOperators["$strGte"] = "$strGte";
859
- RulesOperators["$strLt"] = "$strLt";
860
- RulesOperators["$strLte"] = "$strLte";
861
- RulesOperators["$in"] = "$in";
862
- RulesOperators["$nin"] = "$nin";
863
- RulesOperators["$all"] = "$all";
864
- RulesOperators["$regex"] = "$regex";
865
- })(RulesOperators$1 || (RulesOperators$1 = {}));
866
-
867
845
  var RulesOperators;
868
846
  (function (RulesOperators) {
869
- RulesOperators["$exist"] = "$exist";
847
+ RulesOperators["$exists"] = "$exists";
870
848
  RulesOperators["$eq"] = "$eq";
871
849
  RulesOperators["$ne"] = "$ne";
872
850
  RulesOperators["$gt"] = "$gt";
@@ -882,7 +860,10 @@ var RulesOperators;
882
860
  RulesOperators["$all"] = "$all";
883
861
  RulesOperators["$regex"] = "$regex";
884
862
  })(RulesOperators || (RulesOperators = {}));
885
-
886
- const devtoolState = {};
863
+ var RulesModes;
864
+ (function (RulesModes) {
865
+ RulesModes["$and"] = "$and";
866
+ RulesModes["$or"] = "$or";
867
+ })(RulesModes || (RulesModes = {}));
887
868
 
888
869
  export { CoreUtils, Emitter, FlowerCoreReducers, FlowerStateUtils, MatchRules, RulesModes, RulesOperators, FlowerCoreStateSelectors as Selectors, devtoolState };
@@ -0,0 +1,2 @@
1
+ declare const devtoolState: {};
2
+ export { devtoolState };
@@ -4,6 +4,5 @@ export { FlowerStateUtils } from './FlowerCoreStateUtils';
4
4
  export { FlowerCoreStateSelectors as Selectors } from './FlowerCoreStateSelectors';
5
5
  export { CoreUtils } from './CoreUtils';
6
6
  export { MatchRules } from './RulesMatcher';
7
+ export { devtoolState } from './devtoolState';
7
8
  export * from './interfaces';
8
- declare const devtoolState: {};
9
- export { devtoolState };
@@ -1,3 +1,20 @@
1
+ export declare enum RulesOperators {
2
+ $exists = "$exists",
3
+ $eq = "$eq",
4
+ $ne = "$ne",
5
+ $gt = "$gt",
6
+ $gte = "$gte",
7
+ $lt = "$lt",
8
+ $lte = "$lte",
9
+ $strGt = "$strGt",
10
+ $strGte = "$strGte",
11
+ $strLt = "$strLt",
12
+ $strLte = "$strLte",
13
+ $in = "$in",
14
+ $nin = "$nin",
15
+ $all = "$all",
16
+ $regex = "$regex"
17
+ }
1
18
  export type Rules<T> = {
2
19
  rules: Rules<T> | string | null | undefined | T;
3
20
  };
@@ -29,25 +46,8 @@ export declare enum RulesModes {
29
46
  $and = "$and",
30
47
  $or = "$or"
31
48
  }
32
- declare enum RulesOperators {
33
- $exist = "$exist",
34
- $eq = "$eq",
35
- $ne = "$ne",
36
- $gt = "$gt",
37
- $gte = "$gte",
38
- $lt = "$lt",
39
- $lte = "$lte",
40
- $strGt = "$strGt",
41
- $strGte = "$strGte",
42
- $strLt = "$strLt",
43
- $strLte = "$strLte",
44
- $in = "$in",
45
- $nin = "$nin",
46
- $all = "$all",
47
- $regex = "$regex"
48
- }
49
49
  type RulesValuesType<T> = {
50
- '$form.isValid': boolean;
50
+ '$form.isValid'?: boolean;
51
51
  } & T;
52
52
  type RulesOperatorsInArray<T> = Partial<{
53
53
  [KEY in keyof T]: Partial<{
@@ -1,21 +1,4 @@
1
1
  import { RulesByNodeId } from './CoreInterface';
2
- export declare enum RulesOperators {
3
- $exist = "$exist",
4
- $eq = "$eq",
5
- $ne = "$ne",
6
- $gt = "$gt",
7
- $gte = "$gte",
8
- $lt = "$lt",
9
- $lte = "$lte",
10
- $strGt = "$strGt",
11
- $strGte = "$strGte",
12
- $strLt = "$strLt",
13
- $strLte = "$strLte",
14
- $in = "$in",
15
- $nin = "$nin",
16
- $all = "$all",
17
- $regex = "$regex"
18
- }
19
2
  export interface StoreRoot<T extends Record<string, any>> {
20
3
  flower: {
21
4
  [x: string]: Flower<T>;
@@ -160,23 +160,6 @@ export interface RulesMatcherUtils {
160
160
  */
161
161
  getKeys: <T extends Record<string, any>>(rules?: T, options?: Record<string, any>) => string[] | null;
162
162
  }
163
- export declare enum OperatorsKeys {
164
- $exists = "$exists",
165
- $eq = "$eq",
166
- $ne = "$ne",
167
- $gt = "$gt",
168
- $gte = "$gte",
169
- $lt = "$lt",
170
- $lte = "$lte",
171
- $strGt = "$strGt",
172
- $strGte = "$strGte",
173
- $strLt = "$strLt",
174
- $strLte = "$strLte",
175
- $in = "$in",
176
- $nin = "$nin",
177
- $all = "$all",
178
- $regex = "$regex"
179
- }
180
163
  export type OperatorsFunction = (a: any, b: any, opt?: any, data?: any) => boolean;
181
164
  export type Operators = {
182
165
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowerforce/flower-core",
3
- "version": "3.2.0",
3
+ "version": "3.2.2",
4
4
  "description": "Core functions for flowerJS",
5
5
  "repository": {
6
6
  "type": "git",