pds-dev-kit-web-test 2.2.48 → 2.2.60

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.
Files changed (128) hide show
  1. package/dist/src/common/assets/icons/fill/Home.d.ts +4 -0
  2. package/dist/src/common/assets/icons/fill/Home.js +30 -0
  3. package/dist/src/common/assets/icons/fill/PappType.d.ts +4 -0
  4. package/dist/src/common/assets/icons/fill/PappType.js +30 -0
  5. package/dist/src/common/assets/icons/fill/Plan.d.ts +4 -0
  6. package/dist/src/common/assets/icons/fill/Plan.js +30 -0
  7. package/dist/src/common/assets/icons/fill/Sales.d.ts +4 -0
  8. package/dist/src/common/assets/icons/fill/Sales.js +30 -0
  9. package/dist/src/common/assets/icons/fill/SellerIntro.d.ts +4 -0
  10. package/dist/src/common/assets/icons/fill/SellerIntro.js +30 -0
  11. package/dist/src/common/assets/icons/fill/Shoppingbag.d.ts +4 -0
  12. package/dist/src/common/assets/icons/fill/Shoppingbag.js +30 -0
  13. package/dist/src/common/assets/icons/fill/Site.d.ts +4 -0
  14. package/dist/src/common/assets/icons/fill/Site.js +30 -0
  15. package/dist/src/common/assets/icons/fill/StarShaped.d.ts +4 -0
  16. package/dist/src/common/assets/icons/fill/StarShaped.js +30 -0
  17. package/dist/src/common/assets/icons/fill/Target.d.ts +4 -0
  18. package/dist/src/common/assets/icons/fill/Target.js +30 -0
  19. package/dist/src/common/assets/icons/fill/User.d.ts +4 -0
  20. package/dist/src/common/assets/icons/fill/User.js +30 -0
  21. package/dist/src/common/assets/icons/fill/Xmark.d.ts +4 -0
  22. package/dist/src/common/assets/icons/fill/Xmark.js +30 -0
  23. package/dist/src/common/assets/icons/fill/index.d.ts +11 -0
  24. package/dist/src/common/assets/icons/fill/index.js +23 -1
  25. package/dist/src/common/assets/icons/line/Site.d.ts +4 -0
  26. package/dist/src/common/assets/icons/line/Site.js +30 -0
  27. package/dist/src/common/assets/icons/line/StarShaped.d.ts +4 -0
  28. package/dist/src/common/assets/icons/line/StarShaped.js +30 -0
  29. package/dist/src/common/assets/icons/line/Ticket.d.ts +4 -0
  30. package/dist/src/common/assets/icons/line/Ticket.js +30 -0
  31. package/dist/src/common/assets/icons/line/User.d.ts +4 -0
  32. package/dist/src/common/assets/icons/line/User.js +30 -0
  33. package/dist/src/common/assets/icons/line/index.d.ts +4 -0
  34. package/dist/src/common/assets/icons/line/index.js +8 -0
  35. package/dist/src/common/services/i18n/resources/en.json +2 -1
  36. package/dist/src/common/services/i18n/resources/es.json +2 -1
  37. package/dist/src/common/services/i18n/resources/fil.json +2 -1
  38. package/dist/src/common/services/i18n/resources/index.d.ts +7 -0
  39. package/dist/src/common/services/i18n/resources/ja.json +2 -1
  40. package/dist/src/common/services/i18n/resources/ko.json +2 -1
  41. package/dist/src/common/services/i18n/resources/zh-cn.json +2 -1
  42. package/dist/src/common/services/i18n/resources/zh-tw.json +2 -1
  43. package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +6 -1
  44. package/dist/src/common/styles/colorSet/PaletteColor_light.json +7 -2
  45. package/dist/src/common/styles/colorSet/UIColor.json +8 -1
  46. package/dist/src/common/styles/colorSet/index.d.ts +19 -2
  47. package/dist/src/common/styles/colorSet/index.js +2 -2
  48. package/dist/src/common/styles/colorSet/ui-type.d.ts +7 -0
  49. package/dist/src/common/types/components.d.ts +1 -0
  50. package/dist/src/desktop/components/BasicListItem/RightBox/MainButton.js +1 -2
  51. package/dist/src/desktop/components/BasicListItem/RightBox/Switch.js +1 -1
  52. package/dist/src/desktop/components/ContextMenuItem/ContextMenuItem.js +17 -5
  53. package/dist/src/desktop/components/DesktopAlertDialog/DesktopAlertDialog.js +6 -1
  54. package/dist/src/desktop/components/DesktopHeaderBar/DesktopHeaderBar.js +1 -1
  55. package/dist/src/desktop/components/DynamicDesktopNavBar/blocks/SecondaryMenu.js +68 -3
  56. package/dist/src/desktop/components/DynamicDesktopNavBar/templates/DynamicDesktopNavBarTemplates.d.ts +0 -1
  57. package/dist/src/desktop/components/DynamicDesktopNavBar/templates/constants.d.ts +0 -1
  58. package/dist/src/desktop/components/DynamicDesktopNavBar/templates/constants.js +5 -6
  59. package/dist/src/desktop/components/TextButton/TextButton.d.ts +3 -2
  60. package/dist/src/desktop/components/TextButton/TextButton.js +15 -2
  61. package/dist/src/desktop/panels/DesktopTutorialModal/DesktopTutorialModal.d.ts +2 -1
  62. package/dist/src/desktop/panels/DesktopTutorialModal/DesktopTutorialModal.js +20 -9
  63. package/dist/src/mobile/components/BasicListItem/RightBox/MainButton.js +1 -2
  64. package/dist/src/mobile/components/BasicListItem/RightBox/Switch.js +1 -1
  65. package/dist/src/mobile/components/ContextMenuItem/ContextMenuItem.js +15 -3
  66. package/dist/src/sub/DynamicLayout/DynamicLayout.d.ts +1 -1
  67. package/dist/src/sub/DynamicLayout/DynamicLayout.js +4 -3
  68. package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.d.ts +3 -2
  69. package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +18 -6
  70. package/dist/src/sub/DynamicLayout/components/Section/components/CustomSectionBackground.js +3 -2
  71. package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.d.ts +6 -0
  72. package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.js +50 -0
  73. package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +2467 -2
  74. package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +4321 -15
  75. package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +23 -1
  76. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +10 -2
  77. package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +292 -26
  78. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.d.ts +2 -1
  79. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlock.js +2 -2
  80. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +2 -1
  81. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +14 -10
  82. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.d.ts +2 -2
  83. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +4 -2
  84. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.d.ts +2 -2
  85. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider.js +4 -2
  86. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/Embed.d.ts +5 -0
  87. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/Embed.js +48 -0
  88. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedIframe.d.ts +8 -0
  89. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/EmbedIframe.js +45 -0
  90. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/IframeDenied.d.ts +3 -0
  91. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/IframeDenied.js +21 -0
  92. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/constant.d.ts +1 -0
  93. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/constant.js +9 -0
  94. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/types.d.ts +6 -0
  95. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/types.js +2 -0
  96. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.d.ts +2 -2
  97. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image.js +4 -2
  98. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.d.ts +2 -2
  99. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/RichText/RichText.js +4 -2
  100. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.d.ts +2 -2
  101. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +6 -3
  102. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.d.ts +2 -2
  103. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter.js +4 -2
  104. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.d.ts +2 -2
  105. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube/Youtube.js +5 -3
  106. package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +3 -0
  107. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.d.ts +1 -0
  108. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.js +8 -0
  109. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.d.ts +22 -0
  110. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js +273 -0
  111. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/utils.d.ts +13 -0
  112. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/utils.js +127 -0
  113. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.d.ts +1 -1
  114. package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useIntersectionObserver.js +21 -9
  115. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +40 -11
  116. package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +1 -0
  117. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseJsonProperties.d.ts +1 -1
  118. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +2 -2
  119. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parseProperties.d.ts +2 -2
  120. package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +14 -1
  121. package/dist/src/sub/DynamicLayout/types.d.ts +25 -19
  122. package/dist/src/sub/DynamicLayout/utils/deepCopy.d.ts +1 -0
  123. package/dist/src/sub/DynamicLayout/utils/deepCopy.js +15 -0
  124. package/package.json +2 -2
  125. package/release-note.md +5 -6
  126. package/dist/src/sub/DynamicLayout/mock_customSection.d.ts +0 -2
  127. package/dist/src/sub/DynamicLayout/mock_customSection.js +0 -840
  128. package/dist/src/sub/DynamicLayout/nakedMocks.json +0 -847
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  type Props = {
3
3
  ani: string;
4
4
  children: React.ReactNode;
5
+ index: number;
5
6
  };
