@jetbrains/ring-ui 5.0.17 → 5.0.20

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.
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import debounce from 'just-debounce-it';
4
4
  import classNames from 'classnames';
5
5
  import deepEqual from 'deep-equal';
6
- import searchIcon from '@jetbrains/icons/search-12px';
6
+ import searchIcon from '@jetbrains/icons/search';
7
7
  import closeIcon from '@jetbrains/icons/close-12px';
8
8
  import getUID from '../global/get-uid';
9
9
  import dataTests from '../global/data-tests';
@@ -15,6 +15,7 @@ import LoaderInline from '../loader-inline/loader-inline';
15
15
  import Shortcuts from '../shortcuts/shortcuts';
16
16
  import rerenderHOC from '../global/rerender-hoc';
17
17
  import Button from '../button/button';
18
+ import Icon from '../icon/icon';
18
19
  import QueryAssistSuggestions from './query-assist__suggestions';
19
20
  import styles from './query-assist.css';
20
21
  const POPUP_COMPENSATION = PopupMenu.ListProps.Dimension.ITEM_PADDING +
@@ -148,7 +149,8 @@ export default class QueryAssist extends Component {
148
149
  useCustomItemRender: PropTypes.bool,
149
150
  translations: PropTypes.object,
150
151
  actions: PropTypes.array,
151
- 'data-test': PropTypes.string
152
+ 'data-test': PropTypes.string,
153
+ huge: PropTypes.bool
152
154
  };
