pds-dev-kit-web-test 2.7.579 → 2.7.580
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.
|
@@ -77,6 +77,7 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
|
|
|
77
77
|
var _e = props.editorProps, device = _e.device, shortcutKeyMode = _e.shortcutKeyMode, placementRestriction = _e.placementRestriction, compositionActionHandler = _e.compositionActionHandler;
|
|
78
78
|
var editingSectionId = props.compositionData.id;
|
|
79
79
|
var mode = 'EDIT';
|
|
80
|
+
var editorType = 'COMPOSITION_EDITOR';
|
|
80
81
|
var _f = props.compositionData, componentBlocks = _f.componentBlocks, jsonProperties = _f.jsonProperties;
|
|
81
82
|
var sectionPedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
|
|
82
83
|
var _g = (0, react_1.useState)(sectionPedigree), pedigreeState = _g[0], setPedigreeState = _g[1];
|
|
@@ -1059,16 +1060,8 @@ var CompositionEditor = (0, react_1.forwardRef)(function CompositionEditorCanvas
|
|
|
1059
1060
|
var i18n = (0, react_i18next_1.useTranslation)('translation').i18n;
|
|
1060
1061
|
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
|
|
1061
1062
|
device: device,
|
|
1062
|
-
mode: mode
|
|
1063
|
-
|
|
1064
|
-
// isPreview,
|
|
1065
|
-
// navigationHandler,
|
|
1066
|
-
// sectionActionHandler,
|
|
1067
|
-
// editingSectionId,
|
|
1068
|
-
// programmedSectionComponents,
|
|
1069
|
-
// shortcutKeyMode,
|
|
1070
|
-
// zoomScale,
|
|
1071
|
-
// queryData
|
|
1063
|
+
mode: mode,
|
|
1064
|
+
editorType: editorType
|
|
1072
1065
|
} }, { children: (0, jsx_runtime_1.jsx)(gleStyles_1.S_gleStyles, __assign({ isBulkMode: shortcutKeyMode === 'BULK_SELECT', strKeys: { str_grid_height_variable: i18n.t('str_grid_height_variable') } }, { children: (0, jsx_runtime_1.jsx)(S_COMPOSITIONWrapper, __assign({ ref: gleRef, "x-dlayout-section-type": "NO_NAME", onClick: onClickSection, onContextMenu: function (e) {
|
|
1073
1066
|
e.stopPropagation();
|
|
1074
1067
|
e.preventDefault();
|
|
@@ -57,7 +57,7 @@ var groupUtils_1 = __importDefault(require("../utils/groupUtils"));
|
|
|
57
57
|
var CompositionBackground_1 = __importDefault(require("./CompositionBackground"));
|
|
58
58
|
var Composition = (0, react_1.forwardRef)(function CustomSection(props) {
|
|
59
59
|
var _a, _b, _c, _d;
|
|
60
|
-
var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, sectionActionHandler = _e.sectionActionHandler, navigationHandler = _e.navigationHandler;
|
|
60
|
+
var _e = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _e.device, editingSectionId = _e.editingSectionId, mode = _e.mode, shortcutKeyMode = _e.shortcutKeyMode, editorType = _e.editorType, sectionActionHandler = _e.sectionActionHandler, navigationHandler = _e.navigationHandler;
|
|
61
61
|
var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties, ccbCode = props.ccbCode;
|
|
62
62
|
var pedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
|
|
63
63
|
var _f = jsonProperties, _g = _f.data, CB_PLACEMENT_PROP_COMPOSITION = _g.CB_PLACEMENT_PROP_COMPOSITION, CB_LAYOUT_PROP_PADDING = _g.CB_LAYOUT_PROP_PADDING, zOrders = _f.zOrders;
|
|
@@ -119,7 +119,9 @@ var Composition = (0, react_1.forwardRef)(function CustomSection(props) {
|
|
|
119
119
|
var customSectionStyles = {
|
|
120
120
|
minHeight: "".concat(minHeight, "px"),
|
|
121
121
|
maxHeight: "".concat(maxHeight, "px"),
|
|
122
|
-
width: mode === 'EDIT'
|
|
122
|
+
width: mode === 'EDIT' && editorType === 'COMPOSITION_EDITOR'
|
|
123
|
+
? "".concat(Math.max(canvasWidth, minWidth !== null && minWidth !== void 0 ? minWidth : 0), "px")
|
|
124
|
+
: '100%',
|
|
123
125
|
maxWidth: maxWidth ? "".concat(maxWidth, "px") : '100%',
|
|
124
126
|
minWidth: minWidth ? "".concat(minWidth, "px") : '0px'
|
|
125
127
|
};
|
|
@@ -42,6 +42,7 @@ function DynamicLayout(_a) {
|
|
|
42
42
|
})
|
|
43
43
|
.sort(function (a, b) { return a.order - b.order; });
|
|
44
44
|
var iframeSection = filteredSortedSection.find(function (section) { return section.manifest.schema === 'EXP_IFRAME' && section.display; });
|
|
45
|
+
var editorType = 'DYNAMIC_LAYOUT_EDITOR';
|
|
45
46
|
return ((0, jsx_runtime_1.jsxs)(dynamicLayoutContext_1.dynamicLayoutContext.Provider, __assign({ value: {
|
|
46
47
|
device: device,
|
|
47
48
|
mode: mode,
|
|
@@ -53,7 +54,8 @@ function DynamicLayout(_a) {
|
|
|
53
54
|
shortcutKeyMode: shortcutKeyMode,
|
|
54
55
|
zoomScale: zoomScale,
|
|
55
56
|
queryData: queryData,
|
|
56
|
-
placementRestriction: placementRestriction
|
|
57
|
+
placementRestriction: placementRestriction,
|
|
58
|
+
editorType: editorType
|
|
57
59
|
} }, { children: [mode === 'EDIT' && onClickEditSection && ((0, jsx_runtime_1.jsx)(EditModeSectionMatcher_1.EditModeSectionMatcher, { dynamicLayoutRef: dynamicLayoutRef, editingSectionId: editingSectionId, scrollDownTargetSectionId: scrollDownTargetSectionId, filteredSortedSection: filteredSortedSection, onClickEditSection: onClickEditSection })), mode !== 'EDIT' &&
|
|
58
60
|
(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); })))] })));
|
|
59
61
|
}
|
|
@@ -228,6 +228,7 @@ export type DynamicLayoutProps = {
|
|
|
228
228
|
mode?: 'NORMAL' | 'PREVIEW' | 'EDIT';
|
|
229
229
|
/** @deprecated use 'mode' instead */
|
|
230
230
|
isPreview?: boolean;
|
|
231
|
+
editorType?: 'COMPOSITION_EDITOR' | 'DYNAMIC_LAYOUT_EDITOR';
|
|
231
232
|
sections: ISection[];
|
|
232
233
|
scrollDownTargetSectionId?: number;
|
|
233
234
|
editingSectionId?: number;
|