@plasmicapp/react-web 0.2.155 → 0.2.156

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.
@@ -2355,6 +2355,15 @@ var StateSpecNode = /*#__PURE__*/function () {
2355
2355
  path: path
2356
2356
  };
2357
2357
  };
2358
+ _proto.deleteStateCell = function deleteStateCell(prefixPath) {
2359
+ var _this = this;
2360
+ [].concat(Object.keys(this._state)).forEach(function (key) {
2361
+ var path = JSON.parse(key);
2362
+ if (shallowEqual(prefixPath, path.slice(0, prefixPath.length))) {
2363
+ delete _this._state[key];
2364
+ }
2365
+ });
2366
+ };
2358
2367
  _proto.setInitialValue = function setInitialValue(path, value) {
2359
2368
  var key = JSON.stringify(path);
2360
2369
  this._state[key].initialValue = value;
@@ -2665,6 +2674,13 @@ function create$StateProxy($$state, leafHandlers) {
2665
2674
  // 2 - delete indices in repeated implicit states, but these can't be exposed, so they don't have onChangeProp
2666
2675
  (_$$state$props$spec$o = (_$$state$props2 = $$state.props)[spec.onChangeProp]) == null ? void 0 : _$$state$props$spec$o.call(_$$state$props2, _get(proxyRoot, currPath.slice(spec.pathObj.length)));
2667
2676
  }
2677
+ var nextPath = getNextPath(property);
2678
+ var nextNode = currNode.makeTransition(property);
2679
+ if (nextNode) {
2680
+ getStateCells(nextNode).forEach(function (node) {
2681
+ node.deleteStateCell(nextPath);
2682
+ });
2683
+ }
2668
2684
  return Reflect.deleteProperty(target, property);
2669
2685
  },
2670
2686
  get: function get(target, property, receiver) {