pds-dev-kit-web 2.2.46 → 2.2.48

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.
@@ -20,6 +20,7 @@ export type BasicListItemProps = {
20
20
  iBtn2IconFillType?: 'fill' | 'line';
21
21
  mBtnFillType?: 'fill' | 'line';
22
22
  mBtnText?: PDSTextType;
23
+ mBtnState?: 'normal' | 'disabled';
23
24
  dividerType?: 'none' | 'solid';
24
25
  titleFontWeight?: 'bold' | 'regular';
25
26
  checkboxId?: string | number;
@@ -48,5 +49,5 @@ export type StyleProps = {
48
49
  onlyLeftArea?: boolean;
49
50
  dividerType?: 'none' | 'solid';
50
51
  };
51
- declare function BasicListItem({ selectionMode, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickIBtn1, onClickIBtn2, onClickMBtn, onClickRadio, onClickSwitch }: BasicListItemProps): JSX.Element;
52
+ declare function BasicListItem({ selectionMode, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, mBtnState, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickIBtn1, onClickIBtn2, onClickMBtn, onClickRadio, onClickSwitch }: BasicListItemProps): JSX.Element;
52
53
  export default BasicListItem;
@@ -25,7 +25,7 @@ var Contents_1 = __importDefault(require("./Contents"));
25
25
  var LeftBox_1 = require("./LeftBox");
26
26
  var RightBox_1 = require("./RightBox");
27
27
  function BasicListItem(_a) {
28
- var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, titleText = _a.titleText, _c = _a.titleTextColorTheme, titleTextColorTheme = _c === void 0 ? 'none' : _c, descText = _a.descText, _d = _a.badgeMode, badgeMode = _d === void 0 ? 'none' : _d, _e = _a.badgeStatus, badgeStatus = _e === void 0 ? 'inactive' : _e, _f = _a.imageIconMode, imageIconMode = _f === void 0 ? 'none' : _f, _g = _a.imageShapeType, imageShapeType = _g === void 0 ? 'round' : _g, imageSrc = _a.imageSrc, iconName = _a.iconName, _h = _a.iconFillType, iconFillType = _h === void 0 ? 'line' : _h, _j = _a.displayType, displayType = _j === void 0 ? 'none' : _j, captionText = _a.captionText, iBtn1IconName = _a.iBtn1IconName, _k = _a.iBtn1IconFillType, iBtn1IconFillType = _k === void 0 ? 'line' : _k, iBtn2IconName = _a.iBtn2IconName, _l = _a.iBtn2IconFillType, iBtn2IconFillType = _l === void 0 ? 'line' : _l, _m = _a.mBtnFillType, mBtnFillType = _m === void 0 ? 'fill' : _m, mBtnText = _a.mBtnText, _o = _a.dividerType, dividerType = _o === void 0 ? 'none' : _o, _p = _a.titleFontWeight, titleFontWeight = _p === void 0 ? 'regular' : _p, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _q = _a.switchState, switchState = _q === void 0 ? 'normal' : _q, _r = _a.switchStatus, switchStatus = _r === void 0 ? 'off' : _r, _s = _a.spacingMode, spacingMode = _s === void 0 ? 'use' : _s, onClick = _a.onClick, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onClickMBtn = _a.onClickMBtn, onClickRadio = _a.onClickRadio, onClickSwitch = _a.onClickSwitch;
28
+ var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, titleText = _a.titleText, _c = _a.titleTextColorTheme, titleTextColorTheme = _c === void 0 ? 'none' : _c, descText = _a.descText, _d = _a.badgeMode, badgeMode = _d === void 0 ? 'none' : _d, _e = _a.badgeStatus, badgeStatus = _e === void 0 ? 'inactive' : _e, _f = _a.imageIconMode, imageIconMode = _f === void 0 ? 'none' : _f, _g = _a.imageShapeType, imageShapeType = _g === void 0 ? 'round' : _g, imageSrc = _a.imageSrc, iconName = _a.iconName, _h = _a.iconFillType, iconFillType = _h === void 0 ? 'line' : _h, _j = _a.displayType, displayType = _j === void 0 ? 'none' : _j, captionText = _a.captionText, iBtn1IconName = _a.iBtn1IconName, _k = _a.iBtn1IconFillType, iBtn1IconFillType = _k === void 0 ? 'line' : _k, iBtn2IconName = _a.iBtn2IconName, _l = _a.iBtn2IconFillType, iBtn2IconFillType = _l === void 0 ? 'line' : _l, _m = _a.mBtnFillType, mBtnFillType = _m === void 0 ? 'fill' : _m, mBtnText = _a.mBtnText, _o = _a.mBtnState, mBtnState = _o === void 0 ? 'normal' : _o, _p = _a.dividerType, dividerType = _p === void 0 ? 'none' : _p, _q = _a.titleFontWeight, titleFontWeight = _q === void 0 ? 'regular' : _q, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _r = _a.switchState, switchState = _r === void 0 ? 'normal' : _r, _s = _a.switchStatus, switchStatus = _s === void 0 ? 'off' : _s, _t = _a.spacingMode, spacingMode = _t === void 0 ? 'use' : _t, onClick = _a.onClick, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onClickMBtn = _a.onClickMBtn, onClickRadio = _a.onClickRadio, onClickSwitch = _a.onClickSwitch;
29
29
  var methods = (0, react_hook_form_1.useFormContext)();
30
30
  var isSelected = methods === null || methods === void 0 ? void 0 : methods.watch((checkboxId === null || checkboxId === void 0 ? void 0 : checkboxId.toString()) || '');
31
31
  var handleIBtn1Click = function (e) {
@@ -64,7 +64,7 @@ function BasicListItem(_a) {
64
64
  }
65
65
  }
66
66
  };
67
- return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "desktop", displayType: displayType, selectionMode: selectionMode, isSelected: isSelected, onClick: handleClick, hasOnClick: !!onClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColorTheme === 'none' ? 'sysTextPrimary' : 'sysTextError', font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2 }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
67
+ return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "desktop", displayType: displayType, selectionMode: selectionMode, isSelected: isSelected, onClick: handleClick, hasOnClick: !!onClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColorTheme === 'none' ? 'sysTextPrimary' : 'sysTextError', font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2 }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', state: mBtnState, onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
68
68
  }