6
- declare function ComponentBlock({ ani, children }: Props): JSX.Element;
7
+ declare function ComponentBlock({ ani, children, index }: Props): JSX.Element;
7
8
  export default ComponentBlock;
@@ -43,9 +43,9 @@ var react_1 = require("react");
43
43
  var styled_components_1 = __importStar(require("styled-components"));
44
44
  var hooks_1 = require("../../hooks");
45
45
  function ComponentBlock(_a) {
46
- var ani = _a.ani, children = _a.children;
46
+ var ani = _a.ani, children = _a.children, index = _a.index;
47
47
  var ref = (0, react_1.useRef)(null);
48
- var entry = (0, hooks_1.useIntersectionObserver)(ref, { threshold: 0 });
48
+ var entry = (0, hooks_1.useIntersectionObserver)(ref, { threshold: 0 }, [index]);
49
49
  var isInViewport = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
50
50
  return ((0, jsx_runtime_1.jsx)(S_CBWrapper, { children: (0, jsx_runtime_1.jsx)(S_CBBox, __assign({ ref: ref, isInViewport: isInViewport, animationName: ani }, { children: children })) }));
51
51
  }
@@ -4,6 +4,7 @@ import type { Device } from '../../util/types';
4
4
  type Props = {
5
5
  cbProps: ComponentBlock;
6
6
  device: Device;
7
+ index: number;
7
8
  };
