@jetbrains/ring-ui 5.0.36 → 5.0.37

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.
Files changed (236) hide show
  1. package/components/input/input.css +2 -0
  2. package/components/query-assist/query-assist.js +1 -1
  3. package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -4
  4. package/dist/_helpers/anchor.js +0 -1
  5. package/dist/_helpers/card.js +0 -3
  6. package/dist/_helpers/dialog__body-scroll-preventer.js +0 -11
  7. package/dist/_helpers/footer.js +2 -13
  8. package/dist/_helpers/query-assist__suggestions.js +0 -10
  9. package/dist/_helpers/select__filter.js +0 -11
  10. package/dist/_helpers/services-link.js +0 -2
  11. package/dist/_helpers/sidebar.js +0 -12
  12. package/dist/_helpers/theme.js +0 -3
  13. package/dist/_helpers/title.js +0 -9
  14. package/dist/alert/alert.js +2 -32
  15. package/dist/alert/container.js +0 -5
  16. package/dist/alert-service/alert-service.js +0 -26
  17. package/dist/analytics/analytics.js +0 -22
  18. package/dist/analytics/analytics__custom-plugin.js +0 -38
  19. package/dist/analytics/analytics__fus-plugin.js +0 -20
  20. package/dist/analytics/analytics__ga-plugin.js +0 -13
  21. package/dist/analytics/analytics__plugin-utils.js +0 -8
  22. package/dist/analytics-ng/analytics-ng.js +3 -9
  23. package/dist/auth/auth.js +2 -3
  24. package/dist/auth/auth__core.js +30 -243
  25. package/dist/auth/background-flow.js +2 -25
  26. package/dist/auth/down-notification.js +0 -7
  27. package/dist/auth/iframe-flow.js +2 -26
  28. package/dist/auth/landing.js +2 -6
  29. package/dist/auth/request-builder.js +0 -11
  30. package/dist/auth/response-parser.js +4 -26
  31. package/dist/auth/storage.js +4 -60
  32. package/dist/auth/token-validator.js +6 -42
  33. package/dist/auth/window-flow.js +2 -34
  34. package/dist/auth-dialog/auth-dialog.js +2 -12
  35. package/dist/auth-dialog-service/auth-dialog-service.js +2 -4
  36. package/dist/auth-ng/auth-ng.js +6 -22
  37. package/dist/auth-ng/auth-ng.mock.js +0 -4
  38. package/dist/autofocus-ng/autofocus-ng.js +0 -5
  39. package/dist/avatar/avatar.js +4 -17
  40. package/dist/avatar/fallback-avatar.js +2 -9
  41. package/dist/avatar-editor-ng/avatar-editor-ng.js +1 -17
  42. package/dist/badge/badge.js +0 -3
  43. package/dist/button/button.js +0 -8
  44. package/dist/button-group/button-group.js +0 -3
  45. package/dist/button-group/caption.js +0 -2
  46. package/dist/button-group-ng/button-group-ng.js +0 -4
  47. package/dist/button-ng/button-ng.js +3 -21
  48. package/dist/button-set/button-set.js +0 -3
  49. package/dist/button-set-ng/button-set-ng.js +0 -2
  50. package/dist/button-toolbar/button-toolbar.js +0 -3
  51. package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -2
  52. package/dist/caret/caret.js +2 -53
  53. package/dist/checkbox/checkbox.js +0 -12
  54. package/dist/code/code.js +3 -25
  55. package/dist/compiler-ng/compiler-ng.js +0 -5
  56. package/dist/confirm/confirm.js +0 -6
  57. package/dist/confirm-service/confirm-service.js +10 -8
  58. package/dist/content-layout/content-layout.js +0 -7
  59. package/dist/contenteditable/contenteditable.js +6 -13
  60. package/dist/data-list/data-list.js +4 -28
  61. package/dist/data-list/item.js +0 -15
  62. package/dist/data-list/selection.js +0 -27
  63. package/dist/date-picker/consts.js +0 -7
  64. package/dist/date-picker/date-input.js +0 -20
  65. package/dist/date-picker/date-picker.js +2 -36
  66. package/dist/date-picker/date-popup.js +18 -71
  67. package/dist/date-picker/day.js +0 -14
  68. package/dist/date-picker/month-names.js +0 -9
  69. package/dist/date-picker/month-slider.js +0 -10
  70. package/dist/date-picker/month.js +2 -4
  71. package/dist/date-picker/months.js +6 -13
  72. package/dist/date-picker/years.js +0 -14
  73. package/dist/dialog/dialog.js +0 -19
  74. package/dist/dialog-ng/dialog-ng.js +17 -105
  75. package/dist/docked-panel-ng/docked-panel-ng.js +6 -29
  76. package/dist/dropdown/dropdown.js +2 -33
  77. package/dist/dropdown-menu/dropdown-menu.js +4 -8
  78. package/dist/editable-heading/editable-heading.js +0 -3
  79. package/dist/error-bubble/error-bubble.js +2 -4
  80. package/dist/error-message/error-message.js +0 -3
  81. package/dist/footer-ng/footer-ng.js +0 -13
  82. package/dist/form-ng/form-ng.js +1 -21
  83. package/dist/global/angular-component-factory.js +0 -10
  84. package/dist/global/compose.js +0 -1
  85. package/dist/global/composeRefs.js +0 -1
  86. package/dist/global/controls-height.js +0 -2
  87. package/dist/global/create-stateful-context.js +0 -5
  88. package/dist/global/data-tests.js +0 -4
  89. package/dist/global/dom.js +2 -11
  90. package/dist/global/focus-sensor-hoc.js +4 -33
  91. package/dist/global/fuzzy-highlight.js +2 -16
  92. package/dist/global/get-event-key.js +8 -17
  93. package/dist/global/get-uid.js +0 -2
  94. package/dist/global/linear-function.js +0 -2
  95. package/dist/global/listeners.js +0 -13
  96. package/dist/global/memoize.js +0 -2
  97. package/dist/global/normalize-indent.js +2 -5
  98. package/dist/global/react-dom-renderer.js +0 -8
  99. package/dist/global/react-render-adapter.js +0 -7
  100. package/dist/global/rerender-hoc.js +0 -7
  101. package/dist/global/ring-angular-component.js +0 -5
  102. package/dist/global/schedule-raf.js +0 -5
  103. package/dist/global/trivial-template-tag.js +2 -3
  104. package/dist/global/url.js +0 -27
  105. package/dist/grid/col.js +0 -4
  106. package/dist/grid/grid.js +0 -3
  107. package/dist/grid/row.js +0 -5
  108. package/dist/group/group.js +0 -3
  109. package/dist/header/header.js +0 -5
  110. package/dist/header/logo.js +0 -4
  111. package/dist/header/profile.js +0 -7
  112. package/dist/header/services.js +0 -11
  113. package/dist/header/smart-profile.js +4 -18
  114. package/dist/header/smart-services.js +0 -17
  115. package/dist/header/tray-icon.js +2 -3
  116. package/dist/header/tray.js +0 -3
  117. package/dist/heading/heading.js +0 -5
  118. package/dist/http/http.js +20 -65
  119. package/dist/http/http.mock.js +2 -14
  120. package/dist/hub-source/hub-source.js +0 -32
  121. package/dist/hub-source/hub-source__user.js +0 -1
  122. package/dist/hub-source/hub-source__users-groups.js +0 -12
  123. package/dist/icon/icon.js +0 -13
  124. package/dist/icon/icon__constants.js +0 -4
  125. package/dist/icon/icon__svg.js +0 -10
  126. package/dist/icon-ng/icon-ng.js +2 -7
  127. package/dist/input/input.js +0 -30
  128. package/dist/input-ng/input-ng.js +0 -17
  129. package/dist/island/adaptive-island-hoc.js +0 -7
  130. package/dist/island/content.js +0 -25
  131. package/dist/island/header.js +0 -7
  132. package/dist/island/island.js +0 -4
  133. package/dist/island-legacy/content-legacy.js +0 -2
  134. package/dist/island-legacy/header-legacy.js +0 -2
  135. package/dist/island-legacy/island-legacy.js +0 -2
  136. package/dist/island-ng/island-content-ng.js +0 -3
  137. package/dist/link/clickableLink.js +2 -10
  138. package/dist/link/link.js +2 -9
  139. package/dist/link-ng/link-ng.js +0 -2
  140. package/dist/list/consts.js +0 -4
  141. package/dist/list/list.js +6 -128
  142. package/dist/list/list__custom.js +0 -4
  143. package/dist/list/list__hint.js +0 -3
  144. package/dist/list/list__item.js +0 -8
  145. package/dist/list/list__link.js +2 -3
  146. package/dist/list/list__separator.js +0 -1
  147. package/dist/list/list__title.js +0 -1
  148. package/dist/list/list__users-groups-source.js +4 -17
  149. package/dist/loader/loader.js +0 -10
  150. package/dist/loader/loader__core.js +6 -70
  151. package/dist/loader-inline/loader-inline.js +0 -3
  152. package/dist/loader-ng/loader-ng.js +0 -7
  153. package/dist/loader-screen/loader-screen.js +0 -3
  154. package/dist/loader-screen-ng/loader-screen-ng.js +2 -14
  155. package/dist/login-dialog/login-dialog.js +0 -15
  156. package/dist/login-dialog/service.js +2 -4
  157. package/dist/markdown/code.js +0 -2
  158. package/dist/markdown/heading.js +0 -1
  159. package/dist/markdown/link.js +0 -1
  160. package/dist/markdown/markdown.js +0 -2
  161. package/dist/message/message.js +0 -24
  162. package/dist/message-bundle-ng/message-bundle-ng.js +2 -45
  163. package/dist/old-browsers-message/old-browsers-message.js +2 -21
  164. package/dist/old-browsers-message/white-list.js +2 -6
  165. package/dist/pager/pager.js +2 -39
  166. package/dist/panel/panel.js +0 -3
  167. package/dist/permissions/permissions.js +1 -43
  168. package/dist/permissions/permissions__cache.js +12 -63
  169. package/dist/permissions-ng/permissions-ng.js +11 -19
  170. package/dist/place-under-ng/place-under-ng.js +0 -19
  171. package/dist/popup/popup.consts.js +0 -11
  172. package/dist/popup/popup.js +6 -68
  173. package/dist/popup/position.js +8 -30
  174. package/dist/popup-menu/popup-menu.js +4 -13
  175. package/dist/progress-bar/progress-bar.js +0 -14
  176. package/dist/promised-click-ng/promised-click-ng.js +3 -22
  177. package/dist/query-assist/query-assist.js +17 -201
  178. package/dist/radio/radio.js +0 -6
  179. package/dist/radio/radio__item.js +0 -9
  180. package/dist/radio-ng/radio-ng.js +0 -4
  181. package/dist/save-field-ng/save-field-ng.js +1 -37
  182. package/dist/select/select.js +18 -208
  183. package/dist/select/select__popup.js +4 -76
  184. package/dist/select-ng/select-ng.js +18 -74
  185. package/dist/select-ng/select-ng__lazy.js +2 -17
  186. package/dist/select-ng/select-ng__options.js +3 -29
  187. package/dist/shortcuts/core.js +4 -56
  188. package/dist/shortcuts/shortcuts-hoc.js +0 -4
  189. package/dist/shortcuts/shortcuts.js +0 -10
  190. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -13
  191. package/dist/shortcuts-ng/shortcuts-ng.js +16 -46
  192. package/dist/sidebar-ng/sidebar-ng.js +2 -12
  193. package/dist/storage/storage.js +2 -5
  194. package/dist/storage/storage__fallback.js +2 -48
  195. package/dist/storage/storage__local.js +0 -23
  196. package/dist/style.css +1 -1
  197. package/dist/tab-trap/tab-trap.js +0 -37
  198. package/dist/table/cell.js +0 -2
  199. package/dist/table/disable-hover-hoc.js +0 -9
  200. package/dist/table/header-cell.js +0 -8
  201. package/dist/table/header.js +0 -16
  202. package/dist/table/multitable.js +0 -23
  203. package/dist/table/row-with-focus-sensor.js +0 -12
  204. package/dist/table/row.js +0 -18
  205. package/dist/table/selection-adapter.js +0 -2
  206. package/dist/table/selection-shortcuts-hoc.js +8 -42
  207. package/dist/table/selection.js +0 -50
  208. package/dist/table/smart-table.js +0 -9
  209. package/dist/table/table.js +6 -37
  210. package/dist/table-legacy-ng/table-legacy-ng.js +12 -42
  211. package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -31
  212. package/dist/table-legacy-ng/table-legacy-ng__selection.js +0 -32
  213. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +2 -5
  214. package/dist/tabs/collapsible-more.js +0 -5
  215. package/dist/tabs/collapsible-tab.js +0 -4
  216. package/dist/tabs/collapsible-tabs.js +8 -28
  217. package/dist/tabs/dumb-tabs.js +0 -8
  218. package/dist/tabs/smart-tabs.js +0 -6
  219. package/dist/tabs/tab-link.js +0 -1
  220. package/dist/tabs/tab.js +0 -2
  221. package/dist/tabs-ng/tabs-ng.js +13 -29
  222. package/dist/tag/tag.js +0 -24
  223. package/dist/tags-input/tags-input.js +0 -76
  224. package/dist/tags-list/tags-list.js +0 -6
  225. package/dist/template-ng/template-ng.js +0 -12
  226. package/dist/text/text.js +0 -3
  227. package/dist/theme-ng/theme-ng.js +0 -8
  228. package/dist/title-ng/title-ng.js +6 -17
  229. package/dist/toggle/toggle.js +0 -4
  230. package/dist/tooltip/tooltip.js +4 -35
  231. package/dist/tooltip-ng/tooltip-ng.js +2 -8
  232. package/dist/user-agreement/service.js +0 -62
  233. package/dist/user-agreement/user-agreement.js +0 -8
  234. package/dist/user-card/smart-user-card-tooltip.js +2 -8
  235. package/dist/user-card/tooltip.js +0 -3
  236. package/package.json +15 -15
