pds-dev-kit-web-test 2.2.91 → 2.2.93

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.
@@ -60,6 +60,9 @@ type ActionHandlerPayload = {
60
60
  '@CUSTOMSECTION/ESCAPE_ONE_FROM_GROUP': {
61
61
  id: string;
62
62
  };
63
+ '@CUSTOMSECTION/AUTO_RESIZED_TO_FIT_CONTENT': {
64
+ layout: Layout;
65
+ };
63
66
  };
64
67
  type ActionMap<M extends {
65
68
  [index: string]: any;
@@ -404,6 +404,21 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
404
404
  }
405
405
  makeCollisionOfBulk();
406
406
  };
407
+ var onAutoResizedToFit = function (layout) {
408
+ if (!isEditMode) {
409
+ return;
410
+ }
411
+ if (sectionActionHandler) {
412
+ sectionActionHandler({
413
+ type: '@CUSTOMSECTION/AUTO_RESIZED_TO_FIT_CONTENT',
414
+ payload: { layout: layout }
415
+ });
416
+ }
417
+ setLayouts(function () {
418
+ var _a;
419
+ return (__assign(__assign({}, layouts), (_a = {}, _a[layoutByDevice] = layout, _a)));
420
+ });
421
+ };
407
422
  return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(S_gleStyles, { children: (0, jsx_runtime_1.jsx)(S_SectionWrapper, __assign({ ref: gleRef, "x-dlayout-section-type": "NO_NAME", onClick: onClickSection }, { children: (0, jsx_runtime_1.jsx)(components_1.CustomSection, __assign({}, props, { isMobile: isMobile, overrideStyles: {
408
423
  minHeight: customSectionStyles.minHeight,
409
424
  paddingTop: padding.top,
@@ -415,7 +430,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
415
430
  maxWidth: isMobile ? '480px' : customSectionStyles.maxWidth,
416
431
  minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
417
432
  fontSize: "".concat(baseFontSize, "px")
418
- }, onLayoutChange: onLayoutChange, onDragStop: onDragStop, onResizeStop: onResizeStop, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
433
+ }, onAutoResizedToFit: onAutoResizedToFit, onLayoutChange: onLayoutChange, onDragStop: onDragStop, onResizeStop: onResizeStop, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
419
434
  var _a;
420
435
  if (each === null) {
421
436
  return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "2.2.91",
3
+ "version": "2.2.93",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",