pds-dev-kit-web-test 2.5.29 → 2.5.30

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.
@@ -82,6 +82,7 @@ type ActionHandlerPayload = {
82
82
  '@CUSTOMSECTION/ON_DROP_FROM_OUTSIDE': {
83
83
  layout: Layout;
84
84
  layoutItem: LayoutItem;
85
+ data: any;
85
86
  };
86
87
  '@CUSTOMSECTION/ON_DROP_DRAG_OVER': {
87
88
  e: any;
@@ -446,9 +446,9 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
446
446
  return false;
447
447
  })();
448
448
  var _j = (0, react_1.useState)(), droppingItem = _j[0], setDroppingItem = _j[1];
449
- var onDrop = function (layout, layoutItem, _event) {
450
- // const data = _event.dataTransfer.getData('text/plain');
451
- // setDroppingItem(data);
449
+ var onDrop = function (layout, layoutItem, e) {
450
+ var data = e.dataTransfer.getData('text/plain');
451
+ console.log(data);
452
452
  // alert(`Dropped element props:\n${JSON.stringify(layoutItem, ['x', 'y', 'w', 'h'], 2)}`);
453
453
  if (!isEditMode) {
454
454
  return;
@@ -458,7 +458,8 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
458
458
  type: '@CUSTOMSECTION/ON_DROP_FROM_OUTSIDE',
459
459
  payload: {
460
460
  layout: layout,
461
- layoutItem: layoutItem
461
+ layoutItem: layoutItem,
462
+ data: data
462
463
  }
463
464
  });
464
465
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.5.29",
3
+ "version": "2.5.30",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",