@instructure/ui-truncate-text 8.10.1 → 8.10.3-snapshot.12

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/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [8.10.2](https://github.com/instructure/instructure-ui/compare/v8.10.1...v8.10.2) (2021-10-01)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-truncate-text
9
+
6
10
  ## [8.10.1](https://github.com/instructure/instructure-ui/compare/v8.10.0...v8.10.1) (2021-10-01)
7
11
 
8
12
  **Note:** Version bump only for package @instructure/ui-truncate-text
package/LICENSE.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: The MIT License (MIT)
3
+ category: Getting Started
4
+ order: 9
5
+ ---
6
+
7
+ # The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Instructure, Inc.
10
+
11
+ **Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions.**
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
@@ -45,6 +45,7 @@ category: components
45
45
  let TruncateText = (_dec = withStyle(generateStyle, generateComponentTheme), _dec2 = testable(), _dec3 = hack(['shouldTruncateWhenInvisible']), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class TruncateText extends Component {
46
46
  constructor(props) {
47
47
  super(props);
48
+ this.ref = null;
48
49
 
49
50
  this.update = () => {
50
51
  if (this._ref) {
@@ -238,7 +239,9 @@ let TruncateText = (_dec = withStyle(generateStyle, generateComponentTheme), _de
238
239
  return jsx("span", {
239
240
  css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.truncateText,
240
241
  ref: el => {
241
- this._ref = el;
242
+ this._ref = el; // TODO remove this and keep only 'ref' in V9
243
+
244
+ this.ref = el;
242
245
  }
243
246
  }, children && (truncatedElement ? null : jsx("span", {
244
247
  ref: el => {
@@ -47,6 +47,7 @@ category: components
47
47
  let TruncateText = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec2 = (0, _testable.testable)(), _dec3 = (0, _hack.hack)(['shouldTruncateWhenInvisible']), _dec(_class = _dec2(_class = _dec3(_class = (_temp = _class2 = class TruncateText extends _react.Component {
48
48
  constructor(props) {
49
49
  super(props);
50
+ this.ref = null;
50
51
 
51
52
  this.update = () => {
52
53
  if (this._ref) {
@@ -244,7 +245,9 @@ let TruncateText = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.defau
244
245
  return (0, _emotion.jsx)("span", {
245
246
  css: (_this$props$styles3 = this.props.styles) === null || _this$props$styles3 === void 0 ? void 0 : _this$props$styles3.truncateText,
246
247
  ref: el => {
247
- this._ref = el;
248
+ this._ref = el; // TODO remove this and keep only 'ref' in V9
249
+
250
+ this.ref = el;
248
251
  }
249
252
  }, children && (truncatedElement ? null : (0, _emotion.jsx)("span", {
250
253
  ref: el => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-truncate-text",
3
- "version": "8.10.1",
3
+ "version": "8.10.3-snapshot.12+af470a237",
4
4
  "description": "A TruncateText component made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,23 +25,23 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.10.1",
29
- "@instructure/debounce": "8.10.1",
30
- "@instructure/emotion": "8.10.1",
31
- "@instructure/shared-types": "8.10.1",
32
- "@instructure/ui-dom-utils": "8.10.1",
33
- "@instructure/ui-react-utils": "8.10.1",
34
- "@instructure/ui-testable": "8.10.1",
35
- "@instructure/ui-utils": "8.10.1",
28
+ "@instructure/console": "8.10.3-snapshot.12+af470a237",
29
+ "@instructure/debounce": "8.10.3-snapshot.12+af470a237",
30
+ "@instructure/emotion": "8.10.3-snapshot.12+af470a237",
31
+ "@instructure/shared-types": "8.10.3-snapshot.12+af470a237",
32
+ "@instructure/ui-dom-utils": "8.10.3-snapshot.12+af470a237",
33
+ "@instructure/ui-react-utils": "8.10.3-snapshot.12+af470a237",
34
+ "@instructure/ui-testable": "8.10.3-snapshot.12+af470a237",
35
+ "@instructure/ui-utils": "8.10.3-snapshot.12+af470a237",
36
36
  "escape-html": "^1",
37
37
  "prop-types": "^15"
38
38
  },
39
39
  "devDependencies": {
40
- "@instructure/ui-babel-preset": "8.10.1",
41
- "@instructure/ui-color-utils": "8.10.1",
42
- "@instructure/ui-test-utils": "8.10.1",
43
- "@instructure/ui-text": "8.10.1",
44
- "@instructure/ui-themes": "8.10.1"
40
+ "@instructure/ui-babel-preset": "8.10.3-snapshot.12+af470a237",
41
+ "@instructure/ui-color-utils": "8.10.3-snapshot.12+af470a237",
42
+ "@instructure/ui-test-utils": "8.10.3-snapshot.12+af470a237",
43
+ "@instructure/ui-text": "8.10.3-snapshot.12+af470a237",
44
+ "@instructure/ui-themes": "8.10.3-snapshot.12+af470a237"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=16.8 <=17"
@@ -49,5 +49,6 @@
49
49
  "publishConfig": {
50
50
  "access": "public"
51
51
  },
52
- "sideEffects": false
52
+ "sideEffects": false,
53
+ "gitHead": "af470a2374463c265ed1304870b7890fc8bb09a4"
53
54
  }
@@ -67,6 +67,8 @@ class TruncateText extends Component<TruncateTextProps> {
67
67
  onUpdate: (truncated, text) => {}
68
68
  }
69
69
 
70
+ ref: Element | null = null
71
+
70
72
  // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'props' implicitly has an 'any' type.
71
73
  constructor(props) {
72
74
  super(props)
@@ -289,7 +291,8 @@ class TruncateText extends Component<TruncateTextProps> {
289
291
  css={this.props.styles?.truncateText}
290
292
  ref={(el) => {
291
293
  // @ts-expect-error ts-migrate(2339) FIXME: Property '_ref' does not exist on type 'TruncateTe... Remove this comment to see the full error message
292
- this._ref = el
294
+ this._ref = el // TODO remove this and keep only 'ref' in V9
295
+ this.ref = el
293
296
  }}
294
297
  >
295
298
  {children &&
@@ -40,6 +40,7 @@ declare class TruncateText extends Component<TruncateTextProps> {
40
40
  debounce: number;
41
41
  onUpdate: (truncated: any, text: any) => void;
42
42
  };
43
+ ref: Element | null;
43
44
  constructor(props: any);
44
45
  get initialState(): {
45
46
  isTruncated: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/TruncateText/index.tsx"],"names":[],"mappings":"AAuBA,eAAe;AACf,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAWxC,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAOrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAEhD;;;;GAIG;AACH,cAGM,YAAa,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACrD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAA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