@jetbrains/ring-ui 5.0.139 → 5.0.141
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/alert/alert.d.ts +1 -1
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/auth-dialog/auth-dialog.d.ts +2 -2
- package/components/avatar/avatar.d.ts +2 -2
- package/components/avatar/fallback-avatar.d.ts +2 -1
- package/components/badge/badge.d.ts +2 -2
- package/components/button/button.d.ts +1 -1
- package/components/button-group/button-group.d.ts +2 -2
- package/components/button-group/caption.d.ts +2 -2
- package/components/button-set/button-set.d.ts +2 -2
- package/components/button-toolbar/button-toolbar.d.ts +2 -2
- package/components/checkbox/checkbox.d.ts +2 -2
- package/components/code/code.d.ts +1 -1
- package/components/confirm/confirm.d.ts +1 -1
- package/components/content-layout/content-layout.d.ts +2 -2
- package/components/content-layout/sidebar.d.ts +2 -2
- package/components/contenteditable/contenteditable.d.ts +3 -3
- package/components/data-list/data-list.d.ts +3 -3
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/title.d.ts +1 -1
- package/components/date-picker/consts.d.ts +5 -5
- package/components/date-picker/date-input.d.ts +3 -12
- package/components/date-picker/date-input.js +7 -15
- package/components/date-picker/date-picker.d.ts +8 -6
- package/components/date-picker/date-picker.js +9 -15
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/month-names.d.ts +2 -1
- package/components/date-picker/month-slider.d.ts +2 -2
- package/components/date-picker/month.d.ts +2 -1
- package/components/date-picker/months.d.ts +2 -1
- package/components/date-picker/weekdays.d.ts +2 -1
- package/components/date-picker/years.d.ts +2 -2
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/dropdown.d.ts +8 -1
- package/components/editable-heading/editable-heading.d.ts +2 -2
- package/components/error-bubble/error-bubble.d.ts +2 -2
- package/components/error-message/error-message.d.ts +2 -2
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/react-dom-renderer.d.ts +2 -2
- package/components/grid/col.d.ts +2 -2
- package/components/grid/grid.d.ts +2 -2
- package/components/grid/row.d.ts +2 -2
- package/components/group/group.d.ts +2 -2
- package/components/header/header.d.ts +2 -2
- package/components/header/logo.d.ts +2 -2
- package/components/header/profile.d.ts +1 -1
- package/components/header/services-link.d.ts +2 -2
- package/components/header/services.d.ts +2 -2
- package/components/header/smart-profile.d.ts +2 -2
- package/components/header/smart-services.d.ts +2 -2
- package/components/header/tray-icon.d.ts +2 -2
- package/components/header/tray.d.ts +2 -2
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon__svg.d.ts +1 -1
- package/components/input/input-label.d.ts +2 -2
- package/components/input/input.d.ts +1 -1
- package/components/island/adaptive-island-hoc.d.ts +2 -2
- package/components/island/content.d.ts +1 -1
- package/components/island/header.d.ts +2 -2
- package/components/island/island.d.ts +3 -3
- package/components/island-legacy/content-legacy.d.ts +2 -2
- package/components/island-legacy/header-legacy.d.ts +2 -2
- package/components/island-legacy/island-legacy.d.ts +2 -2
- package/components/link/clickableLink.d.ts +1 -1
- package/components/link/link.d.ts +8 -8
- package/components/list/list.d.ts +6 -6
- package/components/list/list__custom.d.ts +1 -1
- package/components/list/list__hint.d.ts +2 -2
- package/components/list/list__item.d.ts +2 -2
- package/components/list/list__link.d.ts +2 -2
- package/components/list/list__separator.d.ts +2 -2
- package/components/list/list__title.d.ts +2 -2
- package/components/loader/loader.d.ts +2 -2
- package/components/loader-inline/loader-inline.d.ts +2 -2
- package/components/loader-screen/loader-screen.d.ts +2 -2
- package/components/login-dialog/login-dialog.d.ts +2 -2
- package/components/markdown/code.d.ts +2 -1
- package/components/markdown/heading.d.ts +2 -1
- package/components/markdown/link.d.ts +2 -1
- package/components/markdown/markdown.d.ts +2 -2
- package/components/message/message.d.ts +2 -2
- package/components/pager/pager.d.ts +5 -5
- package/components/panel/panel.d.ts +2 -2
- package/components/popup/popup.d.ts +2 -2
- package/components/popup-menu/popup-menu.d.ts +2 -2
- package/components/progress-bar/progress-bar.d.ts +2 -2
- package/components/query-assist/query-assist.d.ts +2 -2
- package/components/query-assist/query-assist__suggestions.d.ts +2 -1
- package/components/radio/radio.d.ts +1 -1
- package/components/radio/radio__item.d.ts +1 -1
- package/components/select/select.d.ts +4 -4
- package/components/select/select.js +1 -1
- package/components/select/select__filter.d.ts +2 -2
- package/components/select/select__popup.d.ts +7 -7
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/table/cell.d.ts +2 -2
- package/components/table/disable-hover-hoc.d.ts +2 -2
- package/components/table/header-cell.d.ts +2 -2
- package/components/table/header.d.ts +3 -3
- package/components/table/multitable.d.ts +2 -2
- package/components/table/row-with-focus-sensor.d.ts +1 -1
- package/components/table/row.d.ts +1 -1
- package/components/table/smart-table.d.ts +1 -1
- package/components/table/table.d.ts +4 -4
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-tab.d.ts +1 -1
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/dumb-tabs.d.ts +3 -3
- package/components/tabs/smart-tabs.d.ts +2 -2
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab.d.ts +2 -2
- package/components/tag/tag.d.ts +5 -5
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/text/text.d.ts +2 -2
- package/components/toggle/toggle.d.ts +2 -2
- package/components/tooltip/tooltip.d.ts +1 -1
- package/components/user-agreement/user-agreement.d.ts +2 -2
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +3 -3
- package/components/user-card/tooltip.d.ts +3 -3
- package/dist/_helpers/anchor.js +1 -1
- package/dist/_helpers/badge.js +1 -1
- package/dist/_helpers/button-group.js +1 -1
- package/dist/_helpers/button-set.js +1 -1
- package/dist/_helpers/button-toolbar.js +1 -1
- package/dist/_helpers/button__classes.js +1 -1
- package/dist/_helpers/card.js +1 -1
- package/dist/_helpers/checkbox.js +1 -1
- package/dist/_helpers/date-picker.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +1 -1
- package/dist/_helpers/error-message.js +1 -1
- package/dist/_helpers/footer.js +1 -1
- package/dist/_helpers/grid.js +1 -1
- package/dist/_helpers/group.js +1 -1
- package/dist/_helpers/header.js +1 -1
- package/dist/_helpers/icon.js +1 -1
- package/dist/_helpers/input.js +1 -1
- package/dist/_helpers/island.js +1 -1
- package/dist/_helpers/link.js +1 -1
- package/dist/_helpers/list.js +1 -1
- package/dist/_helpers/loader-inline.js +1 -1
- package/dist/_helpers/loader-screen.js +1 -1
- package/dist/_helpers/panel.js +1 -1
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/_helpers/radio.js +1 -1
- package/dist/_helpers/select__filter.js +1 -1
- package/dist/_helpers/services-link.js +1 -1
- package/dist/_helpers/sidebar.js +1 -1
- package/dist/_helpers/table.js +1 -1
- package/dist/_helpers/tabs.js +1 -1
- package/dist/_helpers/theme.js +1 -1
- package/dist/_helpers/title.js +1 -1
- package/dist/alert/alert.d.ts +1 -1
- package/dist/alert/alert.js +1 -1
- package/dist/alert/container.js +1 -1
- package/dist/alert-service/alert-service.d.ts +2 -2
- package/dist/auth/down-notification.js +1 -1
- package/dist/auth/iframe-flow.js +1 -1
- package/dist/auth/landing.js +3 -3
- package/dist/auth-dialog/auth-dialog.d.ts +2 -2
- package/dist/auth-dialog/auth-dialog.js +1 -1
- package/dist/avatar/avatar.d.ts +2 -2
- package/dist/avatar/avatar.js +1 -1
- package/dist/avatar/fallback-avatar.d.ts +2 -1
- package/dist/avatar-editor-ng/avatar-editor-ng.js +2 -2
- package/dist/badge/badge.d.ts +2 -2
- package/dist/breadcrumb-ng/breadcrumb-ng.js +3 -3
- package/dist/button/button.d.ts +1 -1
- package/dist/button-group/button-group.d.ts +2 -2
- package/dist/button-group/caption.d.ts +2 -2
- package/dist/button-ng/button-ng.js +3 -3
- package/dist/button-set/button-set.d.ts +2 -2
- package/dist/button-toolbar/button-toolbar.d.ts +2 -2
- package/dist/checkbox/checkbox.d.ts +2 -2
- package/dist/code/code.d.ts +1 -1
- package/dist/code/code.js +1 -1
- package/dist/confirm/confirm.d.ts +1 -1
- package/dist/confirm/confirm.js +1 -1
- package/dist/confirm-ng/confirm-ng.js +2 -2
- package/dist/content-layout/content-layout.d.ts +2 -2
- package/dist/content-layout/sidebar.d.ts +2 -2
- package/dist/contenteditable/contenteditable.d.ts +3 -3
- package/dist/data-list/data-list.d.ts +3 -3
- package/dist/data-list/data-list.mock.d.ts +2 -2
- package/dist/data-list/item.d.ts +3 -3
- package/dist/data-list/title.d.ts +1 -1
- package/dist/date-picker/consts.d.ts +5 -5
- package/dist/date-picker/date-input.d.ts +3 -12
- package/dist/date-picker/date-input.js +11 -17
- package/dist/date-picker/date-picker.d.ts +8 -6
- package/dist/date-picker/date-picker.js +15 -18
- package/dist/date-picker/date-popup.d.ts +1 -1
- package/dist/date-picker/date-popup.js +1 -1
- package/dist/date-picker/day.d.ts +2 -2
- package/dist/date-picker/month-names.d.ts +2 -1
- package/dist/date-picker/month-slider.d.ts +2 -2
- package/dist/date-picker/month.d.ts +2 -1
- package/dist/date-picker/months.d.ts +2 -1
- package/dist/date-picker/weekdays.d.ts +2 -1
- package/dist/date-picker/years.d.ts +2 -2
- package/dist/dialog-ng/dialog-ng.js +9 -9
- package/dist/docked-panel-ng/docked-panel-ng.js +1 -1
- package/dist/dropdown/anchor.d.ts +1 -1
- package/dist/dropdown/dropdown.d.ts +8 -1
- package/dist/editable-heading/editable-heading.d.ts +2 -2
- package/dist/error-bubble/error-bubble.d.ts +2 -2
- package/dist/error-bubble/error-bubble.js +1 -1
- package/dist/error-message/error-message.d.ts +2 -2
- package/dist/error-message-ng/error-message-ng.js +2 -2
- package/dist/form-ng/form-ng.js +2 -2
- package/dist/global/create-stateful-context.d.ts +1 -1
- package/dist/global/react-dom-renderer.d.ts +2 -2
- package/dist/grid/col.d.ts +2 -2
- package/dist/grid/grid.d.ts +2 -2
- package/dist/grid/row.d.ts +2 -2
- package/dist/group/group.d.ts +2 -2
- package/dist/header/header.d.ts +2 -2
- package/dist/header/logo.d.ts +2 -2
- package/dist/header/profile.d.ts +1 -1
- package/dist/header/services-link.d.ts +2 -2
- package/dist/header/services.d.ts +2 -2
- package/dist/header/smart-profile.d.ts +2 -2
- package/dist/header/smart-services.d.ts +2 -2
- package/dist/header/tray-icon.d.ts +2 -2
- package/dist/header/tray.d.ts +2 -2
- package/dist/heading/heading.js +1 -1
- package/dist/icon/icon.d.ts +2 -2
- package/dist/icon/icon__svg.d.ts +1 -1
- package/dist/input/input-label.d.ts +2 -2
- package/dist/input/input.d.ts +1 -1
- package/dist/input-ng/input-ng.js +2 -2
- package/dist/island/adaptive-island-hoc.d.ts +2 -2
- package/dist/island/content.d.ts +1 -1
- package/dist/island/header.d.ts +2 -2
- package/dist/island/island.d.ts +3 -3
- package/dist/island-legacy/content-legacy.d.ts +2 -2
- package/dist/island-legacy/header-legacy.d.ts +2 -2
- package/dist/island-legacy/island-legacy.d.ts +2 -2
- package/dist/link/clickableLink.d.ts +1 -1
- package/dist/link/link.d.ts +8 -8
- package/dist/link/link.js +1 -1
- package/dist/link-ng/link-ng.js +2 -2
- package/dist/list/list.d.ts +6 -6
- package/dist/list/list__custom.d.ts +1 -1
- package/dist/list/list__hint.d.ts +2 -2
- package/dist/list/list__item.d.ts +2 -2
- package/dist/list/list__link.d.ts +2 -2
- package/dist/list/list__separator.d.ts +2 -2
- package/dist/list/list__title.d.ts +2 -2
- package/dist/loader/loader.d.ts +2 -2
- package/dist/loader/loader__core.js +1 -1
- package/dist/loader-inline/loader-inline.d.ts +2 -2
- package/dist/loader-screen/loader-screen.d.ts +2 -2
- package/dist/login-dialog/login-dialog.d.ts +2 -2
- package/dist/login-dialog/login-dialog.js +1 -1
- package/dist/markdown/code.d.ts +2 -1
- package/dist/markdown/heading.d.ts +2 -1
- package/dist/markdown/link.d.ts +2 -1
- package/dist/markdown/markdown.d.ts +2 -2
- package/dist/markdown/markdown.js +1 -1
- package/dist/message/message.d.ts +2 -2
- package/dist/message/message.js +1 -1
- package/dist/message-bundle-ng/message-bundle-ng.js +2 -2
- package/dist/old-browsers-message/white-list.js +2 -2
- package/dist/pager/pager.d.ts +5 -5
- package/dist/pager/pager.js +1 -1
- package/dist/panel/panel.d.ts +2 -2
- package/dist/popup/popup.d.ts +2 -2
- package/dist/popup/popup.js +1 -1
- package/dist/popup-menu/popup-menu.d.ts +2 -2
- package/dist/progress-bar/progress-bar.d.ts +2 -2
- package/dist/progress-bar/progress-bar.js +1 -1
- package/dist/query-assist/query-assist.d.ts +2 -2
- package/dist/query-assist/query-assist.js +4 -4
- package/dist/query-assist/query-assist__suggestions.d.ts +2 -1
- package/dist/radio/radio.d.ts +1 -1
- package/dist/radio/radio__item.d.ts +1 -1
- package/dist/save-field-ng/save-field-ng.js +5 -5
- package/dist/select/select.d.ts +4 -4
- package/dist/select/select.js +3 -3
- package/dist/select/select__filter.d.ts +2 -2
- package/dist/select/select__popup.d.ts +7 -7
- package/dist/select/select__popup.js +4 -4
- package/dist/select-ng/select-ng.js +2 -2
- package/dist/shortcuts/core.js +2 -2
- package/dist/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/dist/shortcuts/shortcuts.js +6 -6
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +3 -3
- package/dist/shortcuts-ng/shortcuts-ng.js +24 -24
- package/dist/sidebar-ng/sidebar-ng.js +2 -2
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.d.ts +1 -1
- package/dist/tab-trap/tab-trap.js +1 -1
- package/dist/table/cell.d.ts +2 -2
- package/dist/table/disable-hover-hoc.d.ts +2 -2
- package/dist/table/header-cell.d.ts +2 -2
- package/dist/table/header.d.ts +3 -3
- package/dist/table/multitable.d.ts +2 -2
- package/dist/table/row-with-focus-sensor.d.ts +1 -1
- package/dist/table/row.d.ts +1 -1
- package/dist/table/smart-table.d.ts +1 -1
- package/dist/table/table.d.ts +4 -4
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +2 -2
- package/dist/tabs/collapsible-more.d.ts +3 -3
- package/dist/tabs/collapsible-more.js +5 -5
- package/dist/tabs/collapsible-tab.d.ts +1 -1
- package/dist/tabs/collapsible-tabs.d.ts +2 -2
- package/dist/tabs/dumb-tabs.d.ts +3 -3
- package/dist/tabs/smart-tabs.d.ts +2 -2
- package/dist/tabs/tab-link.d.ts +1 -1
- package/dist/tabs/tab.d.ts +2 -2
- package/dist/tag/tag.d.ts +5 -5
- package/dist/tag/tag.js +1 -1
- package/dist/tags-input/tags-input.d.ts +1 -1
- package/dist/tags-input/tags-input.js +1 -1
- package/dist/tags-list/tags-list.d.ts +2 -2
- package/dist/text/text.d.ts +2 -2
- package/dist/text/text.js +1 -1
- package/dist/toggle/toggle.d.ts +2 -2
- package/dist/toggle/toggle.js +1 -1
- package/dist/tooltip/tooltip.d.ts +1 -1
- package/dist/tooltip/tooltip.js +1 -1
- package/dist/user-agreement/service.js +7 -7
- package/dist/user-agreement/user-agreement.d.ts +2 -2
- package/dist/user-agreement/user-agreement.js +4 -4
- package/dist/user-card/card.d.ts +1 -1
- package/dist/user-card/smart-user-card-tooltip.d.ts +3 -3
- package/dist/user-card/smart-user-card-tooltip.js +28 -28
- package/dist/user-card/tooltip.d.ts +3 -3
- package/dist/user-card-ng/user-card-ng.js +4 -4
- package/package.json +43 -43
|
@@ -38,7 +38,7 @@ import '../link/clickableLink.js';
|
|
|
38
38
|
import '../global/controls-height.js';
|
|
39
39
|
import '../_helpers/button__classes.js';
|
|
40
40
|
|
|
41
|
-
var modules_ae521deb = {"unit":"i__const_unit_0","light":"
|
|
41
|
+
var modules_ae521deb = {"unit":"i__const_unit_0","light":"light_rui_2ac4","dialog":"dialog_rui_159b","content":"content_rui_159b font_rui_8bff","button":"button_rui_159b","firstButton":"firstButton_rui_159b button_rui_159b","title":"title_rui_159b","logo":"logo_rui_159b","error":"error_rui_159b"};
|
|
42
42
|
|
|
43
43
|
class AuthDialog extends Component {
|
|
44
44
|
static propTypes = {
|
package/dist/avatar/avatar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, ImgHTMLAttributes } from 'react';
|
|
1
|
+
import React, { PureComponent, ImgHTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
/**
|
|
4
4
|
* @name Avatar
|
|
@@ -47,6 +47,6 @@ export default class Avatar extends PureComponent<AvatarProps> {
|
|
|
47
47
|
};
|
|
48
48
|
handleError: () => void;
|
|
49
49
|
handleSuccess: () => void;
|
|
50
|
-
render(): JSX.Element;
|
|
50
|
+
render(): React.JSX.Element;
|
|
51
51
|
}
|
|
52
52
|
export type AvatarAttrs = JSX.LibraryManagedAttributes<typeof Avatar, AvatarProps>;
|
package/dist/avatar/avatar.js
CHANGED
|
@@ -7,7 +7,7 @@ import { getPixelRatio } from '../global/dom.js';
|
|
|
7
7
|
import FallbackAvatar from './fallback-avatar.js';
|
|
8
8
|
import '../global/get-uid.js';
|
|
9
9
|
|
|
10
|
-
var modules_61ca8c75 = {"light":"
|
|
10
|
+
var modules_61ca8c75 = {"light":"light_rui_2ac4","avatar":"avatar_rui_a03e","subavatar":"subavatar_rui_a03e","empty":"empty_rui_a03e"};
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* @name Avatar
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import PropTypes from 'prop-types';
|
|
2
3
|
import { Size } from './avatar';
|
|
3
4
|
export interface FallbackAvatarProps {
|
|
@@ -5,7 +6,7 @@ export interface FallbackAvatarProps {
|
|
|
5
6
|
size: Size;
|
|
6
7
|
round: boolean | null | undefined;
|
|
7
8
|
}
|
|
8
|
-
declare function FallbackAvatar({ username, size, round }: FallbackAvatarProps): JSX.Element;
|
|
9
|
+
declare function FallbackAvatar({ username, size, round }: FallbackAvatarProps): React.JSX.Element;
|
|
9
10
|
declare namespace FallbackAvatar {
|
|
10
11
|
var propTypes: {
|
|
11
12
|
username: PropTypes.Validator<string>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
import pencilIcon from '@jetbrains/icons/pencil';
|
|
3
|
-
import
|
|
3
|
+
import MessageBundle from '../message-bundle-ng/message-bundle-ng.js';
|
|
4
4
|
import alertService from '../alert-service/alert-service.js';
|
|
5
5
|
import IconNG from '../icon-ng/icon-ng.js';
|
|
6
6
|
import template from './avatar-editor-ng__template.js';
|
|
@@ -47,7 +47,7 @@ import '../alert/container.js';
|
|
|
47
47
|
import '../template-ng/template-ng.js';
|
|
48
48
|
import '../global/ring-angular-component.js';
|
|
49
49
|
|
|
50
|
-
const angularModule = angular.module('Ring.avatar-editor', [
|
|
50
|
+
const angularModule = angular.module('Ring.avatar-editor', [MessageBundle, IconNG]);
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* @name Avatar Editor Ng
|
package/dist/badge/badge.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface BadgeProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
gray?: boolean | null | undefined;
|
|
@@ -20,5 +20,5 @@ export default class Badge extends PureComponent<BadgeProps> {
|
|
|
20
20
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
21
21
|
'data-test': PropTypes.Requireable<string>;
|
|
22
22
|
};
|
|
23
|
-
render(): JSX.Element;
|
|
23
|
+
render(): React.JSX.Element;
|
|
24
24
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
import chevronRightIcon from '@jetbrains/icons/chevron-right';
|
|
3
|
-
import
|
|
3
|
+
import LinkNG from '../link-ng/link-ng.js';
|
|
4
4
|
import IconNG from '../icon-ng/icon-ng.js';
|
|
5
5
|
import '../_helpers/link.js';
|
|
6
6
|
import '../icon/icon__constants.js';
|
|
@@ -8,13 +8,13 @@ import '../template-ng/template-ng.js';
|
|
|
8
8
|
import '../global/ring-angular-component.js';
|
|
9
9
|
import '../_helpers/icon.js';
|
|
10
10
|
|
|
11
|
-
var modules_2c17c81e = {"unit":"i__const_unit_0","light":"
|
|
11
|
+
var modules_2c17c81e = {"unit":"i__const_unit_0","light":"light_rui_2ac4","breadcrumb":"breadcrumb_rui_91a4","header":"header_rui_91a4","breadcrumbSmall":"breadcrumbSmall_rui_91a4","breadcrumbElement":"breadcrumbElement_rui_91a4","active":"active_rui_91a4","elementDescription":"elementDescription_rui_91a4","separatorIcon":"separatorIcon_rui_91a4"};
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @name Breadcrumb Ng
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
const angularModule = angular.module('Ring.breadcrumb', [
|
|
17
|
+
const angularModule = angular.module('Ring.breadcrumb', [LinkNG, IconNG]);
|
|
18
18
|
angularModule.filter('breadcrumbNgChevronIcon', () => () => chevronRightIcon);
|
|
19
19
|
angularModule.directive('rgBreadcrumb', function rgBreadcrumbDirective() {
|
|
20
20
|
return {
|
package/dist/button/button.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export declare class Button extends PureComponent<ButtonProps> {
|
|
|
59
59
|
static contextType: React.Context<ControlsHeight>;
|
|
60
60
|
context: React.ContextType<typeof ControlsHeightContext>;
|
|
61
61
|
buttonRef: React.RefObject<HTMLButtonElement>;
|
|
62
|
-
render(): JSX.Element;
|
|
62
|
+
render(): React.JSX.Element;
|
|
63
63
|
}
|
|
64
64
|
export { Size as IconSize };
|
|
65
65
|
export type ContainerProps<T extends ButtonProps> = JSX.LibraryManagedAttributes<typeof Button, T>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Caption from './caption';
|
|
4
4
|
export interface ButtonGroupProps extends HTMLAttributes<HTMLElement> {
|
|
@@ -13,6 +13,6 @@ export default class ButtonGroup extends PureComponent<ButtonGroupProps> {
|
|
|
13
13
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
14
14
|
className: PropTypes.Requireable<string>;
|
|
15
15
|
};
|
|
16
|
-
render(): JSX.Element;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
17
|
}
|
|
18
18
|
export { Caption };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PureComponent, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export default class Caption extends PureComponent<HTMLAttributes<HTMLElement>> {
|
|
4
4
|
static propTypes: {
|
|
5
5
|
className: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
6
6
|
};
|
|
7
|
-
render(): JSX.Element;
|
|
7
|
+
render(): React.JSX.Element;
|
|
8
8
|
}
|
|
@@ -10,7 +10,7 @@ import '../template-ng/template-ng.js';
|
|
|
10
10
|
import '../_helpers/icon.js';
|
|
11
11
|
import 'react';
|
|
12
12
|
|
|
13
|
-
var modules_5f65bc62 = {"light":"
|
|
13
|
+
var modules_5f65bc62 = {"light":"light_rui_2ac4","ringIconDefaultColor":"ringIconDefaultColor_rui_c440","iconMarginFix":"iconMarginFix_rui_c440","transcludeSpacer":"transcludeSpacer_rui_c440","buttonWithoutIcon":"buttonWithoutIcon_rui_c440","iconNg":"iconNg_rui_c440","narrowRight":"narrowRight_rui_c440"};
|
|
14
14
|
|
|
15
15
|
const {
|
|
16
16
|
ringIconDefaultColor,
|
|
@@ -174,6 +174,6 @@ function createButtonDirective(tagName) {
|
|
|
174
174
|
}
|
|
175
175
|
angularModule.directive('rgButton', createButtonDirective('button'));
|
|
176
176
|
angularModule.directive('rgButtonLink', createButtonDirective('a'));
|
|
177
|
-
var
|
|
177
|
+
var ButtonNG = angularModule.name;
|
|
178
178
|
|
|
179
|
-
export { LOADER_BACKGROUND_SELECTOR,
|
|
179
|
+
export { LOADER_BACKGROUND_SELECTOR, ButtonNG as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface ButtonSetProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
'data-test'?: string | null | undefined;
|
|
@@ -12,5 +12,5 @@ export default class ButtonSet extends PureComponent<ButtonSetProps> {
|
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
13
13
|
'data-test': PropTypes.Requireable<string>;
|
|
14
14
|
};
|
|
15
|
-
render(): JSX.Element;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { PureComponent, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface ButtonToolbarProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
'data-test'?: string | null | undefined;
|
|
@@ -12,5 +12,5 @@ export default class ButtonToolbar extends PureComponent<ButtonToolbarProps> {
|
|
|
12
12
|
className: PropTypes.Requireable<string>;
|
|
13
13
|
'data-test': PropTypes.Requireable<string>;
|
|
14
14
|
};
|
|
15
|
-
render(): JSX.Element;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
16
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, InputHTMLAttributes, CSSProperties, Ref } from 'react';
|
|
1
|
+
import React, { PureComponent, InputHTMLAttributes, CSSProperties, Ref } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface CheckboxProps extends InputHTMLAttributes<HTMLInputElement> {
|
|
4
4
|
label?: string | null | undefined;
|
|
@@ -41,5 +41,5 @@ export default class Checkbox extends PureComponent<CheckboxProps> {
|
|
|
41
41
|
componentDidUpdate(prevProps: CheckboxProps): void;
|
|
42
42
|
input?: HTMLInputElement | null;
|
|
43
43
|
inputRef: (el: HTMLInputElement | null) => void;
|
|
44
|
-
render(): JSX.Element;
|
|
44
|
+
render(): React.JSX.Element;
|
|
45
45
|
}
|
package/dist/code/code.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export default class Code extends PureComponent<CodeProps> {
|
|
|
37
37
|
highlight(): Promise<void>;
|
|
38
38
|
get codeRef(): HTMLElement | null | undefined;
|
|
39
39
|
get initCodeRef(): React.RefObject<HTMLElement> | ((ref: HTMLElement | null) => void);
|
|
40
|
-
render(): JSX.Element;
|
|
40
|
+
render(): React.JSX.Element;
|
|
41
41
|
}
|
|
42
42
|
declare const code: (strings: TemplateStringsArray, ...interpolations: unknown[]) => void;
|
|
43
43
|
export { code, highlight };
|
package/dist/code/code.js
CHANGED
|
@@ -7,7 +7,7 @@ import normalizeIndent from '../global/normalize-indent.js';
|
|
|
7
7
|
import trivialTemplateTag from '../global/trivial-template-tag.js';
|
|
8
8
|
import memoize from '../global/memoize.js';
|
|
9
9
|
|
|
10
|
-
var modules_66c414ea = {"unit":"i__const_unit_0","light":"
|
|
10
|
+
var modules_66c414ea = {"unit":"i__const_unit_0","light":"light_rui_2ac4","code":"code_rui_7185","inline":"inline_rui_7185","softWrap":"softWrap_rui_7185"};
|
|
11
11
|
|
|
12
12
|
var modules_39cf09e8 = {"highlightContainer":"highlightContainer_rui_6e02"};
|
|
13
13
|
|
|
@@ -43,6 +43,6 @@ export default class Confirm extends PureComponent<ConfirmProps> {
|
|
|
43
43
|
onReject: () => void;
|
|
44
44
|
};
|
|
45
45
|
onEscPress: () => void;
|
|
46
|
-
render(): JSX.Element;
|
|
46
|
+
render(): React.JSX.Element;
|
|
47
47
|
}
|
|
48
48
|
export type ConfirmAttributes = JSX.LibraryManagedAttributes<typeof Confirm, ConfirmProps>;
|
package/dist/confirm/confirm.js
CHANGED
|
@@ -39,7 +39,7 @@ import '../global/controls-height.js';
|
|
|
39
39
|
import '../_helpers/button__classes.js';
|
|
40
40
|
import '../_helpers/panel.js';
|
|
41
41
|
|
|
42
|
-
var modules_4c9c3a3a = {"unit":"i__const_unit_0","light":"
|
|
42
|
+
var modules_4c9c3a3a = {"unit":"i__const_unit_0","light":"light_rui_2ac4","description":"description_rui_2cda"};
|
|
43
43
|
|
|
44
44
|
/**
|
|
45
45
|
* @name Confirm
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
import confirm from '../confirm-service/confirm-service.js';
|
|
3
|
-
import
|
|
3
|
+
import MessageBundle from '../message-bundle-ng/message-bundle-ng.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../global/react-render-adapter.js';
|
|
6
6
|
import 'react-dom';
|
|
@@ -48,7 +48,7 @@ import '../_helpers/panel.js';
|
|
|
48
48
|
* @name Confirm Ng
|
|
49
49
|
*/
|
|
50
50
|
|
|
51
|
-
const angularModule = angular.module('Ring.confirm', [
|
|
51
|
+
const angularModule = angular.module('Ring.confirm', [MessageBundle]);
|
|
52
52
|
angularModule.service('confirm', ["$q", "RingMessageBundle", function service($q, RingMessageBundle) {
|
|
53
53
|
return function showConfirm(message, description, actionTitle, cancelTitle, cancelIsDefault, actionFn) {
|
|
54
54
|
return $q.when(confirm({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { Component, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
export interface ContentLayoutProps extends HTMLAttributes<HTMLElement> {
|
|
4
4
|
responsive: boolean;
|
|
@@ -21,6 +21,6 @@ export default class ContentLayout extends Component<ContentLayoutProps> {
|
|
|
21
21
|
contentNode: null;
|
|
22
22
|
};
|
|
23
23
|
saveContentNode: (contentNode: HTMLElement | null) => void;
|
|
24
|
-
render(): JSX.Element;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
25
|
}
|
|
26
26
|
export { default as Sidebar } from './sidebar';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, HTMLAttributes } from 'react';
|
|
1
|
+
import React, { Component, HTMLAttributes } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import { Waypoint } from 'react-waypoint';
|
|
4
4
|
export interface SidebarProps extends HTMLAttributes<HTMLElement> {
|
|
@@ -27,5 +27,5 @@ export default class Sidebar extends Component<SidebarProps> {
|
|
|
27
27
|
shouldUseFixation(): boolean;
|
|
28
28
|
shouldFixateBottom(): boolean;
|
|
29
29
|
sidebarRef: (node: HTMLElement | null) => void;
|
|
30
|
-
render(): JSX.Element;
|
|
30
|
+
render(): React.JSX.Element;
|
|
31
31
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, HTMLAttributes, Ref } from 'react';
|
|
1
|
+
import React, { Component, HTMLAttributes, Ref } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
/**
|
|
4
4
|
* @name ContentEditable
|
|
@@ -28,12 +28,12 @@ declare class ContentEditableBase extends Component<ContentEditableBaseProps> {
|
|
|
28
28
|
};
|
|
29
29
|
shouldComponentUpdate(nextProps: ContentEditableBaseProps): boolean;
|
|
30
30
|
componentDidUpdate(prevProps: ContentEditableBaseProps): void;
|
|
31
|
-
render(): JSX.Element;
|
|
31
|
+
render(): React.JSX.Element;
|
|
32
32
|
}
|
|
33
33
|
type ContentEditableBaseAttrs = JSX.LibraryManagedAttributes<typeof ContentEditableBase, ContentEditableBaseProps>;
|
|
34
34
|
export type ContentEditableProps = Omit<ContentEditableBaseAttrs, '__html'>;
|
|
35
35
|
declare const ContentEditable: {
|
|
36
|
-
({ children, ...props }: ContentEditableProps): JSX.Element;
|
|
36
|
+
({ children, ...props }: ContentEditableProps): React.JSX.Element;
|
|
37
37
|
propTypes: {
|
|
38
38
|
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
|
39
39
|
disabled: PropTypes.Requireable<boolean>;
|
|
@@ -30,7 +30,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
30
30
|
componentWillUnmount(): void;
|
|
31
31
|
onMouseMove: () => void;
|
|
32
32
|
onKeyDown: (e: KeyboardEvent) => void;
|
|
33
|
-
render(): JSX.Element;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
34
|
context: unknown;
|
|
35
35
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
36
36
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -57,7 +57,7 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
57
57
|
componentWillUnmount(): void;
|
|
58
58
|
onMouseMove: () => void;
|
|
59
59
|
onKeyDown: (e: KeyboardEvent) => void;
|
|
60
|
-
render(): JSX.Element;
|
|
60
|
+
render(): React.JSX.Element;
|
|
61
61
|
context: unknown;
|
|
62
62
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<import("../table/disable-hover-hoc").DisableHoverProps<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
63
63
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -80,6 +80,6 @@ export default class DataListContainer<T extends SelectionItem> extends Componen
|
|
|
80
80
|
defaultProps: Partial<import("../table/selection-shortcuts-hoc").SelectionShortcutsProps<T, FocusableProps<T>>> | undefined;
|
|
81
81
|
contextType?: React.Context<any> | undefined;
|
|
82
82
|
};
|
|
83
|
-
render(): JSX.Element;
|
|
83
|
+
render(): React.JSX.Element;
|
|
84
84
|
}
|
|
85
85
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { SelectionItem } from '../table/selection';
|
|
3
3
|
export interface Item extends SelectionItem {
|
|
4
4
|
title: ReactNode;
|
|
@@ -11,6 +11,6 @@ export declare const moreItems: {
|
|
|
11
11
|
id: number;
|
|
12
12
|
selectable: boolean;
|
|
13
13
|
collapsible: boolean;
|
|
14
|
-
title: JSX.Element;
|
|
14
|
+
title: React.JSX.Element;
|
|
15
15
|
}[];
|
|
16
16
|
export default items;
|
package/dist/data-list/item.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent, ReactNode } from 'react';
|
|
1
|
+
import React, { PureComponent, ReactNode } from 'react';
|
|
2
2
|
import Selection, { SelectionItem } from '../table/selection';
|
|
3
3
|
export declare enum moreLessButtonStates {
|
|
4
4
|
UNUSED = 0,
|
|
@@ -45,6 +45,6 @@ export default class Item<T extends SelectionItem> extends PureComponent<ItemPro
|
|
|
45
45
|
onShowLess: () => void;
|
|
46
46
|
onFocus: () => void;
|
|
47
47
|
onSelect: (selected: boolean) => void;
|
|
48
|
-
renderItem: (model: T, parentShift: number) => JSX.Element;
|
|
49
|
-
render(): JSX.Element;
|
|
48
|
+
renderItem: (model: T, parentShift: number) => React.JSX.Element;
|
|
49
|
+
render(): React.JSX.Element;
|
|
50
50
|
}
|
|
@@ -20,7 +20,7 @@ declare class Title extends PureComponent<TitleProps> {
|
|
|
20
20
|
onCheckboxFocus: () => void;
|
|
21
21
|
onCheckboxChange: () => void;
|
|
22
22
|
toggleSelection(): void;
|
|
23
|
-
render(): JSX.Element;
|
|
23
|
+
render(): React.JSX.Element;
|
|
24
24
|
}
|
|
25
25
|
declare const _default: React.ComponentType<import("../global/focus-sensor-hoc").FocusSensorProps<TitleProps, HTMLDivElement, typeof Title>>;
|
|
26
26
|
export default _default;
|
|
@@ -27,10 +27,10 @@ export declare const HALF = 0.5;
|
|
|
27
27
|
export declare const dateType: PropTypes.Requireable<NonNullable<string | number | Date | null | undefined>>;
|
|
28
28
|
export declare function parseTime(time: string): string | null;
|
|
29
29
|
export interface DateInputTranslations {
|
|
30
|
-
addFirstDate
|
|
31
|
-
addSecondDate
|
|
32
|
-
addTime
|
|
33
|
-
selectName
|
|
30
|
+
addFirstDate?: string;
|
|
31
|
+
addSecondDate?: string;
|
|
32
|
+
addTime?: string;
|
|
33
|
+
selectName?: string;
|
|
34
34
|
}
|
|
35
35
|
export interface DateSpecificPopupProps {
|
|
36
36
|
withTime?: false | undefined;
|
|
@@ -66,7 +66,7 @@ export interface DatePopupBaseProps {
|
|
|
66
66
|
to?: Date | number | string | null | undefined;
|
|
67
67
|
minDate?: string | null | undefined;
|
|
68
68
|
maxDate?: string | null | undefined;
|
|
69
|
-
translations
|
|
69
|
+
translations?: DateInputTranslations | null | undefined;
|
|
70
70
|
fromPlaceholder?: string | null | undefined;
|
|
71
71
|
toPlaceholder?: string | null | undefined;
|
|
72
72
|
timePlaceholder?: string | null | undefined;
|
|
@@ -36,22 +36,13 @@ export default class DateInput extends React.PureComponent<DateInputProps> {
|
|
|
36
36
|
onClear: PropTypes.Requireable<(...args: any[]) => any>;
|
|
37
37
|
locale: PropTypes.Requireable<object>;
|
|
38
38
|
};
|
|
39
|
-
static defaultProps: {
|
|
40
|
-
fromPlaceholder: null;
|
|
41
|
-
toPlaceholder: null;
|
|
42
|
-
timePlaceholder: null;
|
|
43
|
-
translations: {
|
|
44
|
-
addFirstDate: string;
|
|
45
|
-
addSecondDate: string;
|
|
46
|
-
addTime: string;
|
|
47
|
-
selectName: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
39
|
componentDidUpdate(prevProps: DateInputProps): void;
|
|
40
|
+
static contextType: React.Context<import("../i18n/i18n-context").I18nContextProps>;
|
|
41
|
+
context: React.ContextType<typeof DateInput.contextType>;
|
|
51
42
|
input?: HTMLInputElement | null;
|
|
52
43
|
inputRef: (el: HTMLInputElement | null) => void;
|
|
53
44
|
updateInput({ text, active }: UpdateInputConfig): void;
|
|
54
45
|
handleChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
55
46
|
handleKeyDown: (e: React.KeyboardEvent) => false | void;
|
|
56
|
-
render(): JSX.Element;
|
|
47
|
+
render(): React.JSX.Element;
|
|
57
48
|
}
|
|
@@ -3,6 +3,7 @@ import classNames from 'classnames';
|
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import { Input } from '../input/input.js';
|
|
5
5
|
import { ControlsHeight } from '../global/controls-height.js';
|
|
6
|
+
import { I18nContext } from '../i18n/i18n-context.js';
|
|
6
7
|
import { dateType } from './consts.js';
|
|
7
8
|
import { m as modules_0c7b7d96 } from '../_helpers/date-picker.js';
|
|
8
9
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
@@ -19,11 +20,10 @@ import '../global/memoize.js';
|
|
|
19
20
|
import '../link/clickableLink.js';
|
|
20
21
|
import '../_helpers/button__classes.js';
|
|
21
22
|
import '../global/get-uid.js';
|
|
22
|
-
import '../i18n/i18n-context.js';
|
|
23
|
-
import '../i18n/i18n.js';
|
|
24
23
|
import '../global/composeRefs.js';
|
|
25
24
|
import '../_helpers/input.js';
|
|
26
25
|
import '../input/input-label.js';
|
|
26
|
+
import '../i18n/i18n.js';
|
|
27
27
|
import 'date-fns/add';
|
|
28
28
|
|
|
29
29
|
class DateInput extends React.PureComponent {
|
|
@@ -47,17 +47,6 @@ class DateInput extends React.PureComponent {
|
|
|
47
47
|
onClear: PropTypes.func,
|
|
48
48
|
locale: PropTypes.object
|
|
49
49
|
};
|
|
50
|
-
static defaultProps = {
|
|
51
|
-
fromPlaceholder: null,
|
|
52
|
-
toPlaceholder: null,
|
|
53
|
-
timePlaceholder: null,
|
|
54
|
-
translations: {
|
|
55
|
-
addFirstDate: 'Add first date',
|
|
56
|
-
addSecondDate: 'Add second date',
|
|
57
|
-
addTime: 'Add time',
|
|
58
|
-
selectName: 'Select %name%'
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
50
|
componentDidUpdate(prevProps) {
|
|
62
51
|
const {
|
|
63
52
|
hidden,
|
|
@@ -71,6 +60,7 @@ class DateInput extends React.PureComponent {
|
|
|
71
60
|
});
|
|
72
61
|
}
|
|
73
62
|
}
|
|
63
|
+
static contextType = I18nContext;
|
|
74
64
|
input;
|
|
75
65
|
inputRef = el => {
|
|
76
66
|
this.input = el;
|
|
@@ -114,6 +104,9 @@ class DateInput extends React.PureComponent {
|
|
|
114
104
|
timePlaceholder,
|
|
115
105
|
locale
|
|
116
106
|
} = this.props;
|
|
107
|
+
const {
|
|
108
|
+
translate
|
|
109
|
+
} = this.context;
|
|
117
110
|
let displayText = '';
|
|
118
111
|
if (active && hoverDate) {
|
|
119
112
|
displayText = displayFormat(hoverDate, locale);
|
|
@@ -125,15 +118,16 @@ class DateInput extends React.PureComponent {
|
|
|
125
118
|
displayText = time || '';
|
|
126
119
|
}
|
|
127
120
|
const placeholder = (() => {
|
|
121
|
+
var _translations$addFirs, _translations$addSeco, _translations$addTime, _translations$selectN;
|
|
128
122
|
switch (name) {
|
|
129
123
|
case 'from':
|
|
130
|
-
return fromPlaceholder || translations
|
|
124
|
+
return fromPlaceholder || ((_translations$addFirs = translations?.addFirstDate) !== null && _translations$addFirs !== void 0 ? _translations$addFirs : translate('addFirstDate'));
|
|
131
125
|
case 'to':
|
|
132
|
-
return toPlaceholder || translations
|
|
126
|
+
return toPlaceholder || ((_translations$addSeco = translations?.addSecondDate) !== null && _translations$addSeco !== void 0 ? _translations$addSeco : translate('addSecondDate'));
|
|
133
127
|
case 'time':
|
|
134
|
-
return timePlaceholder || translations
|
|
128
|
+
return timePlaceholder || ((_translations$addTime = translations?.addTime) !== null && _translations$addTime !== void 0 ? _translations$addTime : translate('addTime'));
|
|
135
129
|
default:
|
|
136
|
-
return translations
|
|
130
|
+
return ((_translations$selectN = translations?.selectName) !== null && _translations$selectN !== void 0 ? _translations$selectN : translate('selectName')).replace('%name%', name).replace('{{name}}', name);
|
|
137
131
|
}
|
|
138
132
|
})();
|
|
139
133
|
const classes = classNames(modules_0c7b7d96.filter, modules_0c7b7d96[`${name}Input`], divider && modules_0c7b7d96[`${name}InputWithDivider`], 'ring-js-shortcuts');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PureComponent } from 'react';
|
|
1
|
+
import React, { PureComponent } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import type { Locale } from 'date-fns';
|
|
4
4
|
import Popup from '../popup/popup';
|
|
@@ -17,14 +17,14 @@ export type DatePickerProps = Omit<DatePopupProps, 'translations' | 'parseDateIn
|
|
|
17
17
|
inline: boolean;
|
|
18
18
|
popupClassName?: string | null | undefined;
|
|
19
19
|
dropdownProps?: DropdownAttrs;
|
|
20
|
-
translations
|
|
20
|
+
translations?: DatePickerTranslations | null | undefined;
|
|
21
21
|
displayMonthFormat: (date: Date, locale: Locale | undefined) => string;
|
|
22
22
|
displayDayFormat: (date: Date, locale: Locale | undefined) => string;
|
|
23
23
|
displayTimeFormat: (date: Date, locale: Locale | undefined) => string;
|
|
24
24
|
applyTimeInput: (date: Date, time: string | null | undefined) => Date;
|
|
25
|
-
datePlaceholder
|
|
26
|
-
dateTimePlaceholder
|
|
27
|
-
rangePlaceholder
|
|
25
|
+
datePlaceholder?: string;
|
|
26
|
+
dateTimePlaceholder?: string;
|
|
27
|
+
rangePlaceholder?: string;
|
|
28
28
|
disabled?: boolean | null | undefined;
|
|
29
29
|
parseDateInput: (input: string | null | undefined) => Date | null;
|
|
30
30
|
size?: Size;
|
|
@@ -62,6 +62,8 @@ export default class DatePicker extends PureComponent<DatePickerProps> {
|
|
|
62
62
|
size: PropTypes.Requireable<Size>;
|
|
63
63
|
};
|
|
64
64
|
static defaultProps: DatePickerProps;
|
|
65
|
+
static contextType: React.Context<import("../i18n/i18n-context").I18nContextProps>;
|
|
66
|
+
context: React.ContextType<typeof DatePicker.contextType>;
|
|
65
67
|
handleChange: (change: DatePickerChange | Date | null | undefined) => void;
|
|
66
68
|
clear: () => void;
|
|
67
69
|
popup?: Popup | null;
|
|
@@ -70,6 +72,6 @@ export default class DatePicker extends PureComponent<DatePickerProps> {
|
|
|
70
72
|
parse: (arg: string | number | Date | null | undefined) => Date | null;
|
|
71
73
|
formatTime(): string | null;
|
|
72
74
|
getAnchorText: () => string;
|
|
73
|
-
render(): JSX.Element;
|
|
75
|
+
render(): React.JSX.Element;
|
|
74
76
|
}
|
|
75
77
|
export type DatePickerAttrs = JSX.LibraryManagedAttributes<typeof DatePicker, DatePickerProps>;
|