@jetbrains/ring-ui 5.0.12 → 5.0.15

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 (44) hide show
  1. package/components/analytics/analytics__plugin-utils.d.ts +2 -2
  2. package/components/button-group-ng/button-group-ng.js +9 -2
  3. package/components/dialog/dialog.d.ts +2 -0
  4. package/components/dialog/dialog.js +3 -2
  5. package/components/dialog-ng/dialog-ng.css +1 -3
  6. package/components/global/create-stateful-context.d.ts +1 -1
  7. package/components/global/rerender-hoc.d.ts +1 -1
  8. package/components/http/http.d.ts +3 -3
  9. package/components/input/input-legacy.css +75 -44
  10. package/components/input-size/input-size.css +16 -4
  11. package/components/list/list.d.ts +1 -1
  12. package/components/query-assist/query-assist.d.ts +2 -2
  13. package/components/select/select.d.ts +3 -3
  14. package/components/select/select__popup.d.ts +1 -1
  15. package/components/shortcuts/shortcuts.d.ts +1 -1
  16. package/components/table/row.d.ts +1 -0
  17. package/components/table/row.js +6 -6
  18. package/components/table/smart-table.d.ts +1 -0
  19. package/components/table/table.d.ts +1 -0
  20. package/components/table/table.js +2 -2
  21. package/components/tags-input/tags-input.d.ts +1 -1
  22. package/components/user-agreement/service.d.ts +8 -54
  23. package/dist/analytics/analytics__plugin-utils.d.ts +2 -2
  24. package/dist/button-group-ng/button-group-ng.js +10 -2
  25. package/dist/dialog/dialog.d.ts +2 -0
  26. package/dist/dialog/dialog.js +4 -1
  27. package/dist/global/create-stateful-context.d.ts +1 -1
  28. package/dist/global/rerender-hoc.d.ts +1 -1
  29. package/dist/http/http.d.ts +3 -3
  30. package/dist/list/list.d.ts +1 -1
  31. package/dist/popup/position.js +1 -1
  32. package/dist/query-assist/query-assist.d.ts +2 -2
  33. package/dist/select/select.d.ts +3 -3
  34. package/dist/select/select__popup.d.ts +1 -1
  35. package/dist/shortcuts/shortcuts.d.ts +1 -1
  36. package/dist/style.css +1 -1
  37. package/dist/table/row.d.ts +1 -0
  38. package/dist/table/row.js +8 -4
  39. package/dist/table/smart-table.d.ts +1 -0
  40. package/dist/table/table.d.ts +1 -0
  41. package/dist/table/table.js +2 -0
  42. package/dist/tags-input/tags-input.d.ts +1 -1
  43. package/dist/user-agreement/service.d.ts +8 -54
  44. package/package.json +45 -45
