@elliemae/ds-truncated-tooltip-text 2.4.2-rc.12 → 2.4.2-rc.15

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.
@@ -2,14 +2,13 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _jsx2 = require('@babel/runtime/helpers/jsx');
6
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
- require('core-js/modules/web.dom-collections.iterator.js');
8
5
  require('core-js/modules/esnext.async-iterator.filter.js');
9
6
  require('core-js/modules/esnext.iterator.constructor.js');
10
7
  require('core-js/modules/esnext.iterator.filter.js');
11
8
  require('core-js/modules/esnext.async-iterator.for-each.js');
12
9
  require('core-js/modules/esnext.iterator.for-each.js');
10
+ var _jsx2 = require('@babel/runtime/helpers/jsx');
11
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
13
12
  var React = require('react');
14
13
  var dsUtilities = require('@elliemae/ds-utilities');
15
14
  var styled = require('styled-components');
@@ -85,7 +84,7 @@ const SimpleTruncatedTooltipText = props => {
85
84
  // wich would still allow the truncation behaviour (see tree view for example)
86
85
  // when the target has the test-id itself target===SimpleTruncatedTextEl
87
86
 
88
- const SimpleTruncatedTextEl = target.closest("[data-testid=\"".concat(dsTestId, "\"]"));
87
+ const SimpleTruncatedTextEl = target.closest(`[data-testid="${dsTestId}"]`);
89
88
 
90
89
  if (SimpleTruncatedTextEl && isEllipsisActive(SimpleTruncatedTextEl)) {
91
90
  showTooltip({
@@ -2,15 +2,14 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _jsx2 = require('@babel/runtime/helpers/jsx');
6
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
7
- var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
8
- require('core-js/modules/web.dom-collections.iterator.js');
9
5
  require('core-js/modules/esnext.async-iterator.filter.js');
10
6
  require('core-js/modules/esnext.iterator.constructor.js');
11
7
  require('core-js/modules/esnext.iterator.filter.js');
12
8
  require('core-js/modules/esnext.async-iterator.for-each.js');
13
9
  require('core-js/modules/esnext.iterator.for-each.js');
10
+ var _jsx2 = require('@babel/runtime/helpers/jsx');
11
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
+ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
14
13
  var React = require('react');
15
14
  var DSPopover = require('@elliemae/ds-popover');
16
15
  var jsxRuntime = require('react/jsx-runtime');
@@ -2,13 +2,12 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _defineProperty = require('@babel/runtime/helpers/defineProperty');
6
- require('core-js/modules/web.dom-collections.iterator.js');
7
5
  require('core-js/modules/esnext.async-iterator.filter.js');
8
6
  require('core-js/modules/esnext.iterator.constructor.js');
9
7
  require('core-js/modules/esnext.iterator.filter.js');
10
8
  require('core-js/modules/esnext.async-iterator.for-each.js');
11
9
  require('core-js/modules/esnext.iterator.for-each.js');
10
+ var _defineProperty = require('@babel/runtime/helpers/defineProperty');
12
11
  var React = require('react');
13
12
  var dsTooltip = require('@elliemae/ds-tooltip');
14
13
  var dsPropsHelpers = require('@elliemae/ds-props-helpers');
@@ -39,12 +38,12 @@ const DSTruncateTextWithTooltip = props => {
39
38
  if (entries.length) {
40
39
  const [textWrapperEntry] = entries;
41
40
  const el = textWrapperEntry.target;
42
- setIsShowingEllipsis((el === null || el === void 0 ? void 0 : el.scrollWidth) > (el === null || el === void 0 ? void 0 : el.clientWidth));
41
+ setIsShowingEllipsis(el?.scrollWidth > el?.clientWidth);
43
42
  }
44
43
  }), []);
45
44
  React.useEffect(() => {
46
45
  if (textWrapperEl) {
47
- setIsShowingEllipsis((textWrapperEl === null || textWrapperEl === void 0 ? void 0 : textWrapperEl.scrollWidth) > (textWrapperEl === null || textWrapperEl === void 0 ? void 0 : textWrapperEl.clientWidth));
46
+ setIsShowingEllipsis(textWrapperEl?.scrollWidth > textWrapperEl?.clientWidth);
48
47
  resizeObserver.observe(textWrapperEl);
49
48
  }
50
49
 
@@ -5,7 +5,6 @@ import 'core-js/modules/esnext.async-iterator.for-each.js';
5
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
6
  import _jsx2 from '@babel/runtime/helpers/esm/jsx';
7
7
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
- import 'core-js/modules/web.dom-collections.iterator.js';
9
8
  import { useState, useCallback, useMemo } from 'react';
10
9
  import { useCancellableDelayedCallback } from '@elliemae/ds-utilities';
11
10
  import styled from 'styled-components';
@@ -74,7 +73,7 @@ const SimpleTruncatedTooltipText = props => {
74
73
  // wich would still allow the truncation behaviour (see tree view for example)
75
74
  // when the target has the test-id itself target===SimpleTruncatedTextEl
76
75
 
77
- const SimpleTruncatedTextEl = target.closest("[data-testid=\"".concat(dsTestId, "\"]"));
76
+ const SimpleTruncatedTextEl = target.closest(`[data-testid="${dsTestId}"]`);
78
77
 
79
78
  if (SimpleTruncatedTextEl && isEllipsisActive(SimpleTruncatedTextEl)) {
80
79
  showTooltip({
@@ -1,12 +1,11 @@
1
- import _jsx2 from '@babel/runtime/helpers/esm/jsx';
2
- import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
3
- import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
4
- import 'core-js/modules/web.dom-collections.iterator.js';
5
1
  import 'core-js/modules/esnext.async-iterator.filter.js';
6
2
  import 'core-js/modules/esnext.iterator.constructor.js';
7
3
  import 'core-js/modules/esnext.iterator.filter.js';
8
4
  import 'core-js/modules/esnext.async-iterator.for-each.js';
9
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
+ import _jsx2 from '@babel/runtime/helpers/esm/jsx';
7
+ import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
8
+ import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
10
9
  import React, { useState, useMemo } from 'react';
11
10
  import DSPopover, { usePopoverProviderState } from '@elliemae/ds-popover';
12
11
  import { jsx } from 'react/jsx-runtime';
@@ -4,7 +4,6 @@ import 'core-js/modules/esnext.iterator.filter.js';
4
4
  import 'core-js/modules/esnext.async-iterator.for-each.js';
5
5
  import 'core-js/modules/esnext.iterator.for-each.js';
6
6
  import _defineProperty from '@babel/runtime/helpers/esm/defineProperty';
7
- import 'core-js/modules/web.dom-collections.iterator.js';
8
7
  import { useState, useMemo, useEffect } from 'react';
9
8
  import { DSTooltipV3 } from '@elliemae/ds-tooltip';
10
9
  import { describe, useMemoMergePropsWithDefault, useValidateTypescriptPropTypes } from '@elliemae/ds-props-helpers';
@@ -31,12 +30,12 @@ const DSTruncateTextWithTooltip = props => {
31
30
  if (entries.length) {
32
31
  const [textWrapperEntry] = entries;
33
32
  const el = textWrapperEntry.target;
34
- setIsShowingEllipsis((el === null || el === void 0 ? void 0 : el.scrollWidth) > (el === null || el === void 0 ? void 0 : el.clientWidth));
33
+ setIsShowingEllipsis(el?.scrollWidth > el?.clientWidth);
35
34
  }
36
35
  }), []);
37
36
  useEffect(() => {
38
37
  if (textWrapperEl) {
39
- setIsShowingEllipsis((textWrapperEl === null || textWrapperEl === void 0 ? void 0 : textWrapperEl.scrollWidth) > (textWrapperEl === null || textWrapperEl === void 0 ? void 0 : textWrapperEl.clientWidth));
38
+ setIsShowingEllipsis(textWrapperEl?.scrollWidth > textWrapperEl?.clientWidth);
40
39
  resizeObserver.observe(textWrapperEl);
41
40
  }
42
41
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-truncated-tooltip-text",
3
- "version": "2.4.2-rc.12",
3
+ "version": "2.4.2-rc.15",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Truncated Tooltip Text",
6
6
  "module": "./esm/index.js",
@@ -68,11 +68,11 @@
68
68
  "build": "node ../../scripts/build/build.js"
69
69
  },
70
70
  "dependencies": {
71
- "@elliemae/ds-popover": "2.4.2-rc.12",
72
- "@elliemae/ds-popper": "2.4.2-rc.12",
73
- "@elliemae/ds-props-helpers": "2.4.2-rc.12",
74
- "@elliemae/ds-tooltip": "2.4.2-rc.12",
75
- "@elliemae/ds-utilities": "2.4.2-rc.12",
71
+ "@elliemae/ds-popover": "2.4.2-rc.15",
72
+ "@elliemae/ds-popper": "2.4.2-rc.15",
73
+ "@elliemae/ds-props-helpers": "2.4.2-rc.15",
74
+ "@elliemae/ds-tooltip": "2.4.2-rc.15",
75
+ "@elliemae/ds-utilities": "2.4.2-rc.15",
76
76
  "prop-types": "~15.7.2",
77
77
  "react-desc": "~4.1.3"
78
78
  },