mod-arch-shared 1.18.0 → 1.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { type TooltipProps } from '@patternfly/react-core';
|
|
2
3
|
type TruncatedTextProps = {
|
|
3
4
|
maxLines: number;
|
|
4
5
|
content: React.ReactNode;
|
|
6
|
+
tooltipPosition?: TooltipProps['position'];
|
|
5
7
|
} & Omit<React.HTMLProps<HTMLSpanElement>, 'content'>;
|
|
6
8
|
declare const TruncatedText: React.FC<TruncatedTextProps>;
|
|
7
9
|
export default TruncatedText;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TruncatedText.d.ts","sourceRoot":"","sources":["../../components/TruncatedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TruncatedText.d.ts","sourceRoot":"","sources":["../../components/TruncatedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEpE,KAAK,kBAAkB,GAAG;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,eAAe,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;CAC5C,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,SAAS,CAAC,CAAC;AAEtD,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA8C/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Tooltip } from '@patternfly/react-core';
|
|
3
|
-
const TruncatedText = ({ maxLines, content, ...props }) => {
|
|
3
|
+
const TruncatedText = ({ maxLines, content, tooltipPosition, ...props }) => {
|
|
4
4
|
const outerElementRef = React.useRef(null);
|
|
5
5
|
const textElementRef = React.useRef(null);
|
|
6
6
|
const [isTruncated, setIsTruncated] = React.useState(false);
|
|
@@ -24,7 +24,7 @@ const TruncatedText = ({ maxLines, content, ...props }) => {
|
|
|
24
24
|
updateTruncation();
|
|
25
25
|
} },
|
|
26
26
|
React.createElement("span", { ref: textElementRef }, content)));
|
|
27
|
-
return (React.createElement(Tooltip, { hidden: !isTruncated ? true : undefined, content: content }, truncateBody));
|
|
27
|
+
return (React.createElement(Tooltip, { hidden: !isTruncated ? true : undefined, content: content, position: tooltipPosition }, truncateBody));
|
|
28
28
|
};
|
|
29
29
|
export default TruncatedText;
|
|
30
30
|
//# sourceMappingURL=TruncatedText.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TruncatedText.js","sourceRoot":"","sources":["../../components/TruncatedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,
|
|
1
|
+
{"version":3,"file":"TruncatedText.js","sourceRoot":"","sources":["../../components/TruncatedText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAqB,MAAM,wBAAwB,CAAC;AAQpE,MAAM,aAAa,GAAiC,CAAC,EACnD,QAAQ,EACR,OAAO,EACP,eAAe,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,eAAe,GAAG,KAAK,CAAC,MAAM,CAAc,IAAI,CAAC,CAAC;IACxD,MAAM,cAAc,GAAG,KAAK,CAAC,MAAM,CAAc,IAAI,CAAC,CAAC;IACvD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,KAAK,CAAC,CAAC;IAErE,MAAM,gBAAgB,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAC9C,IAAI,cAAc,CAAC,OAAO,IAAI,eAAe,CAAC,OAAO,EAAE,CAAC;YACtD,cAAc,CAAC,cAAc,CAAC,OAAO,CAAC,YAAY,GAAG,eAAe,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAC7F,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,YAAY,GAAG,CACnB,iCACM,KAAK,EACT,KAAK,EAAE;YACL,OAAO,EAAE,aAAa;YACtB,eAAe,EAAE,UAAU;YAC3B,YAAY,EAAE,UAAU;YACxB,QAAQ,EAAE,QAAQ;YAClB,eAAe,EAAE,QAAQ;YACzB,GAAG,CAAC,KAAK,CAAC,KAAK,IAAI,EAAE,CAAC;SACvB,EACD,GAAG,EAAE,eAAe,EACpB,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;YAClB,KAAK,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;YACxB,gBAAgB,EAAE,CAAC;QACrB,CAAC,EACD,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACb,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;YACnB,gBAAgB,EAAE,CAAC;QACrB,CAAC;QAED,8BAAM,GAAG,EAAE,cAAc,IAAG,OAAO,CAAQ,CACtC,CACR,CAAC;IAEF,OAAO,CACL,oBAAC,OAAO,IAAC,MAAM,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,eAAe,IAC1F,YAAY,CACL,CACX,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mod-arch-shared",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "Shared UI components and utilities for modular architecture micro-frontend projects",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"mod-arch-core": ">=1.
|
|
54
|
-
"mod-arch-kubeflow": ">=1.
|
|
53
|
+
"mod-arch-core": ">=1.20.0",
|
|
54
|
+
"mod-arch-kubeflow": ">=1.20.0",
|
|
55
55
|
"react": ">=16.8.0",
|
|
56
56
|
"react-dom": ">=16.8.0",
|
|
57
57
|
"react-router-dom": ">=6.4.0"
|
|
@@ -81,13 +81,13 @@
|
|
|
81
81
|
"npm-run-all2": "^7.0.1",
|
|
82
82
|
"react": "^18.3.1",
|
|
83
83
|
"react-dom": "^18.3.1",
|
|
84
|
-
"react-router-dom": "^6.
|
|
84
|
+
"react-router-dom": "^6.30.4",
|
|
85
85
|
"sass": "^1.83.0",
|
|
86
86
|
"ts-jest": "^29.2.6",
|
|
87
87
|
"tsc-alias": "^1.8.15",
|
|
88
88
|
"typescript": "^5.0.4",
|
|
89
|
-
"mod-arch-core": "1.
|
|
90
|
-
"mod-arch-kubeflow": "1.
|
|
89
|
+
"mod-arch-core": "1.20.0",
|
|
90
|
+
"mod-arch-kubeflow": "1.20.0"
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@patternfly/patternfly": "^6.4.0",
|