linear-react-components-ui 2.0.0-rc.5 → 2.0.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.
- package/lib/menus/float/SubMenuContainer.d.ts +10 -28
- package/lib/menus/float/SubMenuContainer.js +97 -83
- package/lib/menus/float/SubMenuContainer.js.map +1 -1
- package/lib/tooltip/useTooltip.d.ts +1 -0
- package/lib/tooltip/useTooltip.js +2 -1
- package/lib/tooltip/useTooltip.js.map +1 -1
- package/package.json +1 -1
- package/lib/_virtual/index.js +0 -8
- package/lib/_virtual/index.js.map +0 -1
- package/lib/_virtual/index2.js +0 -5
- package/lib/_virtual/index2.js.map +0 -1
- package/lib/_virtual/index3.js +0 -5
- package/lib/_virtual/index3.js.map +0 -1
- package/lib/_virtual/react-is.development.js +0 -5
- package/lib/_virtual/react-is.development.js.map +0 -1
- package/lib/_virtual/react-is.production.min.js +0 -5
- package/lib/_virtual/react-is.production.min.js.map +0 -1
- package/lib/node_modules/object-assign/index.js +0 -79
- package/lib/node_modules/object-assign/index.js.map +0 -1
- package/lib/node_modules/prop-types/checkPropTypes.js +0 -69
- package/lib/node_modules/prop-types/checkPropTypes.js.map +0 -1
- package/lib/node_modules/prop-types/factoryWithThrowingShims.js +0 -59
- package/lib/node_modules/prop-types/factoryWithThrowingShims.js.map +0 -1
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js +0 -452
- package/lib/node_modules/prop-types/factoryWithTypeCheckers.js.map +0 -1
- package/lib/node_modules/prop-types/index.js +0 -21
- package/lib/node_modules/prop-types/index.js.map +0 -1
- package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -13
- package/lib/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +0 -1
- package/lib/node_modules/prop-types/lib/has.js +0 -12
- package/lib/node_modules/prop-types/lib/has.js.map +0 -1
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -166
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +0 -1
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -107
- package/lib/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
- package/lib/node_modules/prop-types/node_modules/react-is/index.js +0 -18
- package/lib/node_modules/prop-types/node_modules/react-is/index.js.map +0 -1
|
@@ -1,29 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
title
|
|
4
|
-
customClass
|
|
5
|
-
handlerGoBack:
|
|
6
|
-
skeletonize
|
|
7
|
-
skeletonQtty
|
|
8
|
-
children:
|
|
9
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare namespace SubMenuContainer {
|
|
11
|
-
namespace propTypes {
|
|
12
|
-
let children: any;
|
|
13
|
-
let handlerGoBack: any;
|
|
14
|
-
let title: any;
|
|
15
|
-
let customClass: any;
|
|
16
|
-
let skeletonize: any;
|
|
17
|
-
let skeletonQtty: any;
|
|
18
|
-
}
|
|
19
|
-
namespace defaultProps {
|
|
20
|
-
let title_1: undefined;
|
|
21
|
-
export { title_1 as title };
|
|
22
|
-
let customClass_1: undefined;
|
|
23
|
-
export { customClass_1 as customClass };
|
|
24
|
-
let skeletonize_1: boolean;
|
|
25
|
-
export { skeletonize_1 as skeletonize };
|
|
26
|
-
let skeletonQtty_1: number;
|
|
27
|
-
export { skeletonQtty_1 as skeletonQtty };
|
|
28
|
-
}
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface SubMenuContainerProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
customClass?: string;
|
|
5
|
+
handlerGoBack: () => void;
|
|
6
|
+
skeletonize?: boolean;
|
|
7
|
+
skeletonQtty?: number;
|
|
8
|
+
children: ReactNode;
|
|
29
9
|
}
|
|
10
|
+
declare const SubMenuContainer: ({ title, customClass, handlerGoBack, skeletonize, skeletonQtty, children, }: SubMenuContainerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export default SubMenuContainer;
|
|
@@ -1,138 +1,152 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c as compilerRuntimeExports } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { useEffect } from "react";
|
|
4
|
-
import PropTypes from "../../_virtual/index.js";
|
|
5
4
|
import Icon from "../../icons/index.js";
|
|
6
5
|
import Skeleton from "../../skeleton/index.js";
|
|
7
6
|
import SkeletonContainer from "../../skeleton/SkeletonContainer.js";
|
|
8
|
-
const
|
|
7
|
+
const SubMenuContent = (t0) => {
|
|
8
|
+
const $ = compilerRuntimeExports.c(5);
|
|
9
|
+
const {
|
|
10
|
+
children,
|
|
11
|
+
skeletonize,
|
|
12
|
+
skeletonQtty
|
|
13
|
+
} = t0;
|
|
9
14
|
if (skeletonize && skeletonQtty) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
15
|
+
let t1;
|
|
16
|
+
if ($[0] !== skeletonQtty) {
|
|
17
|
+
t1 = Array.from({
|
|
18
|
+
length: skeletonQtty
|
|
19
|
+
}, _temp);
|
|
20
|
+
$[0] = skeletonQtty;
|
|
21
|
+
$[1] = t1;
|
|
22
|
+
} else {
|
|
23
|
+
t1 = $[1];
|
|
24
|
+
}
|
|
25
|
+
const skeletons = t1;
|
|
26
|
+
let t2;
|
|
27
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
28
|
+
t2 = {
|
|
29
|
+
flexDirection: "row",
|
|
30
|
+
flexFlow: "row wrap"
|
|
31
|
+
};
|
|
32
|
+
$[2] = t2;
|
|
33
|
+
} else {
|
|
34
|
+
t2 = $[2];
|
|
35
|
+
}
|
|
36
|
+
let t3;
|
|
37
|
+
if ($[3] !== skeletons) {
|
|
38
|
+
t3 = /* @__PURE__ */ jsx(SkeletonContainer, { style: t2, children: skeletons.map(_temp2) });
|
|
39
|
+
$[3] = skeletons;
|
|
40
|
+
$[4] = t3;
|
|
41
|
+
} else {
|
|
42
|
+
t3 = $[4];
|
|
43
|
+
}
|
|
44
|
+
return t3;
|
|
20
45
|
}
|
|
21
46
|
return children;
|
|
22
47
|
};
|
|
23
48
|
const SubMenuContainer = (t0) => {
|
|
24
|
-
const $ = compilerRuntimeExports.c(
|
|
49
|
+
const $ = compilerRuntimeExports.c(19);
|
|
25
50
|
const {
|
|
26
51
|
title,
|
|
27
52
|
customClass,
|
|
28
53
|
handlerGoBack,
|
|
29
|
-
skeletonize,
|
|
30
|
-
skeletonQtty,
|
|
54
|
+
skeletonize: t1,
|
|
55
|
+
skeletonQtty: t2,
|
|
31
56
|
children
|
|
32
57
|
} = t0;
|
|
33
|
-
|
|
58
|
+
const skeletonize = t1 === void 0 ? false : t1;
|
|
59
|
+
const skeletonQtty = t2 === void 0 ? 3 : t2;
|
|
60
|
+
let t3;
|
|
34
61
|
if ($[0] !== handlerGoBack) {
|
|
35
|
-
|
|
62
|
+
t3 = () => () => {
|
|
36
63
|
handlerGoBack();
|
|
37
64
|
};
|
|
38
65
|
$[0] = handlerGoBack;
|
|
39
|
-
$[1] =
|
|
66
|
+
$[1] = t3;
|
|
40
67
|
} else {
|
|
41
|
-
|
|
68
|
+
t3 = $[1];
|
|
42
69
|
}
|
|
43
|
-
let
|
|
70
|
+
let t4;
|
|
44
71
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
45
|
-
|
|
46
|
-
$[2] =
|
|
72
|
+
t4 = [];
|
|
73
|
+
$[2] = t4;
|
|
47
74
|
} else {
|
|
48
|
-
|
|
75
|
+
t4 = $[2];
|
|
49
76
|
}
|
|
50
|
-
useEffect(
|
|
51
|
-
const
|
|
52
|
-
let
|
|
77
|
+
useEffect(t3, t4);
|
|
78
|
+
const t5 = `floatsubmenu ${customClass}`;
|
|
79
|
+
let t6;
|
|
53
80
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
54
|
-
|
|
81
|
+
t6 = {
|
|
55
82
|
cursor: "pointer"
|
|
56
83
|
};
|
|
57
|
-
$[3] =
|
|
84
|
+
$[3] = t6;
|
|
58
85
|
} else {
|
|
59
|
-
|
|
86
|
+
t6 = $[3];
|
|
60
87
|
}
|
|
61
|
-
let
|
|
88
|
+
let t7;
|
|
62
89
|
if ($[4] !== handlerGoBack) {
|
|
63
|
-
|
|
90
|
+
t7 = /* @__PURE__ */ jsx(Icon, { onClick: handlerGoBack, name: "arrowBack", pointerEvents: "all", style: t6 });
|
|
64
91
|
$[4] = handlerGoBack;
|
|
65
|
-
$[5] =
|
|
92
|
+
$[5] = t7;
|
|
66
93
|
} else {
|
|
67
|
-
|
|
94
|
+
t7 = $[5];
|
|
68
95
|
}
|
|
69
|
-
let
|
|
96
|
+
let t8;
|
|
70
97
|
if ($[6] !== title) {
|
|
71
|
-
|
|
98
|
+
t8 = title && /* @__PURE__ */ jsx("span", { children: title });
|
|
72
99
|
$[6] = title;
|
|
73
|
-
$[7] =
|
|
100
|
+
$[7] = t8;
|
|
74
101
|
} else {
|
|
75
|
-
|
|
102
|
+
t8 = $[7];
|
|
76
103
|
}
|
|
77
|
-
let
|
|
78
|
-
if ($[8] !==
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
104
|
+
let t9;
|
|
105
|
+
if ($[8] !== t7 || $[9] !== t8) {
|
|
106
|
+
t9 = /* @__PURE__ */ jsxs("div", { className: "submenuheader", children: [
|
|
107
|
+
t7,
|
|
108
|
+
t8
|
|
82
109
|
] });
|
|
83
|
-
$[8] =
|
|
84
|
-
$[9] =
|
|
85
|
-
$[10] =
|
|
110
|
+
$[8] = t7;
|
|
111
|
+
$[9] = t8;
|
|
112
|
+
$[10] = t9;
|
|
86
113
|
} else {
|
|
87
|
-
|
|
114
|
+
t9 = $[10];
|
|
88
115
|
}
|
|
89
|
-
let
|
|
116
|
+
let t10;
|
|
90
117
|
if ($[11] !== children || $[12] !== skeletonQtty || $[13] !== skeletonize) {
|
|
91
|
-
|
|
118
|
+
t10 = /* @__PURE__ */ jsx("div", { className: "submenucontent", children: /* @__PURE__ */ jsx(SubMenuContent, { skeletonize, skeletonQtty, children }) });
|
|
92
119
|
$[11] = children;
|
|
93
120
|
$[12] = skeletonQtty;
|
|
94
121
|
$[13] = skeletonize;
|
|
95
|
-
$[14] =
|
|
122
|
+
$[14] = t10;
|
|
96
123
|
} else {
|
|
97
|
-
|
|
124
|
+
t10 = $[14];
|
|
98
125
|
}
|
|
99
|
-
let
|
|
100
|
-
if ($[15] !==
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
} else {
|
|
105
|
-
t9 = $[16];
|
|
106
|
-
}
|
|
107
|
-
let t10;
|
|
108
|
-
if ($[17] !== t3 || $[18] !== t7 || $[19] !== t9) {
|
|
109
|
-
t10 = /* @__PURE__ */ jsxs("div", { className: t3, children: [
|
|
110
|
-
t7,
|
|
111
|
-
t9
|
|
126
|
+
let t11;
|
|
127
|
+
if ($[15] !== t10 || $[16] !== t5 || $[17] !== t9) {
|
|
128
|
+
t11 = /* @__PURE__ */ jsxs("div", { className: t5, children: [
|
|
129
|
+
t9,
|
|
130
|
+
t10
|
|
112
131
|
] });
|
|
113
|
-
$[
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
132
|
+
$[15] = t10;
|
|
133
|
+
$[16] = t5;
|
|
134
|
+
$[17] = t9;
|
|
135
|
+
$[18] = t11;
|
|
117
136
|
} else {
|
|
118
|
-
|
|
137
|
+
t11 = $[18];
|
|
119
138
|
}
|
|
120
|
-
return
|
|
121
|
-
};
|
|
122
|
-
SubMenuContainer.propTypes = {
|
|
123
|
-
children: PropTypes.node.isRequired,
|
|
124
|
-
handlerGoBack: PropTypes.func.isRequired,
|
|
125
|
-
title: PropTypes.string,
|
|
126
|
-
customClass: PropTypes.string,
|
|
127
|
-
skeletonize: PropTypes.bool,
|
|
128
|
-
skeletonQtty: PropTypes.number
|
|
129
|
-
};
|
|
130
|
-
SubMenuContainer.defaultProps = {
|
|
131
|
-
title: void 0,
|
|
132
|
-
customClass: void 0,
|
|
133
|
-
skeletonize: false,
|
|
134
|
-
skeletonQtty: 3
|
|
139
|
+
return t11;
|
|
135
140
|
};
|
|
141
|
+
function _temp(_, i) {
|
|
142
|
+
return i + 1;
|
|
143
|
+
}
|
|
144
|
+
function _temp2(id) {
|
|
145
|
+
return /* @__PURE__ */ jsx(Skeleton, { height: 88, width: 88, style: {
|
|
146
|
+
flexGrow: "unset",
|
|
147
|
+
marginBottom: 5
|
|
148
|
+
} }, id);
|
|
149
|
+
}
|
|
136
150
|
export {
|
|
137
151
|
SubMenuContainer as default
|
|
138
152
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SubMenuContainer.js","sources":["../../../src/lib/menus/float/SubMenuContainer.
|
|
1
|
+
{"version":3,"file":"SubMenuContainer.js","sources":["../../../src/lib/menus/float/SubMenuContainer.tsx"],"sourcesContent":["import { ReactNode, useEffect } from 'react';\nimport Icon from '../../icons';\nimport Skeleton, { SkeletonContainer } from '../../skeleton';\n\ninterface SubMenuContainerProps {\n title?: string;\n customClass?: string;\n handlerGoBack: () => void;\n skeletonize?: boolean;\n skeletonQtty?: number;\n children: ReactNode;\n}\n\nconst SubMenuContent = ({ \n children, skeletonize, skeletonQtty, \n}: { children: ReactNode; skeletonize: boolean; skeletonQtty: number }) => {\n if (skeletonize && skeletonQtty) {\n const skeletons = Array.from({ length: skeletonQtty }, (_, i) => i + 1);\n return (\n <SkeletonContainer style={{ flexDirection: 'row', flexFlow: 'row wrap' }}>\n {skeletons.map(id => (\n <Skeleton\n key={id}\n height={88}\n width={88}\n style={{\n flexGrow: 'unset',\n marginBottom: 5,\n }} />\n ))}\n </SkeletonContainer>\n );\n }\n\n return children;\n};\n\nconst SubMenuContainer = ({\n title, customClass, handlerGoBack, skeletonize = false, skeletonQtty = 3, children,\n}: SubMenuContainerProps) => {\n useEffect(() => () => {\n handlerGoBack();\n }, []);\n\n return (\n <div className={`floatsubmenu ${customClass}`}>\n <div className=\"submenuheader\">\n <Icon onClick={handlerGoBack} name=\"arrowBack\" pointerEvents=\"all\" style={{ cursor: 'pointer' }} />\n {title && <span>{title}</span>}\n </div>\n <div className=\"submenucontent\">\n <SubMenuContent skeletonize={skeletonize} skeletonQtty={skeletonQtty}>\n {children}\n </SubMenuContent>\n </div>\n </div>\n );\n};\n\nexport default SubMenuContainer;\n"],"names":["SubMenuContent","t0","$","_c","children","skeletonize","skeletonQtty","t1","Array","from","length","_temp","skeletons","t2","Symbol","for","flexDirection","flexFlow","t3","map","_temp2","SubMenuContainer","title","customClass","handlerGoBack","undefined","t4","useEffect","t5","t6","cursor","t7","t8","t9","t10","t11","_","i","id","flexGrow","marginBottom"],"mappings":";;;;;;AAaA,MAAMA,iBAAiBC,CAAAA,OAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,CAAA;AAAC,QAAA;AAAA,IAAAC;AAAAA,IAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAAAL;AAGtB,MAAII,eAAAC,cAA2B;AAAA,QAAAC;AAAA,QAAAL,SAAAI,cAAA;AACXC,WAAAC,MAAKC,KAAM;AAAA,QAAAC,QAAUJ;AAAAA,MAAAA,GAAgBK,KAAe;AAACT,aAAAI;AAAAJ,aAAAK;AAAAA,IAAA,OAAA;AAAAA,WAAAL,EAAA,CAAA;AAAA,IAAA;AAAvE,UAAAU,YAAkBL;AAAsD,QAAAM;AAAA,QAAAX,EAAA,CAAA,MAAAY,OAAAC,IAAA,2BAAA,GAAA;AAE5CF,WAAA;AAAA,QAAAG,eAAiB;AAAA,QAAKC,UAAY;AAAA,MAAA;AAAYf,aAAAW;AAAAA,IAAA,OAAA;AAAAA,WAAAX,EAAA,CAAA;AAAA,IAAA;AAAA,QAAAgB;AAAA,QAAAhB,SAAAU,WAAA;AAAxEM,+BAAC,mBAAA,EAAyB,OAAAL,IACvBD,UAAAA,UAASO,IAAKC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B,GAAAC,GAAA;AAAA,SAI8CA,IAAI;AAAC;AAJnD,SAAAjB,OAAAkB,IAAA;AAAA,6BAQZ,UAAA,EAES,QAAA,IACD,WACA,OAAA;AAAA,IAAAC,UACK;AAAA,IAAOC,cACH;AAAA,EAAA,KALXF,EAMJ;AAAI;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTooltip.js","sources":["../../src/lib/tooltip/useTooltip.ts"],"sourcesContent":["import { RefObject, useEffect, useRef, useState } from 'react';\nimport { Position } from '../@types/Position';\n\nconst TOOLTIP_INITIAL_HEIGHT = 40;\n\ninterface UseTooltipProps {\n text?: string;\n width?: number | string;\n space?: number;\n position?: Exclude<Position, 'center'>;\n errorMessage?: string;\n targetRef: RefObject<HTMLElement | null>;\n onDeniedText?: string;\n}\n\nexport function useTooltip({\n targetRef, \n text,\n width: widthProp = 'auto', \n space = 0,\n position: positionProp = 'bottom',\n errorMessage,\n onDeniedText,\n}: UseTooltipProps) {\n const [stateTooltipPosition, setStateTooltipPosition] = useState(positionProp);\n const [tooltipStyle, setTooltipStyle] = useState('');\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipDimensions, setTooltipDimensions] = useState({\n width: widthProp,\n height: TOOLTIP_INITIAL_HEIGHT,\n });\n const targetElement = targetRef;\n const tooltipElement = useRef<HTMLElement | null>(null);\n\n const onMouseOver = (e: Event) => {\n if (targetElement.current && targetElement.current.contains(e.target as Node)) {\n setShowTooltip(true);\n } else setShowTooltip(false);\n };\n\n const onMouseOut = () => {\n setShowTooltip(false);\n };\n\n const onAnyScroll = () => {\n setShowTooltip(false);\n };\n\n useEffect(() => {\n if (text || onDeniedText) {\n if (errorMessage) {\n setShowTooltip(true);\n } else {\n setShowTooltip(false);\n document.addEventListener('mouseover', onMouseOver);\n document.addEventListener('scroll', onAnyScroll, true);\n \n if (targetElement && targetElement.current) {\n targetElement.current.addEventListener('mouseout', onMouseOut);\n }\n }\n }\n \n return () => {\n if (text || onDeniedText) {\n document.removeEventListener('mouseover', onMouseOver);\n document.removeEventListener('scroll', onAnyScroll, true);\n \n if (targetElement && targetElement.current) {\n targetElement.current.removeEventListener('mouseout', onMouseOut);\n }\n }\n };\n }, [errorMessage, text, onDeniedText]);\n\n useEffect(() => {\n if (targetElement.current && tooltipElement.current) {\n const { width, height } = tooltipDimensions;\n const targetDimensions = targetElement.current.getBoundingClientRect();\n const targetVerticalCenter = (targetDimensions.top + targetDimensions.bottom) / 2;\n const tooltipClientWidth = tooltipElement.current.clientWidth;\n let style = `width: ${typeof width === 'string' ? width : `${width}px`}`;\n let left = (targetDimensions.left + (targetDimensions.width / 2)) -\n (tooltipClientWidth / 2);\n left = Math.min(left, document.body.clientWidth - tooltipClientWidth - space);\n style += `; left: ${Math.max(space, left)}px`;\n\n switch (stateTooltipPosition) {\n case 'top':\n if (targetDimensions.top < height) {\n setStateTooltipPosition('bottom');\n } else {\n style += `; top: ${targetDimensions.top + window.scrollY - height - space - 5}px`;\n }\n break;\n case 'bottom':\n if (window.innerHeight - targetDimensions.bottom < height) {\n setStateTooltipPosition('top');\n } else {\n style += `; top: ${targetDimensions.top + window.scrollY + targetDimensions.height + space + 5}px`;\n }\n break;\n case 'left':\n if (targetDimensions.left < tooltipClientWidth) {\n if (window.innerWidth - targetDimensions.right < tooltipClientWidth) {\n setStateTooltipPosition('bottom');\n } else {\n setStateTooltipPosition('right');\n }\n } else {\n style += `; top: ${(targetVerticalCenter + window.scrollY) - (height / 2)}px`;\n style += `; left: ${(targetDimensions.left - tooltipClientWidth) - 6 - space}px`;\n }\n break;\n case 'right':\n if (window.innerWidth - targetDimensions.right < tooltipClientWidth) {\n setStateTooltipPosition('left');\n } else {\n style += `; top: ${(targetVerticalCenter + window.scrollY) - (height / 2)}px`;\n style += `; left: ${targetDimensions.left + targetDimensions.width + 5 + space}px`;\n }\n break;\n default:\n style += '';\n }\n setTooltipStyle(style);\n }\n }, [tooltipDimensions, stateTooltipPosition]);\n\n useEffect(() => {\n if (targetElement.current && tooltipElement.current && showTooltip) {\n const targetRect = targetElement.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n const elementHorizontalPosition = targetRect.x;\n const widthElement = targetRect.width;\n const centerOfElement = elementHorizontalPosition + (widthElement / 2);\n\n requestAnimationFrame(() => {\n const tooltipRect = tooltipElement.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n const tooltipHorizontalPosition = tooltipRect.x;\n const widthTooltip = tooltipRect.width;\n const centerOfTooltip = tooltipHorizontalPosition + (widthTooltip / 2);\n \n const centerDifferenceBetweenElementAndTooltip = Number(\n (((centerOfElement - centerOfTooltip) / widthTooltip) * 100).toFixed(2),\n );\n \n const sumDifference = (0.5 + centerDifferenceBetweenElementAndTooltip / 100) * 100;\n tooltipElement.current?.style.setProperty('--arrow-position', `${sumDifference}%`);\n });\n }\n }, [showTooltip, tooltipElement.current, targetElement.current]);\n\n useEffect(() => {\n setStateTooltipPosition(positionProp);\n }, [window.scrollY, window.scrollX, window.innerWidth]);\n\n return {\n text: onDeniedText || text,\n tooltipRef: tooltipElement,\n style: tooltipStyle,\n className: stateTooltipPosition,\n handlerSetDimensions: setTooltipDimensions,\n tooltipDimensions: tooltipDimensions,\n showTooltip,\n };\n}\n"],"names":["TOOLTIP_INITIAL_HEIGHT","useTooltip","targetRef","text","width","widthProp","space","position","positionProp","errorMessage","onDeniedText","stateTooltipPosition","setStateTooltipPosition","useState","tooltipStyle","setTooltipStyle","showTooltip","setShowTooltip","tooltipDimensions","setTooltipDimensions","height","targetElement","tooltipElement","useRef","onMouseOver","e","current","contains","target","onMouseOut","onAnyScroll","useEffect","document","addEventListener","removeEventListener","targetDimensions","getBoundingClientRect","targetVerticalCenter","top","bottom","tooltipClientWidth","clientWidth","style","left","Math","min","body","max","window","scrollY","innerHeight","innerWidth","right","targetRect","x","elementHorizontalPosition","widthElement","centerOfElement","requestAnimationFrame","tooltipRect","tooltipHorizontalPosition","widthTooltip","centerOfTooltip","centerDifferenceBetweenElementAndTooltip","Number","to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kBAAkBK,mBAAmBD,eAAgB,KAAKI,QAAQ,CAAC,CACxE;AAEA,cAAMC,iBAAiB,MAAMH,2CAA2C,OAAO;AAC/EzC,uBAAeI,SAASgB,MAAMyB,YAAY,oBAAoB,GAAGD,aAAa,GAAG;AAAA,MACnF,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAClD,aAAaM,eAAeI,SAASL,cAAcK,OAAO,CAAC;AAE/DK,YAAU,MAAM;AACdnB,4BAAwBJ,YAAY;AAAA,EACtC,GAAG,CAACwC,OAAOC,SAASD,OAAOoB,SAASpB,OAAOG,UAAU,CAAC;AAEtD,SAAO;AAAA,IACLhD,MAAMO,gBAAgBP;AAAAA,IACtBkE,YAAY/C;AAAAA,IACZoB,OAAO5B;AAAAA,IACPwD,WAAW3D;AAAAA,IACX4D,sBAAsBpD;AAAAA,IACtBD;AAAAA,IACAF;AAAAA,EAAAA;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"useTooltip.js","sources":["../../src/lib/tooltip/useTooltip.ts"],"sourcesContent":["import { RefObject, useEffect, useRef, useState } from 'react';\nimport { Position } from '../@types/Position';\n\nconst TOOLTIP_INITIAL_HEIGHT = 40;\n\ninterface UseTooltipProps {\n text?: string;\n width?: number | string;\n space?: number;\n position?: Exclude<Position, 'center'>;\n errorMessage?: string;\n targetRef: RefObject<HTMLElement | null>;\n onDeniedText?: string;\n}\n\nexport function useTooltip({\n targetRef, \n text,\n width: widthProp = 'auto', \n space = 0,\n position: positionProp = 'bottom',\n errorMessage,\n onDeniedText,\n}: UseTooltipProps) {\n const [stateTooltipPosition, setStateTooltipPosition] = useState(positionProp);\n const [tooltipStyle, setTooltipStyle] = useState('');\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipDimensions, setTooltipDimensions] = useState({\n width: widthProp,\n height: TOOLTIP_INITIAL_HEIGHT,\n });\n const targetElement = targetRef;\n const tooltipElement = useRef<HTMLElement | null>(null);\n\n const onMouseOver = (e: Event) => {\n if (targetElement.current && targetElement.current.contains(e.target as Node)) {\n setShowTooltip(true);\n } else setShowTooltip(false);\n };\n\n const onMouseOut = () => {\n setShowTooltip(false);\n };\n\n const onAnyScroll = () => {\n setShowTooltip(false);\n };\n\n useEffect(() => {\n if (text || onDeniedText) {\n if (errorMessage) {\n setShowTooltip(true);\n } else {\n setShowTooltip(false);\n document.addEventListener('mouseover', onMouseOver);\n document.addEventListener('scroll', onAnyScroll, true);\n \n if (targetElement && targetElement.current) {\n targetElement.current.addEventListener('mouseout', onMouseOut);\n }\n }\n }\n \n return () => {\n if (text || onDeniedText) {\n document.removeEventListener('mouseover', onMouseOver);\n document.removeEventListener('scroll', onAnyScroll, true);\n \n if (targetElement && targetElement.current) {\n targetElement.current.removeEventListener('mouseout', onMouseOut);\n }\n }\n };\n }, [errorMessage, text, onDeniedText]);\n\n useEffect(() => {\n if (targetElement.current && tooltipElement.current) {\n const { width, height } = tooltipDimensions;\n const targetDimensions = targetElement.current.getBoundingClientRect();\n const targetVerticalCenter = (targetDimensions.top + targetDimensions.bottom) / 2;\n const tooltipClientWidth = tooltipElement.current.clientWidth;\n let style = `width: ${typeof width === 'string' ? width : `${width}px`}`;\n let left = (targetDimensions.left + (targetDimensions.width / 2)) -\n (tooltipClientWidth / 2);\n left = Math.min(left, document.body.clientWidth - tooltipClientWidth - space);\n style += `; left: ${Math.max(space, left)}px`;\n\n switch (stateTooltipPosition) {\n case 'top':\n if (targetDimensions.top < height) {\n setStateTooltipPosition('bottom');\n } else {\n style += `; top: ${targetDimensions.top + window.scrollY - height - space - 5}px`;\n }\n break;\n case 'bottom':\n if (window.innerHeight - targetDimensions.bottom < height) {\n setStateTooltipPosition('top');\n } else {\n style += `; top: ${targetDimensions.top + window.scrollY + targetDimensions.height + space + 5}px`;\n }\n break;\n case 'left':\n if (targetDimensions.left < tooltipClientWidth) {\n if (window.innerWidth - targetDimensions.right < tooltipClientWidth) {\n setStateTooltipPosition('bottom');\n } else {\n setStateTooltipPosition('right');\n }\n } else {\n style += `; top: ${(targetVerticalCenter + window.scrollY) - (height / 2)}px`;\n style += `; left: ${(targetDimensions.left - tooltipClientWidth) - 6 - space}px`;\n }\n break;\n case 'right':\n if (window.innerWidth - targetDimensions.right < tooltipClientWidth) {\n setStateTooltipPosition('left');\n } else {\n style += `; top: ${(targetVerticalCenter + window.scrollY) - (height / 2)}px`;\n style += `; left: ${targetDimensions.left + targetDimensions.width + 5 + space}px`;\n }\n break;\n default:\n style += '';\n }\n setTooltipStyle(style);\n }\n }, [tooltipDimensions, stateTooltipPosition]);\n\n useEffect(() => {\n if (targetElement.current && tooltipElement.current && showTooltip) {\n const targetRect = targetElement.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n const elementHorizontalPosition = targetRect.x;\n const widthElement = targetRect.width;\n const centerOfElement = elementHorizontalPosition + (widthElement / 2);\n\n requestAnimationFrame(() => {\n const tooltipRect = tooltipElement.current?.getBoundingClientRect() ?? { x: 0, width: 0 };\n const tooltipHorizontalPosition = tooltipRect.x;\n const widthTooltip = tooltipRect.width;\n const centerOfTooltip = tooltipHorizontalPosition + (widthTooltip / 2);\n \n const centerDifferenceBetweenElementAndTooltip = Number(\n (((centerOfElement - centerOfTooltip) / widthTooltip) * 100).toFixed(2),\n );\n \n const sumDifference = (0.5 + centerDifferenceBetweenElementAndTooltip / 100) * 100;\n tooltipElement.current?.style.setProperty('--arrow-position', `${sumDifference}%`);\n });\n }\n }, [showTooltip, tooltipElement.current, targetElement.current]);\n\n useEffect(() => {\n setStateTooltipPosition(positionProp);\n }, [window.scrollY, window.scrollX, window.innerWidth]);\n\n return {\n text: onDeniedText || text,\n tooltipRef: tooltipElement,\n style: tooltipStyle,\n className: stateTooltipPosition,\n handlerSetDimensions: setTooltipDimensions,\n tooltipDimensions: tooltipDimensions,\n showTooltip,\n textError: errorMessage,\n };\n}\n"],"names":["TOOLTIP_INITIAL_HEIGHT","useTooltip","targetRef","text","width","widthProp","space","position","positionProp","errorMessage","onDeniedText","stateTooltipPosition","setStateTooltipPosition","useState","tooltipStyle","setTooltipStyle","showTooltip","setShowTooltip","tooltipDimensions","setTooltipDimensions","height","targetElement","tooltipElement","useRef","onMouseOver","e","current","contains","target","onMouseOut","onAnyScroll","useEffect","document","addEventListener","removeEventListener","targetDimensions","getBoundingClientRect","targetVerticalCenter","top","bottom","tooltipClientWidth","clientWidth","style","left","Math","min","body","max","window","scrollY","innerHeight","innerWidth","right","targetRect","x","elementHorizontalPosition","widthElement","centerOfElement","requestAnimationFrame","tooltipRect","tooltipHorizontalPosition","widthTooltip","centerOfTooltip","centerDifferenceBetweenElementAndTooltip","Number","toFixed","sumDifference","setProperty","scrollX","tooltipRef","className","handlerSetDimensions","textError"],"mappings":";AAGA,MAAMA,yBAAyB;AAYxB,SAASC,WAAW;AAAA,EACzBC;AAAAA,EACAC;AAAAA,EACAC,OAAOC,YAAY;AAAA,EACnBC,QAAQ;AAAA,EACRC,UAAUC,eAAe;AAAA,EACzBC;AAAAA,EACAC;AACe,GAAG;AAClB,QAAM,CAACC,sBAAsBC,uBAAuB,IAAIC,SAASL,YAAY;AAC7E,QAAM,CAACM,cAAcC,eAAe,IAAIF,SAAS,EAAE;AACnD,QAAM,CAACG,aAAaC,cAAc,IAAIJ,SAAS,KAAK;AACpD,QAAM,CAACK,mBAAmBC,oBAAoB,IAAIN,SAAS;AAAA,IACzDT,OAAOC;AAAAA,IACPe,QAAQpB;AAAAA,EAAAA,CACT;AACD,QAAMqB,gBAAgBnB;AACtB,QAAMoB,iBAAiBC,OAA2B,IAAI;AAEtD,QAAMC,cAAcA,CAACC,MAAa;AAChC,QAAIJ,cAAcK,WAAWL,cAAcK,QAAQC,SAASF,EAAEG,MAAc,GAAG;AAC7EX,qBAAe,IAAI;AAAA,IACrB,sBAAsB,KAAK;AAAA,EAC7B;AAEA,QAAMY,aAAaA,MAAM;AACvBZ,mBAAe,KAAK;AAAA,EACtB;AAEA,QAAMa,cAAcA,MAAM;AACxBb,mBAAe,KAAK;AAAA,EACtB;AAEAc,YAAU,MA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AAA,MAAA;AACpF,YAAMmD,4BAA4BF,WAAWC;AAC7C,YAAME,eAAeH,WAAWjD;AAChC,YAAMqD,kBAAkBF,4BAA6BC,eAAe;AAEpEE,4BAAsB,MAAM;AAC1B,cAAMC,cAAcrC,eAAeI,SAASU,sBAAAA,KAA2B;AAAA,UAAEkB,GAAG;AAAA,UAAGlD,OAAO;AAAA,QAAA;AACtF,cAAMwD,4BAA4BD,YAAYL;AAC9C,cAAMO,eAAeF,YAAYvD;AACjC,cAAM0D,kBAAkBF,4BAA6BC,eAAe;AAEpE,cAAME,2CAA2CC,SAC5CP,kBAAkBK,mBAAmBD,eAAgB,KAAKI,QAAQ,CAAC,CACxE;AAEA,cAAMC,iBAAiB,MAAMH,2CAA2C,OAAO;AAC/EzC,uBAAeI,SAASgB,MAAMyB,YAAY,oBAAoB,GAAGD,aAAa,GAAG;AAAA,MACnF,CAAC;AAAA,IACH;AAAA,EACF,GAAG,CAAClD,aAAaM,eAAeI,SAASL,cAAcK,OAAO,CAAC;AAE/DK,YAAU,MAAM;AACdnB,4BAAwBJ,YAAY;AAAA,EACtC,GAAG,CAACwC,OAAOC,SAASD,OAAOoB,SAASpB,OAAOG,UAAU,CAAC;AAEtD,SAAO;AAAA,IACLhD,MAAMO,gBAAgBP;AAAAA,IACtBkE,YAAY/C;AAAAA,IACZoB,OAAO5B;AAAAA,IACPwD,WAAW3D;AAAAA,IACX4D,sBAAsBpD;AAAAA,IACtBD;AAAAA,IACAF;AAAAA,IACAwD,WAAW/D;AAAAA,EAAAA;AAEf;"}
|
package/package.json
CHANGED
package/lib/_virtual/index.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
|
|
2
|
-
import { __require as requirePropTypes } from "../node_modules/prop-types/index.js";
|
|
3
|
-
var propTypesExports = /* @__PURE__ */ requirePropTypes();
|
|
4
|
-
const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
|
|
5
|
-
export {
|
|
6
|
-
PropTypes as default
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
package/lib/_virtual/index2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index2.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/lib/_virtual/index3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-is.development.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"react-is.production.min.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
object-assign
|
|
3
|
-
(c) Sindre Sorhus
|
|
4
|
-
@license MIT
|
|
5
|
-
*/
|
|
6
|
-
var objectAssign;
|
|
7
|
-
var hasRequiredObjectAssign;
|
|
8
|
-
function requireObjectAssign() {
|
|
9
|
-
if (hasRequiredObjectAssign) return objectAssign;
|
|
10
|
-
hasRequiredObjectAssign = 1;
|
|
11
|
-
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
12
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
13
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
14
|
-
function toObject(val) {
|
|
15
|
-
if (val === null || val === void 0) {
|
|
16
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
17
|
-
}
|
|
18
|
-
return Object(val);
|
|
19
|
-
}
|
|
20
|
-
function shouldUseNative() {
|
|
21
|
-
try {
|
|
22
|
-
if (!Object.assign) {
|
|
23
|
-
return false;
|
|
24
|
-
}
|
|
25
|
-
var test1 = new String("abc");
|
|
26
|
-
test1[5] = "de";
|
|
27
|
-
if (Object.getOwnPropertyNames(test1)[0] === "5") {
|
|
28
|
-
return false;
|
|
29
|
-
}
|
|
30
|
-
var test2 = {};
|
|
31
|
-
for (var i = 0; i < 10; i++) {
|
|
32
|
-
test2["_" + String.fromCharCode(i)] = i;
|
|
33
|
-
}
|
|
34
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
|
|
35
|
-
return test2[n];
|
|
36
|
-
});
|
|
37
|
-
if (order2.join("") !== "0123456789") {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
var test3 = {};
|
|
41
|
-
"abcdefghijklmnopqrst".split("").forEach(function(letter) {
|
|
42
|
-
test3[letter] = letter;
|
|
43
|
-
});
|
|
44
|
-
if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
return true;
|
|
48
|
-
} catch (err) {
|
|
49
|
-
return false;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
|
|
53
|
-
var from;
|
|
54
|
-
var to = toObject(target);
|
|
55
|
-
var symbols;
|
|
56
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
57
|
-
from = Object(arguments[s]);
|
|
58
|
-
for (var key in from) {
|
|
59
|
-
if (hasOwnProperty.call(from, key)) {
|
|
60
|
-
to[key] = from[key];
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
if (getOwnPropertySymbols) {
|
|
64
|
-
symbols = getOwnPropertySymbols(from);
|
|
65
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
66
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
67
|
-
to[symbols[i]] = from[symbols[i]];
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return to;
|
|
73
|
-
};
|
|
74
|
-
return objectAssign;
|
|
75
|
-
}
|
|
76
|
-
export {
|
|
77
|
-
requireObjectAssign as __require
|
|
78
|
-
};
|
|
79
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../node_modules/object-assign/index.js"],"sourcesContent":["/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n"],"names":[],"mappings":";;;;;;;;;;AAQA,MAAI,wBAAwB,OAAO;AACnC,MAAI,iBAAiB,OAAO,UAAU;AACtC,MAAI,mBAAmB,OAAO,UAAU;AAExC,WAAS,SAAS,KAAK;AACtB,QAAI,QAAQ,QAAQ,QAAQ,QAAW;AACtC,YAAM,IAAI,UAAU,uDAAuD;AAAA,IAC7E;AAEC,WAAO,OAAO,GAAG;AAAA,EAClB;AAEA,WAAS,kBAAkB;AAC1B,QAAI;AACH,UAAI,CAAC,OAAO,QAAQ;AACnB,eAAO;AAAA,MACV;AAKE,UAAI,QAAQ,IAAI,OAAO,KAAK;AAC5B,YAAM,CAAC,IAAI;AACX,UAAI,OAAO,oBAAoB,KAAK,EAAE,CAAC,MAAM,KAAK;AACjD,eAAO;AAAA,MACV;AAGE,UAAI,QAAQ,CAAA;AACZ,eAAS,IAAI,GAAG,IAAI,IAAI,KAAK;AAC5B,cAAM,MAAM,OAAO,aAAa,CAAC,CAAC,IAAI;AAAA,MACzC;AACE,UAAI,SAAS,OAAO,oBAAoB,KAAK,EAAE,IAAI,SAAU,GAAG;AAC/D,eAAO,MAAM,CAAC;AAAA,MACjB,CAAG;AACD,UAAI,OAAO,KAAK,EAAE,MAAM,cAAc;AACrC,eAAO;AAAA,MACV;AAGE,UAAI,QAAQ,CAAA;AACZ,6BAAuB,MAAM,EAAE,EAAE,QAAQ,SAAU,QAAQ;AAC1D,cAAM,MAAM,IAAI;AAAA,MACnB,CAAG;AACD,UAAI,OAAO,KAAK,OAAO,OAAO,CAAA,GAAI,KAAK,CAAC,EAAE,KAAK,EAAE,MAC/C,wBAAwB;AACzB,eAAO;AAAA,MACV;AAEE,aAAO;AAAA,IACT,SAAU,KAAK;AAEb,aAAO;AAAA,IACT;AAAA,EACA;AAEA,iBAAiB,gBAAe,IAAK,OAAO,SAAS,SAAU,QAAQ,QAAQ;AAC9E,QAAI;AACJ,QAAI,KAAK,SAAS,MAAM;AACxB,QAAI;AAEJ,aAAS,IAAI,GAAG,IAAI,UAAU,QAAQ,KAAK;AAC1C,aAAO,OAAO,UAAU,CAAC,CAAC;AAE1B,eAAS,OAAO,MAAM;AACrB,YAAI,eAAe,KAAK,MAAM,GAAG,GAAG;AACnC,aAAG,GAAG,IAAI,KAAK,GAAG;AAAA,QACtB;AAAA,MACA;AAEE,UAAI,uBAAuB;AAC1B,kBAAU,sBAAsB,IAAI;AACpC,iBAAS,IAAI,GAAG,IAAI,QAAQ,QAAQ,KAAK;AACxC,cAAI,iBAAiB,KAAK,MAAM,QAAQ,CAAC,CAAC,GAAG;AAC5C,eAAG,QAAQ,CAAC,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC;AAAA,UACrC;AAAA,QACA;AAAA,MACA;AAAA,IACA;AAEC,WAAO;AAAA,EACR;;;","x_google_ignoreList":[0]}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { __require as requireReactPropTypesSecret } from "./lib/ReactPropTypesSecret.js";
|
|
2
|
-
import { __require as requireHas } from "./lib/has.js";
|
|
3
|
-
var checkPropTypes_1;
|
|
4
|
-
var hasRequiredCheckPropTypes;
|
|
5
|
-
function requireCheckPropTypes() {
|
|
6
|
-
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
7
|
-
hasRequiredCheckPropTypes = 1;
|
|
8
|
-
var printWarning = function() {
|
|
9
|
-
};
|
|
10
|
-
if (process.env.NODE_ENV !== "production") {
|
|
11
|
-
var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
|
|
12
|
-
var loggedTypeFailures = {};
|
|
13
|
-
var has = /* @__PURE__ */ requireHas();
|
|
14
|
-
printWarning = function(text) {
|
|
15
|
-
var message = "Warning: " + text;
|
|
16
|
-
if (typeof console !== "undefined") {
|
|
17
|
-
console.error(message);
|
|
18
|
-
}
|
|
19
|
-
try {
|
|
20
|
-
throw new Error(message);
|
|
21
|
-
} catch (x) {
|
|
22
|
-
}
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
26
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27
|
-
for (var typeSpecName in typeSpecs) {
|
|
28
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
29
|
-
var error;
|
|
30
|
-
try {
|
|
31
|
-
if (typeof typeSpecs[typeSpecName] !== "function") {
|
|
32
|
-
var err = Error(
|
|
33
|
-
(componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
34
|
-
);
|
|
35
|
-
err.name = "Invariant Violation";
|
|
36
|
-
throw err;
|
|
37
|
-
}
|
|
38
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
39
|
-
} catch (ex) {
|
|
40
|
-
error = ex;
|
|
41
|
-
}
|
|
42
|
-
if (error && !(error instanceof Error)) {
|
|
43
|
-
printWarning(
|
|
44
|
-
(componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
48
|
-
loggedTypeFailures[error.message] = true;
|
|
49
|
-
var stack = getStack ? getStack() : "";
|
|
50
|
-
printWarning(
|
|
51
|
-
"Failed " + location + " type: " + error.message + (stack != null ? stack : "")
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
checkPropTypes.resetWarningCache = function() {
|
|
59
|
-
if (process.env.NODE_ENV !== "production") {
|
|
60
|
-
loggedTypeFailures = {};
|
|
61
|
-
}
|
|
62
|
-
};
|
|
63
|
-
checkPropTypes_1 = checkPropTypes;
|
|
64
|
-
return checkPropTypes_1;
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
requireCheckPropTypes as __require
|
|
68
|
-
};
|
|
69
|
-
//# sourceMappingURL=checkPropTypes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"checkPropTypes.js","sources":["../../../node_modules/prop-types/checkPropTypes.js"],"sourcesContent":["/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n var loggedTypeFailures = {};\n var has = require('./lib/has');\n\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) { /**/ }\n };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n if (process.env.NODE_ENV !== 'production') {\n for (var typeSpecName in typeSpecs) {\n if (has(typeSpecs, typeSpecName)) {\n var error;\n // Prop type validation may throw. In case they do, we don't want to\n // fail the render phase where it didn't fail before. So we log it.\n // After these have been cleaned up, we'll let them throw.\n try {\n // This is intentionally an invariant that gets caught. It's the same\n // behavior as without this statement except with a better message.\n if (typeof typeSpecs[typeSpecName] !== 'function') {\n var err = Error(\n (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n );\n err.name = 'Invariant Violation';\n throw err;\n }\n error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n } catch (ex) {\n error = ex;\n }\n if (error && !(error instanceof Error)) {\n printWarning(\n (componentName || 'React class') + ': type specification of ' +\n location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n 'You may have forgotten to pass an argument to the type checker ' +\n 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n 'shape all require an argument).'\n );\n }\n if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n // Only monitor this failure once because there tends to be a lot of the\n // same error.\n loggedTypeFailures[error.message] = true;\n\n var stack = getStack ? getStack() : '';\n\n printWarning(\n 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n );\n }\n }\n }\n }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n if (process.env.NODE_ENV !== 'production') {\n loggedTypeFailures = {};\n }\n}\n\nmodule.exports = checkPropTypes;\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;AASA,MAAI,eAAe,WAAW;AAAA,EAAA;AAE9B,MAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,QAAI,uBAAuBA,4CAAA;AAC3B,QAAI,qBAAqB,CAAA;AACzB,QAAI,MAAMC,2BAAA;AAEV,mBAAe,SAAS,MAAM;AAC5B,UAAI,UAAU,cAAc;AAC5B,UAAI,OAAO,YAAY,aAAa;AAClC,gBAAQ,MAAM,OAAO;AAAA,MAC3B;AACI,UAAI;AAIF,cAAM,IAAI,MAAM,OAAO;AAAA,MAC7B,SAAa,GAAG;AAAA,MAAA;AAAA,IAChB;AAAA,EACA;AAaA,WAAS,eAAe,WAAW,QAAQ,UAAU,eAAe,UAAU;AAC5E,QAAI,QAAQ,IAAI,aAAa,cAAc;AACzC,eAAS,gBAAgB,WAAW;AAClC,YAAI,IAAI,WAAW,YAAY,GAAG;AAChC,cAAI;AAIJ,cAAI;AAGF,gBAAI,OAAO,UAAU,YAAY,MAAM,YAAY;AACjD,kBAAI,MAAM;AAAA,iBACP,iBAAiB,iBAAiB,OAAO,WAAW,YAAY,eAAe,+FACC,OAAO,UAAU,YAAY,IAAI;AAAA;AAGpH,kBAAI,OAAO;AACX,oBAAM;AAAA,YAClB;AACU,oBAAQ,UAAU,YAAY,EAAE,QAAQ,cAAc,eAAe,UAAU,MAAM,oBAAoB;AAAA,UACnH,SAAiB,IAAI;AACX,oBAAQ;AAAA,UAClB;AACQ,cAAI,SAAS,EAAE,iBAAiB,QAAQ;AACtC;AAAA,eACG,iBAAiB,iBAAiB,6BACnC,WAAW,OAAO,eAAe,6FAC6B,OAAO,QAAQ;AAAA;UAKzF;AACQ,cAAI,iBAAiB,SAAS,EAAE,MAAM,WAAW,qBAAqB;AAGpE,+BAAmB,MAAM,OAAO,IAAI;A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