8
- export default function ComponentBlockMatcher({ cbProps, device }: Props): JSX.Element;
9
+ export default function ComponentBlockMatcher({ cbProps, device, index }: Props): JSX.Element;
9
10
  export {};
@@ -15,34 +15,38 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
+ require("react");
18
19
  var newUtils_1 = require("../../newUtils");
19
20
  var types_1 = require("../../types");
20
21
  var Button_1 = __importDefault(require("./componentBlocks/Button/Button"));
21
22
  var Divider_1 = __importDefault(require("./componentBlocks/Divider/Divider"));
23
+ var Embed_1 = __importDefault(require("./componentBlocks/Embed/Embed"));
22
24
  var Image_1 = __importDefault(require("./componentBlocks/Image/Image"));
23
25
  var RichText_1 = require("./componentBlocks/RichText");
24
26
  var Text_1 = __importDefault(require("./componentBlocks/Text/Text"));
25
27
  var Twitter_1 = __importDefault(require("./componentBlocks/Twitter/Twitter"));
26
28
  var Youtube_1 = require("./componentBlocks/Youtube");
27
29
  function ComponentBlockMatcher(_a) {
28
- var cbProps = _a.cbProps, device = _a.device;
29
- var componentBlockCode = cbProps.componentBlockCode, properties = cbProps.properties;
30
- var propsWithValue = device === 'MOBILE' ? (0, newUtils_1.replaceUndefinedValues)(properties) : properties;
30
+ var cbProps = _a.cbProps, device = _a.device, index = _a.index;
31
+ var componentBlockCode = cbProps.componentBlockCode, data = cbProps.jsonProperties.data;
32
+ var propsWithValue = device === 'MOBILE' ? (0, newUtils_1.replaceUndefinedValues)(data) : data;
31
33
  switch (componentBlockCode) {
32
34
  case types_1.CB_ALL_CODES.CB_BTN:
33
- return (0, jsx_runtime_1.jsx)(Button_1.default, __assign({}, propsWithValue));
35
+ return (0, jsx_runtime_1.jsx)(Button_1.default, __assign({}, propsWithValue, { index: index }));
34
36
  case types_1.CB_ALL_CODES.CB_TEXT:
35
- return (0, jsx_runtime_1.jsx)(Text_1.default, __assign({}, propsWithValue));
37
+ return (0, jsx_runtime_1.jsx)(Text_1.default, __assign({}, propsWithValue, { index: index }));
36
38
  case types_1.CB_ALL_CODES.CB_RICHTEXT:
37
- return (0, jsx_runtime_1.jsx)(RichText_1.RichText, __assign({}, propsWithValue));
39
+ return (0, jsx_runtime_1.jsx)(RichText_1.RichText, __assign({}, propsWithValue, { index: index }));
38
40
  case types_1.CB_ALL_CODES.CB_DIVIDER:
39
- return (0, jsx_runtime_1.jsx)(Divider_1.default, __assign({}, propsWithValue));
41
+ return (0, jsx_runtime_1.jsx)(Divider_1.default, __assign({}, propsWithValue, { index: index }));
40
42
  case types_1.CB_ALL_CODES.CB_IMG:
41
- return (0, jsx_runtime_1.jsx)(Image_1.default, __assign({}, propsWithValue));
43
+ return (0, jsx_runtime_1.jsx)(Image_1.default, __assign({}, propsWithValue, { index: index }));
42
44
  case types_1.CB_ALL_CODES.CB_TWITTER:
43
- return (0, jsx_runtime_1.jsx)(Twitter_1.default, __assign({}, propsWithValue));
45
+ return (0, jsx_runtime_1.jsx)(Twitter_1.default, __assign({}, propsWithValue, { index: index }));
44
46
  case types_1.CB_ALL_CODES.CB_YOUTUBE:
45
- return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({}, propsWithValue));
47
+ return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({}, propsWithValue, { index: index }));
48
+ case types_1.CB_ALL_CODES.CB_EMBED:
49
+ return (0, jsx_runtime_1.jsx)(Embed_1.default, __assign({}, propsWithValue, { index: index }));
46
50
  default:
47
51
  return (0, jsx_runtime_1.jsx)("div", { children: "Error: not supported CB" });
