pds-dev-kit-web 1.4.16 → 1.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/InternalLinkMenuItemNav.d.ts +2 -2
- package/dist/src/desktop/components/DynamicDesktopNavBar/components/MenuItemNav/components/InternalLinkMenuItemNav.js +9 -7
- package/package.json +1 -1
- package/release-note.md +2 -2
- package/dist/src/desktop/panels/ContentSheet/ContentSheet.d.ts +0 -17
- package/dist/src/desktop/panels/ContentSheet/ContentSheet.js +0 -11
- package/dist/src/desktop/panels/ContentSheet/index.d.ts +0 -1
- package/dist/src/desktop/panels/ContentSheet/index.js +0 -8
|
@@ -8,5 +8,5 @@ declare type Props = {
|
|
|
8
8
|
showMenuAsIcon?: boolean;
|
|
9
9
|
isContextMenu?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare function
|
|
12
|
-
export default
|
|
11
|
+
declare function InternalLinkMenuItemNav({ menu, showMenuAsIcon, isContextMenu }: Props): JSX.Element;
|
|
12
|
+
export default InternalLinkMenuItemNav;
|
|
@@ -28,15 +28,15 @@ var Navigations_1 = require("../../../../../../common/components/Navigations");
|
|
|
28
28
|
var DynamicDesktopNavBar_1 = require("../../../DynamicDesktopNavBar");
|
|
29
29
|
var IconNav_1 = __importDefault(require("../../IconNav"));
|
|
30
30
|
var ImageIconNav_1 = __importDefault(require("../../ImageIconNav"));
|
|
31
|
-
function
|
|
31
|
+
function InternalLinkMenuItemNav(_a) {
|
|
32
32
|
var menu = _a.menu, showMenuAsIcon = _a.showMenuAsIcon, isContextMenu = _a.isContextMenu;
|
|
33
33
|
var basePath = (0, react_1.useContext)(DynamicDesktopNavBar_1.BasePathContext).basePath;
|
|
34
34
|
var match = (0, react_router_dom_1.useRouteMatch)("" + basePath);
|
|
35
35
|
var activeMatch = (0, react_router_dom_1.useRouteMatch)(basePath + "/:activeKey");
|
|
36
|
-
var
|
|
36
|
+
var _b = getInternalLink(basePath, menu.conversionLinkSrc), internalPath = _b.internalPath, pAppCode = _b.pAppCode;
|
|
37
37
|
var isActive = (0, react_1.useMemo)(function () {
|
|
38
|
-
return (activeMatch === null || activeMatch === void 0 ? void 0 : activeMatch.params.activeKey) ===
|
|
39
|
-
}, [
|
|
38
|
+
return (activeMatch === null || activeMatch === void 0 ? void 0 : activeMatch.params.activeKey) === pAppCode;
|
|
39
|
+
}, [match, activeMatch, pAppCode]);
|
|
40
40
|
if (showMenuAsIcon) {
|
|
41
41
|
if (menu.iconSrc) {
|
|
42
42
|
return react_1.default.createElement(ImageIconNav_1.default, { to: internalPath, iconSrc: menu.iconSrc, openNewTab: false });
|
|
@@ -49,7 +49,9 @@ function WebMenuItemNav(_a) {
|
|
|
49
49
|
}
|
|
50
50
|
function getInternalLink(basePath, url) {
|
|
51
51
|
var pathname = new URL(url).pathname;
|
|
52
|
-
var splitPath = pathname.split(basePath);
|
|
53
|
-
|
|
52
|
+
var splitPath = pathname.split(basePath).pop();
|
|
53
|
+
var PAPP_CODE_INDEX = 1;
|
|
54
|
+
var pAppCode = splitPath === null || splitPath === void 0 ? void 0 : splitPath.split('/')[PAPP_CODE_INDEX];
|
|
55
|
+
return { internalPath: basePath + splitPath, pAppCode: pAppCode };
|
|
54
56
|
}
|
|
55
|
-
exports.default =
|
|
57
|
+
exports.default = InternalLinkMenuItemNav;
|
package/package.json
CHANGED
package/release-note.md
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import { UiColors } from '../../../common';
|
|
3
|
-
export declare type Props = {
|
|
4
|
-
width: string;
|
|
5
|
-
height: string;
|
|
6
|
-
backgroundColor: 'transparent' | 'white' | 'black' | 'base1' | 'base2' | 'base3';
|
|
7
|
-
backgroundColorKey: UiColors;
|
|
8
|
-
borderMode: 'none' | 'use';
|
|
9
|
-
borderWidth: 1 | 2;
|
|
10
|
-
borderColor: 'grey' | 'blue' | 'green';
|
|
11
|
-
borderColorKey: UiColors;
|
|
12
|
-
shapeType: 'rectangle' | 'round';
|
|
13
|
-
radius: 8 | 16 | 24;
|
|
14
|
-
overrideCSS: CSSProperties;
|
|
15
|
-
};
|
|
16
|
-
declare function ContentSheet({ width, height, backgroundColor, backgroundColorKey, borderMode, borderColor, borderColorKey, shapeType, radius }: Props): JSX.Element;
|
|
17
|
-
export default ContentSheet;
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
var react_1 = __importDefault(require("react"));
|
|
7
|
-
function ContentSheet(_a) {
|
|
8
|
-
var width = _a.width, height = _a.height, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? 'base3' : _b, backgroundColorKey = _a.backgroundColorKey, _c = _a.borderMode, borderMode = _c === void 0 ? 'none' : _c, _d = _a.borderColor, borderColor = _d === void 0 ? 'grey' : _d, borderColorKey = _a.borderColorKey, _e = _a.shapeType, shapeType = _e === void 0 ? 'rectangle' : _e, _f = _a.radius, radius = _f === void 0 ? 24 : _f;
|
|
9
|
-
return react_1.default.createElement("div", null, "ContentSheet");
|
|
10
|
-
}
|
|
11
|
-
exports.default = ContentSheet;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default as ContentSheet } from './ContentSheet';
|
|
@@ -1,8 +0,0 @@
|
|
|
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.ContentSheet = void 0;
|
|
7
|
-
var ContentSheet_1 = require("./ContentSheet");
|
|
8
|
-
Object.defineProperty(exports, "ContentSheet", { enumerable: true, get: function () { return __importDefault(ContentSheet_1).default; } });
|