pds-dev-kit-web-test 2.5.205 → 2.5.207

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.
@@ -80,7 +80,6 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
80
80
  var _e = (0, react_1.useState)(sectionPedigree), pedigreeState = _e[0], setPedigreeState = _e[1];
81
81
  (0, react_1.useEffect)(function () {
82
82
  setPedigreeState(sectionPedigree);
83
- // setBlockIdMap(mapComponentBlockIdsToBlockIds(sectionPedigree));
84
83
  }, [sectionPedigree]);
85
84
  var _f = jsonProperties, _g = _f.data, CB_PLACEMENT_PROP_SECTION = _g.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _g.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _g.CB_CONTENT_PROP_SECTION, zOrders = _f.zOrders;
86
85
  var colsDesktop = (_a = CB_PLACEMENT_PROP_SECTION.CB_PLACEMENT_PROP_SECTION_SPEC_COLS) !== null && _a !== void 0 ? _a : 24;
@@ -101,6 +100,19 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
101
100
  }), layouts = _l[0], setLayouts = _l[1];
102
101
  var _m = (0, react_1.useState)('ROOT'), editingGroupBlock = _m[0], setEditingGroupBlock = _m[1];
103
102
  var _o = (0, react_1.useState)([]), bulkBlockIds = _o[0], setBulkBlockIds = _o[1];
103
+ (0, react_1.useEffect)(function () {
104
+ if (editingGroupBlock) {
105
+ var found = (0, group_1.findBlockByBlockId)(sectionPedigree, editingGroupBlock);
106
+ if (!found) {
107
+ setEditingGroupBlock('ROOT');
108
+ return;
109
+ }
110
+ if (found.type === 'GROUP_BLOCK' && found.children.length === 0) {
111
+ setEditingGroupBlock('ROOT');
112
+ return;
113
+ }
114
+ }
115
+ }, [editingGroupBlock, sectionPedigree]);
104
116
  var newblock = bulkBlockIds.length > 0
105
117
  ? (0, group_1.addBulkToTarget)(pedigreeState, editingGroupBlock, bulkBlockIds)
106
118
  : pedigreeState;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.205",
3
+ "version": "2.5.207",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",