@jetbrains/ring-ui-built 7.0.0-beta.3 → 7.0.0-beta.4
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/components/_helpers/anchor.js +0 -5
- package/components/_helpers/caption.js +1 -5
- package/components/_helpers/card.js +0 -28
- package/components/_helpers/icon__svg.js +0 -6
- package/components/_helpers/input.js +0 -21
- package/components/_helpers/select__filter.js +0 -8
- package/components/_helpers/services-link.js +1 -11
- package/components/_helpers/sidebar.js +0 -9
- package/components/_helpers/tab-link.js +0 -6
- package/components/_helpers/theme.js +1 -1
- package/components/_helpers/title.js +0 -15
- package/components/alert/alert.d.ts +7 -24
- package/components/alert/alert.js +0 -24
- package/components/alert/container.d.ts +0 -5
- package/components/alert/container.js +1 -6
- package/components/alert-service/alert-service.js +0 -1
- package/components/auth/auth.js +0 -1
- package/components/auth/auth__core.d.ts +3 -3
- package/components/auth/auth__core.js +28 -20
- package/components/auth/down-notification.js +0 -9
- package/components/auth/iframe-flow.js +0 -1
- package/components/auth/storage.js +0 -1
- package/components/auth-dialog/auth-dialog.d.ts +0 -18
- package/components/auth-dialog/auth-dialog.js +7 -25
- package/components/auth-dialog-service/auth-dialog-service.js +4 -5
- package/components/avatar/avatar.d.ts +0 -13
- package/components/avatar/avatar.js +0 -13
- package/components/avatar/fallback-avatar.d.ts +1 -10
- package/components/avatar/fallback-avatar.js +0 -6
- package/components/badge/badge.d.ts +0 -10
- package/components/badge/badge.js +1 -11
- package/components/button/button.d.ts +0 -21
- package/components/button/button.js +0 -21
- package/components/button-group/button-group.d.ts +0 -5
- package/components/button-group/button-group.js +1 -6
- package/components/button-group/caption.d.ts +0 -4
- package/components/button-group/caption.js +0 -1
- package/components/button-set/button-set.d.ts +0 -6
- package/components/button-set/button-set.js +1 -7
- package/components/button-toolbar/button-toolbar.d.ts +0 -6
- package/components/button-toolbar/button-toolbar.js +1 -7
- package/components/checkbox/checkbox.d.ts +0 -19
- package/components/checkbox/checkbox.js +0 -18
- package/components/clipboard/clipboard.js +0 -1
- package/components/code/code.d.ts +0 -12
- package/components/code/code.js +0 -12
- package/components/confirm/confirm.d.ts +0 -14
- package/components/confirm/confirm.js +10 -24
- package/components/confirm-service/confirm-service.js +0 -1
- package/components/content-layout/content-layout.d.ts +0 -7
- package/components/content-layout/content-layout.js +0 -7
- package/components/content-layout/sidebar.d.ts +0 -9
- package/components/content-layout/sidebar.js +0 -1
- package/components/contenteditable/contenteditable.d.ts +1 -22
- package/components/contenteditable/contenteditable.js +1 -16
- package/components/control-label/control-label.js +0 -6
- package/components/data-list/data-list.d.ts +0 -2
- package/components/data-list/data-list.js +2 -23
- package/components/data-list/data-list.mock.js +0 -1
- package/components/data-list/item.js +0 -26
- package/components/data-list/title.d.ts +2 -2
- package/components/data-list/title.js +0 -2
- package/components/date-picker/consts.d.ts +0 -2
- package/components/date-picker/consts.js +1 -3
- package/components/date-picker/date-input.d.ts +0 -20
- package/components/date-picker/date-input.js +0 -23
- package/components/date-picker/date-picker.d.ts +0 -29
- package/components/date-picker/date-picker.js +3 -40
- package/components/date-picker/date-popup.d.ts +0 -22
- package/components/date-picker/date-popup.js +1 -24
- package/components/date-picker/day.d.ts +0 -14
- package/components/date-picker/day.js +1 -15
- package/components/date-picker/month-names.d.ts +1 -11
- package/components/date-picker/month-names.js +2 -14
- package/components/date-picker/month-slider.d.ts +0 -9
- package/components/date-picker/month-slider.js +1 -10
- package/components/date-picker/month.d.ts +1 -9
- package/components/date-picker/month.js +1 -6
- package/components/date-picker/months.d.ts +1 -9
- package/components/date-picker/months.js +1 -6
- package/components/date-picker/weekdays.d.ts +2 -8
- package/components/date-picker/weekdays.js +0 -4
- package/components/date-picker/years.d.ts +0 -6
- package/components/date-picker/years.js +1 -7
- package/components/dialog/dialog.d.ts +0 -20
- package/components/dialog/dialog.js +2 -24
- package/components/dropdown/anchor.d.ts +1 -8
- package/components/dropdown/anchor.js +0 -1
- package/components/dropdown/dropdown.d.ts +4 -22
- package/components/dropdown/dropdown.js +0 -22
- package/components/dropdown-menu/dropdown-menu.js +9 -33
- package/components/editable-heading/editable-heading.js +0 -2
- package/components/error-bubble/error-bubble.d.ts +0 -6
- package/components/error-bubble/error-bubble.js +1 -7
- package/components/error-message/error-message.d.ts +0 -10
- package/components/error-message/error-message.js +1 -11
- package/components/footer/footer.js +0 -15
- package/components/global/create-stateful-context.d.ts +0 -4
- package/components/global/create-stateful-context.js +0 -4
- package/components/global/focus-sensor-hoc.js +7 -27
- package/components/global/react-dom-renderer.d.ts +0 -5
- package/components/global/react-dom-renderer.js +0 -5
- package/components/global/theme.d.ts +1 -0
- package/components/global/theme.js +1 -2
- package/components/grid/col.d.ts +0 -14
- package/components/grid/col.js +1 -16
- package/components/grid/grid.d.ts +0 -5
- package/components/grid/grid.js +1 -6
- package/components/grid/row.d.ts +0 -18
- package/components/grid/row.js +1 -19
- package/components/group/group.d.ts +0 -5
- package/components/group/group.js +1 -6
- package/components/header/header-icon.d.ts +0 -22
- package/components/header/header-icon.js +1 -6
- package/components/header/header.d.ts +0 -6
- package/components/header/header.js +0 -7
- package/components/header/logo.d.ts +0 -4
- package/components/header/logo.js +0 -4
- package/components/header/profile.d.ts +1 -39
- package/components/header/profile.js +1 -40
- package/components/header/services-link.d.ts +0 -10
- package/components/header/services-link.js +0 -1
- package/components/header/services.d.ts +0 -14
- package/components/header/services.js +1 -13
- package/components/header/smart-profile.d.ts +0 -9
- package/components/header/smart-profile.js +19 -28
- package/components/header/smart-services.d.ts +0 -4
- package/components/header/smart-services.js +17 -51
- package/components/header/tray.d.ts +0 -5
- package/components/header/tray.js +1 -6
- package/components/heading/heading.js +0 -6
- package/components/icon/icon.d.ts +0 -11
- package/components/icon/icon.js +0 -11
- package/components/icon/icon__svg.d.ts +0 -8
- package/components/icon/icon__svg.js +0 -1
- package/components/icon/index.js +0 -1
- package/components/input/input.js +0 -2
- package/components/island/adaptive-island-hoc.d.ts +0 -1
- package/components/island/adaptive-island-hoc.js +3 -4
- package/components/island/content.d.ts +0 -10
- package/components/island/content.js +2 -12
- package/components/island/header.js +2 -10
- package/components/island/island.d.ts +0 -9
- package/components/island/island.js +1 -9
- package/components/island-legacy/content-legacy.d.ts +0 -5
- package/components/island-legacy/content-legacy.js +1 -6
- package/components/island-legacy/header-legacy.d.ts +0 -5
- package/components/island-legacy/header-legacy.js +1 -6
- package/components/island-legacy/island-legacy.d.ts +0 -5
- package/components/island-legacy/island-legacy.js +1 -6
- package/components/link/clickableLink.d.ts +0 -9
- package/components/link/clickableLink.js +0 -9
- package/components/link/link.d.ts +0 -25
- package/components/link/link.js +3 -16
- package/components/list/list.d.ts +0 -32
- package/components/list/list.js +1 -31
- package/components/list/list__custom.js +0 -17
- package/components/list/list__hint.d.ts +0 -4
- package/components/list/list__hint.js +0 -5
- package/components/list/list__item.js +0 -33
- package/components/list/list__link.js +2 -13
- package/components/list/list__separator.js +0 -6
- package/components/list/list__title.js +0 -7
- package/components/list/list__users-groups-source.js +0 -2
- package/components/loader/loader.d.ts +0 -10
- package/components/loader/loader.js +0 -10
- package/components/loader-inline/loader-inline.d.ts +0 -6
- package/components/loader-inline/loader-inline.js +1 -7
- package/components/loader-screen/loader-screen.d.ts +0 -6
- package/components/loader-screen/loader-screen.js +1 -7
- package/components/login-dialog/login-dialog.d.ts +0 -11
- package/components/login-dialog/login-dialog.js +12 -23
- package/components/login-dialog/service.js +3 -2
- package/components/markdown/markdown.js +0 -5
- package/components/message/message.js +0 -16
- package/components/pager/pager.js +0 -20
- package/components/panel/panel.d.ts +0 -5
- package/components/panel/panel.js +1 -6
- package/components/popup/popup.js +0 -41
- package/components/popup/popup.target.js +0 -5
- package/components/popup-menu/popup-menu.js +1 -12
- package/components/progress-bar/progress-bar.d.ts +19 -33
- package/components/progress-bar/progress-bar.js +0 -33
- package/components/query-assist/query-assist.d.ts +63 -93
- package/components/query-assist/query-assist.js +0 -94
- package/components/query-assist/query-assist__suggestions.js +0 -2
- package/components/radio/radio.d.ts +0 -8
- package/components/radio/radio.js +0 -8
- package/components/radio/radio__item.d.ts +0 -9
- package/components/radio/radio__item.js +0 -10
- package/components/select/select.js +0 -65
- package/components/select/select__filter.js +0 -2
- package/components/select/select__popup.js +1 -52
- package/components/shortcuts/core.js +1 -1
- package/components/shortcuts/shortcuts-hoc.d.ts +0 -5
- package/components/shortcuts/shortcuts-hoc.js +2 -7
- package/components/shortcuts/shortcuts.d.ts +0 -8
- package/components/shortcuts/shortcuts.js +0 -8
- package/components/slider/slider.js +0 -1
- package/components/storage/storage.js +0 -1
- package/components/storage/storage__local.js +0 -1
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +0 -8
- package/components/table/cell.d.ts +0 -6
- package/components/table/cell.js +1 -7
- package/components/table/disable-hover-hoc.d.ts +0 -1
- package/components/table/disable-hover-hoc.js +1 -1
- package/components/table/header-cell.d.ts +0 -10
- package/components/table/header-cell.js +0 -10
- package/components/table/header.d.ts +0 -15
- package/components/table/header.js +0 -16
- package/components/table/multitable.d.ts +0 -4
- package/components/table/multitable.js +0 -4
- package/components/table/row-with-focus-sensor.d.ts +2 -2
- package/components/table/row-with-focus-sensor.js +0 -3
- package/components/table/row.js +0 -35
- package/components/table/selection-shortcuts-hoc.js +3 -22
- package/components/table/simple-table.d.ts +0 -44
- package/components/table/simple-table.js +1 -7
- package/components/table/smart-table.d.ts +0 -48
- package/components/table/smart-table.js +1 -10
- package/components/table/table.d.ts +0 -2
- package/components/table/table.js +3 -52
- package/components/tabs/collapsible-more.d.ts +1 -9
- package/components/tabs/collapsible-more.js +0 -24
- package/components/tabs/collapsible-tab.js +1 -9
- package/components/tabs/collapsible-tabs.d.ts +2 -29
- package/components/tabs/collapsible-tabs.js +0 -13
- package/components/tabs/custom-item.d.ts +1 -7
- package/components/tabs/custom-item.js +0 -5
- package/components/tabs/dumb-tabs.d.ts +0 -11
- package/components/tabs/dumb-tabs.js +0 -12
- package/components/tabs/smart-tabs.d.ts +0 -6
- package/components/tabs/smart-tabs.js +0 -7
- package/components/tabs/tab-link.d.ts +0 -8
- package/components/tabs/tab-link.js +0 -1
- package/components/tabs/tab.d.ts +0 -8
- package/components/tabs/tab.js +0 -9
- package/components/tabs/tabs.js +0 -2
- package/components/tag/tag.d.ts +0 -17
- package/components/tag/tag.js +0 -17
- package/components/tags-input/tags-input.d.ts +7 -33
- package/components/tags-input/tags-input.js +1 -34
- package/components/tags-list/tags-list.d.ts +0 -13
- package/components/tags-list/tags-list.js +0 -13
- package/components/text/text.d.ts +0 -7
- package/components/text/text.js +0 -7
- package/components/toggle/toggle.d.ts +0 -15
- package/components/toggle/toggle.js +0 -15
- package/components/tooltip/tooltip.d.ts +0 -9
- package/components/tooltip/tooltip.js +0 -9
- package/components/user-agreement/service.js +0 -1
- package/components/user-agreement/user-agreement.d.ts +0 -18
- package/components/user-agreement/user-agreement.js +11 -29
- package/components/user-card/card.d.ts +0 -35
- package/components/user-card/card.js +0 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +0 -5
- package/components/user-card/smart-user-card-tooltip.js +0 -5
- package/components/user-card/tooltip.d.ts +0 -9
- package/components/user-card/tooltip.js +0 -9
- package/components/user-card/user-card.js +0 -1
- package/package.json +1 -2
- package/components/global/prop-types.d.ts +0 -4
- package/components/global/prop-types.js +0 -7
@@ -1,6 +1,5 @@
|
|
1
1
|
import { Component, ComponentRef, ReactNode, SyntheticEvent } from 'react';
|
2
2
|
import * as React from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
3
|
import Caret, { Position } from '../caret/caret';
|
5
4
|
import PopupMenu from '../popup-menu/popup-menu';
|
6
5
|
import Button from '../button/button';
|
@@ -37,27 +36,90 @@ export interface QueryAssistRequestParams {
|
|
37
36
|
omitSuggestions?: boolean;
|
38
37
|
}
|
39
38
|
export interface QueryAssistProps {
|
39
|
+
/**
|
40
|
+
* Called when the query is applied. An object with fields `caret`, `focus` and `query` is passed as an argument
|
41
|
+
*/
|
40
42
|
onApply: (change: QueryAssistChange) => void;
|
43
|
+
/**
|
44
|
+
* Called when the query is changed. An object with fields `caret` and `query` is passed as an argument
|
45
|
+
*/
|
41
46
|
onChange: (change: QueryAssistChange) => void;
|
47
|
+
/**
|
48
|
+
* Called when the suggestion is applied
|
49
|
+
*/
|
42
50
|
onApplySuggestion: (suggestion: QueryAssistSuggestion, change: QueryAssistChange) => void;
|
51
|
+
/**
|
52
|
+
* Called when the query is cleared. Called without arguments
|
53
|
+
*/
|
43
54
|
onClear: () => void;
|
55
|
+
/**
|
56
|
+
* Called when the focus status is changed. An object with fields `focus` is passed as an argument
|
57
|
+
*/
|
44
58
|
onFocusChange: (change: FocusChange) => void;
|
45
59
|
translations?: QueryAssistTranslations | null | undefined;
|
60
|
+
/**
|
61
|
+
* Open suggestions popup during the initial render
|
62
|
+
*/
|
46
63
|
autoOpen?: boolean | null | undefined | 'force';
|
64
|
+
/**
|
65
|
+
* Initial caret position
|
66
|
+
*/
|
47
67
|
caret?: number | null | undefined;
|
68
|
+
/**
|
69
|
+
* Show clickable "cross" icon on the right which clears the query
|
70
|
+
*/
|
48
71
|
clear?: boolean | null | undefined;
|
72
|
+
/**
|
73
|
+
* Additional class for the component
|
74
|
+
*/
|
49
75
|
className?: string | null | undefined;
|
76
|
+
/**
|
77
|
+
* Additional class for the popup
|
78
|
+
*/
|
50
79
|
popupClassName?: string | null | undefined;
|
80
|
+
/**
|
81
|
+
* Additional class for the input
|
82
|
+
*/
|
51
83
|
inputClassName?: string | null | undefined;
|
84
|
+
/**
|
85
|
+
* Data source function
|
86
|
+
*/
|
52
87
|
dataSource: (params: QueryAssistRequestParams) => Promise<QueryAssistResponse> | QueryAssistResponse;
|
88
|
+
/**
|
89
|
+
* Input debounce delay
|
90
|
+
*/
|
53
91
|
delay?: number | null | undefined;
|
92
|
+
/**
|
93
|
+
* Disable the component
|
94
|
+
*/
|
54
95
|
disabled?: boolean | undefined;
|
96
|
+
/**
|
97
|
+
* Initial focus
|
98
|
+
*/
|
55
99
|
focus?: boolean | null | undefined;
|
100
|
+
/**
|
101
|
+
* Hint under the suggestions list
|
102
|
+
*/
|
56
103
|
hint?: string | null | undefined;
|
104
|
+
/**
|
105
|
+
* Hint under the suggestions list visible when a suggestion is selected
|
106
|
+
*/
|
57
107
|
hintOnSelection?: string | null | undefined;
|
108
|
+
/**
|
109
|
+
* Show clickable "glass" icon on the right which applies the query
|
110
|
+
*/
|
58
111
|
glass?: boolean | null | undefined;
|
112
|
+
/**
|
113
|
+
* Show loader when a data request is in process
|
114
|
+
*/
|
59
115
|
loader?: boolean | null | undefined;
|
116
|
+
/**
|
117
|
+
* Field placeholder value
|
118
|
+
*/
|
60
119
|
placeholder?: string | null | undefined;
|
120
|
+
/**
|
121
|
+
* Initial query
|
122
|
+
*/
|
61
123
|
query?: string | null | undefined;
|
62
124
|
useCustomItemRender?: boolean | null | undefined;
|
63
125
|
actions?: ReactNode[] | null | undefined;
|
@@ -129,98 +191,6 @@ interface HistoryEntry {
|
|
129
191
|
+ __icon__ \`string=\` Icon URI, Data URI is possible
|
130
192
|
*/
|
131
193
|
export default class QueryAssist extends Component<QueryAssistProps> {
|
132
|
-
static propTypes: {
|
133
|
-
/**
|
134
|
-
* Open suggestions popup during the initial render
|
135
|
-
*/
|
136
|
-
autoOpen: PropTypes.Requireable<string | boolean>;
|
137
|
-
/**
|
138
|
-
* Initial caret position
|
139
|
-
*/
|
140
|
-
caret: PropTypes.Requireable<number>;
|
141
|
-
/**
|
142
|
-
* Show clickable "cross" icon on the right which clears the query
|
143
|
-
*/
|
144
|
-
clear: PropTypes.Requireable<boolean>;
|
145
|
-
/**
|
146
|
-
* Additional class for the component
|
147
|
-
*/
|
148
|
-
className: PropTypes.Requireable<string>;
|
149
|
-
/**
|
150
|
-
* Additional class for the popup
|
151
|
-
*/
|
152
|
-
popupClassName: PropTypes.Requireable<string>;
|
153
|
-
/**
|
154
|
-
* Additional class for the input
|
155
|
-
*/
|
156
|
-
inputClassName: PropTypes.Requireable<string>;
|
157
|
-
/**
|
158
|
-
* Data source function
|
159
|
-
*/
|
160
|
-
dataSource: PropTypes.Validator<(...args: any[]) => any>;
|
161
|
-
/**
|
162
|
-
* Input debounce delay
|
163
|
-
*/
|
164
|
-
delay: PropTypes.Requireable<number>;
|
165
|
-
/**
|
166
|
-
* Disable the component
|
167
|
-
*/
|
168
|
-
disabled: PropTypes.Requireable<boolean>;
|
169
|
-
/**
|
170
|
-
* Initial focus
|
171
|
-
*/
|
172
|
-
focus: PropTypes.Requireable<boolean>;
|
173
|
-
/**
|
174
|
-
* Hint under the suggestions list
|
175
|
-
*/
|
176
|
-
hint: PropTypes.Requireable<string>;
|
177
|
-
/**
|
178
|
-
* Hint under the suggestions list visible when a suggestion is selected
|
179
|
-
*/
|
180
|
-
hintOnSelection: PropTypes.Requireable<string>;
|
181
|
-
/**
|
182
|
-
* Show clickable "glass" icon on the right which applies the query
|
183
|
-
*/
|
184
|
-
glass: PropTypes.Requireable<boolean>;
|
185
|
-
/**
|
186
|
-
* Show loader when a data request is in process
|
187
|
-
*/
|
188
|
-
loader: PropTypes.Requireable<boolean>;
|
189
|
-
/**
|
190
|
-
* Field placeholder value
|
191
|
-
*/
|
192
|
-
placeholder: PropTypes.Requireable<string>;
|
193
|
-
/**
|
194
|
-
* Called when the query is applied. An object with fields `caret`, `focus` and `query` is passed as an argument
|
195
|
-
*/
|
196
|
-
onApply: PropTypes.Requireable<(...args: any[]) => any>;
|
197
|
-
/**
|
198
|
-
* Called when the query is changed. An object with fields `caret` and `query` is passed as an argument
|
199
|
-
*/
|
200
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
201
|
-
/**
|
202
|
-
* Called when the query is cleared. Called without arguments
|
203
|
-
*/
|
204
|
-
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
205
|
-
/**
|
206
|
-
* Called when the suggestion is applied
|
207
|
-
*/
|
208
|
-
onApplySuggestion: PropTypes.Requireable<(...args: any[]) => any>;
|
209
|
-
/**
|
210
|
-
* Called when the focus status is changed. An object with fields `focus` is passed as an argument
|
211
|
-
*/
|
212
|
-
onFocusChange: PropTypes.Requireable<(...args: any[]) => any>;
|
213
|
-
/**
|
214
|
-
* Initial query
|
215
|
-
*/
|
216
|
-
query: PropTypes.Requireable<string>;
|
217
|
-
useCustomItemRender: PropTypes.Requireable<boolean>;
|
218
|
-
translations: PropTypes.Requireable<object>;
|
219
|
-
actions: PropTypes.Requireable<any[]>;
|
220
|
-
'data-test': PropTypes.Requireable<string>;
|
221
|
-
huge: PropTypes.Requireable<boolean>;
|
222
|
-
size: PropTypes.Requireable<string>;
|
223
|
-
};
|
224
194
|
static defaultProps: {
|
225
195
|
onApply: typeof noop;
|
226
196
|
onChange: typeof noop;
|
@@ -4,7 +4,6 @@ import 'core-js/modules/es.regexp.exec.js';
|
|
4
4
|
import 'core-js/modules/es.string.replace.js';
|
5
5
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
6
6
|
import { Component } from 'react';
|
7
|
-
import PropTypes from 'prop-types';
|
8
7
|
import debounce from 'just-debounce-it';
|
9
8
|
import classNames from 'classnames';
|
10
9
|
import deepEqual from 'deep-equal';
|
@@ -57,7 +56,6 @@ import '../avatar/fallback-avatar.js';
|
|
57
56
|
import '../checkbox/checkbox.js';
|
58
57
|
import '@jetbrains/icons/checkmark-12px';
|
59
58
|
import '@jetbrains/icons/remove-12px';
|
60
|
-
import '../global/prop-types.js';
|
61
59
|
import '../global/composeRefs.js';
|
62
60
|
import '../control-help/control-help.js';
|
63
61
|
import '../list/list__custom.js';
|
@@ -934,98 +932,6 @@ class QueryAssist extends Component {
|
|
934
932
|
});
|
935
933
|
}
|
936
934
|
}
|
937
|
-
_defineProperty(QueryAssist, "propTypes", {
|
938
|
-
/**
|
939
|
-
* Open suggestions popup during the initial render
|
940
|
-
*/
|
941
|
-
autoOpen: PropTypes.oneOf([true, false, 'force']),
|
942
|
-
/**
|
943
|
-
* Initial caret position
|
944
|
-
*/
|
945
|
-
caret: PropTypes.number,
|
946
|
-
/**
|
947
|
-
* Show clickable "cross" icon on the right which clears the query
|
948
|
-
*/
|
949
|
-
clear: PropTypes.bool,
|
950
|
-
/**
|
951
|
-
* Additional class for the component
|
952
|
-
*/
|
953
|
-
className: PropTypes.string,
|
954
|
-
/**
|
955
|
-
* Additional class for the popup
|
956
|
-
*/
|
957
|
-
popupClassName: PropTypes.string,
|
958
|
-
/**
|
959
|
-
* Additional class for the input
|
960
|
-
*/
|
961
|
-
inputClassName: PropTypes.string,
|
962
|
-
/**
|
963
|
-
* Data source function
|
964
|
-
*/
|
965
|
-
dataSource: PropTypes.func.isRequired,
|
966
|
-
/**
|
967
|
-
* Input debounce delay
|
968
|
-
*/
|
969
|
-
delay: PropTypes.number,
|
970
|
-
/**
|
971
|
-
* Disable the component
|
972
|
-
*/
|
973
|
-
disabled: PropTypes.bool,
|
974
|
-
/**
|
975
|
-
* Initial focus
|
976
|
-
*/
|
977
|
-
focus: PropTypes.bool,
|
978
|
-
/**
|
979
|
-
* Hint under the suggestions list
|
980
|
-
*/
|
981
|
-
hint: PropTypes.string,
|
982
|
-
/**
|
983
|
-
* Hint under the suggestions list visible when a suggestion is selected
|
984
|
-
*/
|
985
|
-
hintOnSelection: PropTypes.string,
|
986
|
-
/**
|
987
|
-
* Show clickable "glass" icon on the right which applies the query
|
988
|
-
*/
|
989
|
-
glass: PropTypes.bool,
|
990
|
-
/**
|
991
|
-
* Show loader when a data request is in process
|
992
|
-
*/
|
993
|
-
loader: PropTypes.bool,
|
994
|
-
/**
|
995
|
-
* Field placeholder value
|
996
|
-
*/
|
997
|
-
placeholder: PropTypes.string,
|
998
|
-
/**
|
999
|
-
* Called when the query is applied. An object with fields `caret`, `focus` and `query` is passed as an argument
|
1000
|
-
*/
|
1001
|
-
onApply: PropTypes.func,
|
1002
|
-
/**
|
1003
|
-
* Called when the query is changed. An object with fields `caret` and `query` is passed as an argument
|
1004
|
-
*/
|
1005
|
-
onChange: PropTypes.func,
|
1006
|
-
/**
|
1007
|
-
* Called when the query is cleared. Called without arguments
|
1008
|
-
*/
|
1009
|
-
onClear: PropTypes.func,
|
1010
|
-
/**
|
1011
|
-
* Called when the suggestion is applied
|
1012
|
-
*/
|
1013
|
-
onApplySuggestion: PropTypes.func,
|
1014
|
-
/**
|
1015
|
-
* Called when the focus status is changed. An object with fields `focus` is passed as an argument
|
1016
|
-
*/
|
1017
|
-
onFocusChange: PropTypes.func,
|
1018
|
-
/**
|
1019
|
-
* Initial query
|
1020
|
-
*/
|
1021
|
-
query: PropTypes.string,
|
1022
|
-
useCustomItemRender: PropTypes.bool,
|
1023
|
-
translations: PropTypes.object,
|
1024
|
-
actions: PropTypes.array,
|
1025
|
-
'data-test': PropTypes.string,
|
1026
|
-
huge: PropTypes.bool,
|
1027
|
-
size: PropTypes.string
|
1028
|
-
});
|
1029
935
|
_defineProperty(QueryAssist, "defaultProps", {
|
1030
936
|
onApply: noop,
|
1031
937
|
onChange: noop,
|
@@ -5,7 +5,6 @@ import 'react/jsx-runtime';
|
|
5
5
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
6
6
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
7
|
import 'react';
|
8
|
-
import 'prop-types';
|
9
8
|
import 'classnames';
|
10
9
|
import 'react-virtualized/dist/es/List';
|
11
10
|
import 'react-virtualized/dist/es/AutoSizer';
|
@@ -42,7 +41,6 @@ import '@jetbrains/icons/remove-12px';
|
|
42
41
|
import '../icon/icon.js';
|
43
42
|
import '../icon/icon__constants.js';
|
44
43
|
import '../_helpers/icon__svg.js';
|
45
|
-
import '../global/prop-types.js';
|
46
44
|
import '../global/composeRefs.js';
|
47
45
|
import '../control-help/control-help.js';
|
48
46
|
import '../list/list__custom.js';
|
@@ -1,17 +1,9 @@
|
|
1
1
|
import { Component } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import { RadioProps } from './radio__item';
|
4
3
|
/**
|
5
4
|
* @name Radio
|
6
5
|
*/
|
7
6
|
export default class Radio extends Component<RadioProps> {
|
8
|
-
static propTypes: {
|
9
|
-
name: PropTypes.Requireable<string>;
|
10
|
-
disabled: PropTypes.Requireable<boolean>;
|
11
|
-
value: PropTypes.Requireable<NonNullable<string | number | boolean | null | undefined>>;
|
12
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
13
|
-
children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
14
|
-
};
|
15
7
|
static Item: import("react").ForwardRefExoticComponent<import("./radio__item").RadioItemProps & import("react").RefAttributes<import("./radio__item").RadioItemInner>>;
|
16
8
|
uid: string;
|
17
9
|
render(): import("react").JSX.Element;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
3
|
import { Component } from 'react';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import getUID from '../global/get-uid.js';
|
6
5
|
import RadioItem, { RadioContext } from './radio__item.js';
|
7
6
|
import { jsx } from 'react/jsx-runtime';
|
@@ -22,13 +21,6 @@ class Radio extends Component {
|
|
22
21
|
});
|
23
22
|
}
|
24
23
|
}
|
25
|
-
_defineProperty(Radio, "propTypes", {
|
26
|
-
name: PropTypes.string,
|
27
|
-
disabled: PropTypes.bool,
|
28
|
-
value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
29
|
-
onChange: PropTypes.func,
|
30
|
-
children: PropTypes.node.isRequired
|
31
|
-
});
|
32
24
|
_defineProperty(Radio, "Item", RadioItem);
|
33
25
|
|
34
26
|
export { Radio as default };
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { Component, InputHTMLAttributes, ReactNode } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
export interface RadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
4
3
|
value?: string | undefined;
|
5
4
|
onChange?: ((value: string) => void) | null | undefined;
|
@@ -9,14 +8,6 @@ export interface RadioItemInnerProps extends InputHTMLAttributes<HTMLInputElemen
|
|
9
8
|
help?: ReactNode;
|
10
9
|
}
|
11
10
|
export declare class RadioItemInner extends Component<RadioItemInnerProps> {
|
12
|
-
static propTypes: {
|
13
|
-
className: PropTypes.Requireable<string>;
|
14
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
15
|
-
value: PropTypes.Requireable<string>;
|
16
|
-
name: PropTypes.Requireable<string>;
|
17
|
-
checked: PropTypes.Requireable<boolean>;
|
18
|
-
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
19
|
-
};
|
20
11
|
uid: string;
|
21
12
|
input?: HTMLElement | null;
|
22
13
|
inputRef: (el: HTMLElement | null) => void;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
3
|
import { createContext, Component, forwardRef } from 'react';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import classNames from 'classnames';
|
6
5
|
import getUID from '../global/get-uid.js';
|
7
6
|
import ControlHelp from '../control-help/control-help.js';
|
@@ -55,14 +54,6 @@ class RadioItemInner extends Component {
|
|
55
54
|
});
|
56
55
|
}
|
57
56
|
}
|
58
|
-
_defineProperty(RadioItemInner, "propTypes", {
|
59
|
-
className: PropTypes.string,
|
60
|
-
children: PropTypes.node,
|
61
|
-
value: PropTypes.string,
|
62
|
-
name: PropTypes.string,
|
63
|
-
checked: PropTypes.bool,
|
64
|
-
onChange: PropTypes.func
|
65
|
-
});
|
66
57
|
const RadioItem = /*#__PURE__*/forwardRef(function RadioItem(props, ref) {
|
67
58
|
return /*#__PURE__*/jsx(RadioContext.Consumer, {
|
68
59
|
children: _ref => {
|
@@ -80,6 +71,5 @@ const RadioItem = /*#__PURE__*/forwardRef(function RadioItem(props, ref) {
|
|
80
71
|
}
|
81
72
|
});
|
82
73
|
});
|
83
|
-
RadioItem.propTypes = RadioItemInner.propTypes;
|
84
74
|
|
85
75
|
export { RadioContext, RadioItemInner, RadioItem as default };
|
@@ -6,7 +6,6 @@ import 'core-js/modules/es.string.trim.js';
|
|
6
6
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
7
|
import { Component, Fragment } from 'react';
|
8
8
|
import classNames from 'classnames';
|
9
|
-
import PropTypes from 'prop-types';
|
10
9
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
11
10
|
import closeIcon from '@jetbrains/icons/close-12px';
|
12
11
|
import deepEqual from 'deep-equal';
|
@@ -25,7 +24,6 @@ import fuzzyHighlight from '../global/fuzzy-highlight.js';
|
|
25
24
|
import memoize from '../global/memoize.js';
|
26
25
|
import { I18nContext } from '../i18n/i18n-context.js';
|
27
26
|
import { createComposedRef } from '../global/composeRefs.js';
|
28
|
-
import { refObject } from '../global/prop-types.js';
|
29
27
|
import { isArray } from '../global/typescript-utils.js';
|
30
28
|
import { ControlsHeight, ControlsHeightContext } from '../global/controls-height.js';
|
31
29
|
import SelectPopup from './select__popup.js';
|
@@ -1168,69 +1166,6 @@ _defineProperty(Select, "defaultProps", {
|
|
1168
1166
|
_defineProperty(Select, "contextType", ControlsHeightContext);
|
1169
1167
|
_defineProperty(Select, "Type", Type);
|
1170
1168
|
_defineProperty(Select, "Size", Size);
|
1171
|
-
Select.propTypes = {
|
1172
|
-
className: PropTypes.string,
|
1173
|
-
buttonClassName: PropTypes.string,
|
1174
|
-
id: PropTypes.string,
|
1175
|
-
multiple: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
1176
|
-
allowAny: PropTypes.bool,
|
1177
|
-
filter: PropTypes.oneOfType([PropTypes.bool, PropTypes.object]),
|
1178
|
-
filterIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
1179
|
-
filterRef: PropTypes.oneOfType([PropTypes.func, refObject(PropTypes.instanceOf(HTMLInputElement))]),
|
1180
|
-
getInitial: PropTypes.func,
|
1181
|
-
onClose: PropTypes.func,
|
1182
|
-
onOpen: PropTypes.func,
|
1183
|
-
onDone: PropTypes.func,
|
1184
|
-
onFilter: PropTypes.func,
|
1185
|
-
onChange: PropTypes.func,
|
1186
|
-
onReset: PropTypes.func,
|
1187
|
-
onLoadMore: PropTypes.func,
|
1188
|
-
onAdd: PropTypes.func,
|
1189
|
-
onBeforeOpen: PropTypes.func,
|
1190
|
-
onSelect: PropTypes.func,
|
1191
|
-
onDeselect: PropTypes.func,
|
1192
|
-
onOutsideClick: PropTypes.func,
|
1193
|
-
onFocus: PropTypes.func,
|
1194
|
-
onBlur: PropTypes.func,
|
1195
|
-
onKeyDown: PropTypes.func,
|
1196
|
-
selected: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
1197
|
-
data: PropTypes.array,
|
1198
|
-
tags: PropTypes.object,
|
1199
|
-
targetElement: PropTypes.object,
|
1200
|
-
loading: PropTypes.bool,
|
1201
|
-
loadingMessage: PropTypes.string,
|
1202
|
-
notFoundMessage: PropTypes.string,
|
1203
|
-
maxHeight: PropTypes.number,
|
1204
|
-
minWidth: PropTypes.number,
|
1205
|
-
directions: PropTypes.array,
|
1206
|
-
popupClassName: PropTypes.string,
|
1207
|
-
popupStyle: PropTypes.object,
|
1208
|
-
preventListOverscroll: PropTypes.bool,
|
1209
|
-
top: PropTypes.number,
|
1210
|
-
left: PropTypes.number,
|
1211
|
-
renderOptimization: PropTypes.bool,
|
1212
|
-
ringPopupTarget: PropTypes.string,
|
1213
|
-
error: PropTypes.string,
|
1214
|
-
hint: List.ListHint.propTypes.label,
|
1215
|
-
add: PropTypes.object,
|
1216
|
-
type: PropTypes.oneOf(Object.values(Type)),
|
1217
|
-
disabled: PropTypes.bool,
|
1218
|
-
hideSelected: PropTypes.bool,
|
1219
|
-
label: PropTypes.string,
|
1220
|
-
selectedLabel: PropTypes.oneOfType([PropTypes.string, PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
1221
|
-
inputPlaceholder: PropTypes.string,
|
1222
|
-
clear: PropTypes.bool,
|
1223
|
-
hideArrow: PropTypes.bool,
|
1224
|
-
showPopup: PropTypes.bool,
|
1225
|
-
tryKeepOpen: PropTypes.bool,
|
1226
|
-
compact: PropTypes.bool,
|
1227
|
-
size: PropTypes.oneOf(Object.values(Size)),
|
1228
|
-
customAnchor: PropTypes.func,
|
1229
|
-
disableMoveOverflow: PropTypes.bool,
|
1230
|
-
disableScrollToActive: PropTypes.bool,
|
1231
|
-
dir: PropTypes.oneOf(['ltr', 'rtl']),
|
1232
|
-
'data-test': PropTypes.string
|
1233
|
-
};
|
1234
1169
|
const RerenderableSelect = rerenderHOC(Select);
|
1235
1170
|
|
1236
1171
|
export { RerenderableSelect, Type, Select as default };
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
3
|
import 'react';
|
4
|
-
import 'prop-types';
|
5
4
|
import 'classnames';
|
6
5
|
import '../_helpers/input.js';
|
7
6
|
import '../global/sniffer.js';
|
@@ -10,7 +9,6 @@ import '../i18n/i18n-context.js';
|
|
10
9
|
export { S as default } from '../_helpers/select__filter.js';
|
11
10
|
import 'react/jsx-runtime';
|
12
11
|
import '@jetbrains/icons/close-12px';
|
13
|
-
import '../global/prop-types.js';
|
14
12
|
import '../button/button.js';
|
15
13
|
import '@jetbrains/icons/chevron-down';
|
16
14
|
import '../icon/icon.js';
|
@@ -5,7 +5,6 @@ import { PureComponent } from 'react';
|
|
5
5
|
import classNames from 'classnames';
|
6
6
|
import searchIcon from '@jetbrains/icons/search';
|
7
7
|
import memoizeOne from 'memoize-one';
|
8
|
-
import PropTypes from 'prop-types';
|
9
8
|
import Icon from '../icon/icon.js';
|
10
9
|
import Popup, { getPopupContainer } from '../popup/popup.js';
|
11
10
|
import { maxHeightForDirection } from '../popup/position.js';
|
@@ -22,10 +21,9 @@ import Shortcuts from '../shortcuts/shortcuts.js';
|
|
22
21
|
import { Button } from '../button/button.js';
|
23
22
|
import Text from '../text/text.js';
|
24
23
|
import { ControlsHeight } from '../global/controls-height.js';
|
25
|
-
import { refObject } from '../global/prop-types.js';
|
26
24
|
import { createComposedRef } from '../global/composeRefs.js';
|
27
25
|
import { DEFAULT_DIRECTIONS } from '../popup/popup.consts.js';
|
28
|
-
import {
|
26
|
+
import { m as modules_b607bec2, S as SelectFilter } from '../_helpers/select__filter.js';
|
29
27
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
30
28
|
import 'util-deprecate';
|
31
29
|
import '../icon/icon__constants.js';
|
@@ -499,54 +497,5 @@ _defineProperty(SelectPopup, "defaultProps", {
|
|
499
497
|
onSelectAll: noop,
|
500
498
|
onEmptyPopupEnter: noop
|
501
499
|
});
|
502
|
-
SelectPopup.propTypes = {
|
503
|
-
activeIndex: PropTypes.number,
|
504
|
-
anchorElement: PropTypes.instanceOf(HTMLElement),
|
505
|
-
className: PropTypes.string,
|
506
|
-
compact: PropTypes.bool,
|
507
|
-
data: PropTypes.array,
|
508
|
-
dir: PropTypes.oneOf(['ltr', 'rtl']),
|
509
|
-
directions: PropTypes.array,
|
510
|
-
disabled: PropTypes.bool,
|
511
|
-
disableMoveOverflow: PropTypes.bool,
|
512
|
-
disableScrollToActive: PropTypes.bool,
|
513
|
-
filter: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
|
514
|
-
value: PropTypes.string,
|
515
|
-
placeholder: PropTypes.string
|
516
|
-
})]),
|
517
|
-
filterValue: PropTypes.string,
|
518
|
-
filterIcon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
519
|
-
filterRef: PropTypes.oneOfType([PropTypes.func, refObject(PropTypes.instanceOf(HTMLInputElement))]),
|
520
|
-
hidden: PropTypes.bool,
|
521
|
-
isInputMode: PropTypes.bool,
|
522
|
-
listId: PropTypes.string,
|
523
|
-
maxHeight: PropTypes.number,
|
524
|
-
message: PropTypes.string,
|
525
|
-
minWidth: PropTypes.number,
|
526
|
-
multiple: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
|
527
|
-
label: PropTypes.string,
|
528
|
-
limit: PropTypes.number,
|
529
|
-
selectAll: PropTypes.bool
|
530
|
-
})]),
|
531
|
-
left: PropTypes.number,
|
532
|
-
loading: PropTypes.bool,
|
533
|
-
onClear: PropTypes.func,
|
534
|
-
onCloseAttempt: PropTypes.func,
|
535
|
-
onOutsideClick: PropTypes.func,
|
536
|
-
onEmptyPopupEnter: PropTypes.func,
|
537
|
-
onFilter: PropTypes.func,
|
538
|
-
onLoadMore: PropTypes.func,
|
539
|
-
onSelect: PropTypes.func,
|
540
|
-
onSelectAll: PropTypes.func,
|
541
|
-
renderOptimization: PropTypes.bool,
|
542
|
-
ringPopupTarget: PropTypes.string,
|
543
|
-
selected: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
|
544
|
-
style: PropTypes.object,
|
545
|
-
tags: PropTypes.object,
|
546
|
-
toolbar: PropTypes.node,
|
547
|
-
topbar: PropTypes.node,
|
548
|
-
top: PropTypes.number,
|
549
|
-
preventListOverscroll: PropTypes.bool
|
550
|
-
};
|
551
500
|
|
552
501
|
export { SelectPopup as default };
|
@@ -35,7 +35,7 @@ class Shortcuts {
|
|
35
35
|
});
|
36
36
|
_defineProperty(this, "_defaultFilter", (e, element, key) => {
|
37
37
|
// if the element or its parents have the class "ring-js-shortcuts" then no need to stop
|
38
|
-
if (element === document || !(element instanceof HTMLElement) || key == null || element.matches(this.ALLOW_SHORTCUTS_SELECTOR) || (element.dataset.enabledShortcuts != null
|
38
|
+
if (element === document || !(element instanceof HTMLElement) || key == null || element.matches(this.ALLOW_SHORTCUTS_SELECTOR) || element.closest(this.ALLOW_SHORTCUTS_SELECTOR) != null || element.dataset.enabledShortcuts != null && element.dataset.enabledShortcuts.split(',').includes(key)) {
|
39
39
|
return false;
|
40
40
|
}
|
41
41
|
const elementContentEditableAttribute = element.contentEditable;
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { ComponentType } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import { ShortcutsMap, ShortcutsScopeOptions } from './core';
|
4
3
|
export interface ShortcutsHOCOptions extends ShortcutsScopeOptions {
|
5
4
|
disabled?: boolean | null | undefined;
|
@@ -57,9 +56,5 @@ export default function shortcutsHOC<P extends {}>(ComposedComponent: ComponentT
|
|
57
56
|
componentWillUpdate?(nextProps: Readonly<P & ShortcutsHOCProps>, nextState: Readonly<{}>, nextContext: any): void;
|
58
57
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<P & ShortcutsHOCProps>, nextState: Readonly<{}>, nextContext: any): void;
|
59
58
|
};
|
60
|
-
propTypes: {
|
61
|
-
rgShortcutsOptions: PropTypes.Requireable<object>;
|
62
|
-
rgShortcutsMap: PropTypes.Requireable<object>;
|
63
|
-
};
|
64
59
|
contextType?: import("react").Context<any> | undefined;
|
65
60
|
};
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import { _ as _defineProperty, a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
3
3
|
import { Component } from 'react';
|
4
|
-
import PropTypes from 'prop-types';
|
5
4
|
import getUID from '../global/get-uid.js';
|
6
5
|
import Shortcuts from './shortcuts.js';
|
7
6
|
import { jsx } from 'react/jsx-runtime';
|
@@ -13,8 +12,7 @@ import 'sniffr';
|
|
13
12
|
|
14
13
|
const _excluded = ["rgShortcutsOptions", "rgShortcutsMap"];
|
15
14
|
function shortcutsHOC(ComposedComponent) {
|
16
|
-
|
17
|
-
return _WithShortcuts = class WithShortcuts extends Component {
|
15
|
+
return class WithShortcuts extends Component {
|
18
16
|
constructor() {
|
19
17
|
super(...arguments);
|
20
18
|
_defineProperty(this, "_shortcutsScopeUid", getUID('rg-shortcuts-'));
|
@@ -34,10 +32,7 @@ function shortcutsHOC(ComposedComponent) {
|
|
34
32
|
children: /*#__PURE__*/jsx(ComposedComponent, _objectSpread2({}, props))
|
35
33
|
});
|
36
34
|
}
|
37
|
-
}
|
38
|
-
rgShortcutsOptions: PropTypes.object,
|
39
|
-
rgShortcutsMap: PropTypes.object
|
40
|
-
}), _WithShortcuts;
|
35
|
+
};
|
41
36
|
}
|
42
37
|
|
43
38
|
export { shortcutsHOC as default };
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { PureComponent } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
import { ShortcutsMap, ShortcutsScopeOptions } from './core';
|
4
3
|
export interface ShortcutsProps {
|
5
4
|
map: ShortcutsMap;
|
@@ -9,13 +8,6 @@ export interface ShortcutsProps {
|
|
9
8
|
disabled?: boolean | null | undefined;
|
10
9
|
}
|
11
10
|
export default class Shortcuts extends PureComponent<ShortcutsProps> {
|
12
|
-
static propTypes: {
|
13
|
-
map: PropTypes.Validator<object>;
|
14
|
-
scope: PropTypes.Validator<string>;
|
15
|
-
options: PropTypes.Requireable<object>;
|
16
|
-
disabled: PropTypes.Requireable<boolean>;
|
17
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
18
|
-
};
|
19
11
|
static defaultProps: {
|
20
12
|
options: {};
|
21
13
|
};
|