69
69
  var S_BasicListItem = styled_components_1.default.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n cursor: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n cursor: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"])), function (_a) {
70
70
  var theme = _a.theme, isSelected = _a.isSelected;
@@ -2,6 +2,7 @@
2
2
  import type { BasicListItemProps } from '../BasicListItem';
3
3
  export type MainButtonPropTypes = {
4
4
  text: BasicListItemProps['mBtnText'];
5
+ state: 'disabled' | 'normal';
5
6
  fill: boolean;
6
7
  onClick: BasicListItemProps['onClickMBtn'];
7
8
  };
@@ -4,7 +4,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
4
4
  var components_1 = require("../../../../hybrid/components");
5
5
  var MainButton_1 = require("../../MainButton");
6
6
  var MainButton = function (_a) {
7
- var text = _a.text, fill = _a.fill, onClick = _a.onClick;
8
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MainButton_1.MainButton, { text: text, fillType: fill ? 'fill' : 'line', size: "small", onClick: onClick }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_c", spacingType: "width" })] }));
7
+ var text = _a.text, state = _a.state, fill = _a.fill, onClick = _a.onClick;
8
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MainButton_1.MainButton, { text: text, state: state, fillType: fill ? 'fill' : 'line', size: "small", onClick: onClick }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_c", spacingType: "width" })] }));
9
9
  };
10
10
  exports.default = MainButton;
@@ -5,28 +5,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var jsx_runtime_1 = require("react/jsx-runtime");
7
7
  var react_1 = require("react");
8
- var react_router_dom_1 = require("react-router-dom");
9
8
  var Navigations_1 = require("../../../../../../common/components/Navigations");
10
9
  var DynamicDesktopNavBar_1 = require("../../../DynamicDesktopNavBar");
11
- var utils_1 = require("../../../utils");
12
10
  var IconNav_1 = __importDefault(require("../../IconNav"));
13
11
  var ImageIconNav_1 = __importDefault(require("../../ImageIconNav"));
