pds-dev-kit-web 2.0.0-beta.1 → 2.0.0
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/styles/colorSet/PaletteColor_Dark.json +3 -1
- package/dist/src/common/styles/colorSet/PaletteColor_light.json +3 -1
- package/dist/src/common/styles/colorSet/UIColor.json +3 -1
- package/dist/src/common/styles/colorSet/index.d.ts +6 -0
- package/dist/src/common/styles/colorSet/ui-type.d.ts +2 -0
- package/dist/src/desktop/components/AdminList/AdminList.js +21 -7
- package/dist/src/sub/AdminList/AdminList/AdminList.d.ts +14 -14
- package/dist/src/sub/AdminList/AdminList/AdminList.js +22 -8
- package/dist/src/sub/AdminList/AdminList/HeaderRow.d.ts +10 -10
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.d.ts +3 -4
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.js +3 -3
- package/package.json +1 -1
- package/release-note.md +4 -3
|
@@ -278,5 +278,7 @@
|
|
|
278
278
|
"sys_storyboard_card_base_blue01": "blue30",
|
|
279
279
|
"sys_storyboard_card_base_red01": "red30",
|
|
280
280
|
"sys_storyboard_card_base_green01": "green50",
|
|
281
|
-
"sys_brand_secondary_variant": "darkgreen700"
|
|
281
|
+
"sys_brand_secondary_variant": "darkgreen700",
|
|
282
|
+
"sys_button_tooltip_base": "white/opacity50",
|
|
283
|
+
"sys_text_button_tooltip": "grey900"
|
|
282
284
|
}
|
|
@@ -278,5 +278,7 @@
|
|
|
278
278
|
"sys_storyboard_card_base_blue01": "blue30",
|
|
279
279
|
"sys_storyboard_card_base_red01": "red30",
|
|
280
280
|
"sys_storyboard_card_base_green01": "green50",
|
|
281
|
-
"sys_brand_secondary_variant": "green700"
|
|
281
|
+
"sys_brand_secondary_variant": "green700",
|
|
282
|
+
"sys_button_tooltip_base": "black/opacity70",
|
|
283
|
+
"sys_text_button_tooltip": "white"
|
|
282
284
|
}
|
|
@@ -744,5 +744,7 @@
|
|
|
744
744
|
"ui_95": "sys_storyboard_card_base_green01",
|
|
745
745
|
"ui_cpnt_icon_sys_brandsecondary_variant": "sys_brand_secondary_variant",
|
|
746
746
|
"ui_96": "sys_component_base_10",
|
|
747
|
-
"ui_97": "sys_component_base_black"
|
|
747
|
+
"ui_97": "sys_component_base_black",
|
|
748
|
+
"ui_cpnt_button_tooltip_base": "sys_button_tooltip_base",
|
|
749
|
+
"ui_cpnt_textlabel_button_tooltip": "sys_text_button_tooltip"
|
|
748
750
|
}
|
|
@@ -383,6 +383,8 @@ declare const colorSet: {
|
|
|
383
383
|
sys_storyboard_card_base_red01: string;
|
|
384
384
|
sys_storyboard_card_base_green01: string;
|
|
385
385
|
sys_brand_secondary_variant: string;
|
|
386
|
+
sys_button_tooltip_base: string;
|
|
387
|
+
sys_text_button_tooltip: string;
|
|
386
388
|
};
|
|
387
389
|
readonly PaletteColor_light: {
|
|
388
390
|
sys_container_background_01: string;
|
|
@@ -665,6 +667,8 @@ declare const colorSet: {
|
|
|
665
667
|
sys_storyboard_card_base_red01: string;
|
|
666
668
|
sys_storyboard_card_base_green01: string;
|
|
667
669
|
sys_brand_secondary_variant: string;
|
|
670
|
+
sys_button_tooltip_base: string;
|
|
671
|
+
sys_text_button_tooltip: string;
|
|
668
672
|
};
|
|
669
673
|
readonly UIColor: {
|
|
670
674
|
ui_cpnt_button_fill_base_primary: string;
|
|
@@ -1413,6 +1417,8 @@ declare const colorSet: {
|
|
|
1413
1417
|
ui_cpnt_icon_sys_brandsecondary_variant: string;
|
|
1414
1418
|
ui_96: string;
|
|
1415
1419
|
ui_97: string;
|
|
1420
|
+
ui_cpnt_button_tooltip_base: string;
|
|
1421
|
+
ui_cpnt_textlabel_button_tooltip: string;
|
|
1416
1422
|
};
|
|
1417
1423
|
};
|
|
1418
1424
|
export default colorSet;
|
|
@@ -54,14 +54,24 @@ var TextLabel_1 = require("../TextLabel");
|
|
|
54
54
|
var BulkActionBar_1 = __importDefault(require("./BulkActionBar"));
|
|
55
55
|
var HeaderRow_1 = __importDefault(require("./HeaderRow"));
|
|
56
56
|
function AdminList(_a) {
|
|
57
|
-
var _b
|
|
57
|
+
var _b;
|
|
58
|
+
var _c = _a.selectionMode, selectionMode = _c === void 0 ? 'multi' : _c, _d = _a.headerRowMode, headerRowMode = _d === void 0 ? 'use' : _d, column2HeaderText = _a.column2HeaderText, column3HeaderText = _a.column3HeaderText, _e = _a.column3Width, column3Width = _e === void 0 ? 'small' : _e, column4HeaderText = _a.column4HeaderText, _f = _a.column4Width, column4Width = _f === void 0 ? 'small' : _f, column5HeaderText = _a.column5HeaderText, _g = _a.column5Width, column5Width = _g === void 0 ? 'small' : _g, column6HeaderText = _a.column6HeaderText, _h = _a.column6Width, column6Width = _h === void 0 ? 'small' : _h, column7HeaderText = _a.column7HeaderText, _j = _a.column7Width, column7Width = _j === void 0 ? 'small' : _j, column8HeaderText = _a.column8HeaderText, _k = _a.column8Width, column8Width = _k === void 0 ? 'small' : _k, column9HeaderText = _a.column9HeaderText, _l = _a.column9Width, column9Width = _l === void 0 ? 'small' : _l, column10HeaderText = _a.column10HeaderText, _m = _a.column10Width, column10Width = _m === void 0 ? 'small' : _m, _o = _a.dropdownMode, dropdownMode = _o === void 0 ? 'dropdown_amount1' : _o, dropdown1Value = _a.dropdown1Value, dropdown2Value = _a.dropdown2Value, dropdown3Value = _a.dropdown3Value, dropdown1DefaultText = _a.dropdown1DefaultText, dropdown2DefaultText = _a.dropdown2DefaultText, dropdown3DefaultText = _a.dropdown3DefaultText, dropdown1HintText = _a.dropdown1HintText, dropdown2HintText = _a.dropdown2HintText, dropdown3HintText = _a.dropdown3HintText, dropdown1ValueArray = _a.dropdown1ValueArray, dropdown2ValueArray = _a.dropdown2ValueArray, dropdown3ValueArray = _a.dropdown3ValueArray, _p = _a.quickActionBtnMode, quickActionBtnMode = _p === void 0 ? 'btn_amount2' : _p, quickActionBtn1Text = _a.quickActionBtn1Text, quickActionBtn2Text = _a.quickActionBtn2Text, quickActionBtn3Text = _a.quickActionBtn3Text, _q = _a.quickActionBtnType, quickActionBtnType = _q === void 0 ? 'fix' : _q, tBtnMode = _a.tBtnMode, tBtn1Text = _a.tBtn1Text, tBtn2Text = _a.tBtn2Text, tBtn3Text = _a.tBtn3Text, emptyText = _a.emptyText, _r = _a.scrollMode, scrollMode = _r === void 0 ? 'infinite' : _r, _s = _a.scrollVisibleType, scrollVisibleType = _s === void 0 ? 'moving' : _s, selectedIds = _a.selectedIds, maintainIds = _a.maintainIds, children = _a.children, _t = _a.headerRowCheckboxName, headerRowCheckboxName = _t === void 0 ? 'all' : _t, _u = _a.flexibleHideInfoMode, flexibleHideInfoMode = _u === void 0 ? 'use' : _u, onChangeDropdown1 = _a.onChangeDropdown1, onChangeDropdown2 = _a.onChangeDropdown2, onChangeDropdown3 = _a.onChangeDropdown3, onClickTBtn1 = _a.onClickTBtn1, onClickTBtn2 = _a.onClickTBtn2, onClickTBtn3 = _a.onClickTBtn3, onClickQuickActionBtn1 = _a.onClickQuickActionBtn1, onClickQuickActionBtn2 = _a.onClickQuickActionBtn2, onClickQuickActionBtn3 = _a.onClickQuickActionBtn3, onSelect = _a.onSelect, quickActionBtn1State = _a.quickActionBtn1State, quickActionBtn2State = _a.quickActionBtn2State, quickActionBtn3State = _a.quickActionBtn3State, _v = _a.mBtnMode, mBtnMode = _v === void 0 ? 'mbtn_amount1' : _v, mBtn1Text = _a.mBtn1Text, mBtn2Text = _a.mBtn2Text, mBtn3Text = _a.mBtn3Text, onClickMBtn1 = _a.onClickMBtn1, onClickMBtn2 = _a.onClickMBtn2, onClickMBtn3 = _a.onClickMBtn3;
|
|
58
59
|
var selectAllMethods = (0, react_hook_form_1.useForm)();
|
|
59
60
|
var checkboxMethods = (0, react_hook_form_1.useForm)();
|
|
60
61
|
var isAllCheckboxSelected = (0, react_hook_form_1.useWatch)({
|
|
61
62
|
name: headerRowCheckboxName,
|
|
62
63
|
control: selectAllMethods.control
|
|
63
64
|
});
|
|
64
|
-
var
|
|
65
|
+
var _w = (0, react_1.useState)(false), isBulkActionBarOpen = _w[0], setIsBulkActionBarOpen = _w[1];
|
|
66
|
+
var childrenPropIds = [];
|
|
67
|
+
if (children && Array.isArray(children)) {
|
|
68
|
+
childrenPropIds = (_b = react_1.default.Children.map(children, function (child) {
|
|
69
|
+
if (react_1.default.isValidElement(child)) {
|
|
70
|
+
return child.props.id;
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
})) === null || _b === void 0 ? void 0 : _b.filter(Boolean);
|
|
74
|
+
}
|
|
65
75
|
/**
|
|
66
76
|
* @when AdminListItem이 선택되었을 때
|
|
67
77
|
* @expected 벌크액션바 활성화 여부와 체크박스 선택 여부를 결정합니다.
|
|
@@ -89,19 +99,23 @@ function AdminList(_a) {
|
|
|
89
99
|
}
|
|
90
100
|
setIsBulkActionBarOpen(true);
|
|
91
101
|
selectedIds.forEach(function (val) { return checkboxMethods.setValue(val.toString(), true); });
|
|
102
|
+
// NOTE Children에 포함된 요소의 id와 선택되어 있는 id를 비교해 전체 체크박스의 상태를 변경합니다.
|
|
103
|
+
var hasAllIds = childrenPropIds === null || childrenPropIds === void 0 ? void 0 : childrenPropIds.every(function (id) {
|
|
104
|
+
return selectedIds.some(function (selectedId) { return selectedId === id; });
|
|
105
|
+
});
|
|
106
|
+
selectAllMethods.setValue(headerRowCheckboxName, hasAllIds ? true : false);
|
|
92
107
|
}, [selectedIds, maintainIds]);
|
|
93
108
|
var handleSelectAllCheckbox = function () {
|
|
94
|
-
var
|
|
95
|
-
var basicIds = allIds.filter(function (id) { return !(maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.includes(id)); });
|
|
109
|
+
var basicIds = childrenPropIds === null || childrenPropIds === void 0 ? void 0 : childrenPropIds.filter(function (id) { return !(maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.includes(id)); });
|
|
96
110
|
if (!isAllCheckboxSelected) {
|
|
97
|
-
|
|
98
|
-
if (onSelect) {
|
|
111
|
+
childrenPropIds === null || childrenPropIds === void 0 ? void 0 : childrenPropIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), true); });
|
|
112
|
+
if (onSelect && basicIds) {
|
|
99
113
|
onSelect(basicIds);
|
|
100
114
|
}
|
|
101
115
|
return;
|
|
102
116
|
}
|
|
103
117
|
if (maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.length) {
|
|
104
|
-
basicIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), false); });
|
|
118
|
+
basicIds === null || basicIds === void 0 ? void 0 : basicIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), false); });
|
|
105
119
|
if (onSelect) {
|
|
106
120
|
onSelect([]);
|
|
107
121
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { BulkActionBar } from '../BulkActionBar';
|
|
3
3
|
import type { ToolBar } from '../ToolBar';
|
|
4
|
-
import type {
|
|
4
|
+
import type { PDSTextType } from '../../../common/types';
|
|
5
5
|
declare type ColumnWidthType = 'small' | 'medium' | 'large' | 'xlarge';
|
|
6
6
|
declare type Props = {
|
|
7
7
|
selectionMode?: 'none' | 'single' | 'multi';
|
|
8
8
|
headerRowMode?: 'none' | 'use';
|
|
9
|
-
column2HeaderText:
|
|
10
|
-
column3HeaderText?:
|
|
9
|
+
column2HeaderText: PDSTextType;
|
|
10
|
+
column3HeaderText?: PDSTextType;
|
|
11
11
|
column3Width?: ColumnWidthType;
|
|
12
|
-
column4HeaderText?:
|
|
12
|
+
column4HeaderText?: PDSTextType;
|
|
13
13
|
column4Width?: ColumnWidthType;
|
|
14
|
-
column5HeaderText?:
|
|
14
|
+
column5HeaderText?: PDSTextType;
|
|
15
15
|
column5Width?: ColumnWidthType;
|
|
16
|
-
column6HeaderText?:
|
|
16
|
+
column6HeaderText?: PDSTextType;
|
|
17
17
|
column6Width?: ColumnWidthType;
|
|
18
|
-
column7HeaderText?:
|
|
18
|
+
column7HeaderText?: PDSTextType;
|
|
19
19
|
column7Width?: ColumnWidthType;
|
|
20
|
-
column8HeaderText?:
|
|
20
|
+
column8HeaderText?: PDSTextType;
|
|
21
21
|
column8Width?: ColumnWidthType;
|
|
22
|
-
column9HeaderText?:
|
|
22
|
+
column9HeaderText?: PDSTextType;
|
|
23
23
|
column9Width?: ColumnWidthType;
|
|
24
|
-
column10HeaderText?:
|
|
24
|
+
column10HeaderText?: PDSTextType;
|
|
25
25
|
column10Width?: ColumnWidthType;
|
|
26
26
|
quickActionBtnMode?: 'none' | 'btn_amount1' | 'btn_amount2' | 'btn_amount3';
|
|
27
|
-
quickActionBtn1Text?:
|
|
28
|
-
quickActionBtn2Text?:
|
|
29
|
-
quickActionBtn3Text?:
|
|
27
|
+
quickActionBtn1Text?: PDSTextType;
|
|
28
|
+
quickActionBtn2Text?: PDSTextType;
|
|
29
|
+
quickActionBtn3Text?: PDSTextType;
|
|
30
30
|
quickActionBtnType?: 'hover' | 'fix';
|
|
31
|
-
emptyText?:
|
|
31
|
+
emptyText?: PDSTextType;
|
|
32
32
|
scrollMode?: 'infinite' | 'none' | 'page';
|
|
33
33
|
scrollVisibleType?: 'moving' | 'hidden' | 'visible';
|
|
34
34
|
headerRowCheckboxName?: string;
|
|
@@ -54,14 +54,24 @@ var components_2 = require("../../../hybrid/components");
|
|
|
54
54
|
var styled_components_1 = __importStar(require("styled-components"));
|
|
55
55
|
var HeaderRow_1 = __importDefault(require("./HeaderRow"));
|
|
56
56
|
function AdminList(_a) {
|
|
57
|
-
var
|
|
57
|
+
var _b;
|
|
58
|
+
var toolBar = _a.toolBar, bulkActionBar = _a.bulkActionBar, _c = _a.selectionMode, selectionMode = _c === void 0 ? 'multi' : _c, _d = _a.headerRowMode, headerRowMode = _d === void 0 ? 'use' : _d, column2HeaderText = _a.column2HeaderText, column3HeaderText = _a.column3HeaderText, _e = _a.column3Width, column3Width = _e === void 0 ? 'small' : _e, column4HeaderText = _a.column4HeaderText, _f = _a.column4Width, column4Width = _f === void 0 ? 'small' : _f, column5HeaderText = _a.column5HeaderText, _g = _a.column5Width, column5Width = _g === void 0 ? 'small' : _g, column6HeaderText = _a.column6HeaderText, _h = _a.column6Width, column6Width = _h === void 0 ? 'small' : _h, column7HeaderText = _a.column7HeaderText, _j = _a.column7Width, column7Width = _j === void 0 ? 'small' : _j, column8HeaderText = _a.column8HeaderText, _k = _a.column8Width, column8Width = _k === void 0 ? 'small' : _k, column9HeaderText = _a.column9HeaderText, _l = _a.column9Width, column9Width = _l === void 0 ? 'small' : _l, column10HeaderText = _a.column10HeaderText, _m = _a.column10Width, column10Width = _m === void 0 ? 'small' : _m, _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, emptyText = _a.emptyText, _q = _a.scrollMode, scrollMode = _q === void 0 ? 'infinite' : _q, _r = _a.scrollVisibleType, scrollVisibleType = _r === void 0 ? 'moving' : _r, selectedIds = _a.selectedIds, maintainIds = _a.maintainIds, children = _a.children, _s = _a.headerRowCheckboxName, headerRowCheckboxName = _s === void 0 ? 'all' : _s, _t = _a.flexibleHideInfoMode, flexibleHideInfoMode = _t === void 0 ? 'use' : _t, onClickQuickActionBtn1 = _a.onClickQuickActionBtn1, onClickQuickActionBtn2 = _a.onClickQuickActionBtn2, onClickQuickActionBtn3 = _a.onClickQuickActionBtn3, onSelect = _a.onSelect;
|
|
58
59
|
var selectAllMethods = (0, react_hook_form_1.useForm)();
|
|
59
60
|
var checkboxMethods = (0, react_hook_form_1.useForm)();
|
|
60
61
|
var isAllCheckboxSelected = (0, react_hook_form_1.useWatch)({
|
|
61
62
|
name: headerRowCheckboxName,
|
|
62
63
|
control: selectAllMethods.control
|
|
63
64
|
});
|
|
64
|
-
var
|
|
65
|
+
var _u = (0, react_1.useState)(false), isBulkActionBarOpen = _u[0], setIsBulkActionBarOpen = _u[1];
|
|
66
|
+
var childrenPropIds = [];
|
|
67
|
+
if (children && Array.isArray(children)) {
|
|
68
|
+
childrenPropIds = (_b = react_1.default.Children.map(children, function (child) {
|
|
69
|
+
if (react_1.default.isValidElement(child)) {
|
|
70
|
+
return child.props.id;
|
|
71
|
+
}
|
|
72
|
+
return null;
|
|
73
|
+
})) === null || _b === void 0 ? void 0 : _b.filter(Boolean);
|
|
74
|
+
}
|
|
65
75
|
/**
|
|
66
76
|
* @when AdminListItem이 선택되었을 때
|
|
67
77
|
* @expected 벌크액션바 활성화 여부와 체크박스 선택 여부를 결정합니다.
|
|
@@ -72,7 +82,7 @@ function AdminList(_a) {
|
|
|
72
82
|
}
|
|
73
83
|
if (!selectedIds.length) {
|
|
74
84
|
checkboxMethods.reset();
|
|
75
|
-
selectAllMethods.
|
|
85
|
+
selectAllMethods.setValue(headerRowCheckboxName, false);
|
|
76
86
|
if (maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.length) {
|
|
77
87
|
setIsBulkActionBarOpen(true);
|
|
78
88
|
maintainIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), true); });
|
|
@@ -89,19 +99,23 @@ function AdminList(_a) {
|
|
|
89
99
|
}
|
|
90
100
|
setIsBulkActionBarOpen(true);
|
|
91
101
|
selectedIds.forEach(function (val) { return checkboxMethods.setValue(val.toString(), true); });
|
|
102
|
+
// NOTE Children에 포함된 요소의 id와 선택되어 있는 id를 비교해 전체 체크박스의 상태를 변경합니다.
|
|
103
|
+
var hasAllIds = childrenPropIds === null || childrenPropIds === void 0 ? void 0 : childrenPropIds.every(function (id) {
|
|
104
|
+
return selectedIds.some(function (selectedId) { return selectedId === id; });
|
|
105
|
+
});
|
|
106
|
+
selectAllMethods.setValue(headerRowCheckboxName, hasAllIds ? true : false);
|
|
92
107
|
}, [selectedIds, maintainIds]);
|
|
93
108
|
var handleSelectAllCheckbox = function () {
|
|
94
|
-
var
|
|
95
|
-
var basicIds = allIds.filter(function (id) { return !(maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.includes(id)); });
|
|
109
|
+
var basicIds = childrenPropIds === null || childrenPropIds === void 0 ? void 0 : childrenPropIds.filter(function (id) { return !(maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.includes(id)); });
|
|
96
110
|
if (!isAllCheckboxSelected) {
|
|
97
|
-
|
|
98
|
-
if (onSelect) {
|
|
111
|
+
childrenPropIds === null || childrenPropIds === void 0 ? void 0 : childrenPropIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), true); });
|
|
112
|
+
if (onSelect && basicIds) {
|
|
99
113
|
onSelect(basicIds);
|
|
100
114
|
}
|
|
101
115
|
return;
|
|
102
116
|
}
|
|
103
117
|
if (maintainIds === null || maintainIds === void 0 ? void 0 : maintainIds.length) {
|
|
104
|
-
basicIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), false); });
|
|
118
|
+
basicIds === null || basicIds === void 0 ? void 0 : basicIds.forEach(function (id) { return checkboxMethods.setValue(id.toString(), false); });
|
|
105
119
|
if (onSelect) {
|
|
106
120
|
onSelect([]);
|
|
107
121
|
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
2
|
+
import type { PDSTextType } from '../../../common/types';
|
|
3
3
|
declare type ColumnWidthType = 'small' | 'medium' | 'large' | 'xlarge';
|
|
4
4
|
declare type Props = {
|
|
5
5
|
selectionMode: 'none' | 'single' | 'multi';
|
|
6
|
-
column2HeaderText?:
|
|
7
|
-
column3HeaderText?:
|
|
6
|
+
column2HeaderText?: PDSTextType;
|
|
7
|
+
column3HeaderText?: PDSTextType;
|
|
8
8
|
column3HeaderWidth?: ColumnWidthType;
|
|
9
|
-
column4HeaderText?:
|
|
9
|
+
column4HeaderText?: PDSTextType;
|
|
10
10
|
column4HeaderWidth?: ColumnWidthType;
|
|
11
|
-
column5HeaderText?:
|
|
11
|
+
column5HeaderText?: PDSTextType;
|
|
12
12
|
column5HeaderWidth?: ColumnWidthType;
|
|
13
|
-
column6HeaderText?:
|
|
13
|
+
column6HeaderText?: PDSTextType;
|
|
14
14
|
column6HeaderWidth?: ColumnWidthType;
|
|
15
|
-
column7HeaderText?:
|
|
15
|
+
column7HeaderText?: PDSTextType;
|
|
16
16
|
column7HeaderWidth?: ColumnWidthType;
|
|
17
|
-
column8HeaderText?:
|
|
17
|
+
column8HeaderText?: PDSTextType;
|
|
18
18
|
column8HeaderWidth?: ColumnWidthType;
|
|
19
|
-
column9HeaderText?:
|
|
19
|
+
column9HeaderText?: PDSTextType;
|
|
20
20
|
column9HeaderWidth?: ColumnWidthType;
|
|
21
|
-
column10HeaderText?:
|
|
21
|
+
column10HeaderText?: PDSTextType;
|
|
22
22
|
column10HeaderWidth?: ColumnWidthType;
|
|
23
23
|
quickActionBtnType?: 'hover' | 'fix';
|
|
24
24
|
quickActionButtonCount?: number;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PDSTextType } from '../../../common/types';
|
|
3
|
-
import type { TFunctionResult } from 'i18next';
|
|
4
3
|
declare type ColumnWidthType = 'small' | 'medium' | 'large' | 'xlarge';
|
|
5
4
|
declare type ColumnTextType = 'normal' | 'active' | 'active2' | 'inactive' | 'report' | 'report2';
|
|
6
5
|
export declare type AdminListItemProps = {
|
|
@@ -38,9 +37,9 @@ export declare type AdminListItemProps = {
|
|
|
38
37
|
column10TextWidth?: ColumnWidthType;
|
|
39
38
|
column10TextStyleTheme?: ColumnTextType;
|
|
40
39
|
quickActionBtnMode?: 'none' | 'btn_amount1' | 'btn_amount2' | 'btn_amount3';
|
|
41
|
-
quickActionBtn1Text?:
|
|
42
|
-
quickActionBtn2Text?:
|
|
43
|
-
quickActionBtn3Text?:
|
|
40
|
+
quickActionBtn1Text?: PDSTextType;
|
|
41
|
+
quickActionBtn2Text?: PDSTextType;
|
|
42
|
+
quickActionBtn3Text?: PDSTextType;
|
|
44
43
|
quickActionBtnType?: 'hover' | 'fix';
|
|
45
44
|
quickActionBtn1State?: 'normal' | 'disabled';
|
|
46
45
|
quickActionBtn2State?: 'normal' | 'disabled';
|
|
@@ -152,7 +152,7 @@ var AdminListItem = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
return ((0, jsx_runtime_1.jsxs)(S_AdminListItem, __assign({ "x-pds-name": "AdminListItem", "x-pds-element-type": "component", "x-pds-device-type": "desktop", ref: ref, rowSize: rowSize, onClick: handleClick, isSelected: isSelected, quickActionBtnType: quickActionBtnType, flexibleHideInfoMode: flexibleHideInfoMode }, { children: [(0, jsx_runtime_1.jsx)(S_SelectionColumn, __assign({ rowSize: rowSize }, { children: selectionMode === 'multi' && ((0, jsx_runtime_1.jsx)(S_Selection, { children: (0, jsx_runtime_1.jsx)(components_1.Checkbox, { name: id.toString(), state: selectedState === 'maintain' ? 'disabled' : 'normal' }, void 0) }, void 0)) }), void 0), (0, jsx_runtime_1.jsxs)(S_ImageColumn, __assign({ rowSize: rowSize }, { children: [column2Type === 'image_text' && (rowSize === 'high' || rowSize === 'medium') && ((0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ rowSize: rowSize }, { children: (0, jsx_runtime_1.jsx)(components_2.ImageView, { src: imageSrc, shapeType: imageShapeType, width: imageWidth, ratio: imageRatio, scaleType: imageScaleType, radius: imageShapeType === 'round' ? imageRadius : undefined, backgroundFillMode: "use" }, void 0) }), void 0)), (rowSize === 'low' || rowSize === 'medium') && ((0, jsx_runtime_1.jsx)(S_RowTextWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column2Text, styleTheme: "body2Bold", colorTheme: "sysTextPrimary", ellipsisMode: "use", lineLimit: 2 }, void 0) }, void 0)), rowSize === 'high' && ((0, jsx_runtime_1.jsx)(S_HighTextWrapper, __assign({ ref: contentRef, hasScroll: hasScroll }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column2Text, styleTheme: "body2Bold", colorTheme: "sysTextPrimary" }, void 0) }), void 0))] }), void 0), column3Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column3TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column3Text, styleTheme: column3TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column3TextStyleTheme)
|
|
155
|
+
return ((0, jsx_runtime_1.jsxs)(S_AdminListItem, __assign({ "x-pds-name": "AdminListItem", "x-pds-element-type": "component", "x-pds-device-type": "desktop", ref: ref, rowSize: rowSize, onClick: handleClick, isSelected: isSelected, quickActionBtnType: quickActionBtnType, flexibleHideInfoMode: flexibleHideInfoMode }, { children: [(0, jsx_runtime_1.jsx)(S_SelectionColumn, __assign({ rowSize: rowSize }, { children: selectionMode === 'multi' && ((0, jsx_runtime_1.jsx)(S_Selection, { children: (0, jsx_runtime_1.jsx)(components_1.Checkbox, { name: id.toString(), state: selectedState === 'maintain' ? 'disabled' : 'normal' }, void 0) }, void 0)) }), void 0), (0, jsx_runtime_1.jsxs)(S_ImageColumn, __assign({ rowSize: rowSize }, { children: [column2Type === 'image_text' && (rowSize === 'high' || rowSize === 'medium') && ((0, jsx_runtime_1.jsx)(S_ImageWrapper, __assign({ rowSize: rowSize }, { children: (0, jsx_runtime_1.jsx)(components_2.ImageView, { src: imageSrc, shapeType: imageShapeType, width: imageWidth, ratio: imageRatio, scaleType: imageScaleType, radius: imageShapeType === 'round' ? imageRadius : undefined, backgroundFillMode: "use" }, void 0) }), void 0)), (rowSize === 'low' || rowSize === 'medium') && ((0, jsx_runtime_1.jsx)(S_RowTextWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column2Text, styleTheme: "body2Bold", colorTheme: "sysTextPrimary", ellipsisMode: "use", lineLimit: 2 }, void 0) }, void 0)), rowSize === 'high' && ((0, jsx_runtime_1.jsx)(S_HighTextWrapper, __assign({ ref: contentRef, hasScroll: hasScroll }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column2Text, styleTheme: "body2Bold", colorTheme: "sysTextPrimary" }, void 0) }), void 0))] }), void 0), column3Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column3TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column3Text, styleTheme: column3TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column3TextStyleTheme) }, void 0) }), void 0)), column4Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column4TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column4Text, styleTheme: column4TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column4TextStyleTheme) }, void 0) }), void 0)), column5Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column5TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column5Text, styleTheme: column5TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column5TextStyleTheme) }, void 0) }), void 0)), column6Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column6TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column6Text, styleTheme: column6TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column6TextStyleTheme) }, void 0) }), void 0)), column7Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column7TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column7Text, styleTheme: column7TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column7TextStyleTheme) }, void 0) }), void 0)), column8Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column8TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column8Text, styleTheme: column8TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column8TextStyleTheme) }, void 0) }), void 0)), column9Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column9TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column9Text, styleTheme: column9TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column9TextStyleTheme) }, void 0) }), void 0)), column10Text && ((0, jsx_runtime_1.jsx)(S_Column, __assign({ columnSize: column10TextWidth, className: "hidableColumn" }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: column10Text, styleTheme: column10TextStyleTheme === 'normal' ? 'body2Regular' : 'body2Bold', colorTheme: getColumnColorTheme(column10TextStyleTheme) }, void 0) }), void 0)), quickActionBtnMode !== 'none' && ((0, jsx_runtime_1.jsx)(S_QuickActionButtonBox, __assign({ quickActionBtnType: quickActionBtnType }, { children: quickActionButtons() }), void 0)), quickActionBtnType === 'hover' && (0, jsx_runtime_1.jsx)(components_2.Spacing, { size: "spacing_f", spacingType: "width" }, void 0)] }), void 0));
|
|
156
156
|
});
|
|
157
157
|
var highRow = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 200px;\n max-height: 200px;\n"], ["\n height: 200px;\n max-height: 200px;\n"])));
|
|
158
158
|
var mediumRow = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 100px;\n max-height: 100px;\n"], ["\n height: 100px;\n max-height: 100px;\n"])));
|
|
@@ -160,7 +160,7 @@ var lowRow = (0, styled_components_1.css)(templateObject_3 || (templateObject_3
|
|
|
160
160
|
var smallColumnWidth = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 56px;\n"], ["\n width: 56px;\n"])));
|
|
161
161
|
var mediumColumnWidth = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 80px;\n"], ["\n width: 80px;\n"])));
|
|
162
162
|
var largeColumnWidth = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 144px;\n"], ["\n width: 144px;\n"])));
|
|
163
|
-
var xlargeColumnWidth = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width:
|
|
163
|
+
var xlargeColumnWidth = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 240px;\n"], ["\n width: 240px;\n"])));
|
|
164
164
|
var fixedColumn = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
|
|
165
165
|
var hoverColumn = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n height: 100%;\n"], ["\n height: 100%;\n"])));
|
|
166
166
|
var hoverQuickActionBtnBox = (0, styled_components_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: none;\n height: 100%;\n position: absolute;\n right: 0;\n"], ["\n align-items: center;\n background-color: ", ";\n display: none;\n height: 100%;\n position: absolute;\n right: 0;\n"])), function (_a) {
|
|
@@ -248,7 +248,7 @@ var S_SelectionColumn = styled_components_1.default.div(templateObject_24 || (te
|
|
|
248
248
|
var hoverAdminListItem = (0, styled_components_1.css)(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n align-items: center;\n position: relative;\n"], ["\n align-items: center;\n position: relative;\n"])));
|
|
249
249
|
var fixedAdminListItem = (0, styled_components_1.css)(templateObject_26 || (templateObject_26 = __makeTemplateObject(["\n justify-content: space-between;\n"], ["\n justify-content: space-between;\n"])));
|
|
250
250
|
var flexibleHideColumnStyle = (0, styled_components_1.css)(templateObject_27 || (templateObject_27 = __makeTemplateObject(["\n @media only screen and (max-width: 1400px) {\n .hidableColumn {\n display: none;\n }\n }\n"], ["\n @media only screen and (max-width: 1400px) {\n .hidableColumn {\n display: none;\n }\n }\n"])));
|
|
251
|
-
var S_AdminListItem = styled_components_1.default.div(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\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 ", "\n"], ["\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\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 ", "\n"])), function (_a) {
|
|
251
|
+
var S_AdminListItem = styled_components_1.default.div(templateObject_28 || (templateObject_28 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\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 ", "\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n\n ", "\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 ", "\n"])), function (_a) {
|
|
252
252
|
var theme = _a.theme, isSelected = _a.isSelected;
|
|
253
253
|
return isSelected ? theme.ui_cpnt_datatable_base_selected : theme.ui_cpnt_datatable_base_default;
|
|
254
254
|
}, function (_a) {
|
package/package.json
CHANGED
package/release-note.md
CHANGED