153
155
  static defaultProps = {
154
156
  onApply: noop,
@@ -747,16 +749,21 @@ export default class QueryAssist extends Component {
747
749
  const actions = [...(this.props.actions || [])];
748
750
  const renderClear = this.props.clear && !!this.state.query;
749
751
  if (renderClear) {
750
- actions.push(<Button icon={closeIcon} key={'clearAction'} className={styles.icon} iconClassName={styles.iconInner} title={this.props.translations.clearTitle} ref={this.clearRef} onClick={this.clearQuery} data-test="query-assist-clear-icon"/>);
752
+ actions.push(<Button icon={closeIcon} key={'clearAction'} className={styles.clear} title={this.props.translations.clearTitle} ref={this.clearRef} onClick={this.clearQuery} data-test="query-assist-clear-icon"/>);
751
753
  }
752
754
  return actions;
753
755
  }
754
756
  render() {
755
- const { glass, 'data-test': dataTest, className, useCustomItemRender } = this.props;
757
+ const { glass, 'data-test': dataTest, className, useCustomItemRender, huge } = this.props;
756
758
  const renderPlaceholder = !!this.props.placeholder && this.state.placeholderEnabled;
757
759
  const renderLoader = this.props.loader !== false && this.state.loading;
758
760
  const renderGlass = glass && !renderLoader;
759
761
  const actions = this.renderActions();
762
+ const containerClasses = classNames(className, {
763
+ [styles.queryAssist]: true,
764
+ [styles.withIcon]: (renderGlass && !huge) || renderLoader,
765
+ [styles.huge]: huge
766
+ });
760
767
  const inputClasses = classNames({
761
768
  [`${styles.input} ring-js-shortcuts`]: true,
762
769
  [styles.inputGap]: actions.length || this.isRenderingGlassOrLoader() && !glass,
@@ -764,11 +771,12 @@ export default class QueryAssist extends Component {
764
771
  [styles.inputLeftGap]: this.isRenderingGlassOrLoader() && glass,
765
772
  [styles.inputDisabled]: this.props.disabled
766
773
  });
767
- return (<div data-test={dataTests('ring-query-assist', dataTest)} className={classNames(className, styles.queryAssist)} role="presentation" ref={this.nodeRef}>
774
+ return (<div data-test={dataTests('ring-query-assist', dataTest)} className={containerClasses} role="presentation" ref={this.nodeRef}>
768
775
  {this.state.shortcuts &&
769
776
  (<Shortcuts map={this.shortcutsMap} scope={this.shortcutsScope}/>)}
770
777
 
771
- {renderGlass && (<Button icon={searchIcon} className={styles.icon} iconClassName={styles.iconInner} title={this.props.translations.searchTitle} ref={this.glassRef} onClick={this.handleApply} data-test="query-assist-search-icon"/>)}
778
+ {renderGlass && !huge && (<Icon glyph={searchIcon} className={styles.icon} title={this.props.translations.searchTitle} ref={this.glassRef} data-test="query-assist-search-icon"/>)}
779
+
772
780
  {renderLoader && (<div className={classNames(styles.icon, styles.loader, {
773
781
  [styles.loaderOnTheRight]: !glass
774
782
  })} ref={this.loaderRef}>
@@ -779,14 +787,17 @@ export default class QueryAssist extends Component {
779
787
  onKeyUp={this.handleInput} // to handle input and key up
780
788
  onKeyDown={this.handleEnter} onPaste={this.handlePaste} spellCheck="false">{this.state.query && <span>{this.renderQuery()}</span>}</ContentEditable>
781
789
 
782
- {renderPlaceholder && (<button type="button" className={classNames(styles.placeholder, {
783
- [styles.placeholderSpaced]: glass
784
- })} ref={this.placeholderRef} onClick={this.handleCaretMove} data-test="query-assist-placeholder">
790
+ {renderPlaceholder && (<button type="button" className={styles.placeholder} ref={this.placeholderRef} onClick={this.handleCaretMove} data-test="query-assist-placeholder">
785
791
  {this.props.placeholder}
786
792
  </button>)}
787
- {actions &&
788
- <div data-test="ring-query-assist-actions" className={styles.actions}>{actions}</div>}
793
+
794
+ {actions && (<div data-test="ring-query-assist-actions" className={styles.actions}>{actions}</div>)}
795
+
789
796
  <PopupMenu hidden={!this.state.showPopup} onCloseAttempt={this.closePopup} ref={this.popupRef} anchorElement={this.node} keepMounted attached className={this.props.popupClassName} directions={[PopupMenu.PopupProps.Directions.BOTTOM_RIGHT]} data={useCustomItemRender ? this.state.suggestions : this.renderSuggestions()} data-test="ring-query-assist-popup" hint={this.props.hint} hintOnSelection={this.props.hintOnSelection} left={this.getPopupOffset(this.state.suggestions)} maxHeight={PopupMenu.PopupProps.MaxHeight.SCREEN} onMouseDown={this.trackPopupMouseState} onMouseUp={this.trackPopupMouseState} onSelect={item => this.handleComplete(item)}/>
797
+
798
+ {glass && huge && (<div className={styles.rightSearchButton}>
799
+ <Icon glyph={searchIcon} className={styles.rightSearchIcon} title={this.props.translations.searchTitle} onClick={this.handleApply} ref={this.glassRef} data-test="query-assist-search-icon"/>
800
+ </div>)}
790
801
  </div>);
791
802
  }
792
803
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import List from '../list/list.js';
3
3
 
4
- var modules_da7ab055 = {"dark":"dark_rui_eb55","unit":"8px","overInputZIndex":"2","inputGap":"24px","queryAssist":"queryAssist_rui_d22e font_rui_8bff","input":"input_rui_d22e","placeholder":"placeholder_rui_d22e resetButton_rui_8bff","letter-text":"letter-text_rui_d22e","letterDefault":"letterDefault_rui_d22e","letter-field-name":"letter-field-name_rui_d22e","letter-field-value":"letter-field-value_rui_d22e","letter-operator":"letter-operator_rui_d22e","letter-error":"letter-error_rui_d22e","iconInner":"iconInner_rui_d22e","highlight":"highlight_rui_d22e","service":"service_rui_d22e","icon":"icon_rui_d22e","loader":"loader_rui_d22e","actions":"actions_rui_d22e","24px":"24px_rui_d22e","inputGap2":"inputGap2_rui_d22e","inputLeftGap":"inputLeftGap_rui_d22e","inputDisabled":"inputDisabled_rui_d22e","placeholderSpaced":"placeholderSpaced_rui_d22e","letter":"letter_rui_d22e","loaderOnTheRight":"loaderOnTheRight_rui_d22e"};
4
+ var modules_da7ab055 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","height":"var(--ring-button-height)","loaderWidth":"64px","overInputZIndex":"2","inputGap":"24px","heightS":"heightS_rui_d22e","heightM":"heightM_rui_d22e","heightL":"heightL_rui_d22e","button":"button_rui_d22e","active":"active_rui_d22e","withIcon":"withIcon_rui_d22e","icon":"icon_rui_d22e","primary":"primary_rui_d22e","loader":"loader_rui_d22e","loaderBackground":"loaderBackground_rui_d22e","danger":"danger_rui_d22e","text":"text_rui_d22e","content":"content_rui_d22e","text-loading":"text-loading_rui_d22e","inline":"inline_rui_d22e","withNormalIcon":"withNormalIcon_rui_d22e","withDangerIcon":"withDangerIcon_rui_d22e","progress":"progress_rui_d22e","delayed":"delayed_rui_d22e","short":"short_rui_d22e","dropdownIcon":"dropdownIcon_rui_d22e","queryAssist":"queryAssist_rui_d22e","huge":"huge_rui_d22e","input":"input_rui_d22e","actions":"actions_rui_d22e","error":"error_rui_d22e","letter-text":"letter-text_rui_d22e","letterDefault":"letterDefault_rui_d22e","letter-field-name":"letter-field-name_rui_d22e","letter-field-value":"letter-field-value_rui_d22e","letter-operator":"letter-operator_rui_d22e","letter-error":"letter-error_rui_d22e","highlight":"highlight_rui_d22e","service":"service_rui_d22e","placeholder":"placeholder_rui_d22e resetButton_rui_8bff","letter":"letter_rui_d22e","rightSearchButton":"rightSearchButton_rui_d22e","clear":"clear_rui_d22e","loaderOnTheRight":"loaderOnTheRight_rui_d22e"};
5
5
 
6
6
  const ICON_ID_LENGTH = 44;
7
7
  class QueryAssistSuggestions {
@@ -455,9 +455,16 @@ class Auth {
455
455
  }
456
456
 
457
457
  async handleInitValidationError(error) {
458
- var _this$_initDeferred4, _this$_initDeferred4$;
458
+ var _error$cause, _this$_initDeferred4, _this$_initDeferred4$;
459
+
460
+ if ('cause' in error && ((_error$cause = error.cause) === null || _error$cause === void 0 ? void 0 : _error$cause.message) === 'invalid_client') {
461
+ // eslint-disable-next-line no-console
462
+ console.error('RingUI Auth: invalid client detected. Logging out', error);
463
+ await this.logout();
464
+ return undefined;
465
+ } // Redirect flow
466
+
459
467
 
460
- // Redirect flow
461
468
  if ('authRedirect' in error && error.authRedirect && this.config.redirect) {
462
469
  return this.sendRedirect(error);
463
470
  } // Background flow
@@ -151,8 +151,10 @@ class TokenValidator {
151
151
  }
152
152
 
153
153
  if (errorResponse.status === CODE.UNAUTHORIZED || TokenValidator.shouldRefreshToken(response.error)) {
154
+ var _errorResponse$data, _errorResponse$data2;
155
+
154
156
  // Token expired
155
- throw new TokenValidator.TokenValidationError(response.error || errorResponse.message);
157
+ throw new TokenValidator.TokenValidationError(response.error || errorResponse.message, (_errorResponse$data = errorResponse.data) !== null && _errorResponse$data !== void 0 && _errorResponse$data.error ? new Error((_errorResponse$data2 = errorResponse.data) === null || _errorResponse$data2 === void 0 ? void 0 : _errorResponse$data2.error) : undefined);
156
158
  } // Request unexpectedly failed
157
159
 
158
160
 
@@ -44,7 +44,7 @@ class ButtonController extends RingAngularComponent {
44
44
  } = this.$inject;
45
45
  const foreignClasses = [...this.element.classList].filter(name => !buttonClassesMap[name]);
46
46
  this.element.className = classNames(foreignClasses, getButtonClasses({
47
- height: ControlsHeight.S,
47
+ height: $attrs.height || ControlsHeight.S,
48
48
  className: modules_e81895c9.button,
49
49
  active: this.getAttrValue($attrs.active),
50
50
  disabled: this.getAttrValue($attrs.disabled),
@@ -56,7 +56,7 @@ export default class Pager extends PureComponent<PagerProps> {
56
56
  selected: SelectItem<PagerSizeItem> | undefined;
57
57
  data: SelectItem<PagerSizeItem>[];
58
58
  };
59
- getTotal(): number;
59
+ getTotalPages(): number;
60
60
  handlePageSizeChange: (item: PagerSizeItem | null) => void;
61
61
  handlePrevClick: () => void;
62
62
  handleNextClick: () => void;
@@ -76,7 +76,7 @@ export default class Pager extends PureComponent<PagerProps> {
76
76
  getPageSizeSelector(): false | JSX.Element;
77
77
  getPagerLinks(): JSX.Element;
78
78
  generateHref(page: number): string | undefined;
79
- getPagerContent(): JSX.Element | null;
79
+ getPagerContent(): JSX.Element;
80
80
  render(): JSX.Element;
81
81
  }
82
82
  export declare type PagerAttrs = JSX.LibraryManagedAttributes<typeof Pager, PagerProps>;
@@ -119,7 +119,7 @@ class Pager extends PureComponent {
119
119
  onLoadPage
120
120
  } = this.props;
121
121
  const nextPage = currentPage + 1;
122
- const total = this.getTotal();
122
+ const total = this.getTotalPages();
123
123
 
124
124
  if (currentPage !== total) {
125
125
  var _this$props$onPageCha2, _this$props2;
@@ -157,7 +157,7 @@ class Pager extends PureComponent {
157
157
  };
158
158
  }
159
159
 
160
- getTotal() {
160
+ getTotalPages() {
161
161
  const {
162
162
  total,
163
163
  pageSize
@@ -212,7 +212,7 @@ class Pager extends PureComponent {
212
212
 
213
213
  getPagerLinks() {
214
214
  const prevLinkAvailable = this.props.currentPage !== 1;
215
- const nextLinkAvailable = this.props.openTotal || this.props.currentPage !== this.getTotal();
215
+ const nextLinkAvailable = this.props.openTotal || this.props.currentPage !== this.getTotalPages();
216
216
  const nextIcon = /*#__PURE__*/React.createElement(Icon, {
217
217
  glyph: chevronRightIcon,
218
218
  key: "icon"
@@ -271,10 +271,12 @@ class Pager extends PureComponent {
271
271
  currentPage,
272
272
  visiblePagesLimit
273
273
  } = this.props;
274
- const totalPages = this.getTotal();
274
+ const totalPages = this.getTotalPages();
275
275
 
276
- if (totalPages < 2 && !this.props.openTotal) {
277
- return null;
276
+ if (totalPages < this.props.currentPage) {
277
+ var _this$props$onPageCha4, _this$props4;
278
+
279
+ (_this$props$onPageCha4 = (_this$props4 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 ? void 0 : _this$props$onPageCha4.call(_this$props4, totalPages);
278
280
  }
279
281
 
280
282
  let start = 1;
@@ -321,7 +323,7 @@ class Pager extends PureComponent {
321
323
  return /*#__PURE__*/React.createElement("div", {
322
324
  "data-test": "ring-pager",
323
325
  className: classes
324
- }, this.props.total > 1 ? this.getPagerContent() : this.getPageSizeSelector());
326
+ }, this.getTotalPages() > 1 || this.props.openTotal ? this.getPagerContent() : this.getPageSizeSelector());
325
327
  }
326
328
 
327
329
  }
@@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
3
3
  import Caret, { Position } from '../caret/caret';
4
4
  import PopupMenu from '../popup-menu/popup-menu';
5
5
  import Button from '../button/button';
6
+ import Icon from '../icon/icon';
6
7
  import { ShortcutsMap } from '../shortcuts/core';
7
8
  import { QueryAssistSuggestion, SuggestionItem } from './query-assist__suggestions';
8
9
  declare function noop(): void;
@@ -57,6 +58,7 @@ export interface QueryAssistProps {
57
58
  useCustomItemRender?: boolean | null | undefined;
58
59
  actions?: ReactNode[] | null | undefined;
59
60
  'data-test'?: string | null | undefined;
61
+ huge?: boolean | null | undefined;
60
62
  }
61
63
  export interface StyleRange {
62
64
  style: string;
@@ -207,6 +209,7 @@ export default class QueryAssist extends Component<QueryAssistProps> {
207
209
  translations: PropTypes.Requireable<object>;
208
210
  actions: PropTypes.Requireable<any[]>;
209
211
  'data-test': PropTypes.Requireable<string>;
212
+ huge: PropTypes.Requireable<boolean>;
210
213
  };
211
214
  static defaultProps: {
212
215
  onApply: typeof noop;
@@ -280,8 +283,8 @@ export default class QueryAssist extends Component<QueryAssistProps> {
280
283
  popupRef: (node: PopupMenu<SuggestionItem> | null) => void;
281
284
  placeholder?: HTMLElement | null;
282
285
  placeholderRef: (node: HTMLElement | null) => void;
283
- glass?: ComponentRef<typeof Button> | null;
284
- glassRef: (node: ComponentRef<typeof Button> | null) => void;
286
+ glass?: ComponentRef<typeof Icon> | null;
287
+ glassRef: (node: ComponentRef<typeof Icon> | null) => void;
285
288
  loader?: HTMLElement | null;
286
289
  loaderRef: (node: HTMLElement | null) => void;
287
290
  clear?: ComponentRef<typeof Button> | null;
@@ -6,7 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import debounce from 'just-debounce-it';
7
7
  import classNames from 'classnames';
8
8
  import deepEqual from 'deep-equal';
9
- import searchIcon from '@jetbrains/icons/search-12px';
9
+ import searchIcon from '@jetbrains/icons/search';
10
10
  import closeIcon from '@jetbrains/icons/close-12px';
11
11
  import getUID from '../global/get-uid.js';
12
12
  import joinDataTestAttributes from '../global/data-tests.js';
@@ -18,6 +18,7 @@ import LoaderInline from '../loader-inline/loader-inline.js';
18
18
  import Shortcuts from '../shortcuts/shortcuts.js';
19
19
  import rerenderHOC from '../global/rerender-hoc.js';
20
20
  import { Button } from '../button/button.js';
21
+ import Icon from '../icon/icon.js';
21
22
  import { Q as QueryAssistSuggestions, m as modules_da7ab055 } from '../_helpers/query-assist__suggestions.js';
22
23
  import 'react-dom/server';
23
24
  import '../popup/popup.js';
@@ -53,11 +54,10 @@ import '../avatar/fallback-avatar.js';
53
54
  import '../checkbox/checkbox.js';
54
55
  import '@jetbrains/icons/checkmark-14px';
55
56
  import '@jetbrains/icons/remove-10px';
56
- import '../icon/icon.js';
57
+ import '../_helpers/checkbox.js';
57
58
  import '../icon/icon__constants.js';
58
59
  import '../_helpers/icon.js';
59
60
  import '../icon/icon__svg.js';
60
- import '../_helpers/checkbox.js';
61
61
  import '../list/list__custom.js';
62
62
  import '../global/get-event-key.js';
63
63
  import '../list/list__title.js';
@@ -913,8 +913,7 @@ class QueryAssist extends Component {
913
913
  actions.push( /*#__PURE__*/React.createElement(Button, {
914
914
  icon: closeIcon,
915
915
  key: 'clearAction',
916
- className: modules_da7ab055.icon,
917
- iconClassName: modules_da7ab055.iconInner,
916
+ className: modules_da7ab055.clear,
918
917
  title: this.props.translations.clearTitle,
919
918
  ref: this.clearRef,
920
919
  onClick: this.clearQuery,
@@ -930,12 +929,18 @@ class QueryAssist extends Component {
930
929
  glass,
931
930
  'data-test': dataTest,
932
931
  className,
933
- useCustomItemRender
932
+ useCustomItemRender,
933
+ huge
934
934
  } = this.props;
935
935
  const renderPlaceholder = !!this.props.placeholder && this.state.placeholderEnabled;
936
936
  const renderLoader = this.props.loader !== false && this.state.loading;
937
937
  const renderGlass = glass && !renderLoader;
938
938
  const actions = this.renderActions();
939
+ const containerClasses = classNames(className, {
940
+ [modules_da7ab055.queryAssist]: true,
941
+ [modules_da7ab055.withIcon]: renderGlass && !huge || renderLoader,
942
+ [modules_da7ab055.huge]: huge
943
+ });
939
944
  const inputClasses = classNames({
940
945
  ["".concat(modules_da7ab055.input, " ring-js-shortcuts")]: true,
941
946
  [modules_da7ab055.inputGap]: actions.length || this.isRenderingGlassOrLoader() && !glass,
@@ -945,19 +950,17 @@ class QueryAssist extends Component {
945
950
  });
946
951
  return /*#__PURE__*/React.createElement("div", {
947
952
  "data-test": joinDataTestAttributes('ring-query-assist', dataTest),
948
- className: classNames(className, modules_da7ab055.queryAssist),
953
+ className: containerClasses,
949
954
  role: "presentation",
950
955
  ref: this.nodeRef
951
956
  }, this.state.shortcuts && /*#__PURE__*/React.createElement(Shortcuts, {
952
957
  map: this.shortcutsMap,
953
958
  scope: this.shortcutsScope
954
- }), renderGlass && /*#__PURE__*/React.createElement(Button, {
955
- icon: searchIcon,
959
+ }), renderGlass && !huge && /*#__PURE__*/React.createElement(Icon, {
960
+ glyph: searchIcon,
956
961
  className: modules_da7ab055.icon,
957
- iconClassName: modules_da7ab055.iconInner,
958
962
  title: this.props.translations.searchTitle,
959
963
  ref: this.glassRef,
960
- onClick: this.handleApply,
961
964
  "data-test": "query-assist-search-icon"
962
965
  }), renderLoader && /*#__PURE__*/React.createElement("div", {
963
966
  className: classNames(modules_da7ab055.icon, modules_da7ab055.loader, {
@@ -987,9 +990,7 @@ class QueryAssist extends Component {
987
990
  spellCheck: "false"
988
991
  }, this.state.query && /*#__PURE__*/React.createElement("span", null, this.renderQuery())), renderPlaceholder && /*#__PURE__*/React.createElement("button", {
989
992
  type: "button",
990
- className: classNames(modules_da7ab055.placeholder, {
991
- [modules_da7ab055.placeholderSpaced]: glass
992
- }),
993
+ className: modules_da7ab055.placeholder,
993
994
  ref: this.placeholderRef,
994
995
  onClick: this.handleCaretMove,
995
996
  "data-test": "query-assist-placeholder"
@@ -1014,7 +1015,16 @@ class QueryAssist extends Component {
1014
1015
  onMouseDown: this.trackPopupMouseState,
1015
1016
  onMouseUp: this.trackPopupMouseState,
1016
1017
  onSelect: item => this.handleComplete(item)
1017
- }));
1018
+ }), glass && huge && /*#__PURE__*/React.createElement("div", {
1019
+ className: modules_da7ab055.rightSearchButton
1020
+ }, /*#__PURE__*/React.createElement(Icon, {
1021
+ glyph: searchIcon,
1022
+ className: modules_da7ab055.rightSearchIcon,
1023
+ title: this.props.translations.searchTitle,
1024
+ onClick: this.handleApply,
1025
+ ref: this.glassRef,
1026
+ "data-test": "query-assist-search-icon"
1027
+ })));
1018
1028
  }
1019
1029
 
1020
1030
  }
@@ -1122,7 +1132,8 @@ _defineProperty(QueryAssist, "propTypes", {
1122
1132
  useCustomItemRender: PropTypes.bool,
1123
1133
  translations: PropTypes.object,
1124
1134
  actions: PropTypes.array,
1125
- 'data-test': PropTypes.string
1135
+ 'data-test': PropTypes.string,
1136
+ huge: PropTypes.bool
1126
1137
  });
1127
1138
 
1128
1139
  _defineProperty(QueryAssist, "defaultProps", {
@@ -13,7 +13,7 @@ import 'core-js/modules/es.string.replace.js';
13
13
  import 'just-debounce-it';
14
14
  import 'classnames';
15
15
  import 'deep-equal';
16
- import '@jetbrains/icons/search-12px';
16
+ import '@jetbrains/icons/search';
17
17
  import '@jetbrains/icons/close-12px';
18
18
  import '../global/get-uid.js';
19
19
  import '../global/data-tests.js';