pds-dev-kit-web 1.3.8 → 1.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/common/assets/icons/line/ArrowLeftThin.d.ts +4 -0
- package/dist/src/common/assets/icons/line/ArrowLeftThin.js +34 -0
- package/dist/src/common/assets/icons/line/ArrowRightThin.d.ts +4 -0
- package/dist/src/common/assets/icons/line/ArrowRightThin.js +34 -0
- package/dist/src/common/assets/icons/line/Download.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Download.js +34 -0
- package/dist/src/common/assets/icons/line/Folder.d.ts +4 -0
- package/dist/src/common/assets/icons/line/Folder.js +34 -0
- package/dist/src/common/assets/icons/line/index.d.ts +4 -0
- package/dist/src/common/assets/icons/line/index.js +8 -0
- package/dist/src/common/styles/colorSet/PaletteColor_Dark.json +4 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +4 -1
- package/dist/src/common/styles/colorSet/UIColor.json +8 -1
- package/dist/src/common/styles/colorSet/index.d.ts +166 -153
- package/dist/src/common/styles/colorSet/index.js +3 -3
- package/dist/src/common/styles/colorSet/ui-type.d.ts +7 -0
- package/dist/src/common/styles/theme.js +1 -1
- package/dist/src/common/styles/ui-colors.d.ts +3 -1
- package/dist/src/common/styles/ui-colors.js +5 -4
- package/dist/src/desktop/components/AdminList/AdminList.d.ts +3 -2
- package/dist/src/desktop/components/AdminList/AdminList.js +53 -17
- package/dist/src/desktop/components/AdminList/HeaderRow.d.ts +1 -1
- package/dist/src/desktop/components/AdminList/HeaderRow.js +2 -2
- package/dist/src/desktop/components/AdminListItem/AdminListItem.d.ts +1 -1
- package/dist/src/desktop/components/AdminListItem/AdminListItem.js +9 -8
- package/dist/src/desktop/components/Checkbox/Checkbox.js +2 -1
- package/dist/src/desktop/components/DesktopBasicModal/DesktopBasicModal.d.ts +5 -1
- package/dist/src/desktop/components/DesktopBasicModal/DesktopBasicModal.js +21 -18
- package/dist/src/desktop/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/src/desktop/components/Dropdown/Dropdown.js +3 -3
- package/dist/src/mobile/components/Dropdown/Dropdown.d.ts +2 -2
- package/dist/src/mobile/components/Dropdown/Dropdown.js +2 -2
- package/dist/src/mobile/components/MobileBasicModal/MobileBasicModal.d.ts +2 -1
- package/dist/src/mobile/components/MobileBasicModal/MobileBasicModal.js +18 -15
- package/package.json +1 -1
- package/release-note.md +5 -10
|
@@ -28,20 +28,21 @@ function buildCascadedColors(lowLevel, highLevel, override) {
|
|
|
28
28
|
// from server (원래는 비동기)
|
|
29
29
|
var colorSetting = {
|
|
30
30
|
tone: 'DARK',
|
|
31
|
-
|
|
31
|
+
palette: {
|
|
32
32
|
usr_good_job: '#999999'
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
var phaseTwoJSON = colorSetting.tone === 'LIGHT' ? colorSet_1.default.PaletteColor_light : colorSet_1.default.PaletteColor_Dark;
|
|
36
36
|
// ui-color-build-phase
|
|
37
|
-
var paletteColors = buildCascadedColors(colorSet_1.default.SemanticColor, phaseTwoJSON, colorSetting.
|
|
37
|
+
var paletteColors = buildCascadedColors(colorSet_1.default.SemanticColor, phaseTwoJSON, colorSetting.palette);
|
|
38
38
|
exports.uiColors = buildCascadedColors(paletteColors, colorSet_1.default.UIColor);
|
|
39
39
|
window.PdsUtils = {
|
|
40
40
|
tone: 'DARK'
|
|
41
41
|
};
|
|
42
|
-
var customTheme = function (tone) {
|
|
42
|
+
var customTheme = function (tone, palette) {
|
|
43
43
|
window.PdsUtils.tone = tone;
|
|
44
|
-
|
|
44
|
+
window.PdsUtils.palette = palette;
|
|
45
|
+
var buildedColors = buildCascadedColors(buildCascadedColors(colorSet_1.default.SemanticColor, tone === 'LIGHT' ? colorSet_1.default.PaletteColor_light : colorSet_1.default.PaletteColor_Dark, palette), colorSet_1.default.UIColor);
|
|
45
46
|
return buildedColors;
|
|
46
47
|
};
|
|
47
48
|
exports.customTheme = customTheme;
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { PDSValueOption } from '../../../common';
|
|
4
4
|
declare type ColumnWidthType = 'small' | 'medium' | 'large';
|
|
5
5
|
declare type Props = {
|
|
6
|
-
selectionMode?: 'none' | '
|
|
6
|
+
selectionMode?: 'none' | 'single' | 'multi';
|
|
7
7
|
headerRowMode?: 'none' | 'use';
|
|
8
8
|
column2HeaderText: TFunctionResult;
|
|
9
9
|
column3HeaderText?: TFunctionResult;
|
|
@@ -56,6 +56,7 @@ declare type Props = {
|
|
|
56
56
|
children?: React.ReactNode;
|
|
57
57
|
onSelect?: (ids: number[]) => void;
|
|
58
58
|
selectedIds?: number[];
|
|
59
|
+
maintainIds?: number[];
|
|
59
60
|
};
|
|
60
|
-
declare function AdminList({ selectionMode, headerRowMode, column2HeaderText, column3HeaderText, column3Width, column4HeaderText, column4Width, column5HeaderText, column5Width, column6HeaderText, column6Width, column7HeaderText, column7Width, column8HeaderText, column8Width, column9HeaderText, column9Width, column10HeaderText, column10Width, dropdownMode, dropdown1DefaultText, dropdown2DefaultText, dropdown3DefaultText, dropdown1ValueArray, dropdown2ValueArray, dropdown3ValueArray, quickActionBtnMode, quickActionBtn1Text, quickActionBtn2Text, quickActionBtn3Text, quickActionBtnType, quickActionBtn1State, quickActionBtn2State, quickActionBtn3State, mBtnMode, mBtn1Text, mBtn2Text, mBtn3Text, emptyText, scrollMode, scrollVisibleType, selectedIds, children, onChangeDropdown1, onChangeDropdown2, onChangeDropdown3, onClickMBtn1, onClickMBtn2, onClickMBtn3, onClickQuickActionBtn1, onClickQuickActionBtn2, onClickQuickActionBtn3, onSelect }: Props): JSX.Element;
|
|
61
|
+
declare function AdminList({ selectionMode, headerRowMode, column2HeaderText, column3HeaderText, column3Width, column4HeaderText, column4Width, column5HeaderText, column5Width, column6HeaderText, column6Width, column7HeaderText, column7Width, column8HeaderText, column8Width, column9HeaderText, column9Width, column10HeaderText, column10Width, dropdownMode, dropdown1DefaultText, dropdown2DefaultText, dropdown3DefaultText, dropdown1ValueArray, dropdown2ValueArray, dropdown3ValueArray, quickActionBtnMode, quickActionBtn1Text, quickActionBtn2Text, quickActionBtn3Text, quickActionBtnType, quickActionBtn1State, quickActionBtn2State, quickActionBtn3State, mBtnMode, mBtn1Text, mBtn2Text, mBtn3Text, emptyText, scrollMode, scrollVisibleType, selectedIds, maintainIds, children, onChangeDropdown1, onChangeDropdown2, onChangeDropdown3, onClickMBtn1, onClickMBtn2, onClickMBtn3, onClickQuickActionBtn1, onClickQuickActionBtn2, onClickQuickActionBtn3, onSelect }: Props): JSX.Element;
|
|
61
62
|
export default AdminList;
|
|
@@ -53,7 +53,7 @@ var TextLabel_1 = require("../TextLabel");
|
|
|
53
53
|
var BulkActionBar_1 = __importDefault(require("./BulkActionBar"));
|
|
54
54
|
var HeaderRow_1 = __importDefault(require("./HeaderRow"));
|
|
55
55
|
function AdminList(_a) {
|
|
56
|
-
var _b = _a.selectionMode, selectionMode = _b === void 0 ? '
|
|
56
|
+
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'multi' : _b, _c = _a.headerRowMode, headerRowMode = _c === void 0 ? 'use' : _c, column2HeaderText = _a.column2HeaderText, column3HeaderText = _a.column3HeaderText, _d = _a.column3Width, column3Width = _d === void 0 ? 'small' : _d, column4HeaderText = _a.column4HeaderText, _e = _a.column4Width, column4Width = _e === void 0 ? 'small' : _e, column5HeaderText = _a.column5HeaderText, _f = _a.column5Width, column5Width = _f === void 0 ? 'small' : _f, column6HeaderText = _a.column6HeaderText, _g = _a.column6Width, column6Width = _g === void 0 ? 'small' : _g, column7HeaderText = _a.column7HeaderText, _h = _a.column7Width, column7Width = _h === void 0 ? 'small' : _h, column8HeaderText = _a.column8HeaderText, _j = _a.column8Width, column8Width = _j === void 0 ? 'small' : _j, column9HeaderText = _a.column9HeaderText, _k = _a.column9Width, column9Width = _k === void 0 ? 'small' : _k, column10HeaderText = _a.column10HeaderText, _l = _a.column10Width, column10Width = _l === void 0 ? 'small' : _l, _m = _a.dropdownMode, dropdownMode = _m === void 0 ? 'dropdown_amount1' : _m, dropdown1DefaultText = _a.dropdown1DefaultText, dropdown2DefaultText = _a.dropdown2DefaultText, dropdown3DefaultText = _a.dropdown3DefaultText, dropdown1ValueArray = _a.dropdown1ValueArray, dropdown2ValueArray = _a.dropdown2ValueArray, dropdown3ValueArray = _a.dropdown3ValueArray, _o = _a.quickActionBtnMode, quickActionBtnMode = _o === void 0 ? 'btn_amount2' : _o, quickActionBtn1Text = _a.quickActionBtn1Text, quickActionBtn2Text = _a.quickActionBtn2Text, quickActionBtn3Text = _a.quickActionBtn3Text, _p = _a.quickActionBtnType, quickActionBtnType = _p === void 0 ? 'fix' : _p, _q = _a.quickActionBtn1State, quickActionBtn1State = _q === void 0 ? 'normal' : _q, _r = _a.quickActionBtn2State, quickActionBtn2State = _r === void 0 ? 'normal' : _r, _s = _a.quickActionBtn3State, quickActionBtn3State = _s === void 0 ? 'normal' : _s, _t = _a.mBtnMode, mBtnMode = _t === void 0 ? 'mbtn_amount1' : _t, mBtn1Text = _a.mBtn1Text, mBtn2Text = _a.mBtn2Text, mBtn3Text = _a.mBtn3Text, emptyText = _a.emptyText, _u = _a.scrollMode, scrollMode = _u === void 0 ? 'infinite' : _u, _v = _a.scrollVisibleType, scrollVisibleType = _v === void 0 ? 'moving' : _v, selectedIds = _a.selectedIds, maintainIds = _a.maintainIds, children = _a.children, onChangeDropdown1 = _a.onChangeDropdown1, onChangeDropdown2 = _a.onChangeDropdown2, onChangeDropdown3 = _a.onChangeDropdown3, onClickMBtn1 = _a.onClickMBtn1, onClickMBtn2 = _a.onClickMBtn2, onClickMBtn3 = _a.onClickMBtn3, onClickQuickActionBtn1 = _a.onClickQuickActionBtn1, onClickQuickActionBtn2 = _a.onClickQuickActionBtn2, onClickQuickActionBtn3 = _a.onClickQuickActionBtn3, onSelect = _a.onSelect;
|
|
57
57
|
var selectAllMethods = (0, react_hook_form_1.useForm)();
|
|
58
58
|
var checkboxMethods = (0, react_hook_form_1.useForm)();
|
|
59
59
|
var isAllCheckboxSelected = (0, react_hook_form_1.useWatch)({ name: 'all', control: selectAllMethods.control });
|
|
@@ -67,20 +67,39 @@ function AdminList(_a) {
|
|
|
67
67
|
return;
|
|
68
68
|
}
|
|
69
69
|
if (!selectedIds.length) {
|
|
70
|
-
setIsBulkActionBarOpen(false);
|
|
71
70
|
checkboxMethods.reset();
|
|
72
71
|
selectAllMethods.reset();
|
|
72
|
+
if (maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.length) {
|
|
73
|
+
setIsBulkActionBarOpen(true);
|
|
74
|
+
maintainIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), true); });
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
setIsBulkActionBarOpen(false);
|
|
78
|
+
}
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
if (selectionMode === 'single') {
|
|
82
|
+
checkboxMethods.reset();
|
|
83
|
+
checkboxMethods.setValue(selectedIds[0].toString(), true);
|
|
73
84
|
return;
|
|
74
85
|
}
|
|
75
86
|
setIsBulkActionBarOpen(true);
|
|
76
87
|
selectedIds.forEach(function (val) { return checkboxMethods.setValue(val.toString(), true); });
|
|
77
|
-
}, [selectedIds]);
|
|
88
|
+
}, [selectedIds, maintainIds]);
|
|
78
89
|
var handleSelectAllCheckbox = function () {
|
|
90
|
+
var allIds = Object.keys(checkboxMethods.getValues()).map(function (id) { return Number(id); });
|
|
91
|
+
var basicIds = allIds.filter(function (id) { return !(maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.includes(id)); });
|
|
79
92
|
if (!isAllCheckboxSelected) {
|
|
80
|
-
var allIds = Object.keys(checkboxMethods.getValues()).map(function (id) { return Number(id); });
|
|
81
93
|
allIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), true); });
|
|
82
94
|
if (onSelect) {
|
|
83
|
-
onSelect(
|
|
95
|
+
onSelect(basicIds);
|
|
96
|
+
}
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
if (maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.length) {
|
|
100
|
+
basicIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), false); });
|
|
101
|
+
if (onSelect) {
|
|
102
|
+
onSelect([]);
|
|
84
103
|
}
|
|
85
104
|
return;
|
|
86
105
|
}
|
|
@@ -93,17 +112,27 @@ function AdminList(_a) {
|
|
|
93
112
|
if (!selectedIds) {
|
|
94
113
|
return;
|
|
95
114
|
}
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
115
|
+
switch (selectionMode) {
|
|
116
|
+
case 'single': {
|
|
117
|
+
if (onSelect) {
|
|
118
|
+
onSelect([id]);
|
|
119
|
+
}
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
case 'multi': {
|
|
123
|
+
if (!selectedIds.includes(id)) {
|
|
124
|
+
checkboxMethods.setValue(id.toString(), true);
|
|
125
|
+
if (onSelect) {
|
|
126
|
+
onSelect(__spreadArray(__spreadArray([], selectedIds, true), [id], false));
|
|
127
|
+
}
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
var filteredId = selectedIds.filter(function (prevId) { return prevId !== id; });
|
|
131
|
+
checkboxMethods.setValue(id.toString(), false);
|
|
132
|
+
if (onSelect) {
|
|
133
|
+
onSelect(filteredId);
|
|
134
|
+
}
|
|
100
135
|
}
|
|
101
|
-
return;
|
|
102
|
-
}
|
|
103
|
-
var filteredId = selectedIds.filter(function (prevId) { return prevId !== id; });
|
|
104
|
-
checkboxMethods.setValue(id.toString(), false);
|
|
105
|
-
if (onSelect) {
|
|
106
|
-
onSelect(filteredId);
|
|
107
136
|
}
|
|
108
137
|
};
|
|
109
138
|
var getActionButtonCount = function () {
|
|
@@ -118,6 +147,12 @@ function AdminList(_a) {
|
|
|
118
147
|
return 0;
|
|
119
148
|
}
|
|
120
149
|
};
|
|
150
|
+
var totalItemCount = (0, react_1.useMemo)(function () {
|
|
151
|
+
if (maintainIds && selectedIds) {
|
|
152
|
+
return maintainIds.length + selectedIds.length;
|
|
153
|
+
}
|
|
154
|
+
return (selectedIds === null || selectedIds === void 0 ? void 0 : selectedIds.length) || 0;
|
|
155
|
+
}, [selectedIds, maintainIds]);
|
|
121
156
|
var childrenWithWidthProps = react_1.default.Children.map(children, function (child) {
|
|
122
157
|
if (react_1.default.isValidElement(child)) {
|
|
123
158
|
return react_1.default.cloneElement(child, {
|
|
@@ -141,13 +176,14 @@ function AdminList(_a) {
|
|
|
141
176
|
onClickQuickActionBtn2: onClickQuickActionBtn2,
|
|
142
177
|
onClickQuickActionBtn3: onClickQuickActionBtn3,
|
|
143
178
|
selectionMode: selectionMode,
|
|
144
|
-
onClickItem: handleSelectItem
|
|
179
|
+
onClickItem: handleSelectItem,
|
|
180
|
+
selectedState: (maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.includes(child.props.id)) ? 'maintain' : 'basic'
|
|
145
181
|
});
|
|
146
182
|
}
|
|
147
183
|
return child;
|
|
148
184
|
});
|
|
149
185
|
return (react_1.default.createElement(S_AdminList, null,
|
|
150
|
-
isBulkActionBarOpen && (react_1.default.createElement(BulkActionBar_1.default, { itemCount:
|
|
186
|
+
isBulkActionBarOpen && (react_1.default.createElement(BulkActionBar_1.default, { itemCount: totalItemCount, dropdownMode: dropdownMode, dropdown1DefaultText: dropdown1DefaultText, dropdown2DefaultText: dropdown2DefaultText, dropdown3DefaultText: dropdown3DefaultText, dropdown1ValueArray: dropdown1ValueArray, dropdown2ValueArray: dropdown2ValueArray, dropdown3ValueArray: dropdown3ValueArray, mBtnMode: mBtnMode, mBtn1Text: mBtn1Text, mBtn2Text: mBtn2Text, mBtn3Text: mBtn3Text, onChangeDropdown1: onChangeDropdown1, onChangeDropdown2: onChangeDropdown2, onChangeDropdown3: onChangeDropdown3, onClickMBtn1: onClickMBtn1, onClickMBtn2: onClickMBtn2, onClickMBtn3: onClickMBtn3 })),
|
|
151
187
|
headerRowMode === 'use' && (react_1.default.createElement(react_hook_form_1.FormProvider, __assign({}, selectAllMethods),
|
|
152
188
|
react_1.default.createElement("form", null,
|
|
153
189
|
react_1.default.createElement(HeaderRow_1.default, { selectionMode: selectionMode, column2HeaderText: column2HeaderText, column3HeaderText: column3HeaderText, column3HeaderWidth: column3Width, column4HeaderText: column4HeaderText, column4HeaderWidth: column4Width, column5HeaderText: column5HeaderText, column5HeaderWidth: column5Width, column6HeaderText: column6HeaderText, column6HeaderWidth: column6Width, column7HeaderText: column7HeaderText, column7HeaderWidth: column7Width, column8HeaderText: column8HeaderText, column8HeaderWidth: column8Width, column9HeaderText: column9HeaderText, column9HeaderWidth: column9Width, column10HeaderText: column10HeaderText, column10HeaderWidth: column10Width, quickActionBtnType: quickActionBtnType, quickActionButtonCount: getActionButtonCount(), onClickSelectAllCheckbox: handleSelectAllCheckbox })))),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { TFunctionResult } from 'i18next';
|
|
3
3
|
declare type ColumnWidthType = 'small' | 'medium' | 'large';
|
|
4
4
|
declare type Props = {
|
|
5
|
-
selectionMode: 'none' | '
|
|
5
|
+
selectionMode: 'none' | 'single' | 'multi';
|
|
6
6
|
column2HeaderText?: TFunctionResult;
|
|
7
7
|
column3HeaderText?: TFunctionResult;
|
|
8
8
|
column3HeaderWidth?: ColumnWidthType;
|
|
@@ -32,10 +32,10 @@ var hybrid_1 = require("../../../hybrid");
|
|
|
32
32
|
var Checkbox_1 = require("../Checkbox");
|
|
33
33
|
var TextLabel_1 = require("../TextLabel");
|
|
34
34
|
function HeaderRow(_a) {
|
|
35
|
-
var _b = _a.selectionMode, selectionMode = _b === void 0 ? '
|
|
35
|
+
var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'multi' : _b, column2HeaderText = _a.column2HeaderText, column3HeaderText = _a.column3HeaderText, _c = _a.column3HeaderWidth, column3HeaderWidth = _c === void 0 ? 'small' : _c, column4HeaderText = _a.column4HeaderText, _d = _a.column4HeaderWidth, column4HeaderWidth = _d === void 0 ? 'small' : _d, column5HeaderText = _a.column5HeaderText, _e = _a.column5HeaderWidth, column5HeaderWidth = _e === void 0 ? 'small' : _e, column6HeaderText = _a.column6HeaderText, _f = _a.column6HeaderWidth, column6HeaderWidth = _f === void 0 ? 'small' : _f, column7HeaderText = _a.column7HeaderText, _g = _a.column7HeaderWidth, column7HeaderWidth = _g === void 0 ? 'small' : _g, column8HeaderText = _a.column8HeaderText, _h = _a.column8HeaderWidth, column8HeaderWidth = _h === void 0 ? 'small' : _h, column9HeaderText = _a.column9HeaderText, _j = _a.column9HeaderWidth, column9HeaderWidth = _j === void 0 ? 'small' : _j, column10HeaderText = _a.column10HeaderText, _k = _a.column10HeaderWidth, column10HeaderWidth = _k === void 0 ? 'small' : _k, _l = _a.quickActionBtnType, quickActionBtnType = _l === void 0 ? 'fix' : _l, _m = _a.quickActionButtonCount, quickActionButtonCount = _m === void 0 ? 2 : _m, onClickSelectAllCheckbox = _a.onClickSelectAllCheckbox;
|
|
36
36
|
return (react_1.default.createElement(S_HeaderRow, null,
|
|
37
37
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_c", spacingType: "width" }),
|
|
38
|
-
selectionMode === '
|
|
38
|
+
selectionMode === 'multi' && (react_1.default.createElement(S_CheckBox, null,
|
|
39
39
|
react_1.default.createElement(Checkbox_1.Checkbox, { name: "all", onChange: onClickSelectAllCheckbox }))),
|
|
40
40
|
react_1.default.createElement(hybrid_1.Spacing, { size: "spacing_c", spacingType: "width" }),
|
|
41
41
|
react_1.default.createElement(S_FlexColumn, null,
|
|
@@ -5,7 +5,7 @@ declare type ColumnWidthType = 'small' | 'medium' | 'large';
|
|
|
5
5
|
declare type ColumnTextType = 'normal' | 'active' | 'inactive' | 'report';
|
|
6
6
|
declare type Props = {
|
|
7
7
|
rowSize?: 'high' | 'medium' | 'low';
|
|
8
|
-
selectionMode?: 'none' | '
|
|
8
|
+
selectionMode?: 'none' | 'single' | 'multi';
|
|
9
9
|
column2Type?: 'image_text' | 'text_only';
|
|
10
10
|
imageSrc?: string;
|
|
11
11
|
imageShapeType?: 'round' | 'circular' | 'rectangle';
|
|
@@ -30,7 +30,7 @@ var hybrid_1 = require("../../../hybrid");
|
|
|
30
30
|
var Checkbox_1 = require("../Checkbox");
|
|
31
31
|
var TextLabel_1 = require("../TextLabel");
|
|
32
32
|
function AdminListItem(_a) {
|
|
33
|
-
var _b = _a.rowSize, rowSize = _b === void 0 ? 'medium' : _b, _c = _a.selectionMode, selectionMode = _c === void 0 ? '
|
|
33
|
+
var _b = _a.rowSize, rowSize = _b === void 0 ? 'medium' : _b, _c = _a.selectionMode, selectionMode = _c === void 0 ? 'multi' : _c, _d = _a.column2Type, column2Type = _d === void 0 ? 'image_text' : _d, imageSrc = _a.imageSrc, _e = _a.imageShapeType, imageShapeType = _e === void 0 ? 'rectangle' : _e, _f = _a.imageRadius, imageRadius = _f === void 0 ? 8 : _f, _g = _a.imageRatio, imageRatio = _g === void 0 ? '16_9' : _g, column2Text = _a.column2Text, column3Text = _a.column3Text, _h = _a.column3TextWidth, column3TextWidth = _h === void 0 ? 'small' : _h, _j = _a.column3TextStyleTheme, column3TextStyleTheme = _j === void 0 ? 'normal' : _j, column4Text = _a.column4Text, _k = _a.column4TextWidth, column4TextWidth = _k === void 0 ? 'small' : _k, _l = _a.column4TextStyleTheme, column4TextStyleTheme = _l === void 0 ? 'normal' : _l, column5Text = _a.column5Text, _m = _a.column5TextWidth, column5TextWidth = _m === void 0 ? 'small' : _m, _o = _a.column5TextStyleTheme, column5TextStyleTheme = _o === void 0 ? 'normal' : _o, column6Text = _a.column6Text, _p = _a.column6TextWidth, column6TextWidth = _p === void 0 ? 'small' : _p, _q = _a.column6TextStyleTheme, column6TextStyleTheme = _q === void 0 ? 'normal' : _q, column7Text = _a.column7Text, _r = _a.column7TextWidth, column7TextWidth = _r === void 0 ? 'small' : _r, _s = _a.column7TextStyleTheme, column7TextStyleTheme = _s === void 0 ? 'normal' : _s, column8Text = _a.column8Text, _t = _a.column8TextWidth, column8TextWidth = _t === void 0 ? 'small' : _t, _u = _a.column8TextStyleTheme, column8TextStyleTheme = _u === void 0 ? 'normal' : _u, column9Text = _a.column9Text, _v = _a.column9TextWidth, column9TextWidth = _v === void 0 ? 'small' : _v, _w = _a.column9TextStyleTheme, column9TextStyleTheme = _w === void 0 ? 'normal' : _w, column10Text = _a.column10Text, _x = _a.column10TextWidth, column10TextWidth = _x === void 0 ? 'small' : _x, _y = _a.column10TextStyleTheme, column10TextStyleTheme = _y === void 0 ? 'normal' : _y, _z = _a.quickActionBtnMode, quickActionBtnMode = _z === void 0 ? 'btn_amount2' : _z, quickActionBtn1Text = _a.quickActionBtn1Text, quickActionBtn2Text = _a.quickActionBtn2Text, quickActionBtn3Text = _a.quickActionBtn3Text, _0 = _a.quickActionBtnType, quickActionBtnType = _0 === void 0 ? 'fix' : _0, _1 = _a.quickActionBtn1State, quickActionBtn1State = _1 === void 0 ? 'normal' : _1, _2 = _a.quickActionBtn2State, quickActionBtn2State = _2 === void 0 ? 'normal' : _2, _3 = _a.quickActionBtn3State, quickActionBtn3State = _3 === void 0 ? 'normal' : _3, _4 = _a.selectedState, selectedState = _4 === void 0 ? 'basic' : _4, id = _a.id, onClickQuickActionBtn1 = _a.onClickQuickActionBtn1, onClickQuickActionBtn2 = _a.onClickQuickActionBtn2, onClickQuickActionBtn3 = _a.onClickQuickActionBtn3, onClickItem = _a.onClickItem;
|
|
34
34
|
var methods = (0, react_hook_form_1.useFormContext)();
|
|
35
35
|
var isSelected = (0, react_hook_form_1.useWatch)({
|
|
36
36
|
control: methods.control,
|
|
@@ -43,7 +43,6 @@ function AdminListItem(_a) {
|
|
|
43
43
|
return;
|
|
44
44
|
var _a = contentRef.current, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
45
45
|
var isTextClamped = scrollHeight > clientHeight;
|
|
46
|
-
console.log(isTextClamped);
|
|
47
46
|
setHasScroll(isTextClamped);
|
|
48
47
|
}, []);
|
|
49
48
|
(0, react_1.useEffect)(function () {
|
|
@@ -53,11 +52,13 @@ function AdminListItem(_a) {
|
|
|
53
52
|
}, [selectedState]);
|
|
54
53
|
var handleClick = function (e) {
|
|
55
54
|
e.preventDefault();
|
|
56
|
-
if (selectedState === 'maintain') {
|
|
55
|
+
if (selectedState === 'maintain' || selectionMode === 'none') {
|
|
57
56
|
return;
|
|
58
57
|
}
|
|
59
|
-
|
|
60
|
-
|
|
58
|
+
if (selectionMode === 'multi') {
|
|
59
|
+
var checkedStatus = methods.getValues(id.toString());
|
|
60
|
+
methods.setValue(id.toString(), !checkedStatus);
|
|
61
|
+
}
|
|
61
62
|
if (onClickItem) {
|
|
62
63
|
onClickItem(id);
|
|
63
64
|
}
|
|
@@ -120,7 +121,7 @@ function AdminListItem(_a) {
|
|
|
120
121
|
}
|
|
121
122
|
};
|
|
122
123
|
return (react_1.default.createElement(S_AdminListItem, { rowSize: rowSize, onClick: handleClick, isSelected: isSelected, quickActionBtnType: quickActionBtnType },
|
|
123
|
-
react_1.default.createElement(S_SelectionColumn, { rowSize: rowSize }, selectionMode === '
|
|
124
|
+
react_1.default.createElement(S_SelectionColumn, { rowSize: rowSize }, selectionMode === 'multi' && (react_1.default.createElement(S_Selection, null,
|
|
124
125
|
react_1.default.createElement(Checkbox_1.Checkbox, { name: id.toString(), state: selectedState === 'maintain' ? 'disabled' : 'normal' })))),
|
|
125
126
|
react_1.default.createElement(S_ImageColumn, { rowSize: rowSize },
|
|
126
127
|
column2Type === 'image_text' && (rowSize === 'high' || rowSize === 'medium') && (react_1.default.createElement(S_ImageWrapper, null,
|
|
@@ -159,7 +160,7 @@ var hoverQuickActionBtnBox = (0, styled_components_1.css)(templateObject_9 || (t
|
|
|
159
160
|
var theme = _a.theme;
|
|
160
161
|
return theme.ui_cpnt_datatable_textbutton_base_02;
|
|
161
162
|
});
|
|
162
|
-
var fixedQuickActionBtnBox = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n"])), function (_a) {
|
|
163
|
+
var fixedQuickActionBtnBox = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n visibility: hidden;\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n visibility: hidden;\n"])), function (_a) {
|
|
163
164
|
var theme = _a.theme;
|
|
164
165
|
return theme.ui_cpnt_datatable_textbutton_base_01;
|
|
165
166
|
});
|
|
@@ -225,7 +226,7 @@ var S_SelectionColumn = styled_components_1.default.div(templateObject_22 || (te
|
|
|
225
226
|
});
|
|
226
227
|
var hoverAdminListItem = (0, styled_components_1.css)(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n align-items: center;\n position: relative;\n"], ["\n align-items: center;\n position: relative;\n"])));
|
|
227
228
|
var fixedAdminListItem = (0, styled_components_1.css)(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n justify-content: space-between;\n"], ["\n justify-content: space-between;\n"])));
|
|
228
|
-
var S_AdminListItem = styled_components_1.default.div(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n"], ["\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n"])), function (_a) {
|
|
229
|
+
var S_AdminListItem = styled_components_1.default.div(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n visibility: visible;\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n"], ["\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", ";\n ", "\n\n :hover {\n background-color: ", ";\n\n ", " {\n display: ", ";\n visibility: visible;\n }\n }\n\n &:last-child {\n margin-bottom: 88px;\n }\n"])), function (_a) {
|
|
229
230
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
230
231
|
return isSelected ? theme.ui_cpnt_datatable_base_selected : theme.ui_cpnt_datatable_base_default;
|
|
231
232
|
}, function (_a) {
|
|
@@ -39,7 +39,8 @@ function Checkbox(_a) {
|
|
|
39
39
|
}
|
|
40
40
|
case 'disabled': {
|
|
41
41
|
return isChecked ? (react_1.default.createElement(S_OverrideIconWrapper, null,
|
|
42
|
-
react_1.default.createElement(
|
|
42
|
+
react_1.default.createElement("div", null,
|
|
43
|
+
react_1.default.createElement(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_primary" })),
|
|
43
44
|
react_1.default.createElement(S_OverrideIcon, null,
|
|
44
45
|
react_1.default.createElement(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_on", fillType: "fill", colorKey: "ui_cpnt_selcontrols_icon_on_base_hover" })))) : (react_1.default.createElement(hybrid_1.Icon, { size: 16, iconName: "ic_checkbox_off", fillType: "line", colorKey: "ui_cpnt_selcontrols_icon_disabled" }));
|
|
45
46
|
}
|
|
@@ -3,6 +3,7 @@ import { PDSTextType } from '../../../common';
|
|
|
3
3
|
declare type DesktopBasicModalProps = {
|
|
4
4
|
titleText: PDSTextType;
|
|
5
5
|
contentText?: PDSTextType;
|
|
6
|
+
bodySpacingMode?: 'none' | 'use';
|
|
6
7
|
btnMode?: 'mbtn_amount1' | 'mbtn_amount2' | 'mbtn_amount3';
|
|
7
8
|
mBtn1Text: PDSTextType;
|
|
8
9
|
mBtn2Text?: PDSTextType;
|
|
@@ -10,11 +11,14 @@ declare type DesktopBasicModalProps = {
|
|
|
10
11
|
mBtn1State?: 'normal' | 'disabled';
|
|
11
12
|
mBtn2State?: 'normal' | 'disabled';
|
|
12
13
|
mBtn3State?: 'normal' | 'disabled';
|
|
14
|
+
mBtn1Type?: 'button' | 'submit';
|
|
15
|
+
mBtn2Type?: 'button' | 'submit';
|
|
16
|
+
mBtn3Type?: 'button' | 'submit';
|
|
13
17
|
size?: 'large' | 'medium' | 'small';
|
|
14
18
|
onClickMBtn1?: () => void;
|
|
15
19
|
onClickMBtn2?: () => void;
|
|
16
20
|
onClickMBtn3?: () => void;
|
|
17
21
|
children?: React.ReactNode;
|
|
18
22
|
};
|
|
19
|
-
declare function DesktopBasicModal({ titleText, contentText, btnMode, mBtn1Text, mBtn2Text, mBtn3Text, mBtn1State, mBtn2State, mBtn3State, onClickMBtn1, onClickMBtn2, onClickMBtn3, size, children }: DesktopBasicModalProps): React.ReactPortal;
|
|
23
|
+
declare function DesktopBasicModal({ titleText, contentText, bodySpacingMode, btnMode, mBtn1Text, mBtn2Text, mBtn3Text, mBtn1State, mBtn2State, mBtn3State, mBtn1Type, mBtn2Type, mBtn3Type, onClickMBtn1, onClickMBtn2, onClickMBtn3, size, children }: DesktopBasicModalProps): React.ReactPortal;
|
|
20
24
|
export default DesktopBasicModal;
|
|
@@ -28,12 +28,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
var react_1 = __importStar(require("react"));
|
|
30
30
|
var react_dom_1 = __importDefault(require("react-dom"));
|
|
31
|
-
var styled_components_1 =
|
|
31
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
32
32
|
var hybrid_1 = require("../../../hybrid");
|
|
33
33
|
var MainButton_1 = require("../MainButton");
|
|
34
34
|
var TextLabel_1 = require("../TextLabel");
|
|
35
35
|
function DesktopBasicModal(_a) {
|
|
36
|
-
var titleText = _a.titleText, contentText = _a.contentText, _b = _a.btnMode, btnMode =
|
|
36
|
+
var titleText = _a.titleText, contentText = _a.contentText, _b = _a.bodySpacingMode, bodySpacingMode = _b === void 0 ? 'use' : _b, _c = _a.btnMode, btnMode = _c === void 0 ? 'mbtn_amount2' : _c, mBtn1Text = _a.mBtn1Text, mBtn2Text = _a.mBtn2Text, mBtn3Text = _a.mBtn3Text, _d = _a.mBtn1State, mBtn1State = _d === void 0 ? 'normal' : _d, _e = _a.mBtn2State, mBtn2State = _e === void 0 ? 'normal' : _e, _f = _a.mBtn3State, mBtn3State = _f === void 0 ? 'normal' : _f, _g = _a.mBtn1Type, mBtn1Type = _g === void 0 ? 'button' : _g, _h = _a.mBtn2Type, mBtn2Type = _h === void 0 ? 'button' : _h, _j = _a.mBtn3Type, mBtn3Type = _j === void 0 ? 'button' : _j, onClickMBtn1 = _a.onClickMBtn1, onClickMBtn2 = _a.onClickMBtn2, onClickMBtn3 = _a.onClickMBtn3, _k = _a.size, size = _k === void 0 ? 'large' : _k, children = _a.children;
|
|
37
37
|
var container = (0, react_1.useState)(function () {
|
|
38
38
|
var modalRoot = document.createElement('div');
|
|
39
39
|
modalRoot.setAttribute('id', 'DesktopBasicModal');
|
|
@@ -57,15 +57,15 @@ function DesktopBasicModal(_a) {
|
|
|
57
57
|
react_1.default.createElement(S_ModalWrapper, { size: size },
|
|
58
58
|
react_1.default.createElement(S_Header, null,
|
|
59
59
|
react_1.default.createElement(TextLabel_1.TextLabel, { text: titleText, colorTheme: "sysTextPrimary", styleTheme: "headingBold" })),
|
|
60
|
-
react_1.default.createElement(S_Body,
|
|
60
|
+
react_1.default.createElement(S_Body, { bodySpacingMode: bodySpacingMode },
|
|
61
61
|
contentText && (react_1.default.createElement(TextLabel_1.TextLabel, { text: contentText, colorTheme: "sysTextSecondary", styleTheme: "subTitleRegular" })),
|
|
62
62
|
children && children),
|
|
63
63
|
react_1.default.createElement(hybrid_1.Divider, null),
|
|
64
64
|
react_1.default.createElement(S_Footer, null,
|
|
65
|
-
react_1.default.createElement(S_Left, null, btn3Mode.includes(btnMode) && mBtn3Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn3Text, state: mBtn3State, size: "medium", onClick: onClickMBtn3 }))),
|
|
65
|
+
react_1.default.createElement(S_Left, null, btn3Mode.includes(btnMode) && mBtn3Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn3Text, state: mBtn3State, type: mBtn3Type, size: "medium", onClick: onClickMBtn3 }))),
|
|
66
66
|
react_1.default.createElement(S_Right, null,
|
|
67
|
-
react_1.default.createElement(S_Btn2Wrapper, null, btn2Mode.includes(btnMode) && mBtn2Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn2Text, state: mBtn2State, size: "medium", onClick: onClickMBtn2 }))),
|
|
68
|
-
btn1Mode.includes(btnMode) && mBtn1Text && (react_1.default.createElement(MainButton_1.MainButton, { text: mBtn1Text, state: mBtn1State, size: "medium", onClick: onClickMBtn1 })))))), container);
|
|
67
|
+
react_1.default.createElement(S_Btn2Wrapper, null, btn2Mode.includes(btnMode) && mBtn2Text && (react_1.default.createElement(MainButton_1.MainButton, { fillType: "line", text: mBtn2Text, state: mBtn2State, type: mBtn2Type, size: "medium", onClick: onClickMBtn2 }))),
|
|
68
|
+
btn1Mode.includes(btnMode) && mBtn1Text && (react_1.default.createElement(MainButton_1.MainButton, { text: mBtn1Text, state: mBtn1State, type: mBtn1Type, size: "medium", onClick: onClickMBtn1 })))))), container);
|
|
69
69
|
}
|
|
70
70
|
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 background-color: ", ";\n height: 100vh;\n left: 0;\n position: fixed;\n top: 0;\n width: 100vw;\n"])), function (_a) {
|
|
71
71
|
var theme = _a.theme;
|
|
@@ -87,7 +87,7 @@ var S_ModalWrapper = styled_components_1.default.div(templateObject_2 || (templa
|
|
|
87
87
|
medium: '688px',
|
|
88
88
|
small: '400px'
|
|
89
89
|
};
|
|
90
|
-
return sizes[size];
|
|
90
|
+
return size && sizes[size];
|
|
91
91
|
});
|
|
92
92
|
var S_Left = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin-right: ", ";\n"], ["\n margin-right: ", ";\n"])), function (_a) {
|
|
93
93
|
var theme = _a.theme;
|
|
@@ -98,30 +98,33 @@ var S_Btn2Wrapper = styled_components_1.default.div(templateObject_4 || (templat
|
|
|
98
98
|
return theme.spacing.spacingB;
|
|
99
99
|
});
|
|
100
100
|
var S_Right = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n"], ["\n display: flex;\n"])));
|
|
101
|
-
var S_Header = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin: 0 ", ";\n margin-
|
|
101
|
+
var S_Header = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n margin: 0 ", ";\n margin-bottom: ", ";\n margin-top: ", ";\n"], ["\n margin: 0 ", ";\n margin-bottom: ", ";\n margin-top: ", ";\n"])), function (_a) {
|
|
102
102
|
var theme = _a.theme;
|
|
103
103
|
return theme.spacing.spacingE;
|
|
104
104
|
}, function (_a) {
|
|
105
105
|
var theme = _a.theme;
|
|
106
|
-
return theme.spacing.
|
|
106
|
+
return theme.spacing.spacingC;
|
|
107
107
|
}, function (_a) {
|
|
108
108
|
var theme = _a.theme;
|
|
109
|
-
return theme.spacing.
|
|
109
|
+
return theme.spacing.spacingE;
|
|
110
110
|
});
|
|
111
|
-
var S_Body = styled_components_1.default.div(
|
|
111
|
+
var S_Body = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n flex: 1;\n margin-bottom: ", ";\n margin-left: ", ";\n margin-right: ", ";\n margin-top: ", ";\n overflow: auto;\n\n ", "\n"], ["\n flex: 1;\n margin-bottom: ", ";\n margin-left: ", ";\n margin-right: ", ";\n margin-top: ", ";\n overflow: auto;\n\n ", "\n"])), function (_a) {
|
|
112
112
|
var theme = _a.theme;
|
|
113
|
-
return theme.spacing.
|
|
113
|
+
return theme.spacing.spacingF;
|
|
114
114
|
}, function (_a) {
|
|
115
115
|
var theme = _a.theme;
|
|
116
116
|
return theme.spacing.spacingE;
|
|
117
117
|
}, function (_a) {
|
|
118
118
|
var theme = _a.theme;
|
|
119
|
-
return theme.spacing.
|
|
119
|
+
return theme.spacing.spacingE;
|
|
120
120
|
}, function (_a) {
|
|
121
121
|
var theme = _a.theme;
|
|
122
|
-
return theme.spacing.
|
|
122
|
+
return theme.spacing.spacingD;
|
|
123
|
+
}, function (_a) {
|
|
124
|
+
var bodySpacingMode = _a.bodySpacingMode;
|
|
125
|
+
return bodySpacingMode === 'none' && (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n margin-bottom: 0;\n margin-left: 0;\n margin-right: 0;\n "], ["\n margin-bottom: 0;\n margin-left: 0;\n margin-right: 0;\n "])));
|
|
123
126
|
});
|
|
124
|
-
var S_Footer = styled_components_1.default.div(
|
|
127
|
+
var S_Footer = styled_components_1.default.div(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin-bottom: ", ";\n margin-left: ", ";\n margin-right: ", ";\n margin-top: ", ";\n"], ["\n display: flex;\n justify-content: space-between;\n margin-bottom: ", ";\n margin-left: ", ";\n margin-right: ", ";\n margin-top: ", ";\n"])), function (_a) {
|
|
125
128
|
var theme = _a.theme;
|
|
126
129
|
return theme.spacing.spacingD;
|
|
127
130
|
}, function (_a) {
|
|
@@ -129,10 +132,10 @@ var S_Footer = styled_components_1.default.div(templateObject_8 || (templateObje
|
|
|
129
132
|
return theme.spacing.spacingE;
|
|
130
133
|
}, function (_a) {
|
|
131
134
|
var theme = _a.theme;
|
|
132
|
-
return theme.spacing.
|
|
135
|
+
return theme.spacing.spacingE;
|
|
133
136
|
}, function (_a) {
|
|
134
137
|
var theme = _a.theme;
|
|
135
|
-
return theme.spacing.
|
|
138
|
+
return theme.spacing.spacingD;
|
|
136
139
|
});
|
|
137
140
|
exports.default = DesktopBasicModal;
|
|
138
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
141
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;
|
|
@@ -6,10 +6,10 @@ declare type Props = {
|
|
|
6
6
|
hintText?: TFunctionResult;
|
|
7
7
|
defaultValue?: PDSValueOption;
|
|
8
8
|
valueArray: PDSValueOption[];
|
|
9
|
-
|
|
9
|
+
selectionMode?: 'single' | 'multi';
|
|
10
10
|
state?: 'normal' | 'read_only' | 'disabled';
|
|
11
11
|
colorTheme?: 'none' | 'dark';
|
|
12
12
|
onChange?: (option: PDSValueOption) => void;
|
|
13
13
|
};
|
|
14
|
-
declare function Dropdown({ size, hintText, defaultValue, valueArray,
|
|
14
|
+
declare function Dropdown({ size, hintText, defaultValue, valueArray, selectionMode, state, colorTheme, onChange }: Props): JSX.Element;
|
|
15
15
|
export default Dropdown;
|
|
@@ -29,9 +29,9 @@ var hybrid_1 = require("../../../hybrid");
|
|
|
29
29
|
var ContextMenu_1 = require("../ContextMenu");
|
|
30
30
|
var ContextMenuItem_1 = require("../ContextMenuItem");
|
|
31
31
|
var TextLabel_1 = require("../TextLabel");
|
|
32
|
-
// TODO:
|
|
32
|
+
// TODO: selectionMode의 multi 기능 구현 추가 필요
|
|
33
33
|
function Dropdown(_a) {
|
|
34
|
-
var _b = _a.size, size = _b === void 0 ? 'large' : _b, hintText = _a.hintText, defaultValue = _a.defaultValue, valueArray = _a.valueArray, _c = _a.
|
|
34
|
+
var _b = _a.size, size = _b === void 0 ? 'large' : _b, hintText = _a.hintText, defaultValue = _a.defaultValue, valueArray = _a.valueArray, _c = _a.selectionMode, selectionMode = _c === void 0 ? 'single' : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'none' : _e, onChange = _a.onChange;
|
|
35
35
|
var _f = (0, react_1.useState)(false), isFocused = _f[0], setIsFocused = _f[1];
|
|
36
36
|
var _g = (0, react_1.useState)(defaultValue), selectedOption = _g[0], setSelectedOption = _g[1];
|
|
37
37
|
(0, react_1.useEffect)(function () {
|
|
@@ -123,7 +123,7 @@ var S_Dropdown = styled_components_1.default.div(templateObject_4 || (templateOb
|
|
|
123
123
|
small: small
|
|
124
124
|
}[size];
|
|
125
125
|
});
|
|
126
|
-
var S_Select = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n border: 1px solid\n ", ";\n border-radius: 8px;\n color: ", ";\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n\n ", "\n"], ["\n align-items: center;\n background-color: ", ";\n border: 1px solid\n ", ";\n border-radius: 8px;\n color: ", ";\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n\n ", "\n"])), function (_a) {
|
|
126
|
+
var S_Select = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n box-sizing: border-box;\n background-color: ", ";\n border: 1px solid\n ", ";\n border-radius: 8px;\n color: ", ";\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n\n ", "\n"], ["\n align-items: center;\n box-sizing: border-box;\n background-color: ", ";\n border: 1px solid\n ", ";\n border-radius: 8px;\n color: ", ";\n cursor: pointer;\n display: flex;\n justify-content: space-between;\n\n ", "\n"])), function (_a) {
|
|
127
127
|
var state = _a.state, colorTheme = _a.colorTheme, theme = _a.theme;
|
|
128
128
|
switch (state) {
|
|
129
129
|
case 'disabled':
|
|
@@ -6,10 +6,10 @@ declare type Props = {
|
|
|
6
6
|
hintText?: TFunctionResult;
|
|
7
7
|
defaultValue?: PDSValueOption;
|
|
8
8
|
valueArray: PDSValueOption[];
|
|
9
|
-
|
|
9
|
+
selectionMode?: 'single' | 'multi';
|
|
10
10
|
state?: 'normal' | 'read_only' | 'disabled';
|
|
11
11
|
colorTheme?: 'none' | 'dark';
|
|
12
12
|
onChange?: (option: PDSValueOption) => void;
|
|
13
13
|
};
|
|
14
|
-
declare function Dropdown({ size, hintText, defaultValue, valueArray,
|
|
14
|
+
declare function Dropdown({ size, hintText, defaultValue, valueArray, selectionMode, state, colorTheme, onChange }: Props): JSX.Element;
|
|
15
15
|
export default Dropdown;
|
|
@@ -29,9 +29,9 @@ var hybrid_1 = require("../../../hybrid");
|
|
|
29
29
|
var ContextMenu_1 = require("../ContextMenu");
|
|
30
30
|
var ContextMenuItem_1 = require("../ContextMenuItem");
|
|
31
31
|
var TextLabel_1 = require("../TextLabel");
|
|
32
|
-
// TODO:
|
|
32
|
+
// TODO: selectionMode의 multi 기능 구현 추가 필요
|
|
33
33
|
function Dropdown(_a) {
|
|
34
|
-
var _b = _a.size, size = _b === void 0 ? 'large' : _b, hintText = _a.hintText, defaultValue = _a.defaultValue, valueArray = _a.valueArray, _c = _a.
|
|
34
|
+
var _b = _a.size, size = _b === void 0 ? 'large' : _b, hintText = _a.hintText, defaultValue = _a.defaultValue, valueArray = _a.valueArray, _c = _a.selectionMode, selectionMode = _c === void 0 ? 'single' : _c, _d = _a.state, state = _d === void 0 ? 'normal' : _d, _e = _a.colorTheme, colorTheme = _e === void 0 ? 'none' : _e, onChange = _a.onChange;
|
|
35
35
|
var _f = (0, react_1.useState)(false), isFocused = _f[0], setIsFocused = _f[1];
|
|
36
36
|
var _g = (0, react_1.useState)(defaultValue), selectedOption = _g[0], setSelectedOption = _g[1];
|
|
37
37
|
(0, react_1.useEffect)(function () {
|
|
@@ -2,11 +2,12 @@ import React from 'react';
|
|
|
2
2
|
import { PDSTextType } from '../../../common';
|
|
3
3
|
declare type MobileBasicModalProps = {
|
|
4
4
|
titleText: PDSTextType;
|
|
5
|
+
bodySpacingMode?: 'none' | 'use';
|
|
5
6
|
contentText?: PDSTextType;
|
|
6
7
|
mBtnText?: PDSTextType;
|
|
7
8
|
onClickMBtn?: () => void;
|
|
8
9
|
onClickXMarkIcon?: () => void;
|
|
9
10
|
children?: React.ReactNode;
|
|
10
11
|
};
|
|
11
|
-
declare function MobileBasicModal({ titleText, contentText, mBtnText, onClickMBtn, onClickXMarkIcon, children }: MobileBasicModalProps): React.ReactPortal;
|
|
12
|
+
declare function MobileBasicModal({ titleText, bodySpacingMode, contentText, mBtnText, onClickMBtn, onClickXMarkIcon, children }: MobileBasicModalProps): React.ReactPortal;
|
|
12
13
|
export default MobileBasicModal;
|