@jetbrains/ring-ui-built 6.0.32 → 6.0.34
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/_rollupPluginBabelHelpers.js +567 -1
- package/components/_helpers/anchor.js +6 -7
- package/components/_helpers/button__classes.js +14 -16
- package/components/_helpers/caption.js +20 -14
- package/components/_helpers/card.js +105 -95
- package/components/_helpers/dialog__body-scroll-preventer.js +19 -11
- package/components/_helpers/icon__svg.js +25 -22
- package/components/_helpers/input.js +176 -146
- package/components/_helpers/query-assist__suggestions.js +90 -74
- package/components/_helpers/select__filter.js +69 -48
- package/components/_helpers/services-link.js +37 -29
- package/components/_helpers/sidebar.js +107 -99
- package/components/_helpers/tab-link.js +7 -7
- package/components/_helpers/theme.js +40 -31
- package/components/_helpers/title.js +72 -57
- package/components/alert/alert.js +202 -150
- package/components/alert/container.js +41 -32
- package/components/alert-service/alert-service.js +170 -105
- package/components/analytics/analytics.js +22 -12
- package/components/analytics/analytics__custom-plugin.js +75 -54
- package/components/auth/auth.js +36 -4
- package/components/auth/auth__core.js +1471 -746
- package/components/auth/background-flow.js +127 -87
- package/components/auth/down-notification.js +73 -30
- package/components/auth/iframe-flow.js +133 -75
- package/components/auth/request-builder.js +82 -46
- package/components/auth/response-parser.js +116 -86
- package/components/auth/storage.js +334 -171
- package/components/auth/token-validator.js +242 -137
- package/components/auth/window-flow.js +134 -92
- package/components/auth-dialog/auth-dialog.js +172 -114
- package/components/auth-dialog-service/auth-dialog-service.js +31 -8
- package/components/avatar/avatar-example-datauri.js +1 -23
- package/components/avatar/avatar.js +152 -119
- package/components/avatar/fallback-avatar.js +38 -22
- package/components/badge/badge.js +45 -35
- package/components/button/button.js +107 -86
- package/components/button-group/button-group.js +33 -19
- package/components/button-set/button-set.js +32 -20
- package/components/button-toolbar/button-toolbar.js +31 -19
- package/components/caret/caret.js +220 -186
- package/components/checkbox/checkbox.js +101 -76
- package/components/clipboard/clipboard-fallback.js +10 -10
- package/components/clipboard/clipboard.js +132 -35
- package/components/code/code.js +166 -92
- package/components/collapse/collapse-content.js +64 -42
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +14 -12
- package/components/collapse/collapse.js +17 -11
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +3 -1
- package/components/confirm/confirm.js +104 -66
- package/components/confirm-service/confirm-service.js +59 -37
- package/components/content-layout/content-layout.js +64 -43
- package/components/content-layout/sidebar.js +1 -0
- package/components/contenteditable/contenteditable.js +59 -50
- package/components/control-label/control-label.js +9 -9
- package/components/data-list/data-list.js +182 -129
- package/components/data-list/data-list.mock.js +6 -2
- package/components/data-list/item.js +170 -143
- package/components/data-list/selection.js +136 -76
- package/components/data-list/title.js +12 -1
- package/components/date-picker/consts.js +26 -19
- package/components/date-picker/date-input.js +144 -113
- package/components/date-picker/date-picker.js +282 -227
- package/components/date-picker/date-popup.js +395 -350
- package/components/date-picker/day.js +116 -87
- package/components/date-picker/month-names.js +66 -43
- package/components/date-picker/month-slider.js +76 -51
- package/components/date-picker/month.js +25 -16
- package/components/date-picker/months.js +50 -43
- package/components/date-picker/weekdays.js +22 -12
- package/components/date-picker/years.js +110 -83
- package/components/dialog/dialog.js +190 -142
- package/components/dialog/dialog__body-scroll-preventer.js +4 -0
- package/components/dropdown/anchor.js +9 -0
- package/components/dropdown/dropdown.js +213 -182
- package/components/dropdown-menu/dropdown-menu.js +97 -71
- package/components/editable-heading/editable-heading.js +127 -75
- package/components/error-bubble/error-bubble.js +60 -31
- package/components/error-message/error-message.js +59 -39
- package/components/footer/footer.js +30 -27
- package/components/global/compose.js +10 -1
- package/components/global/composeRefs.js +12 -7
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.js +15 -15
- package/components/global/data-tests.js +14 -6
- package/components/global/dom.js +86 -47
- package/components/global/focus-sensor-hoc.js +132 -122
- package/components/global/fuzzy-highlight.js +36 -22
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +8 -4
- package/components/global/inject-styles.js +15 -10
- package/components/global/listeners.js +51 -27
- package/components/global/memoize.js +12 -6
- package/components/global/normalize-indent.js +50 -19
- package/components/global/promise-with-timeout.js +8 -6
- package/components/global/prop-types.js +5 -3
- package/components/global/react-dom-renderer.js +44 -28
- package/components/global/react-render-adapter.js +1 -1
- package/components/global/rerender-hoc.js +30 -12
- package/components/global/schedule-raf.js +6 -5
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.js +22 -0
- package/components/global/trivial-template-tag.js +10 -3
- package/components/global/typescript-utils.js +6 -2
- package/components/global/url.js +26 -20
- package/components/global/use-event-callback.js +4 -6
- package/components/grid/col.js +52 -35
- package/components/grid/grid.js +31 -17
- package/components/grid/row.js +47 -35
- package/components/group/group.js +25 -17
- package/components/header/header.js +78 -33
- package/components/header/logo.js +36 -20
- package/components/header/profile.js +199 -166
- package/components/header/services-link.js +4 -0
- package/components/header/services.js +116 -73
- package/components/header/smart-profile.js +203 -111
- package/components/header/smart-services.js +113 -62
- package/components/header/tray-icon.js +37 -21
- package/components/header/tray.js +32 -21
- package/components/heading/heading.js +25 -24
- package/components/http/http.d.ts +1 -2
- package/components/http/http.js +345 -203
- package/components/http/http.mock.d.ts +1 -5
- package/components/http/http.mock.js +101 -49
- package/components/hub-source/hub-source.js +190 -83
- package/components/hub-source/hub-source__user.js +44 -11
- package/components/hub-source/hub-source__users-groups.js +65 -37
- package/components/i18n/i18n-context.js +10 -7
- package/components/i18n/i18n.js +10 -7
- package/components/icon/icon.js +93 -76
- package/components/icon/icon__svg.js +8 -0
- package/components/icon/index.js +8 -0
- package/components/input/input.js +13 -0
- package/components/island/adaptive-island-hoc.js +43 -30
- package/components/island/content.js +132 -115
- package/components/island/header.js +70 -57
- package/components/island/island.js +40 -28
- package/components/island-legacy/content-legacy.js +25 -17
- package/components/island-legacy/header-legacy.js +27 -19
- package/components/island-legacy/island-legacy.js +25 -17
- package/components/link/clickableLink.js +59 -44
- package/components/link/link.js +68 -57
- package/components/list/consts.js +2 -2
- package/components/list/list.js +698 -611
- package/components/list/list__custom.js +62 -44
- package/components/list/list__hint.js +19 -10
- package/components/list/list__item.js +174 -133
- package/components/list/list__link.js +50 -37
- package/components/list/list__separator.js +24 -14
- package/components/list/list__title.js +32 -22
- package/components/list/list__users-groups-source.js +126 -54
- package/components/loader/loader.js +74 -43
- package/components/loader/loader__core.js +263 -198
- package/components/loader-inline/loader-inline.js +35 -23
- package/components/loader-screen/loader-screen.js +46 -25
- package/components/login-dialog/login-dialog.js +158 -111
- package/components/login-dialog/service.js +34 -8
- package/components/markdown/markdown.js +23 -15
- package/components/message/message.js +203 -161
- package/components/old-browsers-message/old-browsers-message.js +18 -11
- package/components/old-browsers-message/old-browsers-message__stop.js +7 -0
- package/components/old-browsers-message/white-list.js +17 -9
- package/components/pager/pager.js +271 -212
- package/components/panel/panel.js +25 -17
- package/components/permissions/permissions.js +172 -127
- package/components/permissions/permissions__cache.js +224 -194
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +343 -284
- package/components/popup/popup.target.js +8 -9
- package/components/popup/position.js +106 -96
- package/components/popup-menu/popup-menu.js +81 -44
- package/components/progress-bar/progress-bar.js +104 -87
- package/components/query-assist/query-assist.js +916 -838
- package/components/query-assist/query-assist__suggestions.js +30 -1
- package/components/radio/radio.js +34 -19
- package/components/radio/radio__item.js +69 -52
- package/components/select/select.js +957 -852
- package/components/select/select__filter.js +30 -0
- package/components/select/select__popup.js +487 -373
- package/components/shortcuts/core.js +217 -166
- package/components/shortcuts/shortcut-title.js +11 -6
- package/components/shortcuts/shortcuts-hoc.js +45 -19
- package/components/shortcuts/shortcuts.js +75 -50
- package/components/slider/slider.js +122 -99
- package/components/slider/slider.utils.js +24 -14
- package/components/storage/storage.js +33 -4
- package/components/storage/storage__fallback.js +224 -149
- package/components/storage/storage__local.js +153 -90
- package/components/tab-trap/tab-trap.js +153 -122
- package/components/table/cell.js +26 -14
- package/components/table/disable-hover-hoc.js +51 -33
- package/components/table/header-cell.js +89 -64
- package/components/table/header.js +132 -104
- package/components/table/multitable.js +125 -107
- package/components/table/row-with-focus-sensor.js +69 -25
- package/components/table/row.js +216 -175
- package/components/table/selection-adapter.js +3 -1
- package/components/table/selection-shortcuts-hoc.js +181 -180
- package/components/table/selection.js +226 -156
- package/components/table/smart-table.js +88 -50
- package/components/table/table.js +358 -289
- package/components/tabs/collapsible-more.js +79 -46
- package/components/tabs/collapsible-tab.js +38 -31
- package/components/tabs/collapsible-tabs.js +153 -88
- package/components/tabs/custom-item.js +2 -4
- package/components/tabs/dumb-tabs.js +117 -74
- package/components/tabs/smart-tabs.js +69 -29
- package/components/tabs/tab-link.js +5 -1
- package/components/tabs/tab.js +31 -19
- package/components/tabs/tabs.js +31 -0
- package/components/tag/tag.js +173 -133
- package/components/tags-input/tags-input.js +427 -329
- package/components/tags-list/tags-list.js +78 -57
- package/components/text/text.js +39 -28
- package/components/toggle/toggle.js +70 -56
- package/components/tooltip/tooltip.js +190 -146
- package/components/user-agreement/service.js +371 -228
- package/components/user-agreement/toolbox.eula.js +1 -160
- package/components/user-agreement/user-agreement.js +120 -85
- package/components/user-card/card.js +29 -0
- package/components/user-card/smart-user-card-tooltip.js +111 -51
- package/components/user-card/tooltip.js +84 -47
- package/components/user-card/user-card.js +29 -0
- package/package.json +1 -2
@@ -1,4 +1,15 @@
|
|
1
|
-
import
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, f as _classCallCheck, g as _callSuper, h as _asyncToGenerator, i as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.concat.js';
|
3
|
+
import 'core-js/modules/es.array.filter.js';
|
4
|
+
import 'core-js/modules/es.array.index-of.js';
|
5
|
+
import 'core-js/modules/es.array.iterator.js';
|
6
|
+
import 'core-js/modules/es.array.map.js';
|
7
|
+
import 'core-js/modules/es.map.js';
|
8
|
+
import 'core-js/modules/es.object.assign.js';
|
9
|
+
import 'core-js/modules/es.object.to-string.js';
|
10
|
+
import 'core-js/modules/es.promise.js';
|
11
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
12
|
+
import React, { Component, PureComponent } from 'react';
|
2
13
|
import PropTypes from 'prop-types';
|
3
14
|
import classNames from 'classnames';
|
4
15
|
import getEventKey from '../global/get-event-key.js';
|
@@ -11,12 +22,20 @@ import { S as Size, m as modules_88cfaf40 } from '../_helpers/input.js';
|
|
11
22
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
12
23
|
import getUID from '../global/get-uid.js';
|
13
24
|
import { ControlLabel } from '../control-label/control-label.js';
|
14
|
-
import '
|
25
|
+
import 'core-js/modules/es.array.find.js';
|
26
|
+
import 'core-js/modules/es.array.reduce.js';
|
27
|
+
import 'core-js/modules/es.array.slice.js';
|
28
|
+
import 'core-js/modules/es.object.values.js';
|
29
|
+
import 'core-js/modules/es.regexp.exec.js';
|
30
|
+
import 'core-js/modules/es.string.replace.js';
|
31
|
+
import 'core-js/modules/es.string.trim.js';
|
32
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
15
33
|
import '@jetbrains/icons/chevron-down';
|
16
34
|
import '@jetbrains/icons/close-12px';
|
17
35
|
import 'deep-equal';
|
18
36
|
import '../dropdown/dropdown.js';
|
19
37
|
import '../global/data-tests.js';
|
38
|
+
import 'core-js/modules/es.object.entries.js';
|
20
39
|
import '../global/typescript-utils.js';
|
21
40
|
import '../_helpers/anchor.js';
|
22
41
|
import '@jetbrains/icons/chevron-10px';
|
@@ -24,26 +43,40 @@ import '../icon/icon.js';
|
|
24
43
|
import 'util-deprecate';
|
25
44
|
import '../icon/icon__constants.js';
|
26
45
|
import '../_helpers/icon__svg.js';
|
46
|
+
import 'core-js/modules/es.string.starts-with.js';
|
47
|
+
import 'core-js/modules/es.weak-map.js';
|
27
48
|
import '../button/button.js';
|
28
49
|
import '../link/clickableLink.js';
|
29
50
|
import '../_helpers/button__classes.js';
|
30
51
|
import '../avatar/avatar.js';
|
31
52
|
import '../global/url.js';
|
53
|
+
import 'core-js/modules/es.string.match.js';
|
32
54
|
import '../global/dom.js';
|
55
|
+
import 'core-js/modules/es.set.js';
|
56
|
+
import 'core-js/modules/es.string.split.js';
|
33
57
|
import '../avatar/fallback-avatar.js';
|
58
|
+
import 'core-js/modules/es.array.from.js';
|
59
|
+
import 'core-js/modules/es.regexp.to-string.js';
|
34
60
|
import '../popup/popup.js';
|
35
61
|
import 'react-dom';
|
36
62
|
import '../global/schedule-raf.js';
|
37
63
|
import '../shortcuts/shortcuts.js';
|
38
64
|
import '../shortcuts/core.js';
|
65
|
+
import 'core-js/modules/es.array.find-index.js';
|
66
|
+
import 'core-js/modules/es.array.includes.js';
|
67
|
+
import 'core-js/modules/es.array.splice.js';
|
68
|
+
import 'core-js/modules/es.string.includes.js';
|
39
69
|
import 'combokeys';
|
40
70
|
import '../global/sniffer.js';
|
41
71
|
import 'sniffr';
|
42
72
|
import '../tab-trap/tab-trap.js';
|
43
73
|
import '../popup/position.js';
|
74
|
+
import 'core-js/modules/es.array.sort.js';
|
44
75
|
import '../popup/popup.consts.js';
|
45
76
|
import '../popup/popup.target.js';
|
46
77
|
import '../list/list.js';
|
78
|
+
import 'core-js/modules/es.symbol.js';
|
79
|
+
import 'core-js/modules/es.symbol.description.js';
|
47
80
|
import 'react-virtualized/dist/es/List';
|
48
81
|
import 'react-virtualized/dist/es/AutoSizer';
|
49
82
|
import 'react-virtualized/dist/es/WindowScroller';
|
@@ -82,353 +115,418 @@ function noop() {}
|
|
82
115
|
/**
|
83
116
|
* @name Tags Input
|
84
117
|
*/
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
};
|
136
|
-
constructor(props) {
|
137
|
-
super(props);
|
138
|
-
this.ngModelStateField = TagsInput.ngModelStateField;
|
139
|
-
}
|
140
|
-
state = {
|
141
|
-
tags: [],
|
142
|
-
prevTags: null,
|
143
|
-
suggestions: [],
|
144
|
-
loading: true,
|
145
|
-
focused: false,
|
146
|
-
query: '',
|
147
|
-
activeIndex: 0
|
148
|
-
};
|
149
|
-
static getDerivedStateFromProps(_ref, _ref2) {
|
150
|
-
let {
|
151
|
-
tags
|
152
|
-
} = _ref;
|
153
|
-
let {
|
154
|
-
prevTags
|
155
|
-
} = _ref2;
|
156
|
-
const nextState = {
|
157
|
-
prevTags: tags
|
158
|
-
};
|
159
|
-
if (tags != null && tags !== prevTags) {
|
160
|
-
Object.assign(nextState, {
|
161
|
-
tags,
|
162
|
-
activeIndex: tags.length
|
163
|
-
});
|
164
|
-
}
|
165
|
-
return nextState;
|
166
|
-
}
|
167
|
-
componentDidMount() {
|
168
|
-
if (this.props.autoOpen && !this.props.disabled) {
|
169
|
-
this.focusInput();
|
170
|
-
this.loadSuggestions();
|
171
|
-
this.select?._showPopup();
|
172
|
-
}
|
173
|
-
}
|
174
|
-
static ngModelStateField = 'tags';
|
175
|
-
ngModelStateField;
|
176
|
-
static contextType = ControlsHeightContext;
|
177
|
-
id = this.props.id || getUID('ring-tags-list-');
|
178
|
-
node;
|
179
|
-
nodeRef = node => {
|
180
|
-
this.node = node;
|
181
|
-
};
|
182
|
-
input;
|
183
|
-
caret;
|
184
|
-
getInputNode() {
|
185
|
-
if (!this.input) {
|
186
|
-
this.input = this.select?.filter;
|
187
|
-
if (this.input) {
|
188
|
-
this.caret = new Caret(this.input);
|
118
|
+
var POPUP_VERTICAL_SHIFT = 2;
|
119
|
+
var TagsInput = /*#__PURE__*/function (_PureComponent) {
|
120
|
+
function TagsInput(props) {
|
121
|
+
var _this;
|
122
|
+
_classCallCheck(this, TagsInput);
|
123
|
+
_this = _callSuper(this, TagsInput, [props]);
|
124
|
+
_defineProperty(_this, "state", {
|
125
|
+
tags: [],
|
126
|
+
prevTags: null,
|
127
|
+
suggestions: [],
|
128
|
+
loading: true,
|
129
|
+
focused: false,
|
130
|
+
query: '',
|
131
|
+
activeIndex: 0
|
132
|
+
});
|
133
|
+
_defineProperty(_this, "ngModelStateField", void 0);
|
134
|
+
_defineProperty(_this, "id", _this.props.id || getUID('ring-tags-list-'));
|
135
|
+
_defineProperty(_this, "node", void 0);
|
136
|
+
_defineProperty(_this, "nodeRef", function (node) {
|
137
|
+
_this.node = node;
|
138
|
+
});
|
139
|
+
_defineProperty(_this, "input", void 0);
|
140
|
+
_defineProperty(_this, "caret", void 0);
|
141
|
+
_defineProperty(_this, "focusInput", function () {
|
142
|
+
var _this$getInputNode;
|
143
|
+
(_this$getInputNode = _this.getInputNode()) === null || _this$getInputNode === void 0 || _this$getInputNode.focus();
|
144
|
+
});
|
145
|
+
_defineProperty(_this, "focus", function () {
|
146
|
+
_this.focusInput();
|
147
|
+
});
|
148
|
+
_defineProperty(_this, "addTag", function (tag) {
|
149
|
+
var _this$select, _this$select2;
|
150
|
+
if (tag == null) {
|
151
|
+
return;
|
152
|
+
}
|
153
|
+
var isUniqueTag = _this.state.tags.filter(function (item) {
|
154
|
+
return tag.key === item.key;
|
155
|
+
}).length === 0;
|
156
|
+
(_this$select = _this.select) === null || _this$select === void 0 || _this$select.clear();
|
157
|
+
(_this$select2 = _this.select) === null || _this$select2 === void 0 || _this$select2.filterValue('');
|
158
|
+
if (isUniqueTag) {
|
159
|
+
_this.setState(function (prevState) {
|
160
|
+
return {
|
161
|
+
tags: prevState.tags.concat([tag])
|
162
|
+
};
|
163
|
+
});
|
164
|
+
_this.props.onAddTag({
|
165
|
+
tag
|
166
|
+
});
|
167
|
+
_this.setActiveIndex();
|
189
168
|
}
|
190
|
-
}
|
191
|
-
return this.input;
|
192
|
-
}
|
193
|
-
setActiveIndex(activeIndex) {
|
194
|
-
this.setState({
|
195
|
-
activeIndex
|
196
169
|
});
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
}
|
208
|
-
const isUniqueTag = this.state.tags.filter(item => tag.key === item.key).length === 0;
|
209
|
-
this.select?.clear();
|
210
|
-
this.select?.filterValue('');
|
211
|
-
if (isUniqueTag) {
|
212
|
-
this.setState(prevState => ({
|
213
|
-
tags: prevState.tags.concat([tag])
|
170
|
+
_defineProperty(_this, "clickHandler", function (event) {
|
171
|
+
var _this$select3;
|
172
|
+
if (event.target !== _this.node && event.target.parentElement !== _this.node) {
|
173
|
+
return;
|
174
|
+
}
|
175
|
+
(_this$select3 = _this.select) === null || _this$select3 === void 0 || _this$select3._clickHandler();
|
176
|
+
});
|
177
|
+
_defineProperty(_this, "filterExistingTags", function (suggestions) {
|
178
|
+
var tagsMap = new Map(_this.state.tags.map(function (tag) {
|
179
|
+
return [tag.key, tag];
|
214
180
|
}));
|
215
|
-
|
216
|
-
|
181
|
+
return suggestions.filter(function (suggestion) {
|
182
|
+
return !tagsMap.has(suggestion.key);
|
217
183
|
});
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
onRemoveTag(tagToRemove) {
|
222
|
-
return Promise.resolve(this.props.onRemoveTag({
|
223
|
-
tag: tagToRemove
|
224
|
-
})).then(() => {
|
225
|
-
const tags = this.state.tags.filter(tag => tag !== tagToRemove);
|
226
|
-
if (this.node) {
|
227
|
-
this.setState({
|
228
|
-
tags
|
229
|
-
});
|
230
|
-
this.focusInput();
|
231
|
-
}
|
232
|
-
return tags;
|
233
|
-
}, this.focusInput);
|
234
|
-
}
|
235
|
-
clickHandler = event => {
|
236
|
-
if (event.target !== this.node && event.target.parentElement !== this.node) {
|
237
|
-
return;
|
238
|
-
}
|
239
|
-
this.select?._clickHandler();
|
240
|
-
};
|
241
|
-
filterExistingTags = suggestions => {
|
242
|
-
const tagsMap = new Map(this.state.tags.map(tag => [tag.key, tag]));
|
243
|
-
return suggestions.filter(suggestion => !tagsMap.has(suggestion.key));
|
244
|
-
};
|
245
|
-
loadSuggestions = (() => {
|
246
|
-
var _this = this;
|
247
|
-
return function () {
|
248
|
-
let query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
184
|
+
});
|
185
|
+
_defineProperty(_this, "loadSuggestions", function () {
|
186
|
+
var query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
249
187
|
return _this.setState({
|
250
188
|
loading: true,
|
251
189
|
query
|
252
|
-
},
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
190
|
+
}, /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
191
|
+
var suggestionsResult, allSuggestions, suggestions;
|
192
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
193
|
+
while (1) switch (_context.prev = _context.next) {
|
194
|
+
case 0:
|
195
|
+
_context.prev = 0;
|
196
|
+
suggestionsResult = _this.props.dataSource({
|
197
|
+
query
|
198
|
+
});
|
199
|
+
if (!Array.isArray(suggestionsResult)) {
|
200
|
+
_context.next = 6;
|
201
|
+
break;
|
202
|
+
}
|
203
|
+
_context.t0 = suggestionsResult;
|
204
|
+
_context.next = 9;
|
205
|
+
break;
|
206
|
+
case 6:
|
207
|
+
_context.next = 8;
|
208
|
+
return suggestionsResult;
|
209
|
+
case 8:
|
210
|
+
_context.t0 = _context.sent;
|
211
|
+
case 9:
|
212
|
+
allSuggestions = _context.t0;
|
213
|
+
suggestions = _this.filterExistingTags(allSuggestions);
|
214
|
+
if (_this.node && query === _this.state.query) {
|
215
|
+
_this.setState({
|
216
|
+
suggestions,
|
217
|
+
loading: false
|
218
|
+
});
|
219
|
+
}
|
220
|
+
_context.next = 17;
|
221
|
+
break;
|
222
|
+
case 14:
|
223
|
+
_context.prev = 14;
|
224
|
+
_context.t1 = _context["catch"](0);
|
225
|
+
_this.setState({
|
226
|
+
loading: false
|
227
|
+
});
|
228
|
+
case 17:
|
229
|
+
case "end":
|
230
|
+
return _context.stop();
|
264
231
|
}
|
265
|
-
}
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
232
|
+
}, _callee, null, [[0, 14]]);
|
233
|
+
})));
|
234
|
+
});
|
235
|
+
_defineProperty(_this, "_focusHandler", function () {
|
236
|
+
_this.setActiveIndex(null);
|
237
|
+
_this.setState({
|
238
|
+
focused: true
|
270
239
|
});
|
271
|
-
};
|
272
|
-
})();
|
273
|
-
_focusHandler = () => {
|
274
|
-
this.setActiveIndex(null);
|
275
|
-
this.setState({
|
276
|
-
focused: true
|
277
240
|
});
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
241
|
+
_defineProperty(_this, "_blurHandler", function () {
|
242
|
+
_this.setState({
|
243
|
+
focused: false
|
244
|
+
});
|
282
245
|
});
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
newActiveIndex
|
289
|
-
|
290
|
-
newActiveIndex = 0;
|
291
|
-
}
|
292
|
-
if (this.state.activeIndex !== newActiveIndex) {
|
293
|
-
this.setActiveIndex(newActiveIndex);
|
294
|
-
}
|
295
|
-
};
|
296
|
-
handleKeyDown = event => {
|
297
|
-
const key = getEventKey(event);
|
298
|
-
const isInputFocused = () => {
|
299
|
-
var _this$getInputNode$ta;
|
300
|
-
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = this.getInputNode()?.tagName) !== null && _this$getInputNode$ta !== void 0 ? _this$getInputNode$ta : '');
|
301
|
-
};
|
302
|
-
if (key === ' ' && this.props.allowAddNewTags) {
|
303
|
-
event.stopPropagation();
|
304
|
-
const value = this.getInputNode()?.value;
|
305
|
-
if (value != null && value !== '') {
|
306
|
-
this.handleTagCreation(value);
|
246
|
+
_defineProperty(_this, "selectTag", function (moveForward) {
|
247
|
+
var activeIndex = typeof _this.state.activeIndex === 'number' ? _this.state.activeIndex : _this.state.tags.length + 1;
|
248
|
+
var newActiveIndex = activeIndex + (moveForward ? 1 : -1);
|
249
|
+
if (newActiveIndex >= _this.state.tags.length) {
|
250
|
+
newActiveIndex = _this.state.tags.length - 1;
|
251
|
+
} else if (newActiveIndex < 0) {
|
252
|
+
newActiveIndex = 0;
|
307
253
|
}
|
308
|
-
|
309
|
-
|
310
|
-
if (this.select?._popup?.isVisible()) {
|
311
|
-
return true;
|
312
|
-
}
|
313
|
-
if (key === 'ArrowLeft') {
|
314
|
-
if (this.getInputNode() && this.caret != null && Number(this.caret.getPosition()) > 0) {
|
315
|
-
return true;
|
254
|
+
if (_this.state.activeIndex !== newActiveIndex) {
|
255
|
+
_this.setActiveIndex(newActiveIndex);
|
316
256
|
}
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
257
|
+
});
|
258
|
+
_defineProperty(_this, "handleKeyDown", function (event) {
|
259
|
+
var _this$select4;
|
260
|
+
var key = getEventKey(event);
|
261
|
+
var isInputFocused = function isInputFocused() {
|
262
|
+
var _this$getInputNode$ta, _this$getInputNode2;
|
263
|
+
return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = (_this$getInputNode2 = _this.getInputNode()) === null || _this$getInputNode2 === void 0 ? void 0 : _this$getInputNode2.tagName) !== null && _this$getInputNode$ta !== void 0 ? _this$getInputNode$ta : '');
|
264
|
+
};
|
265
|
+
if (key === ' ' && _this.props.allowAddNewTags) {
|
266
|
+
var _this$getInputNode3;
|
267
|
+
event.stopPropagation();
|
268
|
+
var value = (_this$getInputNode3 = _this.getInputNode()) === null || _this$getInputNode3 === void 0 ? void 0 : _this$getInputNode3.value;
|
269
|
+
if (value != null && value !== '') {
|
270
|
+
_this.handleTagCreation(value);
|
325
271
|
}
|
326
|
-
|
327
|
-
this.selectTag(true);
|
272
|
+
return true;
|
328
273
|
}
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
if (key === '
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
274
|
+
if ((_this$select4 = _this.select) !== null && _this$select4 !== void 0 && (_this$select4 = _this$select4._popup) !== null && _this$select4 !== void 0 && _this$select4.isVisible()) {
|
275
|
+
return true;
|
276
|
+
}
|
277
|
+
if (key === 'ArrowLeft') {
|
278
|
+
if (_this.getInputNode() && _this.caret != null && Number(_this.caret.getPosition()) > 0) {
|
279
|
+
return true;
|
280
|
+
}
|
281
|
+
_this.selectTag();
|
337
282
|
return false;
|
338
283
|
}
|
339
|
-
if (
|
340
|
-
|
284
|
+
if (key === 'ArrowRight' && !isInputFocused()) {
|
285
|
+
if (_this.state.activeIndex === _this.state.tags.length - 1) {
|
286
|
+
if (!_this.props.disabled) {
|
287
|
+
var _this$getInputNode4;
|
288
|
+
(_this$getInputNode4 = _this.getInputNode()) === null || _this$getInputNode4 === void 0 || _this$getInputNode4.focus();
|
289
|
+
_this.setActiveIndex();
|
290
|
+
}
|
291
|
+
} else {
|
292
|
+
_this.selectTag(true);
|
293
|
+
}
|
341
294
|
return false;
|
342
295
|
}
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
296
|
+
if (!_this.props.disabled) {
|
297
|
+
var _this$getInputNode5;
|
298
|
+
if (key === 'Backspace' && !((_this$getInputNode5 = _this.getInputNode()) !== null && _this$getInputNode5 !== void 0 && _this$getInputNode5.value)) {
|
299
|
+
var _this$select5;
|
300
|
+
event.preventDefault();
|
301
|
+
var tagsLength = _this.state.tags.length;
|
302
|
+
(_this$select5 = _this.select) === null || _this$select5 === void 0 || _this$select5._hidePopup(true); // otherwise confirmation may be overlapped by popup
|
303
|
+
_this.onRemoveTag(_this.state.tags[tagsLength - 1]);
|
304
|
+
return false;
|
305
|
+
}
|
306
|
+
if ((key === 'Delete' || key === 'Backspace') && _this.state.activeIndex != null && _this.state.tags[_this.state.activeIndex]) {
|
307
|
+
_this.onRemoveTag(_this.state.tags[_this.state.activeIndex]).then(function () {
|
308
|
+
return _this.selectTag(true);
|
309
|
+
});
|
310
|
+
return false;
|
311
|
+
}
|
312
|
+
}
|
313
|
+
return true;
|
314
|
+
});
|
315
|
+
_defineProperty(_this, "handleClick", memoize(function (tag) {
|
316
|
+
return function () {
|
317
|
+
_this.setActiveIndex(_this.state.tags.indexOf(tag));
|
318
|
+
};
|
319
|
+
}));
|
320
|
+
_defineProperty(_this, "handleRemove", memoize(function (tag) {
|
321
|
+
return function () {
|
322
|
+
return _this.onRemoveTag(tag);
|
323
|
+
};
|
324
|
+
}));
|
325
|
+
_defineProperty(_this, "handleTagCreation", function (label) {
|
326
|
+
_this.addTag({
|
327
|
+
key: label,
|
328
|
+
label
|
329
|
+
});
|
330
|
+
});
|
331
|
+
_defineProperty(_this, "select", void 0);
|
332
|
+
_defineProperty(_this, "selectRef", function (el) {
|
333
|
+
_this.select = el;
|
354
334
|
});
|
355
|
-
|
356
|
-
|
357
|
-
selectRef = el => {
|
358
|
-
this.select = el;
|
359
|
-
};
|
360
|
-
render() {
|
361
|
-
const {
|
362
|
-
focused,
|
363
|
-
tags,
|
364
|
-
activeIndex
|
365
|
-
} = this.state;
|
366
|
-
const {
|
367
|
-
disabled,
|
368
|
-
canNotBeEmpty,
|
369
|
-
allowAddNewTags,
|
370
|
-
filter,
|
371
|
-
size,
|
372
|
-
labelType,
|
373
|
-
height = this.context,
|
374
|
-
label
|
375
|
-
} = this.props;
|
376
|
-
const classes = classNames(modules_5aa8aaf3.tagsInput, [modules_88cfaf40[`size${size}`]], [modules_88cfaf40[`height${height}`]], {
|
377
|
-
[modules_5aa8aaf3.tagsInputDisabled]: disabled,
|
378
|
-
[modules_5aa8aaf3.tagsInputFocused]: focused
|
379
|
-
}, this.props.className);
|
380
|
-
return /*#__PURE__*/React.createElement("div", {
|
381
|
-
// it transfers focus to input
|
382
|
-
role: "presentation",
|
383
|
-
className: classes,
|
384
|
-
onKeyDown: this.handleKeyDown,
|
385
|
-
onClick: this.clickHandler,
|
386
|
-
ref: this.nodeRef
|
387
|
-
}, label && /*#__PURE__*/React.createElement(ControlLabel, {
|
388
|
-
htmlFor: this.id,
|
389
|
-
disabled: disabled,
|
390
|
-
type: labelType
|
391
|
-
}, label), /*#__PURE__*/React.createElement(TagsList, {
|
392
|
-
tags: tags,
|
393
|
-
activeIndex: activeIndex,
|
394
|
-
disabled: disabled,
|
395
|
-
canNotBeEmpty: canNotBeEmpty,
|
396
|
-
handleRemove: this.handleRemove,
|
397
|
-
className: modules_5aa8aaf3.tagsList,
|
398
|
-
tagClassName: modules_5aa8aaf3.tag,
|
399
|
-
handleClick: this.handleClick,
|
400
|
-
customTagComponent: this.props.customTagComponent
|
401
|
-
}, /*#__PURE__*/React.createElement(Select, {
|
402
|
-
id: this.id,
|
403
|
-
ref: this.selectRef,
|
404
|
-
size: Select.Size.AUTO,
|
405
|
-
type: Select.Type.INPUT_WITHOUT_CONTROLS,
|
406
|
-
inputPlaceholder: this.props.placeholder,
|
407
|
-
data: this.state.suggestions,
|
408
|
-
className: classNames(modules_5aa8aaf3.tagsSelect),
|
409
|
-
onSelect: this.addTag,
|
410
|
-
onFocus: this._focusHandler,
|
411
|
-
onBlur: this._blurHandler,
|
412
|
-
renderOptimization: this.props.renderOptimization,
|
413
|
-
add: allowAddNewTags ? {
|
414
|
-
prefix: 'Add new tag'
|
415
|
-
} : undefined,
|
416
|
-
onAdd: allowAddNewTags ? this.handleTagCreation : undefined,
|
417
|
-
filter: filter,
|
418
|
-
maxHeight: this.props.maxPopupHeight,
|
419
|
-
minWidth: this.props.minPopupWidth,
|
420
|
-
top: POPUP_VERTICAL_SHIFT,
|
421
|
-
loading: this.state.loading,
|
422
|
-
onFilter: this.loadSuggestions,
|
423
|
-
onBeforeOpen: this.loadSuggestions,
|
424
|
-
onKeyDown: this.handleKeyDown,
|
425
|
-
disabled: this.props.disabled,
|
426
|
-
loadingMessage: this.props.loadingMessage,
|
427
|
-
notFoundMessage: this.props.notFoundMessage,
|
428
|
-
hint: this.props.hint
|
429
|
-
})));
|
335
|
+
_this.ngModelStateField = TagsInput.ngModelStateField;
|
336
|
+
return _this;
|
430
337
|
}
|
431
|
-
|
432
|
-
|
338
|
+
_inherits(TagsInput, _PureComponent);
|
339
|
+
return _createClass(TagsInput, [{
|
340
|
+
key: "componentDidMount",
|
341
|
+
value: function componentDidMount() {
|
342
|
+
if (this.props.autoOpen && !this.props.disabled) {
|
343
|
+
var _this$select6;
|
344
|
+
this.focusInput();
|
345
|
+
this.loadSuggestions();
|
346
|
+
(_this$select6 = this.select) === null || _this$select6 === void 0 || _this$select6._showPopup();
|
347
|
+
}
|
348
|
+
}
|
349
|
+
}, {
|
350
|
+
key: "getInputNode",
|
351
|
+
value: function getInputNode() {
|
352
|
+
if (!this.input) {
|
353
|
+
var _this$select7;
|
354
|
+
this.input = (_this$select7 = this.select) === null || _this$select7 === void 0 ? void 0 : _this$select7.filter;
|
355
|
+
if (this.input) {
|
356
|
+
this.caret = new Caret(this.input);
|
357
|
+
}
|
358
|
+
}
|
359
|
+
return this.input;
|
360
|
+
}
|
361
|
+
}, {
|
362
|
+
key: "setActiveIndex",
|
363
|
+
value: function setActiveIndex(activeIndex) {
|
364
|
+
this.setState({
|
365
|
+
activeIndex
|
366
|
+
});
|
367
|
+
}
|
368
|
+
}, {
|
369
|
+
key: "onRemoveTag",
|
370
|
+
value: function onRemoveTag(tagToRemove) {
|
371
|
+
var _this2 = this;
|
372
|
+
return Promise.resolve(this.props.onRemoveTag({
|
373
|
+
tag: tagToRemove
|
374
|
+
})).then(function () {
|
375
|
+
var tags = _this2.state.tags.filter(function (tag) {
|
376
|
+
return tag !== tagToRemove;
|
377
|
+
});
|
378
|
+
if (_this2.node) {
|
379
|
+
_this2.setState({
|
380
|
+
tags
|
381
|
+
});
|
382
|
+
_this2.focusInput();
|
383
|
+
}
|
384
|
+
return tags;
|
385
|
+
}, this.focusInput);
|
386
|
+
}
|
387
|
+
}, {
|
388
|
+
key: "render",
|
389
|
+
value: function render() {
|
390
|
+
var _this$state = this.state,
|
391
|
+
focused = _this$state.focused,
|
392
|
+
tags = _this$state.tags,
|
393
|
+
activeIndex = _this$state.activeIndex;
|
394
|
+
var _this$props = this.props,
|
395
|
+
disabled = _this$props.disabled,
|
396
|
+
canNotBeEmpty = _this$props.canNotBeEmpty,
|
397
|
+
allowAddNewTags = _this$props.allowAddNewTags,
|
398
|
+
filter = _this$props.filter,
|
399
|
+
size = _this$props.size,
|
400
|
+
labelType = _this$props.labelType,
|
401
|
+
_this$props$height = _this$props.height,
|
402
|
+
height = _this$props$height === void 0 ? this.context : _this$props$height,
|
403
|
+
label = _this$props.label;
|
404
|
+
var classes = classNames(modules_5aa8aaf3.tagsInput, [modules_88cfaf40["size".concat(size)]], [modules_88cfaf40["height".concat(height)]], {
|
405
|
+
[modules_5aa8aaf3.tagsInputDisabled]: disabled,
|
406
|
+
[modules_5aa8aaf3.tagsInputFocused]: focused
|
407
|
+
}, this.props.className);
|
408
|
+
return /*#__PURE__*/React.createElement("div", {
|
409
|
+
// it transfers focus to input
|
410
|
+
role: "presentation",
|
411
|
+
className: classes,
|
412
|
+
onKeyDown: this.handleKeyDown,
|
413
|
+
onClick: this.clickHandler,
|
414
|
+
ref: this.nodeRef
|
415
|
+
}, label && /*#__PURE__*/React.createElement(ControlLabel, {
|
416
|
+
htmlFor: this.id,
|
417
|
+
disabled: disabled,
|
418
|
+
type: labelType
|
419
|
+
}, label), /*#__PURE__*/React.createElement(TagsList, {
|
420
|
+
tags: tags,
|
421
|
+
activeIndex: activeIndex,
|
422
|
+
disabled: disabled,
|
423
|
+
canNotBeEmpty: canNotBeEmpty,
|
424
|
+
handleRemove: this.handleRemove,
|
425
|
+
className: modules_5aa8aaf3.tagsList,
|
426
|
+
tagClassName: modules_5aa8aaf3.tag,
|
427
|
+
handleClick: this.handleClick,
|
428
|
+
customTagComponent: this.props.customTagComponent
|
429
|
+
}, /*#__PURE__*/React.createElement(Select, {
|
430
|
+
id: this.id,
|
431
|
+
ref: this.selectRef,
|
432
|
+
size: Select.Size.AUTO,
|
433
|
+
type: Select.Type.INPUT_WITHOUT_CONTROLS,
|
434
|
+
inputPlaceholder: this.props.placeholder,
|
435
|
+
data: this.state.suggestions,
|
436
|
+
className: classNames(modules_5aa8aaf3.tagsSelect),
|
437
|
+
onSelect: this.addTag,
|
438
|
+
onFocus: this._focusHandler,
|
439
|
+
onBlur: this._blurHandler,
|
440
|
+
renderOptimization: this.props.renderOptimization,
|
441
|
+
add: allowAddNewTags ? {
|
442
|
+
prefix: 'Add new tag'
|
443
|
+
} : undefined,
|
444
|
+
onAdd: allowAddNewTags ? this.handleTagCreation : undefined,
|
445
|
+
filter: filter,
|
446
|
+
maxHeight: this.props.maxPopupHeight,
|
447
|
+
minWidth: this.props.minPopupWidth,
|
448
|
+
top: POPUP_VERTICAL_SHIFT,
|
449
|
+
loading: this.state.loading,
|
450
|
+
onFilter: this.loadSuggestions,
|
451
|
+
onBeforeOpen: this.loadSuggestions,
|
452
|
+
onKeyDown: this.handleKeyDown,
|
453
|
+
disabled: this.props.disabled,
|
454
|
+
loadingMessage: this.props.loadingMessage,
|
455
|
+
notFoundMessage: this.props.notFoundMessage,
|
456
|
+
hint: this.props.hint
|
457
|
+
})));
|
458
|
+
}
|
459
|
+
}], [{
|
460
|
+
key: "getDerivedStateFromProps",
|
461
|
+
value: function getDerivedStateFromProps(_ref2, _ref3) {
|
462
|
+
var tags = _ref2.tags;
|
463
|
+
var prevTags = _ref3.prevTags;
|
464
|
+
var nextState = {
|
465
|
+
prevTags: tags
|
466
|
+
};
|
467
|
+
if (tags != null && tags !== prevTags) {
|
468
|
+
Object.assign(nextState, {
|
469
|
+
tags,
|
470
|
+
activeIndex: tags.length
|
471
|
+
});
|
472
|
+
}
|
473
|
+
return nextState;
|
474
|
+
}
|
475
|
+
}]);
|
476
|
+
}(PureComponent);
|
477
|
+
_defineProperty(TagsInput, "propTypes", {
|
478
|
+
className: PropTypes.string,
|
479
|
+
tags: PropTypes.array,
|
480
|
+
/**
|
481
|
+
* Datasource should return array(or promise) of suggestions.
|
482
|
+
* Each suggestion should contain key and label fields.
|
483
|
+
* DataSource should handle caching and response racing (when later request
|
484
|
+
* responded earlier) by himself.
|
485
|
+
*/
|
486
|
+
dataSource: PropTypes.func,
|
487
|
+
onAddTag: PropTypes.func,
|
488
|
+
onRemoveTag: PropTypes.func,
|
489
|
+
customTagComponent: PropTypes.instanceOf(Component),
|
490
|
+
maxPopupHeight: PropTypes.number,
|
491
|
+
minPopupWidth: PropTypes.number,
|
492
|
+
placeholder: PropTypes.string,
|
493
|
+
canNotBeEmpty: PropTypes.bool,
|
494
|
+
disabled: PropTypes.bool,
|
495
|
+
autoOpen: PropTypes.bool,
|
496
|
+
renderOptimization: PropTypes.bool,
|
497
|
+
filter: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
|
498
|
+
fn: PropTypes.func
|
499
|
+
})]),
|
500
|
+
size: PropTypes.string,
|
501
|
+
height: PropTypes.string,
|
502
|
+
label: PropTypes.node,
|
503
|
+
loadingMessage: PropTypes.string,
|
504
|
+
notFoundMessage: PropTypes.string,
|
505
|
+
hint: PropTypes.node,
|
506
|
+
allowAddNewTags: PropTypes.bool
|
507
|
+
});
|
508
|
+
_defineProperty(TagsInput, "defaultProps", {
|
509
|
+
dataSource: noop,
|
510
|
+
onAddTag: noop,
|
511
|
+
onRemoveTag: noop,
|
512
|
+
customTagComponent: null,
|
513
|
+
maxPopupHeight: 500,
|
514
|
+
minPopupWidth: 360,
|
515
|
+
canNotBeEmpty: false,
|
516
|
+
disabled: false,
|
517
|
+
autoOpen: false,
|
518
|
+
renderOptimization: true,
|
519
|
+
allowAddNewTags: false,
|
520
|
+
filter: {
|
521
|
+
fn: function fn() {
|
522
|
+
return true;
|
523
|
+
}
|
524
|
+
},
|
525
|
+
placeholder: 'Select an option',
|
526
|
+
size: Size.M
|
527
|
+
});
|
528
|
+
_defineProperty(TagsInput, "ngModelStateField", 'tags');
|
529
|
+
_defineProperty(TagsInput, "contextType", ControlsHeightContext);
|
530
|
+
var RerenderableTagsInput = rerenderHOC(TagsInput);
|
433
531
|
|
434
532
|
export { RerenderableTagsInput, TagsInput as default };
|