@teselagen/ui 0.0.3 → 0.0.4

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.
Files changed (4) hide show
  1. package/index.js +19 -23
  2. package/index.mjs +19 -23
  3. package/index.umd.js +19 -23
  4. package/package.json +1 -1
package/index.js CHANGED
@@ -28669,20 +28669,19 @@ function createField(structure2) {
28669
28669
  _proto.shouldComponentUpdate = /* @__PURE__ */ __name(function shouldComponentUpdate(nextProps, nextState) {
28670
28670
  return shallowCompare$1(this, nextProps, nextState);
28671
28671
  }, "shouldComponentUpdate");
28672
- _proto.componentDidUpdate = /* @__PURE__ */ __name(function componentDidUpdate(prevProps) {
28673
- var _this3 = this;
28674
- var oldName = prefixName(prevProps, prevProps.name);
28675
- var newName = prefixName(this.props, this.props.name);
28672
+ _proto.UNSAFE_componentWillReceiveProps = /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps) {
28673
+ var oldName = prefixName(this.props, this.props.name);
28674
+ var newName = prefixName(nextProps, nextProps.name);
28676
28675
  if (oldName !== newName || // use deepEqual here because they could be a function or an array of functions
28677
- !plain.deepEqual(prevProps.validate, this.props.validate) || !plain.deepEqual(prevProps.warn, this.props.warn)) {
28676
+ !plain.deepEqual(this.props.validate, nextProps.validate) || !plain.deepEqual(this.props.warn, nextProps.warn)) {
28678
28677
  this.props._reduxForm.unregister(oldName);
28679
28678
  this.props._reduxForm.register(newName, "Field", function() {
28680
- return _this3.props.validate;
28679
+ return nextProps.validate;
28681
28680
  }, function() {
28682
- return _this3.props.warn;
28681
+ return nextProps.warn;
28683
28682
  });
28684
28683
  }
28685
- }, "componentDidUpdate");
28684
+ }, "UNSAFE_componentWillReceiveProps");
28686
28685
  _proto.componentWillUnmount = /* @__PURE__ */ __name(function componentWillUnmount() {
28687
28686
  this.props._reduxForm.unregister(this.name);
28688
28687
  }, "componentWillUnmount");
@@ -30010,8 +30009,8 @@ var getDisplayName$1 = /* @__PURE__ */ __name(function getDisplayName(Comp) {
30010
30009
  }, "getDisplayName");
30011
30010
  const getDisplayName$2 = getDisplayName$1;
30012
30011
  var isHotReloading = /* @__PURE__ */ __name(function isHotReloading2() {
30013
- var castModule = typeof module !== "undefined" && module;
30014
- return !!(castModule && castModule.hot && typeof castModule.hot.status === "function" && castModule.hot.status() === "apply");
30012
+ var castModule = module;
30013
+ return !!(typeof castModule !== "undefined" && castModule.hot && typeof castModule.hot.status === "function" && castModule.hot.status() === "apply");
30015
30014
  }, "isHotReloading");
30016
30015
  const isHotReloading$1 = isHotReloading;
