@elliemae/ds-truncated-tooltip-text 3.0.0-next.44 → 3.0.0-next.47
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/cjs/DSTruncatedTooltipText.js +9 -16
- package/dist/cjs/DSTruncatedTooltipText.js.map +1 -1
- package/dist/cjs/SimpleTruncatedTooltipText.js +9 -16
- package/dist/cjs/SimpleTruncatedTooltipText.js.map +1 -1
- package/dist/cjs/TooltipTextProvider.js +9 -16
- package/dist/cjs/TooltipTextProvider.js.map +1 -1
- package/dist/cjs/index.js +9 -16
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/truncateTextWithTooltip/DSTruncateTextWIthTooltipDatatestid.js +9 -16
- package/dist/cjs/truncateTextWithTooltip/DSTruncateTextWIthTooltipDatatestid.js.map +1 -1
- package/dist/cjs/truncateTextWithTooltip/DSTruncateTextWithTooltip.js +9 -16
- package/dist/cjs/truncateTextWithTooltip/DSTruncateTextWithTooltip.js.map +1 -1
- package/dist/cjs/truncateTextWithTooltip/defaultProps.js +9 -16
- package/dist/cjs/truncateTextWithTooltip/defaultProps.js.map +1 -1
- package/dist/cjs/truncateTextWithTooltip/index.js +12 -18
- package/dist/cjs/truncateTextWithTooltip/index.js.map +1 -1
- package/dist/cjs/truncateTextWithTooltip/propTypes.js +9 -16
- package/dist/cjs/truncateTextWithTooltip/propTypes.js.map +1 -1
- package/dist/cjs/truncateTextWithTooltip/styles.js +9 -16
- package/dist/cjs/truncateTextWithTooltip/styles.js.map +1 -1
- package/package.json +3 -3
@@ -18,7 +18,6 @@ var __spreadValues = (a, b) => {
|
|
18
18
|
}
|
19
19
|
return a;
|
20
20
|
};
|
21
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
22
21
|
var __objRest = (source, exclude) => {
|
23
22
|
var target = {};
|
24
23
|
for (var prop in source)
|
@@ -35,28 +34,23 @@ var __export = (target, all) => {
|
|
35
34
|
for (var name in all)
|
36
35
|
__defProp(target, name, { get: all[name], enumerable: true });
|
37
36
|
};
|
38
|
-
var
|
39
|
-
if (
|
40
|
-
for (let key of __getOwnPropNames(
|
41
|
-
if (!__hasOwnProp.call(
|
42
|
-
__defProp(
|
37
|
+
var __copyProps = (to, from, except, desc) => {
|
38
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
39
|
+
for (let key of __getOwnPropNames(from))
|
40
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
41
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
43
42
|
}
|
44
|
-
return
|
45
|
-
};
|
46
|
-
var __toESM = (module2, isNodeMode) => {
|
47
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
43
|
+
return to;
|
48
44
|
};
|
49
|
-
var
|
50
|
-
|
51
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
52
|
-
};
|
53
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
45
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
46
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
54
47
|
var DSTruncatedTooltipText_exports = {};
|
55
48
|
__export(DSTruncatedTooltipText_exports, {
|
56
49
|
DSTruncatedTooltipText: () => DSTruncatedTooltipText,
|
57
50
|
TruncatedTooltipTextWithSchema: () => TruncatedTooltipTextWithSchema,
|
58
51
|
default: () => DSTruncatedTooltipText_default
|
59
52
|
});
|
53
|
+
module.exports = __toCommonJS(DSTruncatedTooltipText_exports);
|
60
54
|
var React = __toESM(require("react"));
|
61
55
|
var import_react = __toESM(require("react"));
|
62
56
|
var import_react_desc = require("react-desc");
|
@@ -141,5 +135,4 @@ DSTruncatedTooltipText.propTypes = truncatedTooltipTextProps;
|
|
141
135
|
const TruncatedTooltipTextWithSchema = (0, import_react_desc.describe)(DSTruncatedTooltipText);
|
142
136
|
TruncatedTooltipTextWithSchema.propTypes = truncatedTooltipTextProps;
|
143
137
|
var DSTruncatedTooltipText_default = DSTruncatedTooltipText;
|
144
|
-
module.exports = __toCommonJS(DSTruncatedTooltipText_exports);
|
145
138
|
//# sourceMappingURL=DSTruncatedTooltipText.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/DSTruncatedTooltipText.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["import React, { useContext, useEffect } from 'react';\nimport { describe, PropTypes } from 'react-desc';\nimport styled from 'styled-components';\nimport { PopperPositions as positions } from '@elliemae/ds-popper';\nimport { TruncatedTooltipContext } from './TooltipTextProvider';\n\nconst isEllipsisActive = ({ offsetWidth, scrollWidth }) =>\n offsetWidth < scrollWidth;\n\n// reduce the possibility of error showing the tooltip (text-overflow: ellipsis) https://jira.elliemae.io/browse/PUI-1755\nconst Text = styled.span`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\nconst DSTruncatedTooltipText = ({\n containerProps = {},\n value = '',\n zIndex = 110, // https://jira.elliemae.io/browse/PUI-1755\n ...otherTextProps\n}) => {\n const tooltipContext = useContext(TruncatedTooltipContext);\n useEffect(() => {\n if (zIndex && tooltipContext) tooltipContext.setZIndex(zIndex);\n }, [zIndex]);\n\n if (!tooltipContext) return value;\n\n const { showTooltip, hideTooltip } = tooltipContext;\n\n const handleMouseEnter = (e) => {\n const { target } = e;\n if (target && isEllipsisActive(target, target.getBoundingClientRect())) {\n showTooltip(\n {\n value,\n reference: target,\n },\n e,\n );\n }\n };\n\n const handleMouseLeave = (e) => {\n hideTooltip({ reference: e.target });\n };\n\n const handlers = showTooltip\n ? { onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave }\n : {};\n return (\n <Text {...containerProps} {...otherTextProps} {...handlers}>\n {value}\n </Text>\n );\n};\n\nDSTruncatedTooltipText.defaultProps = {\n value: '',\n zIndex: 110,\n};\n\nconst truncatedTooltipTextProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).description(\n 'Text that when truncated will trigger the tooltip interaction',\n ),\n tooltipPlacement: PropTypes.oneOf([\n positions.AUTO_START,\n positions.AUTO_END,\n positions.AUTO,\n positions.TOP_START,\n positions.TOP,\n positions.TOP_END,\n positions.RIGHT_START,\n positions.RIGHT,\n positions.RIGHT_END,\n positions.BOTTOM_START,\n positions.BOTTOM,\n positions.BOTTOM_END,\n positions.LEFT_START,\n positions.LEFT,\n positions.LEFT_END,\n ]).description('Position of the tooltip'),\n tooltipDelay: PropTypes.number.description('Delay to show the tooltip'),\n zIndex: PropTypes.number\n .description('override default zIndex')\n .defaultValue(110),\n};\n\nDSTruncatedTooltipText.defaultProps = {\n containerProps: {},\n value: '',\n tooltipPlacement: undefined,\n tooltipDelay: undefined,\n};\n\nDSTruncatedTooltipText.propTypes = truncatedTooltipTextProps;\n\nconst TruncatedTooltipTextWithSchema = describe(DSTruncatedTooltipText);\nTruncatedTooltipTextWithSchema.propTypes = truncatedTooltipTextProps;\n\nexport { DSTruncatedTooltipText, TruncatedTooltipTextWithSchema };\nexport default DSTruncatedTooltipText;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA6C;AAC7C,wBAAoC;AACpC,+BAAmB;AACnB,uBAA6C;AAC7C,iCAAwC;AAExC,MAAM,mBAAmB,CAAC,EAAE,aAAa,kBACvC,cAAc;AAGhB,MAAM,OAAO,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQpB,MAAM,yBAAyB,CAAC,OAK1B;AAL0B,eAC9B;AAAA,qBAAiB,CAAC;AAAA,IAClB,QAAQ;AAAA,IACR,SAAS;AAAA,MAHqB,IAI3B,2BAJ2B,IAI3B;AAAA,IAHH;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM,iBAAiB,6BAAW,kDAAuB;AACzD,8BAAU,MAAM;AACd,QAAI,UAAU;AAAgB,qBAAe,UAAU,MAAM;AAAA,EAC/D,GAAG,CAAC,MAAM,CAAC;AAEX,MAAI,CAAC;AAAgB,WAAO;AAE5B,QAAM,EAAE,aAAa,gBAAgB;AAErC,QAAM,mBAAmB,CAAC,MAAM;AAC9B,UAAM,EAAE,WAAW;AACnB,QAAI,UAAU,iBAAiB,QAAQ,OAAO,sBAAsB,CAAC,GAAG;AACtE,kBACE;AAAA,QACE;AAAA,QACA,WAAW;AAAA,MACb,GACA,CACF;AAAA,IACF;AAAA,EACF;AAEA,QAAM,mBAAmB,CAAC,MAAM;AAC9B,gBAAY,EAAE,WAAW,EAAE,OAAO,CAAC;AAAA,EACrC;AAEA,QAAM,WAAW,cACb,EAAE,cAAc,kBAAkB,cAAc,iBAAiB,IACjE,CAAC;AACL,SACE,mDAAC,uDAAS,iBAAoB,iBAAoB,WAC/C,KACH;AAEJ;AAEA,uBAAuB,eAAe;AAAA,EACpC,OAAO;AAAA,EACP,QAAQ;AACV;AAEA,MAAM,4BAA4B;AAAA,EAChC,gBAAgB,4BAAU,OAAO,YAC/B,kDACF;AAAA,EACA,OAAO,4BAAU,UAAU,CAAC,4BAAU,QAAQ,4BAAU,MAAM,CAAC,EAAE,YAC/D,+DACF;AAAA,EACA,kBAAkB,4BAAU,MAAM;AAAA,IAChC,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,IACV,iCAAU;AAAA,EACZ,CAAC,EAAE,YAAY,yBAAyB;AAAA,EACxC,cAAc,4BAAU,OAAO,YAAY,2BAA2B;AAAA,EACtE,QAAQ,4BAAU,OACf,YAAY,yBAAyB,EACrC,aAAa,GAAG;AACrB;AAEA,uBAAuB,eAAe;AAAA,EACpC,gBAAgB,CAAC;AAAA,EACjB,OAAO;AAAA,EACP,kBAAkB;AAAA,EAClB,cAAc;AAChB;AAEA,uBAAuB,YAAY;AAEnC,MAAM,iCAAiC,gCAAS,sBAAsB;AACtE,+BAA+B,YAAY;AAG3C,IAAO,iCAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -21,32 +21,26 @@ var __spreadValues = (a, b) => {
|
|
21
21
|
return a;
|
22
22
|
};
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
25
24
|
var __export = (target, all) => {
|
26
25
|
for (var name in all)
|
27
26
|
__defProp(target, name, { get: all[name], enumerable: true });
|
28
27
|
};
|
29
|
-
var
|
30
|
-
if (
|
31
|
-
for (let key of __getOwnPropNames(
|
32
|
-
if (!__hasOwnProp.call(
|
33
|
-
__defProp(
|
28
|
+
var __copyProps = (to, from, except, desc) => {
|
29
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
30
|
+
for (let key of __getOwnPropNames(from))
|
31
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
32
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
34
33
|
}
|
35
|
-
return
|
34
|
+
return to;
|
36
35
|
};
|
37
|
-
var __toESM = (
|
38
|
-
|
39
|
-
};
|
40
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
41
|
-
return (module2, temp) => {
|
42
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
43
|
-
};
|
44
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
36
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
37
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
45
38
|
var SimpleTruncatedTooltipText_exports = {};
|
46
39
|
__export(SimpleTruncatedTooltipText_exports, {
|
47
40
|
SimpleTruncatedTooltipText: () => SimpleTruncatedTooltipText,
|
48
41
|
default: () => SimpleTruncatedTooltipText_default
|
49
42
|
});
|
43
|
+
module.exports = __toCommonJS(SimpleTruncatedTooltipText_exports);
|
50
44
|
var React = __toESM(require("react"));
|
51
45
|
var import_react = __toESM(require("react"));
|
52
46
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
@@ -147,5 +141,4 @@ SimpleTruncatedTooltipText.defaultProps = {
|
|
147
141
|
zIndex: 110
|
148
142
|
};
|
149
143
|
var SimpleTruncatedTooltipText_default = SimpleTruncatedTooltipText;
|
150
|
-
module.exports = __toCommonJS(SimpleTruncatedTooltipText_exports);
|
151
144
|
//# sourceMappingURL=SimpleTruncatedTooltipText.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/SimpleTruncatedTooltipText.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["/* eslint-disable max-lines */\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { useCancellableDelayedCallback } from '@elliemae/ds-utilities';\nimport PropTypes from 'prop-types';\nimport styled from 'styled-components';\nimport { DSPopover, PopperPositions as positions } from '@elliemae/ds-popover';\n\nconst dsTestId = 'DS-SimpleTruncateText';\n\nconst isEllipsisActive = ({ offsetWidth, scrollWidth }) => offsetWidth < scrollWidth;\n\nconst initialTooltipState = (value = '', options = {}) => ({\n reference: null,\n visible: false,\n value,\n options,\n});\n// reduce the possibility of error showing the tooltip(text-overflow: ellipsis) https://jira.elliemae.io/browse/PUI-1755\nconst Text = styled.span`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n`;\n\nconst SimpleTruncatedTooltipText = (props) => {\n const { containerProps, tooltipDelay, placement, value, zIndex, tooltipOptions, textOptions } = props;\n\n // not using \"usePopoverProviderState\" because usePopoverState has memory leak issues\n const [tooltipState, setTooltipState] = useState(initialTooltipState(value, tooltipOptions));\n const show = useCallback(\n (newState) => {\n setTooltipState({ ...tooltipState, ...newState, visible: true });\n },\n [tooltipState],\n );\n const hideTooltip = useCallback(\n (newState) => {\n setTooltipState({ ...tooltipState, ...newState, visible: false });\n },\n [tooltipState],\n );\n const [showTooltip, cancelShowTooltip] = useCancellableDelayedCallback(show, tooltipDelay);\n\n const handleMouseEnter = useCallback(\n (e) => {\n const { target } = e;\n // we search for the closest parent with data-testid matching this component\n // this is required because the target may not be this component itself\n // when the user gives JSX as a value.\n // JSX as a value is required for features like text highlight during research\n // wich would still allow the truncation behaviour (see tree view for example)\n // when the target has the test-id itself target===SimpleTruncatedTextEl\n const SimpleTruncatedTextEl = target.closest(`[data-testid=\"${dsTestId}\"]`);\n if (SimpleTruncatedTextEl && isEllipsisActive(SimpleTruncatedTextEl)) {\n showTooltip({ value, reference: SimpleTruncatedTextEl });\n }\n },\n [showTooltip, value],\n );\n\n const handleMouseLeave = useCallback(() => {\n cancelShowTooltip();\n hideTooltip({ reference: null });\n }, [hideTooltip, cancelShowTooltip]);\n\n const handlers = useMemo(() => {\n if (!showTooltip) return {};\n return {\n onMouseEnter: handleMouseEnter,\n onMouseLeave: handleMouseLeave,\n };\n }, [showTooltip, handleMouseEnter, handleMouseLeave]);\n\n const PurePopover = useMemo(\n () => (\n <>\n {tooltipState.visible ? (\n <DSPopover\n boundaries=\"window\"\n style={{ pointerEvents: 'none', zIndex }}\n placement={placement}\n content={tooltipState.value}\n referenceEl={tooltipState.reference}\n visible={tooltipState.visible}\n showArrow\n />\n ) : null}\n </>\n ),\n [tooltipState, placement, zIndex],\n );\n const PureText = useMemo(\n () => (\n <>\n <Text\n {...(containerProps && { ...containerProps })}\n {...(textOptions && { ...textOptions })}\n {...(handlers && { ...handlers })}\n data-testid={dsTestId} // this is used by mouse enter too. required to support value as JSX\n >\n {value}\n </Text>\n </>\n ),\n [containerProps, textOptions, handlers, value],\n );\n\n const PureSimpleTruncatedTooltipText = useMemo(\n () => (\n <>\n {PureText}\n {PurePopover}\n </>\n ),\n [PureText, PurePopover],\n );\n\n return PureSimpleTruncatedTooltipText;\n};\n\nSimpleTruncatedTooltipText.propTypes = {\n containerProps: PropTypes.object,\n tooltipOptions: PropTypes.object,\n textOptions: PropTypes.object,\n /** Text that when truncated will trigger the tooltip interaction */\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.node]),\n /** Position of the tooltip */\n placement: PropTypes.oneOf([\n positions.AUTO_START,\n positions.AUTO_END,\n positions.AUTO,\n positions.TOP_START,\n positions.TOP,\n positions.TOP_END,\n positions.RIGHT_START,\n positions.RIGHT,\n positions.RIGHT_END,\n positions.BOTTOM_START,\n positions.BOTTOM,\n positions.BOTTOM_END,\n positions.LEFT_START,\n positions.LEFT,\n positions.LEFT_END,\n ]),\n /** Delay to show the tooltip */\n tooltipDelay: PropTypes.number,\n /** override default zIndex */\n zIndex: PropTypes.number,\n};\n\nSimpleTruncatedTooltipText.defaultProps = {\n containerProps: {},\n tooltipOptions: {},\n textOptions: {},\n value: '',\n placement: positions.TOP,\n tooltipDelay: 200,\n zIndex: 110,\n};\n\nexport { SimpleTruncatedTooltipText };\nexport default SimpleTruncatedTooltipText;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": "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",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -21,7 +21,6 @@ var __spreadValues = (a, b) => {
|
|
21
21
|
return a;
|
22
22
|
};
|
23
23
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
24
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
25
24
|
var __objRest = (source, exclude) => {
|
26
25
|
var target = {};
|
27
26
|
for (var prop in source)
|
@@ -38,28 +37,23 @@ var __export = (target, all) => {
|
|
38
37
|
for (var name in all)
|
39
38
|
__defProp(target, name, { get: all[name], enumerable: true });
|
40
39
|
};
|
41
|
-
var
|
42
|
-
if (
|
43
|
-
for (let key of __getOwnPropNames(
|
44
|
-
if (!__hasOwnProp.call(
|
45
|
-
__defProp(
|
40
|
+
var __copyProps = (to, from, except, desc) => {
|
41
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
42
|
+
for (let key of __getOwnPropNames(from))
|
43
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
44
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
46
45
|
}
|
47
|
-
return
|
48
|
-
};
|
49
|
-
var __toESM = (module2, isNodeMode) => {
|
50
|
-
return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
|
46
|
+
return to;
|
51
47
|
};
|
52
|
-
var
|
53
|
-
|
54
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
55
|
-
};
|
56
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
48
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
49
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
57
50
|
var TooltipTextProvider_exports = {};
|
58
51
|
__export(TooltipTextProvider_exports, {
|
59
52
|
TooltipTextProvider: () => TooltipTextProvider,
|
60
53
|
TruncatedTooltipContext: () => TruncatedTooltipContext,
|
61
54
|
default: () => TooltipTextProvider_default
|
62
55
|
});
|
56
|
+
module.exports = __toCommonJS(TooltipTextProvider_exports);
|
63
57
|
var React = __toESM(require("react"));
|
64
58
|
var import_react = __toESM(require("react"));
|
65
59
|
var import_ds_popover = require("@elliemae/ds-popover");
|
@@ -102,5 +96,4 @@ function TooltipTextProvider(_a) {
|
|
102
96
|
TooltipTextProvider.propTypes = {};
|
103
97
|
TooltipTextProvider.defaultProps = {};
|
104
98
|
var TooltipTextProvider_default = TooltipTextProvider;
|
105
|
-
module.exports = __toCommonJS(TooltipTextProvider_exports);
|
106
99
|
//# sourceMappingURL=TooltipTextProvider.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/TooltipTextProvider.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["/* eslint-disable react/prop-types */\nimport React, { useMemo, useState } from 'react';\nimport { DSPopover, usePopoverProviderState } from '@elliemae/ds-popover';\n\nconst TruncatedTooltipContext = React.createContext();\n\nconst { Provider } = TruncatedTooltipContext;\n\nfunction TooltipTextProvider({\n children,\n tooltipDelay = 200,\n placement = 'top',\n ...tooltipOptions\n}) {\n const {\n show: showTooltip,\n hide: hideTooltip,\n state: tooltipState,\n } = usePopoverProviderState({ delay: tooltipDelay });\n const [zIndex, setZIndex] = useState(110);\n\n const value = useMemo(\n () => ({\n showTooltip,\n hideTooltip,\n setZIndex,\n }),\n [],\n );\n\n return (\n <Provider value={value}>\n {children}\n {tooltipState.visible ? (\n <DSPopover\n boundaries=\"window\"\n placement={placement}\n showArrow\n {...tooltipOptions}\n {...(tooltipState.options || {})}\n content={tooltipState.value}\n referenceEl={tooltipState.reference}\n style={{ pointerEvents: 'none', zIndex }}\n visible={tooltipState.visible}\n />\n ) : null}\n </Provider>\n );\n}\n\nTooltipTextProvider.propTypes = {};\nTooltipTextProvider.defaultProps = {};\n\nexport { TooltipTextProvider, TruncatedTooltipContext };\nexport default TooltipTextProvider;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAyC;AACzC,wBAAmD;AAEnD,MAAM,0BAA0B,qBAAM,cAAc;AAEpD,MAAM,EAAE,aAAa;AAErB,6BAA6B,IAK1B;AAL0B,eAC3B;AAAA;AAAA,IACA,eAAe;AAAA,IACf,YAAY;AAAA,MAHe,IAIxB,2BAJwB,IAIxB;AAAA,IAHH;AAAA,IACA;AAAA,IACA;AAAA;AAGA,QAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,MACL,+CAAwB,EAAE,OAAO,aAAa,CAAC;AACnD,QAAM,CAAC,QAAQ,aAAa,2BAAS,GAAG;AAExC,QAAM,QAAQ,0BACZ,MAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,EACF,IACA,CAAC,CACH;AAEA,SACE,mDAAC;AAAA,IAAS;AAAA,KACP,UACA,aAAa,UACZ,mDAAC;AAAA,IACC,YAAW;AAAA,IACX;AAAA,IACA,WAAS;AAAA,KACL,iBACC,aAAa,WAAW,CAAC,IAL/B;AAAA,IAMC,SAAS,aAAa;AAAA,IACtB,aAAa,aAAa;AAAA,IAC1B,OAAO,EAAE,eAAe,QAAQ,OAAO;AAAA,IACvC,SAAS,aAAa;AAAA,IACxB,IACE,IACN;AAEJ;AAEA,oBAAoB,YAAY,CAAC;AACjC,oBAAoB,eAAe,CAAC;AAGpC,IAAO,8BAAQ;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
@@ -4,27 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
8
7
|
var __export = (target, all) => {
|
9
8
|
for (var name in all)
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
11
10
|
};
|
12
|
-
var
|
13
|
-
if (
|
14
|
-
for (let key of __getOwnPropNames(
|
15
|
-
if (!__hasOwnProp.call(
|
16
|
-
__defProp(
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
16
|
}
|
18
|
-
return
|
17
|
+
return to;
|
19
18
|
};
|
20
|
-
var __toESM = (
|
21
|
-
|
22
|
-
};
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
24
|
-
return (module2, temp) => {
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
26
|
-
};
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
21
|
var src_exports = {};
|
29
22
|
__export(src_exports, {
|
30
23
|
DSTruncateTextWithTooltip: () => import_truncateTextWithTooltip.DSTruncateTextWithTooltip,
|
@@ -37,10 +30,10 @@ __export(src_exports, {
|
|
37
30
|
TruncatedTooltipTextWithSchema: () => import_DSTruncatedTooltipText.TruncatedTooltipTextWithSchema,
|
38
31
|
default: () => import_DSTruncatedTooltipText.default
|
39
32
|
});
|
33
|
+
module.exports = __toCommonJS(src_exports);
|
40
34
|
var React = __toESM(require("react"));
|
41
35
|
var import_TooltipTextProvider = require("./TooltipTextProvider");
|
42
36
|
var import_SimpleTruncatedTooltipText = require("./SimpleTruncatedTooltipText");
|
43
37
|
var import_DSTruncatedTooltipText = __toESM(require("./DSTruncatedTooltipText"));
|
44
38
|
var import_truncateTextWithTooltip = require("./truncateTextWithTooltip");
|
45
|
-
module.exports = __toCommonJS(src_exports);
|
46
39
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["export { TooltipTextProvider, TruncatedTooltipContext } from './TooltipTextProvider';\nexport { SimpleTruncatedTooltipText } from './SimpleTruncatedTooltipText';\nexport { DSTruncatedTooltipText, TruncatedTooltipTextWithSchema, default } from './DSTruncatedTooltipText';\nexport { DSTruncateTextWithTooltipDatatestid, DSTruncateTextWithTooltip, DSTruncateTextWithTooltipWithSchema } from './truncateTextWithTooltip';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,iCAA6D;AAC7D,wCAA2C;AAC3C,oCAAgF;AAChF,qCAAoH;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -4,34 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
8
7
|
var __export = (target, all) => {
|
9
8
|
for (var name in all)
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
11
10
|
};
|
12
|
-
var
|
13
|
-
if (
|
14
|
-
for (let key of __getOwnPropNames(
|
15
|
-
if (!__hasOwnProp.call(
|
16
|
-
__defProp(
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
16
|
}
|
18
|
-
return
|
17
|
+
return to;
|
19
18
|
};
|
20
|
-
var __toESM = (
|
21
|
-
|
22
|
-
};
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
24
|
-
return (module2, temp) => {
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
26
|
-
};
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
21
|
var DSTruncateTextWIthTooltipDatatestid_exports = {};
|
29
22
|
__export(DSTruncateTextWIthTooltipDatatestid_exports, {
|
30
23
|
DSTruncateTextWithTooltipDatatestid: () => DSTruncateTextWithTooltipDatatestid
|
31
24
|
});
|
25
|
+
module.exports = __toCommonJS(DSTruncateTextWIthTooltipDatatestid_exports);
|
32
26
|
var React = __toESM(require("react"));
|
33
27
|
const DSTruncateTextWithTooltipDatatestid = {
|
34
28
|
TEXT: "ds-truncatetextwithtooltip-text"
|
35
29
|
};
|
36
|
-
module.exports = __toCommonJS(DSTruncateTextWIthTooltipDatatestid_exports);
|
37
30
|
//# sourceMappingURL=DSTruncateTextWIthTooltipDatatestid.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/truncateTextWithTooltip/DSTruncateTextWIthTooltipDatatestid.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["export const DSTruncateTextWithTooltipDatatestid = {\n TEXT: 'ds-truncatetextwithtooltip-text',\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,sCAAsC;AAAA,EACjD,MAAM;AACR;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -18,32 +18,26 @@ var __spreadValues = (a, b) => {
|
|
18
18
|
}
|
19
19
|
return a;
|
20
20
|
};
|
21
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
22
21
|
var __export = (target, all) => {
|
23
22
|
for (var name in all)
|
24
23
|
__defProp(target, name, { get: all[name], enumerable: true });
|
25
24
|
};
|
26
|
-
var
|
27
|
-
if (
|
28
|
-
for (let key of __getOwnPropNames(
|
29
|
-
if (!__hasOwnProp.call(
|
30
|
-
__defProp(
|
25
|
+
var __copyProps = (to, from, except, desc) => {
|
26
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
27
|
+
for (let key of __getOwnPropNames(from))
|
28
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
29
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
31
30
|
}
|
32
|
-
return
|
31
|
+
return to;
|
33
32
|
};
|
34
|
-
var __toESM = (
|
35
|
-
|
36
|
-
};
|
37
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
38
|
-
return (module2, temp) => {
|
39
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
40
|
-
};
|
41
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
33
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
34
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
42
35
|
var DSTruncateTextWithTooltip_exports = {};
|
43
36
|
__export(DSTruncateTextWithTooltip_exports, {
|
44
37
|
DSTruncateTextWithTooltip: () => DSTruncateTextWithTooltip,
|
45
38
|
DSTruncateTextWithTooltipWithSchema: () => DSTruncateTextWithTooltipWithSchema
|
46
39
|
});
|
40
|
+
module.exports = __toCommonJS(DSTruncateTextWithTooltip_exports);
|
47
41
|
var React = __toESM(require("react"));
|
48
42
|
var import_react = __toESM(require("react"));
|
49
43
|
var import_ds_tooltip = require("@elliemae/ds-tooltip");
|
@@ -91,5 +85,4 @@ const DSTruncateTextWithTooltip = (props) => {
|
|
91
85
|
};
|
92
86
|
const DSTruncateTextWithTooltipWithSchema = (0, import_ds_utilities.describe)(DSTruncateTextWithTooltip);
|
93
87
|
DSTruncateTextWithTooltipWithSchema.propTypes = import_propTypes.propTypes;
|
94
|
-
module.exports = __toCommonJS(DSTruncateTextWithTooltip_exports);
|
95
88
|
//# sourceMappingURL=DSTruncateTextWithTooltip.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/truncateTextWithTooltip/DSTruncateTextWithTooltip.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["import React, { useState, useMemo, useEffect } from 'react';\nimport { DSTooltipV3 } from '@elliemae/ds-tooltip';\nimport { useMemoMergePropsWithDefault, useValidateTypescriptPropTypes, describe } from '@elliemae/ds-utilities';\nimport { defaultProps } from './defaultProps';\nimport { DSTruncateTextWithTooltipDatatestid } from './DSTruncateTextWIthTooltipDatatestid';\nimport { propTypes } from './propTypes';\nimport { Text } from './styles';\nimport type { DSTruncateTextWithTooltipT } from './propTypes';\n\nconst DSTruncateTextWithTooltip = (props: DSTruncateTextWithTooltipT.Props): JSX.Element => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSTruncateTextWithTooltipT.Props>(props, defaultProps);\n\n useValidateTypescriptPropTypes(propsWithDefault, propTypes);\n\n const { text, tooltipProps } = propsWithDefault;\n\n const [textWrapperEl, setTextWrapperEl] = useState<HTMLSpanElement | null>(null);\n const [isShowingEllipsis, setIsShowingEllipsis] = useState<boolean>(false);\n\n const resizeObserver = useMemo(\n () =>\n new ResizeObserver((entries) => {\n if (entries.length) {\n const [textWrapperEntry] = entries;\n const el = textWrapperEntry.target;\n setIsShowingEllipsis(el?.scrollWidth > el?.clientWidth);\n }\n }),\n [],\n );\n\n useEffect(() => {\n if (textWrapperEl) {\n setIsShowingEllipsis(textWrapperEl?.scrollWidth > textWrapperEl?.clientWidth);\n resizeObserver.observe(textWrapperEl);\n }\n return () => {\n if (textWrapperEl) {\n resizeObserver.unobserve(textWrapperEl);\n }\n };\n }, [resizeObserver, textWrapperEl]);\n\n if (isShowingEllipsis)\n return (\n <DSTooltipV3 text={text} {...tooltipProps}>\n <Text ref={setTextWrapperEl} tabIndex={0} data-testid={DSTruncateTextWithTooltipDatatestid.TEXT}>\n {text}\n </Text>\n </DSTooltipV3>\n );\n\n return (\n <Text ref={setTextWrapperEl} data-testid={DSTruncateTextWithTooltipDatatestid.TEXT}>\n {text}\n </Text>\n );\n};\n\nconst DSTruncateTextWithTooltipWithSchema = describe<DSTruncateTextWithTooltipT.Props>(DSTruncateTextWithTooltip);\n\nDSTruncateTextWithTooltipWithSchema.propTypes = propTypes;\n\nexport { DSTruncateTextWithTooltip, DSTruncateTextWithTooltipWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAoD;AACpD,wBAA4B;AAC5B,0BAAuF;AACvF,0BAA6B;AAC7B,iDAAoD;AACpD,uBAA0B;AAC1B,oBAAqB;AAGrB,MAAM,4BAA4B,CAAC,UAAyD;AAC1F,QAAM,mBAAmB,sDAA+D,OAAO,gCAAY;AAE3G,0DAA+B,kBAAkB,0BAAS;AAE1D,QAAM,EAAE,MAAM,iBAAiB;AAE/B,QAAM,CAAC,eAAe,oBAAoB,2BAAiC,IAAI;AAC/E,QAAM,CAAC,mBAAmB,wBAAwB,2BAAkB,KAAK;AAEzE,QAAM,iBAAiB,0BACrB,MACE,IAAI,eAAe,CAAC,YAAY;AAC9B,QAAI,QAAQ,QAAQ;AAClB,YAAM,CAAC,oBAAoB;AAC3B,YAAM,KAAK,iBAAiB;AAC5B,2BAAqB,IAAI,cAAc,IAAI,WAAW;AAAA,IACxD;AAAA,EACF,CAAC,GACH,CAAC,CACH;AAEA,8BAAU,MAAM;AACd,QAAI,eAAe;AACjB,2BAAqB,eAAe,cAAc,eAAe,WAAW;AAC5E,qBAAe,QAAQ,aAAa;AAAA,IACtC;AACA,WAAO,MAAM;AACX,UAAI,eAAe;AACjB,uBAAe,UAAU,aAAa;AAAA,MACxC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,gBAAgB,aAAa,CAAC;AAElC,MAAI;AACF,WACE,mDAAC;AAAA,MAAY;AAAA,OAAgB,eAC3B,mDAAC;AAAA,MAAK,KAAK;AAAA,MAAkB,UAAU;AAAA,MAAG,eAAa,+EAAoC;AAAA,OACxF,IACH,CACF;AAGJ,SACE,mDAAC;AAAA,IAAK,KAAK;AAAA,IAAkB,eAAa,+EAAoC;AAAA,KAC3E,IACH;AAEJ;AAEA,MAAM,sCAAsC,kCAA2C,yBAAyB;AAEhH,oCAAoC,YAAY;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -4,34 +4,27 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
8
7
|
var __export = (target, all) => {
|
9
8
|
for (var name in all)
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
11
10
|
};
|
12
|
-
var
|
13
|
-
if (
|
14
|
-
for (let key of __getOwnPropNames(
|
15
|
-
if (!__hasOwnProp.call(
|
16
|
-
__defProp(
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
16
|
}
|
18
|
-
return
|
17
|
+
return to;
|
19
18
|
};
|
20
|
-
var __toESM = (
|
21
|
-
|
22
|
-
};
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
24
|
-
return (module2, temp) => {
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
26
|
-
};
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
21
|
var defaultProps_exports = {};
|
29
22
|
__export(defaultProps_exports, {
|
30
23
|
defaultProps: () => defaultProps
|
31
24
|
});
|
25
|
+
module.exports = __toCommonJS(defaultProps_exports);
|
32
26
|
var React = __toESM(require("react"));
|
33
27
|
const defaultProps = {
|
34
28
|
tooltipProps: {}
|
35
29
|
};
|
36
|
-
module.exports = __toCommonJS(defaultProps_exports);
|
37
30
|
//# sourceMappingURL=defaultProps.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/truncateTextWithTooltip/defaultProps.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["import type { DSTruncateTextWithTooltipT } from './propTypes';\n\nexport const defaultProps: DSTruncateTextWithTooltipT.DefaultProps = {\n tooltipProps: {},\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADEhB,MAAM,eAAwD;AAAA,EACnE,cAAc,CAAC;AACjB;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -4,26 +4,20 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
__defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
9
|
+
for (let key of __getOwnPropNames(from))
|
10
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
11
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
13
12
|
}
|
14
|
-
return
|
13
|
+
return to;
|
15
14
|
};
|
16
|
-
var
|
17
|
-
|
18
|
-
};
|
19
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
20
|
-
return (module2, temp) => {
|
21
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
22
|
-
};
|
23
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
15
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
17
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
24
18
|
var truncateTextWithTooltip_exports = {};
|
25
|
-
var React = __toESM(require("react"));
|
26
|
-
__reExport(truncateTextWithTooltip_exports, require("./DSTruncateTextWithTooltip"));
|
27
|
-
__reExport(truncateTextWithTooltip_exports, require("./DSTruncateTextWIthTooltipDatatestid"));
|
28
19
|
module.exports = __toCommonJS(truncateTextWithTooltip_exports);
|
20
|
+
var React = __toESM(require("react"));
|
21
|
+
__reExport(truncateTextWithTooltip_exports, require("./DSTruncateTextWithTooltip"), module.exports);
|
22
|
+
__reExport(truncateTextWithTooltip_exports, require("./DSTruncateTextWIthTooltipDatatestid"), module.exports);
|
29
23
|
//# sourceMappingURL=index.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/truncateTextWithTooltip/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["export * from './DSTruncateTextWithTooltip';\nexport * from './DSTruncateTextWIthTooltipDatatestid';\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,4CAAc,wCAAd;AACA,4CAAc,kDADd;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -4,36 +4,29 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
8
7
|
var __export = (target, all) => {
|
9
8
|
for (var name in all)
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
11
10
|
};
|
12
|
-
var
|
13
|
-
if (
|
14
|
-
for (let key of __getOwnPropNames(
|
15
|
-
if (!__hasOwnProp.call(
|
16
|
-
__defProp(
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
16
|
}
|
18
|
-
return
|
17
|
+
return to;
|
19
18
|
};
|
20
|
-
var __toESM = (
|
21
|
-
|
22
|
-
};
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
24
|
-
return (module2, temp) => {
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
26
|
-
};
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
21
|
var propTypes_exports = {};
|
29
22
|
__export(propTypes_exports, {
|
30
23
|
propTypes: () => propTypes
|
31
24
|
});
|
25
|
+
module.exports = __toCommonJS(propTypes_exports);
|
32
26
|
var React = __toESM(require("react"));
|
33
27
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
34
28
|
const propTypes = {
|
35
29
|
text: import_ds_utilities.PropTypes.string.description("Text to show.").isRequired,
|
36
30
|
tooltipProps: import_ds_utilities.PropTypes.object.description("This component uses DSTooltip component, you can set properties directly to this component with this property.").defaultValue({})
|
37
31
|
};
|
38
|
-
module.exports = __toCommonJS(propTypes_exports);
|
39
32
|
//# sourceMappingURL=propTypes.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/truncateTextWithTooltip/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["/* eslint-disable max-len */\nimport { PropTypes } from '@elliemae/ds-utilities';\n\nexport declare namespace DSTruncateTextWithTooltipT {\n export interface PropsRequired {\n text: string;\n }\n\n export interface DefaultProps {\n tooltipProps: Record<string, unknown>;\n }\n\n export interface Props extends DefaultProps, PropsRequired {}\n}\n\nexport const propTypes = {\n text: PropTypes.string.description('Text to show.').isRequired,\n tooltipProps: PropTypes.object\n .description(\n 'This component uses DSTooltip component, you can set properties directly to this component with this property.',\n )\n .defaultValue({}),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,0BAA0B;AAcnB,MAAM,YAAY;AAAA,EACvB,MAAM,8BAAU,OAAO,YAAY,eAAe,EAAE;AAAA,EACpD,cAAc,8BAAU,OACrB,YACC,gHACF,EACC,aAAa,CAAC,CAAC;AACpB;",
|
6
6
|
"names": []
|
7
7
|
}
|
@@ -4,31 +4,25 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
5
|
var __getProtoOf = Object.getPrototypeOf;
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
-
var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
|
8
7
|
var __export = (target, all) => {
|
9
8
|
for (var name in all)
|
10
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
11
10
|
};
|
12
|
-
var
|
13
|
-
if (
|
14
|
-
for (let key of __getOwnPropNames(
|
15
|
-
if (!__hasOwnProp.call(
|
16
|
-
__defProp(
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
17
16
|
}
|
18
|
-
return
|
17
|
+
return to;
|
19
18
|
};
|
20
|
-
var __toESM = (
|
21
|
-
|
22
|
-
};
|
23
|
-
var __toCommonJS = /* @__PURE__ */ ((cache) => {
|
24
|
-
return (module2, temp) => {
|
25
|
-
return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
|
26
|
-
};
|
27
|
-
})(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
|
20
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
28
21
|
var styles_exports = {};
|
29
22
|
__export(styles_exports, {
|
30
23
|
Text: () => Text
|
31
24
|
});
|
25
|
+
module.exports = __toCommonJS(styles_exports);
|
32
26
|
var React = __toESM(require("react"));
|
33
27
|
var import_styled_components = __toESM(require("styled-components"));
|
34
28
|
const Text = import_styled_components.default.span`
|
@@ -43,5 +37,4 @@ const Text = import_styled_components.default.span`
|
|
43
37
|
background: ${({ theme }) => theme.colors.brand[200]};
|
44
38
|
}
|
45
39
|
`;
|
46
|
-
module.exports = __toCommonJS(styles_exports);
|
47
40
|
//# sourceMappingURL=styles.js.map
|
@@ -2,6 +2,6 @@
|
|
2
2
|
"version": 3,
|
3
3
|
"sources": ["../../../src/truncateTextWithTooltip/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
4
4
|
"sourcesContent": ["import styled from 'styled-components';\n\n// reduce the possibility of error showing the tooltip(text-overflow: ellipsis) https://jira.elliemae.io/browse/PUI-1755\nexport const Text = styled.span`\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n display: inline-block;\n max-width: 100%;\n &:focus {\n border: none;\n outline: none;\n background: ${({ theme }) => theme.colors.brand[200]};\n }\n`;\n", "import * as React from 'react';\nexport { React };\n"],
|
5
|
-
"mappings": "
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AAGZ,MAAM,OAAO,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAST,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;",
|
6
6
|
"names": []
|
7
7
|
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@elliemae/ds-truncated-tooltip-text",
|
3
|
-
"version": "3.0.0-next.
|
3
|
+
"version": "3.0.0-next.47",
|
4
4
|
"license": "MIT",
|
5
5
|
"description": "ICE MT - Dimsum - Truncated Tooltip Text",
|
6
6
|
"files": [
|
@@ -53,8 +53,8 @@
|
|
53
53
|
"dependencies": {
|
54
54
|
"@elliemae/ds-popover": "3.0.0-next.29",
|
55
55
|
"@elliemae/ds-popper": "3.0.0-next.29",
|
56
|
-
"@elliemae/ds-tooltip": "3.0.0-next.
|
57
|
-
"@elliemae/ds-utilities": "3.0.0-next.
|
56
|
+
"@elliemae/ds-tooltip": "3.0.0-next.47",
|
57
|
+
"@elliemae/ds-utilities": "3.0.0-next.47",
|
58
58
|
"prop-types": "~15.8.1",
|
59
59
|
"react-desc": "~4.1.3"
|
60
60
|
},
|