48
52
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CB_BTN_PROPERTIES_TYPE } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
3
- type Props = CB_BTN_PROPERTIES_TYPE;
2
+ import type { CB_BTN_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
3
+ type Props = CB_BTN_PROPERTIES_TYPE & IndexForIntersection;
4
4
  declare function Button(props: Props): JSX.Element;
5
5
  export default Button;
@@ -40,7 +40,7 @@ var S_HiddenCover_1 = require("../components/S_HiddenCover");
40
40
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
41
41
  function Button(props) {
42
42
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
43
- var CB_STYLE_PROP_BTNCOLOR = props.CB_STYLE_PROP_BTNCOLOR, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
43
+ var index = props.index, CB_STYLE_PROP_BTNCOLOR = props.CB_STYLE_PROP_BTNCOLOR, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
44
44
  var _c = (0, useCLINK_1.default)({
45
45
  src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
46
46
  type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
@@ -57,7 +57,9 @@ function Button(props) {
57
57
  propsStyle.visibility = 'visible';
58
58
  }
59
59
  var cbRef = (0, react_1.useRef)(null);
60
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
60
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
61
+ index
62
+ ]);
61
63
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
62
64
  var effectCssProperties = isVisible ? effect : {};
63
65
  var isNoneEffectType = device === 'DESKTOP'
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CB_DIVIDER_PROPERTIES_TYPE } from '../../../../util/types';
3
- type Props = CB_DIVIDER_PROPERTIES_TYPE;
2
+ import type { CB_DIVIDER_PROPERTIES_TYPE, IndexForIntersection } from '../../../../util/types';
3
+ type Props = CB_DIVIDER_PROPERTIES_TYPE & IndexForIntersection;
4
4
  declare function Divider(props: Props): JSX.Element;
5
5
  export default Divider;
@@ -49,14 +49,16 @@ var S_CB_Box_1 = require("../components/S_CB_Box");
49
49
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
50
50
  function Divider(props) {
51
51
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
52
- var CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
52
+ var index = props.index, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
53
53
  var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
54
54
  var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
55
55
  if (mode === 'EDIT') {
56
56
  propsStyle.visibility = 'visible';
57
57
  }
58
58
  var cbRef = (0, react_1.useRef)(null);
59
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
59
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
60
+ index
61
+ ]);
60
62
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
61
63
  var effectCssProperties = isVisible ? effect : {};