30017
30016
  var isClassComponent = /* @__PURE__ */ __name(function isClassComponent2(Component) {
@@ -30078,7 +30077,6 @@ function createReduxForm(structure2) {
30078
30077
  _this.lastFieldWarnerKeys = [];
30079
30078
  _this.innerOnSubmit = void 0;
30080
30079
  _this.submitPromise = void 0;
30081
- _this.initializedOnLoad = false;
30082
30080
  _this.initIfNeeded = function(nextProps) {
30083
30081
  var enableReinitialize = _this.props.enableReinitialize;
30084
30082
  if (nextProps) {
@@ -30089,16 +30087,13 @@ function createReduxForm(structure2) {
30089
30087
  lastInitialValues: _this.props.initialValues,
30090
30088
  updateUnregisteredFields: nextProps.updateUnregisteredFields
30091
30089
  });
30092
- return true;
30093
30090
  }
30094
30091
  } else if (_this.props.initialValues && (!_this.props.initialized || enableReinitialize)) {
30095
30092
  _this.props.initialize(_this.props.initialValues, _this.props.keepDirtyOnReinitialize, {
30096
30093
  keepValues: _this.props.keepValues,
30097
30094
  updateUnregisteredFields: _this.props.updateUnregisteredFields
30098
30095
  });
30099
- return true;
30100
30096
  }
30101
- return false;
30102
30097
  };
30103
30098
  _this.updateSyncErrorsIfNeeded = function(nextSyncErrors, nextError, lastSyncErrors) {
30104
30099
  var _this$props = _this.props, error = _this$props.error, updateSyncErrors3 = _this$props.updateSyncErrors;
@@ -30368,18 +30363,20 @@ function createReduxForm(structure2) {
30368
30363
  _this.reset = function() {
30369
30364
  return _this.props.reset();
30370
30365
  };
30371
- if (!isHotReloading$1()) {
30372
- _this.initializedOnLoad = _this.initIfNeeded();
30373
- }
30374
- invariant$1(_this.props.shouldValidate, "shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.");
30375
30366
  return _this;
30376
30367
  }
30377
30368
  __name(Form2, "Form");
30378
30369
  var _proto = Form2.prototype;
30370
+ _proto.UNSAFE_componentWillMount = /* @__PURE__ */ __name(function UNSAFE_componentWillMount() {
30371
+ if (!isHotReloading$1()) {
30372
+ this.initIfNeeded();
30373
+ this.validateIfNeeded();
30374
+ this.warnIfNeeded();
30375
+ }
30376
+ invariant$1(this.props.shouldValidate, "shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.");
30377
+ }, "UNSAFE_componentWillMount");
30379
30378
  _proto.UNSAFE_componentWillReceiveProps = /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps) {
30380
- var isValueReset = this.initIfNeeded(nextProps);
30381
- if (isValueReset)
30382
- return;
30379
+ this.initIfNeeded(nextProps);
30383
30380
  this.validateIfNeeded(nextProps);
30384
30381
  this.warnIfNeeded(nextProps);
30385
30382
  this.clearSubmitPromiseIfNeeded(nextProps);
@@ -30403,8 +30400,7 @@ function createReduxForm(structure2) {
30403
30400
  }, "shouldComponentUpdate");
30404
30401
  _proto.componentDidMount = /* @__PURE__ */ __name(function componentDidMount() {
30405
30402
  if (!isHotReloading$1()) {
30406
- if (this.initializedOnLoad)
30407
- return;
30403
+ this.initIfNeeded(this.props);
30408
30404
  this.validateIfNeeded();
30409
30405
  this.warnIfNeeded();
30410
30406
  }
package/index.mjs CHANGED
@@ -28651,20 +28651,19 @@ function createField(structure2) {
28651
28651
  _proto.shouldComponentUpdate = /* @__PURE__ */ __name(function shouldComponentUpdate(nextProps, nextState) {
28652
28652
  return shallowCompare$1(this, nextProps, nextState);
28653
28653
  }, "shouldComponentUpdate");
28654
- _proto.componentDidUpdate = /* @__PURE__ */ __name(function componentDidUpdate(prevProps) {
28655
- var _this3 = this;
28656
- var oldName = prefixName(prevProps, prevProps.name);
28657
- var newName = prefixName(this.props, this.props.name);
28654
+ _proto.UNSAFE_componentWillReceiveProps = /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps) {
28655
+ var oldName = prefixName(this.props, this.props.name);
28656
+ var newName = prefixName(nextProps, nextProps.name);
28658
28657
  if (oldName !== newName || // use deepEqual here because they could be a function or an array of functions
28659
- !plain.deepEqual(prevProps.validate, this.props.validate) || !plain.deepEqual(prevProps.warn, this.props.warn)) {
28658
+ !plain.deepEqual(this.props.validate, nextProps.validate) || !plain.deepEqual(this.props.warn, nextProps.warn)) {
28660
28659
  this.props._reduxForm.unregister(oldName);
28661
28660
  this.props._reduxForm.register(newName, "Field", function() {
28662
- return _this3.props.validate;
28661
+ return nextProps.validate;
28663
28662
  }, function() {
28664
- return _this3.props.warn;
28663
+ return nextProps.warn;
28665
28664
  });
28666
28665
  }
28667
- }, "componentDidUpdate");
28666
+ }, "UNSAFE_componentWillReceiveProps");
28668
28667
  _proto.componentWillUnmount = /* @__PURE__ */ __name(function componentWillUnmount() {
28669
28668
  this.props._reduxForm.unregister(this.name);
28670
28669
  }, "componentWillUnmount");
@@ -29992,8 +29991,8 @@ var getDisplayName$1 = /* @__PURE__ */ __name(function getDisplayName(Comp) {
29992
29991
  }, "getDisplayName");
29993
29992
  const getDisplayName$2 = getDisplayName$1;
29994
29993
  var isHotReloading = /* @__PURE__ */ __name(function isHotReloading2() {
29995
- var castModule = typeof module !== "undefined" && module;
29996
- return !!(castModule && castModule.hot && typeof castModule.hot.status === "function" && castModule.hot.status() === "apply");
29994
+ var castModule = module;
29995
+ return !!(typeof castModule !== "undefined" && castModule.hot && typeof castModule.hot.status === "function" && castModule.hot.status() === "apply");
29997
29996
  }, "isHotReloading");
29998
29997
  const isHotReloading$1 = isHotReloading;
29999
29998
  var isClassComponent = /* @__PURE__ */ __name(function isClassComponent2(Component2) {
@@ -30060,7 +30059,6 @@ function createReduxForm(structure2) {
30060
30059
  _this.lastFieldWarnerKeys = [];
30061
30060
  _this.innerOnSubmit = void 0;
30062
30061
  _this.submitPromise = void 0;
30063
- _this.initializedOnLoad = false;
30064
30062
  _this.initIfNeeded = function(nextProps) {
30065
30063
  var enableReinitialize = _this.props.enableReinitialize;
30066
30064
  if (nextProps) {
@@ -30071,16 +30069,13 @@ function createReduxForm(structure2) {
30071
30069
  lastInitialValues: _this.props.initialValues,
30072
30070
  updateUnregisteredFields: nextProps.updateUnregisteredFields
30073
30071
  });
30074
- return true;
30075
30072
  }
30076
30073
  } else if (_this.props.initialValues && (!_this.props.initialized || enableReinitialize)) {
30077
30074
  _this.props.initialize(_this.props.initialValues, _this.props.keepDirtyOnReinitialize, {
30078
30075
  keepValues: _this.props.keepValues,
30079
30076
  updateUnregisteredFields: _this.props.updateUnregisteredFields
30080
30077
  });
30081
- return true;
30082
30078
  }
30083
- return false;
30084
30079
  };
30085
30080
  _this.updateSyncErrorsIfNeeded = function(nextSyncErrors, nextError, lastSyncErrors) {
30086
30081
  var _this$props = _this.props, error = _this$props.error, updateSyncErrors3 = _this$props.updateSyncErrors;
@@ -30350,18 +30345,20 @@ function createReduxForm(structure2) {
30350
30345
  _this.reset = function() {
30351
30346
  return _this.props.reset();
30352
30347
  };
30353
- if (!isHotReloading$1()) {
30354
- _this.initializedOnLoad = _this.initIfNeeded();
30355
- }
30356
- invariant$1(_this.props.shouldValidate, "shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.");
30357
30348
  return _this;
30358
30349
  }
30359
30350
  __name(Form2, "Form");
30360
30351
  var _proto = Form2.prototype;
30352
+ _proto.UNSAFE_componentWillMount = /* @__PURE__ */ __name(function UNSAFE_componentWillMount() {
30353
+ if (!isHotReloading$1()) {
30354
+ this.initIfNeeded();
30355
+ this.validateIfNeeded();
30356
+ this.warnIfNeeded();
30357
+ }
30358
+ invariant$1(this.props.shouldValidate, "shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.");
30359
+ }, "UNSAFE_componentWillMount");
30361
30360
  _proto.UNSAFE_componentWillReceiveProps = /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps) {
30362
- var isValueReset = this.initIfNeeded(nextProps);
30363
- if (isValueReset)
30364
- return;
30361
+ this.initIfNeeded(nextProps);
30365
30362
  this.validateIfNeeded(nextProps);
30366
30363
  this.warnIfNeeded(nextProps);
30367
30364
  this.clearSubmitPromiseIfNeeded(nextProps);
@@ -30385,8 +30382,7 @@ function createReduxForm(structure2) {
30385
30382
  }, "shouldComponentUpdate");
30386
30383
  _proto.componentDidMount = /* @__PURE__ */ __name(function componentDidMount() {
30387
30384
  if (!isHotReloading$1()) {
30388
- if (this.initializedOnLoad)
30389
- return;
30385
+ this.initIfNeeded(this.props);
30390
30386
  this.validateIfNeeded();
30391
30387
  this.warnIfNeeded();
30392
30388
  }
package/index.umd.js CHANGED
@@ -28669,20 +28669,19 @@ ${latestSubscriptionCallbackError.current.stack}
28669
28669
  _proto.shouldComponentUpdate = /* @__PURE__ */ __name(function shouldComponentUpdate(nextProps, nextState) {
28670
28670
  return shallowCompare$1(this, nextProps, nextState);
28671
28671
  }, "shouldComponentUpdate");
28672
- _proto.componentDidUpdate = /* @__PURE__ */ __name(function componentDidUpdate(prevProps) {
28673
- var _this3 = this;
28674
- var oldName = prefixName(prevProps, prevProps.name);
28675
- var newName = prefixName(this.props, this.props.name);
28672
+ _proto.UNSAFE_componentWillReceiveProps = /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps) {
28673
+ var oldName = prefixName(this.props, this.props.name);
28674
+ var newName = prefixName(nextProps, nextProps.name);
28676
28675
  if (oldName !== newName || // use deepEqual here because they could be a function or an array of functions
28677
- !plain.deepEqual(prevProps.validate, this.props.validate) || !plain.deepEqual(prevProps.warn, this.props.warn)) {
28676
+ !plain.deepEqual(this.props.validate, nextProps.validate) || !plain.deepEqual(this.props.warn, nextProps.warn)) {
28678
28677
  this.props._reduxForm.unregister(oldName);
28679
28678
  this.props._reduxForm.register(newName, "Field", function() {
28680
- return _this3.props.validate;
28679
+ return nextProps.validate;
28681
28680
  }, function() {
28682
- return _this3.props.warn;
28681
+ return nextProps.warn;
28683
28682
  });
28684
28683
  }
28685
- }, "componentDidUpdate");
28684
+ }, "UNSAFE_componentWillReceiveProps");
28686
28685
  _proto.componentWillUnmount = /* @__PURE__ */ __name(function componentWillUnmount() {
28687
28686
  this.props._reduxForm.unregister(this.name);
28688
28687
  }, "componentWillUnmount");
@@ -30010,8 +30009,8 @@ ${latestSubscriptionCallbackError.current.stack}
30010
30009
  }, "getDisplayName");
30011
30010
  const getDisplayName$2 = getDisplayName$1;
30012
30011
  var isHotReloading = /* @__PURE__ */ __name(function isHotReloading2() {
30013
- var castModule = typeof module !== "undefined" && module;
30014
- return !!(castModule && castModule.hot && typeof castModule.hot.status === "function" && castModule.hot.status() === "apply");
30012
+ var castModule = module;
30013
+ return !!(typeof castModule !== "undefined" && castModule.hot && typeof castModule.hot.status === "function" && castModule.hot.status() === "apply");
30015
30014
  }, "isHotReloading");
30016
30015
  const isHotReloading$1 = isHotReloading;
30017
30016
  var isClassComponent = /* @__PURE__ */ __name(function isClassComponent2(Component) {
@@ -30078,7 +30077,6 @@ ${latestSubscriptionCallbackError.current.stack}
30078
30077
  _this.lastFieldWarnerKeys = [];
30079
30078
  _this.innerOnSubmit = void 0;
30080
30079
  _this.submitPromise = void 0;
30081
- _this.initializedOnLoad = false;
30082
30080
  _this.initIfNeeded = function(nextProps) {
30083
30081
  var enableReinitialize = _this.props.enableReinitialize;
30084
30082
  if (nextProps) {
@@ -30089,16 +30087,13 @@ ${latestSubscriptionCallbackError.current.stack}
30089
30087
  lastInitialValues: _this.props.initialValues,
30090
30088
  updateUnregisteredFields: nextProps.updateUnregisteredFields
30091
30089
  });
30092
- return true;
30093
30090
  }
30094
30091
  } else if (_this.props.initialValues && (!_this.props.initialized || enableReinitialize)) {
30095
30092
  _this.props.initialize(_this.props.initialValues, _this.props.keepDirtyOnReinitialize, {
30096
30093
  keepValues: _this.props.keepValues,
30097
30094
  updateUnregisteredFields: _this.props.updateUnregisteredFields
30098
30095
  });
30099
- return true;
30100
30096
  }
30101
- return false;
30102
30097
  };
