@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
|
@@ -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;
|
|
@@ -2615,6 +2624,7 @@ function initializeStateValue($$state, initialSpecNode, initialStatePath, proxyR
|
|
|
2615
2624
|
if (spec.valueProp) {
|
|
2616
2625
|
return $$state.props[spec.valueProp];
|
|
2617
2626
|
} else if (!node.hasState(path) && spec.initFunc) {
|
|
2627
|
+
node.createStateCell(path);
|
|
2618
2628
|
return initializeStateValue($$state, node, path, proxyRoot);
|
|
2619
2629
|
}
|
|
2620
2630
|
return _get(proxyRoot, path);
|
|
@@ -2664,6 +2674,13 @@ function create$StateProxy($$state, leafHandlers) {
|
|
|
2664
2674
|
// 2 - delete indices in repeated implicit states, but these can't be exposed, so they don't have onChangeProp
|
|
2665
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)));
|
|
2666
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
|
+
}
|
|
2667
2684
|
return Reflect.deleteProperty(target, property);
|
|
2668
2685
|
},
|
|
2669
2686
|
get: function get(target, property, receiver) {
|