62
64
  var isNoneEffectType = device === 'DESKTOP'
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { CB_EMBED_PROPERTIES_TYPE, IndexForIntersection } from '../../../../util/types';
3
+ type Props = CB_EMBED_PROPERTIES_TYPE & IndexForIntersection;
4
+ declare function Embed(props: Props): JSX.Element;
5
+ export default Embed;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __importDefault = (this && this.__importDefault) || function (mod) {
14
+ return (mod && mod.__esModule) ? mod : { "default": mod };
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ var jsx_runtime_1 = require("react/jsx-runtime");
18
+ var react_1 = require("react");
19
+ var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
20
+ var hooks_1 = require("../../../../hooks");
21
+ var util_1 = require("../../../../util");
22
+ var S_CB_AnimationObserverBox_1 = require("../components/S_CB_AnimationObserverBox");
23
+ var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
24
+ var constant_1 = require("./constant");
25
+ var EmbedIframe_1 = __importDefault(require("./EmbedIframe"));
26
+ var IframeDenied_1 = __importDefault(require("./IframeDenied"));
27
+ function Embed(props) {
28
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
29
+ var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
30
+ var CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, index = props.index;
31
+ var CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE = props.CB_CONTENT_PROP_CODEBLOCK.CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW;
32
+ var _b = (0, util_1.parseProperties)(props, device), style = _b.style, hoverStyle = _b.hoverStyle, layout = _b.layout, effect = _b.effect;
33
+ var cbRef = (0, react_1.useRef)(null);
34
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
35
+ index
36
+ ]);
37
+ var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
38
+ var effectCssProperties = isVisible ? effect : {};
39
+ var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
40
+ var isNoneEffectType = device === 'DESKTOP'
41
+ ? CB_EFFECT_PROP_ENTANIM.CB_EFFECT_PROP_ENTANIM_SPEC_TYPE === 'NONE'
42
+ : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
43
+ var hasEffect = !isNoneEffectType;
44
+ var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
45
+ var iframeDenied = constant_1.EMBED_DENIED_HOSTS.includes(window.location.hostname);
46
+ return ((0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_BoxWithShadow_1.S_CB_BoxWithShadow, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign({}, style), layout), effectCssProperties), editModeStyle), hoverStyle: hoverStyle, cbStylePropsShadowSpecs: CB_STYLE_PROP_SHADOW, device: device }, { children: iframeDenied ? ((0, jsx_runtime_1.jsx)(IframeDenied_1.default, {})) : ((0, jsx_runtime_1.jsx)(EmbedIframe_1.default, { embedCode: CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE, style: layout })) })) })));
47
+ }
48
+ exports.default = Embed;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { CSSProperties } from 'styled-components';
3
+ interface EmbedCoreProps {
4
+ embedCode: string;
5
+ style: CSSProperties;
6
+ }
7
+ declare const EmbedIframe: React.FC<EmbedCoreProps>;
8
+ export default EmbedIframe;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ var jsx_runtime_1 = require("react/jsx-runtime");
11
+ var react_1 = require("react");
12
+ var styled_components_1 = __importDefault(require("styled-components"));
13
+ var EmbedIframe = function (_a) {
14
+ var embedCode = _a.embedCode, style = _a.style;
15
+ var iframeRef = (0, react_1.useRef)(null);
16
+ var embedHtml = (0, react_1.useMemo)(function () {
17
+ return getHtmlCode(embedCode, style);
18
+ }, [embedCode, style]);
19
+ (0, react_1.useLayoutEffect)(function () {
20
+ var _a;
21
+ if (!iframeRef.current) {
22
+ return;
23
+ }
24
+ var iframeDoc = iframeRef.current.contentDocument || ((_a = iframeRef.current.contentWindow) === null || _a === void 0 ? void 0 : _a.document);
25
+ if (!iframeDoc || !embedHtml) {
26
+ return;
27
+ }
28
+ iframeDoc.open();
29
+ iframeDoc.write(embedHtml);
30
+ iframeDoc.close();
31
+ }, [embedHtml]);
32
+ return ((0, jsx_runtime_1.jsx)(S_Iframe, { ref: iframeRef, title: "cb-embed", allow: "accelerometer; camera; encrypted-media; geolocation; gyroscope; hid; microphone; midi; clipboard-write;", sandbox: "allow-forms allow-modals allow-same-origin allow-popups allow-presentation allow-scripts allow-downloads allow-pointer-lock" }));
33
+ };
34
+ var S_Iframe = styled_components_1.default.iframe(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border: none;\n display: block;\n height: 100%;\n width: 100%;\n"], ["\n border: none;\n display: block;\n height: 100%;\n width: 100%;\n"])));
35
+ function getHtmlCode(code, style) {
36
+ var styleString = Object.entries(style).reduce(function (styleStr, _a) {
37
+ var prop = _a[0], value = _a[1];
38
+ var kebabProp = prop.replace(/([a-z0])([A-Z])/g, '$1-$2').toLowerCase();
39
+ return "".concat(styleStr).concat(kebabProp, ": ").concat(value, ";");
40
+ }, '');
41
+ var html = "\n <!DOCTYPE html>\n <html lang=\"en\">\n <head>\n <base href=\"https://example.com/\">\n <meta charset=\"UTF-8\">\n <style>\n html, body {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n ".concat(styleString, "\n }\n\n body > div { \n flex-grow: 1;\n width: 100%;\n }\n </style>\n </head>\n <body>\n ").concat(code, "\n </body>\n </html>\n ");
42
+ return html;
43
+ }
44
+ exports.default = EmbedIframe;
45
+ var templateObject_1;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function IframeDenied(): JSX.Element;
3
+ export default IframeDenied;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __importDefault = (this && this.__importDefault) || function (mod) {
7
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
+ };
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ var jsx_runtime_1 = require("react/jsx-runtime");
11
+ require("react");
12
+ var react_i18next_1 = require("react-i18next");
13
+ var components_1 = require("../../../../../../../DynamicLayout/components");
14
+ var styled_components_1 = __importDefault(require("styled-components"));
15
+ function IframeDenied() {
16
+ var t = (0, react_i18next_1.useTranslation)().t;
17
+ return ((0, jsx_runtime_1.jsx)(S_Denied, { children: (0, jsx_runtime_1.jsx)(components_1.D_TextLabel, { text: t('str_key_user_scene_x00001pages_notconnectdomain_embedcb_hide_info'), styleTheme: "caption1Regular", colorTheme: "sysTextSecondary", textAlign: "center" }) }));
18
+ }
19
+ var S_Denied = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: #dddddd;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n"], ["\n align-items: center;\n background-color: #dddddd;\n display: flex;\n height: 100%;\n justify-content: center;\n width: 100%;\n"])));
20
+ exports.default = IframeDenied;
21
+ var templateObject_1;
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EMBED_DENIED_HOSTS = void 0;
4
+ exports.EMBED_DENIED_HOSTS = [
5
+ 'app.publr.co',
6
+ 'app.local.publr.co',
7
+ 'app.dev.publr.co',
8
+ 'app.qa.publr.co'
9
+ ];
@@ -0,0 +1,6 @@
1
+ import type { DefaultBrightTheme } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
2
+ export type TwitterPropsKeys = keyof CB_TWITTER_STYLE_PROPS;
3
+ export type CB_TWITTER_STYLE_PROPS = {
4
+ CB_STYLE_PROP_TWITTER_SPEC_THEME: DefaultBrightTheme;
5
+ 'CB_STYLE_PROP_TWITTER_SPEC_THEME:MOBILE': DefaultBrightTheme | undefined;
6
+ };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CB_IMG_PROPERTIES_TYPE } from '../../../../util/types';
3
- type Props = CB_IMG_PROPERTIES_TYPE;
2
+ import type { CB_IMG_PROPERTIES_TYPE, IndexForIntersection } from '../../../../util/types';
3
+ type Props = CB_IMG_PROPERTIES_TYPE & IndexForIntersection;
4
4
  declare function Image(props: Props): JSX.Element;
