pds-dev-kit-web-test 2.5.59 → 2.5.61

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: {
@@ -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;
@@ -113,21 +113,15 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
113
113
  (0, react_1.useImperativeHandle)(ref, function () {
114
114
  return {
115
115
  selectCB: function (cbId) {
116
- // setSelectedCB(cbId);
116
+ setSelectedBlockId(blockIdMap.CB_ID[cbId]);
117
117
  },
118
118
  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
- // });
119
+ var blockIds = cbIds.map(function (cbid) { return blockIdMap.CB_ID[cbid]; });
120
+ setBulkBlockIds(blockIds);
121
+ },
122
+ selectGroup: function (groupBlockId) {
123
+ setBulkBlockIds([]);
124
+ setSelectedBlockId(groupBlockId);
131
125
  }
132
126
  };
133
127
  }, [componentBlocks]);
@@ -605,6 +599,21 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
605
599
  }
606
600
  });
607
601
  };
602
+ var onGroupDragStop = function (_a) {
603
+ var updatedItems = _a.updatedItems;
604
+ sectionActionHandler &&
605
+ sectionActionHandler({
606
+ type: '@CUSTOMSECTION/GROUP_DRAG_STOP',
607
+ payload: {
608
+ updatedBlocks: updatedItems.map(function (i) { return ({
609
+ cbId: Number(i.id),
610
+ blockId: blockIdMap.CB_ID[Number(i.id)],
611
+ x: i.x,
612
+ y: i.y
613
+ }); })
614
+ }
615
+ });
616
+ };
608
617
  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
618
  e.stopPropagation();
610
619
  e.preventDefault();
@@ -620,7 +629,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
620
629
  maxWidth: customSectionStyles.maxWidth,
621
630
  minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
622
631
  fontSize: "".concat(baseFontSize, "px")
623
- }, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
632
+ }, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onGroupDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
624
633
  // GROUP
625
634
  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
635
  var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
@@ -49,7 +49,6 @@ var styled_components_1 = __importDefault(require("styled-components"));
49
49
  var components_1 = require("../../components");
50
50
  var CustomSection_1 = require("./CustomSection");
51
51
  var FlexGridItem_1 = __importDefault(require("./FlexGridItem"));
52
- require("./hooks/useGroupDrag");
53
52
  var useGroupDrag_1 = require("./hooks/useGroupDrag/useGroupDrag");
54
53
  var utils_1 = require("./hooks/useGroupDrag/utils");
55
54
  var useResizableObserver_1 = require("./hooks/useResizableObserver");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.59",
3
+ "version": "2.5.61",
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",