14
12
  function InternalLinkMenuItemNav(_a) {
15
13
  var menu = _a.menu, showMenuAsIcon = _a.showMenuAsIcon, isContextMenu = _a.isContextMenu;
16
- var location = (0, react_router_dom_1.useLocation)();
17
- var _b = (0, react_1.useContext)(DynamicDesktopNavBar_1.BasePathContext), basePath = _b.basePath, activeMode = _b.activeMode, handleClickInternalMenuItemNav = _b.handleClickInternalMenuItemNav;
18
- var _c = getInternalLink(basePath, menu.conversionLinkSrc), internalPath = _c.internalPath, pathname = _c.pathname, search = _c.search;
19
- var isActive = (0, react_1.useMemo)(function () {
20
- if (activeMode === 'BY_URL') {
21
- return false;
22
- }
23
- // NOTE: 'from' keyword를 예외로 삭제하고 비교합니다.
24
- var locationSearch = (0, utils_1.getSearchExceptGivenName)(location.search, 'from');
25
- if (pathname + search === location.pathname + locationSearch) {
26
- return true;
27
- }
28
- return false;
29
- }, [activeMode, location]);
14
+ var _b = (0, react_1.useContext)(DynamicDesktopNavBar_1.BasePathContext), basePath = _b.basePath, handleClickInternalMenuItemNav = _b.handleClickInternalMenuItemNav;
15
+ var internalPath = getInternalLink(basePath, menu.conversionLinkSrc).internalPath;
30
16
  var onClickNav = function () {
31
17
  handleClickInternalMenuItemNav(internalPath);
32
18
  };
@@ -38,13 +24,18 @@ function InternalLinkMenuItemNav(_a) {
38
24
  return ((0, jsx_runtime_1.jsx)(IconNav_1.default, { onClick: onClickNav, to: internalPath, iconName: menu.iconName, openNewTab: false }));
39
25
  }
40
26
  }
41
- return isContextMenu ? ((0, jsx_runtime_1.jsx)(Navigations_1.ContextTextLabelNav, { onClick: onClickNav, preventLineChange: true, openNewTab: false, to: internalPath, text: menu.name })) : ((0, jsx_runtime_1.jsx)(Navigations_1.TextLabelNav, { onClick: onClickNav, isActive: isActive, preventLineChange: true, openNewTab: false, to: internalPath, text: menu.name }));
27
+ return isContextMenu ? ((0, jsx_runtime_1.jsx)(Navigations_1.ContextTextLabelNav, { onClick: onClickNav, preventLineChange: true, openNewTab: false, to: internalPath, text: menu.name })) : ((0, jsx_runtime_1.jsx)(Navigations_1.TextLabelNav, { onClick: onClickNav, preventLineChange: true, openNewTab: false, to: internalPath, text: menu.name }));
42
28
  }
43
29
  function getInternalLink(basePath, url) {
44
30
  var _a = new URL(url), pathname = _a.pathname, search = _a.search;
45
31
  var splitPath = pathname.split(basePath).pop();
46
32
  var PAPP_CODE_INDEX = 1;
47
33
  var pAppCode = splitPath === null || splitPath === void 0 ? void 0 : splitPath.split('/')[PAPP_CODE_INDEX];
48
- return { internalPath: basePath + splitPath + search, pAppCode: pAppCode, pathname: pathname, search: search };
34
+ return {
35
+ internalPath: basePath + splitPath + search,
36
+ pAppCode: pAppCode,
37
+ pathname: pathname,
38
+ search: search
39
+ };
49
40
  }
50
41
  exports.default = InternalLinkMenuItemNav;
@@ -5,21 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var jsx_runtime_1 = require("react/jsx-runtime");
7
7
  var react_1 = require("react");
8
- var react_router_dom_1 = require("react-router-dom");
9
8
  var Navigations_1 = require("../../../../../../common/components/Navigations");
10
9
  var DynamicDesktopNavBar_1 = require("../../../DynamicDesktopNavBar");
11
10
  var IconNav_1 = __importDefault(require("../../IconNav"));
12
11
  var ImageIconNav_1 = __importDefault(require("../../ImageIconNav"));
