pds-dev-kit-web-test 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +8 -1
- package/dist/src/desktop/common/components/TextFieldBase/TextFieldBase.js +1 -1
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/ContentsContainer.d.ts +3 -2
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/ContentsContainer.js +2 -2
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSA.d.ts +3 -2
- package/dist/src/mobile/layout/LayoutMS/Containers/ContentsContainer/variation/MSA.js +2 -2
- package/dist/src/mobile/layout/LayoutMS/ContainersBox/ContainersBox.d.ts +3 -2
- package/dist/src/mobile/layout/LayoutMS/ContainersBox/ContainersBox.js +2 -2
- package/dist/src/sub/AdminList/AdminList/AdminList.d.ts +47 -0
- package/dist/src/sub/AdminList/AdminList/AdminList.js +224 -0
- package/dist/src/sub/AdminList/AdminList/HeaderRow.d.ts +30 -0
- package/dist/src/sub/AdminList/AdminList/HeaderRow.js +84 -0
- package/dist/src/sub/AdminList/AdminList/index.d.ts +1 -0
- package/dist/src/sub/AdminList/AdminList/index.js +8 -0
- package/dist/src/sub/AdminList/AdminListHeader/AdminListHeader.d.ts +18 -0
- package/dist/src/sub/AdminList/AdminListHeader/AdminListHeader.js +60 -0
- package/dist/src/sub/AdminList/AdminListHeader/HeaderBar.d.ts +17 -0
- package/dist/src/sub/AdminList/AdminListHeader/HeaderBar.js +85 -0
- package/dist/src/sub/AdminList/AdminListHeader/index.d.ts +1 -0
- package/dist/src/sub/AdminList/AdminListHeader/index.js +8 -0
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.d.ts +57 -0
- package/dist/src/sub/AdminList/AdminListItem/AdminListItem.js +263 -0
- package/dist/src/sub/AdminList/AdminListItem/index.d.ts +1 -0
- package/dist/src/sub/AdminList/AdminListItem/index.js +8 -0
- package/dist/src/sub/AdminList/BulkActionBar/BulkActionBar.d.ts +31 -0
- package/dist/src/sub/AdminList/BulkActionBar/BulkActionBar.js +31 -0
- package/dist/src/sub/AdminList/BulkActionBar/index.d.ts +1 -0
- package/dist/src/sub/AdminList/BulkActionBar/index.js +8 -0
- package/dist/src/sub/AdminList/ToolBar/ChipList.d.ts +9 -0
- package/dist/src/sub/AdminList/ToolBar/ChipList.js +29 -0
- package/dist/src/sub/AdminList/ToolBar/SearchField.d.ts +15 -0
- package/dist/src/sub/AdminList/ToolBar/SearchField.js +266 -0
- package/dist/src/sub/AdminList/ToolBar/ToolBar.d.ts +26 -0
- package/dist/src/sub/AdminList/ToolBar/ToolBar.js +85 -0
- package/dist/src/sub/AdminList/ToolBar/index.d.ts +1 -0
- package/dist/src/sub/AdminList/ToolBar/index.js +8 -0
- package/dist/src/sub/AdminList/index.d.ts +5 -0
- package/dist/src/sub/AdminList/index.js +13 -0
- package/dist/src/sub/index.d.ts +1 -0
- package/dist/src/sub/index.js +11 -1
- package/package.json +1 -1
- package/release-note.md +4 -6
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
18
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
19
|
+
};
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
22
|
+
require("i18next");
|
|
23
|
+
require("react");
|
|
24
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
25
|
+
require("../../../common");
|
|
26
|
+
var components_1 = require("../../../desktop/components");
|
|
27
|
+
var hybrid_1 = require("../../../hybrid");
|
|
28
|
+
var HeaderBar_1 = __importDefault(require("./HeaderBar"));
|
|
29
|
+
var defaultPaginationTextArray = [
|
|
30
|
+
{
|
|
31
|
+
text: '15',
|
|
32
|
+
value: 15
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
text: '30',
|
|
36
|
+
value: 30
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
text: '50',
|
|
40
|
+
value: 50
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
text: '100',
|
|
44
|
+
value: 100
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
function AdminListHeader(_a) {
|
|
48
|
+
var _b = _a.headerBarSize, headerBarSize = _b === void 0 ? 'regular' : _b, headerBarTitleText = _a.headerBarTitleText, tooltipText = _a.tooltipText, _c = _a.currentPage, currentPage = _c === void 0 ? 1 : _c, _d = _a.totalPage, totalPage = _d === void 0 ? 1 : _d, contentText = _a.contentText, _e = _a.dropdownTextArray, dropdownTextArray = _e === void 0 ? defaultPaginationTextArray : _e, dropdownDefaultValue = _a.dropdownDefaultValue, onChangeCount = _a.onChangeCount, onClickNextButton = _a.onClickNextButton, onClickPrevButton = _a.onClickPrevButton;
|
|
49
|
+
return ((0, jsx_runtime_1.jsxs)(S_AdminListHeader, __assign({ "x-pds-name": "AdminListHeader", "x-pds-element-type": "component", "x-pds-device-type": "desktop" }, { children: [(0, jsx_runtime_1.jsx)(HeaderBar_1.default, { titleText: headerBarTitleText, tooltipText: tooltipText, size: headerBarSize, currentPage: currentPage, totalPage: totalPage, dropdownTextArray: dropdownTextArray, dropdownDefaultValue: dropdownDefaultValue, onChangeDropdown: onChangeCount, onClickIBtn1: onClickNextButton, onClickIBtn2: onClickPrevButton }, void 0), headerBarTitleText && !contentText && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d" }, void 0), headerBarTitleText && contentText && (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b" }, void 0), contentText && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(S_ContentTextWrapper, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: contentText, styleTheme: "caption1Regular", colorTheme: "sysTextSecondary" }, void 0) }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d" }, void 0)] }, void 0))] }), void 0));
|
|
50
|
+
}
|
|
51
|
+
var S_AdminListHeader = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
52
|
+
var S_ContentTextWrapper = styled_components_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n"], ["\n padding-left: ", ";\n padding-right: ", ";\n"])), function (_a) {
|
|
53
|
+
var theme = _a.theme;
|
|
54
|
+
return theme.spacing.spacingE;
|
|
55
|
+
}, function (_a) {
|
|
56
|
+
var theme = _a.theme;
|
|
57
|
+
return theme.spacing.spacingE;
|
|
58
|
+
});
|
|
59
|
+
exports.default = AdminListHeader;
|
|
60
|
+
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TFunctionResult } from 'i18next';
|
|
3
|
+
import { PDSTextType, PDSValueOption } from '../../../common';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
titleText?: TFunctionResult;
|
|
6
|
+
tooltipText?: PDSTextType;
|
|
7
|
+
size?: 'regular' | 'small';
|
|
8
|
+
currentPage?: number;
|
|
9
|
+
totalPage?: number;
|
|
10
|
+
dropdownTextArray: PDSValueOption[];
|
|
11
|
+
dropdownDefaultValue?: PDSValueOption;
|
|
12
|
+
onChangeDropdown?: (option: PDSValueOption) => void;
|
|
13
|
+
onClickIBtn1?: () => void;
|
|
14
|
+
onClickIBtn2?: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare function HeaderBar({ titleText, tooltipText, size, currentPage, totalPage, dropdownTextArray, dropdownDefaultValue, onChangeDropdown, onClickIBtn1, onClickIBtn2 }: Props): JSX.Element;
|
|
17
|
+
export default HeaderBar;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
require("i18next");
|
|
39
|
+
require("react");
|
|
40
|
+
var react_i18next_1 = require("react-i18next");
|
|
41
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
42
|
+
require("../../../common");
|
|
43
|
+
var components_1 = require("../../../desktop/components");
|
|
44
|
+
var hybrid_1 = require("../../../hybrid");
|
|
45
|
+
function HeaderBar(_a) {
|
|
46
|
+
var titleText = _a.titleText, tooltipText = _a.tooltipText, _b = _a.size, size = _b === void 0 ? 'regular' : _b, _c = _a.currentPage, currentPage = _c === void 0 ? 1 : _c, _d = _a.totalPage, totalPage = _d === void 0 ? 1 : _d, dropdownTextArray = _a.dropdownTextArray, dropdownDefaultValue = _a.dropdownDefaultValue, onChangeDropdown = _a.onChangeDropdown, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2;
|
|
47
|
+
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
|
48
|
+
var handleDropdown = function (option) {
|
|
49
|
+
if (onChangeDropdown) {
|
|
50
|
+
onChangeDropdown(option);
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)(S_HeaderBar, __assign({ size: size }, { children: [(0, jsx_runtime_1.jsx)(S_HeaderTitle, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: titleText, tooltipText: tooltipText, styleTheme: size === 'regular' ? 'headingBold' : 'body1Bold' }, void 0) }, void 0), (0, jsx_runtime_1.jsxs)(S_HeaderControl, { children: [(0, jsx_runtime_1.jsxs)(S_ListCount, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: t('str_rows_per_page'), styleTheme: "caption1Regular" }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Dropdown, { customWidth: "88px", size: "small", valueArray: dropdownTextArray, onChange: handleDropdown, defaultValue: dropdownDefaultValue !== null && dropdownDefaultValue !== void 0 ? dropdownDefaultValue : dropdownTextArray[0] }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(S_Page, { children: [(0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: currentPage, styleTheme: "caption1Regular", colorTheme: "sysTextPrimary" }, void 0), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: " / ", styleTheme: "caption1Regular", colorTheme: "sysTextPrimary" }, void 0), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: totalPage, styleTheme: "caption1Regular", colorTheme: "sysTextTertiary" }, void 0)] }, void 0), (0, jsx_runtime_1.jsxs)(S_IconButtonBox, { children: [(0, jsx_runtime_1.jsx)(components_1.IconButton, { fillType: "fill", baseSize: "small", iconSize: 24, shapeType: "rectangle", iconName: "ic_arrow_left", iconFillType: "line", iconColorKey: "ui_cpnt_list_icon_01", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClickIBtn2 }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_d", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.IconButton, { fillType: "fill", baseSize: "small", iconSize: 24, shapeType: "rectangle", iconName: "ic_arrow_right", iconFillType: "line", iconColorKey: "ui_cpnt_list_icon_01", baseColorKey: "ui_cpnt_button_fill_base_transparent", onClick: onClickIBtn1 }, void 0)] }, void 0)] }, void 0)] }), void 0));
|
|
54
|
+
}
|
|
55
|
+
var regular = (0, styled_components_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n height: 40px;\n"], ["\n height: 40px;\n"])));
|
|
56
|
+
var small = (0, styled_components_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n height: 40px;\n"], ["\n height: 40px;\n"])));
|
|
57
|
+
var S_HeaderBar = styled_components_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"])), function (_a) {
|
|
58
|
+
var theme = _a.theme;
|
|
59
|
+
return theme.ui_cpnt_list_base_area;
|
|
60
|
+
}, function (_a) {
|
|
61
|
+
var theme = _a.theme;
|
|
62
|
+
return theme.spacing.spacingE;
|
|
63
|
+
}, function (_a) {
|
|
64
|
+
var theme = _a.theme;
|
|
65
|
+
return theme.spacing.spacingE;
|
|
66
|
+
}, function (_a) {
|
|
67
|
+
var size = _a.size;
|
|
68
|
+
return ({ regular: regular, small: small }[size]);
|
|
69
|
+
});
|
|
70
|
+
var S_HeaderTitle = styled_components_1.default.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex: 1;\n padding-right: ", ";\n"], ["\n flex: 1;\n padding-right: ", ";\n"])), function (_a) {
|
|
71
|
+
var theme = _a.theme;
|
|
72
|
+
return theme.spacing.spacingD;
|
|
73
|
+
});
|
|
74
|
+
var S_HeaderControl = styled_components_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
|
|
75
|
+
var S_ListCount = styled_components_1.default.div(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-right: ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-right: ", ";\n"])), function (_a) {
|
|
76
|
+
var theme = _a.theme;
|
|
77
|
+
return theme.spacing.spacingE;
|
|
78
|
+
});
|
|
79
|
+
var S_Page = styled_components_1.default.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-right: ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-right: ", ";\n"])), function (_a) {
|
|
80
|
+
var theme = _a.theme;
|
|
81
|
+
return theme.spacing.spacingE;
|
|
82
|
+
});
|
|
83
|
+
var S_IconButtonBox = styled_components_1.default.div(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
|
|
84
|
+
exports.default = HeaderBar;
|
|
85
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AdminListHeader } from './AdminListHeader';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminListHeader = void 0;
|
|
7
|
+
var AdminListHeader_1 = require("./AdminListHeader");
|
|
8
|
+
Object.defineProperty(exports, "AdminListHeader", { enumerable: true, get: function () { return __importDefault(AdminListHeader_1).default; } });
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { TFunctionResult } from 'i18next';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { PDSTextType } from '../../../common';
|
|
4
|
+
declare type ColumnWidthType = 'small' | 'medium' | 'large';
|
|
5
|
+
declare type ColumnTextType = 'normal' | 'active' | 'active2' | 'inactive' | 'report' | 'report2';
|
|
6
|
+
export declare type AdminListItemProps = {
|
|
7
|
+
rowSize?: 'high' | 'medium' | 'low';
|
|
8
|
+
selectionMode?: 'none' | 'single' | 'multi';
|
|
9
|
+
column2Type?: 'image_text' | 'text_only';
|
|
10
|
+
imageSrc?: string;
|
|
11
|
+
imageShapeType?: 'round' | 'circular' | 'rectangle';
|
|
12
|
+
imageScaleType?: 'fill' | 'contain' | 'cover' | 'none';
|
|
13
|
+
imageRadius?: 8 | 16 | 24;
|
|
14
|
+
imageRatio?: '16_9' | '4_3' | '1_1';
|
|
15
|
+
column2Text?: PDSTextType;
|
|
16
|
+
column3Text?: PDSTextType;
|
|
17
|
+
column3TextWidth?: ColumnWidthType;
|
|
18
|
+
column3TextStyleTheme?: ColumnTextType;
|
|
19
|
+
column4Text?: PDSTextType;
|
|
20
|
+
column4TextWidth?: ColumnWidthType;
|
|
21
|
+
column4TextStyleTheme?: ColumnTextType;
|
|
22
|
+
column5Text?: PDSTextType;
|
|
23
|
+
column5TextWidth?: ColumnWidthType;
|
|
24
|
+
column5TextStyleTheme?: ColumnTextType;
|
|
25
|
+
column6Text?: PDSTextType;
|
|
26
|
+
column6TextWidth?: ColumnWidthType;
|
|
27
|
+
column6TextStyleTheme?: ColumnTextType;
|
|
28
|
+
column7Text?: PDSTextType;
|
|
29
|
+
column7TextWidth?: ColumnWidthType;
|
|
30
|
+
column7TextStyleTheme?: ColumnTextType;
|
|
31
|
+
column8Text?: PDSTextType;
|
|
32
|
+
column8TextWidth?: ColumnWidthType;
|
|
33
|
+
column8TextStyleTheme?: ColumnTextType;
|
|
34
|
+
column9Text?: PDSTextType;
|
|
35
|
+
column9TextWidth?: ColumnWidthType;
|
|
36
|
+
column9TextStyleTheme?: ColumnTextType;
|
|
37
|
+
column10Text?: PDSTextType;
|
|
38
|
+
column10TextWidth?: ColumnWidthType;
|
|
39
|
+
column10TextStyleTheme?: ColumnTextType;
|
|
40
|
+
quickActionBtnMode?: 'none' | 'btn_amount1' | 'btn_amount2' | 'btn_amount3';
|
|
41
|
+
quickActionBtn1Text?: TFunctionResult;
|
|
42
|
+
quickActionBtn2Text?: TFunctionResult;
|
|
43
|
+
quickActionBtn3Text?: TFunctionResult;
|
|
44
|
+
quickActionBtnType?: 'hover' | 'fix';
|
|
45
|
+
quickActionBtn1State?: 'normal' | 'disabled';
|
|
46
|
+
quickActionBtn2State?: 'normal' | 'disabled';
|
|
47
|
+
quickActionBtn3State?: 'normal' | 'disabled';
|
|
48
|
+
selectedState?: 'basic' | 'maintain';
|
|
49
|
+
id: number;
|
|
50
|
+
flexibleHideInfoMode?: 'use' | 'none';
|
|
51
|
+
onClickQuickActionBtn1?: (id: number) => void;
|
|
52
|
+
onClickQuickActionBtn2?: (id: number) => void;
|
|
53
|
+
onClickQuickActionBtn3?: (id: number) => void;
|
|
54
|
+
onClickItem?: (id: number) => void;
|
|
55
|
+
};
|
|
56
|
+
declare const AdminListItem: React.ForwardRefExoticComponent<AdminListItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
export default AdminListItem;
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
require("i18next");
|
|
39
|
+
var react_1 = require("react");
|
|
40
|
+
var react_hook_form_1 = require("react-hook-form");
|
|
41
|
+
var styled_components_1 = __importStar(require("styled-components"));
|
|
42
|
+
require("../../../common");
|
|
43
|
+
var transitionStyle_1 = require("../../../common/styles/movement/transitionStyle");
|
|
44
|
+
var components_1 = require("../../../desktop/components");
|
|
45
|
+
var hybrid_1 = require("../../../hybrid");
|
|
46
|
+
var AdminListItem = (0, react_1.forwardRef)(function (_a, ref) {
|
|
47
|
+
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.imageScaleType, imageScaleType = _f === void 0 ? 'cover' : _f, _g = _a.imageRadius, imageRadius = _g === void 0 ? 8 : _g, _h = _a.imageRatio, imageRatio = _h === void 0 ? '16_9' : _h, column2Text = _a.column2Text, column3Text = _a.column3Text, _j = _a.column3TextWidth, column3TextWidth = _j === void 0 ? 'small' : _j, _k = _a.column3TextStyleTheme, column3TextStyleTheme = _k === void 0 ? 'normal' : _k, column4Text = _a.column4Text, _l = _a.column4TextWidth, column4TextWidth = _l === void 0 ? 'small' : _l, _m = _a.column4TextStyleTheme, column4TextStyleTheme = _m === void 0 ? 'normal' : _m, column5Text = _a.column5Text, _o = _a.column5TextWidth, column5TextWidth = _o === void 0 ? 'small' : _o, _p = _a.column5TextStyleTheme, column5TextStyleTheme = _p === void 0 ? 'normal' : _p, column6Text = _a.column6Text, _q = _a.column6TextWidth, column6TextWidth = _q === void 0 ? 'small' : _q, _r = _a.column6TextStyleTheme, column6TextStyleTheme = _r === void 0 ? 'normal' : _r, column7Text = _a.column7Text, _s = _a.column7TextWidth, column7TextWidth = _s === void 0 ? 'small' : _s, _t = _a.column7TextStyleTheme, column7TextStyleTheme = _t === void 0 ? 'normal' : _t, column8Text = _a.column8Text, _u = _a.column8TextWidth, column8TextWidth = _u === void 0 ? 'small' : _u, _v = _a.column8TextStyleTheme, column8TextStyleTheme = _v === void 0 ? 'normal' : _v, column9Text = _a.column9Text, _w = _a.column9TextWidth, column9TextWidth = _w === void 0 ? 'small' : _w, _x = _a.column9TextStyleTheme, column9TextStyleTheme = _x === void 0 ? 'normal' : _x, column10Text = _a.column10Text, _y = _a.column10TextWidth, column10TextWidth = _y === void 0 ? 'small' : _y, _z = _a.column10TextStyleTheme, column10TextStyleTheme = _z === void 0 ? 'normal' : _z, _0 = _a.quickActionBtnMode, quickActionBtnMode = _0 === void 0 ? 'btn_amount2' : _0, quickActionBtn1Text = _a.quickActionBtn1Text, quickActionBtn2Text = _a.quickActionBtn2Text, quickActionBtn3Text = _a.quickActionBtn3Text, _1 = _a.quickActionBtnType, quickActionBtnType = _1 === void 0 ? 'fix' : _1, _2 = _a.quickActionBtn1State, quickActionBtn1State = _2 === void 0 ? 'normal' : _2, _3 = _a.quickActionBtn2State, quickActionBtn2State = _3 === void 0 ? 'normal' : _3, _4 = _a.quickActionBtn3State, quickActionBtn3State = _4 === void 0 ? 'normal' : _4, _5 = _a.selectedState, selectedState = _5 === void 0 ? 'basic' : _5, id = _a.id, _6 = _a.flexibleHideInfoMode, flexibleHideInfoMode = _6 === void 0 ? 'use' : _6, onClickQuickActionBtn1 = _a.onClickQuickActionBtn1, onClickQuickActionBtn2 = _a.onClickQuickActionBtn2, onClickQuickActionBtn3 = _a.onClickQuickActionBtn3, onClickItem = _a.onClickItem;
|
|
48
|
+
var methods = (0, react_hook_form_1.useFormContext)();
|
|
49
|
+
var isSelected = (0, react_hook_form_1.useWatch)({
|
|
50
|
+
control: methods.control,
|
|
51
|
+
name: id.toString()
|
|
52
|
+
});
|
|
53
|
+
var _7 = (0, react_1.useState)(false), hasScroll = _7[0], setHasScroll = _7[1];
|
|
54
|
+
var contentRef = (0, react_1.useRef)(null);
|
|
55
|
+
(0, react_1.useEffect)(function () {
|
|
56
|
+
if (!contentRef || !contentRef.current)
|
|
57
|
+
return;
|
|
58
|
+
var _a = contentRef.current, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;
|
|
59
|
+
var isTextClamped = scrollHeight > clientHeight;
|
|
60
|
+
setHasScroll(isTextClamped);
|
|
61
|
+
}, []);
|
|
62
|
+
(0, react_1.useEffect)(function () {
|
|
63
|
+
if (selectedState === 'maintain') {
|
|
64
|
+
methods.setValue(id.toString(), true);
|
|
65
|
+
}
|
|
66
|
+
}, [selectedState]);
|
|
67
|
+
var handleClick = function (e) {
|
|
68
|
+
e.preventDefault();
|
|
69
|
+
if (selectedState === 'maintain' || selectionMode === 'none') {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (selectionMode === 'multi') {
|
|
73
|
+
var checkedStatus = methods.getValues(id.toString());
|
|
74
|
+
methods.setValue(id.toString(), !checkedStatus);
|
|
75
|
+
}
|
|
76
|
+
if (onClickItem) {
|
|
77
|
+
onClickItem(id);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
var handleClickQuickActionBtn1 = function (e) {
|
|
81
|
+
e.stopPropagation();
|
|
82
|
+
if (quickActionBtn1State === 'disabled') {
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (onClickQuickActionBtn1) {
|
|
86
|
+
onClickQuickActionBtn1(id);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
var handleClickQuickActionBtn2 = function (e) {
|
|
90
|
+
e.stopPropagation();
|
|
91
|
+
if (quickActionBtn2State === 'disabled') {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
if (onClickQuickActionBtn2) {
|
|
95
|
+
onClickQuickActionBtn2(id);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
var handleClickQuickActionBtn3 = function (e) {
|
|
99
|
+
e.stopPropagation();
|
|
100
|
+
if (quickActionBtn3State === 'disabled') {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if (onClickQuickActionBtn3) {
|
|
104
|
+
onClickQuickActionBtn3(id);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
var quickActionButtons = function () {
|
|
108
|
+
if (quickActionBtnMode !== 'none' && quickActionBtn1Text) {
|
|
109
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [quickActionBtnMode === 'btn_amount3' && quickActionBtn3Text && ((0, jsx_runtime_1.jsx)(S_QuickActionButton, __assign({ onClick: handleClickQuickActionBtn3, disabled: quickActionBtn3State === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: quickActionBtn3Text, styleTheme: "caption1Regular", colorTheme: "sysTextBrandPrimary", colorOverride: quickActionBtn3State === 'disabled'
|
|
110
|
+
? 'ui_cpnt_textlabel_sys_brand_primary_opacity50'
|
|
111
|
+
: undefined, textAlign: "center" }, void 0) }), void 0)), (quickActionBtnMode === 'btn_amount2' || quickActionBtnMode === 'btn_amount3') &&
|
|
112
|
+
quickActionBtn2Text && ((0, jsx_runtime_1.jsx)(S_QuickActionButton, __assign({ onClick: handleClickQuickActionBtn2, disabled: quickActionBtn2State === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: quickActionBtn2Text, styleTheme: "caption1Regular", colorTheme: "sysTextBrandPrimary", colorOverride: quickActionBtn2State === 'disabled'
|
|
113
|
+
? 'ui_cpnt_textlabel_sys_brand_primary_opacity50'
|
|
114
|
+
: undefined, textAlign: "center" }, void 0) }), void 0)), (0, jsx_runtime_1.jsx)(S_QuickActionButton, __assign({ onClick: handleClickQuickActionBtn1, disabled: quickActionBtn1State === 'disabled' }, { children: (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: quickActionBtn1Text, styleTheme: "caption1Regular", colorTheme: "sysTextBrandPrimary", colorOverride: quickActionBtn1State === 'disabled'
|
|
115
|
+
? 'ui_cpnt_textlabel_sys_brand_primary_opacity50'
|
|
116
|
+
: undefined, textAlign: "center" }, void 0) }), void 0)] }, void 0));
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
var getColumnColorTheme = function (style) {
|
|
120
|
+
switch (style) {
|
|
121
|
+
case 'active':
|
|
122
|
+
return 'sysTextBrandSeconVariant';
|
|
123
|
+
case 'active2':
|
|
124
|
+
return 'sysTextBrandPrimary';
|
|
125
|
+
case 'inactive':
|
|
126
|
+
return 'sysTextTertiary';
|
|
127
|
+
case 'report':
|
|
128
|
+
return 'sysTextError';
|
|
129
|
+
case 'report2':
|
|
130
|
+
return 'sysTextWarning';
|
|
131
|
+
default:
|
|
132
|
+
return 'sysTextSecondary';
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
var imageWidth;
|
|
136
|
+
switch (imageShapeType) {
|
|
137
|
+
case 'circular': {
|
|
138
|
+
imageWidth = 64;
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
case 'rectangle':
|
|
142
|
+
case 'round': {
|
|
143
|
+
if (imageRatio === '16_9') {
|
|
144
|
+
imageWidth = 128;
|
|
145
|
+
break;
|
|
146
|
+
}
|
|
147
|
+
if (imageRatio === '1_1') {
|
|
148
|
+
imageWidth = 72;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
if (imageRatio === '4_3') {
|
|
152
|
+
imageWidth = 96;
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
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)(hybrid_1.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)(hybrid_1.Spacing, { size: "spacing_f", spacingType: "width" }, void 0)] }), void 0));
|
|
158
|
+
});
|
|
159
|
+
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"])));
|
|
160
|
+
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"])));
|
|
161
|
+
var lowRow = (0, styled_components_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n height: 64px;\n"], ["\n height: 64px;\n"])));
|
|
162
|
+
var smallColumnWidth = (0, styled_components_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: 56px;\n"], ["\n width: 56px;\n"])));
|
|
163
|
+
var mediumColumnWidth = (0, styled_components_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 80px;\n"], ["\n width: 80px;\n"])));
|
|
164
|
+
var largeColumnWidth = (0, styled_components_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 144px;\n"], ["\n width: 144px;\n"])));
|
|
165
|
+
var fixedColumn = (0, styled_components_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n"], ["\n align-items: center;\n display: flex;\n"])));
|
|
166
|
+
var hoverColumn = (0, styled_components_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n height: 100%;\n"], ["\n height: 100%;\n"])));
|
|
167
|
+
var hoverQuickActionBtnBox = (0, styled_components_1.css)(templateObject_9 || (templateObject_9 = __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) {
|
|
168
|
+
var theme = _a.theme;
|
|
169
|
+
return theme.ui_cpnt_datatable_textbutton_base_02;
|
|
170
|
+
});
|
|
171
|
+
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) {
|
|
172
|
+
var theme = _a.theme;
|
|
173
|
+
return theme.ui_cpnt_datatable_textbutton_base_01;
|
|
174
|
+
});
|
|
175
|
+
var S_QuickActionButtonBox = styled_components_1.default.div(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"], ["\n padding-left: ", ";\n padding-right: ", ";\n\n ", ";\n"])), function (_a) {
|
|
176
|
+
var theme = _a.theme;
|
|
177
|
+
return theme.spacing.spacingC;
|
|
178
|
+
}, function (_a) {
|
|
179
|
+
var theme = _a.theme;
|
|
180
|
+
return theme.spacing.spacingE;
|
|
181
|
+
}, function (_a) {
|
|
182
|
+
var quickActionBtnType = _a.quickActionBtnType;
|
|
183
|
+
return quickActionBtnType &&
|
|
184
|
+
{ fix: fixedQuickActionBtnBox, hover: hoverQuickActionBtnBox }[quickActionBtnType];
|
|
185
|
+
});
|
|
186
|
+
var S_QuickActionButton = styled_components_1.default.div(templateObject_12 || (templateObject_12 = __makeTemplateObject(["\n align-items: center;\n cursor: ", ";\n display: flex;\n height: 56px;\n justify-content: center;\n width: 56px;\n"], ["\n align-items: center;\n cursor: ", ";\n display: flex;\n height: 56px;\n justify-content: center;\n width: 56px;\n"])), function (_a) {
|
|
187
|
+
var disabled = _a.disabled;
|
|
188
|
+
return (disabled ? 'default' : 'pointer');
|
|
189
|
+
});
|
|
190
|
+
var S_Selection = styled_components_1.default.div(templateObject_13 || (templateObject_13 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 40px;\n justify-content: center;\n width: 40px;\n"], ["\n align-items: center;\n display: flex;\n height: 40px;\n justify-content: center;\n width: 40px;\n"])));
|
|
191
|
+
var S_ImageWrapper = styled_components_1.default.div(templateObject_15 || (templateObject_15 = __makeTemplateObject(["\n margin-right: ", ";\n\n ", "\n"], ["\n margin-right: ", ";\n\n ", "\n"])), function (_a) {
|
|
192
|
+
var theme = _a.theme;
|
|
193
|
+
return theme.spacing.spacingD;
|
|
194
|
+
}, function (_a) {
|
|
195
|
+
var rowSize = _a.rowSize;
|
|
196
|
+
return rowSize === 'high' && (0, styled_components_1.css)(templateObject_14 || (templateObject_14 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n height: 100%;\n "], ["\n align-items: center;\n display: flex;\n height: 100%;\n "])));
|
|
197
|
+
});
|
|
198
|
+
var S_ImageColumn = styled_components_1.default.div(templateObject_18 || (templateObject_18 = __makeTemplateObject(["\n flex: 1;\n min-width: 80px;\n overflow: auto;\n padding: ", ";\n\n ", "\n"], ["\n flex: 1;\n min-width: 80px;\n overflow: auto;\n padding: ", ";\n\n ", "\n"])), function (_a) {
|
|
199
|
+
var theme = _a.theme;
|
|
200
|
+
return theme.spacing.spacingC;
|
|
201
|
+
}, function (_a) {
|
|
202
|
+
var rowSize = _a.rowSize;
|
|
203
|
+
return rowSize === 'high'
|
|
204
|
+
? (0, styled_components_1.css)(templateObject_16 || (templateObject_16 = __makeTemplateObject(["\n box-sizing: border-box;\n display: flex;\n height: 200px;\n "], ["\n box-sizing: border-box;\n display: flex;\n height: 200px;\n "]))) : (0, styled_components_1.css)(templateObject_17 || (templateObject_17 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n "], ["\n align-items: center;\n display: flex;\n "])));
|
|
205
|
+
});
|
|
206
|
+
var S_HighTextWrapper = styled_components_1.default.div(templateObject_20 || (templateObject_20 = __makeTemplateObject(["\n height: 100%;\n overflow: auto;\n\n ", "\n"], ["\n height: 100%;\n overflow: auto;\n\n ", "\n"])), function (_a) {
|
|
207
|
+
var hasScroll = _a.hasScroll;
|
|
208
|
+
return !hasScroll && (0, styled_components_1.css)(templateObject_19 || (templateObject_19 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n "], ["\n align-items: center;\n display: flex;\n "])));
|
|
209
|
+
});
|
|
210
|
+
var S_RowTextWrapper = styled_components_1.default.div(templateObject_21 || (templateObject_21 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n overflow: auto;\n\n ", ";\n ", ";\n"], ["\n align-items: center;\n display: flex;\n overflow: auto;\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
211
|
+
var columnSize = _a.columnSize;
|
|
212
|
+
return columnSize &&
|
|
213
|
+
{ small: smallColumnWidth, medium: mediumColumnWidth, large: largeColumnWidth }[columnSize];
|
|
214
|
+
}, function (_a) {
|
|
215
|
+
var quickActionBtnType = _a.quickActionBtnType;
|
|
216
|
+
return quickActionBtnType && { fix: fixedColumn, hover: hoverColumn }[quickActionBtnType];
|
|
217
|
+
});
|
|
218
|
+
var S_Column = styled_components_1.default.div(templateObject_22 || (templateObject_22 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n overflow: auto;\n padding: ", ";\n\n ", ";\n ", ";\n"], ["\n align-items: center;\n display: flex;\n overflow: auto;\n padding: ", ";\n\n ", ";\n ", ";\n"])), function (_a) {
|
|
219
|
+
var theme = _a.theme;
|
|
220
|
+
return theme.spacing.spacingC;
|
|
221
|
+
}, function (_a) {
|
|
222
|
+
var columnSize = _a.columnSize;
|
|
223
|
+
return columnSize &&
|
|
224
|
+
{ small: smallColumnWidth, medium: mediumColumnWidth, large: largeColumnWidth }[columnSize];
|
|
225
|
+
}, function (_a) {
|
|
226
|
+
var quickActionBtnType = _a.quickActionBtnType;
|
|
227
|
+
return quickActionBtnType && { fix: fixedColumn, hover: hoverColumn }[quickActionBtnType];
|
|
228
|
+
});
|
|
229
|
+
var S_SelectionColumn = styled_components_1.default.div(templateObject_23 || (templateObject_23 = __makeTemplateObject(["\n align-items: center;\n display: flex;\n padding-bottom: ", ";\n padding-top: ", ";\n"], ["\n align-items: center;\n display: flex;\n padding-bottom: ", ";\n padding-top: ", ";\n"])), function (_a) {
|
|
230
|
+
var theme = _a.theme, rowSize = _a.rowSize;
|
|
231
|
+
return (rowSize === 'high' || rowSize === 'medium') && theme.spacing.spacingC;
|
|
232
|
+
}, function (_a) {
|
|
233
|
+
var theme = _a.theme, rowSize = _a.rowSize;
|
|
234
|
+
return (rowSize === 'high' || rowSize === 'medium') && theme.spacing.spacingC;
|
|
235
|
+
});
|
|
236
|
+
var hoverAdminListItem = (0, styled_components_1.css)(templateObject_24 || (templateObject_24 = __makeTemplateObject(["\n align-items: center;\n position: relative;\n"], ["\n align-items: center;\n position: relative;\n"])));
|
|
237
|
+
var fixedAdminListItem = (0, styled_components_1.css)(templateObject_25 || (templateObject_25 = __makeTemplateObject(["\n justify-content: space-between;\n"], ["\n justify-content: space-between;\n"])));
|
|
238
|
+
var flexibleHideColumnStyle = (0, styled_components_1.css)(templateObject_26 || (templateObject_26 = __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"])));
|
|
239
|
+
var S_AdminListItem = styled_components_1.default.div(templateObject_27 || (templateObject_27 = __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) {
|
|
240
|
+
var theme = _a.theme, isSelected = _a.isSelected;
|
|
241
|
+
return isSelected ? theme.ui_cpnt_datatable_base_selected : theme.ui_cpnt_datatable_base_default;
|
|
242
|
+
}, function (_a) {
|
|
243
|
+
var theme = _a.theme;
|
|
244
|
+
return theme.spacing.spacingC;
|
|
245
|
+
}, transitionStyle_1.AdminListItemTransition, function (_a) {
|
|
246
|
+
var rowSize = _a.rowSize;
|
|
247
|
+
return rowSize && { high: highRow, medium: mediumRow, low: lowRow }[rowSize];
|
|
248
|
+
}, function (_a) {
|
|
249
|
+
var quickActionBtnType = _a.quickActionBtnType;
|
|
250
|
+
return quickActionBtnType &&
|
|
251
|
+
{ fix: fixedAdminListItem, hover: hoverAdminListItem }[quickActionBtnType];
|
|
252
|
+
}, function (_a) {
|
|
253
|
+
var theme = _a.theme;
|
|
254
|
+
return theme.ui_cpnt_datatable_base_hover;
|
|
255
|
+
}, S_QuickActionButtonBox, function (_a) {
|
|
256
|
+
var quickActionBtnType = _a.quickActionBtnType;
|
|
257
|
+
return quickActionBtnType === 'hover' && 'flex';
|
|
258
|
+
}, function (_a) {
|
|
259
|
+
var flexibleHideInfoMode = _a.flexibleHideInfoMode;
|
|
260
|
+
return flexibleHideInfoMode === 'use' && flexibleHideColumnStyle;
|
|
261
|
+
});
|
|
262
|
+
exports.default = AdminListItem;
|
|
263
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11, templateObject_12, templateObject_13, templateObject_14, templateObject_15, templateObject_16, templateObject_17, templateObject_18, templateObject_19, templateObject_20, templateObject_21, templateObject_22, templateObject_23, templateObject_24, templateObject_25, templateObject_26, templateObject_27;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as AdminListItem } from './AdminListItem';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.AdminListItem = void 0;
|
|
7
|
+
var AdminListItem_1 = require("./AdminListItem");
|
|
8
|
+
Object.defineProperty(exports, "AdminListItem", { enumerable: true, get: function () { return __importDefault(AdminListItem_1).default; } });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TFunctionResult } from 'i18next';
|
|
3
|
+
import { PDSValueOption } from '../../../common';
|
|
4
|
+
declare type Props = {
|
|
5
|
+
itemCount?: number;
|
|
6
|
+
dropdownMode?: 'none' | 'dropdown_amount1' | 'dropdown_amount2' | 'dropdown_amount3';
|
|
7
|
+
dropdown1Value?: PDSValueOption;
|
|
8
|
+
dropdown2Value?: PDSValueOption;
|
|
9
|
+
dropdown3Value?: PDSValueOption;
|
|
10
|
+
dropdown1DefaultText?: PDSValueOption;
|
|
11
|
+
dropdown2DefaultText?: PDSValueOption;
|
|
12
|
+
dropdown3DefaultText?: PDSValueOption;
|
|
13
|
+
dropdown1HintText?: TFunctionResult;
|
|
14
|
+
dropdown2HintText?: TFunctionResult;
|
|
15
|
+
dropdown3HintText?: TFunctionResult;
|
|
16
|
+
dropdown1ValueArray?: PDSValueOption[];
|
|
17
|
+
dropdown2ValueArray?: PDSValueOption[];
|
|
18
|
+
dropdown3ValueArray?: PDSValueOption[];
|
|
19
|
+
tBtnMode?: 'none' | 'tbtn_amount1' | 'tbtn_amount2' | 'tbtn_amount3';
|
|
20
|
+
tBtn1Text?: TFunctionResult;
|
|
21
|
+
tBtn2Text?: TFunctionResult;
|
|
22
|
+
tBtn3Text?: TFunctionResult;
|
|
23
|
+
onChangeDropdown1?: (value: PDSValueOption) => void;
|
|
24
|
+
onChangeDropdown2?: (value: PDSValueOption) => void;
|
|
25
|
+
onChangeDropdown3?: (value: PDSValueOption) => void;
|
|
26
|
+
onClickTBtn1?: () => void;
|
|
27
|
+
onClickTBtn2?: () => void;
|
|
28
|
+
onClickTBtn3?: () => void;
|
|
29
|
+
};
|
|
30
|
+
declare function BulkActionBar({ itemCount, dropdownMode, dropdown1Value, dropdown2Value, dropdown3Value, dropdown1DefaultText, dropdown2DefaultText, dropdown3DefaultText, dropdown1HintText, dropdown2HintText, dropdown3HintText, dropdown1ValueArray, dropdown2ValueArray, dropdown3ValueArray, tBtnMode, tBtn1Text, tBtn2Text, tBtn3Text, onChangeDropdown1, onChangeDropdown2, onChangeDropdown3, onClickTBtn1, onClickTBtn2, onClickTBtn3 }: Props): JSX.Element;
|
|
31
|
+
export default BulkActionBar;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
5
|
+
};
|
|
6
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
7
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
11
|
+
require("i18next");
|
|
12
|
+
require("react");
|
|
13
|
+
var react_i18next_1 = require("react-i18next");
|
|
14
|
+
var styled_components_1 = __importDefault(require("styled-components"));
|
|
15
|
+
require("../../../common");
|
|
16
|
+
var components_1 = require("../../../desktop/components");
|
|
17
|
+
var hybrid_1 = require("../../../hybrid");
|
|
18
|
+
function BulkActionBar(_a) {
|
|
19
|
+
var itemCount = _a.itemCount, _b = _a.dropdownMode, dropdownMode = _b === void 0 ? 'dropdown_amount1' : _b, 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, tBtnMode = _a.tBtnMode, tBtn1Text = _a.tBtn1Text, tBtn2Text = _a.tBtn2Text, tBtn3Text = _a.tBtn3Text, onChangeDropdown1 = _a.onChangeDropdown1, onChangeDropdown2 = _a.onChangeDropdown2, onChangeDropdown3 = _a.onChangeDropdown3, onClickTBtn1 = _a.onClickTBtn1, onClickTBtn2 = _a.onClickTBtn2, onClickTBtn3 = _a.onClickTBtn3;
|
|
20
|
+
var t = (0, react_i18next_1.useTranslation)('translation').t;
|
|
21
|
+
return ((0, jsx_runtime_1.jsxs)(S_BulkActionBar, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_e", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.TextLabel, { text: t('str_n_selected', {
|
|
22
|
+
itemSelected: itemCount
|
|
23
|
+
}), styleTheme: "body2Bold", colorTheme: "sysTextWhite" }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_e", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Divider, { direction: "vertical", height: 16 }, void 0), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_e", spacingType: "width" }, void 0), dropdownMode !== 'none' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [dropdown1ValueArray && ((0, jsx_runtime_1.jsx)(components_1.Dropdown, { valueArray: dropdown1ValueArray, defaultValue: dropdown1DefaultText, hintText: dropdown1HintText, value: dropdown1Value, onChange: onChangeDropdown1, size: "small", colorTheme: "dark" }, void 0)), (dropdownMode === 'dropdown_amount2' || dropdownMode === 'dropdown_amount3') &&
|
|
24
|
+
dropdown2ValueArray && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Dropdown, { valueArray: dropdown2ValueArray, defaultValue: dropdown2DefaultText, hintText: dropdown2HintText, value: dropdown2Value, onChange: onChangeDropdown2, size: "small", colorTheme: "dark" }, void 0)] }, void 0)), dropdownMode === 'dropdown_amount3' && dropdown3ValueArray && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.Dropdown, { valueArray: dropdown3ValueArray, defaultValue: dropdown3DefaultText, hintText: dropdown3HintText, value: dropdown3Value, onChange: onChangeDropdown3, size: "small", colorTheme: "dark" }, void 0)] }, void 0))] }, void 0)), tBtnMode !== 'none' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.TextButton, { size: "small", text: tBtn1Text, onClick: onClickTBtn1, colorTheme: "white" }, void 0), (tBtnMode === 'tbtn_amount2' || tBtnMode === 'tbtn_amount3') && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.TextButton, { size: "small", text: tBtn2Text, onClick: onClickTBtn2, colorTheme: "white" }, void 0)] }, void 0)), tBtnMode === 'tbtn_amount3' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_b", spacingType: "width" }, void 0), (0, jsx_runtime_1.jsx)(components_1.TextButton, { size: "small", text: tBtn3Text, onClick: onClickTBtn3, colorTheme: "white" }, void 0)] }, void 0))] }, void 0)), (0, jsx_runtime_1.jsx)(hybrid_1.Spacing, { size: "spacing_e", spacingType: "width" }, void 0)] }, void 0));
|
|
25
|
+
}
|
|
26
|
+
var S_BulkActionBar = styled_components_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n height: 56px;\n min-height: 56px;\n"], ["\n align-items: center;\n background-color: ", ";\n box-sizing: border-box;\n display: flex;\n height: 56px;\n min-height: 56px;\n"])), function (_a) {
|
|
27
|
+
var theme = _a.theme;
|
|
28
|
+
return theme.ui_cpnt_datatable_bulkaction_base;
|
|
29
|
+
});
|
|
30
|
+
exports.default = BulkActionBar;
|
|
31
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BulkActionBar } from './BulkActionBar';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BulkActionBar = void 0;
|
|
7
|
+
var BulkActionBar_1 = require("./BulkActionBar");
|
|
8
|
+
Object.defineProperty(exports, "BulkActionBar", { enumerable: true, get: function () { return __importDefault(BulkActionBar_1).default; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { PDSValueOption } from '../../../common';
|
|
3
|
+
declare type Props = {
|
|
4
|
+
textArray: PDSValueOption[];
|
|
5
|
+
value?: PDSValueOption;
|
|
6
|
+
onClickChip?: (option: PDSValueOption) => void;
|
|
7
|
+
};
|
|
8
|
+
declare function ChipList({ textArray, value, onClickChip }: Props): JSX.Element;
|
|
9
|
+
export default ChipList;
|