5
5
  export default Image;
@@ -53,7 +53,7 @@ var S_HiddenCover_1 = require("../components/S_HiddenCover");
53
53
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
54
54
  function Image(props) {
55
55
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
56
- var CB_CONTENT_PROP_IMAGE = props.CB_CONTENT_PROP_IMAGE, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
56
+ var index = props.index, CB_CONTENT_PROP_IMAGE = props.CB_CONTENT_PROP_IMAGE, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
57
57
  var _c = (0, useCLINK_1.default)({
58
58
  src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
59
59
  type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
@@ -64,7 +64,9 @@ function Image(props) {
64
64
  var _e = parseImageCBStyle(style, hoverStyle, mode), boxStyle = _e.boxStyle, imgStyle = _e.imgStyle;
65
65
  var isEditModeAndHidden = style.visibility === 'hidden' && mode === 'EDIT';
66
66
  var cbRef = (0, react_1.useRef)(null);
67
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
67
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
68
+ index
69
+ ]);
68
70
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
69
71
  var effectCssProperties = isVisible ? effect : {};
70
72
  var isNoneEffectType = device === 'DESKTOP'
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CB_RICHTEXT_PROPERTIES_TYPE } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
3
- type Props = CB_RICHTEXT_PROPERTIES_TYPE;
2
+ import type { CB_RICHTEXT_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
3
+ type Props = CB_RICHTEXT_PROPERTIES_TYPE & IndexForIntersection;
4
4
  declare function RichText(props: Props): JSX.Element;
5
5
  export default RichText;
@@ -32,7 +32,7 @@ var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
32
32
  var S_HiddenCover_1 = require("../components/S_HiddenCover");
33
33
  function RichText(props) {
34
34
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
35
- var CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
35
+ var index = props.index, CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
36
36
  var _b = (0, util_1.parseProperties)(props, device), propsStyle = _b.style, propsHoverStyle = _b.hoverStyle, layoutStyle = _b.layout, effect = _b.effect;
37
37
  var _c = getBGColorStyles(CB_STYLE_PROP_BGCOLOR, device), bgColorStyle = _c.style, bgColorHoverStyle = _c.hoverStyle;
38
38
  var isEditModeAndHidden = propsStyle.visibility === 'hidden' && mode === 'EDIT';
@@ -40,7 +40,9 @@ function RichText(props) {
40
40
  propsStyle.visibility = 'visible';
41
41
  }
42
42
  var cbRef = (0, react_1.useRef)(null);
43
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
43
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
44
+ index
45
+ ]);
44
46
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
45
47
  var effectCssProperties = isVisible ? effect : {};
46
48
  var isNoneEffectType = device === 'DESKTOP'
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CB_TEXT_PROPERTIES_TYPE } from '../../../../util/types';
3
- type Props = CB_TEXT_PROPERTIES_TYPE;
2
+ import type { CB_TEXT_PROPERTIES_TYPE, IndexForIntersection } from '../../../../util/types';
3
+ type Props = CB_TEXT_PROPERTIES_TYPE & IndexForIntersection;
4
4
  declare function Text(props: Props): JSX.Element;
5
5
  export default Text;
@@ -15,6 +15,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
+ /* eslint-disable no-console */
18
19
  /* eslint-disable react/destructuring-assignment */
19
20
  var react_1 = require("react");
20
21
  var DynamicLayout_1 = require("../../../../../../../DynamicLayout");
@@ -29,7 +30,7 @@ var S_HiddenCover_1 = require("../components/S_HiddenCover");
29
30
  var useCLINK_1 = __importDefault(require("../hooks/useCLINK"));