13
12
  function PAppMenuItemNav(_a) {
14
13
  var menu = _a.menu, showMenuAsIcon = _a.showMenuAsIcon, _b = _a.isContextMenu, isContextMenu = _b === void 0 ? false : _b;
15
- var _c = (0, react_1.useContext)(DynamicDesktopNavBar_1.BasePathContext), basePath = _c.basePath, activeMode = _c.activeMode;
16
- var activeMatch = (0, react_router_dom_1.useRouteMatch)("".concat(basePath, "/:activeKey"));
17
- var isActive = (0, react_1.useMemo)(function () {
18
- if (activeMode === 'BY_CLICK') {
19
- return false;
20
- }
21
- return (activeMatch === null || activeMatch === void 0 ? void 0 : activeMatch.params.activeKey) === menu.pAppCode;
22
- }, [activeMode, menu, activeMatch]);
14
+ var basePath = (0, react_1.useContext)(DynamicDesktopNavBar_1.BasePathContext).basePath;
23
15
  if (showMenuAsIcon) {
24
16
  if (menu.iconSrc) {
25
17
  return ((0, jsx_runtime_1.jsx)(ImageIconNav_1.default, { to: "".concat(basePath, "/").concat(menu.pAppCode), iconSrc: menu.iconSrc, openNewTab: false }));
@@ -28,6 +20,6 @@ function PAppMenuItemNav(_a) {
28
20
  return ((0, jsx_runtime_1.jsx)(IconNav_1.default, { to: "".concat(basePath, "/").concat(menu.pAppCode), iconName: menu.iconName, openNewTab: false }));
29
21
  }
30
22
  }
31
- return isContextMenu ? ((0, jsx_runtime_1.jsx)(Navigations_1.ContextTextLabelNav, { preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/").concat(menu.pAppCode), text: menu.name })) : ((0, jsx_runtime_1.jsx)(Navigations_1.TextLabelNav, { isActive: isActive, preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/").concat(menu.pAppCode), text: menu.name }));
23
+ return isContextMenu ? ((0, jsx_runtime_1.jsx)(Navigations_1.ContextTextLabelNav, { preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/").concat(menu.pAppCode), text: menu.name })) : ((0, jsx_runtime_1.jsx)(Navigations_1.TextLabelNav, { preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/").concat(menu.pAppCode), text: menu.name }));
32
24
  }
33
25
  exports.default = PAppMenuItemNav;
@@ -5,21 +5,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  var jsx_runtime_1 = require("react/jsx-runtime");
7
7
  var react_1 = require("react");
8
- var react_router_dom_1 = require("react-router-dom");
9
8
  var Navigations_1 = require("../../../../../../common/components/Navigations");
10
9
  var DynamicDesktopNavBar_1 = require("../../../DynamicDesktopNavBar");
11
10
  var IconNav_1 = __importDefault(require("../../IconNav"));
12
11
  var ImageIconNav_1 = __importDefault(require("../../ImageIconNav"));
