pds-dev-kit-web-test 2.3.10 → 2.3.11
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.
@@ -418,7 +418,6 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
418
418
|
}
|
419
419
|
makeCollisionOfBulk();
|
420
420
|
};
|
421
|
-
console.log(layouts[layoutByDevice][3]);
|
422
421
|
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(exports.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)(customSectionContext_1.CustomSectionContext.Provider, __assign({ value: { rowHeight: rowHeight, setLayouts: setLayouts, sectionActionHandler: sectionActionHandler } }, { children: (0, jsx_runtime_1.jsx)(components_1.CustomSection, __assign({}, props, { isMobile: isMobile, overrideStyles: {
|
423
422
|
minHeight: customSectionStyles.minHeight,
|
424
423
|
paddingTop: padding.top,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type
|
1
|
+
import { type ComponentBlock } from '../types';
|
2
2
|
export declare function parsePlacement(components: ComponentBlock[]): {
|
3
3
|
sm: {
|
4
4
|
i: string;
|
@@ -7,6 +7,7 @@ export declare function parsePlacement(components: ComponentBlock[]): {
|
|
7
7
|
w: number;
|
8
8
|
h: number;
|
9
9
|
z: number;
|
10
|
+
fitToContent: boolean;
|
10
11
|
}[];
|
11
12
|
lg: {
|
12
13
|
i: string;
|
@@ -15,6 +16,7 @@ export declare function parsePlacement(components: ComponentBlock[]): {
|
|
15
16
|
w: number;
|
16
17
|
h: number;
|
17
18
|
z: number;
|
19
|
+
fitToContent: boolean;
|
18
20
|
}[];
|
19
21
|
};
|
20
22
|
export default parsePlacement;
|
@@ -10,10 +10,11 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
exports.parsePlacement = void 0;
|
13
|
+
var types_1 = require("../types");
|
13
14
|
function parsePlacement(components) {
|
14
15
|
return components.reduce(function (acc, cur) {
|
15
16
|
var id = cur.id, jsonProperties = cur.jsonProperties;
|
16
|
-
var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
|
17
|
+
var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id, cur.componentBlockCode === types_1.CB_ALL_CODES.CB_TEXT), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
|
17
18
|
return {
|
18
19
|
sm: __spreadArray(__spreadArray([], acc.sm, true), [mobileLayout], false),
|
19
20
|
lg: __spreadArray(__spreadArray([], acc.lg, true), [desktopLayout], false)
|
@@ -21,14 +22,15 @@ function parsePlacement(components) {
|
|
21
22
|
}, { sm: [], lg: [] });
|
22
23
|
}
|
23
24
|
exports.parsePlacement = parsePlacement;
|
24
|
-
function parsePropPlacement(props, id) {
|
25
|
+
function parsePropPlacement(props, id, fitToContent) {
|
25
26
|
var desktopLayout = {
|
26
27
|
i: id.toString(),
|
27
28
|
x: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX,
|
28
29
|
y: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY,
|
29
30
|
w: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS,
|
30
31
|
h: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS,
|
31
|
-
z: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX + 500
|
32
|
+
z: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX + 500,
|
33
|
+
fitToContent: fitToContent
|
32
34
|
};
|
33
35
|
var mobileLayout = {
|
34
36
|
i: id.toString(),
|
@@ -36,7 +38,8 @@ function parsePropPlacement(props, id) {
|
|
36
38
|
y: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'],
|
37
39
|
w: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE'],
|
38
40
|
h: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE'],
|
39
|
-
z: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE'] + 500
|
41
|
+
z: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE'] + 500,
|
42
|
+
fitToContent: fitToContent
|
40
43
|
};
|
41
44
|
return {
|
42
45
|
mobileLayout: mobileLayout,
|