@@ -85,16 +85,12 @@ function noop() {}
85
85
  /**
86
86
  * @name Tags Input
87
87
  */
88
-
89
-
90
88
  const POPUP_VERTICAL_SHIFT = 2;
91
89
  class TagsInput extends PureComponent {
92
90
  constructor(props) {
93
91
  var _this;
94
-
95
92
  super(props);
96
93
  _this = this;
97
-
98
94
  _defineProperty(this, "state", {
99
95
  tags: [],
100
96
  prevTags: null,
@@ -104,38 +100,26 @@ class TagsInput extends PureComponent {
104
100
  query: '',
105
101
  activeIndex: 0
106
102
  });
107
-
108
103
  _defineProperty(this, "ngModelStateField", void 0);
109
-
110
104
  _defineProperty(this, "id", getUID('ring-tags-list-'));
111
-
112
105
  _defineProperty(this, "node", void 0);
113
-
114
106
  _defineProperty(this, "nodeRef", node => {
115
107
  this.node = node;
116
108
  });
117
-
118
109
  _defineProperty(this, "input", void 0);
119
-
120
110
  _defineProperty(this, "caret", void 0);
121
-
122
111
  _defineProperty(this, "focusInput", () => {
123
112
  var _this$getInputNode;
124
-
125
113
  (_this$getInputNode = this.getInputNode()) === null || _this$getInputNode === void 0 ? void 0 : _this$getInputNode.focus();
126
114
  });
127
-
128
115
  _defineProperty(this, "addTag", tag => {
129
116
  var _this$select, _this$select2;
130
-
131
117
  if (tag == null) {
132
118
  return;
133
119
  }
134
-
135
120
  const isUniqueTag = this.state.tags.filter(item => tag.key === item.key).length === 0;
136
121
  (_this$select = this.select) === null || _this$select === void 0 ? void 0 : _this$select.clear();
137
122
  (_this$select2 = this.select) === null || _this$select2 === void 0 ? void 0 : _this$select2.filterValue('');
138
-
139
123
  if (isUniqueTag) {
140
124
  this.setState(prevState => ({
141
125
  tags: prevState.tags.concat([tag])
@@ -146,23 +130,18 @@ class TagsInput extends PureComponent {
146
130
  this.setActiveIndex();
147
131
  }
148
132
  });
149
-
150
133
  _defineProperty(this, "clickHandler", event => {
151
134
  var _this$getInputNode2;
152
-
153
135
  if (event.target !== this.node) {
154
136
  return;
155
137
  }
156
-
157
138
  this.loadSuggestions((_this$getInputNode2 = this.getInputNode()) === null || _this$getInputNode2 === void 0 ? void 0 : _this$getInputNode2.value);
158
139
  this.focusInput();
159
140
  });
160
-
161
141
  _defineProperty(this, "filterExistingTags", suggestions => {
162
142
  const tagsMap = new Map(this.state.tags.map(tag => [tag.key, tag]));
163
143
  return suggestions.filter(suggestion => !tagsMap.has(suggestion.key));
164
144
  });
165
-
166
145
  _defineProperty(this, "loadSuggestions", function () {
167
146
  let query = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
168
147
  return _this.setState({
@@ -173,11 +152,8 @@ class TagsInput extends PureComponent {
173
152
  const suggestionsResult = _this.props.dataSource({
174
153
  query
175
154
  });
176
-
177
155
  const allSuggestions = Array.isArray(suggestionsResult) ? suggestionsResult : await suggestionsResult;
178
-
179
156
  const suggestions = _this.filterExistingTags(allSuggestions);
180
-
181
157
  if (_this.node && query === _this.state.query) {
182
158
  _this.setState({
183
159
  suggestions,
@@ -191,132 +167,100 @@ class TagsInput extends PureComponent {
191
167
  }
192
168
  });
193
169
  });
194
-
195
170
  _defineProperty(this, "_focusHandler", () => {
196
171
  this.setActiveIndex(null);
197
172
  this.setState({
198
173
  focused: true
199
174
  });
200
175
  });
201
-
202
176
  _defineProperty(this, "_blurHandler", () => {
203
177
  this.setState({
204
178
  focused: false
205
179
  });
206
180
  });
207
-
208
181
  _defineProperty(this, "selectTag", moveForward => {
209
182
  const activeIndex = typeof this.state.activeIndex === 'number' ? this.state.activeIndex : this.state.tags.length + 1;
210
183
  let newActiveIndex = activeIndex + (moveForward ? 1 : -1);
211
-
212
184
  if (newActiveIndex >= this.state.tags.length) {
213
185
  newActiveIndex = this.state.tags.length - 1;
214
186
  } else if (newActiveIndex < 0) {
215
187
  newActiveIndex = 0;
216
188
  }
217
-
218
189
  if (this.state.activeIndex !== newActiveIndex) {
219
190
  this.setActiveIndex(newActiveIndex);
220
191
  }
221
192
  });
222
-
223
193
  _defineProperty(this, "handleKeyDown", event => {
224
194
  var _this$select3, _this$select3$_popup;
225
-
226
195
  const key = getEventKey(event);
227
-
228
196
  const isInputFocused = () => {
229
197
  var _this$getInputNode$ta, _this$getInputNode3;
230
-
231
198
  return event.target instanceof Element && event.target.matches((_this$getInputNode$ta = (_this$getInputNode3 = this.getInputNode()) === null || _this$getInputNode3 === void 0 ? void 0 : _this$getInputNode3.tagName) !== null && _this$getInputNode$ta !== void 0 ? _this$getInputNode$ta : '');
232
199
  };
233
-
234
200
  if (key === ' ' && this.props.allowAddNewTags) {
235
201
  var _this$getInputNode4;
236
-
237
202
  event.stopPropagation();
238
203
  const value = (_this$getInputNode4 = this.getInputNode()) === null || _this$getInputNode4 === void 0 ? void 0 : _this$getInputNode4.value;
239
-
240
204
  if (value != null && value !== '') {
241
205
  this.handleTagCreation(value);
242
206
  }
243
-
244
207
  return true;
245
208
  }
246
-
247
209
  if ((_this$select3 = this.select) !== null && _this$select3 !== void 0 && (_this$select3$_popup = _this$select3._popup) !== null && _this$select3$_popup !== void 0 && _this$select3$_popup.isVisible()) {
248
210
  return true;
249
211
  }
250
-
251
212
  if (key === 'ArrowLeft') {
252
213
  if (this.getInputNode() && this.caret != null && this.caret.getPosition() > 0) {
253
214
  return true;
254
215
  }
255
-
256
216
  this.selectTag();
257
217
  return false;
258
218
  }
259
-
260
219
  if (key === 'ArrowRight' && !isInputFocused()) {
261
220
  if (this.state.activeIndex === this.state.tags.length - 1) {
262
221
  if (!this.props.disabled) {
263
222
  var _this$getInputNode5;
264
-
265
223
  (_this$getInputNode5 = this.getInputNode()) === null || _this$getInputNode5 === void 0 ? void 0 : _this$getInputNode5.focus();
266
224
  this.setActiveIndex();
267
225
  }
268
226
  } else {
269
227
  this.selectTag(true);
270
228
  }
271
-
272
229
  return false;
273
230
  }
274
-
275
231
  if (!this.props.disabled) {
276
232
  var _this$getInputNode6;
277
-
278
233
  if (key === 'Backspace' && !((_this$getInputNode6 = this.getInputNode()) !== null && _this$getInputNode6 !== void 0 && _this$getInputNode6.value)) {
279
234
  var _this$select4;
280
-
281
235
  event.preventDefault();
282
236
  const tagsLength = this.state.tags.length;
283
237
  (_this$select4 = this.select) === null || _this$select4 === void 0 ? void 0 : _this$select4._hidePopup(true); // otherwise confirmation may be overlapped by popup
284
-
285
238
  this.onRemoveTag(this.state.tags[tagsLength - 1]);
286
239
  return false;
287
240
  }
288
-
289
241
  if ((key === 'Delete' || key === 'Backspace') && this.state.activeIndex != null && this.state.tags[this.state.activeIndex]) {
290
242
  this.onRemoveTag(this.state.tags[this.state.activeIndex]).then(() => this.selectTag(true));
291
243
  return false;
292
244
  }
293
245
  }
294
-
295
246
  return true;
296
247
  });
297
-
298
248
  _defineProperty(this, "handleClick", memoize(tag => () => {
299
249
  this.setActiveIndex(this.state.tags.indexOf(tag));
300
250
  }));
301
-
302
251
  _defineProperty(this, "handleRemove", memoize(tag => () => this.onRemoveTag(tag)));
303
-
304
252
  _defineProperty(this, "handleTagCreation", label => {
305
253
  this.addTag({
306
254
  key: label,
307
255
  label
308
256
  });
309
257
  });
310
-
311
258
  _defineProperty(this, "select", void 0);
312
-
313
259
  _defineProperty(this, "selectRef", el => {
314
260
  this.select = el;
315
261
  });
316
-
317
262
  this.ngModelStateField = TagsInput.ngModelStateField;
318
263
  }
319
-
320
264
  static getDerivedStateFromProps(_ref, _ref2) {
321
265
  let {
322
266
  tags
@@ -327,64 +271,51 @@ class TagsInput extends PureComponent {
327
271
  const nextState = {
328
272
  prevTags: tags
329
273
  };
330
-
331
274
  if (tags != null && tags !== prevTags) {
332
275
  Object.assign(nextState, {
333
276
  tags,
334
277
  activeIndex: tags.length
335
278
  });
336
279
  }
337
-
338
280
  return nextState;
339
281
  }
340
-
341
282
  componentDidMount() {
342
283
  if (this.props.autoOpen && !this.props.disabled) {
343
284
  var _this$select5;
344
-
345
285
  this.focusInput();
346
286
  this.loadSuggestions();
347
287
  (_this$select5 = this.select) === null || _this$select5 === void 0 ? void 0 : _this$select5._showPopup();
348
288
  }
349
289
  }
350
-
351
290
  getInputNode() {
352
291
  if (!this.input) {
353
292
  var _this$select6;
354
-
355
293
  this.input = (_this$select6 = this.select) === null || _this$select6 === void 0 ? void 0 : _this$select6.filter;
356
-
357
294
  if (this.input) {
358
295
  this.caret = new Caret(this.input);
359
296
  }
360
297
  }
361
-
362
298
  return this.input;
363
299
  }
364
-
365
300
  setActiveIndex(activeIndex) {
366
301
  this.setState({
367
302
  activeIndex
368
303
  });
369
304
  }
370
-
371
305
  onRemoveTag(tagToRemove) {
372
306
  return Promise.resolve(this.props.onRemoveTag({
373
307
  tag: tagToRemove
374
308
  })).then(() => {
375
309
  const tags = this.state.tags.filter(tag => tag !== tagToRemove);
376
-
377
310
  if (this.node) {
378
311
  this.setState({
379
312
  tags
380
313
  });
381
314
  this.focusInput();
382
315
  }
383
-
384
316
  return tags;
385
317
  }, this.focusInput);
386
318
  }
387
-
388
319
  render() {
389
320
  const {
390
321
  focused,
@@ -454,13 +385,10 @@ class TagsInput extends PureComponent {
454
385
  notFoundMessage: this.props.notFoundMessage
455
386
  })));
456
387
  }
457
-
458
388
  }
459
-
460
389
  _defineProperty(TagsInput, "propTypes", {
461
390
  className: PropTypes.string,
462
391
  tags: PropTypes.array,
463
-
464
392
  /**
465
393
  * Datasource should return array(or promise) of suggestions.
466
394
  * Each suggestion should contain key and label fields.
@@ -488,7 +416,6 @@ _defineProperty(TagsInput, "propTypes", {
488
416
  notFoundMessage: PropTypes.string,
489
417
  allowAddNewTags: PropTypes.bool
490
418
  });
491
-
492
419
  _defineProperty(TagsInput, "defaultProps", {
493
420
  dataSource: noop,
494
421
  onAddTag: noop,
@@ -507,11 +434,8 @@ _defineProperty(TagsInput, "defaultProps", {
507
434
  placeholder: 'Select an option',
508
435
  size: Size.M
509
436
  });
510
-
511
437
  _defineProperty(TagsInput, "ngModelStateField", 'tags');
512
-
513
438
  _defineProperty(TagsInput, "contextType", ControlsHeightContext);
514
-
515
439
  const RerenderableTagsInput = rerenderHOC(TagsInput);
516
440
 
517
441
  export { RerenderableTagsInput, TagsInput as default };
@@ -21,8 +21,6 @@ function noop() {}
21
21
  /**
22
22
  * @name Tags List
23
23
  */
24
-
25
-
26
24
  class TagsList extends Component {
27
25
  renderTag(tag, focusTag) {
28
26
  const TagComponent = this.props.customTagComponent || Tag;
@@ -39,7 +37,6 @@ class TagsList extends Component {
39
37
  className: tagClassName
40
38
  }), tag.label);
41
39
  }
42
-
43
40
  render() {
44
41
  const {
45
42
  children,
@@ -60,9 +57,7 @@ class TagsList extends Component {
60
57
  className: classes
61
58
  }, props), tagsList, children);
62
59
  }
63
-
64
60
  }
65
-
66
61
  _defineProperty(TagsList, "propTypes", {
67
62
  children: PropTypes.node,
68
63
  tags: PropTypes.array,
@@ -75,7 +70,6 @@ _defineProperty(TagsList, "propTypes", {
75
70
  className: PropTypes.string,
76
71
  tagClassName: PropTypes.string
77
72
  });
78
-
79
73
  _defineProperty(TagsList, "defaultProps", {
80
74
  customTagComponent: null,
81
75
  canNotBeEmpty: false,
@@ -7,13 +7,10 @@ import RingAngularComponent from '../global/ring-angular-component.js';
7
7
  */
8
8
 
9
9
  const angularModule = angular.module('Ring.template', []);
10
-
11
10
  class RgTemplateController extends RingAngularComponent {
12
11
  constructor() {
13
12
  super(...arguments);
14
-
15
13
  _defineProperty(this, "currentScope", null);
16
-
17
14
  _defineProperty(this, "render", template => {
18
15
  const {
19
16
  $scope,
@@ -28,38 +25,29 @@ class RgTemplateController extends RingAngularComponent {
28
25
  $compile($element.contents())(this.currentScope);
29
26
  });
30
27
  });
31
-
32
28
  _defineProperty(this, "addInnerClass", () => {
33
29
  const {
34
30
  rgTemplateClass
35
31
  } = this.$inject.$attrs;
36
-
37
32
  if (rgTemplateClass) {
38
33
  this.$inject.$element.contents().addClass(rgTemplateClass);
39
34
  }
40
35
  });
41
-
42
36
  const {
43
37
  $scope: _$scope,
44
38
  $attrs
45
39
  } = this.$inject;
46
-
47
40
  _$scope.$watch($attrs.rgTemplate || $attrs.template, this.render);
48
41
  }
49
-
50
42
  cleanup() {
51
43
  if (this.currentScope) {
52
44
  this.currentScope.$destroy();
53
45
  this.currentScope = null;
54
46
  }
55
47
  }
56
-
57
48
  }
58
-
59
49
  RgTemplateController.$inject = [];
60
-
61
50
  _defineProperty(RgTemplateController, "$inject", ['$scope', '$element', '$attrs', '$compile']);
62
-
63
51
  angularModule.directive('rgTemplate', function rgTemplateDirective() {
64
52
  return {
65
53
  controller: RgTemplateController
package/dist/text/text.js CHANGED
@@ -8,7 +8,6 @@ var modules_78d1bce6 = {"text":"text_rui_6f30","info":"info_rui_6f30"};
8
8
  /**
9
9
  * @name Text
10
10
  */
11
-
12
11
  class Text extends Component {
13
12
  render() {
14
13
  const {
@@ -24,9 +23,7 @@ class Text extends Component {
24
23
  className: classes
25
24
  }, restProps), children);
26
25
  }
27
-
28
26
  }
29
-
30
27
  _defineProperty(Text, "propTypes", {
31
28
  children: PropTypes.node,
32
29
  info: PropTypes.bool,
@@ -3,21 +3,17 @@ import angular from 'angular';
3
3
  import RingAngularComponent from '../global/ring-angular-component.js';
4
4
 
5
5
  const angularModule = angular.module('Ring.theme', []);
6
-
7
6
  class RingThemeComponent extends RingAngularComponent {
8
7
  constructor() {
9
8
  super(...arguments);
10
-
11
9
  _defineProperty(this, "on", this.$inject.$scope.$on.bind(this.$inject.$scope));
12
10
  }
13
-
14
11
  $onInit() {
15
12
  const {
16
13
  $element
17
14
  } = this.$inject;
18
15
  $element[0].setAttribute('data-test', 'ring-theme');
19
16
  }
20
-
21
17
  $onChanges(changes) {
22
18
  if (changes.theme && changes.theme.currentValue) {
23
19
  const {
@@ -29,15 +25,11 @@ class RingThemeComponent extends RingAngularComponent {
29
25
  });
30
26
  }
31
27
  }
32
-
33
28
  }
34
-
35
29
  _defineProperty(RingThemeComponent, "$inject", ['$scope', '$element']);
36
-
37
30
  _defineProperty(RingThemeComponent, "bindings", {
38
31
  theme: '<'
39
32
  });
40
-
41
33
  angularModule.component('rgTheme', RingThemeComponent);
42
34
  var themeNg = angularModule.name;
43
35
 
@@ -9,28 +9,29 @@ angularModule.directive('rgPageTitle', function rgPageTitleDirective() {
9
9
  delimiter: '@'
10
10
  },
11
11
  controller: ["$rootScope", "$scope", "$element", "$attrs", "pageTitle", "$injector", function controller($rootScope, $scope, $element, $attrs, pageTitle, $injector) {
12
- const element = $element[0]; // Get title prefix from title element
12
+ const element = $element[0];
13
13
 
14
+ // Get title prefix from title element
14
15
  const elementText = element.textContent;
15
- let offScopeWatch = angular.noop; // Set page title on route change
16
+ let offScopeWatch = angular.noop;
16
17
 
18
+ // Set page title on route change
17
19
  const offRouteWatch = $rootScope.$on('$routeChangeSuccess', (event, current) => {
18
20
  //Do nothing if we're being redirected
19
21
  if (current.$$route && current.$$route.redirectTo) {
20
22
  // eslint-disable-line angular/no-private-call
21
23
  return;
22
24
  }
23
-
24
25
  let routeTitle = current.$$route && current.$$route.title; // eslint-disable-line angular/no-private-call
25
26
 
26
- pageTitle.setCurrent($scope.rgPageTitle || elementText); // Use title: false to prevent title change on route
27
+ pageTitle.setCurrent($scope.rgPageTitle || elementText);
27
28
 
29
+ // Use title: false to prevent title change on route
28
30
  if (routeTitle !== false) {
29
31
  if (angular.isArray(routeTitle) || angular.isFunction(routeTitle)) {
30
32
  //Invoke injector
31
33
  routeTitle = $injector.invoke(routeTitle);
32
34
  }
33
-
34
35
  pageTitle.addElement(routeTitle || $scope.noTitle);
35
36
  }
36
37
  });
@@ -38,10 +39,8 @@ angularModule.directive('rgPageTitle', function rgPageTitleDirective() {
38
39
  offRouteWatch();
39
40
  offScopeWatch();
40
41
  });
41
-
42
42
  this.$onInit = () => {
43
43
  pageTitle.setDelimiter($scope.delimiter);
44
-
45
44
  if ($attrs.rgPageTitle) {
46
45
  offScopeWatch = $scope.$watch('rgPageTitle', newBaseTitle => {
47
46
  pageTitle.setRootElement(newBaseTitle);
@@ -54,37 +53,29 @@ angularModule.directive('rgPageTitle', function rgPageTitleDirective() {
54
53
  angularModule.service('pageTitle', ["$interpolate", "$document", function service($interpolate, $document) {
55
54
  let delimiter = ' | ';
56
55
  let current = $document[0].title;
57
-
58
56
  function setTitle(text) {
59
57
  current = text && $interpolate(text)();
60
58
  updateDocumentTitle(current);
61
59
  }
62
-
63
60
  function updateDocumentTitle(text) {
64
61
  $document[0].title = text;
65
62
  }
66
-
67
63
  function prepend(element) {
68
64
  setTitle(current ? element + delimiter + current : element);
69
65
  }
70
-
71
66
  function replacePart(element) {
72
67
  let replaceIndex = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
73
68
  const titleElements = current.split(delimiter);
74
69
  titleElements[replaceIndex === -1 ? titleElements.length - 1 : replaceIndex] = element;
75
70
  setTitle(titleElements.join(delimiter));
76
71
  }
77
-
78
72
  this.setDelimiter = newDelimiter => {
79
73
  delimiter = newDelimiter || delimiter;
80
74
  };
81
-
82
75
  this.setCurrent = newBase => {
83
76
  current = newBase;
84
77
  };
85
-
86
78
  this.setText = text => updateDocumentTitle(text);
87
-
88
79
  this.addElement = (element, fieldName) => {
89
80
  if (element.$promise) {
90
81
  element.$promise.then(Data => {
@@ -94,7 +85,6 @@ angularModule.service('pageTitle', ["$interpolate", "$document", function servic
94
85
  prepend(fieldName ? element[fieldName] : element);
95
86
  }
96
87
  };
97
-
98
88
  this.updateElement = (element, fieldName) => {
99
89
  if (element.$promise) {
100
90
  element.$promise.then(Data => {
@@ -104,7 +94,6 @@ angularModule.service('pageTitle', ["$interpolate", "$document", function servic
104
94
  replacePart(fieldName ? element[fieldName] : element);
105
95
  }
106
96
  };
107
-
108
97
  this.setRootElement = element => {
109
98
  replacePart(element, -1);
110
99
  };
@@ -11,7 +11,6 @@ const Size = {
11
11
  Size16: modules_331c5aa7.size16,
12
12
  Size20: modules_331c5aa7.size20
13
13
  };
14
-
15
14
  class Toggle extends PureComponent {
16
15
  render() {
17
16
  const {
@@ -48,9 +47,7 @@ class Toggle extends PureComponent {
48
47
  className: modules_331c5aa7.label
49
48
  }, children));
50
49
  }
51
-
52
50
  }
53
-
54
51
  _defineProperty(Toggle, "propTypes", {
55
52
  children: PropTypes.node,
56
53
  name: PropTypes.string,
@@ -66,7 +63,6 @@ _defineProperty(Toggle, "propTypes", {
66
63
  size: PropTypes.oneOf(Object.values(Size)),
67
64
  'data-test': PropTypes.string
68
65
  });
69
-
70
66
  _defineProperty(Toggle, "defaultProps", {
71
67
  size: Size.Size14
72
68
  });