@instructure/ui-simple-select 8.11.2-snapshot.15 → 8.11.2-snapshot.23
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/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() {
|
|
@@ -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.11.2-snapshot.
|
|
3
|
+
"version": "8.11.2-snapshot.23+0d8081052",
|
|
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.
|
|
29
|
-
"@instructure/ui-form-field": "8.11.2-snapshot.
|
|
30
|
-
"@instructure/ui-position": "8.11.2-snapshot.
|
|
31
|
-
"@instructure/ui-prop-types": "8.11.2-snapshot.
|
|
32
|
-
"@instructure/ui-react-utils": "8.11.2-snapshot.
|
|
33
|
-
"@instructure/ui-select": "8.11.2-snapshot.
|
|
34
|
-
"@instructure/ui-testable": "8.11.2-snapshot.
|
|
35
|
-
"@instructure/uid": "8.11.2-snapshot.
|
|
28
|
+
"@instructure/console": "8.11.2-snapshot.23+0d8081052",
|
|
29
|
+
"@instructure/ui-form-field": "8.11.2-snapshot.23+0d8081052",
|
|
30
|
+
"@instructure/ui-position": "8.11.2-snapshot.23+0d8081052",
|
|
31
|
+
"@instructure/ui-prop-types": "8.11.2-snapshot.23+0d8081052",
|
|
32
|
+
"@instructure/ui-react-utils": "8.11.2-snapshot.23+0d8081052",
|
|
33
|
+
"@instructure/ui-select": "8.11.2-snapshot.23+0d8081052",
|
|
34
|
+
"@instructure/ui-testable": "8.11.2-snapshot.23+0d8081052",
|
|
35
|
+
"@instructure/uid": "8.11.2-snapshot.23+0d8081052",
|
|
36
36
|
"prop-types": "^15"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@instructure/ui-babel-preset": "8.11.2-snapshot.
|
|
40
|
-
"@instructure/ui-color-utils": "8.11.2-snapshot.
|
|
41
|
-
"@instructure/ui-icons": "8.11.2-snapshot.
|
|
42
|
-
"@instructure/ui-test-locator": "8.11.2-snapshot.
|
|
43
|
-
"@instructure/ui-test-utils": "8.11.2-snapshot.
|
|
39
|
+
"@instructure/ui-babel-preset": "8.11.2-snapshot.23+0d8081052",
|
|
40
|
+
"@instructure/ui-color-utils": "8.11.2-snapshot.23+0d8081052",
|
|
41
|
+
"@instructure/ui-icons": "8.11.2-snapshot.23+0d8081052",
|
|
42
|
+
"@instructure/ui-test-locator": "8.11.2-snapshot.23+0d8081052",
|
|
43
|
+
"@instructure/ui-test-utils": "8.11.2-snapshot.23+0d8081052"
|
|
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": "
|
|
52
|
+
"gitHead": "0d8081052d9986085a7d0c62ee9ac41a1dcf8608"
|
|
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 '
|
|
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,QAGV;IAED,IAAI,EAAE,
|
|
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,S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