pds-dev-kit-web-test 2.5.58 → 2.5.60
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/pagesPreviewMock.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +161 -163
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +10 -1
- package/dist/src/sub/DynamicLayout/sectionActionTypes.js +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +24 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js +8 -8
- package/package.json +2 -2
@@ -7049,169 +7049,167 @@ exports.oliverSections = [
|
|
7049
7049
|
id: 721110,
|
7050
7050
|
insertedAt: '2024-07-31T06:31:10',
|
7051
7051
|
jsonProperties: {
|
7052
|
-
pedigree:
|
7053
|
-
|
7054
|
-
|
7055
|
-
|
7056
|
-
|
7057
|
-
|
7058
|
-
|
7059
|
-
|
7060
|
-
|
7061
|
-
|
7062
|
-
|
7063
|
-
|
7064
|
-
|
7065
|
-
|
7066
|
-
|
7067
|
-
|
7068
|
-
|
7069
|
-
|
7070
|
-
|
7071
|
-
|
7072
|
-
|
7073
|
-
|
7074
|
-
|
7075
|
-
|
7076
|
-
|
7077
|
-
|
7078
|
-
|
7079
|
-
|
7080
|
-
|
7081
|
-
|
7082
|
-
|
7083
|
-
|
7084
|
-
|
7085
|
-
|
7086
|
-
|
7087
|
-
|
7088
|
-
|
7089
|
-
|
7090
|
-
|
7091
|
-
|
7092
|
-
|
7093
|
-
|
7094
|
-
|
7095
|
-
|
7096
|
-
|
7097
|
-
|
7098
|
-
|
7099
|
-
|
7100
|
-
|
7101
|
-
|
7102
|
-
|
7103
|
-
|
7104
|
-
|
7105
|
-
|
7106
|
-
|
7107
|
-
|
7108
|
-
|
7109
|
-
|
7110
|
-
|
7111
|
-
|
7112
|
-
|
7113
|
-
|
7114
|
-
|
7115
|
-
|
7116
|
-
|
7117
|
-
|
7118
|
-
|
7119
|
-
|
7120
|
-
|
7121
|
-
|
7122
|
-
|
7123
|
-
|
7124
|
-
|
7125
|
-
|
7126
|
-
|
7127
|
-
|
7128
|
-
|
7129
|
-
|
7130
|
-
|
7131
|
-
|
7132
|
-
|
7133
|
-
|
7134
|
-
|
7135
|
-
|
7136
|
-
|
7137
|
-
|
7138
|
-
|
7139
|
-
|
7140
|
-
|
7141
|
-
|
7142
|
-
|
7143
|
-
|
7144
|
-
|
7145
|
-
|
7146
|
-
|
7147
|
-
|
7148
|
-
|
7149
|
-
|
7150
|
-
|
7151
|
-
|
7152
|
-
|
7153
|
-
|
7154
|
-
|
7155
|
-
|
7156
|
-
|
7157
|
-
|
7158
|
-
|
7159
|
-
|
7160
|
-
|
7161
|
-
|
7162
|
-
|
7163
|
-
|
7164
|
-
|
7165
|
-
|
7166
|
-
|
7167
|
-
|
7168
|
-
|
7169
|
-
|
7170
|
-
|
7171
|
-
|
7172
|
-
|
7173
|
-
|
7174
|
-
|
7175
|
-
|
7176
|
-
|
7177
|
-
|
7178
|
-
|
7179
|
-
|
7180
|
-
|
7181
|
-
|
7182
|
-
|
7183
|
-
|
7184
|
-
|
7185
|
-
|
7186
|
-
|
7187
|
-
|
7188
|
-
|
7189
|
-
|
7190
|
-
|
7191
|
-
|
7192
|
-
|
7193
|
-
|
7194
|
-
|
7195
|
-
|
7196
|
-
|
7197
|
-
|
7198
|
-
|
7199
|
-
|
7200
|
-
|
7201
|
-
|
7202
|
-
|
7203
|
-
|
7204
|
-
|
7205
|
-
|
7206
|
-
|
7207
|
-
|
7208
|
-
|
7209
|
-
|
7210
|
-
|
7211
|
-
|
7212
|
-
|
7213
|
-
}
|
7214
|
-
],
|
7052
|
+
pedigree: {
|
7053
|
+
blockId: 'ROOT',
|
7054
|
+
type: 'GROUP_BLOCK',
|
7055
|
+
zOrderDesktopInternal: 1,
|
7056
|
+
zOrderMobileInternal: 1,
|
7057
|
+
children: [
|
7058
|
+
{
|
7059
|
+
blockId: 'GB_16',
|
7060
|
+
type: 'GROUP_BLOCK',
|
7061
|
+
zOrderDesktopInternal: 1,
|
7062
|
+
zOrderMobileInternal: 1,
|
7063
|
+
children: [
|
7064
|
+
{
|
7065
|
+
blockId: 'GB_17',
|
7066
|
+
type: 'GROUP_BLOCK',
|
7067
|
+
zOrderDesktopInternal: 1,
|
7068
|
+
zOrderMobileInternal: 1,
|
7069
|
+
children: [
|
7070
|
+
{
|
7071
|
+
blockId: 'CB_1',
|
7072
|
+
type: 'COMPONENT_BLOCK',
|
7073
|
+
zOrderDesktopInternal: 1,
|
7074
|
+
zOrderMobileInternal: 1,
|
7075
|
+
componentBlockId: 1
|
7076
|
+
},
|
7077
|
+
{
|
7078
|
+
blockId: 'CB_2',
|
7079
|
+
type: 'COMPONENT_BLOCK',
|
7080
|
+
zOrderDesktopInternal: 2,
|
7081
|
+
zOrderMobileInternal: 2,
|
7082
|
+
componentBlockId: 2
|
7083
|
+
},
|
7084
|
+
{
|
7085
|
+
blockId: 'GB_18',
|
7086
|
+
type: 'GROUP_BLOCK',
|
7087
|
+
zOrderDesktopInternal: 3,
|
7088
|
+
zOrderMobileInternal: 3,
|
7089
|
+
children: [
|
7090
|
+
{
|
7091
|
+
blockId: 'CB_3',
|
7092
|
+
type: 'COMPONENT_BLOCK',
|
7093
|
+
zOrderDesktopInternal: 1,
|
7094
|
+
zOrderMobileInternal: 1,
|
7095
|
+
componentBlockId: 3
|
7096
|
+
},
|
7097
|
+
{
|
7098
|
+
blockId: 'CB_4',
|
7099
|
+
type: 'COMPONENT_BLOCK',
|
7100
|
+
zOrderDesktopInternal: 2,
|
7101
|
+
zOrderMobileInternal: 2,
|
7102
|
+
componentBlockId: 4
|
7103
|
+
},
|
7104
|
+
{
|
7105
|
+
blockId: 'GB_19',
|
7106
|
+
type: 'GROUP_BLOCK',
|
7107
|
+
zOrderDesktopInternal: 3,
|
7108
|
+
zOrderMobileInternal: 3,
|
7109
|
+
children: [
|
7110
|
+
{
|
7111
|
+
blockId: 'CB_5',
|
7112
|
+
type: 'COMPONENT_BLOCK',
|
7113
|
+
zOrderDesktopInternal: 1,
|
7114
|
+
zOrderMobileInternal: 1,
|
7115
|
+
componentBlockId: 5
|
7116
|
+
},
|
7117
|
+
{
|
7118
|
+
blockId: 'CB_6',
|
7119
|
+
type: 'COMPONENT_BLOCK',
|
7120
|
+
zOrderDesktopInternal: 2,
|
7121
|
+
zOrderMobileInternal: 2,
|
7122
|
+
componentBlockId: 6
|
7123
|
+
}
|
7124
|
+
]
|
7125
|
+
}
|
7126
|
+
]
|
7127
|
+
}
|
7128
|
+
]
|
7129
|
+
},
|
7130
|
+
{
|
7131
|
+
blockId: 'GB_20',
|
7132
|
+
type: 'GROUP_BLOCK',
|
7133
|
+
zOrderDesktopInternal: 2,
|
7134
|
+
zOrderMobileInternal: 2,
|
7135
|
+
children: [
|
7136
|
+
{
|
7137
|
+
blockId: 'CB_7',
|
7138
|
+
type: 'COMPONENT_BLOCK',
|
7139
|
+
zOrderDesktopInternal: 1,
|
7140
|
+
zOrderMobileInternal: 1,
|
7141
|
+
componentBlockId: 7
|
7142
|
+
},
|
7143
|
+
{
|
7144
|
+
blockId: 'CB_8',
|
7145
|
+
type: 'COMPONENT_BLOCK',
|
7146
|
+
zOrderDesktopInternal: 2,
|
7147
|
+
zOrderMobileInternal: 2,
|
7148
|
+
componentBlockId: 8
|
7149
|
+
}
|
7150
|
+
]
|
7151
|
+
},
|
7152
|
+
{
|
7153
|
+
blockId: 'CB_9',
|
7154
|
+
type: 'COMPONENT_BLOCK',
|
7155
|
+
zOrderDesktopInternal: 3,
|
7156
|
+
zOrderMobileInternal: 3,
|
7157
|
+
componentBlockId: 9
|
7158
|
+
},
|
7159
|
+
{
|
7160
|
+
blockId: 'CB_10',
|
7161
|
+
type: 'COMPONENT_BLOCK',
|
7162
|
+
zOrderDesktopInternal: 4,
|
7163
|
+
zOrderMobileInternal: 4,
|
7164
|
+
componentBlockId: 10
|
7165
|
+
}
|
7166
|
+
]
|
7167
|
+
},
|
7168
|
+
{
|
7169
|
+
blockId: 'GB_21',
|
7170
|
+
type: 'GROUP_BLOCK',
|
7171
|
+
zOrderDesktopInternal: 2,
|
7172
|
+
zOrderMobileInternal: 2,
|
7173
|
+
children: [
|
7174
|
+
{
|
7175
|
+
blockId: 'CB_11',
|
7176
|
+
type: 'COMPONENT_BLOCK',
|
7177
|
+
zOrderDesktopInternal: 1,
|
7178
|
+
zOrderMobileInternal: 1,
|
7179
|
+
componentBlockId: 11
|
7180
|
+
}
|
7181
|
+
]
|
7182
|
+
},
|
7183
|
+
{
|
7184
|
+
blockId: 'CB_12',
|
7185
|
+
type: 'COMPONENT_BLOCK',
|
7186
|
+
zOrderDesktopInternal: 3,
|
7187
|
+
zOrderMobileInternal: 3,
|
7188
|
+
componentBlockId: 12
|
7189
|
+
},
|
7190
|
+
{
|
7191
|
+
blockId: 'CB_13',
|
7192
|
+
type: 'COMPONENT_BLOCK',
|
7193
|
+
zOrderDesktopInternal: 4,
|
7194
|
+
zOrderMobileInternal: 4,
|
7195
|
+
componentBlockId: 13
|
7196
|
+
},
|
7197
|
+
{
|
7198
|
+
blockId: 'CB_14',
|
7199
|
+
type: 'COMPONENT_BLOCK',
|
7200
|
+
zOrderDesktopInternal: 5,
|
7201
|
+
zOrderMobileInternal: 5,
|
7202
|
+
componentBlockId: 14
|
7203
|
+
},
|
7204
|
+
{
|
7205
|
+
blockId: 'CB_15',
|
7206
|
+
type: 'COMPONENT_BLOCK',
|
7207
|
+
zOrderDesktopInternal: 6,
|
7208
|
+
zOrderMobileInternal: 6,
|
7209
|
+
componentBlockId: 15
|
7210
|
+
}
|
7211
|
+
]
|
7212
|
+
},
|
7215
7213
|
currentVersion: '2023-08-03',
|
7216
7214
|
data: {
|
7217
7215
|
CB_CONTENT_PROP_HOVER: {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { ComponentBlock, GroupBlock } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
|
2
|
+
import type { ComponentBlock, GroupBlock } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
|
3
3
|
import type { Layout } from 'publ-echo/dist/lib';
|
4
4
|
import type { ResizeEventType } from 'publ-echo/dist/lib/GridItem/types';
|
5
5
|
import type { LayoutItem, Layouts } from 'publ-echo/dist/lib/GridLayoutEditor/types';
|
@@ -99,6 +99,15 @@ type ActionHandlerPayload = {
|
|
99
99
|
'@CUSTOMSECTION/ESCAPE_ONE_FROM_BULK': {
|
100
100
|
id: string;
|
101
101
|
};
|
102
|
+
'@CUSTOMSECTION/GROUP_DRAG_STOP': {
|
103
|
+
updatedBlocks: UpdatedBlock[];
|
104
|
+
};
|
105
|
+
};
|
106
|
+
export type UpdatedBlock = {
|
107
|
+
blockId: string;
|
108
|
+
cbId: number;
|
109
|
+
x: number;
|
110
|
+
y: number;
|
102
111
|
};
|
103
112
|
type ActionMap<M extends {
|
104
113
|
[index: string]: any;
|
@@ -54,6 +54,7 @@ exports.S_gleStyles = void 0;
|
|
54
54
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
55
55
|
var publ_echo_test_1 = require("publ-echo-test");
|
56
56
|
var group_1 = require("publ-echo-test/dist/lib/GridLayoutEditor/group");
|
57
|
+
require("publ-echo-test/dist/lib/GridLayoutEditor/types");
|
57
58
|
var react_1 = __importStar(require("react"));
|
58
59
|
var ErrorBoundary_1 = require("@sub/DynamicLayout/components/Section/ErrorBoundary");
|
59
60
|
var dynamicLayoutContext_1 = require("@sub/DynamicLayout/dynamicLayoutContext");
|
@@ -113,21 +114,15 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
113
114
|
(0, react_1.useImperativeHandle)(ref, function () {
|
114
115
|
return {
|
115
116
|
selectCB: function (cbId) {
|
116
|
-
|
117
|
+
setSelectedBlockId(blockIdMap.CB_ID[cbId]);
|
117
118
|
},
|
118
119
|
selectCBInBulk: function (cbIds) {
|
119
|
-
var
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
// filteredLayout.push(newGroupLayout);
|
126
|
-
// return {
|
127
|
-
// ...prev,
|
128
|
-
// [layoutByDevice]: filteredLayout
|
129
|
-
// };
|
130
|
-
// });
|
120
|
+
var blockIds = cbIds.map(function (cbid) { return blockIdMap.CB_ID[cbid]; });
|
121
|
+
setBulkBlockIds(blockIds);
|
122
|
+
},
|
123
|
+
selectGroup: function (groupBlockId) {
|
124
|
+
setBulkBlockIds([]);
|
125
|
+
setSelectedBlockId(groupBlockId);
|
131
126
|
}
|
132
127
|
};
|
133
128
|
}, [componentBlocks]);
|
@@ -605,6 +600,21 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
605
600
|
}
|
606
601
|
});
|
607
602
|
};
|
603
|
+
var onGroupDragStop = function (_a) {
|
604
|
+
var updatedItems = _a.updatedItems;
|
605
|
+
sectionActionHandler &&
|
606
|
+
sectionActionHandler({
|
607
|
+
type: '@CUSTOMSECTION/GROUP_DRAG_STOP',
|
608
|
+
payload: {
|
609
|
+
updatedBlocks: updatedItems.map(function (i) { return ({
|
610
|
+
cbId: Number(i.id),
|
611
|
+
blockId: blockIdMap.CB_ID[Number(i.id)],
|
612
|
+
x: i.x,
|
613
|
+
y: i.y
|
614
|
+
}); })
|
615
|
+
}
|
616
|
+
});
|
617
|
+
};
|
608
618
|
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsxs)(exports.S_gleStyles, __assign({ isBulkMode: shortcutKeyMode === 'BULK_SELECT' }, { children: [showSectionHiddenCover && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_SectionWrapper, __assign({ ref: gleRef, "x-dlayout-section-type": "NO_NAME", onClick: onClickSection, onContextMenu: function (e) {
|
609
619
|
e.stopPropagation();
|
610
620
|
e.preventDefault();
|
@@ -620,7 +630,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
620
630
|
maxWidth: customSectionStyles.maxWidth,
|
621
631
|
minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
|
622
632
|
fontSize: "".concat(baseFontSize, "px")
|
623
|
-
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
|
633
|
+
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onGroupDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
|
624
634
|
// GROUP
|
625
635
|
selectedGroupBlock: (_c = selectedBlockId === null || selectedBlockId === void 0 ? void 0 : selectedBlockId.toString()) !== null && _c !== void 0 ? _c : 'ROOT', editingGroupBlock: editingGroupBlock, blockStructure: newblock, bulkIds: bulkBlockIds, onDoubleClickGroup: onDoubleClickGroup, onClickGroup: onClickGroup, onDoubleClickOutsideGroup: onDoubleClickOutsideGroup }, { children: layouts[layoutByDevice].map(function (each, index) {
|
626
636
|
var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
|
package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js
CHANGED
@@ -47,7 +47,7 @@ function useGroupDrag(_a) {
|
|
47
47
|
var group_1 = (0, utils_1.getGroupForMultiple)(currentLayoutCopy);
|
48
48
|
sectionActionHandler &&
|
49
49
|
sectionActionHandler({
|
50
|
-
type: '@CUSTOMSECTION/
|
50
|
+
type: '@CUSTOMSECTION/BULK_CREATED',
|
51
51
|
payload: {
|
52
52
|
message: 'group generated',
|
53
53
|
data: group_1
|
@@ -65,7 +65,7 @@ function useGroupDrag(_a) {
|
|
65
65
|
var group = (0, utils_1.getGroupForMultiple)(currentLayoutCopy);
|
66
66
|
sectionActionHandler &&
|
67
67
|
sectionActionHandler({
|
68
|
-
type: '@CUSTOMSECTION/
|
68
|
+
type: '@CUSTOMSECTION/BULK_CREATED',
|
69
69
|
payload: {
|
70
70
|
message: 'group generated',
|
71
71
|
data: group
|
@@ -96,7 +96,7 @@ function useGroupDrag(_a) {
|
|
96
96
|
currentLayoutCopy.splice(groupIdx, 1, newGroup);
|
97
97
|
sectionActionHandler &&
|
98
98
|
sectionActionHandler({
|
99
|
-
type: '@CUSTOMSECTION/
|
99
|
+
type: '@CUSTOMSECTION/ESCAPE_ONE_FROM_BULK',
|
100
100
|
payload: {
|
101
101
|
id: id
|
102
102
|
}
|
@@ -124,7 +124,7 @@ function useGroupDrag(_a) {
|
|
124
124
|
currentLayoutCopy.unshift(group);
|
125
125
|
sectionActionHandler &&
|
126
126
|
sectionActionHandler({
|
127
|
-
type: '@CUSTOMSECTION/
|
127
|
+
type: '@CUSTOMSECTION/BULK_CREATED',
|
128
128
|
payload: {
|
129
129
|
message: 'group generated',
|
130
130
|
data: group
|
@@ -153,7 +153,7 @@ function useGroupDrag(_a) {
|
|
153
153
|
});
|
154
154
|
sectionActionHandler &&
|
155
155
|
sectionActionHandler({
|
156
|
-
type: '@CUSTOMSECTION/
|
156
|
+
type: '@CUSTOMSECTION/BULK_DISMISSED',
|
157
157
|
payload: {
|
158
158
|
message: 'group dismissed'
|
159
159
|
}
|
@@ -222,7 +222,7 @@ function useGroupDrag(_a) {
|
|
222
222
|
var filtered = currentLayoutCopy.filter(function (layout) { return !group_2.childrenIds.includes(layout.i); });
|
223
223
|
sectionActionHandler &&
|
224
224
|
sectionActionHandler({
|
225
|
-
type: '@CUSTOMSECTION/
|
225
|
+
type: '@CUSTOMSECTION/BULK_CREATED',
|
226
226
|
payload: {
|
227
227
|
message: 'group generated with collision detect',
|
228
228
|
data: group_2
|
@@ -238,7 +238,7 @@ function useGroupDrag(_a) {
|
|
238
238
|
var filtered = currentLayoutCopy.filter(function (layout) { return !newGroup_1.childrenIds.includes(layout.i); });
|
239
239
|
sectionActionHandler &&
|
240
240
|
sectionActionHandler({
|
241
|
-
type: '@CUSTOMSECTION/
|
241
|
+
type: '@CUSTOMSECTION/BULK_CREATED',
|
242
242
|
payload: {
|
243
243
|
message: 'group generated with collision detect',
|
244
244
|
data: newGroup_1
|
@@ -262,7 +262,7 @@ function useGroupDrag(_a) {
|
|
262
262
|
var filtered = currentLayoutCopy.filter(function (layout) { return !newGroup.childrenIds.includes(layout.i); });
|
263
263
|
sectionActionHandler &&
|
264
264
|
sectionActionHandler({
|
265
|
-
type: '@CUSTOMSECTION/
|
265
|
+
type: '@CUSTOMSECTION/BULK_CREATED',
|
266
266
|
payload: {
|
267
267
|
message: 'group generated with collision detect',
|
268
268
|
data: newGroup
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pds-dev-kit-web-test",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.60",
|
4
4
|
"license": "MIT",
|
5
5
|
"private": false,
|
6
6
|
"main": "dist/index.js",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"lottie-react": "^2.3.1",
|
24
24
|
"nuka-carousel": "^4.8.4",
|
25
25
|
"publ-echo": "^0.0.99",
|
26
|
-
"publ-echo-test": "^0.0.
|
26
|
+
"publ-echo-test": "^0.0.106",
|
27
27
|
"react-hook-form": "^7.28.1",
|
28
28
|
"react-i18next": "^11.12.0",
|
29
29
|
"react-router-dom": "^5.2.0",
|