@instructure/ui-simple-select 8.11.2-snapshot.7 → 8.12.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/CHANGELOG.md +4 -0
- package/es/SimpleSelect/index.js +7 -5
- package/es/package.json +1 -0
- package/lib/SimpleSelect/index.js +7 -5
- package/package.json +15 -16
- package/src/SimpleSelect/index.tsx +13 -8
- package/types/SimpleSelect/index.d.ts +2 -1
- package/types/SimpleSelect/index.d.ts.map +1 -1
- package/LICENSE.md +0 -27
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.12.0](https://github.com/instructure/instructure-ui/compare/v8.11.1...v8.12.0) (2021-11-17)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-simple-select
|
|
9
|
+
|
|
6
10
|
## [8.11.1](https://github.com/instructure/instructure-ui/compare/v8.11.0...v8.11.1) (2021-10-19)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
package/es/SimpleSelect/index.js
CHANGED
|
@@ -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.
|
|
145
|
+
this.ref && this.ref.focus();
|
|
144
146
|
}
|
|
145
147
|
|
|
146
148
|
get focused() {
|
|
147
|
-
return this.
|
|
149
|
+
return this.ref && this.ref.focused;
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
get id() {
|
|
151
|
-
return this.
|
|
153
|
+
return this.ref && this.ref.id;
|
|
152
154
|
}
|
|
153
155
|
|
|
154
156
|
get isControlled() {
|
package/es/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -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.
|
|
147
|
+
this.ref && this.ref.focus();
|
|
146
148
|
}
|
|
147
149
|
|
|
148
150
|
get focused() {
|
|
149
|
-
return this.
|
|
151
|
+
return this.ref && this.ref.focused;
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
get id() {
|
|
153
|
-
return this.
|
|
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.
|
|
3
|
+
"version": "8.12.0",
|
|
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.
|
|
29
|
-
"@instructure/ui-form-field": "8.
|
|
30
|
-
"@instructure/ui-position": "8.
|
|
31
|
-
"@instructure/ui-prop-types": "8.
|
|
32
|
-
"@instructure/ui-react-utils": "8.
|
|
33
|
-
"@instructure/ui-select": "8.
|
|
34
|
-
"@instructure/ui-testable": "8.
|
|
35
|
-
"@instructure/uid": "8.
|
|
28
|
+
"@instructure/console": "8.12.0",
|
|
29
|
+
"@instructure/ui-form-field": "8.12.0",
|
|
30
|
+
"@instructure/ui-position": "8.12.0",
|
|
31
|
+
"@instructure/ui-prop-types": "8.12.0",
|
|
32
|
+
"@instructure/ui-react-utils": "8.12.0",
|
|
33
|
+
"@instructure/ui-select": "8.12.0",
|
|
34
|
+
"@instructure/ui-testable": "8.12.0",
|
|
35
|
+
"@instructure/uid": "8.12.0",
|
|
36
36
|
"prop-types": "^15"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-babel-preset": "8.
|
|
40
|
-
"@instructure/ui-color-utils": "8.
|
|
41
|
-
"@instructure/ui-icons": "8.
|
|
42
|
-
"@instructure/ui-test-locator": "8.
|
|
43
|
-
"@instructure/ui-test-utils": "8.
|
|
39
|
+
"@instructure/ui-babel-preset": "8.12.0",
|
|
40
|
+
"@instructure/ui-color-utils": "8.12.0",
|
|
41
|
+
"@instructure/ui-icons": "8.12.0",
|
|
42
|
+
"@instructure/ui-test-locator": "8.12.0",
|
|
43
|
+
"@instructure/ui-test-utils": "8.12.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": ">=16.8 <=17"
|
|
@@ -48,6 +48,5 @@
|
|
|
48
48
|
"publishConfig": {
|
|
49
49
|
"access": "public"
|
|
50
50
|
},
|
|
51
|
-
"sideEffects": false
|
|
52
|
-
"gitHead": "2681e145ad469e1396536d3e9eed75a19995eb8a"
|
|
51
|
+
"sideEffects": false
|
|
53
52
|
}
|
|
@@ -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 '
|
|
108
|
-
this.
|
|
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 '
|
|
113
|
-
return this.
|
|
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
|
-
|
|
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():
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAE5B,MAAM,CAAC,YAAY;;;;;;;;;;;;;;;;;;;MA0BlB;IAED,GAAG,EAAE,OAAO,GAAG,IAAI,CAAO;gBAGd,KAAK,KAAA;IAejB,cAAc,SAA4B;IAE1C,KAAK;IAKL,IAAI,OAAO,QAG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B;IAajB,YAAY,CAAC,MAAM,KAAA;IAgDnB,WAAW,CAAC,KAAK,KAAA;IAajB,MAAM;CAuEP;AAED,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,eAAe,YAAY,CAAA"}
|
package/LICENSE.md
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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.
|