@flowerforce/flower-core 3.2.1 → 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,10 @@
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
+
1
8
  ## 3.2.1 (2024-08-27)
2
9
 
3
10
 
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,14 +844,30 @@ const FlowerCoreStateSelectors = {
842
844
  }
843
845
  };
844
846
 
847
+ exports.RulesOperators = void 0;
848
+ (function (RulesOperators) {
849
+ RulesOperators["$exists"] = "$exists";
850
+ RulesOperators["$eq"] = "$eq";
851
+ RulesOperators["$ne"] = "$ne";
852
+ RulesOperators["$gt"] = "$gt";
853
+ RulesOperators["$gte"] = "$gte";
854
+ RulesOperators["$lt"] = "$lt";
855
+ RulesOperators["$lte"] = "$lte";
856
+ RulesOperators["$strGt"] = "$strGt";
857
+ RulesOperators["$strGte"] = "$strGte";
858
+ RulesOperators["$strLt"] = "$strLt";
859
+ RulesOperators["$strLte"] = "$strLte";
860
+ RulesOperators["$in"] = "$in";
861
+ RulesOperators["$nin"] = "$nin";
862
+ RulesOperators["$all"] = "$all";
863
+ RulesOperators["$regex"] = "$regex";
864
+ })(exports.RulesOperators || (exports.RulesOperators = {}));
845
865
  exports.RulesModes = void 0;
846
866
  (function (RulesModes) {
847
867
  RulesModes["$and"] = "$and";
848
868
  RulesModes["$or"] = "$or";
849
869
  })(exports.RulesModes || (exports.RulesModes = {}));
850
870
 
851
- const devtoolState = {};
852
-
853
871
  exports.CoreUtils = CoreUtils;
854
872
  exports.Emitter = Emitter;
855
873
  exports.FlowerCoreReducers = FlowerCoreReducers;
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,12 +842,28 @@ const FlowerCoreStateSelectors = {
840
842
  }
841
843
  };
842
844
 
845
+ var RulesOperators;
846
+ (function (RulesOperators) {
847
+ RulesOperators["$exists"] = "$exists";
848
+ RulesOperators["$eq"] = "$eq";
849
+ RulesOperators["$ne"] = "$ne";
850
+ RulesOperators["$gt"] = "$gt";
851
+ RulesOperators["$gte"] = "$gte";
852
+ RulesOperators["$lt"] = "$lt";
853
+ RulesOperators["$lte"] = "$lte";
854
+ RulesOperators["$strGt"] = "$strGt";
855
+ RulesOperators["$strGte"] = "$strGte";
856
+ RulesOperators["$strLt"] = "$strLt";
857
+ RulesOperators["$strLte"] = "$strLte";
858
+ RulesOperators["$in"] = "$in";
859
+ RulesOperators["$nin"] = "$nin";
860
+ RulesOperators["$all"] = "$all";
861
+ RulesOperators["$regex"] = "$regex";
862
+ })(RulesOperators || (RulesOperators = {}));
843
863
  var RulesModes;
844
864
  (function (RulesModes) {
845
865
  RulesModes["$and"] = "$and";
846
866
  RulesModes["$or"] = "$or";
847
867
  })(RulesModes || (RulesModes = {}));
848
868
 
849
- const devtoolState = {};
850
-
851
- export { CoreUtils, Emitter, FlowerCoreReducers, FlowerStateUtils, MatchRules, RulesModes, FlowerCoreStateSelectors as Selectors, devtoolState };
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,4 +1,20 @@
1
- import { RulesOperators } from '../rules-matcher/interface';
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
+ }
2
18
  export type Rules<T> = {
3
19
  rules: Rules<T> | string | null | undefined | T;
4
20
  };
@@ -31,7 +47,7 @@ export declare enum RulesModes {
31
47
  $or = "$or"
32
48
  }
33
49
  type RulesValuesType<T> = {
34
- '$form.isValid': boolean;
50
+ '$form.isValid'?: boolean;
35
51
  } & T;
36
52
  type RulesOperatorsInArray<T> = Partial<{
37
53
  [KEY in keyof T]: Partial<{
@@ -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 RulesOperators {
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.1",
3
+ "version": "3.2.2",
4
4
  "description": "Core functions for flowerJS",
5
5
  "repository": {
6
6
  "type": "git",