30103
30098
  _this.updateSyncErrorsIfNeeded = function(nextSyncErrors, nextError, lastSyncErrors) {
30104
30099
  var _this$props = _this.props, error = _this$props.error, updateSyncErrors2 = _this$props.updateSyncErrors;
@@ -30368,18 +30363,20 @@ ${latestSubscriptionCallbackError.current.stack}
30368
30363
  _this.reset = function() {
30369
30364
  return _this.props.reset();
30370
30365
  };
30371
- if (!isHotReloading$1()) {
30372
- _this.initializedOnLoad = _this.initIfNeeded();
30373
- }
30374
- invariant$1(_this.props.shouldValidate, "shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.");
30375
30366
  return _this;
30376
30367
  }
30377
30368
  __name(Form2, "Form");
30378
30369
  var _proto = Form2.prototype;
30370
+ _proto.UNSAFE_componentWillMount = /* @__PURE__ */ __name(function UNSAFE_componentWillMount() {
30371
+ if (!isHotReloading$1()) {
30372
+ this.initIfNeeded();
30373
+ this.validateIfNeeded();
30374
+ this.warnIfNeeded();
30375
+ }
30376
+ invariant$1(this.props.shouldValidate, "shouldValidate() is deprecated and will be removed in v9.0.0. Use shouldWarn() or shouldError() instead.");
30377
+ }, "UNSAFE_componentWillMount");
30379
30378
  _proto.UNSAFE_componentWillReceiveProps = /* @__PURE__ */ __name(function UNSAFE_componentWillReceiveProps(nextProps) {
30380
- var isValueReset = this.initIfNeeded(nextProps);
30381
- if (isValueReset)
30382
- return;
30379
+ this.initIfNeeded(nextProps);
30383
30380
  this.validateIfNeeded(nextProps);
30384
30381
  this.warnIfNeeded(nextProps);
30385
30382
  this.clearSubmitPromiseIfNeeded(nextProps);
@@ -30403,8 +30400,7 @@ ${latestSubscriptionCallbackError.current.stack}
30403
30400
  }, "shouldComponentUpdate");
30404
30401
  _proto.componentDidMount = /* @__PURE__ */ __name(function componentDidMount() {
30405
30402
  if (!isHotReloading$1()) {
30406
- if (this.initializedOnLoad)
30407
- return;
30403
+ this.initIfNeeded(this.props);
30408
30404
  this.validateIfNeeded();
30409
30405
  this.warnIfNeeded();
30410
30406
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "type": "commonjs",