pds-dev-kit-web 2.2.241 → 2.2.243
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/services/i18n/resources/en.json +3 -1
- package/dist/src/common/services/i18n/resources/es.json +3 -1
- package/dist/src/common/services/i18n/resources/fil.json +3 -1
- package/dist/src/common/services/i18n/resources/index.d.ts +14 -0
- package/dist/src/common/services/i18n/resources/ja.json +3 -1
- package/dist/src/common/services/i18n/resources/ko.json +3 -1
- package/dist/src/common/services/i18n/resources/zh-cn.json +3 -1
- package/dist/src/common/services/i18n/resources/zh-tw.json +3 -1
- package/dist/src/desktop/components/ContextMenu/ContextMenu.d.ts +3 -1
- package/dist/src/desktop/components/ContextMenu/ContextMenu.js +38 -7
- package/dist/src/desktop/components/Dropdown/Dropdown.d.ts +3 -1
- package/dist/src/desktop/components/Dropdown/Dropdown.js +6 -6
- 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/LocalizedContentModal/LocalizedContentModal.d.ts +10 -2
- package/dist/src/desktop/panels/LocalizedContentModal/LocalizedContentModal.js +92 -18
- package/dist/src/desktop/panels/SectionSheet/SectionSheet.d.ts +4 -1
- package/dist/src/desktop/panels/SectionSheet/SectionSheet.js +11 -3
- package/dist/src/mobile/components/ContextMenu/ContextMenu.d.ts +3 -1
- package/dist/src/mobile/components/ContextMenu/ContextMenu.js +38 -7
- package/dist/src/mobile/components/Dropdown/Dropdown.d.ts +3 -1
- package/dist/src/mobile/components/Dropdown/Dropdown.js +6 -6
- 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/package.json +1 -1
- package/release-note.md +3 -2
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
"str_9067": "If Simplified Chinese is not entered, members will see the content in English.",
|
|
101
101
|
"str_9068": "If Traditional Chinese is not entered, members will see the content in English.",
|
|
102
102
|
"str_9069": "If French is not entered, members will see the content in English.",
|
|
103
|
-
"str_9070": "If Spanish is not entered, members will see the content in English."
|
|
103
|
+
"str_9070": "If Spanish is not entered, members will see the content in English.",
|
|
104
|
+
"str_upload": "Upload",
|
|
105
|
+
"str_delete": "Delete"
|
|
104
106
|
}
|
|
105
107
|
}
|
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
"str_9067": "Si no ingresa chino simplificado, se mostrará a los miembros en inglés.",
|
|
101
101
|
"str_9068": "Si no ingresa en chino tradicional, se mostrará a los miembros en inglés.",
|
|
102
102
|
"str_9069": "Si no ingresa en francés, se mostrará a los miembros en inglés.",
|
|
103
|
-
"str_9070": "Si no ingresa en español, se mostrará a los miembros en inglés."
|
|
103
|
+
"str_9070": "Si no ingresa en español, se mostrará a los miembros en inglés.",
|
|
104
|
+
"str_upload": "Subir",
|
|
105
|
+
"str_delete": "borrar"
|
|
104
106
|
}
|
|
105
107
|
}
|
|
@@ -93,6 +93,8 @@
|
|
|
93
93
|
"str_channel_min_price": "ex) {{channelMinPrice}}",
|
|
94
94
|
"str_friendly_currency_won": "nalo",
|
|
95
95
|
"str_friendly_currency_jpy": "JPY",
|
|
96
|
-
"str_friendly_currency_dollar": "dolyar"
|
|
96
|
+
"str_friendly_currency_dollar": "dolyar",
|
|
97
|
+
"str_upload": "Upload",
|
|
98
|
+
"str_delete": "Tanggalin"
|
|
97
99
|
}
|
|
98
100
|
}
|
|
@@ -103,6 +103,8 @@ declare const locale: {
|
|
|
103
103
|
str_9068: string;
|
|
104
104
|
str_9069: string;
|
|
105
105
|
str_9070: string;
|
|
106
|
+
str_upload: string;
|
|
107
|
+
str_delete: string;
|
|
106
108
|
};
|
|
107
109
|
};
|
|
108
110
|
readonly en: {
|
|
@@ -208,6 +210,8 @@ declare const locale: {
|
|
|
208
210
|
str_9068: string;
|
|
209
211
|
str_9069: string;
|
|
210
212
|
str_9070: string;
|
|
213
|
+
str_upload: string;
|
|
214
|
+
str_delete: string;
|
|
211
215
|
};
|
|
212
216
|
};
|
|
213
217
|
readonly ja: {
|
|
@@ -313,6 +317,8 @@ declare const locale: {
|
|
|
313
317
|
str_9068: string;
|
|
314
318
|
str_9069: string;
|
|
315
319
|
str_9070: string;
|
|
320
|
+
str_upload: string;
|
|
321
|
+
str_delete: string;
|
|
316
322
|
};
|
|
317
323
|
};
|
|
318
324
|
readonly es: {
|
|
@@ -418,6 +424,8 @@ declare const locale: {
|
|
|
418
424
|
str_9068: string;
|
|
419
425
|
str_9069: string;
|
|
420
426
|
str_9070: string;
|
|
427
|
+
str_upload: string;
|
|
428
|
+
str_delete: string;
|
|
421
429
|
};
|
|
422
430
|
};
|
|
423
431
|
readonly 'zh-cn': {
|
|
@@ -523,6 +531,8 @@ declare const locale: {
|
|
|
523
531
|
str_9068: string;
|
|
524
532
|
str_9069: string;
|
|
525
533
|
str_9070: string;
|
|
534
|
+
str_upload: string;
|
|
535
|
+
str_delete: string;
|
|
526
536
|
};
|
|
527
537
|
};
|
|
528
538
|
readonly 'zh-tw': {
|
|
@@ -628,6 +638,8 @@ declare const locale: {
|
|
|
628
638
|
str_9068: string;
|
|
629
639
|
str_9069: string;
|
|
630
640
|
str_9070: string;
|
|
641
|
+
str_upload: string;
|
|
642
|
+
str_delete: string;
|
|
631
643
|
};
|
|
632
644
|
};
|
|
633
645
|
readonly fil: {
|
|
@@ -726,6 +738,8 @@ declare const locale: {
|
|
|
726
738
|
str_friendly_currency_won: string;
|
|
727
739
|
str_friendly_currency_jpy: string;
|
|
728
740
|
str_friendly_currency_dollar: string;
|
|
741
|
+
str_upload: string;
|
|
742
|
+
str_delete: string;
|
|
729
743
|
};
|
|
730
744
|
};
|
|
731
745
|
};
|
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
"str_9067": "簡体字中国語を入力しないと、会員に英語で表示されます。",
|
|
101
101
|
"str_9068": "中国語・繁体字を入力しない場合は、会員に英語で表示されます。",
|
|
102
102
|
"str_9069": "フランス語を入力しないと、メンバーに英語で表示されます。",
|
|
103
|
-
"str_9070": "スペイン語を入力しないと、会員に英語で表示されます。"
|
|
103
|
+
"str_9070": "スペイン語を入力しないと、会員に英語で表示されます。",
|
|
104
|
+
"str_upload": "アップロード",
|
|
105
|
+
"str_delete": "削除"
|
|
104
106
|
}
|
|
105
107
|
}
|
|
@@ -101,6 +101,8 @@
|
|
|
101
101
|
"str_9067": "중국어-간체를 입력하지 않을 경우, 회원에게 영어로 보여집니다.",
|
|
102
102
|
"str_9068": "중국어-번체를 입력하지 않을 경우, 회원에게 영어로 보여집니다.",
|
|
103
103
|
"str_9069": "프랑스어를 입력하지 않을 경우, 회원에게 영어로 보여집니다.",
|
|
104
|
-
"str_9070": "스페인어를 입력하지 않을 경우, 회원에게 영어로 보여집니다."
|
|
104
|
+
"str_9070": "스페인어를 입력하지 않을 경우, 회원에게 영어로 보여집니다.",
|
|
105
|
+
"str_upload": "업로드",
|
|
106
|
+
"str_delete": "삭제"
|
|
105
107
|
}
|
|
106
108
|
}
|
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
"str_9067": "如果您不输入简体中文,则会员以英文显示给会员。",
|
|
101
101
|
"str_9068": "如果您不输入繁体中文,则会员以英文显示给会员。",
|
|
102
102
|
"str_9069": "如果您不输入法语,则会员以英文显示给会员。",
|
|
103
|
-
"str_9070": "如果您不输入西班牙语,它将以英文显示给会员。"
|
|
103
|
+
"str_9070": "如果您不输入西班牙语,它将以英文显示给会员。",
|
|
104
|
+
"str_upload": "上传",
|
|
105
|
+
"str_delete": "删除"
|
|
104
106
|
}
|
|
105
107
|
}
|
|
@@ -100,6 +100,8 @@
|
|
|
100
100
|
"str_9067": "如果您不輸入簡體中文,則以英文顯示給會員。",
|
|
101
101
|
"str_9068": "如果您不輸入繁體中文,則以英文顯示給會員。",
|
|
102
102
|
"str_9069": "如果您不輸入法語,則以英文顯示給會員。",
|
|
103
|
-
"str_9070": "如果您不輸入西班牙語,則以英文顯示給會員。"
|
|
103
|
+
"str_9070": "如果您不輸入西班牙語,則以英文顯示給會員。",
|
|
104
|
+
"str_upload": "上傳",
|
|
105
|
+
"str_delete": "刪除"
|
|
104
106
|
}
|
|
105
107
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
|
2
3
|
type ContextMenuProps = {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
autoWidthMode?: 'none' | 'use';
|
|
5
6
|
maxHeight?: number;
|
|
6
7
|
customWidth?: string;
|
|
8
|
+
scrollVisibleType?: ScrollVisibleType;
|
|
7
9
|
};
|
|
8
|
-
declare function ContextMenu({ children, autoWidthMode, maxHeight, customWidth }: ContextMenuProps): JSX.Element;
|
|
10
|
+
declare function ContextMenu({ children, autoWidthMode, maxHeight, customWidth, scrollVisibleType }: ContextMenuProps): JSX.Element;
|
|
9
11
|
export default ContextMenu;
|
|
@@ -14,17 +14,38 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
14
|
};
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
|
|
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;
|
|
19
39
|
};
|
|
20
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
-
var
|
|
42
|
+
var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
|
|
43
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
23
44
|
function ContextMenu(_a) {
|
|
24
|
-
var children = _a.children, _b = _a.autoWidthMode, autoWidthMode = _b === void 0 ? 'none' : _b, maxHeight = _a.maxHeight, customWidth = _a.customWidth;
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(S_ContextMenu, __assign({ "x-pds-name": "ContextMenu", "x-pds-element-type": "component", "x-pds-device-type": "desktop", autoWidth: autoWidthMode === 'use', maxHeight: maxHeight, customWidth: customWidth }, { children: children })));
|
|
45
|
+
var children = _a.children, _b = _a.autoWidthMode, autoWidthMode = _b === void 0 ? 'none' : _b, maxHeight = _a.maxHeight, customWidth = _a.customWidth, scrollVisibleType = _a.scrollVisibleType;
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(S_ContextMenu, __assign({ "x-pds-name": "ContextMenu", "x-pds-element-type": "component", "x-pds-device-type": "desktop", autoWidth: autoWidthMode === 'use', maxHeight: maxHeight, customWidth: customWidth, scrollVisibleType: scrollVisibleType }, { children: children })));
|
|
26
47
|
}
|
|
27
|
-
var S_ContextMenu = styled_components_1.default.ul(
|
|
48
|
+
var S_ContextMenu = styled_components_1.default.ul(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: ", ";\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n max-height: ", ";\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n position: relative;\n vertical-align: baseline;\n width: ", ";\n\n z-index: 400;\n\n ", "\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: ", ";\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n max-height: ", ";\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n position: relative;\n vertical-align: baseline;\n width: ", ";\n\n z-index: 400;\n\n ", "\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
28
49
|
var theme = _a.theme;
|
|
29
50
|
return theme.ui_cpnt_contextmenu_base;
|
|
30
51
|
}, function (_a) {
|
|
@@ -51,6 +72,16 @@ var S_ContextMenu = styled_components_1.default.ul(templateObject_1 || (template
|
|
|
51
72
|
}, function (_a) {
|
|
52
73
|
var customWidth = _a.customWidth;
|
|
53
74
|
return customWidth && "width: ".concat(customWidth, ";min-width: ").concat(customWidth, ";");
|
|
75
|
+
}, function (_a) {
|
|
76
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
|
77
|
+
return scrollVisibleType &&
|
|
78
|
+
{
|
|
79
|
+
visible: scrollbarStyle_1.scrollbarStyle,
|
|
80
|
+
hidden: scrollbarStyle_1.scrollInvisible
|
|
81
|
+
}[scrollVisibleType];
|
|
82
|
+
}, function (_a) {
|
|
83
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
|
84
|
+
return scrollVisibleType === 'visible' && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ::-webkit-scrollbar-track {\n margin-bottom: 7px;\n margin-top: 7px;\n }\n "], ["\n ::-webkit-scrollbar-track {\n margin-bottom: 7px;\n margin-top: 7px;\n }\n "])));
|
|
54
85
|
});
|
|
55
86
|
exports.default = ContextMenu;
|
|
56
|
-
var templateObject_1;
|
|
87
|
+
var templateObject_1, templateObject_2;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { PDSTextType } from '../../../common';
|
|
3
|
+
import type { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
|
3
4
|
import type { DropdownGroupInfo, DropdownValueOption } from '../../../common/types';
|
|
4
5
|
type Props = {
|
|
5
6
|
colorTheme?: 'none' | 'dark' | 'white';
|
|
@@ -15,7 +16,8 @@ type Props = {
|
|
|
15
16
|
displayType?: 'text_only' | 'icon_only' | 'icon_text';
|
|
16
17
|
fontWeight?: 'bold' | 'regular';
|
|
17
18
|
groupInfoArray?: DropdownGroupInfo[];
|
|
19
|
+
scrollVisibleType?: ScrollVisibleType;
|
|
18
20
|
onChange?: (option: DropdownValueOption) => void;
|
|
19
21
|
};
|
|
20
|
-
declare function Dropdown({ colorTheme, value, defaultValue, hintText, maxHeightItemNumber, responsiveMode, size, state, valueArray, customWidth, displayType, fontWeight, groupInfoArray, onChange }: Props): JSX.Element;
|
|
22
|
+
declare function Dropdown({ colorTheme, value, defaultValue, hintText, maxHeightItemNumber, responsiveMode, size, state, valueArray, customWidth, displayType, fontWeight, groupInfoArray, scrollVisibleType, onChange }: Props): JSX.Element;
|
|
21
23
|
export default Dropdown;
|
|
@@ -57,11 +57,11 @@ function Dropdown(_a) {
|
|
|
57
57
|
// selectionMode = 'single',
|
|
58
58
|
_e = _a.size,
|
|
59
59
|
// selectionMode = 'single',
|
|
60
|
-
size = _e === void 0 ? 'large' : _e, _f = _a.state, state = _f === void 0 ? 'normal' : _f, valueArray = _a.valueArray, customWidth = _a.customWidth, _g = _a.displayType, displayType = _g === void 0 ? 'text_only' : _g, _h = _a.fontWeight, fontWeight = _h === void 0 ? 'regular' : _h, groupInfoArray = _a.groupInfoArray, onChange = _a.onChange;
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
60
|
+
size = _e === void 0 ? 'large' : _e, _f = _a.state, state = _f === void 0 ? 'normal' : _f, valueArray = _a.valueArray, customWidth = _a.customWidth, _g = _a.displayType, displayType = _g === void 0 ? 'text_only' : _g, _h = _a.fontWeight, fontWeight = _h === void 0 ? 'regular' : _h, groupInfoArray = _a.groupInfoArray, _j = _a.scrollVisibleType, scrollVisibleType = _j === void 0 ? 'visible' : _j, onChange = _a.onChange;
|
|
61
|
+
var _k = (0, react_1.useState)(false), isFocused = _k[0], setIsFocused = _k[1];
|
|
62
|
+
var _l = (0, react_1.useState)(null), selectedValue = _l[0], setSelectedValue = _l[1];
|
|
63
|
+
var _m = (0, react_1.useState)(null), contextMenuSizeOffset = _m[0], setContextMenuSizeOffset = _m[1];
|
|
64
|
+
var _o = (0, react_1.useState)(null), dropdownPositionOffset = _o[0], setDropdownPositionOffset = _o[1];
|
|
65
65
|
var contextMenuRef = (0, react_1.useRef)(null);
|
|
66
66
|
var dropdownRef = (0, react_1.useRef)(null);
|
|
67
67
|
/**
|
|
@@ -263,7 +263,7 @@ function Dropdown(_a) {
|
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
return ((0, jsx_runtime_1.jsxs)(S_Dropdown, __assign({ "x-pds-name": "Dropdown", "x-pds-element-type": "component", "x-pds-device-type": "desktop", className: "container", ref: dropdownRef, size: size, tabIndex: 0, onBlur: handleBlur, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_Select, __assign({ size: size, onClick: handleClick, isFocused: isFocused, state: state, colorTheme: colorTheme, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_TextLabel, __assign({ size: size, responsiveMode: responsiveMode, displayType: displayType }, { children: [(displayType === 'icon_only' || displayType === 'icon_text') && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.iconName) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: size === 'small' ? 20 : 24, iconName: selectedValue.iconName, fillType: selectedValue.iconFillType, colorKey: getIconColorKey() }), displayType === 'icon_text' && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (displayType === 'text_only' || displayType === 'icon_text') && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.text) || (value === null || value === void 0 ? void 0 : value.text) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) || hintText, styleTheme: fontWeight === 'bold' ? 'form2Bold' : 'form2Regular', singleLineMode: "use", colorTheme: getTextColorTheme(), colorOverride: getTextColorOverride(), ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }))] })), (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getArrowIconColorKey() })] })), isFocused &&
|
|
266
|
-
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_ContextMenuWrapper, __assign({ ref: contextMenuRef, contextMenuPositionCss: contextMenuPositionCss }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, __assign({ autoWidthMode: "use", maxHeight: maxHeight, customWidth: getCustomWidth() }, { children: groupInfoArray
|
|
266
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_ContextMenuWrapper, __assign({ ref: contextMenuRef, contextMenuPositionCss: contextMenuPositionCss }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, __assign({ autoWidthMode: "use", maxHeight: maxHeight, customWidth: getCustomWidth(), scrollVisibleType: scrollVisibleType }, { children: groupInfoArray
|
|
267
267
|
? Object.keys(resultByGroup).map(function (key) {
|
|
268
268
|
var _a, _b, _c;
|
|
269
269
|
return ((0, jsx_runtime_1.jsxs)(S_Group, __assign({ size: size, hasGroupTitle: Boolean((_a = groupInfoArray.find(function (groupInfo) { return groupInfo.key === key; })) === null || _a === void 0 ? void 0 : _a.title) }, { children: [((_b = groupInfoArray.find(function (groupInfo) { return groupInfo.key === key; })) === null || _b === void 0 ? void 0 : _b.title) && ((0, jsx_runtime_1.jsx)(S_Wrapper, __assign({ size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: (_c = groupInfoArray.find(function (groupInfo) { return groupInfo.key === key; })) === null || _c === void 0 ? void 0 : _c.title, colorTheme: "sysTextSecondary", styleTheme: "caption1Bold", letterSpacing: "0.15em" }) }))), resultByGroup[key].map(function (el) { return ((0, jsx_runtime_1.jsx)("div", __assign({ onMouseDown: function () { return handleClickOption(el); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, size: size, isSelected: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.value) === el.value, state: el.state, displayType: displayType }) }), el.value)); })] }), key));
|
|
@@ -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 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 = {
|
|
@@ -39,6 +41,7 @@ export type StyleProps = {
|
|
|
39
41
|
paddingBottom?: PaddingSpacingType;
|
|
40
42
|
paddingLeft?: PaddingSpacingType;
|
|
41
43
|
hasOnClick?: boolean;
|
|
44
|
+
scrollVisibleType?: ScrollVisibleType;
|
|
42
45
|
};
|
|
43
46
|
declare const paddingSpacing: {
|
|
44
47
|
readonly spacing_a: "spacingA";
|
|
@@ -56,5 +59,5 @@ declare const paddingSpacing: {
|
|
|
56
59
|
readonly spacing_m: "spacingM";
|
|
57
60
|
readonly spacing_n: "spacingN";
|
|
58
61
|
};
|
|
59
|
-
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;
|
|
62
|
+
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;
|
|
60
63
|
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": "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.scrollbarWithPaddingStyle,
|
|
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;
|
|
@@ -1,26 +1,34 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { LanguageCode } from '../../../common/types';
|
|
3
3
|
import type { RichTextEditorProps } from '../../components/RichTextEditor/RichTextEditor';
|
|
4
|
+
import type { ImageViewProps } from '../../../hybrid/components/ImageView/ImageView';
|
|
4
5
|
import type { ImageUploadHandler } from '../../../mobile/components/RichTextEditor';
|
|
5
6
|
export type RichEditorConfig = Omit<RichTextEditorProps, 'toolbar'> & {
|
|
6
7
|
toolbar?: string[];
|
|
7
8
|
onImageUpload: ImageUploadHandler;
|
|
8
9
|
};
|
|
10
|
+
export type ImageConfig = ImageViewProps & {
|
|
11
|
+
accept?: string;
|
|
12
|
+
onValid: (file: File) => boolean;
|
|
13
|
+
onImageUpload: ImageUploadHandler;
|
|
14
|
+
};
|
|
9
15
|
type LocalizedContentModalProps = {
|
|
10
16
|
isOpen: boolean;
|
|
11
17
|
size?: 'large' | 'medium' | 'small' | 'rlarge';
|
|
18
|
+
originalFieldType?: 'text' | 'image';
|
|
12
19
|
textFieldLineType?: 'single' | 'multi' | 'auto' | 'tinyeditor';
|
|
13
20
|
originalText?: string;
|
|
14
21
|
initialValues?: {
|
|
15
22
|
[key in LanguageCode]?: string;
|
|
16
23
|
};
|
|
17
24
|
visibleLanguages?: LanguageCode[];
|
|
18
|
-
readonly?: boolean;
|
|
19
25
|
richEditorConfig?: RichEditorConfig;
|
|
26
|
+
imageConfig?: ImageConfig;
|
|
27
|
+
readonly?: boolean;
|
|
20
28
|
onClose: () => void;
|
|
21
29
|
onApply?: (values: {
|
|
22
30
|
[key in LanguageCode]?: string;
|
|
23
31
|
}) => void;
|
|
24
32
|
};
|
|
25
|
-
declare function LocalizedContentModal({ isOpen, size, textFieldLineType, originalText, initialValues, visibleLanguages, readonly, richEditorConfig, onClose, onApply }: LocalizedContentModalProps): JSX.Element | null;
|
|
33
|
+
declare function LocalizedContentModal({ isOpen, originalFieldType, size, textFieldLineType, originalText, initialValues, visibleLanguages, readonly, richEditorConfig, imageConfig, onClose, onApply }: LocalizedContentModalProps): JSX.Element | null;
|
|
26
34
|
export default LocalizedContentModal;
|
|
@@ -14,6 +14,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
14
|
};
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
17
53
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
54
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
55
|
};
|
|
@@ -25,7 +61,9 @@ var react_i18next_1 = require("react-i18next");
|
|
|
25
61
|
var editorContentStyle_1 = require("../../../common/styles/editorContentStyle");
|
|
26
62
|
var components_1 = require("../../components");
|
|
27
63
|
var HTMLReader_1 = require("../../components/RichTextEditor/HTMLReader");
|
|
64
|
+
var index_1 = require("../../index");
|
|
28
65
|
var components_2 = require("../../../hybrid/components");
|
|
66
|
+
var components_3 = require("../../../sub/DynamicLayout/components");
|
|
29
67
|
var styled_components_1 = __importDefault(require("styled-components"));
|
|
30
68
|
var AnnotationSheet_1 = require("../AnnotationSheet");
|
|
31
69
|
var DesktopBasicModal_1 = require("../DesktopBasicModal");
|
|
@@ -48,18 +86,53 @@ var LANGUAGE_DESC_TEXT_KEYS = {
|
|
|
48
86
|
es: 'str_9070'
|
|
49
87
|
};
|
|
50
88
|
function LocalizedContentModal(_a) {
|
|
51
|
-
var
|
|
89
|
+
var _this = this;
|
|
90
|
+
var isOpen = _a.isOpen, _b = _a.originalFieldType, originalFieldType = _b === void 0 ? 'text' : _b, _c = _a.size, size = _c === void 0 ? 'medium' : _c, textFieldLineType = _a.textFieldLineType, originalText = _a.originalText, initialValues = _a.initialValues, visibleLanguages = _a.visibleLanguages, readonly = _a.readonly, richEditorConfig = _a.richEditorConfig, imageConfig = _a.imageConfig, onClose = _a.onClose, onApply = _a.onApply;
|
|
52
91
|
var t = (0, react_i18next_1.useTranslation)().t;
|
|
53
|
-
var
|
|
92
|
+
var form = (0, react_hook_form_1.useForm)({
|
|
54
93
|
defaultValues: initialValues
|
|
55
94
|
});
|
|
56
95
|
(0, react_1.useLayoutEffect)(function () {
|
|
57
96
|
if (isOpen && initialValues) {
|
|
58
|
-
|
|
97
|
+
form.reset(initialValues);
|
|
59
98
|
}
|
|
60
99
|
}, [isOpen, initialValues]);
|
|
100
|
+
var handleImageUpload = function (e, lang) { return __awaiter(_this, void 0, void 0, function () {
|
|
101
|
+
var file, isValid, result, error_1;
|
|
102
|
+
var _a;
|
|
103
|
+
return __generator(this, function (_b) {
|
|
104
|
+
switch (_b.label) {
|
|
105
|
+
case 0:
|
|
106
|
+
if (!((_a = e.target.files) === null || _a === void 0 ? void 0 : _a.length))
|
|
107
|
+
return [2 /*return*/];
|
|
108
|
+
file = e.target.files[0];
|
|
109
|
+
if (imageConfig === null || imageConfig === void 0 ? void 0 : imageConfig.onValid) {
|
|
110
|
+
isValid = imageConfig.onValid(file);
|
|
111
|
+
if (!isValid)
|
|
112
|
+
return [2 /*return*/];
|
|
113
|
+
}
|
|
114
|
+
if (!(imageConfig === null || imageConfig === void 0 ? void 0 : imageConfig.onImageUpload)) return [3 /*break*/, 4];
|
|
115
|
+
_b.label = 1;
|
|
116
|
+
case 1:
|
|
117
|
+
_b.trys.push([1, 3, , 4]);
|
|
118
|
+
return [4 /*yield*/, imageConfig.onImageUpload(file)];
|
|
119
|
+
case 2:
|
|
120
|
+
result = _b.sent();
|
|
121
|
+
if (result.location) {
|
|
122
|
+
form.setValue(lang, result.location);
|
|
123
|
+
}
|
|
124
|
+
return [3 /*break*/, 4];
|
|
125
|
+
case 3:
|
|
126
|
+
error_1 = _b.sent();
|
|
127
|
+
// eslint-disable-next-line no-console
|
|
128
|
+
console.error('Image upload failed', error_1);
|
|
129
|
+
return [3 /*break*/, 4];
|
|
130
|
+
case 4: return [2 /*return*/];
|
|
131
|
+
}
|
|
132
|
+
});
|
|
133
|
+
}); };
|
|
61
134
|
var handleApply = function () {
|
|
62
|
-
var formValues =
|
|
135
|
+
var formValues = form.getValues();
|
|
63
136
|
if (onApply) {
|
|
64
137
|
onApply(formValues);
|
|
65
138
|
}
|
|
@@ -70,22 +143,23 @@ function LocalizedContentModal(_a) {
|
|
|
70
143
|
};
|
|
71
144
|
if (!isOpen)
|
|
72
145
|
return null;
|
|
73
|
-
return ((0, jsx_runtime_1.jsx)(DesktopBasicModal_1.DesktopBasicModal, __assign({ titleText: t('str_multilingual_settings'), btnMode: readonly ? 'mbtn_amount1' : 'mbtn_amount2', mBtn1Text: readonly ? t('str_confirm') : t('str_apply'), mBtn2Text: t('str_cancel'), size: size, onClickMBtn1: handleApply, onClickMBtn2: handleCancel }, { children: (0, jsx_runtime_1.jsxs)(react_hook_form_1.FormProvider, __assign({},
|
|
74
|
-
return ((0, jsx_runtime_1.jsxs)(S_LanguageField, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: 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.TextLabel, { text: t(LANGUAGE_DESC_TEXT_KEYS[languageCode]), styleTheme: "caption1Regular", colorTheme: "sysTextSecondary" }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b" }), textFieldLineType === 'tinyeditor'
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
146
|
+
return ((0, jsx_runtime_1.jsx)(DesktopBasicModal_1.DesktopBasicModal, __assign({ titleText: t('str_multilingual_settings'), btnMode: readonly ? 'mbtn_amount1' : 'mbtn_amount2', mBtn1Text: readonly ? t('str_confirm') : t('str_apply'), mBtn2Text: t('str_cancel'), size: size, onClickMBtn1: handleApply, onClickMBtn2: handleCancel }, { children: (0, jsx_runtime_1.jsxs)(react_hook_form_1.FormProvider, __assign({}, form, { children: [originalText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: t('str_original_text'), wordBreak: "keep_all", styleTheme: "subTitleBold", colorTheme: "sysTextPrimary" }), originalFieldType === 'text' && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: textFieldLineType === 'tinyeditor' ? ((0, jsx_runtime_1.jsx)(S_ReadonlyContent, { children: (0, jsx_runtime_1.jsx)(HTMLReader_1.HTMLReader, { data: originalText }) })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: originalText, wordBreak: "keep_all", styleTheme: "body2Regular", colorTheme: "sysTextPrimary" })] })) })), originalFieldType === 'image' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsx)(components_3.ImageView, __assign({ width: "responsive", height: "responsive" }, imageConfig, { src: 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" })] })), visibleLanguages === null || visibleLanguages === void 0 ? void 0 : visibleLanguages.map(function (languageCode, index) {
|
|
147
|
+
return ((0, jsx_runtime_1.jsxs)(S_LanguageField, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: 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.TextLabel, { text: t(LANGUAGE_DESC_TEXT_KEYS[languageCode]), styleTheme: "caption1Regular", colorTheme: "sysTextSecondary" }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b" }), originalFieldType === 'text' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [textFieldLineType === 'tinyeditor' && readonly && ((0, jsx_runtime_1.jsx)(AnnotationSheet_1.AnnotationSheet, __assign({ width: "100%", height: "240px", backgroundColorTheme: "base3", shapeType: "round", radius: 16, paddingTop: "spacing_d", paddingRight: "spacing_d", paddingBottom: "spacing_d", paddingLeft: "spacing_d" }, { children: (0, jsx_runtime_1.jsx)(S_ReadonlyContent, { dangerouslySetInnerHTML: {
|
|
148
|
+
__html: (initialValues === null || initialValues === void 0 ? void 0 : initialValues[languageCode]) || ''
|
|
149
|
+
} }) }))), textFieldLineType === 'tinyeditor' && !readonly && ((0, jsx_runtime_1.jsx)(components_1.RichTextEditor, __assign({}, richEditorConfig, { onChange: function (value) { return form.setValue(languageCode, value); }, defaultText: form.getValues(languageCode), toolbar: (richEditorConfig === null || richEditorConfig === void 0 ? void 0 : richEditorConfig.toolbar) || [
|
|
150
|
+
'blocks',
|
|
151
|
+
'bold italic underline strikethrough',
|
|
152
|
+
'alignleft aligncenter alignright alignjustify',
|
|
153
|
+
'outdent indent',
|
|
154
|
+
'forecolor backcolor numlist bullist blockquote',
|
|
155
|
+
'link insertfile image media',
|
|
156
|
+
'undo redo',
|
|
157
|
+
'code'
|
|
158
|
+
] }))), textFieldLineType !== 'tinyeditor' && ((0, jsx_runtime_1.jsx)(components_1.TextField, { responsiveMode: "use", multiRows: textFieldLineType === 'multi' ? 5 : undefined, autoMaxRows: textFieldLineType === 'auto' ? 5 : undefined, autoMinRows: textFieldLineType === 'auto' ? 1 : undefined, name: languageCode, hintText: t('str_9071'), placeholder: "Input Text", textLineType: textFieldLineType, state: readonly ? 'disabled' : 'normal' }))] })), originalFieldType === 'image' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!readonly && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsxs)(S_ImageUploadButtonWrapper, { children: [(0, jsx_runtime_1.jsx)(index_1.D_UploadMainButton, { text: t('str_upload'), styleTheme: "secondary", size: "small", accept: (imageConfig === null || imageConfig === void 0 ? void 0 : imageConfig.accept) || 'image/png, image/jpg, image/jpeg, image/gif', onClick: function (e) { return handleImageUpload(e, languageCode); } }), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_b", spacingType: "width" }), (0, jsx_runtime_1.jsx)(components_1.MainButton, { text: t('str_delete'), styleTheme: "secondary", size: "small", state: form.watch(languageCode) ? 'normal' : 'disabled', onClick: function () { return form.setValue(languageCode, ''); } })] })] })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}), form.watch(languageCode) && ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_d" }), (0, jsx_runtime_1.jsx)(components_3.ImageView, __assign({ width: "responsive", height: "responsive" }, imageConfig, { src: form.watch(languageCode) }))] })), (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] })), index < ((visibleLanguages === null || visibleLanguages === void 0 ? void 0 : visibleLanguages.length) || 0) - 1 && (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f" })] }, "".concat(languageCode, "_field")));
|
|
86
159
|
})] })) })));
|
|
87
160
|
}
|
|
88
161
|
var S_LanguageField = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
|
|
89
162
|
var S_ReadonlyContent = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n height: 100%;\n overflow-y: auto;\n"], ["\n ", "\n height: 100%;\n overflow-y: auto;\n"])), editorContentStyle_1.editorContentStyle);
|
|
163
|
+
var S_ImageUploadButtonWrapper = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
90
164
|
exports.default = LocalizedContentModal;
|
|
91
|
-
var templateObject_1, templateObject_2;
|
|
165
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
|
@@ -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;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
|
2
3
|
type ContextMenuProps = {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
autoWidthMode?: 'none' | 'use';
|
|
5
6
|
maxHeight?: number;
|
|
6
7
|
customWidth?: string;
|
|
8
|
+
scrollVisibleType?: ScrollVisibleType;
|
|
7
9
|
};
|
|
8
|
-
declare function ContextMenu({ children, autoWidthMode, maxHeight, customWidth }: ContextMenuProps): JSX.Element;
|
|
10
|
+
declare function ContextMenu({ children, autoWidthMode, maxHeight, customWidth, scrollVisibleType }: ContextMenuProps): JSX.Element;
|
|
9
11
|
export default ContextMenu;
|
|
@@ -14,17 +14,38 @@ var __assign = (this && this.__assign) || function () {
|
|
|
14
14
|
};
|
|
15
15
|
return __assign.apply(this, arguments);
|
|
16
16
|
};
|
|
17
|
-
var
|
|
18
|
-
|
|
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;
|
|
19
39
|
};
|
|
20
40
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
41
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
-
var
|
|
42
|
+
var scrollbarStyle_1 = require("../../../common/styles/scroll/scrollbarStyle");
|
|
43
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
23
44
|
function ContextMenu(_a) {
|
|
24
|
-
var children = _a.children, _b = _a.autoWidthMode, autoWidthMode = _b === void 0 ? 'none' : _b, maxHeight = _a.maxHeight, customWidth = _a.customWidth;
|
|
25
|
-
return ((0, jsx_runtime_1.jsx)(S_ContextMenu, __assign({ "x-pds-name": "ContextMenu", "x-pds-element-type": "component", "x-pds-device-type": "mobile", autoWidth: autoWidthMode === 'use', maxHeight: maxHeight, customWidth: customWidth }, { children: children })));
|
|
45
|
+
var children = _a.children, _b = _a.autoWidthMode, autoWidthMode = _b === void 0 ? 'none' : _b, maxHeight = _a.maxHeight, customWidth = _a.customWidth, scrollVisibleType = _a.scrollVisibleType;
|
|
46
|
+
return ((0, jsx_runtime_1.jsx)(S_ContextMenu, __assign({ "x-pds-name": "ContextMenu", "x-pds-element-type": "component", "x-pds-device-type": "mobile", autoWidth: autoWidthMode === 'use', maxHeight: maxHeight, customWidth: customWidth, scrollVisibleType: scrollVisibleType }, { children: children })));
|
|
26
47
|
}
|
|
27
|
-
var S_ContextMenu = styled_components_1.default.ul(
|
|
48
|
+
var S_ContextMenu = styled_components_1.default.ul(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: ", ";\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n max-height: ", ";\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n position: relative;\n vertical-align: baseline;\n width: ", ";\n\n z-index: 400;\n\n ", "\n\n ", "\n\n ", "\n"], ["\n background-color: ", ";\n border: 1px solid ", ";\n border-radius: 14px;\n box-shadow: ", ";\n box-sizing: border-box;\n list-style: none;\n margin: 0;\n max-height: ", ";\n min-width: 128px;\n overflow-y: auto;\n padding: ", " 0;\n position: relative;\n vertical-align: baseline;\n width: ", ";\n\n z-index: 400;\n\n ", "\n\n ", "\n\n ", "\n"])), function (_a) {
|
|
28
49
|
var theme = _a.theme;
|
|
29
50
|
return theme.ui_cpnt_contextmenu_base;
|
|
30
51
|
}, function (_a) {
|
|
@@ -51,6 +72,16 @@ var S_ContextMenu = styled_components_1.default.ul(templateObject_1 || (template
|
|
|
51
72
|
}, function (_a) {
|
|
52
73
|
var customWidth = _a.customWidth;
|
|
53
74
|
return customWidth && "width: ".concat(customWidth, ";min-width: ").concat(customWidth, ";");
|
|
75
|
+
}, function (_a) {
|
|
76
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
|
77
|
+
return scrollVisibleType &&
|
|
78
|
+
{
|
|
79
|
+
visible: scrollbarStyle_1.scrollbarStyle,
|
|
80
|
+
hidden: scrollbarStyle_1.scrollInvisible
|
|
81
|
+
}[scrollVisibleType];
|
|
82
|
+
}, function (_a) {
|
|
83
|
+
var scrollVisibleType = _a.scrollVisibleType;
|
|
84
|
+
return scrollVisibleType === 'visible' && (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ::-webkit-scrollbar-track {\n margin-bottom: 7px;\n margin-top: 7px;\n }\n "], ["\n ::-webkit-scrollbar-track {\n margin-bottom: 7px;\n margin-top: 7px;\n }\n "])));
|
|
54
85
|
});
|
|
55
86
|
exports.default = ContextMenu;
|
|
56
|
-
var templateObject_1;
|
|
87
|
+
var templateObject_1, templateObject_2;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { PDSTextType } from '../../../common';
|
|
3
|
+
import type { ScrollVisibleType } from '../../../common/styles/scroll/scrollbarStyle';
|
|
3
4
|
import type { DropdownGroupInfo, DropdownValueOption } from '../../../common/types';
|
|
4
5
|
type Props = {
|
|
5
6
|
colorTheme?: 'none' | 'dark' | 'white';
|
|
@@ -15,7 +16,8 @@ type Props = {
|
|
|
15
16
|
displayType?: 'text_only' | 'icon_only' | 'icon_text';
|
|
16
17
|
fontWeight?: 'bold' | 'regular';
|
|
17
18
|
groupInfoArray?: DropdownGroupInfo[];
|
|
19
|
+
scrollVisibleType?: ScrollVisibleType;
|
|
18
20
|
onChange?: (option: DropdownValueOption) => void;
|
|
19
21
|
};
|
|
20
|
-
declare function Dropdown({ colorTheme, value, defaultValue, hintText, maxHeightItemNumber, responsiveMode, size, state, valueArray, customWidth, displayType, fontWeight, groupInfoArray, onChange }: Props): JSX.Element;
|
|
22
|
+
declare function Dropdown({ colorTheme, value, defaultValue, hintText, maxHeightItemNumber, responsiveMode, size, state, valueArray, customWidth, displayType, fontWeight, groupInfoArray, scrollVisibleType, onChange }: Props): JSX.Element;
|
|
21
23
|
export default Dropdown;
|
|
@@ -57,11 +57,11 @@ function Dropdown(_a) {
|
|
|
57
57
|
// selectionMode = 'single',
|
|
58
58
|
_e = _a.size,
|
|
59
59
|
// selectionMode = 'single',
|
|
60
|
-
size = _e === void 0 ? 'large' : _e, _f = _a.state, state = _f === void 0 ? 'normal' : _f, valueArray = _a.valueArray, customWidth = _a.customWidth, _g = _a.displayType, displayType = _g === void 0 ? 'text_only' : _g, _h = _a.fontWeight, fontWeight = _h === void 0 ? 'regular' : _h, groupInfoArray = _a.groupInfoArray, onChange = _a.onChange;
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
60
|
+
size = _e === void 0 ? 'large' : _e, _f = _a.state, state = _f === void 0 ? 'normal' : _f, valueArray = _a.valueArray, customWidth = _a.customWidth, _g = _a.displayType, displayType = _g === void 0 ? 'text_only' : _g, _h = _a.fontWeight, fontWeight = _h === void 0 ? 'regular' : _h, groupInfoArray = _a.groupInfoArray, _j = _a.scrollVisibleType, scrollVisibleType = _j === void 0 ? 'visible' : _j, onChange = _a.onChange;
|
|
61
|
+
var _k = (0, react_1.useState)(false), isFocused = _k[0], setIsFocused = _k[1];
|
|
62
|
+
var _l = (0, react_1.useState)(null), selectedValue = _l[0], setSelectedValue = _l[1];
|
|
63
|
+
var _m = (0, react_1.useState)(null), contextMenuSizeOffset = _m[0], setContextMenuSizeOffset = _m[1];
|
|
64
|
+
var _o = (0, react_1.useState)(null), dropdownPositionOffset = _o[0], setDropdownPositionOffset = _o[1];
|
|
65
65
|
var contextMenuRef = (0, react_1.useRef)(null);
|
|
66
66
|
var dropdownRef = (0, react_1.useRef)(null);
|
|
67
67
|
/**
|
|
@@ -261,7 +261,7 @@ function Dropdown(_a) {
|
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
return ((0, jsx_runtime_1.jsxs)(S_Dropdown, __assign({ "x-pds-name": "Dropdown", "x-pds-element-type": "component", "x-pds-device-type": "mobile", className: "container", ref: dropdownRef, size: size, tabIndex: 0, onBlur: handleBlur, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_Select, __assign({ size: size, onClick: handleClick, isFocused: isFocused, state: state, colorTheme: colorTheme, responsiveMode: responsiveMode, customWidth: customWidth, displayType: displayType }, { children: [(0, jsx_runtime_1.jsxs)(S_TextLabel, __assign({ size: size, responsiveMode: responsiveMode, displayType: displayType }, { children: [(displayType === 'icon_only' || displayType === 'icon_text') && (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.iconName) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: size === 'small' ? 20 : 24, iconName: selectedValue.iconName, fillType: selectedValue.iconFillType, colorKey: getIconColorKey() }), displayType === 'icon_text' && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" })] })), (displayType === 'text_only' || displayType === 'icon_text') && ((0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.text) || (value === null || value === void 0 ? void 0 : value.text) || (defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue.text) || hintText, styleTheme: fontWeight === 'bold' ? 'form2Bold' : 'form2Regular', singleLineMode: "use", colorTheme: getTextColorTheme(), colorOverride: getTextColorOverride(), ellipsisMode: "use", lineLimit: 1, wordBreak: "break_all" }))] })), (0, jsx_runtime_1.jsx)(hybrid_1.Icon, { size: 16, fillType: "line", iconName: isFocused ? 'ic_arrow_up' : 'ic_arrow_down', colorKey: getArrowIconColorKey() })] })), isFocused &&
|
|
264
|
-
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_ContextMenuWrapper, __assign({ ref: contextMenuRef, contextMenuPositionCss: contextMenuPositionCss }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, __assign({ autoWidthMode: "use", maxHeight: maxHeight, customWidth: getCustomWidth() }, { children: groupInfoArray
|
|
264
|
+
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_ContextMenuWrapper, __assign({ ref: contextMenuRef, contextMenuPositionCss: contextMenuPositionCss }, { children: (0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, __assign({ autoWidthMode: "use", maxHeight: maxHeight, customWidth: getCustomWidth(), scrollVisibleType: scrollVisibleType }, { children: groupInfoArray
|
|
265
265
|
? Object.keys(resultByGroup).map(function (key) {
|
|
266
266
|
var _a, _b, _c;
|
|
267
267
|
return ((0, jsx_runtime_1.jsxs)(S_Group, __assign({ size: size, hasGroupTitle: Boolean((_a = groupInfoArray.find(function (groupInfo) { return groupInfo.key === key; })) === null || _a === void 0 ? void 0 : _a.title) }, { children: [((_b = groupInfoArray.find(function (groupInfo) { return groupInfo.key === key; })) === null || _b === void 0 ? void 0 : _b.title) && ((0, jsx_runtime_1.jsx)(S_Wrapper, __assign({ size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: (_c = groupInfoArray.find(function (groupInfo) { return groupInfo.key === key; })) === null || _c === void 0 ? void 0 : _c.title, colorTheme: "sysTextSecondary", styleTheme: "caption1Bold", letterSpacing: "0.15em" }) }))), resultByGroup[key].map(function (el) { return ((0, jsx_runtime_1.jsx)("div", __assign({ onMouseDown: function () { return handleClickOption(el); } }, { children: (0, jsx_runtime_1.jsx)(ContextMenuItem_1.ContextMenuItem, { option: el, size: size, isSelected: (selectedValue === null || selectedValue === void 0 ? void 0 : selectedValue.value) === el.value, state: el.state, displayType: displayType }) }), el.value)); })] }), key));
|
|
@@ -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.scrollbarWithPaddingStyle,
|
|
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;
|
package/package.json
CHANGED