pds-dev-kit-web-test 2.6.1 → 2.6.3
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/index.d.ts +5 -5
- package/dist/index.js +5 -7
- package/dist/src/common/assets/icons/fill/Gift.d.ts +4 -0
- package/dist/src/common/assets/icons/fill/Gift.js +30 -0
- package/dist/src/common/assets/icons/fill/index.d.ts +1 -0
- package/dist/src/common/assets/icons/fill/index.js +3 -1
- package/dist/src/common/assets/icons/line/Gift.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Gift.js +30 -0
- package/dist/src/common/assets/icons/line/index.d.ts +1 -0
- package/dist/src/common/assets/icons/line/index.js +3 -1
- package/dist/src/common/types/index.d.ts +1 -1
- package/dist/src/common/types/index.js +1 -1
- package/dist/src/common/types/{LocalizedContent.d.ts → multilingual.d.ts} +5 -6
- package/dist/src/desktop/components/BasicFormGroup/BasicFormGroup.d.ts +5 -4
- package/dist/src/desktop/components/BasicFormGroup/BasicFormGroup.js +53 -3
- package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.d.ts +5 -3
- package/dist/src/desktop/components/BodyTextGroup/BodyTextGroup.js +51 -3
- package/dist/src/desktop/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/src/desktop/components/index.d.ts +1 -2
- package/dist/src/desktop/components/index.js +1 -3
- package/dist/src/desktop/index.d.ts +2 -2
- package/dist/src/desktop/index.js +1 -3
- package/dist/src/desktop/panels/ContentSheet/ContentSheet.d.ts +4 -1
- package/dist/src/desktop/panels/ContentSheet/ContentSheet.js +11 -3
- package/dist/src/desktop/panels/MultilingualModal/MultilingualModal.d.ts +13 -0
- package/dist/src/desktop/panels/MultilingualModal/MultilingualModal.js +206 -0
- package/dist/src/desktop/panels/MultilingualModal/index.d.ts +1 -0
- package/dist/src/desktop/panels/{LocalizedContentModal → MultilingualModal}/index.js +2 -2
- package/dist/src/desktop/panels/SectionSheet/SectionSheet.d.ts +4 -1
- package/dist/src/desktop/panels/SectionSheet/SectionSheet.js +11 -3
- package/dist/src/desktop/panels/index.d.ts +2 -2
- package/dist/src/desktop/panels/index.js +3 -3
- package/dist/src/mobile/panels/ContentSheet/ContentSheet.d.ts +4 -1
- package/dist/src/mobile/panels/ContentSheet/ContentSheet.js +11 -3
- package/dist/src/mobile/panels/SectionSheet/SectionSheet.d.ts +4 -1
- package/dist/src/mobile/panels/SectionSheet/SectionSheet.js +11 -3
- package/dist/src/sub/DynamicLayout/sections/CustomSection/CustomSection.js +5 -3
- package/package.json +1 -1
- package/release-note.md +3 -3
- package/dist/src/common/styles/editorContentStyle.d.ts +0 -1
- package/dist/src/common/styles/editorContentStyle.js +0 -76
- package/dist/src/desktop/components/LocalizedButton/LocalizedButton.d.ts +0 -8
- package/dist/src/desktop/components/LocalizedButton/LocalizedButton.js +0 -44
- package/dist/src/desktop/components/LocalizedButton/index.d.ts +0 -1
- package/dist/src/desktop/components/LocalizedButton/index.js +0 -8
- package/dist/src/desktop/panels/LocalizedContentModal/LocalizedContentModal.d.ts +0 -24
- package/dist/src/desktop/panels/LocalizedContentModal/LocalizedContentModal.js +0 -81
- package/dist/src/desktop/panels/LocalizedContentModal/index.d.ts +0 -1
- /package/dist/src/common/types/{LocalizedContent.js → multilingual.js} +0 -0
@@ -39,6 +39,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
39
39
|
};
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
42
|
+
var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
|
42
43
|
var styled_components_1 = __importStar(require("styled-components"));
|
43
44
|
var styles_1 = require("../../../common/styles");
|
44
45
|
var backgroundColorTheme = {
|
@@ -71,7 +72,7 @@ var paddingSpacing = {
|
|
71
72
|
spacing_n: 'spacingN'
|
72
73
|
};
|
73
74
|
function ContentSheet(_a) {
|
74
|
-
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'base3' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, loadingWidth = _a.loadingWidth, loadingHeight = _a.loadingHeight, isLoading = _a.isLoading, onClick = _a.onClick;
|
75
|
+
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'base3' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, loadingWidth = _a.loadingWidth, loadingHeight = _a.loadingHeight, isLoading = _a.isLoading, _m = _a.scrollVisibleType, scrollVisibleType = _m === void 0 ? 'visible' : _m, onClick = _a.onClick;
|
75
76
|
var handleClick = function (e) {
|
76
77
|
if (onClick) {
|
77
78
|
onClick(e);
|
@@ -81,7 +82,7 @@ function ContentSheet(_a) {
|
|
81
82
|
if (isLoading) {
|
82
83
|
return ((0, jsx_runtime_1.jsx)(S_LoadingContentSheet, { "$width": width !== null && width !== void 0 ? width : loadingWidth, "$height": height !== null && height !== void 0 ? height : loadingHeight, shapeType: shapeType, "$radius": radius }));
|
83
84
|
}
|
84
|
-
return ((0, jsx_runtime_1.jsx)(S_ContentSheet, __assign({ "x-pds-name": "ContentSheet", "x-pds-element-type": "panel", "x-pds-device-type": "desktop", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick, hasOnClick: !!onClick }, { children: children })));
|
85
|
+
return ((0, jsx_runtime_1.jsx)(S_ContentSheet, __assign({ "x-pds-name": "ContentSheet", "x-pds-element-type": "panel", "x-pds-device-type": "desktop", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick, hasOnClick: !!onClick, scrollVisibleType: scrollVisibleType }, { children: children })));
|
85
86
|
};
|
86
87
|
return ContentSheetVariation();
|
87
88
|
}
|
@@ -112,7 +113,7 @@ var overrideStyle = (0, styled_components_1.css)(templateObject_6 || (templateOb
|
|
112
113
|
var theme = _a.theme, overrideBorderColorKey = _a.overrideBorderColorKey;
|
113
114
|
return overrideBorderColorKey && theme[overrideBorderColorKey];
|
114
115
|
});
|
115
|
-
var S_ContentSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"])), function (_a) {
|
116
|
+
var S_ContentSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
|
116
117
|
var theme = _a.theme, $backgroundColorTheme = _a.$backgroundColorTheme;
|
117
118
|
return $backgroundColorTheme && theme[backgroundColorTheme[$backgroundColorTheme]];
|
118
119
|
}, function (_a) {
|
@@ -148,6 +149,13 @@ var S_ContentSheet = styled_components_1.default.div(templateObject_7 || (templa
|
|
148
149
|
}, function (_a) {
|
149
150
|
var paddingLeft = _a.paddingLeft;
|
150
151
|
return paddingLeft !== 'none' && paddingLeftStyle;
|
152
|
+
}, function (_a) {
|
153
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
154
|
+
return scrollVisibleType &&
|
155
|
+
{
|
156
|
+
visible: scrollbarStyle_1.scrollbarStyle,
|
157
|
+
hidden: scrollbarStyle_1.scrollInvisible
|
158
|
+
}[scrollVisibleType];
|
151
159
|
}, overrideStyle);
|
152
160
|
var S_LoadingContentSheet = (0, styled_components_1.default)(S_ContentSheet)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.skeletonLoadingStyle);
|
153
161
|
exports.default = ContentSheet;
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
3
|
+
import type { MultilingualConfig } from '../../../common/types';
|
4
|
+
type MultilingualModalModalProps = {
|
5
|
+
isOpen: boolean;
|
6
|
+
onClose: () => void;
|
7
|
+
config?: MultilingualConfig;
|
8
|
+
size?: 'large' | 'medium' | 'small' | 'rlarge';
|
9
|
+
onHiddenInputUpdate?: (newValue: string) => void;
|
10
|
+
scrollVisibleType?: ScrollVisibleType;
|
11
|
+
};
|
12
|
+
declare function MultilingualModal({ isOpen, onClose, config, size, onHiddenInputUpdate, scrollVisibleType }: MultilingualModalModalProps): import("react").ReactPortal | null;
|
13
|
+
export default MultilingualModal;
|
@@ -0,0 +1,206 @@
|
|
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 __importDefault = (this && this.__importDefault) || function (mod) {
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
19
|
+
};
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
21
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
22
|
+
var react_1 = require("react");
|
23
|
+
var react_dom_1 = __importDefault(require("react-dom"));
|
24
|
+
var react_hook_form_1 = require("react-hook-form");
|
25
|
+
var react_i18next_1 = require("react-i18next");
|
26
|
+
var animationStyle_1 = require("../../../common/styles/movement/animationStyle");
|
27
|
+
var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
|
28
|
+
var components_1 = require("../../components");
|
29
|
+
var components_2 = require("../../../hybrid/components");
|
30
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
31
|
+
var LANGUAGE_I18N_KEYS = {
|
32
|
+
en: 'str_multilingual_en',
|
33
|
+
ko: 'str_multilingual_ko',
|
34
|
+
ja: 'str_multilingual_ja',
|
35
|
+
zh: 'str_multilingual_zh_cn',
|
36
|
+
'zh-Hant': 'str_multilingual_zh_tw',
|
37
|
+
fr: 'str_multilingual_fr',
|
38
|
+
es: 'str_multilingual_es'
|
39
|
+
};
|
40
|
+
function MultilingualModal(_a) {
|
41
|
+
var _b, _c;
|
42
|
+
var isOpen = _a.isOpen, onClose = _a.onClose, config = _a.config, _d = _a.size, size = _d === void 0 ? 'medium' : _d, onHiddenInputUpdate = _a.onHiddenInputUpdate, _e = _a.scrollVisibleType, scrollVisibleType = _e === void 0 ? 'visible' : _e;
|
43
|
+
var t = (0, react_i18next_1.useTranslation)().t;
|
44
|
+
var allLangInReadonly = (_b = config === null || config === void 0 ? void 0 : config.visibleLanguages) === null || _b === void 0 ? void 0 : _b.every(function (item) { var _a; return (_a = config === null || config === void 0 ? void 0 : config.readonlyLanguages) === null || _a === void 0 ? void 0 : _a.includes(item); });
|
45
|
+
// FormProvider에서 사용할 기본값 계산
|
46
|
+
var getDefaultValues = function () {
|
47
|
+
if (!config)
|
48
|
+
return {};
|
49
|
+
// 먼저 hiddenInput에 저장된 값이 있는지 확인
|
50
|
+
if (config.hiddenInputId) {
|
51
|
+
var hiddenInputId = "hiddenInput_".concat(config.hiddenInputId);
|
52
|
+
var hiddenInput = document.getElementById(hiddenInputId);
|
53
|
+
if (hiddenInput && hiddenInput.value) {
|
54
|
+
var existingValues = JSON.parse(hiddenInput.value);
|
55
|
+
// 빈 객체가 아닌 경우에만 사용
|
56
|
+
if (Object.keys(existingValues).length > 0) {
|
57
|
+
return existingValues;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
// hiddenInput에 값이 없으면 config.initialValues 사용
|
62
|
+
return config.initialValues || {};
|
63
|
+
};
|
64
|
+
var methods = (0, react_hook_form_1.useForm)({
|
65
|
+
defaultValues: getDefaultValues()
|
66
|
+
});
|
67
|
+
var container = (0, react_1.useState)(function () {
|
68
|
+
var modalRoot = document.createElement('div');
|
69
|
+
modalRoot.setAttribute('id', 'MultilingualModal');
|
70
|
+
return modalRoot;
|
71
|
+
})[0];
|
72
|
+
(0, react_1.useLayoutEffect)(function () {
|
73
|
+
if (!isOpen)
|
74
|
+
return;
|
75
|
+
var root = document.getElementById('root');
|
76
|
+
if (!root)
|
77
|
+
return;
|
78
|
+
root.appendChild(container);
|
79
|
+
return function () {
|
80
|
+
if (root.contains(container)) {
|
81
|
+
root.removeChild(container);
|
82
|
+
}
|
83
|
+
};
|
84
|
+
}, [isOpen, container]);
|
85
|
+
(0, react_1.useLayoutEffect)(function () {
|
86
|
+
if (isOpen && config) {
|
87
|
+
var newDefaultValues = getDefaultValues();
|
88
|
+
methods.reset(newDefaultValues);
|
89
|
+
}
|
90
|
+
}, [isOpen, config]);
|
91
|
+
var handleConfirm = function () {
|
92
|
+
var formValues = methods.getValues();
|
93
|
+
// hidden input에 다국어 값들을 JSON 형태로 저장
|
94
|
+
var newValue = JSON.stringify(formValues);
|
95
|
+
if (config === null || config === void 0 ? void 0 : config.hiddenInputId) {
|
96
|
+
var hiddenInputId = "hiddenInput_".concat(config.hiddenInputId);
|
97
|
+
var hiddenInput = document.getElementById(hiddenInputId);
|
98
|
+
if (hiddenInput) {
|
99
|
+
// BasicFormGroup의 state 업데이트
|
100
|
+
if (onHiddenInputUpdate) {
|
101
|
+
onHiddenInputUpdate(newValue);
|
102
|
+
}
|
103
|
+
// input change 이벤트 발생시켜서 form validation 등이 동작하도록 함
|
104
|
+
var event_1 = new Event('change', { bubbles: true });
|
105
|
+
hiddenInput.dispatchEvent(event_1);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
if (config === null || config === void 0 ? void 0 : config.onApply) {
|
109
|
+
config.onApply(formValues);
|
110
|
+
}
|
111
|
+
onClose();
|
112
|
+
};
|
113
|
+
var handleCancel = function () {
|
114
|
+
onClose();
|
115
|
+
};
|
116
|
+
if (!isOpen)
|
117
|
+
return null;
|
118
|
+
return react_dom_1.default.createPortal((0, jsx_runtime_1.jsxs)(react_hook_form_1.FormProvider, __assign({}, methods, { children: [(0, jsx_runtime_1.jsx)(S_ModalOverlay, { onClick: handleCancel }), (0, jsx_runtime_1.jsxs)(S_ModalWrapper, __assign({ "x-pds-name": "MultiLanguageModal", "x-pds-element-type": "panel", "x-pds-device-type": "desktop", size: size }, { children: [(0, jsx_runtime_1.jsx)(S_Header, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: t('str_multilingual_settings'), colorTheme: "sysTextPrimary", styleTheme: "headingBold" }) }), (0, jsx_runtime_1.jsxs)(S_Body, __assign({ scrollVisibleType: scrollVisibleType }, { children: [(config === null || config === void 0 ? void 0 : config.originalText) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.BodyTextGroup, { titleText: t('str_original_text'), contentText: config.originalText }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" }), (0, jsx_runtime_1.jsx)(components_2.Divider, {}), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] })), (_c = config === null || config === void 0 ? void 0 : config.visibleLanguages) === null || _c === void 0 ? void 0 : _c.map(function (languageCode, index) {
|
119
|
+
var _a, _b;
|
120
|
+
var isReadonly = (_a = config.readonlyLanguages) === null || _a === void 0 ? void 0 : _a.includes(languageCode);
|
121
|
+
return ((0, jsx_runtime_1.jsxs)(S_LanguageField, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: "".concat(t(LANGUAGE_I18N_KEYS[languageCode])), styleTheme: "subTitleBold", colorTheme: "sysTextPrimary" }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b" }), (0, jsx_runtime_1.jsx)(components_1.TextField, { responsiveMode: "use", multiRows: config.textFieldLineType === 'multi' ? 5 : undefined, autoMaxRows: config.textFieldLineType === 'auto' ? 5 : undefined, autoMinRows: config.textFieldLineType === 'auto' ? 1 : undefined, name: languageCode, hintText: t('str_9071'), placeholder: "Input Text", textLineType: config.textFieldLineType, state: isReadonly ? 'disabled' : 'normal' }), index < (((_b = config.visibleLanguages) === null || _b === void 0 ? void 0 : _b.length) || 0) - 1 && (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] }, "".concat(languageCode, "_field")));
|
122
|
+
})] })), (0, jsx_runtime_1.jsxs)(S_Footer, { children: [(0, jsx_runtime_1.jsx)(S_Left, {}), (0, jsx_runtime_1.jsxs)(S_Right, { children: [!allLangInReadonly && ((0, jsx_runtime_1.jsx)(S_Btn2Wrapper, { children: (0, jsx_runtime_1.jsx)(components_1.MainButton, { styleTheme: "secondary", text: t('str_cancel'), size: "medium", onClick: handleCancel }) })), (0, jsx_runtime_1.jsx)(components_1.MainButton, { text: allLangInReadonly ? t('str_confirm') : t('str_apply'), size: "medium", onClick: handleConfirm })] })] })] }))] })), container);
|
123
|
+
}
|
124
|
+
var S_ModalOverlay = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"], ["\n background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n\n ", "\n"])), function (_a) {
|
125
|
+
var theme = _a.theme;
|
126
|
+
return theme.ui_cpnt_modal_dimmed;
|
127
|
+
}, animationStyle_1.modalOverlayOnAni);
|
128
|
+
var S_ModalWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 24px;\n box-shadow: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n left: 50%;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: ", ";\n\n ", "\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 24px;\n box-shadow: ", ";\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n left: 50%;\n position: fixed;\n top: 50%;\n transform: translate(-50%, -50%);\n width: ", ";\n\n ", "\n"])), function (_a) {
|
129
|
+
var theme = _a.theme;
|
130
|
+
return theme.ui_cpnt_modal_base;
|
131
|
+
}, function (_a) {
|
132
|
+
var theme = _a.theme;
|
133
|
+
return theme.ui_cpnt_modal_border;
|
134
|
+
}, function (_a) {
|
135
|
+
var theme = _a.theme;
|
136
|
+
return theme.boxShadow.elevation4;
|
137
|
+
}, function (_a) {
|
138
|
+
var size = _a.size;
|
139
|
+
var sizes = {
|
140
|
+
large: '960px',
|
141
|
+
medium: '688px',
|
142
|
+
small: '400px',
|
143
|
+
rlarge: '80vw'
|
144
|
+
};
|
145
|
+
return size && sizes[size];
|
146
|
+
}, animationStyle_1.modalOnAni);
|
147
|
+
var S_Header = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"], ["\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"])), function (_a) {
|
148
|
+
var theme = _a.theme;
|
149
|
+
return theme.spacing.spacingC;
|
150
|
+
}, function (_a) {
|
151
|
+
var theme = _a.theme;
|
152
|
+
return theme.spacing.spacingE;
|
153
|
+
}, function (_a) {
|
154
|
+
var theme = _a.theme;
|
155
|
+
return theme.spacing.spacingE;
|
156
|
+
}, function (_a) {
|
157
|
+
var theme = _a.theme;
|
158
|
+
return theme.spacing.spacingE;
|
159
|
+
});
|
160
|
+
var S_Body = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: 1;\n max-height: 60vh;\n overflow: auto;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n ", "\n"], ["\n flex: 1;\n max-height: 60vh;\n overflow: auto;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n\n ", "\n"])), function (_a) {
|
161
|
+
var theme = _a.theme;
|
162
|
+
return theme.spacing.spacingF;
|
163
|
+
}, function (_a) {
|
164
|
+
var theme = _a.theme;
|
165
|
+
return theme.spacing.spacingE;
|
166
|
+
}, function (_a) {
|
167
|
+
var theme = _a.theme;
|
168
|
+
return theme.spacing.spacingE;
|
169
|
+
}, function (_a) {
|
170
|
+
var theme = _a.theme;
|
171
|
+
return theme.spacing.spacingD;
|
172
|
+
}, function (_a) {
|
173
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
174
|
+
return ({
|
175
|
+
visible: scrollbarStyle_1.scrollbarStyle,
|
176
|
+
hidden: scrollbarStyle_1.scrollInvisible
|
177
|
+
}[scrollVisibleType]);
|
178
|
+
});
|
179
|
+
var S_Footer = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n border-top: 1px solid ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"], ["\n border-top: 1px solid ", ";\n box-sizing: border-box;\n display: flex;\n justify-content: space-between;\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n padding-top: ", ";\n"])), function (_a) {
|
180
|
+
var theme = _a.theme;
|
181
|
+
return theme.ui_cpnt_modal_border;
|
182
|
+
}, function (_a) {
|
183
|
+
var theme = _a.theme;
|
184
|
+
return theme.spacing.spacingD;
|
185
|
+
}, function (_a) {
|
186
|
+
var theme = _a.theme;
|
187
|
+
return theme.spacing.spacingE;
|
188
|
+
}, function (_a) {
|
189
|
+
var theme = _a.theme;
|
190
|
+
return theme.spacing.spacingE;
|
191
|
+
}, function (_a) {
|
192
|
+
var theme = _a.theme;
|
193
|
+
return theme.spacing.spacingD;
|
194
|
+
});
|
195
|
+
var S_Left = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
196
|
+
var theme = _a.theme;
|
197
|
+
return theme.spacing.spacingB;
|
198
|
+
});
|
199
|
+
var S_Btn2Wrapper = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
200
|
+
var theme = _a.theme;
|
201
|
+
return theme.spacing.spacingB;
|
202
|
+
});
|
203
|
+
var S_Right = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
204
|
+
var S_LanguageField = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
205
|
+
exports.default = MultilingualModal;
|
206
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './MultilingualModal';
|
@@ -4,5 +4,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.default = void 0;
|
7
|
-
var
|
8
|
-
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(
|
7
|
+
var MultilingualModal_1 = require("./MultilingualModal");
|
8
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return __importDefault(MultilingualModal_1).default; } });
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { UiColors } from '../../../common';
|
2
|
+
import type { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
2
3
|
import type { CSSProperties } from 'react';
|
3
4
|
type PaddingSpacingType = 'none' | keyof typeof paddingSpacing;
|
4
5
|
export type SectionSheetProps = {
|
@@ -18,6 +19,7 @@ export type SectionSheetProps = {
|
|
18
19
|
paddingLeft?: PaddingSpacingType;
|
19
20
|
overrideCSS?: CSSProperties;
|
20
21
|
children: React.ReactNode;
|
22
|
+
scrollVisibleType?: ScrollVisibleType;
|
21
23
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
22
24
|
};
|
23
25
|
export type StyleProps = {
|
@@ -36,6 +38,7 @@ export type StyleProps = {
|
|
36
38
|
paddingBottom?: PaddingSpacingType;
|
37
39
|
paddingLeft?: PaddingSpacingType;
|
38
40
|
hasOnClick?: boolean;
|
41
|
+
scrollVisibleType?: ScrollVisibleType;
|
39
42
|
};
|
40
43
|
declare const paddingSpacing: {
|
41
44
|
readonly spacing_a: "spacingA";
|
@@ -53,5 +56,5 @@ declare const paddingSpacing: {
|
|
53
56
|
readonly spacing_m: "spacingM";
|
54
57
|
readonly spacing_n: "spacingN";
|
55
58
|
};
|
56
|
-
declare function SectionSheet({ width, height, backgroundColorTheme, overrideBackgroundColorKey, borderMode, borderWidth, borderColorTheme, overrideBorderColorKey, shapeType, radius, paddingTop, paddingRight, paddingBottom, paddingLeft, overrideCSS, children, onClick }: SectionSheetProps): JSX.Element;
|
59
|
+
declare function SectionSheet({ width, height, backgroundColorTheme, overrideBackgroundColorKey, borderMode, borderWidth, borderColorTheme, overrideBorderColorKey, shapeType, radius, paddingTop, paddingRight, paddingBottom, paddingLeft, overrideCSS, children, scrollVisibleType, onClick }: SectionSheetProps): JSX.Element;
|
57
60
|
export default SectionSheet;
|
@@ -39,6 +39,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
39
39
|
};
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
42
|
+
var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
|
42
43
|
var styled_components_1 = __importStar(require("styled-components"));
|
43
44
|
var backgroundColorTheme = {
|
44
45
|
transparent: 'ui_cpnt_sheet_base_03',
|
@@ -70,13 +71,13 @@ var paddingSpacing = {
|
|
70
71
|
spacing_n: 'spacingN'
|
71
72
|
};
|
72
73
|
function SectionSheet(_a) {
|
73
|
-
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'transparent' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, onClick = _a.onClick;
|
74
|
+
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'transparent' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, _m = _a.scrollVisibleType, scrollVisibleType = _m === void 0 ? 'visible' : _m, onClick = _a.onClick;
|
74
75
|
var handleClick = function (e) {
|
75
76
|
if (onClick) {
|
76
77
|
onClick(e);
|
77
78
|
}
|
78
79
|
};
|
79
|
-
return ((0, jsx_runtime_1.jsx)(S_SectionSheet, __assign({ "x-pds-name": "SectionSheet", "x-pds-element-type": "panel", "x-pds-device-type": "desktop", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick, hasOnClick: !!onClick }, { children: children })));
|
80
|
+
return ((0, jsx_runtime_1.jsx)(S_SectionSheet, __assign({ "x-pds-name": "SectionSheet", "x-pds-element-type": "panel", "x-pds-device-type": "desktop", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick, hasOnClick: !!onClick, scrollVisibleType: scrollVisibleType }, { children: children })));
|
80
81
|
}
|
81
82
|
var radiusStyle = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), function (_a) {
|
82
83
|
var $radius = _a.$radius;
|
@@ -105,7 +106,7 @@ var advancedCSS = (0, styled_components_1.css)(templateObject_6 || (templateObje
|
|
105
106
|
var theme = _a.theme, overrideBorderColorKey = _a.overrideBorderColorKey;
|
106
107
|
return overrideBorderColorKey && theme[overrideBorderColorKey];
|
107
108
|
});
|
108
|
-
var S_SectionSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"])), function (_a) {
|
109
|
+
var S_SectionSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n cursor: ", ";\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
|
109
110
|
var theme = _a.theme, $backgroundColorTheme = _a.$backgroundColorTheme;
|
110
111
|
return $backgroundColorTheme && theme[backgroundColorTheme[$backgroundColorTheme]];
|
111
112
|
}, function (_a) {
|
@@ -141,6 +142,13 @@ var S_SectionSheet = styled_components_1.default.div(templateObject_7 || (templa
|
|
141
142
|
}, function (_a) {
|
142
143
|
var paddingLeft = _a.paddingLeft;
|
143
144
|
return paddingLeft !== 'none' && paddingLeftStyle;
|
145
|
+
}, function (_a) {
|
146
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
147
|
+
return scrollVisibleType &&
|
148
|
+
{
|
149
|
+
visible: scrollbarStyle_1.scrollbarStyle,
|
150
|
+
hidden: scrollbarStyle_1.scrollInvisible
|
151
|
+
}[scrollVisibleType];
|
144
152
|
}, advancedCSS);
|
145
153
|
exports.default = SectionSheet;
|
146
154
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
@@ -4,8 +4,8 @@ import { DesktopBasicModal } from './DesktopBasicModal';
|
|
4
4
|
import { DesktopBasicModalWithTab, DesktopBasicModalWithTabInfoType } from './DesktopBasicModalWithTab';
|
5
5
|
import { DesktopHeadlessModal } from './DesktopHeadlessModal';
|
6
6
|
import { DesktopTutorialModal, DesktopTutorialModalInfoType } from './DesktopTutorialModal';
|
7
|
-
import
|
7
|
+
import MultilingualModal from './MultilingualModal';
|
8
8
|
import { SectionSheet } from './SectionSheet';
|
9
|
-
export { AnnotationSheet, ContentSheet, DesktopBasicModal, DesktopBasicModalWithTab, DesktopHeadlessModal, DesktopTutorialModal,
|
9
|
+
export { AnnotationSheet, ContentSheet, DesktopBasicModal, DesktopBasicModalWithTab, DesktopHeadlessModal, DesktopTutorialModal, MultilingualModal, SectionSheet };
|
10
10
|
export { DesktopBasicModalWithTabInfoType };
|
11
11
|
export { DesktopTutorialModalInfoType };
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
4
|
};
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
-
exports.SectionSheet = exports.
|
6
|
+
exports.SectionSheet = exports.MultilingualModal = exports.DesktopTutorialModal = exports.DesktopHeadlessModal = exports.DesktopBasicModalWithTab = exports.DesktopBasicModal = exports.ContentSheet = exports.AnnotationSheet = void 0;
|
7
7
|
var AnnotationSheet_1 = require("./AnnotationSheet");
|
8
8
|
Object.defineProperty(exports, "AnnotationSheet", { enumerable: true, get: function () { return AnnotationSheet_1.AnnotationSheet; } });
|
9
9
|
var ContentSheet_1 = require("./ContentSheet");
|
@@ -16,7 +16,7 @@ var DesktopHeadlessModal_1 = require("./DesktopHeadlessModal");
|
|
16
16
|
Object.defineProperty(exports, "DesktopHeadlessModal", { enumerable: true, get: function () { return DesktopHeadlessModal_1.DesktopHeadlessModal; } });
|
17
17
|
var DesktopTutorialModal_1 = require("./DesktopTutorialModal");
|
18
18
|
Object.defineProperty(exports, "DesktopTutorialModal", { enumerable: true, get: function () { return DesktopTutorialModal_1.DesktopTutorialModal; } });
|
19
|
-
var
|
20
|
-
exports.
|
19
|
+
var MultilingualModal_1 = __importDefault(require("./MultilingualModal"));
|
20
|
+
exports.MultilingualModal = MultilingualModal_1.default;
|
21
21
|
var SectionSheet_1 = require("./SectionSheet");
|
22
22
|
Object.defineProperty(exports, "SectionSheet", { enumerable: true, get: function () { return SectionSheet_1.SectionSheet; } });
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { UiColors } from '../../../common';
|
2
|
+
import type { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
2
3
|
import type react from 'react';
|
3
4
|
type PaddingSpacingType = 'none' | keyof typeof paddingSpacing;
|
4
5
|
export type ContentSheetProps = {
|
@@ -21,6 +22,7 @@ export type ContentSheetProps = {
|
|
21
22
|
loadingWidth?: string;
|
22
23
|
loadingHeight?: string;
|
23
24
|
isLoading?: boolean;
|
25
|
+
scrollVisibleType?: ScrollVisibleType;
|
24
26
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
25
27
|
};
|
26
28
|
export type StyleProps = {
|
@@ -38,6 +40,7 @@ export type StyleProps = {
|
|
38
40
|
paddingRight?: PaddingSpacingType;
|
39
41
|
paddingBottom?: PaddingSpacingType;
|
40
42
|
paddingLeft?: PaddingSpacingType;
|
43
|
+
scrollVisibleType?: ScrollVisibleType;
|
41
44
|
};
|
42
45
|
declare const paddingSpacing: {
|
43
46
|
readonly spacing_a: "spacingA";
|
@@ -55,5 +58,5 @@ declare const paddingSpacing: {
|
|
55
58
|
readonly spacing_m: "spacingM";
|
56
59
|
readonly spacing_n: "spacingN";
|
57
60
|
};
|
58
|
-
declare function ContentSheet({ width, height, backgroundColorTheme, overrideBackgroundColorKey, borderMode, borderWidth, borderColorTheme, overrideBorderColorKey, shapeType, radius, paddingTop, paddingRight, paddingBottom, paddingLeft, overrideCSS, children, loadingWidth, loadingHeight, isLoading, onClick }: ContentSheetProps): JSX.Element;
|
61
|
+
declare function ContentSheet({ width, height, backgroundColorTheme, overrideBackgroundColorKey, borderMode, borderWidth, borderColorTheme, overrideBorderColorKey, shapeType, radius, paddingTop, paddingRight, paddingBottom, paddingLeft, overrideCSS, children, loadingWidth, loadingHeight, isLoading, scrollVisibleType, onClick }: ContentSheetProps): JSX.Element;
|
59
62
|
export default ContentSheet;
|
@@ -39,6 +39,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
39
39
|
};
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
42
|
+
var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
|
42
43
|
var styled_components_1 = __importStar(require("styled-components"));
|
43
44
|
var styles_1 = require("../../../common/styles");
|
44
45
|
var backgroundColorTheme = {
|
@@ -71,7 +72,7 @@ var paddingSpacing = {
|
|
71
72
|
spacing_n: 'spacingN'
|
72
73
|
};
|
73
74
|
function ContentSheet(_a) {
|
74
|
-
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'base3' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, loadingWidth = _a.loadingWidth, loadingHeight = _a.loadingHeight, isLoading = _a.isLoading, onClick = _a.onClick;
|
75
|
+
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'base3' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, loadingWidth = _a.loadingWidth, loadingHeight = _a.loadingHeight, isLoading = _a.isLoading, _m = _a.scrollVisibleType, scrollVisibleType = _m === void 0 ? 'visible' : _m, onClick = _a.onClick;
|
75
76
|
var handleClick = function (e) {
|
76
77
|
if (onClick) {
|
77
78
|
onClick(e);
|
@@ -81,7 +82,7 @@ function ContentSheet(_a) {
|
|
81
82
|
if (isLoading) {
|
82
83
|
return ((0, jsx_runtime_1.jsx)(S_LoadingContentSheet, { "$width": width !== null && width !== void 0 ? width : loadingWidth, "$height": height !== null && height !== void 0 ? height : loadingHeight, shapeType: shapeType, "$radius": radius }));
|
83
84
|
}
|
84
|
-
return ((0, jsx_runtime_1.jsx)(S_ContentSheet, __assign({ "x-pds-name": "ContentSheet", "x-pds-element-type": "panel", "x-pds-device-type": "mobile", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick }, { children: children })));
|
85
|
+
return ((0, jsx_runtime_1.jsx)(S_ContentSheet, __assign({ "x-pds-name": "ContentSheet", "x-pds-element-type": "panel", "x-pds-device-type": "mobile", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick, scrollVisibleType: scrollVisibleType }, { children: children })));
|
85
86
|
};
|
86
87
|
return ContentSheetVariation();
|
87
88
|
}
|
@@ -112,7 +113,7 @@ var overrideStyle = (0, styled_components_1.css)(templateObject_6 || (templateOb
|
|
112
113
|
var theme = _a.theme, overrideBorderColorKey = _a.overrideBorderColorKey;
|
113
114
|
return overrideBorderColorKey && theme[overrideBorderColorKey];
|
114
115
|
});
|
115
|
-
var S_ContentSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"])), function (_a) {
|
116
|
+
var S_ContentSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
|
116
117
|
var theme = _a.theme, $backgroundColorTheme = _a.$backgroundColorTheme;
|
117
118
|
return $backgroundColorTheme && theme[backgroundColorTheme[$backgroundColorTheme]];
|
118
119
|
}, function (_a) {
|
@@ -145,6 +146,13 @@ var S_ContentSheet = styled_components_1.default.div(templateObject_7 || (templa
|
|
145
146
|
}, function (_a) {
|
146
147
|
var paddingLeft = _a.paddingLeft;
|
147
148
|
return paddingLeft !== 'none' && paddingLeftStyle;
|
149
|
+
}, function (_a) {
|
150
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
151
|
+
return scrollVisibleType &&
|
152
|
+
{
|
153
|
+
visible: scrollbarStyle_1.scrollbarStyle,
|
154
|
+
hidden: scrollbarStyle_1.scrollInvisible
|
155
|
+
}[scrollVisibleType];
|
148
156
|
}, overrideStyle);
|
149
157
|
var S_LoadingContentSheet = (0, styled_components_1.default)(S_ContentSheet)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styles_1.skeletonLoadingStyle);
|
150
158
|
exports.default = ContentSheet;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import type { UiColors } from '../../../common';
|
2
|
+
import type { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
2
3
|
import type { CSSProperties } from 'react';
|
3
4
|
type PaddingSpacingType = 'none' | keyof typeof paddingSpacing;
|
4
5
|
export type SectionSheetProps = {
|
@@ -18,6 +19,7 @@ export type SectionSheetProps = {
|
|
18
19
|
paddingLeft?: PaddingSpacingType;
|
19
20
|
overrideCSS?: CSSProperties;
|
20
21
|
children: React.ReactNode;
|
22
|
+
scrollVisibleType?: ScrollVisibleType;
|
21
23
|
onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
|
22
24
|
};
|
23
25
|
export type StyleProps = {
|
@@ -35,6 +37,7 @@ export type StyleProps = {
|
|
35
37
|
paddingRight?: PaddingSpacingType;
|
36
38
|
paddingBottom?: PaddingSpacingType;
|
37
39
|
paddingLeft?: PaddingSpacingType;
|
40
|
+
scrollVisibleType?: ScrollVisibleType;
|
38
41
|
};
|
39
42
|
declare const paddingSpacing: {
|
40
43
|
readonly spacing_a: "spacingA";
|
@@ -52,5 +55,5 @@ declare const paddingSpacing: {
|
|
52
55
|
readonly spacing_m: "spacingM";
|
53
56
|
readonly spacing_n: "spacingN";
|
54
57
|
};
|
55
|
-
declare function SectionSheet({ width, height, backgroundColorTheme, overrideBackgroundColorKey, borderMode, borderWidth, borderColorTheme, overrideBorderColorKey, shapeType, radius, paddingTop, paddingRight, paddingBottom, paddingLeft, overrideCSS, children, onClick }: SectionSheetProps): JSX.Element;
|
58
|
+
declare function SectionSheet({ width, height, backgroundColorTheme, overrideBackgroundColorKey, borderMode, borderWidth, borderColorTheme, overrideBorderColorKey, shapeType, radius, paddingTop, paddingRight, paddingBottom, paddingLeft, overrideCSS, children, scrollVisibleType, onClick }: SectionSheetProps): JSX.Element;
|
56
59
|
export default SectionSheet;
|
@@ -39,6 +39,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
39
39
|
};
|
40
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
41
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
42
|
+
var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
|
42
43
|
var styled_components_1 = __importStar(require("styled-components"));
|
43
44
|
var backgroundColorTheme = {
|
44
45
|
transparent: 'ui_cpnt_sheet_base_03',
|
@@ -70,13 +71,13 @@ var paddingSpacing = {
|
|
70
71
|
spacing_n: 'spacingN'
|
71
72
|
};
|
72
73
|
function SectionSheet(_a) {
|
73
|
-
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'transparent' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, onClick = _a.onClick;
|
74
|
+
var width = _a.width, height = _a.height, _b = _a.backgroundColorTheme, backgroundColorTheme = _b === void 0 ? 'transparent' : _b, overrideBackgroundColorKey = _a.overrideBackgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderWidth, borderWidth = _d === void 0 ? 1 : _d, _e = _a.borderColorTheme, borderColorTheme = _e === void 0 ? 'grey' : _e, overrideBorderColorKey = _a.overrideBorderColorKey, _f = _a.shapeType, shapeType = _f === void 0 ? 'rectangle' : _f, _g = _a.radius, radius = _g === void 0 ? 24 : _g, _h = _a.paddingTop, paddingTop = _h === void 0 ? 'spacing_e' : _h, _j = _a.paddingRight, paddingRight = _j === void 0 ? 'spacing_e' : _j, _k = _a.paddingBottom, paddingBottom = _k === void 0 ? 'spacing_e' : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 'spacing_e' : _l, overrideCSS = _a.overrideCSS, children = _a.children, _m = _a.scrollVisibleType, scrollVisibleType = _m === void 0 ? 'visible' : _m, onClick = _a.onClick;
|
74
75
|
var handleClick = function (e) {
|
75
76
|
if (onClick) {
|
76
77
|
onClick(e);
|
77
78
|
}
|
78
79
|
};
|
79
|
-
return ((0, jsx_runtime_1.jsx)(S_SectionSheet, __assign({ "x-pds-name": "SectionSheet", "x-pds-element-type": "panel", "x-pds-device-type": "mobile", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick }, { children: children })));
|
80
|
+
return ((0, jsx_runtime_1.jsx)(S_SectionSheet, __assign({ "x-pds-name": "SectionSheet", "x-pds-element-type": "panel", "x-pds-device-type": "mobile", "$width": width, "$height": height, "$backgroundColorTheme": backgroundColorTheme, overrideBackgroundColorKey: overrideBackgroundColorKey, borderMode: borderMode, "$borderWidth": borderWidth, "$borderColorTheme": borderColorTheme, overrideBorderColorKey: overrideBorderColorKey, shapeType: shapeType, "$radius": radius, paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, style: overrideCSS, onClick: handleClick, scrollVisibleType: scrollVisibleType }, { children: children })));
|
80
81
|
}
|
81
82
|
var radiusStyle = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-radius: ", ";\n"], ["\n border-radius: ", ";\n"])), function (_a) {
|
82
83
|
var $radius = _a.$radius;
|
@@ -105,7 +106,7 @@ var advancedCSS = (0, styled_components_1.css)(templateObject_6 || (templateObje
|
|
105
106
|
var theme = _a.theme, overrideBorderColorKey = _a.overrideBorderColorKey;
|
106
107
|
return overrideBorderColorKey && theme[overrideBorderColorKey];
|
107
108
|
});
|
108
|
-
var S_SectionSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n"])), function (_a) {
|
109
|
+
var S_SectionSheet = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border-color: ", ";\n border-style: ", ";\n border-width: ", ";\n box-sizing: border-box;\n height: ", ";\n overflow-y: auto;\n width: ", ";\n\n ", ";\n\n ", ";\n ", ";\n ", ";\n ", ";\n\n ", "\n\n ", "\n"])), function (_a) {
|
109
110
|
var theme = _a.theme, $backgroundColorTheme = _a.$backgroundColorTheme;
|
110
111
|
return $backgroundColorTheme && theme[backgroundColorTheme[$backgroundColorTheme]];
|
111
112
|
}, function (_a) {
|
@@ -138,6 +139,13 @@ var S_SectionSheet = styled_components_1.default.div(templateObject_7 || (templa
|
|
138
139
|
}, function (_a) {
|
139
140
|
var paddingLeft = _a.paddingLeft;
|
140
141
|
return paddingLeft !== 'none' && paddingLeftStyle;
|
142
|
+
}, function (_a) {
|
143
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
144
|
+
return scrollVisibleType &&
|
145
|
+
{
|
146
|
+
visible: scrollbarStyle_1.scrollbarStyle,
|
147
|
+
hidden: scrollbarStyle_1.scrollInvisible
|
148
|
+
}[scrollVisibleType];
|
141
149
|
}, advancedCSS);
|
142
150
|
exports.default = SectionSheet;
|
143
151
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
@@ -267,7 +267,9 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
267
267
|
return Array.from(set);
|
268
268
|
});
|
269
269
|
setSelectedBlockId(null);
|
270
|
-
var
|
270
|
+
var newBulkIdsSet = new Set(__spreadArray(__spreadArray([], bulkBlockIds, true), bulks_1, true));
|
271
|
+
var newBulkIdsArray = Array.from(newBulkIdsSet);
|
272
|
+
var newBulkCBIds = newBulkIdsArray
|
271
273
|
.map(function (id) { return (0, group_1.formatBlockIdToCbId)(id); })
|
272
274
|
.filter(function (each) { return each !== null; });
|
273
275
|
var childrenCBIds = [];
|
@@ -278,7 +280,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
278
280
|
else {
|
279
281
|
childrenCBIds = newBulkCBIds;
|
280
282
|
}
|
281
|
-
var groupDisabled = getWorkDirDirectChildrenLength() ===
|
283
|
+
var groupDisabled = getWorkDirDirectChildrenLength() === newBulkIdsArray.length;
|
282
284
|
sectionActionHandler &&
|
283
285
|
sectionActionHandler({
|
284
286
|
type: '@CUSTOMSECTION/BLOCK_CLICKED',
|
@@ -286,7 +288,7 @@ var CustomSection = (0, react_1.forwardRef)(function CustomSection(props, ref) {
|
|
286
288
|
block: {
|
287
289
|
type: 'BULK',
|
288
290
|
blockId: 'BULK',
|
289
|
-
childrenBlockIds:
|
291
|
+
childrenBlockIds: newBulkIdsArray,
|
290
292
|
workDir: (_a = (0, group_1.getBlockWorkDirPath)(newblock, editingGroupBlock)) !== null && _a !== void 0 ? _a : 'NOT-FOUND',
|
291
293
|
childrenCBIds: childrenCBIds,
|
292
294
|
groupDisabled: groupDisabled && editingGroupBlock !== 'ROOT'
|