@plasmicapp/react-web 0.2.154 → 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.
- package/dist/react-web.cjs.development.js +17 -0
- package/dist/react-web.cjs.development.js.map +1 -1
- package/dist/react-web.cjs.production.min.js +1 -1
- package/dist/react-web.cjs.production.min.js.map +1 -1
- package/dist/react-web.esm.js +17 -0
- package/dist/react-web.esm.js.map +1 -1
- package/dist/states/graph.d.ts +1 -0
- package/package.json +4 -4
- package/skinny/dist/index.js +17 -0
- package/skinny/dist/index.js.map +1 -1
- package/skinny/dist/states/graph.d.ts +1 -0
package/dist/react-web.esm.js
CHANGED
|
@@ -2350,6 +2350,15 @@ var StateSpecNode = /*#__PURE__*/function () {
|
|
|
2350
2350
|
path: path
|
|
2351
2351
|
};
|
|
2352
2352
|
};
|
|
2353
|
+
_proto.deleteStateCell = function deleteStateCell(prefixPath) {
|
|
2354
|
+
var _this = this;
|
|
2355
|
+
[].concat(Object.keys(this._state)).forEach(function (key) {
|
|
2356
|
+
var path = JSON.parse(key);
|
|
2357
|
+
if (shallowEqual(prefixPath, path.slice(0, prefixPath.length))) {
|
|
2358
|
+
delete _this._state[key];
|
|
2359
|
+
}
|
|
2360
|
+
});
|
|
2361
|
+
};
|
|
2353
2362
|
_proto.setInitialValue = function setInitialValue(path, value) {
|
|
2354
2363
|
var key = JSON.stringify(path);
|
|
2355
2364
|
this._state[key].initialValue = value;
|
|
@@ -2610,6 +2619,7 @@ function initializeStateValue($$state, initialSpecNode, initialStatePath, proxyR
|
|
|
2610
2619
|
if (spec.valueProp) {
|
|
2611
2620
|
return $$state.props[spec.valueProp];
|
|
2612
2621
|
} else if (!node.hasState(path) && spec.initFunc) {
|
|
2622
|
+
node.createStateCell(path);
|
|
2613
2623
|
return initializeStateValue($$state, node, path, proxyRoot);
|
|
2614
2624
|
}
|
|
2615
2625
|
return _get(proxyRoot, path);
|
|
@@ -2659,6 +2669,13 @@ function create$StateProxy($$state, leafHandlers) {
|
|
|
2659
2669
|
// 2 - delete indices in repeated implicit states, but these can't be exposed, so they don't have onChangeProp
|
|
2660
2670
|
(_$$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)));
|
|
2661
2671
|
}
|
|
2672
|
+
var nextPath = getNextPath(property);
|
|
2673
|
+
var nextNode = currNode.makeTransition(property);
|
|
2674
|
+
if (nextNode) {
|
|
2675
|
+
getStateCells(nextNode).forEach(function (node) {
|
|
2676
|
+
node.deleteStateCell(nextPath);
|
|
2677
|
+
});
|
|
2678
|
+
}
|
|
2662
2679
|
return Reflect.deleteProperty(target, property);
|
|
2663
2680
|
},
|
|
2664
2681
|
get: function get(target, property, receiver) {
|