@jetbrains/ring-ui 5.1.4 → 5.1.5
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/date-picker/consts.d.ts +0 -1
- package/components/date-picker/date-input.d.ts +0 -1
- package/components/date-picker/date-input.js +2 -3
- package/components/date-picker/date-picker.js +2 -2
- package/components/date-picker/date-popup.d.ts +0 -1
- package/components/date-picker/date-popup.js +3 -4
- package/dist/date-picker/consts.d.ts +0 -1
- package/dist/date-picker/date-input.d.ts +0 -1
- package/dist/date-picker/date-input.js +1 -3
- package/dist/date-picker/date-picker.js +1 -3
- package/dist/date-picker/date-popup.d.ts +0 -1
- package/dist/date-picker/date-popup.js +0 -4
- package/package.json +25 -25
|
@@ -70,7 +70,6 @@ export interface DatePopupBaseProps {
|
|
|
70
70
|
fromPlaceholder?: string | null | undefined;
|
|
71
71
|
toPlaceholder?: string | null | undefined;
|
|
72
72
|
timePlaceholder?: string | null | undefined;
|
|
73
|
-
hidden: boolean;
|
|
74
73
|
locale?: Locale | undefined;
|
|
75
74
|
parseDateInput: (text: Date | number | string | null | undefined) => Date | null;
|
|
76
75
|
displayFormat: (date: Date, locale: Locale | undefined) => string;
|
|
@@ -25,7 +25,6 @@ export default class DateInput extends React.PureComponent<DateInputProps> {
|
|
|
25
25
|
date: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
|
26
26
|
time: PropTypes.Requireable<string>;
|
|
27
27
|
displayFormat: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
-
hidden: PropTypes.Requireable<boolean>;
|
|
29
28
|
translations: PropTypes.Requireable<object>;
|
|
30
29
|
fromPlaceholder: PropTypes.Requireable<string>;
|
|
31
30
|
toPlaceholder: PropTypes.Requireable<string>;
|
|
@@ -16,7 +16,6 @@ export default class DateInput extends React.PureComponent {
|
|
|
16
16
|
date: dateType,
|
|
17
17
|
time: PropTypes.string,
|
|
18
18
|
displayFormat: PropTypes.func,
|
|
19
|
-
hidden: PropTypes.bool,
|
|
20
19
|
translations: PropTypes.object,
|
|
21
20
|
fromPlaceholder: PropTypes.string,
|
|
22
21
|
toPlaceholder: PropTypes.string,
|
|
@@ -28,8 +27,8 @@ export default class DateInput extends React.PureComponent {
|
|
|
28
27
|
locale: PropTypes.object
|
|
29
28
|
};
|
|
30
29
|
componentDidUpdate(prevProps) {
|
|
31
|
-
const {
|
|
32
|
-
if (
|
|
30
|
+
const { text, active } = this.props;
|
|
31
|
+
if (text !== prevProps.text || active !== prevProps.active) {
|
|
33
32
|
this.updateInput({ text, active });
|
|
34
33
|
}
|
|
35
34
|
}
|
|
@@ -22,13 +22,13 @@ import DatePopup from './date-popup';
|
|
|
22
22
|
import { dateType } from './consts';
|
|
23
23
|
import styles from './date-picker.css';
|
|
24
24
|
import formats from './formats';
|
|
25
|
-
const PopupComponent = ({ hidden = false, className, popupRef, onClear, datePopupProps, onComplete, ...restProps }) => (<Popup hidden={hidden}
|
|
25
|
+
const PopupComponent = ({ hidden = false, className, popupRef, onClear, datePopupProps, onComplete, ...restProps }) => (<Popup hidden={hidden} className={className} ref={popupRef} directions={[
|
|
26
26
|
Popup.PopupProps.Directions.BOTTOM_RIGHT,
|
|
27
27
|
Popup.PopupProps.Directions.BOTTOM_LEFT,
|
|
28
28
|
Popup.PopupProps.Directions.TOP_LEFT,
|
|
29
29
|
Popup.PopupProps.Directions.TOP_RIGHT
|
|
30
30
|
]} {...restProps}>
|
|
31
|
-
<DatePopup onClear={onClear} {...datePopupProps} onComplete={onComplete}
|
|
31
|
+
<DatePopup onClear={onClear} {...datePopupProps} onComplete={onComplete}/>
|
|
32
32
|
</Popup>);
|
|
33
33
|
PopupComponent.propTypes = {
|
|
34
34
|
hidden: PropTypes.bool,
|
|
@@ -20,7 +20,6 @@ export default class DatePopup extends Component<DatePopupProps, DatePopupState>
|
|
|
20
20
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
21
|
minDate: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
|
22
22
|
maxDate: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
|
23
|
-
hidden: PropTypes.Requireable<boolean>;
|
|
24
23
|
fromPlaceholder: PropTypes.Requireable<string>;
|
|
25
24
|
toPlaceholder: PropTypes.Requireable<string>;
|
|
26
25
|
timePlaceholder: PropTypes.Requireable<string>;
|
|
@@ -36,7 +36,6 @@ export default class DatePopup extends Component {
|
|
|
36
36
|
onClear: PropTypes.func,
|
|
37
37
|
minDate: dateType,
|
|
38
38
|
maxDate: dateType,
|
|
39
|
-
hidden: PropTypes.bool,
|
|
40
39
|
fromPlaceholder: PropTypes.string,
|
|
41
40
|
toPlaceholder: PropTypes.string,
|
|
42
41
|
timePlaceholder: PropTypes.string,
|
|
@@ -268,7 +267,7 @@ export default class DatePopup extends Component {
|
|
|
268
267
|
this.componentRef.current?.querySelector('input')?.focus();
|
|
269
268
|
};
|
|
270
269
|
render() {
|
|
271
|
-
const { range,
|
|
270
|
+
const { range, withTime, locale } = this.props;
|
|
272
271
|
const { from, to, date, time, ...restProps } = this.props;
|
|
273
272
|
const parsedDate = this.parse(this.props.date, 'date');
|
|
274
273
|
const parsedTo = this.parse(this.props.to, 'to');
|
|
@@ -329,11 +328,11 @@ export default class DatePopup extends Component {
|
|
|
329
328
|
if (clearable && name !== 'from' && !this.isInTimeMode()) {
|
|
330
329
|
onClear = this.onClear.bind(this);
|
|
331
330
|
}
|
|
332
|
-
return (<DateInput {...this.props} {...this.state} divider={name === 'from' && (dates[name] != null || parsedTo != null)} name={name} key={name} date={dates[name]} active={this.state.active === name}
|
|
331
|
+
return (<DateInput {...this.props} {...this.state} divider={name === 'from' && (dates[name] != null || parsedTo != null)} name={name} key={name} date={dates[name]} active={this.state.active === name} onActivate={this.handleActivate(name)} onInput={this.handleInput} onConfirm={this.handleConfirm(name)} onClear={onClear} locale={locale}/>);
|
|
333
332
|
})}
|
|
334
333
|
|
|
335
334
|
{this.isInTimeMode()
|
|
336
|
-
? (<DateInput {...this.props} text={this.state.text} divider={!!parsedDate} hoverDate={null} name={'time'} key={'time'} date={null} time={time} active={this.state.active === 'time'}
|
|
335
|
+
? (<DateInput {...this.props} text={this.state.text} divider={!!parsedDate} hoverDate={null} name={'time'} key={'time'} date={null} time={time} active={this.state.active === 'time'} onActivate={this.handleActivate('time')} onInput={this.handleInput} onConfirm={this.handleConfirm('time')} onClear={clearable && this.onClear || undefined} locale={locale}/>)
|
|
337
336
|
: ('')}
|
|
338
337
|
</div>
|
|
339
338
|
<Weekdays locale={locale}/>
|
|
@@ -70,7 +70,6 @@ export interface DatePopupBaseProps {
|
|
|
70
70
|
fromPlaceholder?: string | null | undefined;
|
|
71
71
|
toPlaceholder?: string | null | undefined;
|
|
72
72
|
timePlaceholder?: string | null | undefined;
|
|
73
|
-
hidden: boolean;
|
|
74
73
|
locale?: Locale | undefined;
|
|
75
74
|
parseDateInput: (text: Date | number | string | null | undefined) => Date | null;
|
|
76
75
|
displayFormat: (date: Date, locale: Locale | undefined) => string;
|
|
@@ -25,7 +25,6 @@ export default class DateInput extends React.PureComponent<DateInputProps> {
|
|
|
25
25
|
date: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
|
26
26
|
time: PropTypes.Requireable<string>;
|
|
27
27
|
displayFormat: PropTypes.Requireable<(...args: any[]) => any>;
|
|
28
|
-
hidden: PropTypes.Requireable<boolean>;
|
|
29
28
|
translations: PropTypes.Requireable<object>;
|
|
30
29
|
fromPlaceholder: PropTypes.Requireable<string>;
|
|
31
30
|
toPlaceholder: PropTypes.Requireable<string>;
|
|
@@ -69,10 +69,9 @@ var DateInput = /*#__PURE__*/function (_React$PureComponent) {
|
|
|
69
69
|
key: "componentDidUpdate",
|
|
70
70
|
value: function componentDidUpdate(prevProps) {
|
|
71
71
|
var _this$props = this.props,
|
|
72
|
-
hidden = _this$props.hidden,
|
|
73
72
|
text = _this$props.text,
|
|
74
73
|
active = _this$props.active;
|
|
75
|
-
if (
|
|
74
|
+
if (text !== prevProps.text || active !== prevProps.active) {
|
|
76
75
|
this.updateInput({
|
|
77
76
|
text: text,
|
|
78
77
|
active: active
|
|
@@ -167,7 +166,6 @@ _defineProperty(DateInput, "propTypes", {
|
|
|
167
166
|
date: dateType,
|
|
168
167
|
time: PropTypes.string,
|
|
169
168
|
displayFormat: PropTypes.func,
|
|
170
|
-
hidden: PropTypes.bool,
|
|
171
169
|
translations: PropTypes.object,
|
|
172
170
|
fromPlaceholder: PropTypes.string,
|
|
173
171
|
toPlaceholder: PropTypes.string,
|
|
@@ -130,15 +130,13 @@ var PopupComponent = function PopupComponent(_ref) {
|
|
|
130
130
|
restProps = _objectWithoutProperties(_ref, _excluded);
|
|
131
131
|
return /*#__PURE__*/React.createElement(Popup, _extends({
|
|
132
132
|
hidden: hidden,
|
|
133
|
-
keepMounted: true,
|
|
134
133
|
className: className,
|
|
135
134
|
ref: popupRef,
|
|
136
135
|
directions: [Popup.PopupProps.Directions.BOTTOM_RIGHT, Popup.PopupProps.Directions.BOTTOM_LEFT, Popup.PopupProps.Directions.TOP_LEFT, Popup.PopupProps.Directions.TOP_RIGHT]
|
|
137
136
|
}, restProps), /*#__PURE__*/React.createElement(DatePopup, _extends({
|
|
138
137
|
onClear: onClear
|
|
139
138
|
}, datePopupProps, {
|
|
140
|
-
onComplete: onComplete
|
|
141
|
-
hidden: hidden
|
|
139
|
+
onComplete: onComplete
|
|
142
140
|
})));
|
|
143
141
|
};
|
|
144
142
|
PopupComponent.propTypes = {
|
|
@@ -20,7 +20,6 @@ export default class DatePopup extends Component<DatePopupProps, DatePopupState>
|
|
|
20
20
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
21
21
|
minDate: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
|
22
22
|
maxDate: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
|
23
|
-
hidden: PropTypes.Requireable<boolean>;
|
|
24
23
|
fromPlaceholder: PropTypes.Requireable<string>;
|
|
25
24
|
toPlaceholder: PropTypes.Requireable<string>;
|
|
26
25
|
timePlaceholder: PropTypes.Requireable<string>;
|
|
@@ -354,7 +354,6 @@ var DatePopup = /*#__PURE__*/function (_Component) {
|
|
|
354
354
|
var _this2 = this;
|
|
355
355
|
var _this$props3 = this.props,
|
|
356
356
|
range = _this$props3.range,
|
|
357
|
-
hidden = _this$props3.hidden,
|
|
358
357
|
withTime = _this$props3.withTime,
|
|
359
358
|
locale = _this$props3.locale;
|
|
360
359
|
var _this$props4 = this.props;
|
|
@@ -419,7 +418,6 @@ var DatePopup = /*#__PURE__*/function (_Component) {
|
|
|
419
418
|
key: name,
|
|
420
419
|
date: dates[name],
|
|
421
420
|
active: _this2.state.active === name,
|
|
422
|
-
hidden: hidden,
|
|
423
421
|
onActivate: _this2.handleActivate(name),
|
|
424
422
|
onInput: _this2.handleInput,
|
|
425
423
|
onConfirm: _this2.handleConfirm(name),
|
|
@@ -435,7 +433,6 @@ var DatePopup = /*#__PURE__*/function (_Component) {
|
|
|
435
433
|
date: null,
|
|
436
434
|
time: time,
|
|
437
435
|
active: this.state.active === 'time',
|
|
438
|
-
hidden: hidden,
|
|
439
436
|
onActivate: this.handleActivate('time'),
|
|
440
437
|
onInput: this.handleInput,
|
|
441
438
|
onConfirm: this.handleConfirm('time'),
|
|
@@ -478,7 +475,6 @@ _defineProperty(DatePopup, "propTypes", {
|
|
|
478
475
|
onClear: PropTypes.func,
|
|
479
476
|
minDate: dateType,
|
|
480
477
|
maxDate: dateType,
|
|
481
|
-
hidden: PropTypes.bool,
|
|
482
478
|
fromPlaceholder: PropTypes.string,
|
|
483
479
|
toPlaceholder: PropTypes.string,
|
|
484
480
|
timePlaceholder: PropTypes.string,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.5",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -85,21 +85,21 @@
|
|
|
85
85
|
"@rollup/plugin-json": "^6.0.0",
|
|
86
86
|
"@rollup/plugin-node-resolve": "^15.2.1",
|
|
87
87
|
"@rollup/plugin-replace": "^5.0.2",
|
|
88
|
-
"@storybook/addon-a11y": "7.4.
|
|
89
|
-
"@storybook/addon-docs": "7.4.
|
|
90
|
-
"@storybook/addon-essentials": "7.4.
|
|
88
|
+
"@storybook/addon-a11y": "7.4.2",
|
|
89
|
+
"@storybook/addon-docs": "7.4.2",
|
|
90
|
+
"@storybook/addon-essentials": "7.4.2",
|
|
91
91
|
"@storybook/addon-storyshots": "7.4.0",
|
|
92
|
-
"@storybook/addon-storyshots-puppeteer": "7.4.
|
|
93
|
-
"@storybook/addon-storysource": "7.4.
|
|
94
|
-
"@storybook/addons": "7.4.
|
|
92
|
+
"@storybook/addon-storyshots-puppeteer": "7.4.2",
|
|
93
|
+
"@storybook/addon-storysource": "7.4.2",
|
|
94
|
+
"@storybook/addons": "7.4.2",
|
|
95
95
|
"@storybook/html": "7.4.0",
|
|
96
|
-
"@storybook/html-webpack5": "^7.4.
|
|
96
|
+
"@storybook/html-webpack5": "^7.4.2",
|
|
97
97
|
"@storybook/preview-api": "7.4.0",
|
|
98
|
-
"@storybook/react": "7.4.
|
|
99
|
-
"@storybook/source-loader": "7.4.
|
|
100
|
-
"@storybook/theming": "7.4.
|
|
98
|
+
"@storybook/react": "7.4.2",
|
|
99
|
+
"@storybook/source-loader": "7.4.2",
|
|
100
|
+
"@storybook/theming": "7.4.2",
|
|
101
101
|
"@testing-library/react": "^14.0.0",
|
|
102
|
-
"@testing-library/user-event": "^14.
|
|
102
|
+
"@testing-library/user-event": "^14.5.1",
|
|
103
103
|
"@types/chai": "^4.3.6",
|
|
104
104
|
"@types/chai-as-promised": "^7.1.6",
|
|
105
105
|
"@types/chai-dom": "0.0.10",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
"@types/react-dom": "^18.2.7",
|
|
110
110
|
"@types/sinon": "^10.0.16",
|
|
111
111
|
"@types/sinon-chai": "^3.2.9",
|
|
112
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
113
|
-
"@typescript-eslint/parser": "^6.
|
|
112
|
+
"@typescript-eslint/eslint-plugin": "^6.7.0",
|
|
113
|
+
"@typescript-eslint/parser": "^6.7.0",
|
|
114
114
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.8.0",
|
|
115
115
|
"acorn": "^8.10.0",
|
|
116
116
|
"angular": "^1.8.3",
|
|
@@ -118,16 +118,16 @@
|
|
|
118
118
|
"angular-route": "^1.8.3",
|
|
119
119
|
"babel-plugin-react-docgen": "^4.2.1",
|
|
120
120
|
"babel-plugin-require-context-hook": "^1.0.0",
|
|
121
|
-
"caniuse-lite": "^1.0.
|
|
121
|
+
"caniuse-lite": "^1.0.30001534",
|
|
122
122
|
"chai": "^4.3.8",
|
|
123
123
|
"chai-as-promised": "^7.1.1",
|
|
124
124
|
"chai-dom": "^1.10.0",
|
|
125
125
|
"chai-enzyme": "1.0.0-beta.1",
|
|
126
126
|
"cheerio": "^1.0.0-rc.12",
|
|
127
|
-
"core-js": "^3.32.
|
|
127
|
+
"core-js": "^3.32.2",
|
|
128
128
|
"cpy-cli": "^3.1.1",
|
|
129
129
|
"enzyme": "^3.11.0",
|
|
130
|
-
"eslint": "^8.
|
|
130
|
+
"eslint": "^8.49.0",
|
|
131
131
|
"eslint-import-resolver-webpack": "^0.13.7",
|
|
132
132
|
"eslint-plugin-angular": "^4.1.0",
|
|
133
133
|
"eslint-plugin-bdd": "^2.1.1",
|
|
@@ -141,8 +141,8 @@
|
|
|
141
141
|
"husky": "^8.0.3",
|
|
142
142
|
"identity-obj-proxy": "^3.0.0",
|
|
143
143
|
"imports-loader": "^4.0.1",
|
|
144
|
-
"jest": "~29.
|
|
145
|
-
"jest-environment-jsdom": "^29.
|
|
144
|
+
"jest": "~29.7.0",
|
|
145
|
+
"jest-environment-jsdom": "^29.7.0",
|
|
146
146
|
"jest-teamcity": "^1.10.0",
|
|
147
147
|
"karma": "^6.4.2",
|
|
148
148
|
"karma-chrome-launcher": "3.2.0",
|
|
@@ -155,20 +155,20 @@
|
|
|
155
155
|
"mocha": "^10.2.0",
|
|
156
156
|
"pinst": "^3.0.0",
|
|
157
157
|
"prettier": "^3.0.3",
|
|
158
|
-
"puppeteer": "^21.
|
|
158
|
+
"puppeteer": "^21.2.1",
|
|
159
159
|
"raw-loader": "^4.0.2",
|
|
160
160
|
"react": "^18.2.0",
|
|
161
161
|
"react-dom": "^18.2.0",
|
|
162
162
|
"react-test-renderer": "^18.2.0",
|
|
163
163
|
"regenerator-runtime": "^0.14.0",
|
|
164
164
|
"rimraf": "^5.0.1",
|
|
165
|
-
"rollup": "^3.29.
|
|
165
|
+
"rollup": "^3.29.1",
|
|
166
166
|
"rollup-plugin-clear": "^2.0.7",
|
|
167
167
|
"rollup-plugin-styles": "^4.0.0",
|
|
168
|
-
"sinon": "^
|
|
168
|
+
"sinon": "^16.0.0",
|
|
169
169
|
"sinon-chai": "^3.7.0",
|
|
170
170
|
"storage-mock": "^2.1.0",
|
|
171
|
-
"storybook": "^7.4.
|
|
171
|
+
"storybook": "^7.4.2",
|
|
172
172
|
"storybook-addon-themes": "^6.1.0",
|
|
173
173
|
"storybook-zeplin": "^2.0.2",
|
|
174
174
|
"stylelint": "^15.10.3",
|
|
@@ -201,11 +201,11 @@
|
|
|
201
201
|
}
|
|
202
202
|
},
|
|
203
203
|
"dependencies": {
|
|
204
|
-
"@babel/core": "^7.22.
|
|
204
|
+
"@babel/core": "^7.22.20",
|
|
205
205
|
"@babel/preset-typescript": "^7.22.15",
|
|
206
206
|
"@jetbrains/babel-preset-jetbrains": "^2.3.2",
|
|
207
207
|
"@jetbrains/icons": "^3.21.0",
|
|
208
|
-
"@jetbrains/logos": "^2.2.
|
|
208
|
+
"@jetbrains/logos": "^2.2.18",
|
|
209
209
|
"@jetbrains/postcss-require-hover": "^0.1.2",
|
|
210
210
|
"@types/combokeys": "^2.4.7",
|
|
211
211
|
"@types/deep-equal": "^1.0.1",
|