13
12
  function PageMenuItemNav(_a) {
14
13
  var menu = _a.menu, showMenuAsIcon = _a.showMenuAsIcon, _b = _a.isContextMenu, isContextMenu = _b === void 0 ? false : _b;
15
- var _c = (0, react_1.useContext)(DynamicDesktopNavBar_1.BasePathContext), basePath = _c.basePath, activeMode = _c.activeMode;
16
- var activeMatch = (0, react_router_dom_1.useRouteMatch)("".concat(basePath, "/pages/:activeKey"));
17
- var isActive = (0, react_1.useMemo)(function () {
18
- if (activeMode === 'BY_CLICK') {
19
- return false;
20
- }
21
- return (activeMatch === null || activeMatch === void 0 ? void 0 : activeMatch.params.activeKey) === menu.slug;
22
- }, [activeMode, menu, activeMatch]);
14
+ var basePath = (0, react_1.useContext)(DynamicDesktopNavBar_1.BasePathContext).basePath;
23
15
  if (showMenuAsIcon) {
24
16
  if (menu.iconSrc) {
25
17
  return ((0, jsx_runtime_1.jsx)(ImageIconNav_1.default, { to: "".concat(basePath, "/pages/").concat(menu.slug), iconSrc: menu.iconSrc, openNewTab: false }));
@@ -28,6 +20,6 @@ function PageMenuItemNav(_a) {
28
20
  return ((0, jsx_runtime_1.jsx)(IconNav_1.default, { to: "".concat(basePath, "/pages/").concat(menu.slug), iconName: menu.iconName, openNewTab: false }));
29
21
  }
30
22
  }
31
- return isContextMenu ? ((0, jsx_runtime_1.jsx)(Navigations_1.ContextTextLabelNav, { preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/pages/").concat(menu.slug), text: menu.name })) : ((0, jsx_runtime_1.jsx)(Navigations_1.TextLabelNav, { isActive: isActive, preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/pages/").concat(menu.slug), text: menu.name }));
23
+ return isContextMenu ? ((0, jsx_runtime_1.jsx)(Navigations_1.ContextTextLabelNav, { preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/pages/").concat(menu.slug), text: menu.name })) : ((0, jsx_runtime_1.jsx)(Navigations_1.TextLabelNav, { preventLineChange: true, openNewTab: false, to: "".concat(basePath, "/pages/").concat(menu.slug), text: menu.name }));
32
24
  }
33
25
  exports.default = PageMenuItemNav;
@@ -20,6 +20,7 @@ export type BasicListItemProps = {
20
20
  iBtn2IconFillType?: 'fill' | 'line';
21
21
  mBtnFillType?: 'fill' | 'line';
22
22
  mBtnText?: PDSTextType;
23
+ mBtnState?: 'normal' | 'disabled';
23
24
  dividerType?: 'none' | 'solid';
24
25
  titleFontWeight?: 'bold' | 'regular';
25
26
  checkboxId?: number | string;
@@ -47,5 +48,5 @@ export type StyleProps = {
47
48
  spacingMode?: 'none' | 'use';
48
49
  onlyLeftArea?: boolean;
49
50
  };
50
- declare function BasicListItem({ selectionMode, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickRadio, onClickSwitch, onClickIBtn1, onClickIBtn2, onClickMBtn }: BasicListItemProps): JSX.Element;
51
+ declare function BasicListItem({ selectionMode, titleText, titleTextColorTheme, descText, badgeMode, badgeStatus, imageIconMode, imageShapeType, imageSrc, iconName, iconFillType, displayType, captionText, iBtn1IconName, iBtn1IconFillType, iBtn2IconName, iBtn2IconFillType, mBtnFillType, mBtnText, mBtnState, dividerType, titleFontWeight, checkboxId, radioId, radioValue, switchName, switchState, switchStatus, spacingMode, onClick, onClickRadio, onClickSwitch, onClickIBtn1, onClickIBtn2, onClickMBtn }: BasicListItemProps): JSX.Element;
51
52
  export default BasicListItem;
@@ -25,7 +25,7 @@ var Contents_1 = __importDefault(require("./Contents"));
25
25
  var LeftBox_1 = require("./LeftBox");
26
26
  var RightBox_1 = require("./RightBox");
27
27
  function BasicListItem(_a) {
28
- var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, titleText = _a.titleText, _c = _a.titleTextColorTheme, titleTextColorTheme = _c === void 0 ? 'none' : _c, descText = _a.descText, _d = _a.badgeMode, badgeMode = _d === void 0 ? 'none' : _d, _e = _a.badgeStatus, badgeStatus = _e === void 0 ? 'inactive' : _e, _f = _a.imageIconMode, imageIconMode = _f === void 0 ? 'none' : _f, _g = _a.imageShapeType, imageShapeType = _g === void 0 ? 'round' : _g, imageSrc = _a.imageSrc, iconName = _a.iconName, _h = _a.iconFillType, iconFillType = _h === void 0 ? 'line' : _h, _j = _a.displayType, displayType = _j === void 0 ? 'none' : _j, captionText = _a.captionText, iBtn1IconName = _a.iBtn1IconName, _k = _a.iBtn1IconFillType, iBtn1IconFillType = _k === void 0 ? 'line' : _k, iBtn2IconName = _a.iBtn2IconName, _l = _a.iBtn2IconFillType, iBtn2IconFillType = _l === void 0 ? 'line' : _l, _m = _a.mBtnFillType, mBtnFillType = _m === void 0 ? 'fill' : _m, mBtnText = _a.mBtnText, _o = _a.dividerType, dividerType = _o === void 0 ? 'none' : _o, _p = _a.titleFontWeight, titleFontWeight = _p === void 0 ? 'regular' : _p, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _q = _a.switchState, switchState = _q === void 0 ? 'normal' : _q, _r = _a.switchStatus, switchStatus = _r === void 0 ? 'off' : _r, _s = _a.spacingMode, spacingMode = _s === void 0 ? 'use' : _s, onClick = _a.onClick, onClickRadio = _a.onClickRadio, onClickSwitch = _a.onClickSwitch, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onClickMBtn = _a.onClickMBtn;
28
+ var _b = _a.selectionMode, selectionMode = _b === void 0 ? 'none' : _b, titleText = _a.titleText, _c = _a.titleTextColorTheme, titleTextColorTheme = _c === void 0 ? 'none' : _c, descText = _a.descText, _d = _a.badgeMode, badgeMode = _d === void 0 ? 'none' : _d, _e = _a.badgeStatus, badgeStatus = _e === void 0 ? 'inactive' : _e, _f = _a.imageIconMode, imageIconMode = _f === void 0 ? 'none' : _f, _g = _a.imageShapeType, imageShapeType = _g === void 0 ? 'round' : _g, imageSrc = _a.imageSrc, iconName = _a.iconName, _h = _a.iconFillType, iconFillType = _h === void 0 ? 'line' : _h, _j = _a.displayType, displayType = _j === void 0 ? 'none' : _j, captionText = _a.captionText, iBtn1IconName = _a.iBtn1IconName, _k = _a.iBtn1IconFillType, iBtn1IconFillType = _k === void 0 ? 'line' : _k, iBtn2IconName = _a.iBtn2IconName, _l = _a.iBtn2IconFillType, iBtn2IconFillType = _l === void 0 ? 'line' : _l, _m = _a.mBtnFillType, mBtnFillType = _m === void 0 ? 'fill' : _m, mBtnText = _a.mBtnText, _o = _a.mBtnState, mBtnState = _o === void 0 ? 'normal' : _o, _p = _a.dividerType, dividerType = _p === void 0 ? 'none' : _p, _q = _a.titleFontWeight, titleFontWeight = _q === void 0 ? 'regular' : _q, checkboxId = _a.checkboxId, radioId = _a.radioId, radioValue = _a.radioValue, switchName = _a.switchName, _r = _a.switchState, switchState = _r === void 0 ? 'normal' : _r, _s = _a.switchStatus, switchStatus = _s === void 0 ? 'off' : _s, _t = _a.spacingMode, spacingMode = _t === void 0 ? 'use' : _t, onClick = _a.onClick, onClickRadio = _a.onClickRadio, onClickSwitch = _a.onClickSwitch, onClickIBtn1 = _a.onClickIBtn1, onClickIBtn2 = _a.onClickIBtn2, onClickMBtn = _a.onClickMBtn;
29
29
  var methods = (0, react_hook_form_1.useFormContext)();
30
30
  var isSelected = methods === null || methods === void 0 ? void 0 : methods.watch((checkboxId === null || checkboxId === void 0 ? void 0 : checkboxId.toString()) || '');
31
31
  var handleIBtn1Click = function (e) {
@@ -64,7 +64,7 @@ function BasicListItem(_a) {
64
64
  }
65
65
  }
66
66
  };
67
- return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", isSelected: isSelected, onClick: handleClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColorTheme === 'none' ? 'sysTextPrimary' : 'sysTextError', font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2 }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
67
+ return ((0, jsx_runtime_1.jsx)(S_BasicListItem, __assign({ "x-pds-name": "BasicListItem", "x-pds-element-type": "component", "x-pds-device-type": "mobile", isSelected: isSelected, onClick: handleClick, spacingMode: spacingMode }, { children: (0, jsx_runtime_1.jsxs)(S_BasicListItemBox, __assign({ imageIconMode: imageIconMode, captionText: captionText, spacingMode: spacingMode, dividerType: dividerType }, { children: [(0, jsx_runtime_1.jsxs)(LeftBox_1.LeftBox, __assign({ hasRightBox: displayType !== 'none' }, { children: [selectionMode === 'check' && checkboxId && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Checkbox, { id: checkboxId }), selectionMode === 'radio' && radioValue && radioId && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Radio, { id: radioId, value: radioValue, onChange: onClickRadio })), badgeMode === 'left' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Badge, { status: badgeStatus }), imageIconMode === 'image' && (0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Image, { src: imageSrc, shape: imageShapeType }), imageIconMode === 'icon' && ((0, jsx_runtime_1.jsx)(LeftBox_1.LeftBox.Icon, { name: iconName, fill: iconFillType === 'fill' })), (0, jsx_runtime_1.jsxs)(Contents_1.default, { children: [(0, jsx_runtime_1.jsx)(Contents_1.default.Title, { text: titleText, colorTheme: titleTextColorTheme === 'none' ? 'sysTextPrimary' : 'sysTextError', font: titleFontWeight === 'bold' ? 'body2Bold' : 'body2Regular' }), captionText && (0, jsx_runtime_1.jsx)(Contents_1.default.Caption, { text: captionText })] })] })), (0, jsx_runtime_1.jsxs)(RightBox_1.RightBox, __assign({ hasFixedHeight: displayType === 'text' }, { children: [(displayType === 'text' || displayType === 'ibtn_text') && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Description, { text: descText, icon: displayType === 'ibtn_text' ? ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })) : undefined })), displayType === 'ibtn_amount1' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })), displayType === 'ibtn_amount2' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn2IconName, fill: iBtn2IconFillType === 'fill', onClick: onClickIBtn2 }), (0, jsx_runtime_1.jsx)(RightBox_1.RightBox.IconButton, { iconName: iBtn1IconName, fill: iBtn1IconFillType === 'fill', onClick: handleIBtn1Click })] })), displayType === 'mbtn' && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.MainButton, { text: mBtnText, fill: mBtnFillType === 'fill', state: mBtnState, onClick: onClickMBtn })), displayType === 'switch' && switchName && ((0, jsx_runtime_1.jsx)(RightBox_1.RightBox.Switch, { name: switchName, state: switchState, status: switchStatus, onClick: onClickSwitch }))] }))] })) })));
68
68
  }
