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.
@@ -5019,7 +5019,7 @@ export declare const oliverSections: ({
5019
5019
  componentBlockId: number;
5020
5020
  children?: undefined;
5021
5021
  })[];
5022
- }[];
5022
+ };
5023
5023
  currentVersion: string;
5024
5024
  data: {
5025
5025
  CB_CONTENT_PROP_HOVER: {
@@ -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
- blockId: 'ROOT',
7055
- type: 'GROUP_BLOCK',
7056
- zOrderDesktopInternal: 1,
7057
- zOrderMobileInternal: 1,
7058
- children: [
7059
- {
7060
- blockId: 'GB_16',
7061
- type: 'GROUP_BLOCK',
7062
- zOrderDesktopInternal: 1,
7063
- zOrderMobileInternal: 1,
7064
- children: [
7065
- {
7066
- blockId: 'GB_17',
7067
- type: 'GROUP_BLOCK',
7068
- zOrderDesktopInternal: 1,
7069
- zOrderMobileInternal: 1,
7070
- children: [
7071
- {
7072
- blockId: 'CB_1',
7073
- type: 'COMPONENT_BLOCK',
7074
- zOrderDesktopInternal: 1,
7075
- zOrderMobileInternal: 1,
7076
- componentBlockId: 1
7077
- },
7078
- {
7079
- blockId: 'CB_2',
7080
- type: 'COMPONENT_BLOCK',
7081
- zOrderDesktopInternal: 2,
7082
- zOrderMobileInternal: 2,
7083
- componentBlockId: 2
7084
- },
7085
- {
7086
- blockId: 'GB_18',
7087
- type: 'GROUP_BLOCK',
7088
- zOrderDesktopInternal: 3,
7089
- zOrderMobileInternal: 3,
7090
- children: [
7091
- {
7092
- blockId: 'CB_3',
7093
- type: 'COMPONENT_BLOCK',
7094
- zOrderDesktopInternal: 1,
7095
- zOrderMobileInternal: 1,
7096
- componentBlockId: 3
7097
- },
7098
- {
7099
- blockId: 'CB_4',
7100
- type: 'COMPONENT_BLOCK',
7101
- zOrderDesktopInternal: 2,
7102
- zOrderMobileInternal: 2,
7103
- componentBlockId: 4
7104
- },
7105
- {
7106
- blockId: 'GB_19',
7107
- type: 'GROUP_BLOCK',
7108
- zOrderDesktopInternal: 3,
7109
- zOrderMobileInternal: 3,
7110
- children: [
7111
- {
7112
- blockId: 'CB_5',
7113
- type: 'COMPONENT_BLOCK',
7114
- zOrderDesktopInternal: 1,
7115
- zOrderMobileInternal: 1,
7116
- componentBlockId: 5
7117
- },
7118
- {
7119
- blockId: 'CB_6',
7120
- type: 'COMPONENT_BLOCK',
7121
- zOrderDesktopInternal: 2,
7122
- zOrderMobileInternal: 2,
7123
- componentBlockId: 6
7124
- }
7125
- ]
7126
- }
7127
- ]
7128
- }
7129
- ]
7130
- },
7131
- {
7132
- blockId: 'GB_20',
7133
- type: 'GROUP_BLOCK',
7134
- zOrderDesktopInternal: 2,
7135
- zOrderMobileInternal: 2,
7136
- children: [
7137
- {
7138
- blockId: 'CB_7',
7139
- type: 'COMPONENT_BLOCK',
7140
- zOrderDesktopInternal: 1,
7141
- zOrderMobileInternal: 1,
7142
- componentBlockId: 7
7143
- },
7144
- {
7145
- blockId: 'CB_8',
7146
- type: 'COMPONENT_BLOCK',
7147
- zOrderDesktopInternal: 2,
7148
- zOrderMobileInternal: 2,
7149
- componentBlockId: 8
7150
- }
7151
- ]
7152
- },
7153
- {
7154
- blockId: 'CB_9',
7155
- type: 'COMPONENT_BLOCK',
7156
- zOrderDesktopInternal: 3,
7157
- zOrderMobileInternal: 3,
7158
- componentBlockId: 9
7159
- },
7160
- {
7161
- blockId: 'CB_10',
7162
- type: 'COMPONENT_BLOCK',
7163
- zOrderDesktopInternal: 4,
7164
- zOrderMobileInternal: 4,
7165
- componentBlockId: 10
7166
- }
7167
- ]
7168
- },
7169
- {
7170
- blockId: 'GB_21',
7171
- type: 'GROUP_BLOCK',
7172
- zOrderDesktopInternal: 2,
7173
- zOrderMobileInternal: 2,
7174
- children: [
7175
- {
7176
- blockId: 'CB_11',
7177
- type: 'COMPONENT_BLOCK',
7178
- zOrderDesktopInternal: 1,
7179
- zOrderMobileInternal: 1,
7180
- componentBlockId: 11
7181
- }
7182
- ]
7183
- },
7184
- {
7185
- blockId: 'CB_12',
7186
- type: 'COMPONENT_BLOCK',
7187
- zOrderDesktopInternal: 3,
7188
- zOrderMobileInternal: 3,
7189
- componentBlockId: 12
7190
- },
7191
- {
7192
- blockId: 'CB_13',
7193
- type: 'COMPONENT_BLOCK',
7194
- zOrderDesktopInternal: 4,
7195
- zOrderMobileInternal: 4,
7196
- componentBlockId: 13
7197
- },
7198
- {
7199
- blockId: 'CB_14',
7200
- type: 'COMPONENT_BLOCK',
7201
- zOrderDesktopInternal: 5,
7202
- zOrderMobileInternal: 5,
7203
- componentBlockId: 14
7204
- },
7205
- {
7206
- blockId: 'CB_15',
7207
- type: 'COMPONENT_BLOCK',
7208
- zOrderDesktopInternal: 6,
7209
- zOrderMobileInternal: 6,
7210
- componentBlockId: 15
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;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- require("publ-echo-test/dist/lib/GridLayoutEditor/group");
@@ -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
- // setSelectedCB(cbId);
117
+ setSelectedBlockId(blockIdMap.CB_ID[cbId]);
117
118
  },
118
119
  selectCBInBulk: function (cbIds) {
119
- var parsedLayouts = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : []);
120
- // setLayouts((prev) => {
121
- // const filteredLayout = filterItemsById(parsedLayouts[layoutByDevice], cbIds);
122
- // const newGroupLayout = getGroupForMultiple(
123
- // parsedLayouts[layoutByDevice].filter((each) => cbIds.includes(each.i)) as any
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; });
@@ -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/GROUP_CREATED',
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/GROUP_CREATED',
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/ESCAPE_ONE_FROM_GROUP',
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/GROUP_CREATED',
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/GROUP_DISMISSED',
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/GROUP_CREATED',
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/GROUP_CREATED',
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/GROUP_CREATED',
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.58",
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.105",
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",