30
31
  function Text(props) {
31
32
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
32
- var _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
33
+ var index = props.index, _b = props.CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CLINK_SPEC_SRC = _b.CB_CONTENT_PROP_CLINK_SPEC_SRC, CB_CONTENT_PROP_CLINK_SPEC_TYPE = _b.CB_CONTENT_PROP_CLINK_SPEC_TYPE, CB_CONTENT_PROP_CLINK_SPEC_NEWTAB = _b.CB_CONTENT_PROP_CLINK_SPEC_NEWTAB, CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC = _b.CB_CONTENT_PROP_CLINK_SPEC_INTERNALSRC, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
33
34
  var _c = (0, useCLINK_1.default)({
34
35
  src: CB_CONTENT_PROP_CLINK_SPEC_SRC,
35
36
  type: CB_CONTENT_PROP_CLINK_SPEC_TYPE,
@@ -45,7 +46,9 @@ function Text(props) {
45
46
  propsStyle.visibility = 'visible';
46
47
  }
47
48
  var cbRef = (0, react_1.useRef)(null);
48
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
49
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
50
+ index
51
+ ]);
49
52
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
50
53
  var effectCssProperties = isVisible ? effect : {};
51
54
  var isNoneEffectType = device === 'DESKTOP'
@@ -53,7 +56,7 @@ function Text(props) {
53
56
  : CB_EFFECT_PROP_ENTANIM['CB_EFFECT_PROP_ENTANIM_SPEC_TYPE:MOBILE'] === 'NONE';
54
57
  var hasEffect = !isNoneEffectType;
55
58
  var effectVisibleStyle = hasEffect ? { opacity: isVisible ? 1 : 0 } : {};
56
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word' }), onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT })) }))] }));
59
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isEditModeAndHidden && (0, jsx_runtime_1.jsx)(S_HiddenCover_1.S_HiddenCover, {}), (0, jsx_runtime_1.jsx)(S_CB_AnimationObserverBox_1.S_CB_AnimationObserverBox, __assign({ ref: hasEffect ? cbRef : null, effectVisibleStyle: effectVisibleStyle }, { children: (0, jsx_runtime_1.jsx)(S_CB_Box_1.S_CB_Box, __assign({ className: "cb-layout-box", normalStyle: __assign(__assign(__assign(__assign(__assign({}, textStyle), propsStyle), layoutStyle), effectCssProperties), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', cursor: CLINKCursor, height: 'fit-content' }), hoverStyle: __assign(__assign(__assign({}, textHoverStyle), propsHoverStyle), { whiteSpace: 'pre-wrap', wordBreak: 'break-word', height: 'fit-content' }), onClick: onClickCLINK }, { children: props.CB_CONTENT_PROP_TEXT.CB_CONTENT_PROP_TEXT_SPEC_TEXT })) }))] }));
57
60
  }
58
61
  function getTextStyles(props, device) {
59
62
  var availableSpecCodes = [
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { CB_TWITTER_PROPERTIES_TYPE } from '../../../../util/types';
3
- type Props = CB_TWITTER_PROPERTIES_TYPE;
2
+ import type { CB_TWITTER_PROPERTIES_TYPE, IndexForIntersection } from '../../../../util/types';
3
+ type Props = CB_TWITTER_PROPERTIES_TYPE & IndexForIntersection;
4
4
  declare function Twitter(props: Props): JSX.Element;
5
5
  export default Twitter;
@@ -22,7 +22,7 @@ var S_CB_BoxWithShadow_1 = require("../components/S_CB_BoxWithShadow");
22
22
  function Twitter(props) {
23
23
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
24
24
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
25
- var CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
25
+ var CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM, index = props.index;
26
26
  var CB_CONTENT_PROP_TWITTER_SPEC_SRC = props.CB_CONTENT_PROP_TWITTER.CB_CONTENT_PROP_TWITTER_SPEC_SRC, CB_STYLE_PROP_TWITTER_SPEC_THEME = props.CB_STYLE_PROP_TWITTER.CB_STYLE_PROP_TWITTER_SPEC_THEME, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW;
27
27
  var _b = (0, util_1.parseProperties)(props, device), style = _b.style, hoverStyle = _b.hoverStyle, layout = _b.layout, effect = _b.effect;
28
28
  var userId = CB_CONTENT_PROP_TWITTER_SPEC_SRC.replace('https://twitter.com/', '');
@@ -37,7 +37,9 @@ function Twitter(props) {
37
37
  delete layout.justifyContent;
38
38
  }
39
39
  var cbRef = (0, react_1.useRef)(null);
40
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
40
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
41
+ index
42
+ ]);
41
43
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
42
44
  var effectCssProperties = isVisible ? effect : {};
43
45
  var editModeStyle = mode === 'EDIT' ? { pointerEvents: 'none' } : {};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import type { CB_YOUTUBE_PROPERTIES_TYPE } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
3
- type Props = CB_YOUTUBE_PROPERTIES_TYPE;
2
+ import type { CB_YOUTUBE_PROPERTIES_TYPE, IndexForIntersection } from '../../../../../../../DynamicLayout/sections/CustomSection/util/types';
3
+ type Props = CB_YOUTUBE_PROPERTIES_TYPE & IndexForIntersection;
4
4
  export type YOUTUBE_AUTOPLAY_TRIGGER_POINT = 'ALWAYS' | 'VIEWPORT-FREEZE' | 'VIEWPORT';
5
5
  declare function Youtube(props: Props): JSX.Element;
6
6
  export default Youtube;
@@ -32,7 +32,7 @@ var parseYoutubeContentProp_1 = __importDefault(require("./parseYoutubeContentPr
32
32
  var YOUTUBE_AUTOPLAY_TRIGGER_POINT = 'VIEWPORT';
33
33
  function Youtube(props) {
34
34
  var _a = (0, react_1.useContext)(DynamicLayout_1.dynamicLayoutContext), device = _a.device, mode = _a.mode;
35
- var CB_CONTENT_PROP_YOUTUBE = props.CB_CONTENT_PROP_YOUTUBE, CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
35
+ var index = props.index, CB_CONTENT_PROP_YOUTUBE = props.CB_CONTENT_PROP_YOUTUBE, CB_STYLE_PROP_BGCOLOR = props.CB_STYLE_PROP_BGCOLOR, CB_STYLE_PROP_SHADOW = props.CB_STYLE_PROP_SHADOW, CB_EFFECT_PROP_ENTANIM = props.CB_EFFECT_PROP_ENTANIM;
36
36
  var _b = (0, parseYoutubeContentProp_1.default)(CB_CONTENT_PROP_YOUTUBE, device, YOUTUBE_AUTOPLAY_TRIGGER_POINT), youtubeSrc = _b.youtubeSrc, thumbnailSrc = _b.thumbnailSrc, id = _b.id, cbAutoplayMode = _b.cbAutoplayMode;
37
37
  var isEditMode = mode === 'EDIT';
38
38
  var _c = getBGColorStyles(CB_STYLE_PROP_BGCOLOR, device), bgColorStyle = _c.style, bgColorHoverStyle = _c.hoverStyle;
@@ -42,7 +42,9 @@ function Youtube(props) {
42
42
  propsStyle.visibility = 'visible';
43
43
  }
44
44
  var cbRef = (0, react_1.useRef)(null);
45
- var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false });
45
+ var entry = (0, hooks_1.useIntersectionObserver)(cbRef, { threshold: 0.2, freezeOnceVisible: false }, [
46
+ index
47
+ ]);
46
48
  var isVisible = !!(entry === null || entry === void 0 ? void 0 : entry.isIntersecting);
47
49
  var effectCssProperties = isVisible ? effect : {};
48
50
  var isNoneEffectType = device === 'DESKTOP'
@@ -54,7 +56,7 @@ function Youtube(props) {
54
56
  var autoplayRef = (0, react_1.useRef)(null);
55
57
  var autoplayEntry = (0, hooks_1.useIntersectionObserver)(autoplayRef, {
56
58
  freezeOnceVisible: YOUTUBE_AUTOPLAY_TRIGGER_POINT === 'VIEWPORT-FREEZE' ? true : false
57
- });
59
+ }, [index]);
58
60
  var onLoadIframe = function () {
59
61
  var _a;
60
62
  if (!((_a = iframeRef.current) === null || _a === void 0 ? void 0 : _a.contentWindow)) {
@@ -19,3 +19,6 @@ export type CB_CONTENT_PROP_IMAGE = {
19
19
  export type CB_CONTENT_PROP_TWITTER = {
20
20
  CB_CONTENT_PROP_TWITTER_SPEC_SRC: STRING_PLAIN;
21
21
  };
22
+ export type CB_CONTENT_PROP_CODEBLOCK = {
23
+ CB_CONTENT_PROP_CODEBLOCK_SPEC_CODE: STRING_PLAIN;
24
+ };
@@ -0,0 +1 @@
1
+ export { default as useGroupDrag } from './useGroupDrag';
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.useGroupDrag = void 0;
7
+ var useGroupDrag_1 = require("./useGroupDrag");
8
+ Object.defineProperty(exports, "useGroupDrag", { enumerable: true, get: function () { return __importDefault(useGroupDrag_1).default; } });
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ import { LayoutItemWithGroupType } from './utils';
3
+ import type { LayoutsType } from '../../CustomSection';
4
+ import type { Device } from '../../util/types';
5
+ import type { DynamicLayoutProps } from '../../../../../DynamicLayout/types';
6
+ import type { Layout, LayoutItem } from 'publ-echo/dist/lib';
7
+ type Props = {
8
+ device: Device;
9
+ setLayouts: React.Dispatch<React.SetStateAction<LayoutsType>>;
10
+ sectionActionHandler: DynamicLayoutProps['sectionActionHandler'];
11
+ };
12
+ declare function useGroupDrag({ device, setLayouts, sectionActionHandler }: Props): {
13
+ setGroupCB: (selectedId: number | 'group', newId: number) => void;
14
+ breakGroupCB: () => void;
15
+ makeAllInOneGroup: () => void;
16
+ escapeFromGroup: (id: string) => void;
17
+ makeCollisionGroup: (id: number, selectedCBId?: number) => void;
18
+ makeCollisionOfBulk: () => void;
19
+ };
20
+ export declare function getGroupCB(layout: Layout): LayoutItemWithGroupType | null;
21
+ export declare const filterItemsById: (layout: Layout, idsToRemove: Array<string>) => LayoutItem[];
22
+ export default useGroupDrag;