@jetbrains/ring-ui 5.0.10 → 5.0.13
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/analytics/analytics__plugin-utils.d.ts +2 -2
- package/components/button/button.css +6 -1
- package/components/button-group/button-group.css +2 -2
- package/components/button-group/button-group.d.ts +1 -0
- package/components/button-group/button-group.js +3 -2
- package/components/button-group-ng/button-group-ng.js +9 -2
- package/components/button-set/button-set.d.ts +5 -1
- package/components/button-set/button-set.js +7 -4
- package/components/button-toolbar/button-toolbar.d.ts +5 -1
- package/components/button-toolbar/button-toolbar.js +5 -3
- package/components/code/code.js +1 -1
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/rerender-hoc.d.ts +1 -1
- package/components/global/variables.css +1 -0
- package/components/global/variables.d.ts +1 -0
- package/components/global/variables_dark.css +1 -0
- package/components/http/http.d.ts +3 -3
- package/components/list/list.d.ts +1 -1
- package/components/markdown/markdown.d.ts +1 -0
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/select/select.d.ts +3 -3
- package/components/select/select__popup.d.ts +1 -1
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/user-agreement/service.d.ts +8 -54
- package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -2
- package/dist/analytics/analytics__plugin-utils.d.ts +2 -2
- package/dist/button-group/button-group.d.ts +1 -0
- package/dist/button-group/button-group.js +4 -0
- package/dist/button-group-ng/button-group-ng.js +10 -2
- package/dist/button-set/button-set.d.ts +5 -1
- package/dist/button-set/button-set.js +14 -4
- package/dist/button-toolbar/button-toolbar.d.ts +5 -1
- package/dist/button-toolbar/button-toolbar.js +9 -3
- package/dist/code/code.js +2 -1
- package/dist/global/create-stateful-context.d.ts +1 -1
- package/dist/global/rerender-hoc.d.ts +1 -1
- package/dist/global/variables.d.ts +1 -0
- package/dist/http/http.d.ts +3 -3
- package/dist/list/list.d.ts +1 -1
- package/dist/markdown/markdown.d.ts +1 -0
- package/dist/old-browsers-message/white-list.js +2 -2
- package/dist/pager/pager.js +1 -1
- package/dist/pager-ng/pager-ng.js +1 -1
- package/dist/query-assist/query-assist.d.ts +2 -2
- package/dist/select/select.d.ts +3 -3
- package/dist/select/select__popup.d.ts +1 -1
- package/dist/shortcuts/shortcuts.d.ts +1 -1
- package/dist/style.css +1 -1
- package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
- package/dist/tags-input/tags-input.d.ts +1 -1
- package/dist/user-agreement/service.d.ts +8 -54
- package/package.json +74 -71
|
@@ -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
|
|
9
|
-
getPageViewDurationPresentation: (durationMs?: number
|
|
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;
|
|
@@ -69,7 +69,8 @@
|
|
|
69
69
|
&.active {
|
|
70
70
|
transition: none;
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
background-color: var(--ring-hover-background-color);
|
|
73
|
+
box-shadow: button-shadow var(--ring-main-color);
|
|
73
74
|
}
|
|
74
75
|
|
|
75
76
|
&:global(.focus-visible).active {
|
|
@@ -83,6 +84,10 @@
|
|
|
83
84
|
box-shadow: button-shadow var(--ring-border-disabled-color);
|
|
84
85
|
}
|
|
85
86
|
|
|
87
|
+
&[disabled].active {
|
|
88
|
+
background-color: var(--ring-disabled-selected-background-color);
|
|
89
|
+
}
|
|
90
|
+
|
|
86
91
|
&[disabled],
|
|
87
92
|
&[disabled].withIcon {
|
|
88
93
|
color: var(--ring-disabled-color);
|
|
@@ -105,13 +105,13 @@
|
|
|
105
105
|
/* stylelint-disable-next-line selector-max-specificity */
|
|
106
106
|
.buttonGroup .button.button.active {
|
|
107
107
|
border-radius: var(--ring-border-radius);
|
|
108
|
-
box-shadow:
|
|
108
|
+
box-shadow: button-shadow var(--ring-main-color);
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
/* stylelint-disable-next-line selector-max-specificity */
|
|
112
112
|
.buttonGroup .button:global(.focus-visible).active {
|
|
113
113
|
border-radius: var(--ring-border-radius);
|
|
114
|
-
box-shadow:
|
|
114
|
+
box-shadow: button-shadow var(--ring-main-color), 0 0 0 1px var(--ring-border-hover-color);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
/* stylelint-disable-next-line selector-max-specificity */
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
+
import dataTests from '../global/data-tests';
|
|
4
5
|
import Caption from './caption';
|
|
5
6
|
import styles from './button-group.css';
|
|
6
7
|
/**
|
|
@@ -12,9 +13,9 @@ export default class ButtonGroup extends PureComponent {
|
|
|
12
13
|
className: PropTypes.string
|
|
13
14
|
};
|
|
14
15
|
render() {
|
|
15
|
-
const { className, split, ...restProps } = this.props;
|
|
16
|
+
const { className, split, 'data-test': dataTest, ...restProps } = this.props;
|
|
16
17
|
const classes = classNames(split ? styles.split : styles.buttonGroup, className);
|
|
17
|
-
return (<div {...restProps} className={classes}/>);
|
|
18
|
+
return (<div {...restProps} data-test={dataTests('ring-button-group', dataTest)} className={classes}/>);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
export { Caption };
|
|
@@ -16,9 +16,16 @@ const buttonGroupClasses = classNames(styles.buttonGroup, ngStyles.buttonGroup);
|
|
|
16
16
|
function rgButtonGroup() {
|
|
17
17
|
return {
|
|
18
18
|
restrict: 'A',
|
|
19
|
-
|
|
19
|
+
scope: {
|
|
20
|
+
split: '='
|
|
21
|
+
},
|
|
22
|
+
link: function link($scope, iElement, attrs) {
|
|
20
23
|
const element = iElement[0];
|
|
21
|
-
|
|
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
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
export interface ButtonSetProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
'data-test'?: string | null | undefined;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* @name Button Set
|
|
5
8
|
*/
|
|
6
|
-
export default class ButtonSet extends PureComponent<
|
|
9
|
+
export default class ButtonSet extends PureComponent<ButtonSetProps> {
|
|
7
10
|
static propTypes: {
|
|
8
11
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
12
|
className: PropTypes.Requireable<string>;
|
|
13
|
+
'data-test': PropTypes.Requireable<string>;
|
|
10
14
|
};
|
|
11
15
|
render(): JSX.Element;
|
|
12
16
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
|
+
import dataTests from '../global/data-tests';
|
|
4
5
|
import styles from './button-set.css';
|
|
5
6
|
/**
|
|
6
7
|
* @name Button Set
|
|
@@ -8,12 +9,14 @@ import styles from './button-set.css';
|
|
|
8
9
|
export default class ButtonSet extends PureComponent {
|
|
9
10
|
static propTypes = {
|
|
10
11
|
children: PropTypes.node,
|
|
11
|
-
className: PropTypes.string
|
|
12
|
+
className: PropTypes.string,
|
|
13
|
+
'data-test': PropTypes.string
|
|
12
14
|
};
|
|
13
15
|
render() {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
{
|
|
16
|
+
const { className, 'data-test': dataTest, children, ...restProps } = this.props;
|
|
17
|
+
const classes = classNames(styles.buttonSet, className);
|
|
18
|
+
return (<div {...restProps} data-test={dataTests('ring-button-set', dataTest)} className={classes}>
|
|
19
|
+
{children}
|
|
17
20
|
</div>);
|
|
18
21
|
}
|
|
19
22
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
'data-test'?: string | null | undefined;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* @name Button Toolbar
|
|
5
8
|
*/
|
|
6
|
-
export default class ButtonToolbar extends PureComponent<
|
|
9
|
+
export default class ButtonToolbar extends PureComponent<ButtonToolbarProps> {
|
|
7
10
|
static propTypes: {
|
|
8
11
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
12
|
className: PropTypes.Requireable<string>;
|
|
13
|
+
'data-test': PropTypes.Requireable<string>;
|
|
10
14
|
};
|
|
11
15
|
render(): JSX.Element;
|
|
12
16
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
|
+
import dataTests from '../global/data-tests';
|
|
4
5
|
import styles from './button-toolbar.css';
|
|
5
6
|
/**
|
|
6
7
|
* @name Button Toolbar
|
|
@@ -8,11 +9,12 @@ import styles from './button-toolbar.css';
|
|
|
8
9
|
export default class ButtonToolbar extends PureComponent {
|
|
9
10
|
static propTypes = {
|
|
10
11
|
children: PropTypes.node,
|
|
11
|
-
className: PropTypes.string
|
|
12
|
+
className: PropTypes.string,
|
|
13
|
+
'data-test': PropTypes.string
|
|
12
14
|
};
|
|
13
15
|
render() {
|
|
14
|
-
const { className } = this.props;
|
|
16
|
+
const { className, 'data-test': dataTest, ...restProps } = this.props;
|
|
15
17
|
const classes = classNames(styles.buttonToolbar, className);
|
|
16
|
-
return (<div {...
|
|
18
|
+
return (<div {...restProps} data-test={dataTests('ring-button-toolbar', dataTest)} className={classes}/>);
|
|
17
19
|
}
|
|
18
20
|
}
|
package/components/code/code.js
CHANGED
|
@@ -81,7 +81,7 @@ export default class Code extends PureComponent {
|
|
|
81
81
|
[styles.inline]: inline,
|
|
82
82
|
[styles.softWrap]: softWrap
|
|
83
83
|
});
|
|
84
|
-
return (<Tag className={classes}>
|
|
84
|
+
return (<Tag className={classes} data-test="ring-code">
|
|
85
85
|
<code
|
|
86
86
|
// should be focusable because it can be scrollable
|
|
87
87
|
tabIndex={inline ? -1 : 0} ref={this.initCodeRef} className={highlightStyles.highlightContainer}>
|
|
@@ -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
|
|
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?: (
|
|
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;
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
--ring-warning-background-color: #faeccd;
|
|
59
59
|
--ring-added-background-color: #d8f0d8;
|
|
60
60
|
--ring-disabled-background-color: #f5f5f5;
|
|
61
|
+
--ring-disabled-selected-background-color: #e8e8e8;
|
|
61
62
|
--ring-button-danger-active-color: #ffe7e8;
|
|
62
63
|
--ring-button-loader-background: #33a3ff;
|
|
63
64
|
--ring-button-primary-background-color: #1a98ff;
|
|
@@ -48,6 +48,7 @@ export interface RingCSSProperties {
|
|
|
48
48
|
'--ring-warning-background-color'?: Property.BackgroundColor;
|
|
49
49
|
'--ring-added-background-color'?: Property.BackgroundColor;
|
|
50
50
|
'--ring-disabled-background-color'?: Property.BackgroundColor;
|
|
51
|
+
'--ring-disabled-selected-background-color'?: Property.BackgroundColor;
|
|
51
52
|
'--ring-button-danger-active-color'?: Property.BackgroundColor;
|
|
52
53
|
'--ring-button-loader-background'?: Property.BackgroundColor;
|
|
53
54
|
'--ring-button-primary-background-color'?: Property.BackgroundColor;
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
--ring-warning-background-color: #593d01;
|
|
49
49
|
--ring-added-background-color: #365947;
|
|
50
50
|
--ring-disabled-background-color: #303030;
|
|
51
|
+
--ring-disabled-selected-background-color: #363636;
|
|
51
52
|
--ring-button-danger-active-color: #26080a;
|
|
52
53
|
--ring-button-primary-background-color: #007ee5;
|
|
53
54
|
|
|
@@ -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
|
|
45
|
+
request: (url: string, params?: RequestParams) => Promise<any>;
|
|
46
46
|
getMetaForResponse: (response: object) => Partial<Response> | undefined;
|
|
47
|
-
get: (url: string, params?: RequestParams
|
|
48
|
-
post: (url: string, params?: RequestParams
|
|
47
|
+
get: (url: string, params?: RequestParams) => Promise<any>;
|
|
48
|
+
post: (url: string, params?: RequestParams) => Promise<any>;
|
|
49
49
|
}
|
|
@@ -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
|
|
169
|
+
enterHandler: (event: KeyboardEvent, shortcut?: string) => boolean;
|
|
170
170
|
getFirst(): ListDataItem<T> | undefined;
|
|
171
171
|
getSelected(): ListDataItem<T> | null;
|
|
172
172
|
clearSelected: () => void;
|
|
@@ -2,6 +2,7 @@ import { PureComponent } from 'react';
|
|
|
2
2
|
import { Options } from 'react-markdown';
|
|
3
3
|
export interface BaseMarkdownProps {
|
|
4
4
|
inline?: boolean | null | undefined;
|
|
5
|
+
plugins?: Options['remarkPlugins'];
|
|
5
6
|
}
|
|
6
7
|
export declare type MarkdownProps = Options & BaseMarkdownProps;
|
|
7
8
|
/**
|
|
@@ -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?: (
|
|
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
|
|
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
|
|
232
|
+
_listSelectHandler: (selected: SelectItem<T>, event?: Event, opts?: SelectHandlerParams) => void;
|
|
233
233
|
_listSelectAllHandler: (isSelectAll?: boolean) => void;
|
|
234
234
|
private _onCloseAttempt;
|
|
235
|
-
clearFilter: (e?:
|
|
236
|
-
clear: (event?: Event |
|
|
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 |
|
|
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").
|
|
27
|
+
render(): string | number | true | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("react").ReactFragment | null;
|
|
28
28
|
}
|
|
@@ -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
|
|
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
|
|
56
|
+
checkConsentAndShowDialog: (withoutNotifications?: boolean) => Promise<unknown>;
|
|
57
57
|
checkConsent: () => Promise<boolean | null | undefined>;
|
|
58
58
|
alertKey?: string | number | null;
|
|
59
|
-
showAlert: (withoutNotifications?: boolean
|
|
60
|
-
hideAlert: (withoutNotifications?: boolean
|
|
61
|
-
showDialog: (withoutNotifications?: boolean
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
}
|
|
@@ -14,7 +14,7 @@ function _defineProperty(obj, key, value) {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function _extends() {
|
|
17
|
-
_extends = Object.assign
|
|
17
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
18
18
|
for (var i = 1; i < arguments.length; i++) {
|
|
19
19
|
var source = arguments[i];
|
|
20
20
|
|
|
@@ -27,7 +27,6 @@ function _extends() {
|
|
|
27
27
|
|
|
28
28
|
return target;
|
|
29
29
|
};
|
|
30
|
-
|
|
31
30
|
return _extends.apply(this, arguments);
|
|
32
31
|
}
|
|
33
32
|
|
|
@@ -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
|
|
9
|
-
getPageViewDurationPresentation: (durationMs?: number
|
|
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;
|
|
@@ -2,8 +2,10 @@ import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBa
|
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
+
import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
6
|
export { default as Caption } from './caption.js';
|
|
6
7
|
import { m as modules_1068e447 } from '../_helpers/button-group.js';
|
|
8
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
9
|
|
|
8
10
|
/**
|
|
9
11
|
* @name Button Group
|
|
@@ -14,10 +16,12 @@ class ButtonGroup extends PureComponent {
|
|
|
14
16
|
const {
|
|
15
17
|
className,
|
|
16
18
|
split,
|
|
19
|
+
'data-test': dataTest,
|
|
17
20
|
...restProps
|
|
18
21
|
} = this.props;
|
|
19
22
|
const classes = classNames(split ? modules_1068e447.split : modules_1068e447.buttonGroup, className);
|
|
20
23
|
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
|
24
|
+
"data-test": joinDataTestAttributes('ring-button-group', dataTest),
|
|
21
25
|
className: classes
|
|
22
26
|
}));
|
|
23
27
|
}
|
|
@@ -15,9 +15,17 @@ const buttonGroupClasses = classNames(modules_1068e447.buttonGroup, modules_c53c
|
|
|
15
15
|
function rgButtonGroup() {
|
|
16
16
|
return {
|
|
17
17
|
restrict: 'A',
|
|
18
|
-
|
|
18
|
+
scope: {
|
|
19
|
+
split: '='
|
|
20
|
+
},
|
|
21
|
+
link: function link($scope, iElement, attrs) {
|
|
19
22
|
const element = iElement[0];
|
|
20
|
-
|
|
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
|
}
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
export interface ButtonSetProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
'data-test'?: string | null | undefined;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* @name Button Set
|
|
5
8
|
*/
|
|
6
|
-
export default class ButtonSet extends PureComponent<
|
|
9
|
+
export default class ButtonSet extends PureComponent<ButtonSetProps> {
|
|
7
10
|
static propTypes: {
|
|
8
11
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
12
|
className: PropTypes.Requireable<string>;
|
|
13
|
+
'data-test': PropTypes.Requireable<string>;
|
|
10
14
|
};
|
|
11
15
|
render(): JSX.Element;
|
|
12
16
|
}
|
|
@@ -2,7 +2,9 @@ import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBa
|
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
|
+
import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
6
|
import { m as modules_fd849143 } from '../_helpers/button-set.js';
|
|
7
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* @name Button Set
|
|
@@ -10,17 +12,25 @@ import { m as modules_fd849143 } from '../_helpers/button-set.js';
|
|
|
10
12
|
|
|
11
13
|
class ButtonSet extends PureComponent {
|
|
12
14
|
render() {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
+
const {
|
|
16
|
+
className,
|
|
17
|
+
'data-test': dataTest,
|
|
18
|
+
children,
|
|
19
|
+
...restProps
|
|
20
|
+
} = this.props;
|
|
21
|
+
const classes = classNames(modules_fd849143.buttonSet, className);
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
|
23
|
+
"data-test": joinDataTestAttributes('ring-button-set', dataTest),
|
|
15
24
|
className: classes
|
|
16
|
-
}),
|
|
25
|
+
}), children);
|
|
17
26
|
}
|
|
18
27
|
|
|
19
28
|
}
|
|
20
29
|
|
|
21
30
|
_defineProperty(ButtonSet, "propTypes", {
|
|
22
31
|
children: PropTypes.node,
|
|
23
|
-
className: PropTypes.string
|
|
32
|
+
className: PropTypes.string,
|
|
33
|
+
'data-test': PropTypes.string
|
|
24
34
|
});
|
|
25
35
|
|
|
26
36
|
export { ButtonSet as default };
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
|
|
4
|
+
'data-test'?: string | null | undefined;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* @name Button Toolbar
|
|
5
8
|
*/
|
|
6
|
-
export default class ButtonToolbar extends PureComponent<
|
|
9
|
+
export default class ButtonToolbar extends PureComponent<ButtonToolbarProps> {
|
|
7
10
|
static propTypes: {
|
|
8
11
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
9
12
|
className: PropTypes.Requireable<string>;
|
|
13
|
+
'data-test': PropTypes.Requireable<string>;
|
|
10
14
|
};
|
|
11
15
|
render(): JSX.Element;
|
|
12
16
|
}
|
|
@@ -2,7 +2,9 @@ import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBa
|
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
+
import joinDataTestAttributes from '../global/data-tests.js';
|
|
5
6
|
import { m as modules_34154ec0 } from '../_helpers/button-toolbar.js';
|
|
7
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
6
8
|
|
|
7
9
|
/**
|
|
8
10
|
* @name Button Toolbar
|
|
@@ -11,10 +13,13 @@ import { m as modules_34154ec0 } from '../_helpers/button-toolbar.js';
|
|
|
11
13
|
class ButtonToolbar extends PureComponent {
|
|
12
14
|
render() {
|
|
13
15
|
const {
|
|
14
|
-
className
|
|
16
|
+
className,
|
|
17
|
+
'data-test': dataTest,
|
|
18
|
+
...restProps
|
|
15
19
|
} = this.props;
|
|
16
20
|
const classes = classNames(modules_34154ec0.buttonToolbar, className);
|
|
17
|
-
return /*#__PURE__*/React.createElement("div", _extends({},
|
|
21
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
|
22
|
+
"data-test": joinDataTestAttributes('ring-button-toolbar', dataTest),
|
|
18
23
|
className: classes
|
|
19
24
|
}));
|
|
20
25
|
}
|
|
@@ -23,7 +28,8 @@ class ButtonToolbar extends PureComponent {
|
|
|
23
28
|
|
|
24
29
|
_defineProperty(ButtonToolbar, "propTypes", {
|
|
25
30
|
children: PropTypes.node,
|
|
26
|
-
className: PropTypes.string
|
|
31
|
+
className: PropTypes.string,
|
|
32
|
+
'data-test': PropTypes.string
|
|
27
33
|
});
|
|
28
34
|
|
|
29
35
|
export { ButtonToolbar as default };
|
package/dist/code/code.js
CHANGED
|
@@ -105,7 +105,8 @@ class Code extends PureComponent {
|
|
|
105
105
|
[modules_66c414ea.softWrap]: softWrap
|
|
106
106
|
});
|
|
107
107
|
return /*#__PURE__*/React.createElement(Tag, {
|
|
108
|
-
className: classes
|
|
108
|
+
className: classes,
|
|
109
|
+
"data-test": "ring-code"
|
|
109
110
|
}, /*#__PURE__*/React.createElement("code", {
|
|
110
111
|
// should be focusable because it can be scrollable
|
|
111
112
|
tabIndex: inline ? -1 : 0,
|