pds-dev-kit-web 2.2.104 → 2.2.105
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.
- package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/DynamicLayout.js +3 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +3 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
- package/dist/src/sub/DynamicLayout/types.d.ts +1 -0
- package/package.json +2 -2
- package/release-note.md +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DynamicLayoutProps } from './types';
|
|
3
|
-
declare function DynamicLayout({ device, mode, isPreview, sections, scrollDownTargetSectionId, editingSectionId, navigationHandler, sectionActionHandler, onClickEditSection, programmedSectionComponents, shortcutKeyMode, dynamicLayoutRef }: DynamicLayoutProps): JSX.Element;
|
|
3
|
+
declare function DynamicLayout({ device, mode, isPreview, sections, scrollDownTargetSectionId, editingSectionId, navigationHandler, sectionActionHandler, onClickEditSection, programmedSectionComponents, shortcutKeyMode, dynamicLayoutRef, zoomScale }: DynamicLayoutProps): JSX.Element;
|
|
4
4
|
export default DynamicLayout;
|
|
@@ -25,7 +25,7 @@ var EditModeSectionMatcher_1 = require("./components/EditModeSectionMatcher");
|
|
|
25
25
|
var SectionMatcher_1 = require("./components/SectionMatcher");
|
|
26
26
|
var dynamicLayoutContext_1 = require("./dynamicLayoutContext");
|
|
27
27
|
function DynamicLayout(_a) {
|
|
28
|
-
var device = _a.device, _b = _a.mode, mode = _b === void 0 ? 'NORMAL' : _b, isPreview = _a.isPreview, sections = _a.sections, scrollDownTargetSectionId = _a.scrollDownTargetSectionId, editingSectionId = _a.editingSectionId, navigationHandler = _a.navigationHandler, sectionActionHandler = _a.sectionActionHandler, onClickEditSection = _a.onClickEditSection, programmedSectionComponents = _a.programmedSectionComponents, shortcutKeyMode = _a.shortcutKeyMode, dynamicLayoutRef = _a.dynamicLayoutRef;
|
|
28
|
+
var device = _a.device, _b = _a.mode, mode = _b === void 0 ? 'NORMAL' : _b, isPreview = _a.isPreview, sections = _a.sections, scrollDownTargetSectionId = _a.scrollDownTargetSectionId, editingSectionId = _a.editingSectionId, navigationHandler = _a.navigationHandler, sectionActionHandler = _a.sectionActionHandler, onClickEditSection = _a.onClickEditSection, programmedSectionComponents = _a.programmedSectionComponents, shortcutKeyMode = _a.shortcutKeyMode, dynamicLayoutRef = _a.dynamicLayoutRef, zoomScale = _a.zoomScale;
|
|
29
29
|
var filteredSortedSection = __spreadArray([], sections, true).filter(function (section) {
|
|
30
30
|
var _a;
|
|
31
31
|
if (!section.display) {
|
|
@@ -50,7 +50,8 @@ function DynamicLayout(_a) {
|
|
|
50
50
|
sectionActionHandler: sectionActionHandler,
|
|
51
51
|
editingSectionId: editingSectionId,
|
|
52
52
|
programmedSectionComponents: programmedSectionComponents,
|
|
53
|
-
shortcutKeyMode: shortcutKeyMode
|
|
53
|
+
shortcutKeyMode: shortcutKeyMode,
|
|
54
|
+
zoomScale: zoomScale
|
|
54
55
|
} }, { children: [mode === 'EDIT' && onClickEditSection && ((0, jsx_runtime_1.jsx)(EditModeSectionMatcher_1.EditModeSectionMatcher, { dynamicLayoutRef: dynamicLayoutRef, editingSectionId: editingSectionId, scrollDownTargetSectionId: scrollDownTargetSectionId, filteredSortedSection: filteredSortedSection, onClickEditSection: onClickEditSection })), mode !== 'EDIT' &&
|
|
55
56
|
(iframeSection ? ((0, jsx_runtime_1.jsx)(SectionMatcher_1.SectionMatcher, __assign({}, iframeSection), iframeSection.id)) : (filteredSortedSection.map(function (section) { return (0, jsx_runtime_1.jsx)(SectionMatcher_1.SectionMatcher, __assign({}, section), section.id); })))] })));
|
|
56
57
|
}
|
|
@@ -75,7 +75,7 @@ var MOBILE_GRID_COLS = 8;
|
|
|
75
75
|
var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px");
|
|
76
76
|
var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
|
|
77
77
|
var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
78
|
-
var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, editingSectionId = _a.editingSectionId, mode = _a.mode, shortcutKeyMode = _a.shortcutKeyMode, sectionActionHandler = _a.sectionActionHandler;
|
|
78
|
+
var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, editingSectionId = _a.editingSectionId, mode = _a.mode, shortcutKeyMode = _a.shortcutKeyMode, sectionActionHandler = _a.sectionActionHandler, zoomScale = _a.zoomScale;
|
|
79
79
|
var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
|
|
80
80
|
var _b = jsonProperties.data, CB_PLACEMENT_PROP_SECTION = _b.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _b.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _b.CB_CONTENT_PROP_SECTION;
|
|
81
81
|
var _c = (0, react_1.useState)(null), selectedCB = _c[0], setSelectedCB = _c[1];
|
|
@@ -458,7 +458,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
|
458
458
|
fontSize: "".concat(baseFontSize, "px")
|
|
459
459
|
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop,
|
|
460
460
|
// onFitToContent={onAutoFitContent}
|
|
461
|
-
onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
|
|
461
|
+
onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode, transformScale: zoomScale }, { children: keepSimilarOrderToPreventRerender(layouts[layoutByDevice]).map(function (each, index) {
|
|
462
462
|
var _a;
|
|
463
463
|
if (each === null) {
|
|
464
464
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {});
|
|
@@ -472,7 +472,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
|
472
472
|
e.stopPropagation();
|
|
473
473
|
e.preventDefault();
|
|
474
474
|
onContextMenuCB('group', e);
|
|
475
|
-
} }, { children: (0, jsx_runtime_1.jsx)(WidthProvidedRGL, __assign({ cols: each.w, allowOverlap: true, layout: each.groupLayouts, rowHeight: rowHeight, containerPadding: [0, 0], margin: [10, 10], isDraggable: false, isResizable: false, style: {
|
|
475
|
+
} }, { children: (0, jsx_runtime_1.jsx)(WidthProvidedRGL, __assign({ cols: each.w, allowOverlap: true, layout: each.groupLayouts, rowHeight: rowHeight, containerPadding: [0, 0], margin: [10, 10], isDraggable: false, isResizable: false, transformScale: zoomScale, style: {
|
|
476
476
|
width: '100%'
|
|
477
477
|
} }, { children: (_a = each.groupLayouts) === null || _a === void 0 ? void 0 : _a.map(function (layoutItem, index, array) {
|
|
478
478
|
var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === layoutItem.i; });
|
|
@@ -29,8 +29,8 @@ function parsePropPlacement(props, id, cbCode) {
|
|
|
29
29
|
y: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY,
|
|
30
30
|
w: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS,
|
|
31
31
|
h: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS,
|
|
32
|
-
z: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX + 500
|
|
33
|
-
autoResize: cbCode ===
|
|
32
|
+
z: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX + 500
|
|
33
|
+
// autoResize: cbCode === CB_ALL_CODES.CB_TEXT
|
|
34
34
|
};
|
|
35
35
|
var mobileLayout = {
|
|
36
36
|
i: id.toString(),
|
|
@@ -228,6 +228,7 @@ export type DynamicLayoutProps = {
|
|
|
228
228
|
width?: number;
|
|
229
229
|
shortcutKeyMode?: CustomSectionShortcutKeysType;
|
|
230
230
|
dynamicLayoutRef?: Ref<CustomSectionImperativeHandleRef>;
|
|
231
|
+
zoomScale?: number;
|
|
231
232
|
};
|
|
232
233
|
export type NavHandlerAction = {
|
|
233
234
|
openNewTab: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pds-dev-kit-web",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.105",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"private": false,
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"i18next-intervalplural-postprocessor": "^3.0.0",
|
|
23
23
|
"lottie-react": "^2.3.1",
|
|
24
24
|
"nuka-carousel": "^4.8.4",
|
|
25
|
-
"publ-echo": "^0.0.
|
|
25
|
+
"publ-echo": "^0.0.104",
|
|
26
26
|
"react-hook-form": "^7.28.1",
|
|
27
27
|
"react-i18next": "^11.12.0",
|
|
28
28
|
"react-router-dom": "^5.2.0",
|