@instructure/ui-simple-select 8.11.2-snapshot.3 → 8.11.2-snapshot.39

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.
@@ -50,8 +50,6 @@ let SimpleSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Si
50
50
  this._emptyOptionId = uid('Select-EmptyOption');
51
51
 
52
52
  this.handleRef = node => {
53
- this._select = node; // TODO remove this in v9 and keep only "ref"
54
-
55
53
  this.ref = node;
56
54
  };
57
55
 
@@ -139,16 +137,20 @@ let SimpleSelect = (_dec = testable(), _dec(_class = (_temp = _class2 = class Si
139
137
  };
140
138
  }
141
139
 
140
+ get _select() {
141
+ return this.ref;
142
+ }
143
+
142
144
  focus() {
143
- this._select && this._select.focus();
145
+ this.ref && this.ref.focus();
144
146
  }
145
147
 
146
148
  get focused() {
147
- return this._select && this._select.focused;
149
+ return this.ref && this.ref.focused;
148
150
  }
149
151
 
150
152
  get id() {
151
- return this._select && this._select.id;
153
+ return this.ref && this.ref.id;
152
154
  }
153
155
 
154
156
  get isControlled() {
@@ -52,8 +52,6 @@ let SimpleSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
52
52
  this._emptyOptionId = (0, _uid.uid)('Select-EmptyOption');
53
53
 
54
54
  this.handleRef = node => {
55
- this._select = node; // TODO remove this in v9 and keep only "ref"
56
-
57
55
  this.ref = node;
58
56
  };
59
57
 
@@ -141,16 +139,20 @@ let SimpleSelect = (_dec = (0, _testable.testable)(), _dec(_class = (_temp = _cl
141
139
  };
142
140
  }
143
141
 
142
+ get _select() {
143
+ return this.ref;
144
+ }
145
+
144
146
  focus() {
145
- this._select && this._select.focus();
147
+ this.ref && this.ref.focus();
146
148
  }
147
149
 
148
150
  get focused() {
149
- return this._select && this._select.focused;
151
+ return this.ref && this.ref.focused;
150
152
  }
151
153
 
152
154
  get id() {
153
- return this._select && this._select.id;
155
+ return this.ref && this.ref.id;
154
156
  }
155
157
 
156
158
  get isControlled() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-simple-select",
3
- "version": "8.11.2-snapshot.3+6c8116bbe",
3
+ "version": "8.11.2-snapshot.39+5b3b94d60",
4
4
  "description": "A component for standard select element behavior.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "type": "commonjs",
@@ -25,22 +25,22 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.13.10",
28
- "@instructure/console": "8.11.2-snapshot.3+6c8116bbe",
29
- "@instructure/ui-form-field": "8.11.2-snapshot.3+6c8116bbe",
30
- "@instructure/ui-position": "8.11.2-snapshot.3+6c8116bbe",
31
- "@instructure/ui-prop-types": "8.11.2-snapshot.3+6c8116bbe",
32
- "@instructure/ui-react-utils": "8.11.2-snapshot.3+6c8116bbe",
33
- "@instructure/ui-select": "8.11.2-snapshot.3+6c8116bbe",
34
- "@instructure/ui-testable": "8.11.2-snapshot.3+6c8116bbe",
35
- "@instructure/uid": "8.11.2-snapshot.3+6c8116bbe",
28
+ "@instructure/console": "8.11.2-snapshot.39+5b3b94d60",
29
+ "@instructure/ui-form-field": "8.11.2-snapshot.39+5b3b94d60",
30
+ "@instructure/ui-position": "8.11.2-snapshot.39+5b3b94d60",
31
+ "@instructure/ui-prop-types": "8.11.2-snapshot.39+5b3b94d60",
32
+ "@instructure/ui-react-utils": "8.11.2-snapshot.39+5b3b94d60",
33
+ "@instructure/ui-select": "8.11.2-snapshot.39+5b3b94d60",
34
+ "@instructure/ui-testable": "8.11.2-snapshot.39+5b3b94d60",
35
+ "@instructure/uid": "8.11.2-snapshot.39+5b3b94d60",
36
36
  "prop-types": "^15"
37
37
  },
38
38
  "devDependencies": {
39
- "@instructure/ui-babel-preset": "8.11.2-snapshot.3+6c8116bbe",
40
- "@instructure/ui-color-utils": "8.11.2-snapshot.3+6c8116bbe",
41
- "@instructure/ui-icons": "8.11.2-snapshot.3+6c8116bbe",
42
- "@instructure/ui-test-locator": "8.11.2-snapshot.3+6c8116bbe",
43
- "@instructure/ui-test-utils": "8.11.2-snapshot.3+6c8116bbe"
39
+ "@instructure/ui-babel-preset": "8.11.2-snapshot.39+5b3b94d60",
40
+ "@instructure/ui-color-utils": "8.11.2-snapshot.39+5b3b94d60",
41
+ "@instructure/ui-icons": "8.11.2-snapshot.39+5b3b94d60",
42
+ "@instructure/ui-test-locator": "8.11.2-snapshot.39+5b3b94d60",
43
+ "@instructure/ui-test-utils": "8.11.2-snapshot.39+5b3b94d60"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=16.8 <=17"
@@ -49,5 +49,5 @@
49
49
  "access": "public"
50
50
  },
51
51
  "sideEffects": false,
52
- "gitHead": "6c8116bbe87878c77fca03bf26de932b40e21302"
52
+ "gitHead": "5b3b94d60693dc069b6ff4fde8f2ca1a72462ab7"
53
53
  }
@@ -103,19 +103,26 @@ class SimpleSelect extends Component<SimpleSelectProps> {
103
103
 
104
104
  _emptyOptionId = uid('Select-EmptyOption')
105
105
 
106
+ get _select() {
107
+ console.warn(
108
+ '_select property is deprecated and will be removed in v9, please use ref instead'
109
+ )
110
+
111
+ return this.ref
112
+ }
113
+
106
114
  focus() {
107
- // @ts-expect-error ts-migrate(2339) FIXME: Property '_select' does not exist on type 'SimpleS... Remove this comment to see the full error message
108
- this._select && this._select.focus()
115
+ // @ts-expect-error ts-migrate(2339) FIXME: Property 'ref' does not exist on type 'SimpleS... Remove this comment to see the full error message
116
+ this.ref && this.ref.focus()
109
117
  }
110
118
 
111
119
  get focused() {
112
- // @ts-expect-error ts-migrate(2339) FIXME: Property '_select' does not exist on type 'SimpleS... Remove this comment to see the full error message
113
- return this._select && this._select.focused
120
+ // @ts-expect-error ts-migrate(2339) FIXME: Property 'ref' does not exist on type 'SimpleS... Remove this comment to see the full error message
121
+ return this.ref && this.ref.focused
114
122
  }
115
123
 
116
124
  get id() {
117
- // @ts-expect-error ts-migrate(2339) FIXME: Property '_select' does not exist on type 'SimpleS... Remove this comment to see the full error message
118
- return this._select && this._select.id
125
+ return this.ref && this.ref.id
119
126
  }
120
127
 
121
128
  get isControlled() {
@@ -215,8 +222,6 @@ class SimpleSelect extends Component<SimpleSelectProps> {
215
222
 
216
223
  // @ts-expect-error ts-migrate(7006) FIXME: Parameter 'node' implicitly has an 'any' type.
217
224
  handleRef = (node) => {
218
- // @ts-expect-error ts-migrate(2339) FIXME: Property '_select' does not exist on type 'SimpleS... Remove this comment to see the full error message
219
- this._select = node // TODO remove this in v9 and keep only "ref"
220
225
  this.ref = node
221
226
  }
222
227
 
@@ -95,9 +95,10 @@ declare class SimpleSelect extends Component<SimpleSelectProps> {
95
95
  ref: Element | null;
96
96
  constructor(props: any);
97
97
  _emptyOptionId: string;
98
+ get _select(): Element | null;
98
99
  focus(): void;
99
100
  get focused(): any;
100
- get id(): any;
101
+ get id(): string | null;
101
102
  get isControlled(): boolean;
102
103
  get interaction(): import("@instructure/ui-react-utils").InteractionType;
103
104
  componentDidUpdate(prevProps: any): void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/SimpleSelect/index.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAYlD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAGhD;;;;;GAKG;AACH,cACM,YAAa,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACrD,MAAM,CAAC,QAAQ,CAAC,WAAW,kBAAiB;IAE5C,MAAM,CAAC,MAAM,gBAAS;IACtB,MAAM,CAAC,KAAK,eAAQ;IAEpB,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAAe;IAClC,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;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