@@ -5,8 +5,8 @@ declare const AnalyticsPluginUtils: {
5
5
  * @param isCategory
6
6
  * @returns string, where forbidden symbols are replaced with '_'
7
7
  */
8
- reformatString: (value: unknown, isCategory?: boolean | undefined) => string;
9
- getPageViewDurationPresentation: (durationMs?: number | undefined) => string;
8
+ reformatString: (value: unknown, isCategory?: boolean) => string;
9
+ getPageViewDurationPresentation: (durationMs?: number) => string;
10
10
  getScreenWidthPresentation: () => string;
11
11
  npeSaveLowerCase: (val: string | null | undefined) => string;
12
12
  getUserAgentPresentation: () => string;
@@ -16,9 +16,16 @@ const buttonGroupClasses = classNames(styles.buttonGroup, ngStyles.buttonGroup);
16
16
  function rgButtonGroup() {
17
17
  return {
18
18
  restrict: 'A',
19
- link: function link($scope, iElement) {
19
+ scope: {
20
+ split: '='
21
+ },
22
+ link: function link($scope, iElement, attrs) {
20
23
  const element = iElement[0];
21
- element.classList.add(...buttonGroupClasses.split(' '));
24
+ if (attrs.split) {
25
+ element.classList.add(...styles.split.split(' '));
26
+ } else {
27
+ element.classList.add(...buttonGroupClasses.split(' '));
28
+ }
22
29
  }
23
30
  };
24
31
  }
@@ -10,6 +10,7 @@ export interface DialogProps extends Partial<TabTrapProps> {
10
10
  onCloseAttempt: (event: React.MouseEvent<HTMLElement> | KeyboardEvent) => void;
11
11
  showCloseButton: boolean;
12
12
  closeButtonInside: boolean;
13
+ closeButtonTitle?: string;
13
14
  trapFocus: boolean;
14
15
  contentClassName?: string | null | undefined;
15
16
  portalTarget?: Element | null | undefined;
@@ -28,6 +29,7 @@ export default class Dialog extends PureComponent<DialogProps> {
28
29
  show: PropTypes.Validator<boolean>;
29
30
  showCloseButton: PropTypes.Requireable<boolean>;
30
31
  closeButtonInside: PropTypes.Requireable<boolean>;
32
+ closeButtonTitle: PropTypes.Requireable<string>;
31
33
  onOverlayClick: PropTypes.Requireable<(...args: any[]) => any>;
32
34
  onEscPress: PropTypes.Requireable<(...args: any[]) => any>;
33
35
  onCloseClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -28,6 +28,7 @@ export default class Dialog extends PureComponent {
28
28
  show: PropTypes.bool.isRequired,
29
29
  showCloseButton: PropTypes.bool,
30
30
  closeButtonInside: PropTypes.bool,
31
+ closeButtonTitle: PropTypes.string,
31
32
  onOverlayClick: PropTypes.func,
32
33
  onEscPress: PropTypes.func,
33
34
  onCloseClick: PropTypes.func,
@@ -99,7 +100,7 @@ export default class Dialog extends PureComponent {
99
100
  this.dialog = tabTrap && tabTrap.node;
100
101
  };
101
102
  render() {
102
- const { show, showCloseButton, onOverlayClick, onCloseAttempt, onEscPress, onCloseClick, children, className, contentClassName, trapFocus, 'data-test': dataTest, closeButtonInside, portalTarget, label, ...restProps } = this.props;
103
+ const { show, showCloseButton, onOverlayClick, onCloseAttempt, onEscPress, onCloseClick, children, className, contentClassName, trapFocus, 'data-test': dataTest, closeButtonInside, portalTarget, label, closeButtonTitle, ...restProps } = this.props;
103
104
  const classes = classNames(styles.container, className);
104
105
  const shortcutsMap = this.getShortcutsMap();
105
106
  return show && createPortal(<PopupTarget id={this.uid} className={styles.popupTarget}>
@@ -115,7 +116,7 @@ export default class Dialog extends PureComponent {
115
116
  (<Button icon={closeIcon} data-test="ring-dialog-close-button" className={classNames(styles.closeButton, {
116
117
  [styles.closeButtonOutside]: !closeButtonInside,
117
118
  [styles.closeButtonInside]: closeButtonInside
118
- })} iconClassName={styles.closeIcon} onClick={this.onCloseClick} aria-label="close dialog"/>)}
119
+ })} iconClassName={styles.closeIcon} onClick={this.onCloseClick} title={closeButtonTitle} aria-label={closeButtonTitle || 'close dialog'}/>)}
119
120
  </AdaptiveIsland>
120
121
  </div>
121
122
  {target}
@@ -30,8 +30,6 @@
30
30
  }
31
31
 
32
32
  .header.header {
33
- padding-top: calc(unit * 2);
34
-
35
33
  cursor: move;
36
34
  user-select: none;
37
35
 
@@ -71,7 +69,7 @@
71
69
 
72
70
  .footer {
73
71
  height: auto;
74
- padding: calc(unit * 2) calc(unit * 4);
72
+ padding: calc(unit * 2) calc(unit * 4) calc(unit * 4);
75
73
 
76
74
  text-align: left;
77
75
 
@@ -18,7 +18,7 @@ export default function createStatefulContext<T>(initialValue: T, name?: string)
18
18
  };
19
19
  displayName: string;
20
20
  };
21
- useUpdate: (value: T, skipUpdate?: boolean | undefined) => void;
21
+ useUpdate: (value: T, skipUpdate?: boolean) => void;
22
22
  Updater: React.MemoExoticComponent<{
23
23
  ({ value, skipUpdate }: UpdaterProps<T>): null;
24
24
  displayName: string;
@@ -14,7 +14,7 @@ export interface RerenderableComponentClass<P, S> {
14
14
  export default function rerenderHOC<P, S>(ComposedComponent: RerenderableComponentClass<P, S>): {
15
15
  new (props: P): {
16
16
  _propsCache: P & RefAttributes<unknown>;
17
- rerender(props?: Partial<P>, callback?: (() => void) | undefined): void;
17
+ rerender(props?: Partial<P>, callback?: () => void): void;
18
18
  node?: HTMLElement | null | undefined;
19
19
  context: unknown;
20
20
  setState<K extends keyof S>(state: S | ((prevState: Readonly<S>, props: Readonly<P>) => S | Pick<S, K> | null) | Pick<S, K> | null, callback?: (() => void) | undefined): void;
@@ -42,8 +42,8 @@ export default class HTTP implements Partial<HTTPAuth> {
42
42
  private static _isErrorStatus;
43
43
  fetch: (url: string, params?: FetchParams) => Promise<any>;
44
44
  authorizedFetch(...args: Parameters<HTTP['_performRequest']>): Promise<any>;
45
- request: (url: string, params?: RequestParams | undefined) => Promise<any>;
45
+ request: (url: string, params?: RequestParams) => Promise<any>;
46
46
  getMetaForResponse: (response: object) => Partial<Response> | undefined;
47
- get: (url: string, params?: RequestParams | undefined) => Promise<any>;
48
- post: (url: string, params?: RequestParams | undefined) => Promise<any>;
47
+ get: (url: string, params?: RequestParams) => Promise<any>;
48
+ post: (url: string, params?: RequestParams) => Promise<any>;
49
49
  }
@@ -16,46 +16,84 @@ Input
16
16
  */
17
17
 
18
18
  :global(.ring-input) {
19
- box-sizing: border-box;
20
- width: 100%;
21
- height: calc(3 * unit);
22
- margin: 0;
23
- padding-right: calc(unit / 2);
24
- padding-bottom: 3px;
25
- padding-left: calc(unit / 2);
19
+ /* .heightS */
20
+ --ring-input-padding-block: 1px;
21
+ --ring-input-padding-inline: unit;
22
+ --ring-input-padding-start: var(--ring-input-padding-inline);
23
+ --ring-input-padding-end: var(--ring-input-padding-inline);
26
24
 
27
- color: var(--ring-text-color);
28
-
29
- border: 1px solid var(--ring-borders-color);
30
- border-radius: 0;
31
- background-color: var(--ring-content-background-color);
25
+ /* stylelint-disable order/properties-order */
32
26
 
33
- font-family: var(--ring-font-family);
27
+ box-sizing: border-box;
34
28
 
29
+ font: inherit;
35
30
  font-size: var(--ring-font-size);
31
+ line-height: var(--ring-line-height);
36
32
 
37
- line-height: 20px;
38
- appearance: none;
39
- }
33
+ width: 100%;
40
34
 
41
- :global(.ring-input:active),
42
- :global(.ring-input:focus),
43
- :global(.ring-input_active),
44
- :global(.ring-input_focus) {
45
- border-color: var(--ring-main-color);
46
- outline: 0;
47
- }
35
+ margin: 0;
36
+ padding-top: var(--ring-input-padding-block);
37
+ padding-right: var(--ring-input-padding-end);
38
+ padding-bottom: var(--ring-input-padding-block);
39
+ padding-left: var(--ring-input-padding-start);
48
40
 
49
- :global(.ring-input_correct) {
50
- border-color: var(--ring-success-color);
51
- }
41
+ transition: border-color var(--ring-ease);
52
42
 
53
- :global(.ring-input_error) {
54
- border-color: var(--ring-error-color);
43
+ color: var(--ring-text-color);
44
+ border: 1px solid var(--ring-borders-color);
45
+ border-radius: var(--ring-border-radius);
46
+ outline: none;
47
+ background: transparent;
48
+
49
+ caret-color: var(--ring-main-color);
50
+
51
+ /* stylelint-enable order/properties-order */
52
+
53
+ @nest [dir=rtl] & {
54
+ padding-right: var(--ring-input-padding-start);
55
+ padding-left: var(--ring-input-padding-end);
56
+ }
57
+
58
+ &:hover {
59
+ transition: none;
60
+
61
+ border-color: var(--ring-border-hover-color);
62
+ }
63
+
64
+ @nest .error & {
65
+ border-color: var(--ring-icon-error-color);
66
+ }
67
+
68
+ &:focus {
69
+ transition: none;
70
+
71
+ border-color: var(--ring-main-color);
72
+ }
73
+
74
+ &[disabled] {
75
+ color: var(--ring-disabled-color);
76
+ border-color: var(--ring-border-disabled-color);
77
+ background-color: var(--ring-disabled-background-color);
78
+
79
+ -webkit-text-fill-color: var(--ring-disabled-color); /* Required for Safari, see RG-2063 for details */
80
+ }
81
+
82
+ /*
83
+ Kill yellow/blue webkit autocomplete
84
+ https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/
85
+ */
86
+ &:-webkit-autofill {
87
+ &,
88
+ &:hover,
89
+ &:focus {
90
+ transition: background-color 50000s ease-in-out 0s;
91
+ }
92
+ }
55
93
  }
56
94
 
57
- :global(.ring-input_no-resize) {
58
- resize: none;
95
+ :global(.ring-input_error) {
96
+ border-color: var(--ring-icon-error-color);
59
97
  }
60
98
 
61
99
  :global(.ring-input_filter-popup) {
@@ -63,32 +101,25 @@ Input
63
101
  min-width: 200px;
64
102
  }
65
103
 
66
- :global(.ring-input_material) {
67
- padding-right: 0;
68
- padding-left: 0;
69
-
70
- border-top: 0;
71
- border-right: 0;
72
- border-left: 0;
73
- }
74
-
75
104
  :global(.ring-input.ring-input:disabled),
76
105
  :global(.ring-input.ring-input[disabled]),
77
106
  :global(.ring-input.ring-input_disabled) {
78
107
  color: var(--ring-disabled-color);
79
108
  border-color: var(--ring-border-disabled-color);
80
- background-color: var(--ring-sidebar-background-color);
109
+ background-color: var(--ring-disabled-background-color);
110
+
111
+ -webkit-text-fill-color: var(--ring-disabled-color); /* Required for Safari, see RG-2063 for details */
81
112
  }
82
113
 
83
114
  :global(textarea.ring-input) {
84
- height: auto;
115
+ box-sizing: border-box;
116
+
85
117
  min-height: calc(8 * unit);
86
118
 
87
- resize: vertical;
88
- vertical-align: top;
119
+ resize: none;
89
120
  }
90
121
 
91
122
  /* https://stackoverflow.com/questions/7144843/extra-space-under-textarea-differs-along-browsers */
92
- :global(textarea.ring-input::placeholder) {
123
+ :global(.ring-input::placeholder) {
93
124
  color: var(--ring-disabled-color);
94
125
  }
@@ -3,10 +3,10 @@
3
3
  @value unit from "../global/global.css";
4
4
 
5
5
  :root {
6
- --ring-input-xs: 50px;
7
- --ring-input-s: 100px;
8
- --ring-input-m: 200px;
9
- --ring-input-l: 400px;
6
+ --ring-input-xs: calc(unit * 12);
7
+ --ring-input-s: calc(unit * 12);
8
+ --ring-input-m: calc(unit * 30);
9
+ --ring-input-l: calc(unit * 50);
10
10
  }
11
11
 
12
12
  /**
@@ -60,3 +60,15 @@
60
60
  :global(.ring-input-size_l.ring-input-size_l ~ .ring-error-bubble) {
61
61
  left: calc(var(--ring-input-l) + 2px);
62
62
  }
63
+
64
+ :global(.ring-input-height_s.ring-input-height_s) {
65
+ --ring-input-padding-block: 1px;
66
+ }
67
+
68
+ :global(.ring-input-height_m.ring-input-height_m) {
69
+ --ring-input-padding-block: 3px;
70
+ }
71
+
72
+ :global(.ring-input-height_l.ring-input-height_l) {
73
+ --ring-input-padding-block: 5px;
74
+ }
@@ -166,7 +166,7 @@ export default class List<T = unknown> extends Component<ListProps<T>, ListState
166
166
  moveHandler(index: number, retryCallback: (e: KeyboardEvent) => void, e: KeyboardEvent): void;
167
167
  mouseHandler: () => void;
168
168
  scrollHandler: () => void;
169
- enterHandler: (event: KeyboardEvent, shortcut?: string | undefined) => boolean;
169
+ enterHandler: (event: KeyboardEvent, shortcut?: string) => boolean;
170
170
  getFirst(): ListDataItem<T> | undefined;
171
171
  getSelected(): ListDataItem<T> | null;
172
172
  clearSelected: () => void;
@@ -244,7 +244,7 @@ export default class QueryAssist extends Component<QueryAssistProps> {
244
244
  handleInput: (e: Event | SyntheticEvent) => void;
245
245
  handleEnter: (e: React.KeyboardEvent) => void;
246
246
  handleTab: (e: Event) => boolean | void;
247
- setState: (state: Partial<QueryAssistState>, resolve?: (() => void) | undefined) => void;
247
+ setState: (state: Partial<QueryAssistState>, resolve?: () => void) => void;
248
248
  private _pushHistory;
249
249
  undo: (e: Event) => void;
250
250
  handlePaste: (e: React.ClipboardEvent) => void;
@@ -252,7 +252,7 @@ export default class QueryAssist extends Component<QueryAssistProps> {
252
252
  handleStyleRangesResponse: ({ suggestions, ...restProps }: QueryAssistResponse) => Promise<void>;
253
253
  handleResponse: ({ query, caret, styleRanges, suggestions }: QueryAssistResponse, afterCompletion?: boolean) => Promise<void>;
254
254
  handleApply: () => void;
255
- handleComplete: (data?: SuggestionItem | undefined, replace?: boolean | undefined) => void;
255
+ handleComplete: (data?: SuggestionItem, replace?: boolean) => void;
256
256
  requestStyleRanges: () => Promise<void>;
257
257
  requestHandler: (afterCompletion?: boolean) => Promise<void>;
258
258
  sendRequest(params: QueryAssistRequestParams): Promise<QueryAssistResponse>;
@@ -229,11 +229,11 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
229
229
  private _setFilter;
230
230
  private _rebuildMultipleMap;
231
231
  _redrawPopup: () => void;
232
- _listSelectHandler: (selected: SelectItem<T>, event?: Event | undefined, opts?: SelectHandlerParams) => void;
232
+ _listSelectHandler: (selected: SelectItem<T>, event?: Event, opts?: SelectHandlerParams) => void;
233
233
  _listSelectAllHandler: (isSelectAll?: boolean) => void;
234
234
  private _onCloseAttempt;
235
- clearFilter: (e?: React.SyntheticEvent<Element, Event> | undefined) => void;
236
- clear: (event?: Event | React.SyntheticEvent<Element, Event> | undefined) => boolean;
235
+ clearFilter: (e?: SyntheticEvent) => void;
236
+ clear: (event?: Event | SyntheticEvent) => boolean;
237
237
  _selectionIsEmpty(): boolean;
238
238
  private _getLabel;
239
239
  _getSelectedString(): string | null;
@@ -98,7 +98,7 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
98
98
  mouseUpHandler: () => void;
99
99
  popup?: Popup | null;
100
100
  isVisible(): boolean | null | undefined;
101
- onListSelect: (selected: ListDataItem<T>, event?: Event | React.SyntheticEvent<Element, Event> | undefined, opts?: SelectHandlerParams | undefined) => void;
101
+ onListSelect: (selected: ListDataItem<T>, event?: Event | SyntheticEvent, opts?: SelectHandlerParams) => void;
102
102
  tabPress: (event: Event) => void;
103
103
  onClickHandler: () => void | undefined;
104
104
  getFilter(): JSX.Element | null;
@@ -24,5 +24,5 @@ export default class Shortcuts extends PureComponent<ShortcutsProps> {
24
24
  componentWillUnmount(): void;
25
25
  turnShorcutsOn(): void;
26
26
  turnShorcutsOff(): void;
27
- render(): true | import("react").ReactChild | import("react").ReactFragment | null;
27
+ render(): string | number | true | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactFragment | null;
28
28
  }
@@ -9,6 +9,7 @@ export interface RowProps<T extends SelectionItem> extends Omit<HTMLAttributes<H
9
9
  showFocus: boolean;
10
10
  draggable: boolean;
11
11
  alwaysShowDragHandle: boolean;
12
+ dragHandleTitle?: string;
12
13
  selected: boolean;
13
14
  onHover: (item: T, e: React.MouseEvent<HTMLTableRowElement>) => void;
14
15
  onSelect: (item: T, selected: boolean) => void;
@@ -12,14 +12,15 @@ import getUID from '../global/get-uid';
12
12
  import composeRefs from '../global/composeRefs';
13
13
  import Cell from './cell';
14
14
  import style from './table.css';
15
- const DragHandle = ({ alwaysShowDragHandle }) => {
15
+ const DragHandle = ({ alwaysShowDragHandle, dragHandleTitle = 'Drag to reorder' }) => {
16
16
  const classes = classNames(style.dragHandle, {
17
17
  [style.visibleDragHandle]: alwaysShowDragHandle
18
18
  });
19
- return (<Button data-movable-handle title="Drag" className={classes} icon={dragIcon}/>);
19
+ return (<Button data-movable-handle title={dragHandleTitle} className={classes} icon={dragIcon}/>);
20
20
  };
21
21
  DragHandle.propTypes = {
22
- alwaysShowDragHandle: PropTypes.bool
22
+ alwaysShowDragHandle: PropTypes.bool,
23
+ dragHandleTitle: PropTypes.string
23
24
  };
24
25
  export default class Row extends PureComponent {
25
26
  static defaultProps = {
@@ -72,7 +73,7 @@ export default class Row extends PureComponent {
72
73
  this.row = el;
73
74
  };
74
75
  render() {
75
- const { item, columns, selectable, selected, showFocus, draggable, alwaysShowDragHandle, level, collapsible, parentCollapsible, collapsed, onCollapse, onExpand, showDisabledSelection, onSelect, checkboxTooltip, innerRef, focused, autofocus, onFocusReset, onFocusRestore, onHover, className, 'data-test': dataTest, ...restProps } = this.props;
76
+ const { item, columns, selectable, selected, showFocus, draggable, alwaysShowDragHandle, dragHandleTitle, level, collapsible, parentCollapsible, collapsed, onCollapse, onExpand, showDisabledSelection, onSelect, checkboxTooltip, innerRef, focused, autofocus, onFocusReset, onFocusRestore, onHover, className, 'data-test': dataTest, ...restProps } = this.props;
76
77
  const classes = classNames(className, {
77
78
  [style.row]: true,
78
79
  [style.rowFocused]: showFocus,
@@ -90,8 +91,7 @@ export default class Row extends PureComponent {
90
91
  paddingLeft: `${gap}px`
91
92
  };
92
93
  const metaColumn = (<div className={metaColumnClasses} style={metaColumnStyle}>
93
- {draggable &&
94
- <DragHandle alwaysShowDragHandle={alwaysShowDragHandle}/>}
94
+ {draggable && (<DragHandle alwaysShowDragHandle={alwaysShowDragHandle} dragHandleTitle={dragHandleTitle}/>)}
95
95
 
96
96
  {selectable &&
97
97
  (<Tooltip title={checkboxTooltip}>
@@ -26,6 +26,7 @@ declare class SmartTable<T extends SelectionItem> extends PureComponent<SmartTab
26
26
  sortKey?: React.Validator<string | null | undefined> | undefined;
27
27
  sortOrder?: React.Validator<boolean | null | undefined> | undefined;
28
28
  alwaysShowDragHandle?: React.Validator<boolean | null | undefined> | undefined;
29
+ dragHandleTitle?: React.Validator<string | null | undefined> | undefined;
29
30
  onReorder?: React.Validator<((params: import("./table").ReorderParams<SelectionItem>) => void) | null | undefined> | undefined;
30
31
  getItemKey?: React.Validator<((item: SelectionItem) => string | number) | null | undefined> | undefined;
31
32
  stickyHeader?: React.Validator<boolean | null | undefined> | undefined;
@@ -25,6 +25,7 @@ export interface TableProps<T extends SelectionItem> extends FocusSensorAddProps
25
25
  sortOrder: boolean;
26
26
  draggable: boolean;
27
27
  alwaysShowDragHandle: boolean;
28
+ dragHandleTitle?: string;
28
29
  stickyHeader: boolean;
29
30
  getItemLevel: (item: T) => number;
30
31
  getItemClassName: (item: T) => string | null | undefined;
@@ -106,7 +106,7 @@ export class Table extends PureComponent {
106
106
  window.scrollTo(scrollX, scrollY);
107
107
  };
108
108
  render() {
109
- const { data, selection, columns, caption, getItemKey, selectable, focused, isItemSelectable, getItemLevel, getItemClassName, getItemDataTest, draggable, alwaysShowDragHandle, loading, onSort, sortKey, sortOrder, loaderClassName, stickyHeader, stickyHeaderOffset, isItemCollapsible, isParentCollapsible, isItemCollapsed, onItemCollapse, onItemExpand, isDisabledSelectionVisible, getCheckboxTooltip, onItemDoubleClick, onItemClick, renderEmpty } = this.props;
109
+ const { data, selection, columns, caption, getItemKey, selectable, focused, isItemSelectable, getItemLevel, getItemClassName, getItemDataTest, draggable, alwaysShowDragHandle, dragHandleTitle, loading, onSort, sortKey, sortOrder, loaderClassName, stickyHeader, stickyHeaderOffset, isItemCollapsible, isParentCollapsible, isItemCollapsed, onItemCollapse, onItemExpand, isDisabledSelectionVisible, getCheckboxTooltip, onItemDoubleClick, onItemClick, renderEmpty } = this.props;
110
110
  // NOTE: Do not construct new object per render because it causes all rows rerendering
111
111
  const headerProps = {
112
112
  caption, selectable, draggable,
@@ -150,7 +150,7 @@ export class Table extends PureComponent {
150
150
  return null;
151
151
  }
152
152
  const { ref, ...restProps } = props;
153
- const row = (<Row innerRef={ref} key={getItemKey(value)} level={getItemLevel(value)} item={value} showFocus={selection.isFocused(value)} autofocus={selection.isFocused(value)} focused={selection.isFocused(value)} selectable={selectable && isItemSelectable(value)} selected={selectable && selection.isSelected(value)} onFocus={this.onRowFocus} onSelect={this.onRowSelect} onDoubleClick={onItemDoubleClick} onClick={onItemClick} collapsible={isItemCollapsible(value)} parentCollapsible={isParentCollapsible(value)} collapsed={isItemCollapsed(value)} onCollapse={onItemCollapse} onExpand={onItemExpand} showDisabledSelection={isDisabledSelectionVisible(value)} checkboxTooltip={getCheckboxTooltip(value)} className={classNames(getItemClassName(value), { [style.draggingRow]: isDragged })} draggable={draggable} alwaysShowDragHandle={alwaysShowDragHandle} columns={columns} data-test={getItemDataTest(value)} {...restProps}/>);
153
+ const row = (<Row innerRef={ref} key={getItemKey(value)} level={getItemLevel(value)} item={value} showFocus={selection.isFocused(value)} autofocus={selection.isFocused(value)} focused={selection.isFocused(value)} selectable={selectable && isItemSelectable(value)} selected={selectable && selection.isSelected(value)} onFocus={this.onRowFocus} onSelect={this.onRowSelect} onDoubleClick={onItemDoubleClick} onClick={onItemClick} collapsible={isItemCollapsible(value)} parentCollapsible={isParentCollapsible(value)} collapsed={isItemCollapsed(value)} onCollapse={onItemCollapse} onExpand={onItemExpand} showDisabledSelection={isDisabledSelectionVisible(value)} checkboxTooltip={getCheckboxTooltip(value)} className={classNames(getItemClassName(value), { [style.draggingRow]: isDragged })} draggable={draggable} alwaysShowDragHandle={alwaysShowDragHandle} dragHandleTitle={dragHandleTitle} columns={columns} data-test={getItemDataTest(value)} {...restProps}/>);
154
154
  return isDragged
155
155
  ? (<table style={{ ...props.style, borderSpacing: 0 }}>
156
156
  <tbody>{row}</tbody>
@@ -109,7 +109,7 @@ export default class TagsInput extends PureComponent<TagsInputProps, TagsInputSt
109
109
  loadSuggestions: (query?: string) => void;
110
110
  private _focusHandler;
111
111
  private _blurHandler;
112
- selectTag: (moveForward?: boolean | undefined) => void;
112
+ selectTag: (moveForward?: boolean) => void;
113
113
  handleKeyDown: (event: React.KeyboardEvent) => boolean;
114
114
  handleClick: (arg: TagType) => () => void;
115
115
  handleRemove: (arg: TagType) => () => Promise<void | TagType[]>;
@@ -1,4 +1,4 @@
1
- import { UserAgreementTranslations } from './user-agreement';
1
+ import { UserAgreementAttrs, UserAgreementTranslations } from './user-agreement';
2
2
  export declare const showMessage = "userAgreementShow";
3
3
  export declare const hideMessage = "userAgreementHide";
4
4
  export interface Consent {
@@ -53,61 +53,15 @@ export default class UserAgreementService {
53
53
  private _notifyAboutHiding;
54
54
  getUserAgreement: () => Promise<Agreement>;
55
55
  getUserConsent: () => Promise<Consent>;
56
- checkConsentAndShowDialog: (withoutNotifications?: boolean | undefined) => Promise<unknown>;
56
+ checkConsentAndShowDialog: (withoutNotifications?: boolean) => Promise<unknown>;
57
57
  checkConsent: () => Promise<boolean | null | undefined>;
58
58
  alertKey?: string | number | null;
59
- showAlert: (withoutNotifications?: boolean | undefined) => Promise<unknown>;
60
- hideAlert: (withoutNotifications?: boolean | undefined) => void;
61
- showDialog: (withoutNotifications?: boolean | undefined, preview?: boolean, restOptions?: Partial<Pick<Pick<import("./user-agreement").UserAgreementProps, keyof import("./user-agreement").UserAgreementProps> & Pick<import("prop-types").InferProps<{
62
- show: import("prop-types").Requireable<boolean>;
63
- preview: import("prop-types").Requireable<boolean>;
64
- text: import("prop-types").Validator<string>;
65
- onAccept: import("prop-types").Requireable<(...args: any[]) => any>;
66
- onDecline: import("prop-types").Requireable<(...args: any[]) => any>;
67
- onClose: import("prop-types").Requireable<(...args: any[]) => any>;
68
- onRemindLater: import("prop-types").Requireable<(...args: any[]) => any>;
69
- translations: import("prop-types").Requireable<import("prop-types").InferProps<{
70
- userAgreement: import("prop-types").Validator<string>;
71
- accept: import("prop-types").Validator<string>;
72
- decline: import("prop-types").Validator<string>;
73
- close: import("prop-types").Validator<string>;
74
- scrollToAccept: import("prop-types").Validator<string>;
75
- remindLater: import("prop-types").Validator<string>;
76
- }>>;
77
- className: import("prop-types").Requireable<string>;
78
- }>, never> & Pick<import("./user-agreement").UserAgreementProps, never>, "className" | "text" | "preview" | "onRemindLater"> & {
79
- onClose?: (() => void) | undefined;
80
- show?: boolean | undefined;
81
- translations?: UserAgreementTranslations | undefined;
82
- onAccept?: (() => void) | undefined;
83
- onDecline?: (() => void) | undefined;
84
- } & {}> | undefined) => Promise<unknown>;
85
- hideDialog: (withoutNotifications?: boolean | undefined) => void;
86
- showDialogOrAlert: (withoutNotifications?: boolean | undefined, preview?: boolean | undefined, restOptions?: Partial<Pick<Pick<import("./user-agreement").UserAgreementProps, keyof import("./user-agreement").UserAgreementProps> & Pick<import("prop-types").InferProps<{
87
- show: import("prop-types").Requireable<boolean>;
88
- preview: import("prop-types").Requireable<boolean>;
89
- text: import("prop-types").Validator<string>;
90
- onAccept: import("prop-types").Requireable<(...args: any[]) => any>;
91
- onDecline: import("prop-types").Requireable<(...args: any[]) => any>;
92
- onClose: import("prop-types").Requireable<(...args: any[]) => any>;
93
- onRemindLater: import("prop-types").Requireable<(...args: any[]) => any>;
94
- translations: import("prop-types").Requireable<import("prop-types").InferProps<{
95
- userAgreement: import("prop-types").Validator<string>;
96
- accept: import("prop-types").Validator<string>;
97
- decline: import("prop-types").Validator<string>;
98
- close: import("prop-types").Validator<string>;
99
- scrollToAccept: import("prop-types").Validator<string>;
100
- remindLater: import("prop-types").Validator<string>;
101
- }>>;
102
- className: import("prop-types").Requireable<string>;
103
- }>, never> & Pick<import("./user-agreement").UserAgreementProps, never>, "className" | "text" | "preview" | "onRemindLater"> & {
104
- onClose?: (() => void) | undefined;
105
- show?: boolean | undefined;
106
- translations?: UserAgreementTranslations | undefined;
107
- onAccept?: (() => void) | undefined;
108
- onDecline?: (() => void) | undefined;
109
- } & {}> | undefined) => Promise<unknown>;
110
- hideDialogAndAlert: (withoutNotifications?: boolean | undefined) => void;
59
+ showAlert: (withoutNotifications?: boolean) => Promise<unknown>;
60
+ hideAlert: (withoutNotifications?: boolean) => void;
61
+ showDialog: (withoutNotifications?: boolean, preview?: boolean, restOptions?: Partial<UserAgreementAttrs>) => Promise<unknown>;
62
+ hideDialog: (withoutNotifications?: boolean) => void;
63
+ showDialogOrAlert: (withoutNotifications?: boolean, preview?: boolean, restOptions?: Partial<UserAgreementAttrs>) => Promise<unknown>;
64
+ hideDialogAndAlert: (withoutNotifications?: boolean) => void;
111
65
  onAccept: () => Promise<void>;
112
66
  onDecline: () => void;
113
67
  }
@@ -5,8 +5,8 @@ declare const AnalyticsPluginUtils: {
5
5
  * @param isCategory
6
6
  * @returns string, where forbidden symbols are replaced with '_'
7
7
  */
8
- reformatString: (value: unknown, isCategory?: boolean | undefined) => string;
9
- getPageViewDurationPresentation: (durationMs?: number | undefined) => string;
8
+ reformatString: (value: unknown, isCategory?: boolean) => string;
9
+ getPageViewDurationPresentation: (durationMs?: number) => string;
10
10
  getScreenWidthPresentation: () => string;
11
11
  npeSaveLowerCase: (val: string | null | undefined) => string;
12
12
  getUserAgentPresentation: () => string;
@@ -15,9 +15,17 @@ const buttonGroupClasses = classNames(modules_1068e447.buttonGroup, modules_c53c
15
15
  function rgButtonGroup() {
16
16
  return {
17
17
  restrict: 'A',
18
- link: function link($scope, iElement) {
18
+ scope: {
19
+ split: '='
20
+ },
21
+ link: function link($scope, iElement, attrs) {
19
22
  const element = iElement[0];
20
- element.classList.add(...buttonGroupClasses.split(' '));
23
+
24
+ if (attrs.split) {
25
+ element.classList.add(...modules_1068e447.split.split(' '));
26
+ } else {
27
+ element.classList.add(...buttonGroupClasses.split(' '));
28
+ }
21
29
  }
22
30
  };
23
31
  }
@@ -10,6 +10,7 @@ export interface DialogProps extends Partial<TabTrapProps> {
10
10
  onCloseAttempt: (event: React.MouseEvent<HTMLElement> | KeyboardEvent) => void;
11
11
  showCloseButton: boolean;
12
12
  closeButtonInside: boolean;
13
+ closeButtonTitle?: string;
13
14
  trapFocus: boolean;
14
15
  contentClassName?: string | null | undefined;
15
16
  portalTarget?: Element | null | undefined;
@@ -28,6 +29,7 @@ export default class Dialog extends PureComponent<DialogProps> {
28
29
  show: PropTypes.Validator<boolean>;
29
30
  showCloseButton: PropTypes.Requireable<boolean>;
30
31
  closeButtonInside: PropTypes.Requireable<boolean>;
32
+ closeButtonTitle: PropTypes.Requireable<string>;
31
33
  onOverlayClick: PropTypes.Requireable<(...args: any[]) => any>;
32
34
  onEscPress: PropTypes.Requireable<(...args: any[]) => any>;
33
35
  onCloseClick: PropTypes.Requireable<(...args: any[]) => any>;
@@ -125,6 +125,7 @@ class Dialog extends PureComponent {
125
125
  closeButtonInside,
126
126
  portalTarget,
127
127
  label,
128
+ closeButtonTitle,
128
129
  ...restProps
129
130
  } = this.props;
130
131
  const classes = classNames(modules_5e9b8c03.container, className);
@@ -162,7 +163,8 @@ class Dialog extends PureComponent {
162
163
  }),
163
164
  iconClassName: modules_5e9b8c03.closeIcon,
164
165
  onClick: this.onCloseClick,
165
- "aria-label": "close dialog"
166
+ title: closeButtonTitle,
167
+ "aria-label": closeButtonTitle || 'close dialog'
166
168
  }))), target)), portalTarget instanceof HTMLElement ? portalTarget : document.body);
167
169
  }
168
170
 
@@ -176,6 +178,7 @@ _defineProperty(Dialog, "propTypes", {
176
178
  show: PropTypes.bool.isRequired,
177
179
  showCloseButton: PropTypes.bool,
178
180
  closeButtonInside: PropTypes.bool,
181
+ closeButtonTitle: PropTypes.string,
179
182
  onOverlayClick: PropTypes.func,
180
183
  onEscPress: PropTypes.func,
181
184
  onCloseClick: PropTypes.func,
@@ -18,7 +18,7 @@ export default function createStatefulContext<T>(initialValue: T, name?: string)
18
18
  };
19
19
  displayName: string;
20
20
  };
21
- useUpdate: (value: T, skipUpdate?: boolean | undefined) => void;
21
+ useUpdate: (value: T, skipUpdate?: boolean) => void;
22
22
  Updater: React.MemoExoticComponent<{
23
23
  ({ value, skipUpdate }: UpdaterProps<T>): null;
24
24
  displayName: string;