69
69
  var S_BasicListItem = styled_components_1.default.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"], ["\n align-items: center;\n background-color: ", ";\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n padding: ", ";\n"])), function (_a) {
70
70
  var theme = _a.theme, isSelected = _a.isSelected;
@@ -2,6 +2,7 @@
2
2
  import type { BasicListItemProps } from '../BasicListItem';
3
3
  export type MainButtonPropTypes = {
4
4
  text: BasicListItemProps['mBtnText'];
5
+ state: 'disabled' | 'normal';
5
6
  fill: boolean;
6
7
  onClick: BasicListItemProps['onClickMBtn'];
7
8
  };
@@ -4,7 +4,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
4
4
  var components_1 = require("../../../../hybrid/components");
5
5
  var MainButton_1 = require("../../MainButton");
6
6
  var MainButton = function (_a) {
7
- var text = _a.text, fill = _a.fill, onClick = _a.onClick;
8
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MainButton_1.MainButton, { text: text, fillType: fill ? 'fill' : 'line', size: "small", onClick: onClick }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_c", spacingType: "width" })] }));
7
+ var text = _a.text, state = _a.state, fill = _a.fill, onClick = _a.onClick;
8
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(MainButton_1.MainButton, { text: text, state: state, fillType: fill ? 'fill' : 'line', size: "small", onClick: onClick }), (0, jsx_runtime_1.jsx)(components_1.Spacing, { size: "spacing_c", spacingType: "width" })] }));
9
9
  };
10
10
  exports.default = MainButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pds-dev-kit-web",
3
- "version": "2.2.46",
3
+ "version": "2.2.48",
4
4
  "license": "MIT",
5
5
  "private": false,
6
6
  "main": "dist/index.js",
package/release-note.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # PDS-DEV-KIT-WEB Release Notes
2
- ## [v2.2.46]
2
+ ## [v2.2.48]
3
3
  ## daily|https://design.storybook.publ.biz/
4
4
 
5
+ ### Component
6
+ * BasicListItem
7
+ * mBtnState prop 추가
5
8
  ### Color
6
- * 컬러 키 값 24.01.29 1535분 기준 싱크
9
+ * 컬러 키 값 24.02.14 1628분 기준 싱크