pds-dev-kit-web-test 2.5.202 → 2.5.204

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.
@@ -119,6 +119,9 @@ type ActionHandlerPayload = {
119
119
  updatedBlocks: UpdatedBlock[];
120
120
  workDir: string;
121
121
  };
122
+ '@CUSTOMSECTION/WORKDIR_CHANGED': {
123
+ workDir: string;
124
+ };
122
125
  };
123
126
  export type UpdatedBlock = {
124
127
  blockId: string;
@@ -107,25 +107,14 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
107
107
  (0, react_1.useImperativeHandle)(ref, function () {
108
108
  return {
109
109
  selectCB: function (blockId) {
110
- var _a;
111
110
  setSelectedBlockId(blockId);
112
- (_a = document
113
- .querySelector("div[data-grid-id=\"".concat(blockId.replace('CB_', ''), "\"]"))) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
114
- behavior: 'smooth',
115
- block: 'center'
116
- });
117
111
  },
118
112
  selectCBInBulk: function (blockIds) {
119
113
  setBulkBlockIds(blockIds);
120
114
  },
121
115
  selectGroup: function (groupBlockId) {
122
- var _a;
123
116
  setBulkBlockIds([]);
124
117
  setSelectedBlockId(groupBlockId);
125
- (_a = document.querySelector("div[data-group-block-id=\"".concat(groupBlockId, "\"]"))) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
126
- behavior: 'smooth',
127
- block: 'center'
128
- });
129
118
  }
130
119
  };
131
120
  }, [componentBlocks]);
@@ -155,6 +144,17 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
155
144
  setBulkBlockIds([]);
156
145
  }
157
146
  }, [editingSectionId]);
147
+ (0, react_1.useEffect)(function () {
148
+ var _a;
149
+ var workDir = (_a = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _a !== void 0 ? _a : 'ROOT';
150
+ sectionActionHandler &&
151
+ sectionActionHandler({
152
+ type: '@CUSTOMSECTION/WORKDIR_CHANGED',
153
+ payload: {
154
+ workDir: workDir
155
+ }
156
+ });
157
+ }, [newblock, editingGroupBlock, sectionActionHandler]);
158
158
  // NOTE: 추후에 event를 외부에서 전달받게하거나, 아예 상태를 끌어올리거나 해야합니다.
159
159
  (0, react_1.useLayoutEffect)(function () {
160
160
  var _a, _b, _c, _d, _e, _f;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.202",
3
+ "version": "2.5.204",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",