pds-dev-kit-web-test 2.5.260 → 2.5.262
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/common/assets/icons/fill/BringToFrontArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/BringToFrontArrow.js +30 -0
- package/dist/src/common/assets/icons/fill/DesktopSync.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/DesktopSync.js +30 -0
- package/dist/src/common/assets/icons/fill/MoveBackwardArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/MoveBackwardArrow.js +30 -0
- package/dist/src/common/assets/icons/fill/MoveForwardArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/MoveForwardArrow.js +30 -0
- package/dist/src/common/assets/icons/fill/SendToBackArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/SendToBackArrow.js +30 -0
- package/dist/src/common/assets/icons/fill/index.d.ts +5 -0
- package/dist/src/common/assets/icons/fill/index.js +11 -1
- package/dist/src/common/assets/icons/line/BringToFrontArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/line/BringToFrontArrow.js +30 -0
- package/dist/src/common/assets/icons/line/DesktopSync.d.ts +4 -0
- package/dist/src/common/assets/icons/line/DesktopSync.js +30 -0
- package/dist/src/common/assets/icons/line/MoveBackwardArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/line/MoveBackwardArrow.js +30 -0
- package/dist/src/common/assets/icons/line/MoveForwardArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/line/MoveForwardArrow.js +30 -0
- package/dist/src/common/assets/icons/line/SendToBackArrow.d.ts +4 -0
- package/dist/src/common/assets/icons/line/SendToBackArrow.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +5 -0
- package/dist/src/common/assets/icons/line/index.js +11 -1
- package/dist/src/common/hooks/useTooltip.js +1 -1
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +3 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +3 -1
- package/dist/src/common/styles/colorSet/SemanticColor.json +3 -1
- package/dist/src/common/styles/colorSet/UIColor.json +6 -2
- package/dist/src/common/styles/colorSet/index.d.ts +10 -0
- package/dist/src/common/styles/colorSet/ui-type.d.ts +4 -0
- package/dist/src/common/utils/SystemUIPositionGenerator/hoverTypeSystemUICssGenerator.js +1 -1
- package/dist/src/desktop/components/BasicButtonGroup/BasicButtonGroup.js +1 -1
- package/dist/src/desktop/components/Dropdown/Dropdown.js +6 -4
- package/dist/src/desktop/components/MainButton/MainButton.d.ts +1 -1
- package/dist/src/desktop/components/MainButton/MainButton.js +20 -6
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.d.ts +1 -1
- package/dist/src/desktop/components/UploadMainButton/UploadMainButton.js +21 -7
- package/dist/src/mobile/components/MainButton/MainButton.d.ts +1 -1
- package/dist/src/mobile/components/MainButton/MainButton.js +20 -6
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.d.ts +1 -1
- package/dist/src/mobile/components/UploadMainButton/UploadMainButton.js +20 -6
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/EditModeSectionMatcher.js +0 -3
- package/dist/src/sub/DynamicLayout/components/EditModeSectionMatcher/SectionBox.js +1 -1
- package/dist/src/sub/DynamicLayout/components/Section/ErrorBoundary/ErrorBoundary.js +1 -12
- package/dist/src/sub/DynamicLayout/components/SectionMatcher/SectionMatcher.js +3 -5
- package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/hooks/useCustomSectionShortcut/useCustomSectionShortcut.js +1 -6
- package/dist/src/sub/DynamicLayout/mock_samplePage.js +132 -132
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.d.ts +14038 -0
- package/dist/src/sub/DynamicLayout/pagesPreviewMock.js +35827 -0
- package/dist/src/sub/DynamicLayout/sectionActionTypes.d.ts +15 -64
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.d.ts +5 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +200 -731
- package/dist/src/sub/DynamicLayout/sections/{FlexGridCustomSection.d.ts → CustomSection/FlexGridCustomSection.d.ts} +5 -1
- package/dist/src/sub/DynamicLayout/sections/{FlexGridCustomSection.js → CustomSection/FlexGridCustomSection.js} +88 -44
- package/dist/src/sub/DynamicLayout/sections/CustomSection/FlexGridItem.d.ts +1 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/FlexGridItem.js +5 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/ComponentBlockMatcher.js +0 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button.js +23 -25
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.d.ts +76 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Button/btnTypes.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text.js +2 -16
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.d.ts +38 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/Text/types.js +2 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_Box.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_CB_BoxWithShadow.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/types.d.ts +1 -79
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.d.ts +4 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/getGoogleFonts.js +14 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGoogleFonts/index.js +3 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.d.ts +1 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/index.js +8 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.d.ts +22 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/hooks/useGroupDrag/useGroupDrag.js +273 -0
- package/dist/src/sub/DynamicLayout/sections/CustomSection/{newUtils/group.d.ts → hooks/useGroupDrag/utils.d.ts} +1 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/{newUtils/group.js → hooks/useGroupDrag/utils.js} +1 -14
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/colorUtil.d.ts +4 -4
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/replaceUndefinedValues.js +1 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/textUtil.d.ts +6 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.d.ts +2 -18
- package/dist/src/sub/DynamicLayout/sections/CustomSection/types.js +0 -2
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.d.ts +2 -5
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/parsePlacement.js +9 -12
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/parseStylePropTextSpec.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.d.ts +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/stylePropParsers/types.js +1 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/util/types.d.ts +5 -3
- package/dist/src/sub/DynamicLayout/types.d.ts +1 -45
- package/dist/src/sub/SandollFontKit/utils/appendSandollTagToHead.d.ts +1 -1
- package/dist/src/sub/SandollFontKit/utils/appendSandollTagToHead.js +11 -17
- package/package.json +3 -3
- package/release-note.md +2 -3
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.d.ts +0 -11
- package/dist/src/sub/DynamicLayout/CompositionRenderer/ComponentBlockMatcher.js +0 -56
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.d.ts +0 -9
- package/dist/src/sub/DynamicLayout/CompositionRenderer/Composition.js +0 -217
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.d.ts +0 -6
- package/dist/src/sub/DynamicLayout/CompositionRenderer/CompositionRenderer.js +0 -27
- package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItem.d.ts +0 -12
- package/dist/src/sub/DynamicLayout/CompositionRenderer/FlexGridItem.js +0 -75
- package/dist/src/sub/DynamicLayout/gleStyles.d.ts +0 -3
- package/dist/src/sub/DynamicLayout/gleStyles.js +0 -19
- package/dist/src/sub/DynamicLayout/mocks.d.ts +0 -1111
- package/dist/src/sub/DynamicLayout/mocks.js +0 -4775
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.d.ts +0 -8
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/ContentsCarousel/ContentsCarousel.js +0 -12
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_Backdrop.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/components/ComponentBlock/componentBlocks/components/S_Backdrop.js +0 -13
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/clsx.d.ts +0 -7
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/clsx.js +0 -33
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/fontSizeAdjustment.d.ts +0 -1
- package/dist/src/sub/DynamicLayout/sections/CustomSection/newUtils/fontSizeAdjustment.js +0 -333
@@ -1,5 +1,4 @@
|
|
1
1
|
"use strict";
|
2
|
-
/* eslint-disable no-console */
|
3
2
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
4
3
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
5
4
|
if (ar || !(i in from)) {
|
@@ -11,14 +10,12 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
11
10
|
};
|
12
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
13
12
|
exports.parsePlacement = void 0;
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
console.error('Z-ORDER NOT FOUND');
|
18
|
-
}
|
13
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
14
|
+
require("../types");
|
15
|
+
function parsePlacement(components) {
|
19
16
|
return components.reduce(function (acc, cur) {
|
20
17
|
var id = cur.id, jsonProperties = cur.jsonProperties, componentBlockCode = cur.componentBlockCode;
|
21
|
-
var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id, componentBlockCode
|
18
|
+
var _a = parsePropPlacement(jsonProperties.data.CB_PLACEMENT_PROP_PLACEMENT, id, componentBlockCode), mobileLayout = _a.mobileLayout, desktopLayout = _a.desktopLayout;
|
22
19
|
return {
|
23
20
|
sm: __spreadArray(__spreadArray([], acc.sm, true), [mobileLayout], false),
|
24
21
|
lg: __spreadArray(__spreadArray([], acc.lg, true), [desktopLayout], false)
|
@@ -26,15 +23,15 @@ function parsePlacement(components, zOrders) {
|
|
26
23
|
}, { sm: [], lg: [] });
|
27
24
|
}
|
28
25
|
exports.parsePlacement = parsePlacement;
|
29
|
-
function parsePropPlacement(props, id, cbCode
|
26
|
+
function parsePropPlacement(props, id, cbCode) {
|
30
27
|
var desktopLayout = {
|
31
28
|
i: id.toString(),
|
32
29
|
x: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTX,
|
33
30
|
y: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY,
|
34
31
|
w: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS,
|
35
32
|
h: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS,
|
36
|
-
z:
|
37
|
-
autoResize: cbCode ===
|
33
|
+
z: props.CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX + 500
|
34
|
+
// autoResize: cbCode === CB_ALL_CODES.CB_TEXT
|
38
35
|
};
|
39
36
|
var mobileLayout = {
|
40
37
|
i: id.toString(),
|
@@ -42,8 +39,8 @@ function parsePropPlacement(props, id, cbCode, zOrders) {
|
|
42
39
|
y: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_STARTY:MOBILE'],
|
43
40
|
w: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_COLS:MOBILE'],
|
44
41
|
h: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ROWS:MOBILE'],
|
45
|
-
z:
|
46
|
-
autoResize: cbCode ===
|
42
|
+
z: props['CB_PLACEMENT_PROP_PLACEMENT_SPEC_ZINDEX:MOBILE'] + 500
|
43
|
+
// autoResize: cbCode === CB_ALL_CODES.CB_TEXT
|
47
44
|
};
|
48
45
|
return {
|
49
46
|
mobileLayout: mobileLayout,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/types';
|
1
|
+
import type { CB_STYLE_PROP_TEXT_SPECS } from '../../components/ComponentBlock/componentBlocks/Text/types';
|
2
2
|
import type { Device, StyleAndHoverStyle } from '../types';
|
3
3
|
import type { CB_STYLE_PROP_KEYS } from './types';
|
4
4
|
export type NAMED_CB_STYLE_TEXT_PROPS = {
|
@@ -14,7 +14,7 @@ export declare enum CB_STYLE_PROP_KEYS {
|
|
14
14
|
CB_STYLE_PROP_SHADOW = "CB_STYLE_PROP_SHADOW",
|
15
15
|
CB_STYLE_PROP_BORDER = "CB_STYLE_PROP_BORDER",
|
16
16
|
CB_STYLE_PROP_IMAGE = "CB_STYLE_PROP_IMAGE",
|
17
|
-
|
17
|
+
CB_STYLE_PROP_BTNCOLOR = "CB_STYLE_PROP_BTNCOLOR",
|
18
18
|
CB_STYLE_PROP_BGCOLOR = "CB_STYLE_PROP_BGCOLOR",
|
19
19
|
CB_STYLE_PROP_BGMEDIA = "CB_STYLE_PROP_BGMEDIA",
|
20
20
|
CB_STYLE_PROP_BGOVERLAY = "CB_STYLE_PROP_BGOVERLAY"
|
@@ -9,7 +9,7 @@ var CB_STYLE_PROP_KEYS;
|
|
9
9
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_SHADOW"] = "CB_STYLE_PROP_SHADOW";
|
10
10
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BORDER"] = "CB_STYLE_PROP_BORDER";
|
11
11
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_IMAGE"] = "CB_STYLE_PROP_IMAGE";
|
12
|
-
CB_STYLE_PROP_KEYS["
|
12
|
+
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BTNCOLOR"] = "CB_STYLE_PROP_BTNCOLOR";
|
13
13
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGCOLOR"] = "CB_STYLE_PROP_BGCOLOR";
|
14
14
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGMEDIA"] = "CB_STYLE_PROP_BGMEDIA";
|
15
15
|
CB_STYLE_PROP_KEYS["CB_STYLE_PROP_BGOVERLAY"] = "CB_STYLE_PROP_BGOVERLAY";
|
@@ -1,5 +1,7 @@
|
|
1
|
+
import type { CB_BTNTEXT_STYLE_PROPS, CB_STYLE_PROP_BTNCOLOR_SPECS } from '../components/ComponentBlock/componentBlocks/Button/btnTypes';
|
2
|
+
import type { CB_STYLE_PROP_TEXT_SPECS } from '../components/ComponentBlock/componentBlocks/Text/types';
|
1
3
|
import type { CB_TWITTER_STYLE_PROPS } from '../components/ComponentBlock/componentBlocks/Twitter/types';
|
2
|
-
import type { CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CODEBLOCK, CB_CONTENT_PROP_IMAGE, CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TWITTER
|
4
|
+
import type { CB_CONTENT_PROP_CLINK, CB_CONTENT_PROP_CODEBLOCK, CB_CONTENT_PROP_IMAGE, CB_CONTENT_PROP_TEXT, CB_CONTENT_PROP_TWITTER } from '../components/ComponentBlock/componentBlocks/types';
|
3
5
|
import type { CB_CONTENT_PROP_YOUTUBE_TYPE, CB_STYLE_PROP_BGCOLOR_SPECS } from '../components/ComponentBlock/componentBlocks/Youtube/types';
|
4
6
|
import type { CB_CONTENT_PROP_VISIBILITY_SPECS } from './contentPropParsers/parseContentVisibility';
|
5
7
|
import type { CB_EFFECT_PROP_ENTANIM_SPECS } from './effectPropParsers/parseEffectPropEntAnim';
|
@@ -51,11 +53,11 @@ export type CB_BTN_PROPERTIES_TYPE = CB_GENERAL_PROPERTIES_TYPE & {
|
|
51
53
|
CB_CONTENT_PROP_TEXT: CB_CONTENT_PROP_TEXT;
|
52
54
|
CB_CONTENT_PROP_CLINK: CB_CONTENT_PROP_CLINK;
|
53
55
|
CB_CONTENT_PROP_VISIBILITY: CB_CONTENT_PROP_VISIBILITY_SPECS;
|
54
|
-
|
56
|
+
CB_STYLE_PROP_BTNTEXT: CB_BTNTEXT_STYLE_PROPS;
|
55
57
|
CB_STYLE_PROP_BORDER: CB_STYLE_PROP_BORDER_SPECS;
|
56
58
|
CB_STYLE_PROP_SHADOW: CB_STYLE_PROP_SHADOW_SPECS;
|
57
59
|
CB_STYLE_PROP_OPACITY: CB_STYLE_PROP_TEXT_OPACITY_SPECS;
|
58
|
-
|
60
|
+
CB_STYLE_PROP_BTNCOLOR: CB_STYLE_PROP_BTNCOLOR_SPECS;
|
59
61
|
CB_LAYOUT_PROP_PADDING: CB_LAYOUT_PROP_PADDING_SPECS;
|
60
62
|
CB_LAYOUT_PROP_ARRANGE: CB_LAYOUT_PROP_ARRANGE_SPECS;
|
61
63
|
CB_EFFECT_PROP_ENTANIM: CB_EFFECT_PROP_ENTANIM_SPECS;
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import type { TypeOfSectionAction } from './sectionActionTypes';
|
2
|
+
import type { CustomSectionImperativeHandleRef } from './sections/CustomSection/CustomSection';
|
2
3
|
import type { ComponentBlock } from './sections/CustomSection/types';
|
3
4
|
import type { CB_CONTENT_PROP_VISIBILITY_SPECS } from './sections/CustomSection/util/contentPropParsers/parseContentVisibility';
|
4
5
|
import type { CB_EFFECT_PROP_ENTANIM_SPECS } from './sections/CustomSection/util/effectPropParsers/parseEffectPropEntAnim';
|
5
6
|
import type { CB_LAYOUT_PROP_PADDING_SPECS } from './sections/CustomSection/util/layoutPropParsers/parseLayoutPropPadding';
|
6
7
|
import type { CB_STYLE_PROP_BGCOLOR_SPECS } from './sections/CustomSection/util/stylePropParsers/parseStylePropBgColor';
|
7
8
|
import type { CB_STYLE_PROP_BGOVERLAY_SPECS } from './sections/CustomSection/util/stylePropParsers/parseStylePropBgOverlay';
|
8
|
-
import type { Block, ZOrder } from 'publ-echo-test/dist/lib/GridLayoutEditor/group';
|
9
9
|
import type { Ref } from 'react';
|
10
10
|
export { TypeOfSectionAction };
|
11
11
|
export type TypeOfSectionManifestSchema = 'BASE_INTRO' | 'BASE_CONTENTS' | 'BASE_CONTENTS_CAROUSEL' | 'BASE_FOOTER' | 'BASE_INFO_BOX' | 'EXP_IFRAME' | 'PRG_MEMBERSHIP_DISPLAY' | 'CUSTOM';
|
@@ -60,7 +60,6 @@ export interface ISection {
|
|
60
60
|
componentBlocks?: ComponentBlock[];
|
61
61
|
jsonProperties?: ISectionJsonProperties;
|
62
62
|
}
|
63
|
-
export type SectionPedigree = Block;
|
64
63
|
export interface SubscriptionProductInList {
|
65
64
|
id: number;
|
66
65
|
type: SubscriptionProductType;
|
@@ -213,11 +212,6 @@ export interface IItemDescription extends IDescription {
|
|
213
212
|
color?: string;
|
214
213
|
}
|
215
214
|
export type CustomSectionShortcutKeysType = 'BULK_SELECT' | 'COLLISION_SELECT' | 'SELECT_ALL' | 'MANUAL_COLLISION_SELECT' | 'MANUAL_BULK_BREAK' | null;
|
216
|
-
export type CustomSectionImperativeHandleRef = {
|
217
|
-
selectCB: (cbId: string) => void;
|
218
|
-
selectCBInBulk: (cbIds: string[]) => void;
|
219
|
-
selectGroup: (groupBlockId: string) => void;
|
220
|
-
};
|
221
215
|
export type DynamicLayoutProps = {
|
222
216
|
device: 'DESKTOP' | 'MOBILE';
|
223
217
|
/** @default 'NORMAL */
|
@@ -306,8 +300,6 @@ export type IMembershipDisplay = {
|
|
306
300
|
connectedMemberships: IConnectedMembership[];
|
307
301
|
};
|
308
302
|
export type ISectionJsonProperties = {
|
309
|
-
zOrders?: ZOrder;
|
310
|
-
pedigree?: SectionPedigree;
|
311
303
|
data: {
|
312
304
|
CB_CONTENT_PROP_SECTION: {
|
313
305
|
CB_CONTENT_PROP_SECTION_SPEC_VARIABLEROOTFONTSIZE: boolean;
|
@@ -324,8 +316,6 @@ export type ISectionJsonProperties = {
|
|
324
316
|
'CB_PLACEMENT_PROP_SECTION_SPEC_ROWS:MOBILE': number | null | undefined;
|
325
317
|
CB_PLACEMENT_PROP_SECTION_SPEC_WIDTH: number;
|
326
318
|
'CB_PLACEMENT_PROP_SECTION_SPEC_WIDTH:MOBILE': number | null | undefined;
|
327
|
-
CB_PLACEMENT_PROP_SECTION_SPEC_COLS?: number;
|
328
|
-
'CB_PLACEMENT_PROP_SECTION_SPEC_COLS:MOBILE': number | null | undefined;
|
329
319
|
};
|
330
320
|
CB_STYLE_PROP_BGCOLOR?: CB_STYLE_PROP_BGCOLOR_SPECS;
|
331
321
|
CB_STYLE_PROP_BGMEDIA?: CB_STYLE_PROP_BGMEDIA_SPECS;
|
@@ -374,37 +364,3 @@ export type CB_STYLE_PROP_BGMEDIA_SPECS = CB_STYLE_PROP_BGMEDIA_SPECS_BASE & {
|
|
374
364
|
'CB_STYLE_PROP_BGMEDIA_SPEC_YSRC:MOBILE': string | null | undefined;
|
375
365
|
'CB_STYLE_PROP_BGMEDIA_SPEC_YSRC:MOBILE:HOVER': string | null | undefined;
|
376
366
|
};
|
377
|
-
export interface IComposition {
|
378
|
-
id: number;
|
379
|
-
administrativeTitle?: string;
|
380
|
-
display: boolean;
|
381
|
-
order: number;
|
382
|
-
manifest: {
|
383
|
-
schema: TypeOfSectionManifestSchema;
|
384
|
-
availableProperties: Array<KeyOfSectionProperties>;
|
385
|
-
availableStyles: Array<KeyOfSectionStyles>;
|
386
|
-
availableTemplates: Array<TypeofSectionTemplate>;
|
387
|
-
} | Record<string, never>;
|
388
|
-
template: TypeofSectionTemplate;
|
389
|
-
properties: ISectionProperties;
|
390
|
-
styles: ISectionStyles;
|
391
|
-
dynamicLayoutSectionItems: Array<IItem> | null;
|
392
|
-
insertedAt: string;
|
393
|
-
updatedAt: string;
|
394
|
-
type: TypeOfSectionType;
|
395
|
-
program?: 'MEMBERSHIP_DISPLAY';
|
396
|
-
programData?: {
|
397
|
-
mdid: string;
|
398
|
-
preview: {
|
399
|
-
availableResources: ['REAL.MEMBERSHIP_DISPLAY'];
|
400
|
-
resources: {
|
401
|
-
mock: Record<string, never>;
|
402
|
-
real: {
|
403
|
-
membershipDisplay: IMembershipDisplay;
|
404
|
-
};
|
405
|
-
};
|
406
|
-
};
|
407
|
-
};
|
408
|
-
componentBlocks?: ComponentBlock[];
|
409
|
-
jsonProperties?: ISectionJsonProperties;
|
410
|
-
}
|
@@ -1 +1 @@
|
|
1
|
-
export default function
|
1
|
+
export default function appendSandollTagsToHead(tagString: string): void;
|
@@ -1,31 +1,25 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
/* eslint-disable no-console */
|
4
|
-
function
|
4
|
+
function appendSandollTagsToHead(tagString) {
|
5
5
|
try {
|
6
6
|
var tempDiv = document.createElement('div');
|
7
7
|
tempDiv.innerHTML = tagString.trim();
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
var href = sandollFontCssTag.getAttribute('href');
|
16
|
-
if (href) {
|
17
|
-
var prevSandollLinkTag = document.head.querySelector("".concat(tagName, "#sandoll-font-link"));
|
18
|
-
if (prevSandollLinkTag) {
|
19
|
-
if (prevSandollLinkTag.getAttribute('href') === href) {
|
8
|
+
Array.from(tempDiv.children).forEach(function (element, index) {
|
9
|
+
element.setAttribute('id', "sandoll-font-link-".concat(index));
|
10
|
+
var tagName = element.tagName.toLowerCase();
|
11
|
+
var href = element.getAttribute('href');
|
12
|
+
if (href) {
|
13
|
+
var existingElement = document.head.querySelector("".concat(tagName, "[href=\"").concat(href, "\"]"));
|
14
|
+
if (existingElement) {
|
20
15
|
return;
|
21
16
|
}
|
22
|
-
prevSandollLinkTag.remove();
|
23
17
|
}
|
24
|
-
document.head.appendChild(
|
25
|
-
}
|
18
|
+
document.head.appendChild(element);
|
19
|
+
});
|
26
20
|
}
|
27
21
|
catch (e) {
|
28
22
|
console.error(e);
|
29
23
|
}
|
30
24
|
}
|
31
|
-
exports.default =
|
25
|
+
exports.default = appendSandollTagsToHead;
|
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.262",
|
4
4
|
"license": "MIT",
|
5
5
|
"private": false,
|
6
6
|
"main": "dist/index.js",
|
@@ -22,8 +22,8 @@
|
|
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.
|
26
|
-
"publ-echo-test": "^0.0.
|
25
|
+
"publ-echo": "^0.0.104",
|
26
|
+
"publ-echo-test": "^0.0.200",
|
27
27
|
"react-hook-form": "^7.28.1",
|
28
28
|
"react-i18next": "^11.12.0",
|
29
29
|
"react-router-dom": "^5.2.0",
|
package/release-note.md
CHANGED
@@ -1,11 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import type { ComponentBlock } from '../sections/CustomSection/types';
|
3
|
-
import type { Device } from '../sections/CustomSection/util/types';
|
4
|
-
type Props = {
|
5
|
-
cbProps: ComponentBlock;
|
6
|
-
device: Device;
|
7
|
-
index: number;
|
8
|
-
rowHeight: number;
|
9
|
-
};
|
10
|
-
export default function ComponentBlockMatcher({ cbProps, device, index }: Props): JSX.Element;
|
11
|
-
export {};
|
@@ -1,56 +0,0 @@
|
|
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 Button_1 = __importDefault(require("../sections/CustomSection/components/ComponentBlock/componentBlocks/Button/Button"));
|
19
|
-
var Divider_1 = __importDefault(require("../sections/CustomSection/components/ComponentBlock/componentBlocks/Divider/Divider"));
|
20
|
-
var Embed_1 = __importDefault(require("../sections/CustomSection/components/ComponentBlock/componentBlocks/Embed/Embed"));
|
21
|
-
var Image_1 = __importDefault(require("../sections/CustomSection/components/ComponentBlock/componentBlocks/Image/Image"));
|
22
|
-
var RichText_1 = require("../sections/CustomSection/components/ComponentBlock/componentBlocks/RichText");
|
23
|
-
var Text_1 = __importDefault(require("../sections/CustomSection/components/ComponentBlock/componentBlocks/Text/Text"));
|
24
|
-
var Twitter_1 = __importDefault(require("../sections/CustomSection/components/ComponentBlock/componentBlocks/Twitter/Twitter"));
|
25
|
-
var Youtube_1 = require("../sections/CustomSection/components/ComponentBlock/componentBlocks/Youtube");
|
26
|
-
var newUtils_1 = require("../sections/CustomSection/newUtils");
|
27
|
-
var types_1 = require("../sections/CustomSection/types");
|
28
|
-
function ComponentBlockMatcher(_a) {
|
29
|
-
var cbProps = _a.cbProps, device = _a.device, index = _a.index;
|
30
|
-
var componentBlockCode = cbProps.componentBlockCode, data = cbProps.jsonProperties.data;
|
31
|
-
var propsWithValue = device === 'MOBILE' ? (0, newUtils_1.replaceUndefinedValues)(data) : data;
|
32
|
-
switch (componentBlockCode) {
|
33
|
-
case types_1.CB_ALL_CODES.CB_BTN:
|
34
|
-
return (0, jsx_runtime_1.jsx)(Button_1.default, __assign({}, propsWithValue, { index: index }));
|
35
|
-
case types_1.CB_ALL_CODES.CB_TEXT:
|
36
|
-
return (0, jsx_runtime_1.jsx)(Text_1.default, __assign({}, propsWithValue, { index: index }));
|
37
|
-
case types_1.CB_ALL_CODES.CB_RICHTEXT:
|
38
|
-
return (0, jsx_runtime_1.jsx)(RichText_1.RichText, __assign({}, propsWithValue, { index: index }));
|
39
|
-
case types_1.CB_ALL_CODES.CB_DIVIDER:
|
40
|
-
return (0, jsx_runtime_1.jsx)(Divider_1.default, __assign({}, propsWithValue, { index: index }));
|
41
|
-
case types_1.CB_ALL_CODES.CB_IMG:
|
42
|
-
return (0, jsx_runtime_1.jsx)(Image_1.default, __assign({}, propsWithValue, { index: index }));
|
43
|
-
case types_1.CB_ALL_CODES.CB_TWITTER:
|
44
|
-
return (0, jsx_runtime_1.jsx)(Twitter_1.default, __assign({}, propsWithValue, { index: index }));
|
45
|
-
case types_1.CB_ALL_CODES.CB_YOUTUBE:
|
46
|
-
return (0, jsx_runtime_1.jsx)(Youtube_1.Youtube, __assign({}, propsWithValue, { index: index }));
|
47
|
-
case types_1.CB_ALL_CODES.CB_EMBED:
|
48
|
-
return (0, jsx_runtime_1.jsx)(Embed_1.default, __assign({}, propsWithValue, { index: index }));
|
49
|
-
case types_1.CB_ALL_CODES.CB_CONTENTS_CAROUSEL: {
|
50
|
-
return (0, jsx_runtime_1.jsx)("div", { children: "NOT SUPPORTED NESTED CAROUSEL" });
|
51
|
-
}
|
52
|
-
default:
|
53
|
-
return (0, jsx_runtime_1.jsx)("div", { children: "Error: not supported CB" });
|
54
|
-
}
|
55
|
-
}
|
56
|
-
exports.default = ComponentBlockMatcher;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import type { ISection } from '../types';
|
3
|
-
import type { Layout } from 'publ-echo/dist/lib/GridLayoutEditor/types';
|
4
|
-
export type LayoutsType = {
|
5
|
-
sm: Layout;
|
6
|
-
lg: Layout;
|
7
|
-
};
|
8
|
-
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<ISection & React.RefAttributes<unknown>>>;
|
9
|
-
export default _default;
|
@@ -1,217 +0,0 @@
|
|
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 __assign = (this && this.__assign) || function () {
|
7
|
-
__assign = Object.assign || function(t) {
|
8
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
9
|
-
s = arguments[i];
|
10
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
11
|
-
t[p] = s[p];
|
12
|
-
}
|
13
|
-
return t;
|
14
|
-
};
|
15
|
-
return __assign.apply(this, arguments);
|
16
|
-
};
|
17
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
18
|
-
if (k2 === undefined) k2 = k;
|
19
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
20
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
21
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
22
|
-
}
|
23
|
-
Object.defineProperty(o, k2, desc);
|
24
|
-
}) : (function(o, m, k, k2) {
|
25
|
-
if (k2 === undefined) k2 = k;
|
26
|
-
o[k2] = m[k];
|
27
|
-
}));
|
28
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
29
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
30
|
-
}) : function(o, v) {
|
31
|
-
o["default"] = v;
|
32
|
-
});
|
33
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
34
|
-
if (mod && mod.__esModule) return mod;
|
35
|
-
var result = {};
|
36
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
37
|
-
__setModuleDefault(result, mod);
|
38
|
-
return result;
|
39
|
-
};
|
40
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
41
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
42
|
-
};
|
43
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
44
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
45
|
-
/* eslint-disable @typescript-eslint/no-unused-vars */
|
46
|
-
var react_1 = __importStar(require("react"));
|
47
|
-
var ErrorBoundary_1 = require("../../DynamicLayout/components/Section/ErrorBoundary");
|
48
|
-
var dynamicLayoutContext_1 = require("../../DynamicLayout/dynamicLayoutContext");
|
49
|
-
var styled_components_1 = __importDefault(require("styled-components"));
|
50
|
-
var components_1 = require("../components");
|
51
|
-
var gleStyles_1 = require("../gleStyles");
|
52
|
-
var useResizableObserver_1 = require("../sections/CustomSection/hooks/useResizableObserver");
|
53
|
-
var util_1 = require("../sections/CustomSection/util");
|
54
|
-
var parseSectionPadding_1 = __importDefault(require("../sections/CustomSection/util/layoutPropParsers/parseSectionPadding"));
|
55
|
-
var FlexGridItem_1 = __importDefault(require("./FlexGridItem"));
|
56
|
-
var GRID_CELL_MIN = 24;
|
57
|
-
var DESKTOP_GRID_COLS = 24;
|
58
|
-
var MOBILE_GRID_COLS = 8;
|
59
|
-
var GLE_MIN_WIDTH_DESKTOP_PX = "".concat(GRID_CELL_MIN * DESKTOP_GRID_COLS, "px");
|
60
|
-
var GLE_MIN_WIDTH_MOBILE_PX = "".concat(GRID_CELL_MIN * MOBILE_GRID_COLS, "px");
|
61
|
-
var Composition = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
62
|
-
var _a;
|
63
|
-
var _b = (0, react_1.useContext)(dynamicLayoutContext_1.dynamicLayoutContext), device = _b.device, editingSectionId = _b.editingSectionId, mode = _b.mode, shortcutKeyMode = _b.shortcutKeyMode, sectionActionHandler = _b.sectionActionHandler;
|
64
|
-
var componentBlocks = props.componentBlocks, jsonProperties = props.jsonProperties;
|
65
|
-
var _c = jsonProperties, _d = _c.data, CB_PLACEMENT_PROP_SECTION = _d.CB_PLACEMENT_PROP_SECTION, CB_LAYOUT_PROP_PADDING = _d.CB_LAYOUT_PROP_PADDING, zOrders = _c.zOrders;
|
66
|
-
var containerRef = (0, react_1.useRef)(null);
|
67
|
-
var size = (0, useResizableObserver_1.useResizeObserver)({ ref: containerRef, box: 'border-box' });
|
68
|
-
var _e = (0, react_1.useState)(null), selectedCB = _e[0], setSelectedCB = _e[1];
|
69
|
-
var gleRef = (0, react_1.useRef)(null);
|
70
|
-
var isMobile = device === 'MOBILE';
|
71
|
-
var isEditMode = mode === 'EDIT';
|
72
|
-
// const layoutByDevice = device === 'DESKTOP' ? 'lg' : 'sm';
|
73
|
-
// const [layouts] = useState<LayoutsType>(() => {
|
74
|
-
// const { lg, sm } = parsePlacement(componentBlocks ?? []);
|
75
|
-
// return {
|
76
|
-
// lg,
|
77
|
-
// sm
|
78
|
-
// };
|
79
|
-
// });
|
80
|
-
(0, react_1.useEffect)(function () {
|
81
|
-
if (editingSectionId !== props.id) {
|
82
|
-
setSelectedCB(null);
|
83
|
-
// breakGroupCB();
|
84
|
-
}
|
85
|
-
}, [editingSectionId]);
|
86
|
-
// NOTE: 추후에 event를 외부에서 전달받게하거나, 아예 상태를 끌어올리거나 해야합니다.
|
87
|
-
(0, react_1.useLayoutEffect)(function () {
|
88
|
-
if (props.id !== editingSectionId) {
|
89
|
-
return;
|
90
|
-
}
|
91
|
-
if (!shortcutKeyMode) {
|
92
|
-
return;
|
93
|
-
}
|
94
|
-
if (shortcutKeyMode === 'SELECT_ALL') {
|
95
|
-
if ((componentBlocks === null || componentBlocks === void 0 ? void 0 : componentBlocks.length) === 1) {
|
96
|
-
setSelectedCB(componentBlocks[0].id);
|
97
|
-
return;
|
98
|
-
}
|
99
|
-
// makeAllInOneGroup();
|
100
|
-
return;
|
101
|
-
}
|
102
|
-
if (shortcutKeyMode === 'MANUAL_BULK_BREAK') {
|
103
|
-
// breakGroupCB();
|
104
|
-
setSelectedCB(null);
|
105
|
-
return;
|
106
|
-
}
|
107
|
-
}, [shortcutKeyMode, setSelectedCB]);
|
108
|
-
(0, react_1.useLayoutEffect)(function () {
|
109
|
-
if (props.id !== editingSectionId) {
|
110
|
-
return;
|
111
|
-
}
|
112
|
-
if (shortcutKeyMode === 'MANUAL_COLLISION_SELECT') {
|
113
|
-
if (!selectedCB || selectedCB === 'BULK') {
|
114
|
-
return;
|
115
|
-
}
|
116
|
-
// makeCollisionGroup(selectedCB);
|
117
|
-
// sectionActionHandler &&
|
118
|
-
// sectionActionHandler({
|
119
|
-
// type: '@CUSTOMSECTION/BLOCK_CLICKED',
|
120
|
-
// payload: {
|
121
|
-
// block:
|
122
|
-
// }
|
123
|
-
// });
|
124
|
-
setSelectedCB('BULK');
|
125
|
-
}
|
126
|
-
}, [selectedCB, shortcutKeyMode, sectionActionHandler, setSelectedCB]);
|
127
|
-
var _f = (0, util_1.parseCustomSectionPlacement)({
|
128
|
-
isMobile: isMobile,
|
129
|
-
customSectionProps: CB_PLACEMENT_PROP_SECTION
|
130
|
-
}), width = _f.width, minHeight = _f.minHeight, isFullWidth = _f.isFullWidth;
|
131
|
-
var customSectionStyles = {
|
132
|
-
minHeight: "".concat(minHeight, "vh"),
|
133
|
-
width: '100%',
|
134
|
-
maxWidth: isFullWidth ? '' : "".concat(width, "px")
|
135
|
-
};
|
136
|
-
var onClickSection = function () {
|
137
|
-
if (!isEditMode) {
|
138
|
-
return;
|
139
|
-
}
|
140
|
-
setSelectedCB(null);
|
141
|
-
sectionActionHandler &&
|
142
|
-
sectionActionHandler({
|
143
|
-
type: '@CUSTOMSECTION/SECTION_CLICKED',
|
144
|
-
payload: {
|
145
|
-
sectionId: props.id
|
146
|
-
}
|
147
|
-
});
|
148
|
-
};
|
149
|
-
var padding = (0, parseSectionPadding_1.default)(CB_LAYOUT_PROP_PADDING, device);
|
150
|
-
var sectionRow = CB_PLACEMENT_PROP_SECTION[device === 'DESKTOP'
|
151
|
-
? 'CB_PLACEMENT_PROP_SECTION_SPEC_ROWS'
|
152
|
-
: 'CB_PLACEMENT_PROP_SECTION_SPEC_ROWS:MOBILE'];
|
153
|
-
var rowHeight = (function () {
|
154
|
-
if (!size.width) {
|
155
|
-
return 50;
|
156
|
-
}
|
157
|
-
if (device === 'MOBILE') {
|
158
|
-
var cellWidth_1 = size.width / MOBILE_GRID_COLS;
|
159
|
-
return cellWidth_1 * 0.56;
|
160
|
-
}
|
161
|
-
var cellWidth = size.width / DESKTOP_GRID_COLS;
|
162
|
-
return cellWidth * 0.56;
|
163
|
-
})();
|
164
|
-
var baseFontSize = (function () {
|
165
|
-
var _a, _b;
|
166
|
-
if (!size.width) {
|
167
|
-
return 16;
|
168
|
-
}
|
169
|
-
var responsiveFontMode = !!((_b = (_a = props.jsonProperties) === null || _a === void 0 ? void 0 : _a.data.CB_CONTENT_PROP_SECTION) === null || _b === void 0 ? void 0 : _b.CB_CONTENT_PROP_SECTION_SPEC_VARIABLEROOTFONTSIZE);
|
170
|
-
if (device === 'MOBILE') {
|
171
|
-
if (responsiveFontMode) {
|
172
|
-
return size.width * 0.0421;
|
173
|
-
}
|
174
|
-
if (size.width < 327) {
|
175
|
-
return Math.max(getDefensiveFontSize(device, size.width), 14);
|
176
|
-
}
|
177
|
-
return 16;
|
178
|
-
}
|
179
|
-
if (responsiveFontMode) {
|
180
|
-
return size.width * 0.0133;
|
181
|
-
}
|
182
|
-
if (size.width < 1200) {
|
183
|
-
return Math.max(getDefensiveFontSize(device, size.width), 14);
|
184
|
-
}
|
185
|
-
return 16;
|
186
|
-
})();
|
187
|
-
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(gleStyles_1.S_gleStyles, __assign({ style: { width: '100%', height: '100%' } }, { children: (0, jsx_runtime_1.jsx)(S_SectionWrapper, __assign({ ref: gleRef, "x-dlayout-section-type": "NO_NAME", onClick: onClickSection, style: {
|
188
|
-
width: '100%',
|
189
|
-
height: '100%'
|
190
|
-
} }, { children: (0, jsx_runtime_1.jsx)(components_1.CustomSection, __assign({}, props, { isMobile: isMobile, overrideStyles: {
|
191
|
-
// minHeight: customSectionStyles.minHeight,
|
192
|
-
paddingTop: padding.top,
|
193
|
-
paddingBottom: padding.bottom,
|
194
|
-
paddingRight: padding.right,
|
195
|
-
paddingLeft: padding.left,
|
196
|
-
width: '100%',
|
197
|
-
height: '100%'
|
198
|
-
} }, { children: (0, jsx_runtime_1.jsx)(GridContainer, __assign({ ref: containerRef, cols: isMobile ? 8 : 24, rowHeight: rowHeight, sectionRow: sectionRow !== null && sectionRow !== void 0 ? sectionRow : 0, style: {
|
199
|
-
width: customSectionStyles.width,
|
200
|
-
maxWidth: customSectionStyles.maxWidth,
|
201
|
-
minWidth: isMobile ? GLE_MIN_WIDTH_MOBILE_PX : GLE_MIN_WIDTH_DESKTOP_PX,
|
202
|
-
fontSize: "".concat(baseFontSize, "px")
|
203
|
-
} }, { children: (_a = props.componentBlocks) === null || _a === void 0 ? void 0 : _a.map(function (cb, index) {
|
204
|
-
var _a;
|
205
|
-
return ((0, jsx_runtime_1.jsx)(ErrorBoundary_1.ErrorBoundary, { children: (0, jsx_runtime_1.jsx)(FlexGridItem_1.default, { cb: cb, index: index, device: device, rowHeight: rowHeight, zIndex: (_a = zOrders === null || zOrders === void 0 ? void 0 : zOrders[device === 'DESKTOP' ? 'desktop' : 'mobile'][cb.id]) !== null && _a !== void 0 ? _a : 0 }) }, cb.id));
|
206
|
-
}) })) })) })) })) }));
|
207
|
-
});
|
208
|
-
var GridContainer = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(", ", minmax(", ", 1fr));\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"], ["\n display: grid; /* Space between grid items */\n gap: 10px;\n grid-auto-rows: minmax(", ", auto);\n grid-template-columns: repeat(", ", 1fr);\n grid-template-rows: repeat(", ", minmax(", ", 1fr));\n height: 100%;\n padding: 10px 10px;\n width: 100%;\n\n * {\n box-sizing: border-box;\n }\n"])), function (props) { return "".concat(props.rowHeight, "px"); }, function (props) { return props.cols; }, function (props) { return props.sectionRow; }, function (props) { return "".concat(0, "px"); });
|
209
|
-
var S_SectionWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n position: relative;\n"], ["\n position: relative;\n"])));
|
210
|
-
exports.default = react_1.default.memo(Composition);
|
211
|
-
function getDefensiveFontSize(device, width) {
|
212
|
-
if (device === 'MOBILE') {
|
213
|
-
return width * (0.0000868 * width + 0.0202);
|
214
|
-
}
|
215
|
-
return width * (0.0000246 * width - 0.01618);
|
216
|
-
}
|
217
|
-
var templateObject_1, templateObject_2;
|
@@ -1,27 +0,0 @@
|
|
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
|
-
require("react");
|
19
|
-
var Composition_1 = __importDefault(require("./Composition"));
|
20
|
-
function CompositionRenderer(_a) {
|
21
|
-
var compositions = _a.compositions;
|
22
|
-
return ((0, jsx_runtime_1.jsx)("div", __assign({ style: {
|
23
|
-
width: '100%',
|
24
|
-
height: '100%'
|
25
|
-
} }, { children: compositions.map(function (composition) { return ((0, jsx_runtime_1.jsx)(Composition_1.default, __assign({}, composition), composition.id)); }) })));
|
26
|
-
}
|
27
|
-
exports.default = CompositionRenderer;
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
import type { ComponentBlock } from '../sections/CustomSection/types';
|
3
|
-
import type { Device } from '../sections/CustomSection/util/types';
|
4
|
-
type Props = {
|
5
|
-
cb: ComponentBlock;
|
6
|
-
index: number;
|
7
|
-
device: Device;
|
8
|
-
rowHeight: number;
|
9
|
-
zIndex: number;
|
10
|
-
};
|
11
|
-
declare function FlexGridItem({ cb, index, device, rowHeight, zIndex }: Props): JSX.Element;
|
12
|
-
export default FlexGridItem;
|