pds-dev-kit-web-test 0.3.48 → 0.3.50
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/src/sub/DynamicLayout/sectionActionTypes.d.ts +2 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js +15 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/utils.d.ts +1 -0
- package/package.json +1 -1
- package/release-note.md +5 -4
- package/webhook/node_modules/esrecurse/.babelrc +0 -3
|
@@ -57,8 +57,8 @@ type ActionHandlerPayload = {
|
|
|
57
57
|
'@CUSTOMSECTION/COLLISION_NOT_FOUND': {
|
|
58
58
|
message: string;
|
|
59
59
|
};
|
|
60
|
-
'@CUSTOMSECTION/
|
|
61
|
-
|
|
60
|
+
'@CUSTOMSECTION/ESCAPE_ONE_FROM_GROUP': {
|
|
61
|
+
id: string;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
64
64
|
type ActionMap<M extends {
|
|
@@ -415,14 +415,14 @@ var CommentList = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
|
415
415
|
});
|
|
416
416
|
function keepSimilarOrderToPreventRerender(arr) {
|
|
417
417
|
var _a;
|
|
418
|
-
var arrCopy = __spreadArray([], arr, true);
|
|
418
|
+
var arrCopy = __spreadArray([], arr, true).sort(function (a, b) { return Number(a.i) - Number(b.i); });
|
|
419
419
|
var groupIdx = arrCopy.findIndex(function (each) { return each.i === 'group'; });
|
|
420
420
|
if (groupIdx >= 0) {
|
|
421
421
|
var group = arrCopy.splice(groupIdx, 1)[0];
|
|
422
422
|
(_a = group.groupLayouts) === null || _a === void 0 ? void 0 : _a.sort(function (a, b) { return Number(a.i) - Number(b.i); });
|
|
423
|
-
return __spreadArray(
|
|
423
|
+
return __spreadArray([group], arrCopy, true);
|
|
424
424
|
}
|
|
425
|
-
return __spreadArray([], arrCopy
|
|
425
|
+
return __spreadArray([null], arrCopy, true);
|
|
426
426
|
}
|
|
427
427
|
function isLayoutPlacementSame(current, prev) {
|
|
428
428
|
if (!prev) {
|
package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js
CHANGED
|
@@ -45,6 +45,14 @@ function useGroupDrag(_a) {
|
|
|
45
45
|
// NOTE: 그룹이 없는 경우
|
|
46
46
|
if (groupIdx < 0) {
|
|
47
47
|
var group_1 = (0, utils_1.getGroupForMultiple)(currentLayoutCopy);
|
|
48
|
+
sectionActionHandler &&
|
|
49
|
+
sectionActionHandler({
|
|
50
|
+
type: '@CUSTOMSECTION/GROUP_CREATED',
|
|
51
|
+
payload: {
|
|
52
|
+
message: 'group generated',
|
|
53
|
+
data: group_1
|
|
54
|
+
}
|
|
55
|
+
});
|
|
48
56
|
return __assign(__assign({}, prev), (_a = {}, _a[layoutByDevice] = [group_1], _a));
|
|
49
57
|
}
|
|
50
58
|
// NOTE: 그룹이 이미 있는경우
|
|
@@ -86,6 +94,13 @@ function useGroupDrag(_a) {
|
|
|
86
94
|
currentLayoutCopy.push(escapedItem);
|
|
87
95
|
var newGroup = (0, utils_1.recalculatedGroup)(group);
|
|
88
96
|
currentLayoutCopy.splice(groupIdx, 1, newGroup);
|
|
97
|
+
sectionActionHandler &&
|
|
98
|
+
sectionActionHandler({
|
|
99
|
+
type: '@CUSTOMSECTION/ESCAPE_ONE_FROM_GROUP',
|
|
100
|
+
payload: {
|
|
101
|
+
id: id
|
|
102
|
+
}
|
|
103
|
+
});
|
|
89
104
|
return __assign(__assign({}, prev), (_a = {}, _a[layoutByDevice] = currentLayoutCopy, _a));
|
|
90
105
|
});
|
|
91
106
|
}
|
|
@@ -2,6 +2,7 @@ import type { ComponentBlock } from '../../types';
|
|
|
2
2
|
import type { LayoutItem } from 'publ-echo/dist/lib';
|
|
3
3
|
export interface LayoutItemWithGroupType extends LayoutItem {
|
|
4
4
|
childrenIds: string[];
|
|
5
|
+
keepInLastIndex?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export declare function getGroupData(elem1: LayoutItemWithGroupType, elem2: LayoutItemWithGroupType): LayoutItemWithGroupType;
|
|
7
8
|
export declare function recalculatedGroup(group: LayoutItemWithGroupType): LayoutItemWithGroupType;
|
package/package.json
CHANGED
package/release-note.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
#
|
|
2
|
-
## [
|
|
3
|
-
##
|
|
1
|
+
# PDS-DEV-KIT-WEB Release Notes
|
|
2
|
+
## [v2.2.41]
|
|
3
|
+
## urgent|https://design.storybook.publ.biz/
|
|
4
|
+
|
|
4
5
|
### sub
|
|
5
6
|
* DynamicLayout
|
|
6
|
-
*
|
|
7
|
+
* CB-YOUTUBE AUTOPLAY 추가
|