@reltio/components 1.4.1239 → 1.4.1242

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,13 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TooltipProps } from '@material-ui/core/Tooltip';
3
+ declare type Props = Omit<TooltipProps, 'title'> & {
4
+ pathToTitle?: string[];
5
+ title?: string;
6
+ };
7
+ declare const HierarchicalAttributeTooltip: ({ pathToTitle, children, ...tooltipProps }: Props) => JSX.Element;
1
8
  export default HierarchicalAttributeTooltip;
2
- declare function HierarchicalAttributeTooltip({ pathToTitle, children, ...tooltipProps }: {
3
- [x: string]: any;
4
- pathToTitle: any;
5
- children: any;
6
- }): JSX.Element;
7
- declare namespace HierarchicalAttributeTooltip {
8
- namespace propTypes {
9
- const pathToTitle: PropTypes.Validator<string[]>;
10
- const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- }
12
- }
13
- import PropTypes from "prop-types";
@@ -26,20 +26,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  };
27
27
  Object.defineProperty(exports, "__esModule", { value: true });
28
28
  var react_1 = __importDefault(require("react"));
29
- var prop_types_1 = __importDefault(require("prop-types"));
30
29
  var ramda_1 = require("ramda");
31
30
  var Tooltip_1 = __importDefault(require("@material-ui/core/Tooltip"));
32
31
  var styles_1 = require("./styles");
33
32
  var HierarchicalAttributeTooltip = function (_a) {
34
33
  var pathToTitle = _a.pathToTitle, children = _a.children, tooltipProps = __rest(_a, ["pathToTitle", "children"]);
35
34
  var styles = styles_1.useStyles();
36
- var tooltipContent = pathToTitle && pathToTitle.length ? (react_1.default.createElement("div", { className: styles.tooltipContent },
35
+ var tooltipContent = (pathToTitle === null || pathToTitle === void 0 ? void 0 : pathToTitle.length) ? (react_1.default.createElement("div", { className: styles.tooltipContent },
37
36
  react_1.default.createElement("p", null, ramda_1.last(pathToTitle)),
38
37
  pathToTitle.length > 2 && (react_1.default.createElement("ul", null, pathToTitle.map(function (label) { return (react_1.default.createElement("li", { key: label }, label)); }))))) : ('');
39
38
  return (react_1.default.createElement(Tooltip_1.default, __assign({ title: tooltipContent, disableFocusListener: true, classes: { tooltip: styles.tooltip } }, tooltipProps), children));
40
39
  };
41
- HierarchicalAttributeTooltip.propTypes = {
42
- pathToTitle: prop_types_1.default.arrayOf(prop_types_1.default.string).isRequired,
43
- children: prop_types_1.default.node
44
- };
45
40
  exports.default = HierarchicalAttributeTooltip;
@@ -1 +1 @@
1
- export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tooltip" | "tooltipContent">;
1
+ export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tooltip" | "tooltipContent">;
@@ -1,13 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { TooltipProps } from '@material-ui/core/Tooltip';
3
+ declare type Props = Omit<TooltipProps, 'title'> & {
4
+ pathToTitle?: string[];
5
+ title?: string;
6
+ };
7
+ declare const HierarchicalAttributeTooltip: ({ pathToTitle, children, ...tooltipProps }: Props) => JSX.Element;
1
8
  export default HierarchicalAttributeTooltip;
2
- declare function HierarchicalAttributeTooltip({ pathToTitle, children, ...tooltipProps }: {
3
- [x: string]: any;
4
- pathToTitle: any;
5
- children: any;
6
- }): JSX.Element;
7
- declare namespace HierarchicalAttributeTooltip {
8
- namespace propTypes {
9
- const pathToTitle: PropTypes.Validator<string[]>;
10
- const children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
11
- }
12
- }
13
- import PropTypes from "prop-types";
@@ -21,20 +21,15 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import React from 'react';
24
- import PropTypes from 'prop-types';
25
24
  import { last } from 'ramda';
26
25
  import Tooltip from '@material-ui/core/Tooltip';
27
26
  import { useStyles } from './styles';
28
27
  var HierarchicalAttributeTooltip = function (_a) {
29
28
  var pathToTitle = _a.pathToTitle, children = _a.children, tooltipProps = __rest(_a, ["pathToTitle", "children"]);
30
29
  var styles = useStyles();
31
- var tooltipContent = pathToTitle && pathToTitle.length ? (React.createElement("div", { className: styles.tooltipContent },
30
+ var tooltipContent = (pathToTitle === null || pathToTitle === void 0 ? void 0 : pathToTitle.length) ? (React.createElement("div", { className: styles.tooltipContent },
32
31
  React.createElement("p", null, last(pathToTitle)),
33
32
  pathToTitle.length > 2 && (React.createElement("ul", null, pathToTitle.map(function (label) { return (React.createElement("li", { key: label }, label)); }))))) : ('');
34
33
  return (React.createElement(Tooltip, __assign({ title: tooltipContent, disableFocusListener: true, classes: { tooltip: styles.tooltip } }, tooltipProps), children));
35
34
  };
36
- HierarchicalAttributeTooltip.propTypes = {
37
- pathToTitle: PropTypes.arrayOf(PropTypes.string).isRequired,
38
- children: PropTypes.node
39
- };
40
35
  export default HierarchicalAttributeTooltip;
@@ -1 +1 @@
1
- export const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tooltip" | "tooltipContent">;
1
+ export declare const useStyles: (props?: any) => import("@material-ui/core/styles/withStyles").ClassNameMap<"tooltip" | "tooltipContent">;
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@reltio/components",
3
- "version": "1.4.1239",
3
+ "version": "1.4.1242",
4
4
  "license": "SEE LICENSE IN LICENSE FILE",
5
5
  "main": "./cjs/index.js",
6
6
  "module": "./esm/index.js",
7
7
  "dependencies": {
8
8
  "@date-io/moment": "^1.3.5",
9
9
  "@react-google-maps/api": "2.7.0",
10
- "@reltio/mdm-module": "^1.4.1239",
11
- "@reltio/mdm-sdk": "^1.4.1239",
10
+ "@reltio/mdm-module": "^1.4.1242",
11
+ "@reltio/mdm-sdk": "^1.4.1242",
12
12
  "classnames": "^2.2.5",
13
13
  "d3-cloud": "^1.2.5",
14
14
  "d3-geo": "^2.0.1",