@thecb/components 4.2.9 → 4.3.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/dist/index.cjs.js CHANGED
@@ -15609,10 +15609,19 @@ function _assertThisInitialized(self) {
15609
15609
  return self;
15610
15610
  }
15611
15611
 
15612
+ function _setPrototypeOf(o, p) {
15613
+ _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
15614
+ o.__proto__ = p;
15615
+ return o;
15616
+ };
15617
+
15618
+ return _setPrototypeOf(o, p);
15619
+ }
15620
+
15612
15621
  function _inheritsLoose(subClass, superClass) {
15613
15622
  subClass.prototype = Object.create(superClass.prototype);
15614
15623
  subClass.prototype.constructor = subClass;
15615
- subClass.__proto__ = superClass;
15624
+ _setPrototypeOf(subClass, superClass);
15616
15625
  }
15617
15626
 
15618
15627
  function _getPrototypeOf(o) {
@@ -15622,15 +15631,6 @@ function _getPrototypeOf(o) {
15622
15631
  return _getPrototypeOf(o);
15623
15632
  }
15624
15633
 
15625
- function _setPrototypeOf(o, p) {
15626
- _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
15627
- o.__proto__ = p;
15628
- return o;
15629
- };
15630
-
15631
- return _setPrototypeOf(o, p);
15632
- }
15633
-
15634
15634
  function _isNativeFunction(fn) {
15635
15635
  return Function.toString.call(fn).indexOf("[native code]") !== -1;
15636
15636
  }
@@ -15641,7 +15641,7 @@ function _isNativeReflectConstruct() {
15641
15641
  if (typeof Proxy === "function") return true;
15642
15642
 
15643
15643
  try {
15644
- Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
15644
+ Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
15645
15645
  return true;
15646
15646
  } catch (e) {
15647
15647
  return false;
@@ -15781,7 +15781,9 @@ var ERRORS = {
15781
15781
  "73": "Please provide a valid CSS variable.\n\n",
15782
15782
  "74": "CSS variable not found and no default was provided.\n\n",
15783
15783
  "75": "important requires a valid style object, got a %s instead.\n\n",
15784
- "76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n"
15784
+ "76": "fromSize and toSize must be provided as stringified numbers with the same units as minScreen and maxScreen.\n\n",
15785
+ "77": "remToPx expects a value in \"rem\" but you provided it in \"%s\".\n\n",
15786
+ "78": "base must be set in \"px\" or \"%\" but you set it in \"%s\".\n"
15785
15787
  };
15786
15788
  /**
15787
15789
  * super basic version of sprintf
@@ -39763,11 +39765,11 @@ var formConfig$7 = {
39763
39765
  constraints: [validateWhen(onlyIntegers(), matchesRegex("US"), "country"), validateWhen(hasLength(0, 9), matchesRegex("US"), "country")]
39764
39766
  }
39765
39767
  };
39766
- var formState = createFormState(formConfig$7);
39767
- console.log("form state is", formState);
39768
- var reducer$7 = formState.reducer,
39769
- mapStateToProps$8 = formState.mapStateToProps,
39770
- mapDispatchToProps$7 = formState.mapDispatchToProps;
39768
+
39769
+ var _createFormState$7 = createFormState(formConfig$7),
39770
+ reducer$7 = _createFormState$7.reducer,
39771
+ mapStateToProps$8 = _createFormState$7.mapStateToProps,
39772
+ mapDispatchToProps$7 = _createFormState$7.mapDispatchToProps;
39771
39773
 
39772
39774
  PaymentFormCard.reducer = reducer$7;
39773
39775
  PaymentFormCard.mapStateToProps = mapStateToProps$8;
@@ -39827,10 +39829,10 @@ var formConfig$8 = {
39827
39829
  }
39828
39830
  };
39829
39831
 
39830
- var _createFormState$7 = createFormState(formConfig$8),
39831
- reducer$8 = _createFormState$7.reducer,
39832
- mapStateToProps$9 = _createFormState$7.mapStateToProps,
39833
- mapDispatchToProps$8 = _createFormState$7.mapDispatchToProps;
39832
+ var _createFormState$8 = createFormState(formConfig$8),
39833
+ reducer$8 = _createFormState$8.reducer,
39834
+ mapStateToProps$9 = _createFormState$8.mapStateToProps,
39835
+ mapDispatchToProps$8 = _createFormState$8.mapDispatchToProps;
39834
39836
 
39835
39837
  PhoneForm.reducer = reducer$8;
39836
39838
  PhoneForm.mapStateToProps = mapStateToProps$9;
@@ -40172,10 +40174,10 @@ var formConfig$9 = {
40172
40174
  }
40173
40175
  };
40174
40176
 
40175
- var _createFormState$8 = createFormState(formConfig$9),
40176
- reducer$9 = _createFormState$8.reducer,
40177
- mapStateToProps$a = _createFormState$8.mapStateToProps,
40178
- mapDispatchToProps$9 = _createFormState$8.mapDispatchToProps;
40177
+ var _createFormState$9 = createFormState(formConfig$9),
40178
+ reducer$9 = _createFormState$9.reducer,
40179
+ mapStateToProps$a = _createFormState$9.mapStateToProps,
40180
+ mapDispatchToProps$9 = _createFormState$9.mapDispatchToProps;
40179
40181
 
40180
40182
  RegistrationForm.reducer = reducer$9;
40181
40183
  RegistrationForm.mapStateToProps = mapStateToProps$a;
@@ -40293,10 +40295,10 @@ var formConfig$a = {
40293
40295
  }
40294
40296
  };
40295
40297
 
40296
- var _createFormState$9 = createFormState(formConfig$a),
40297
- reducer$a = _createFormState$9.reducer,
40298
- mapStateToProps$b = _createFormState$9.mapStateToProps,
40299
- mapDispatchToProps$a = _createFormState$9.mapDispatchToProps;
40298
+ var _createFormState$a = createFormState(formConfig$a),
40299
+ reducer$a = _createFormState$a.reducer,
40300
+ mapStateToProps$b = _createFormState$a.mapStateToProps,
40301
+ mapDispatchToProps$a = _createFormState$a.mapDispatchToProps;
40300
40302
 
40301
40303
  ResetPasswordForm.reducer = reducer$a;
40302
40304
  ResetPasswordForm.mapStateToProps = mapStateToProps$b;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "4.2.9",
3
+ "version": "4.3.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -54,7 +54,6 @@ const formConfig = {
54
54
  }
55
55
  };
56
56
 
57
- const formState = createFormState(formConfig);
58
- console.log("form state is", formState);
59
-
60
- export const { reducer, mapStateToProps, mapDispatchToProps } = formState;
57
+ export const { reducer, mapStateToProps, mapDispatchToProps } = createFormState(
58
+ formConfig
59
+ );