pds-dev-kit-web-test 0.3.16 → 0.3.18

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.
@@ -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 }: DynamicLayoutProps): JSX.Element;
3
+ declare function DynamicLayout({ device, mode, isPreview, sections, scrollDownTargetSectionId, editingSectionId, navigationHandler, sectionActionHandler, onClickEditSection, programmedSectionComponents, activeBulkSelectMode }: 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;
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, activeBulkSelectMode = _a.activeBulkSelectMode;
29
29
  var filteredSortedSection = __spreadArray([], sections, true).filter(function (section) { return section.display; })
30
30
  .sort(function (a, b) { return a.order - b.order; });
31
31
  var iframeSection = filteredSortedSection.find(function (section) { return section.manifest.schema === 'EXP_IFRAME' && section.display; });
@@ -36,7 +36,8 @@ function DynamicLayout(_a) {
36
36
  navigationHandler: navigationHandler,
37
37
  sectionActionHandler: sectionActionHandler,
38
38
  editingSectionId: editingSectionId,
39
- programmedSectionComponents: programmedSectionComponents
39
+ programmedSectionComponents: programmedSectionComponents,
40
+ activeBulkSelectMode: activeBulkSelectMode
40
41
  } }, { children: [mode === 'EDIT' && onClickEditSection && ((0, jsx_runtime_1.jsx)(EditModeSectionMatcher_1.EditModeSectionMatcher, { editingSectionId: editingSectionId, scrollDownTargetSectionId: scrollDownTargetSectionId, filteredSortedSection: filteredSortedSection, onClickEditSection: onClickEditSection })), mode !== 'EDIT' &&
41
42
  (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); })))] })));
42
43
  }
@@ -62,7 +62,7 @@ var MOBILE_GRID_COLS = 8;
62
62
  var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px");
63
63
  var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
64
64
  function CustomSection(props) {
65
- var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, editingSectionId = _a.editingSectionId, mode = _a.mode, sectionActionHandler = _a.sectionActionHandler;
65
+ var _a = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _a.device, editingSectionId = _a.editingSectionId, mode = _a.mode, sectionActionHandler = _a.sectionActionHandler, activeBulkSelectMode = _a.activeBulkSelectMode;
66
66
  var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
67
67
  var _b = jsonProperties, 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;
68
68
  var _c = (0, react_1.useState)(null), selectedCB = _c[0], setSelectedCB = _c[1];
@@ -91,7 +91,7 @@ function CustomSection(props) {
91
91
  var _g = (0, useGroupDrag_1.useGroupDrag)({
92
92
  setLayouts: setLayouts,
93
93
  device: device
94
- }), isShiftOn = _g.isShiftOn, setGroupCB = _g.setGroupCB, breakGroupCB = _g.breakGroupCB;
94
+ }), setGroupCB = _g.setGroupCB, breakGroupCB = _g.breakGroupCB;
95
95
  var _h = (0, util_1.parseCustomSectionPlacement)({
96
96
  isMobile: isMobile,
97
97
  customSectionProps: CB_PLACEMENT_PROP_SECTION
@@ -106,7 +106,7 @@ function CustomSection(props) {
106
106
  if (!isEditMode) {
107
107
  return;
108
108
  }
109
- if (selectedCB && isShiftOn) {
109
+ if (selectedCB && activeBulkSelectMode) {
110
110
  setGroupCB(selectedCB, id);
111
111
  sectionActionHandler &&
112
112
  sectionActionHandler({
@@ -8,7 +8,6 @@ type Props = {
8
8
  setLayouts: React.Dispatch<React.SetStateAction<LayoutsType>>;
9
9
  };
10
10
  declare function useGroupDrag({ device, setLayouts }: Props): {
11
- isShiftOn: boolean;
12
11
  setGroupCB: (selectedId: number | 'group', newId: number) => void;
13
12
  breakGroupCB: () => void;
14
13
  getGroupCB: (layout: Layout) => LayoutItemWithGroupType | null;
@@ -11,28 +11,10 @@ var __assign = (this && this.__assign) || function () {
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
13
  Object.defineProperty(exports, "__esModule", { value: true });
14
- var react_1 = require("react");
15
14
  var utils_1 = require("./utils");
16
15
  function useGroupDrag(_a) {
17
16
  var device = _a.device, setLayouts = _a.setLayouts;
18
- var _b = (0, react_1.useState)(false), isShiftOn = _b[0], setIsShiftOn = _b[1];
19
17
  var layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
20
- (0, react_1.useEffect)(function () {
21
- function onKeyDown(e) {
22
- if (e.key === 'Shift') {
23
- setIsShiftOn(true);
24
- }
25
- }
26
- function onKeyUp() {
27
- setIsShiftOn(false);
28
- }
29
- document.addEventListener('keydown', onKeyDown);
30
- document.addEventListener('keyup', onKeyUp);
31
- return function () {
32
- document.removeEventListener('keydown', onKeyDown);
33
- document.removeEventListener('keyup', onKeyUp);
34
- };
35
- }, []);
36
18
  function setGroupCB(selectedId, newId) {
37
19
  setLayouts(function (prev) {
38
20
  var currentLayout = prev[layoutByDevice];
@@ -71,6 +53,6 @@ function useGroupDrag(_a) {
71
53
  var groupItem = layout[groupIdx];
72
54
  return groupItem;
73
55
  }
74
- return { isShiftOn: isShiftOn, setGroupCB: setGroupCB, breakGroupCB: breakGroupCB, getGroupCB: getGroupCB };
56
+ return { setGroupCB: setGroupCB, breakGroupCB: breakGroupCB, getGroupCB: getGroupCB };
75
57
  }
76
58
  exports.default = useGroupDrag;
@@ -224,6 +224,7 @@ export type DynamicLayoutProps = {
224
224
  sectionActionHandler?: (action: TypeOfSectionAction) => void;
225
225
  programmedSectionComponents?: IProgrammedSectionComponents;
226
226
  width?: number;
227
+ activeBulkSelectMode?: boolean;
227
228
  };
228
229
  export type NavHandlerAction = {
229
230
  openNewTab: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web-test",
3
- "version": "0.3.16",
3
+ "version": "0.3.18",
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.27",
25
+ "publ-echo": "^0.0.30",
26
26
  "react-hook-form": "^7.28.1",
27
27
  "react-i18next": "^11.12.0",
28
28
  "react-router-dom": "^5.2.0",
package/release-note.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v0.3.16]
2
+ ## [v0.3.18]
3
3
  ## 기준 pds-dev-kit-web 버전 @2.2.41
4
4
  ### sub
5
5
  * DynamicLayout
6
- * CustomSection의 group 이동 기능 추가
7
- * group화/group drag/ group drag stop시 outerBasedPositions payload
6
+ * echo 0.0.30으로 업데이트
7
+ * echo 업데이트 내용: 충돌감지 움직임이 의도치않게 작동하는 이슈 픽스