pds-dev-kit-web-test 2.5.66 → 2.5.67
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.
@@ -72,33 +72,33 @@ var MOBILE_GRID_COLS = 8;
|
|
72
72
|
var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px");
|
73
73
|
var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
|
74
74
|
var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
75
|
-
var _a
|
76
|
-
var
|
75
|
+
var _a;
|
76
|
+
var _b = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _b.device, editingSectionId = _b.editingSectionId, mode = _b.mode, shortcutKeyMode = _b.shortcutKeyMode, sectionActionHandler = _b.sectionActionHandler;
|
77
77
|
var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
|
78
|
-
var
|
79
|
-
var
|
78
|
+
var sectionPedigree = jsonProperties === null || jsonProperties === void 0 ? void 0 : jsonProperties.pedigree;
|
79
|
+
var _c = (0, react_1.useState)(sectionPedigree), pedigreeState = _c[0], setPedigreeState = _c[1];
|
80
|
+
var _d = (0, react_1.useState)((0, group_1.mapComponentBlockIdsToBlockIds)(sectionPedigree)), blockIdMap = _d[0], setBlockIdMap = _d[1];
|
80
81
|
(0, react_1.useEffect)(function () {
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
var _g =
|
86
|
-
var _j = (0, react_1.useState)(null), selectedBlockId = _j[0], setSelectedBlockId = _j[1];
|
82
|
+
setPedigreeState(sectionPedigree);
|
83
|
+
setBlockIdMap((0, group_1.mapComponentBlockIdsToBlockIds)(sectionPedigree));
|
84
|
+
}, [sectionPedigree]);
|
85
|
+
var _e = jsonProperties, _f = _e.data, CB_PLACEMENT_PROP_SECTION = _f.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _f.CB_LAYOUT_PROP_PADDING, CB_CONTENT_PROP_SECTION = _f.CB_CONTENT_PROP_SECTION, zOrders = _e.zOrders;
|
86
|
+
var _g = (0, react_1.useState)(null), selectedBlockId = _g[0], setSelectedBlockId = _g[1];
|
87
87
|
var gleRef = (0, react_1.useRef)(null);
|
88
|
-
var
|
89
|
-
var
|
88
|
+
var _h = (0, react_1.useState)(50), rowHeight = _h[0], setRowHeight = _h[1];
|
89
|
+
var _j = (0, react_1.useState)(16), baseFontSize = _j[0], setBaseFontSize = _j[1];
|
90
90
|
var isMobile = device === 'MOBILE';
|
91
91
|
var isEditMode = mode === 'EDIT';
|
92
92
|
var layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
|
93
|
-
var
|
93
|
+
var _k = (0, react_1.useState)(function () {
|
94
94
|
var _a = (0, util_1.parsePlacement)(componentBlocks !== null && componentBlocks !== void 0 ? componentBlocks : [], zOrders), lg = _a.lg, sm = _a.sm;
|
95
95
|
return {
|
96
96
|
lg: lg,
|
97
97
|
sm: sm
|
98
98
|
};
|
99
|
-
}), layouts =
|
100
|
-
var
|
101
|
-
var
|
99
|
+
}), layouts = _k[0], setLayouts = _k[1];
|
100
|
+
var _l = (0, react_1.useState)('ROOT'), editingGroupBlock = _l[0], setEditingGroupBlock = _l[1];
|
101
|
+
var _m = (0, react_1.useState)([]), bulkBlockIds = _m[0], setBulkBlockIds = _m[1];
|
102
102
|
var newblock = bulkBlockIds.length > 0
|
103
103
|
? (0, group_1.addBulkToTarget)(pedigreeState, editingGroupBlock, bulkBlockIds)
|
104
104
|
: pedigreeState;
|
@@ -197,10 +197,10 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
197
197
|
var allRootChildIds = (0, group_1.findAllChildrenIds)(pedigreeState, editingGroupBlock, 'current');
|
198
198
|
setBulkBlockIds(allRootChildIds);
|
199
199
|
};
|
200
|
-
var
|
200
|
+
var _o = (0, util_1.parseCustomSectionPlacement)({
|
201
201
|
isMobile: isMobile,
|
202
202
|
customSectionProps: CB_PLACEMENT_PROP_SECTION
|
203
|
-
}), rows =
|
203
|
+
}), rows = _o.rows, width = _o.width, minHeight = _o.minHeight, isFullWidth = _o.isFullWidth;
|
204
204
|
var customSectionStyles = {
|
205
205
|
minHeight: "".concat(minHeight, "vh"),
|
206
206
|
width: '100%',
|
@@ -662,7 +662,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
662
662
|
fontSize: "".concat(baseFontSize, "px")
|
663
663
|
}, onLayoutChange: onLayoutChange, onDragStart: onDragStart, onDragStop: onDragStop, onResizeStop: onResizeStop, onDragStopForGroup: onGroupDragStop, onFitToContent: onAutoFitContent, onWidthChange: onWidthChange, minNbRow: rows, isDraggable: isEditMode, isResizable: isEditMode,
|
664
664
|
// GROUP
|
665
|
-
selectedGroupBlock: (
|
665
|
+
selectedGroupBlock: (_a = selectedBlockId === null || selectedBlockId === void 0 ? void 0 : selectedBlockId.toString()) !== null && _a !== void 0 ? _a : 'ROOT', editingGroupBlock: editingGroupBlock, blockStructure: newblock, bulkIds: bulkBlockIds, onDoubleClickGroup: onDoubleClickGroup, onClickGroup: onClickGroup, onDoubleClickOutsideGroup: onDoubleClickOutsideGroup, onContextGroup: onContextGroup }, { children: layouts[layoutByDevice].map(function (each, index) {
|
666
666
|
var matchedCB = componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.find(function (cb) { return cb.id.toString() === each.i; });
|
667
667
|
var isInBulk = bulkBlockIds.includes((0, group_1.getBlockIdByComponentId)(pedigreeState, Number(each.i)));
|
668
668
|
if (!matchedCB) {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ComponentBlock } from '../types';
|
2
|
-
import type {
|
3
|
-
export declare function parsePlacement(components: ComponentBlock[], zOrders:
|
2
|
+
import type { ZOrder } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
|
3
|
+
export declare function parsePlacement(components: ComponentBlock[], zOrders: ZOrder): {
|
4
4
|
sm: {
|
5
5
|
i: string;
|
6
6
|
x: number;
|
@@ -6,7 +6,7 @@ import type { CB_EFFECT_PROP_ENTANIM_SPECS } from './sections/CustomSection/util
|
|
6
6
|
import type { CB_LAYOUT_PROP_PADDING_SPECS } from './sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding';
|
7
7
|
import type { CB_STYLE_PROP_BGCOLOR_SPECS } from './sections/CustomSection/util/stylePropParsers/parseStylePropBgColor';
|
8
8
|
import type { CB_STYLE_PROP_BGOVERLAY_SPECS } from './sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay';
|
9
|
-
import type {
|
9
|
+
import type { RootBlock, ZOrder } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
|
10
10
|
import type { Ref } from 'react';
|
11
11
|
export { TypeOfSectionAction };
|
12
12
|
export type TypeOfSectionManifestSchema = 'BASE_INTRO' | 'BASE_CONTENTS' | 'BASE_CONTENTS_CAROUSEL' | 'BASE_FOOTER' | 'BASE_INFO_BOX' | 'EXP_IFRAME' | 'PRG_MEMBERSHIP_DISPLAY' | 'CUSTOM';
|
@@ -61,7 +61,7 @@ export interface ISection {
|
|
61
61
|
componentBlocks?: ComponentBlock[];
|
62
62
|
jsonProperties?: ISectionJsonProperties;
|
63
63
|
}
|
64
|
-
export type SectionPedigree =
|
64
|
+
export type SectionPedigree = RootBlock;
|
65
65
|
export interface SubscriptionProductInList {
|
66
66
|
id: number;
|
67
67
|
type: SubscriptionProductType;
|
@@ -301,7 +301,7 @@ export type IMembershipDisplay = {
|
|
301
301
|
connectedMemberships: IConnectedMembership[];
|
302
302
|
};
|
303
303
|
export type ISectionJsonProperties = {
|
304
|
-
zOrders?:
|
304
|
+
zOrders?: ZOrder;
|
305
305
|
pedigree?: SectionPedigree;
|
306
306
|
data: {
|
307
307
|
CB_CONTENT_PROP_SECTION: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "pds-dev-kit-web-test",
|
3
|
-
"version": "2.5.
|
3
|
+
"version": "2.5.67",
|
4
4
|
"license": "MIT",
|
5
5
|
"private": false,
|
6
6
|
"main": "dist/index.js",
|
@@ -23,7 +23,7 @@
|
|
23
23
|
"lottie-react": "^2.3.1",
|
24
24
|
"nuka-carousel": "^4.8.4",
|
25
25
|
"publ-echo": "^0.0.99",
|
26
|
-
"publ-echo-test": "^0.0.
|
26
|
+
"publ-echo-test": "^0.0.110",
|
27
27
|
"react-hook-form": "^7.28.1",
|
28
28
|
"react-i18next": "^11.12.0",
|
29
29
|
"react-router-dom": "^5.2.0",
|