@jetbrains/ring-ui-built 6.1.1-beta.0 → 7.0.0-beta.10
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/_helpers/_rollupPluginBabelHelpers.js +1 -504
- package/components/_helpers/anchor.js +7 -10
- package/components/_helpers/button__classes.js +23 -20
- package/components/_helpers/caption.js +11 -21
- package/components/_helpers/card.js +91 -123
- package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
- package/components/_helpers/header.js +1 -1
- package/components/_helpers/icon__svg.js +27 -29
- package/components/_helpers/input.js +151 -193
- package/components/_helpers/query-assist__suggestions.js +79 -94
- package/components/_helpers/select__filter.js +56 -75
- package/components/_helpers/services-link.js +23 -39
- package/components/_helpers/sidebar.js +91 -102
- package/components/_helpers/tab-link.js +8 -12
- package/components/_helpers/table.js +1 -1
- package/components/_helpers/theme.js +61 -51
- package/components/_helpers/title.js +59 -84
- package/components/alert/alert.d.ts +7 -24
- package/components/alert/alert.js +111 -179
- package/components/alert/container.d.ts +0 -5
- package/components/alert/container.js +32 -44
- package/components/alert-service/alert-service.js +104 -162
- package/components/analytics/analytics.js +12 -20
- package/components/analytics/analytics__custom-plugin.js +52 -68
- package/components/auth/auth.js +2 -31
- package/components/auth/auth__core.d.ts +1 -1
- package/components/auth/auth__core.js +754 -1440
- package/components/auth/background-flow.js +84 -121
- package/components/auth/down-notification.js +32 -79
- package/components/auth/iframe-flow.js +71 -125
- package/components/auth/request-builder.js +46 -77
- package/components/auth/response-parser.js +84 -112
- package/components/auth/storage.js +162 -324
- package/components/auth/token-validator.js +132 -227
- package/components/auth/window-flow.js +84 -121
- package/components/auth-dialog/auth-dialog.d.ts +0 -18
- package/components/auth-dialog/auth-dialog.js +107 -176
- package/components/auth-dialog-service/auth-dialog-service.js +12 -33
- package/components/avatar/avatar-example-datauri.js +1 -1
- package/components/avatar/avatar.d.ts +0 -13
- package/components/avatar/avatar.js +94 -136
- package/components/avatar/fallback-avatar.d.ts +1 -10
- package/components/avatar/fallback-avatar.js +20 -40
- package/components/badge/badge.d.ts +0 -10
- package/components/badge/badge.js +32 -48
- package/components/breadcrumbs/breadcrumbs.js +13 -17
- package/components/button/button.d.ts +0 -21
- package/components/button/button.js +68 -104
- package/components/button/button__classes.d.ts +1 -1
- package/components/button-group/button-group.d.ts +0 -5
- package/components/button-group/button-group.js +27 -41
- package/components/button-group/caption.d.ts +0 -4
- package/components/button-group/caption.js +0 -1
- package/components/button-set/button-set.d.ts +0 -6
- package/components/button-set/button-set.js +19 -33
- package/components/button-toolbar/button-toolbar.d.ts +0 -6
- package/components/button-toolbar/button-toolbar.js +17 -31
- package/components/caret/caret.js +184 -211
- package/components/checkbox/checkbox.d.ts +0 -19
- package/components/checkbox/checkbox.js +69 -104
- package/components/clipboard/clipboard-fallback.js +7 -7
- package/components/clipboard/clipboard.js +36 -129
- package/components/code/code.d.ts +0 -12
- package/components/code/code.js +83 -163
- package/components/collapse/collapse-content.js +42 -60
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +12 -12
- package/components/collapse/collapse.js +12 -17
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +1 -3
- package/components/confirm/confirm.d.ts +0 -14
- package/components/confirm/confirm.js +68 -112
- package/components/confirm-service/confirm-service.js +25 -47
- package/components/content-layout/content-layout.d.ts +0 -7
- package/components/content-layout/content-layout.js +41 -63
- package/components/content-layout/sidebar.d.ts +0 -9
- package/components/content-layout/sidebar.js +1 -2
- package/components/contenteditable/contenteditable.d.ts +1 -22
- package/components/contenteditable/contenteditable.js +37 -60
- package/components/control-help/control-help.js +5 -3
- package/components/control-label/control-label.js +9 -14
- package/components/data-list/data-list.d.ts +4 -6
- package/components/data-list/data-list.js +115 -179
- package/components/data-list/data-list.mock.js +3 -6
- package/components/data-list/item.js +119 -165
- package/components/data-list/selection.js +77 -135
- package/components/data-list/title.d.ts +2 -2
- package/components/data-list/title.js +2 -12
- package/components/date-picker/consts.d.ts +0 -2
- package/components/date-picker/consts.js +16 -24
- package/components/date-picker/date-input.d.ts +0 -20
- package/components/date-picker/date-input.js +100 -148
- package/components/date-picker/date-picker.d.ts +0 -29
- package/components/date-picker/date-picker.js +143 -224
- package/components/date-picker/date-popup.d.ts +0 -22
- package/components/date-picker/date-popup.js +282 -352
- package/components/date-picker/day.d.ts +0 -14
- package/components/date-picker/day.js +72 -109
- package/components/date-picker/month-names.d.ts +1 -11
- package/components/date-picker/month-names.js +42 -72
- package/components/date-picker/month-slider.d.ts +0 -9
- package/components/date-picker/month-slider.js +43 -71
- package/components/date-picker/month.d.ts +1 -9
- package/components/date-picker/month.js +18 -30
- package/components/date-picker/months.d.ts +1 -9
- package/components/date-picker/months.js +45 -55
- package/components/date-picker/weekdays.d.ts +2 -8
- package/components/date-picker/weekdays.js +12 -25
- package/components/date-picker/years.d.ts +0 -6
- package/components/date-picker/years.js +77 -104
- package/components/dialog/dialog.d.ts +0 -20
- package/components/dialog/dialog.js +153 -210
- package/components/dialog/dialog__body-scroll-preventer.js +0 -3
- package/components/dropdown/anchor.d.ts +1 -8
- package/components/dropdown/anchor.js +0 -7
- package/components/dropdown/dropdown.d.ts +4 -22
- package/components/dropdown/dropdown.js +134 -176
- package/components/dropdown-menu/dropdown-menu.js +51 -103
- package/components/editable-heading/editable-heading.js +69 -118
- package/components/error-bubble/error-bubble.d.ts +0 -6
- package/components/error-bubble/error-bubble.js +30 -60
- package/components/error-message/error-message.d.ts +0 -10
- package/components/error-message/error-message.js +34 -59
- package/components/footer/footer.js +28 -44
- package/components/form/form.js +1 -1
- package/components/global/compose.js +1 -8
- package/components/global/composeRefs.d.ts +0 -3
- package/components/global/composeRefs.js +8 -15
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.d.ts +0 -4
- package/components/global/create-stateful-context.js +14 -17
- package/components/global/data-tests.js +7 -12
- package/components/global/dom.js +49 -82
- package/components/global/focus-sensor-hoc.js +95 -122
- package/components/global/fuzzy-highlight.js +23 -34
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +3 -7
- package/components/global/inject-styles.js +7 -14
- package/components/global/listeners.js +28 -47
- package/components/global/memoize.js +6 -10
- package/components/global/normalize-indent.js +19 -46
- package/components/global/promise-with-timeout.js +6 -8
- package/components/global/react-dom-renderer.d.ts +0 -5
- package/components/global/react-dom-renderer.js +29 -45
- package/components/global/rerender-hoc.d.ts +2 -2
- package/components/global/rerender-hoc.js +16 -32
- package/components/global/schedule-raf.js +4 -4
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.d.ts +8 -2
- package/components/global/theme.js +2 -20
- package/components/global/trivial-template-tag.js +4 -9
- package/components/global/typescript-utils.js +2 -6
- package/components/global/url.js +20 -23
- package/components/global/use-event-callback.js +7 -4
- package/components/grid/col.d.ts +0 -14
- package/components/grid/col.js +27 -53
- package/components/grid/grid.d.ts +0 -5
- package/components/grid/grid.js +20 -32
- package/components/grid/row.d.ts +0 -18
- package/components/grid/row.js +23 -47
- package/components/group/group.d.ts +0 -5
- package/components/group/group.js +18 -27
- package/components/header/header-icon.d.ts +10 -0
- package/components/header/header-icon.js +39 -0
- package/components/header/header.d.ts +3 -7
- package/components/header/header.js +32 -74
- package/components/header/links.d.ts +2 -0
- package/components/header/links.js +20 -0
- package/components/header/logo.d.ts +0 -4
- package/components/header/logo.js +15 -30
- package/components/header/profile.d.ts +1 -39
- package/components/header/profile.js +126 -190
- package/components/header/services-link.d.ts +0 -10
- package/components/header/services-link.js +1 -4
- package/components/header/services.d.ts +0 -14
- package/components/header/services.js +67 -112
- package/components/header/smart-profile.d.ts +0 -9
- package/components/header/smart-profile.js +116 -205
- package/components/header/smart-services.d.ts +0 -4
- package/components/header/smart-services.js +73 -142
- package/components/header/tray.d.ts +0 -5
- package/components/header/tray.js +21 -35
- package/components/heading/heading.d.ts +1 -4
- package/components/heading/heading.js +25 -42
- package/components/http/http.js +162 -319
- package/components/http/http.mock.js +50 -98
- package/components/hub-source/hub-source.js +77 -182
- package/components/hub-source/hub-source__user.js +9 -37
- package/components/hub-source/hub-source__users-groups.js +34 -60
- package/components/i18n/i18n-context.js +7 -8
- package/components/i18n/i18n.js +3 -6
- package/components/icon/icon.d.ts +0 -11
- package/components/icon/icon.js +60 -85
- package/components/icon/icon__svg.d.ts +0 -8
- package/components/icon/icon__svg.js +0 -6
- package/components/icon/index.js +0 -6
- package/components/input/input-legacy.js +1 -1
- package/components/input/input.js +2 -14
- package/components/input-size/input-size.js +1 -1
- package/components/island/adaptive-island-hoc.d.ts +4 -5
- package/components/island/adaptive-island-hoc.js +30 -39
- package/components/island/content.d.ts +0 -10
- package/components/island/content.js +99 -119
- package/components/island/header.js +55 -73
- package/components/island/island.d.ts +4 -13
- package/components/island/island.js +25 -41
- package/components/island-legacy/content-legacy.d.ts +0 -5
- package/components/island-legacy/content-legacy.js +16 -27
- package/components/island-legacy/header-legacy.d.ts +0 -5
- package/components/island-legacy/header-legacy.js +19 -30
- package/components/island-legacy/island-legacy.d.ts +0 -5
- package/components/island-legacy/island-legacy.js +16 -27
- package/components/link/clickableLink.d.ts +0 -9
- package/components/link/clickableLink.js +33 -51
- package/components/link/link.d.ts +8 -33
- package/components/link/link.js +47 -68
- package/components/list/consts.js +2 -2
- package/components/list/list.d.ts +0 -32
- package/components/list/list.js +399 -516
- package/components/list/list__custom.js +51 -78
- package/components/list/list__hint.d.ts +0 -4
- package/components/list/list__hint.js +8 -21
- package/components/list/list__item.js +147 -211
- package/components/list/list__link.js +39 -59
- package/components/list/list__separator.js +15 -30
- package/components/list/list__title.js +25 -41
- package/components/list/list__users-groups-source.js +55 -123
- package/components/loader/loader.d.ts +0 -10
- package/components/loader/loader.js +38 -70
- package/components/loader/loader__core.js +123 -184
- package/components/loader-inline/loader-inline.d.ts +0 -6
- package/components/loader-inline/loader-inline.js +24 -38
- package/components/loader-screen/loader-screen.d.ts +0 -6
- package/components/loader-screen/loader-screen.js +24 -46
- package/components/login-dialog/login-dialog.d.ts +0 -11
- package/components/login-dialog/login-dialog.js +94 -145
- package/components/login-dialog/service.js +11 -33
- package/components/markdown/markdown.js +16 -29
- package/components/message/message.js +171 -218
- package/components/old-browsers-message/old-browsers-message.js +11 -14
- package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
- package/components/old-browsers-message/white-list.js +8 -13
- package/components/pager/pager.d.ts +1 -0
- package/components/pager/pager.js +211 -275
- package/components/panel/panel.d.ts +0 -5
- package/components/panel/panel.js +16 -27
- package/components/permissions/permissions.js +118 -161
- package/components/permissions/permissions__cache.js +191 -218
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +237 -329
- package/components/popup/popup.target.js +9 -12
- package/components/popup/position.js +94 -101
- package/components/popup-menu/popup-menu.js +31 -76
- package/components/progress-bar/progress-bar.d.ts +19 -33
- package/components/progress-bar/progress-bar.js +55 -99
- package/components/query-assist/query-assist.d.ts +63 -93
- package/components/query-assist/query-assist.js +585 -748
- package/components/query-assist/query-assist__suggestions.js +2 -28
- package/components/radio/radio.d.ts +0 -8
- package/components/radio/radio.js +15 -35
- package/components/radio/radio__item.d.ts +0 -9
- package/components/radio/radio__item.js +52 -72
- package/components/scrollable-section/scrollable-section.d.ts +2 -0
- package/components/scrollable-section/scrollable-section.js +53 -0
- package/components/select/select.d.ts +3 -0
- package/components/select/select.js +714 -863
- package/components/select/select__filter.js +2 -29
- package/components/select/select__popup.js +317 -465
- package/components/shortcuts/core.js +147 -195
- package/components/shortcuts/shortcut-title.js +6 -10
- package/components/shortcuts/shortcuts-hoc.d.ts +4 -9
- package/components/shortcuts/shortcuts-hoc.js +23 -46
- package/components/shortcuts/shortcuts.d.ts +0 -8
- package/components/shortcuts/shortcuts.js +41 -72
- package/components/slider/slider.js +93 -113
- package/components/slider/slider.utils.js +16 -23
- package/components/storage/storage.d.ts +2 -3
- package/components/storage/storage.js +2 -46
- package/components/storage/storage__local.js +89 -148
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +35 -61
- package/components/table/cell.d.ts +0 -6
- package/components/table/cell.js +11 -27
- package/components/table/disable-hover-hoc.d.ts +4 -5
- package/components/table/disable-hover-hoc.js +27 -42
- package/components/table/header-cell.d.ts +0 -10
- package/components/table/header-cell.js +59 -85
- package/components/table/header.d.ts +1 -23
- package/components/table/header.js +89 -126
- package/components/table/multitable.d.ts +0 -4
- package/components/table/multitable.js +83 -93
- package/components/table/row-with-focus-sensor.d.ts +2 -2
- package/components/table/row-with-focus-sensor.js +26 -60
- package/components/table/row.js +170 -235
- package/components/table/selection-adapter.js +2 -2
- package/components/table/selection-shortcuts-hoc.js +102 -126
- package/components/table/selection.js +150 -217
- package/components/table/simple-table.d.ts +17 -0
- package/components/table/simple-table.js +83 -0
- package/components/table/smart-table.d.ts +0 -46
- package/components/table/smart-table.js +41 -83
- package/components/table/table.d.ts +9 -6
- package/components/table/table.js +270 -372
- package/components/tabs/collapsible-more.d.ts +1 -9
- package/components/tabs/collapsible-more.js +47 -97
- package/components/tabs/collapsible-tab.js +32 -44
- package/components/tabs/collapsible-tabs.d.ts +2 -29
- package/components/tabs/collapsible-tabs.js +89 -161
- package/components/tabs/custom-item.d.ts +1 -7
- package/components/tabs/custom-item.js +4 -7
- package/components/tabs/dumb-tabs.d.ts +0 -11
- package/components/tabs/dumb-tabs.js +60 -104
- package/components/tabs/smart-tabs.d.ts +0 -6
- package/components/tabs/smart-tabs.js +29 -68
- package/components/tabs/tab-link.d.ts +0 -8
- package/components/tabs/tab-link.js +1 -4
- package/components/tabs/tab.d.ts +0 -8
- package/components/tabs/tab.js +14 -32
- package/components/tabs/tabs.js +1 -28
- package/components/tag/tag.d.ts +0 -19
- package/components/tag/tag.js +120 -179
- package/components/tags-input/tags-input.d.ts +7 -33
- package/components/tags-input/tags-input.js +224 -339
- package/components/tags-list/tags-list.d.ts +0 -13
- package/components/tags-list/tags-list.js +45 -74
- package/components/text/text.d.ts +0 -7
- package/components/text/text.js +27 -43
- package/components/toggle/toggle.d.ts +0 -15
- package/components/toggle/toggle.js +53 -78
- package/components/tooltip/tooltip.d.ts +4 -10
- package/components/tooltip/tooltip.js +105 -137
- package/components/user-agreement/service.d.ts +2 -1
- package/components/user-agreement/service.js +260 -405
- package/components/user-agreement/user-agreement.d.ts +0 -18
- package/components/user-agreement/user-agreement.js +92 -138
- package/components/user-card/card.d.ts +0 -35
- package/components/user-card/card.js +2 -27
- package/components/user-card/smart-user-card-tooltip.d.ts +0 -5
- package/components/user-card/smart-user-card-tooltip.js +52 -108
- package/components/user-card/tooltip.d.ts +0 -9
- package/components/user-card/tooltip.js +35 -74
- package/components/user-card/user-card.js +1 -26
- package/package.json +5 -7
- package/components/global/prop-types.d.ts +0 -4
- package/components/global/prop-types.js +0 -9
- package/components/global/react-render-adapter.d.ts +0 -1
- package/components/global/react-render-adapter.js +0 -6
- package/components/header/tray-icon.d.ts +0 -32
- package/components/header/tray-icon.js +0 -56
- package/components/storage/storage__fallback.d.ts +0 -79
- package/components/storage/storage__fallback.js +0 -253
@@ -1,10 +1,6 @@
|
|
1
|
-
import { _ as _defineProperty,
|
2
|
-
import 'core-js/modules/
|
3
|
-
import 'core-js/modules/es.array.find.js';
|
4
|
-
import 'core-js/modules/es.array.map.js';
|
5
|
-
import 'core-js/modules/es.object.to-string.js';
|
1
|
+
import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
6
3
|
import { PureComponent } from 'react';
|
7
|
-
import PropTypes from 'prop-types';
|
8
4
|
import classNames from 'classnames';
|
9
5
|
import chevronLeftIcon from '@jetbrains/icons/chevron-left';
|
10
6
|
import chevronRightIcon from '@jetbrains/icons/chevron-right';
|
@@ -18,57 +14,36 @@ import Icon from '../icon/icon.js';
|
|
18
14
|
import { I18nContext } from '../i18n/i18n-context.js';
|
19
15
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
20
16
|
import '@jetbrains/icons/chevron-down';
|
17
|
+
import 'util-deprecate';
|
21
18
|
import '../link/clickableLink.js';
|
22
19
|
import '../global/controls-height.js';
|
23
20
|
import '../_helpers/button__classes.js';
|
24
21
|
import '../icon/icon__constants.js';
|
25
|
-
import 'util-deprecate';
|
26
22
|
import '../_helpers/icon__svg.js';
|
27
23
|
import 'core-js/modules/es.regexp.exec.js';
|
28
24
|
import 'core-js/modules/es.string.replace.js';
|
29
|
-
import 'core-js/modules/es.string.starts-with.js';
|
30
|
-
import 'core-js/modules/es.array.iterator.js';
|
31
|
-
import 'core-js/modules/es.map.js';
|
32
|
-
import 'core-js/modules/es.weak-map.js';
|
33
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
34
|
-
import 'core-js/modules/es.string.split.js';
|
35
25
|
import '../global/data-tests.js';
|
36
26
|
import 'core-js/modules/es.array.reduce.js';
|
37
|
-
import 'core-js/modules/es.object.entries.js';
|
38
27
|
import '../control-label/control-label.js';
|
39
28
|
import '../control-help/control-help.js';
|
40
29
|
import '../_helpers/caption.js';
|
41
|
-
import 'core-js/modules/es.array.filter.js';
|
42
|
-
import 'core-js/modules/es.array.index-of.js';
|
43
|
-
import 'core-js/modules/es.array.slice.js';
|
44
|
-
import 'core-js/modules/es.object.assign.js';
|
45
|
-
import 'core-js/modules/es.object.values.js';
|
46
30
|
import 'core-js/modules/es.string.trim.js';
|
47
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
48
31
|
import '@jetbrains/icons/close-12px';
|
49
|
-
import '
|
32
|
+
import 'dequal';
|
50
33
|
import '../dropdown/dropdown.js';
|
51
34
|
import '../global/typescript-utils.js';
|
52
35
|
import '../_helpers/anchor.js';
|
53
36
|
import '@jetbrains/icons/chevron-10px';
|
54
37
|
import '../avatar/avatar.js';
|
55
38
|
import '../global/url.js';
|
56
|
-
import 'core-js/modules/es.string.match.js';
|
57
39
|
import '../global/dom.js';
|
58
|
-
import 'core-js/modules/es.set.js';
|
59
40
|
import '../avatar/fallback-avatar.js';
|
60
|
-
import 'core-js/modules/es.array.from.js';
|
61
41
|
import '../global/get-uid.js';
|
62
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
63
42
|
import '../popup/popup.js';
|
64
43
|
import 'react-dom';
|
65
44
|
import '../global/schedule-raf.js';
|
66
45
|
import '../shortcuts/shortcuts.js';
|
67
46
|
import '../shortcuts/core.js';
|
68
|
-
import 'core-js/modules/es.array.find-index.js';
|
69
|
-
import 'core-js/modules/es.array.includes.js';
|
70
|
-
import 'core-js/modules/es.array.splice.js';
|
71
|
-
import 'core-js/modules/es.string.includes.js';
|
72
47
|
import 'combokeys';
|
73
48
|
import '../global/sniffer.js';
|
74
49
|
import 'sniffr';
|
@@ -78,7 +53,6 @@ import 'core-js/modules/es.array.sort.js';
|
|
78
53
|
import '../popup/popup.consts.js';
|
79
54
|
import '../popup/popup.target.js';
|
80
55
|
import '../list/list.js';
|
81
|
-
import 'core-js/modules/es.symbol.js';
|
82
56
|
import 'core-js/modules/es.symbol.description.js';
|
83
57
|
import 'react-virtualized/dist/es/List';
|
84
58
|
import 'react-virtualized/dist/es/AutoSizer';
|
@@ -93,7 +67,6 @@ import '../list/list__item.js';
|
|
93
67
|
import '../checkbox/checkbox.js';
|
94
68
|
import '@jetbrains/icons/checkmark-12px';
|
95
69
|
import '@jetbrains/icons/remove-12px';
|
96
|
-
import '../global/prop-types.js';
|
97
70
|
import '../global/composeRefs.js';
|
98
71
|
import '../list/list__custom.js';
|
99
72
|
import '../global/get-event-key.js';
|
@@ -115,260 +88,241 @@ import '../text/text.js';
|
|
115
88
|
import '../_helpers/select__filter.js';
|
116
89
|
import '../i18n/i18n.js';
|
117
90
|
|
118
|
-
var modules_1a5f0d42 = {"light":"light_rui_2ac4","pager":"pager_rui_ad65","links":"links_rui_ad65","link":"link_rui_ad65","linkDisabled":"linkDisabled_rui_ad65"};
|
91
|
+
var modules_1a5f0d42 = {"light":"light_rui_2ac4","pager":"pager_rui_ad65","links":"links_rui_ad65","link":"link_rui_ad65","linkDisabled":"linkDisabled_rui_ad65","actions":"actions_rui_ad65","pageSize":"pageSize_rui_ad65"};
|
119
92
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
125
|
-
args[_key] = arguments[_key];
|
126
|
-
}
|
127
|
-
_this = _callSuper(this, Pager, [].concat(args));
|
128
|
-
_defineProperty(_this, "handlePageSizeChange", function (item) {
|
93
|
+
class Pager extends PureComponent {
|
94
|
+
constructor() {
|
95
|
+
super(...arguments);
|
96
|
+
_defineProperty(this, "handlePageSizeChange", item => {
|
129
97
|
if (item != null) {
|
130
|
-
|
98
|
+
this.props.onPageSizeChange(item.key);
|
131
99
|
}
|
132
100
|
});
|
133
|
-
_defineProperty(
|
134
|
-
|
101
|
+
_defineProperty(this, "handlePrevClick", () => {
|
102
|
+
const {
|
103
|
+
currentPage
|
104
|
+
} = this.props;
|
135
105
|
if (currentPage !== 1) {
|
136
106
|
var _this$props$onPageCha, _this$props;
|
137
|
-
|
138
|
-
(_this$props$onPageCha = (_this$props =
|
107
|
+
const prevPage = currentPage - 1;
|
108
|
+
(_this$props$onPageCha = (_this$props = this.props).onPageChange) === null || _this$props$onPageCha === void 0 || _this$props$onPageCha.call(_this$props, prevPage);
|
139
109
|
}
|
140
110
|
});
|
141
|
-
_defineProperty(
|
142
|
-
|
143
|
-
currentPage
|
144
|
-
onLoadPage
|
145
|
-
|
146
|
-
|
111
|
+
_defineProperty(this, "handleNextClick", () => {
|
112
|
+
const {
|
113
|
+
currentPage,
|
114
|
+
onLoadPage
|
115
|
+
} = this.props;
|
116
|
+
const nextPage = currentPage + 1;
|
117
|
+
const total = this.getTotalPages();
|
147
118
|
if (currentPage !== total) {
|
148
|
-
var _this$props$onPageCha2, _this$
|
149
|
-
(_this$props$onPageCha2 = (_this$
|
150
|
-
} else if (
|
119
|
+
var _this$props$onPageCha2, _this$props2;
|
120
|
+
(_this$props$onPageCha2 = (_this$props2 = this.props).onPageChange) === null || _this$props$onPageCha2 === void 0 || _this$props$onPageCha2.call(_this$props2, nextPage);
|
121
|
+
} else if (this.props.openTotal) {
|
151
122
|
onLoadPage(nextPage);
|
152
123
|
}
|
153
124
|
});
|
154
|
-
_defineProperty(
|
155
|
-
|
156
|
-
|
157
|
-
(_this$props$onPageCha3 = (_this$props4 = _this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 || _this$props$onPageCha3.call(_this$props4, i, event);
|
158
|
-
};
|
125
|
+
_defineProperty(this, "handlePageChange", memoize(i => event => {
|
126
|
+
var _this$props$onPageCha3, _this$props3;
|
127
|
+
(_this$props$onPageCha3 = (_this$props3 = this.props).onPageChange) === null || _this$props$onPageCha3 === void 0 || _this$props$onPageCha3.call(_this$props3, i, event);
|
159
128
|
}));
|
160
|
-
_defineProperty(
|
161
|
-
|
162
|
-
_this.props.onLoadPage(i);
|
163
|
-
};
|
129
|
+
_defineProperty(this, "handleLoadMore", memoize(i => () => {
|
130
|
+
this.props.onLoadPage(i);
|
164
131
|
}));
|
165
|
-
return _this;
|
166
132
|
}
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
var
|
177
|
-
var _this2$props$translat, _this2$props$translat2;
|
178
|
-
return {
|
179
|
-
key: size,
|
180
|
-
label: "".concat(size, " ").concat((_this2$props$translat = (_this2$props$translat2 = _this2.props.translations) === null || _this2$props$translat2 === void 0 ? void 0 : _this2$props$translat2.perPage) !== null && _this2$props$translat !== void 0 ? _this2$props$translat : translate('perPage'))
|
181
|
-
};
|
182
|
-
});
|
183
|
-
var selected = data.find(function (it) {
|
184
|
-
return it.key === pageSize;
|
185
|
-
});
|
133
|
+
getSelectOptions() {
|
134
|
+
const {
|
135
|
+
pageSize,
|
136
|
+
pageSizes
|
137
|
+
} = this.props;
|
138
|
+
const {
|
139
|
+
translate
|
140
|
+
} = this.context;
|
141
|
+
const data = pageSizes.map(size => {
|
142
|
+
var _this$props$translati, _this$props$translati2;
|
186
143
|
return {
|
187
|
-
|
188
|
-
|
144
|
+
key: size,
|
145
|
+
label: "".concat(size, " ").concat((_this$props$translati = (_this$props$translati2 = this.props.translations) === null || _this$props$translati2 === void 0 ? void 0 : _this$props$translati2.perPage) !== null && _this$props$translati !== void 0 ? _this$props$translati : translate('perPage'))
|
146
|
+
};
|
147
|
+
});
|
148
|
+
const selected = data.find(it => it.key === pageSize);
|
149
|
+
return {
|
150
|
+
selected,
|
151
|
+
data
|
152
|
+
};
|
153
|
+
}
|
154
|
+
getTotalPages() {
|
155
|
+
const {
|
156
|
+
total,
|
157
|
+
pageSize
|
158
|
+
} = this.props;
|
159
|
+
return Math.ceil(total / pageSize);
|
160
|
+
}
|
161
|
+
getButton(page, content, key, active) {
|
162
|
+
return /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
163
|
+
href: this.generateHref(page),
|
164
|
+
active: active,
|
165
|
+
disabled: this.props.loader && !active && !this.props.loaderNavigation,
|
166
|
+
loader: this.props.loader && active
|
167
|
+
}, this.getClickProps(this.handlePageChange(page))), {}, {
|
168
|
+
children: content
|
169
|
+
}), key);
|
170
|
+
}
|
171
|
+
getClickProps(onClick) {
|
172
|
+
const {
|
173
|
+
hrefFunc,
|
174
|
+
onPageChange
|
175
|
+
} = this.props;
|
176
|
+
if (!onPageChange) {
|
177
|
+
return {};
|
178
|
+
} else if (hrefFunc) {
|
179
|
+
return {
|
180
|
+
onPlainLeftClick: onClick
|
181
|
+
};
|
182
|
+
} else {
|
183
|
+
return {
|
184
|
+
onClick
|
189
185
|
};
|
190
186
|
}
|
191
|
-
}
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
}
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
})
|
245
|
-
})
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
var nextText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === void 0 ? void 0 : _this$props$translati4.nextPage) !== null && _this$props$translati3 !== void 0 ? _this$props$translati3 : translate('nextPage');
|
262
|
-
var nextLinkContent = [/*#__PURE__*/jsx("span", {
|
263
|
-
children: nextText
|
264
|
-
}, "text"), nextIcon];
|
265
|
-
var prevLinkContent = [prevIcon, /*#__PURE__*/jsx("span", {
|
266
|
-
children: prevText
|
267
|
-
}, "text")];
|
268
|
-
var prevLinkHref = this.generateHref(this.props.currentPage - 1);
|
269
|
-
var nextLinkHref = this.generateHref(this.props.currentPage + 1);
|
270
|
-
var disabledLinkClasses = classNames({
|
271
|
-
[modules_1a5f0d42.link]: true,
|
272
|
-
[modules_1a5f0d42.linkDisabled]: true
|
273
|
-
});
|
274
|
-
return /*#__PURE__*/jsxs("div", {
|
275
|
-
className: modules_1a5f0d42.links,
|
276
|
-
children: [prevLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
|
277
|
-
href: prevLinkHref,
|
278
|
-
className: modules_1a5f0d42.link
|
279
|
-
}, this.getClickProps(this.handlePrevClick)), {}, {
|
280
|
-
children: prevLinkContent
|
281
|
-
})) : /*#__PURE__*/jsxs("span", {
|
282
|
-
className: disabledLinkClasses,
|
283
|
-
children: [prevIcon, /*#__PURE__*/jsx("span", {
|
284
|
-
children: prevText
|
285
|
-
}, "text")]
|
286
|
-
}), nextLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
|
287
|
-
href: nextLinkHref,
|
288
|
-
className: modules_1a5f0d42.link
|
289
|
-
}, this.getClickProps(this.handleNextClick)), {}, {
|
290
|
-
children: nextLinkContent
|
291
|
-
})) : /*#__PURE__*/jsxs("span", {
|
292
|
-
className: disabledLinkClasses,
|
293
|
-
children: [/*#__PURE__*/jsx("span", {
|
294
|
-
children: nextText
|
295
|
-
}, "text"), nextIcon]
|
296
|
-
})]
|
297
|
-
});
|
187
|
+
}
|
188
|
+
getPageSizeSelector() {
|
189
|
+
const selectOptions = this.getSelectOptions();
|
190
|
+
return !this.props.disablePageSizeSelector && /*#__PURE__*/jsx("div", {
|
191
|
+
"data-test": "ring-pager-page-size-selector",
|
192
|
+
className: modules_1a5f0d42.pageSize,
|
193
|
+
children: /*#__PURE__*/jsx(Select, {
|
194
|
+
data: selectOptions.data,
|
195
|
+
selected: selectOptions.selected,
|
196
|
+
onSelect: this.handlePageSizeChange,
|
197
|
+
type: Select.Type.INLINE,
|
198
|
+
disabled: this.props.loader
|
199
|
+
})
|
200
|
+
});
|
201
|
+
}
|
202
|
+
getPagerLinks() {
|
203
|
+
var _this$props$translati3, _this$props$translati4, _this$props$translati5, _this$props$translati6;
|
204
|
+
const {
|
205
|
+
translate
|
206
|
+
} = this.context;
|
207
|
+
const prevLinkAvailable = this.props.currentPage !== 1;
|
208
|
+
const nextLinkAvailable = this.props.openTotal || this.props.currentPage !== this.getTotalPages();
|
209
|
+
const nextIcon = /*#__PURE__*/jsx(Icon, {
|
210
|
+
glyph: chevronRightIcon
|
211
|
+
}, "icon");
|
212
|
+
const prevIcon = /*#__PURE__*/jsx(Icon, {
|
213
|
+
glyph: chevronLeftIcon
|
214
|
+
}, "icon");
|
215
|
+
const prevText = (_this$props$translati3 = (_this$props$translati4 = this.props.translations) === null || _this$props$translati4 === void 0 ? void 0 : _this$props$translati4.previousPage) !== null && _this$props$translati3 !== void 0 ? _this$props$translati3 : translate('previousPage');
|
216
|
+
const nextText = (_this$props$translati5 = (_this$props$translati6 = this.props.translations) === null || _this$props$translati6 === void 0 ? void 0 : _this$props$translati6.nextPage) !== null && _this$props$translati5 !== void 0 ? _this$props$translati5 : translate('nextPage');
|
217
|
+
const nextLinkContent = [/*#__PURE__*/jsx("span", {
|
218
|
+
children: nextText
|
219
|
+
}, "text"), nextIcon];
|
220
|
+
const prevLinkContent = [prevIcon, /*#__PURE__*/jsx("span", {
|
221
|
+
children: prevText
|
222
|
+
}, "text")];
|
223
|
+
const prevLinkHref = this.generateHref(this.props.currentPage - 1);
|
224
|
+
const nextLinkHref = this.generateHref(this.props.currentPage + 1);
|
225
|
+
const disabledLinkClasses = classNames({
|
226
|
+
[modules_1a5f0d42.link]: true,
|
227
|
+
[modules_1a5f0d42.linkDisabled]: true
|
228
|
+
});
|
229
|
+
return /*#__PURE__*/jsxs("div", {
|
230
|
+
className: modules_1a5f0d42.links,
|
231
|
+
children: [prevLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
|
232
|
+
href: prevLinkHref,
|
233
|
+
className: modules_1a5f0d42.link
|
234
|
+
}, this.getClickProps(this.handlePrevClick)), {}, {
|
235
|
+
children: prevLinkContent
|
236
|
+
})) : /*#__PURE__*/jsxs("span", {
|
237
|
+
className: disabledLinkClasses,
|
238
|
+
children: [prevIcon, /*#__PURE__*/jsx("span", {
|
239
|
+
children: prevText
|
240
|
+
}, "text")]
|
241
|
+
}), nextLinkAvailable && (!this.props.loader || this.props.loaderNavigation) ? /*#__PURE__*/jsx(Link, _objectSpread2(_objectSpread2({
|
242
|
+
href: nextLinkHref,
|
243
|
+
className: modules_1a5f0d42.link
|
244
|
+
}, this.getClickProps(this.handleNextClick)), {}, {
|
245
|
+
children: nextLinkContent
|
246
|
+
})) : /*#__PURE__*/jsxs("span", {
|
247
|
+
className: disabledLinkClasses,
|
248
|
+
children: [/*#__PURE__*/jsx("span", {
|
249
|
+
children: nextText
|
250
|
+
}, "text"), nextIcon]
|
251
|
+
})]
|
252
|
+
});
|
253
|
+
}
|
254
|
+
generateHref(page) {
|
255
|
+
if (this.props.hrefFunc === undefined) {
|
256
|
+
return undefined;
|
298
257
|
}
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
258
|
+
const pageSize = this.props.disablePageSizeSelector ? undefined : this.props.pageSize;
|
259
|
+
return this.props.hrefFunc(page, pageSize);
|
260
|
+
}
|
261
|
+
getPagerContent() {
|
262
|
+
var _this$props$translati7, _this$props$translati8, _this$props$translati9, _this$props$translati10;
|
263
|
+
const {
|
264
|
+
currentPage,
|
265
|
+
visiblePagesLimit
|
266
|
+
} = this.props;
|
267
|
+
const totalPages = this.getTotalPages();
|
268
|
+
const {
|
269
|
+
translate
|
270
|
+
} = this.context;
|
271
|
+
if (totalPages < this.props.currentPage) {
|
272
|
+
var _this$props$onPageCha4, _this$props4;
|
273
|
+
(_this$props$onPageCha4 = (_this$props4 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 || _this$props$onPageCha4.call(_this$props4, totalPages);
|
307
274
|
}
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
(_this$props$onPageCha4 = (_this$props9 = this.props).onPageChange) === null || _this$props$onPageCha4 === void 0 || _this$props$onPageCha4.call(_this$props9, totalPages);
|
275
|
+
let start = 1;
|
276
|
+
let end = totalPages;
|
277
|
+
if (totalPages >= visiblePagesLimit) {
|
278
|
+
const leftHalfFrameSize = Math.ceil(visiblePagesLimit / 2) - 1;
|
279
|
+
const rightHalfFrameSize = visiblePagesLimit - leftHalfFrameSize - 1;
|
280
|
+
start = currentPage - leftHalfFrameSize;
|
281
|
+
end = currentPage + rightHalfFrameSize;
|
282
|
+
if (start < 1) {
|
283
|
+
const tail = 1 - start;
|
284
|
+
start += tail;
|
285
|
+
end += tail;
|
320
286
|
}
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
var rightHalfFrameSize = visiblePagesLimit - leftHalfFrameSize - 1;
|
326
|
-
start = currentPage - leftHalfFrameSize;
|
327
|
-
end = currentPage + rightHalfFrameSize;
|
328
|
-
if (start < 1) {
|
329
|
-
var tail = 1 - start;
|
330
|
-
start += tail;
|
331
|
-
end += tail;
|
332
|
-
}
|
333
|
-
if (end > totalPages) {
|
334
|
-
var _tail = end - totalPages;
|
335
|
-
start -= _tail;
|
336
|
-
end -= _tail;
|
337
|
-
}
|
338
|
-
if (start < 1) {
|
339
|
-
start += 1 - start;
|
340
|
-
}
|
287
|
+
if (end > totalPages) {
|
288
|
+
const tail = end - totalPages;
|
289
|
+
start -= tail;
|
290
|
+
end -= tail;
|
341
291
|
}
|
342
|
-
|
343
|
-
|
344
|
-
buttons.push(this.getButton(i, i, i, i === currentPage));
|
292
|
+
if (start < 1) {
|
293
|
+
start += 1 - start;
|
345
294
|
}
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
295
|
+
}
|
296
|
+
const buttons = [];
|
297
|
+
for (let i = start; i <= end; i++) {
|
298
|
+
buttons.push(this.getButton(i, i, i, i === currentPage));
|
299
|
+
}
|
300
|
+
const lastPageButtonAvailable = !this.props.disableLastPageButton && end < totalPages && !this.props.openTotal || this.props.openTotal && this.props.canLoadLastPageWithOpenTotal;
|
301
|
+
return /*#__PURE__*/jsxs("div", {
|
302
|
+
children: [this.getPagerLinks(), /*#__PURE__*/jsxs("div", {
|
303
|
+
className: modules_1a5f0d42.actions,
|
304
|
+
children: [/*#__PURE__*/jsxs(ButtonToolbar, {
|
305
|
+
children: [start > 1 && this.getButton(1, (_this$props$translati7 = (_this$props$translati8 = this.props.translations) === null || _this$props$translati8 === void 0 ? void 0 : _this$props$translati8.firstPage) !== null && _this$props$translati7 !== void 0 ? _this$props$translati7 : translate('firstPage')), /*#__PURE__*/jsxs(ButtonGroup, {
|
350
306
|
children: [start > 1 && this.getButton(start - 1, '...'), buttons, end < totalPages && this.getButton(end + 1, '...'), end === totalPages && this.props.openTotal && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
351
307
|
href: this.generateHref(end + 1),
|
352
308
|
disabled: this.props.loader
|
353
309
|
}, this.getClickProps(this.handleLoadMore(end + 1))), {}, {
|
354
310
|
children: '...'
|
355
311
|
}))]
|
356
|
-
}), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$
|
312
|
+
}), lastPageButtonAvailable && this.getButton(this.props.openTotal ? -1 : totalPages, (_this$props$translati9 = (_this$props$translati10 = this.props.translations) === null || _this$props$translati10 === void 0 ? void 0 : _this$props$translati10.lastPage) !== null && _this$props$translati9 !== void 0 ? _this$props$translati9 : translate('lastPage'))]
|
357
313
|
}), this.getPageSizeSelector()]
|
358
|
-
})
|
359
|
-
}
|
360
|
-
}
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
}]);
|
371
|
-
}(PureComponent);
|
314
|
+
})]
|
315
|
+
});
|
316
|
+
}
|
317
|
+
render() {
|
318
|
+
const classes = classNames(modules_1a5f0d42.pager, this.props.className);
|
319
|
+
return /*#__PURE__*/jsx("div", {
|
320
|
+
"data-test": "ring-pager",
|
321
|
+
className: classes,
|
322
|
+
children: this.getTotalPages() > 1 || this.props.openTotal ? this.getPagerContent() : this.getPageSizeSelector()
|
323
|
+
});
|
324
|
+
}
|
325
|
+
}
|
372
326
|
_defineProperty(Pager, "defaultProps", {
|
373
327
|
currentPage: 1,
|
374
328
|
pageSize: 50,
|
@@ -380,27 +334,9 @@ _defineProperty(Pager, "defaultProps", {
|
|
380
334
|
canLoadLastPageWithOpenTotal: false,
|
381
335
|
loader: false,
|
382
336
|
loaderNavigation: false,
|
383
|
-
onPageSizeChange:
|
384
|
-
onLoadPage:
|
337
|
+
onPageSizeChange: () => {},
|
338
|
+
onLoadPage: () => {}
|
385
339
|
});
|
386
340
|
_defineProperty(Pager, "contextType", I18nContext);
|
387
|
-
Pager.propTypes = {
|
388
|
-
total: PropTypes.number.isRequired,
|
389
|
-
currentPage: PropTypes.number,
|
390
|
-
pageSize: PropTypes.number,
|
391
|
-
pageSizes: PropTypes.arrayOf(PropTypes.number),
|
392
|
-
visiblePagesLimit: PropTypes.number,
|
393
|
-
disablePageSizeSelector: PropTypes.bool,
|
394
|
-
openTotal: PropTypes.bool,
|
395
|
-
canLoadLastPageWithOpenTotal: PropTypes.bool,
|
396
|
-
onPageChange: PropTypes.func,
|
397
|
-
onPageSizeChange: PropTypes.func,
|
398
|
-
onLoadPage: PropTypes.func,
|
399
|
-
className: PropTypes.string,
|
400
|
-
translations: PropTypes.object,
|
401
|
-
loader: PropTypes.bool,
|
402
|
-
loaderNavigation: PropTypes.bool,
|
403
|
-
hrefFunc: PropTypes.func //function which generates href for all pager's buttons based on pager state passed as a function parameter, either this function or onPageChange should be provided
|
404
|
-
};
|
405
341
|
|
406
342
|
export { Pager as default };
|
@@ -1,12 +1,7 @@
|
|
1
1
|
import { HTMLAttributes, PureComponent } from 'react';
|
2
|
-
import PropTypes from 'prop-types';
|
3
2
|
/**
|
4
3
|
* @name Panel
|
5
4
|
*/
|
6
5
|
export default class Panel extends PureComponent<HTMLAttributes<HTMLElement>> {
|
7
|
-
static propTypes: {
|
8
|
-
className: PropTypes.Requireable<string>;
|
9
|
-
children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
|
10
|
-
};
|
11
6
|
render(): import("react").JSX.Element;
|
12
7
|
}
|
@@ -1,36 +1,25 @@
|
|
1
|
-
import {
|
1
|
+
import { a as _objectWithoutProperties, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import { PureComponent } from 'react';
|
3
|
-
import PropTypes from 'prop-types';
|
4
3
|
import classNames from 'classnames';
|
5
4
|
import { jsx } from 'react/jsx-runtime';
|
6
5
|
|
7
6
|
var modules_cf670408 = {"light":"light_rui_2ac4","panel":"panel_rui_e32c panel_rui_027b"};
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
8
|
+
const _excluded = ["className", "children"];
|
9
|
+
class Panel extends PureComponent {
|
10
|
+
render() {
|
11
|
+
const _this$props = this.props,
|
12
|
+
{
|
13
|
+
className,
|
14
|
+
children
|
15
|
+
} = _this$props,
|
16
|
+
props = _objectWithoutProperties(_this$props, _excluded);
|
17
|
+
const classes = classNames(modules_cf670408.panel, className);
|
18
|
+
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
19
|
+
className: classes,
|
20
|
+
children: children
|
21
|
+
}));
|
14
22
|
}
|
15
|
-
|
16
|
-
return _createClass(Panel, [{
|
17
|
-
key: "render",
|
18
|
-
value: function render() {
|
19
|
-
var _this$props = this.props,
|
20
|
-
className = _this$props.className,
|
21
|
-
children = _this$props.children,
|
22
|
-
props = _objectWithoutProperties(_this$props, _excluded);
|
23
|
-
var classes = classNames(modules_cf670408.panel, className);
|
24
|
-
return /*#__PURE__*/jsx("div", _objectSpread2(_objectSpread2({}, props), {}, {
|
25
|
-
className: classes,
|
26
|
-
children: children
|
27
|
-
}));
|
28
|
-
}
|
29
|
-
}]);
|
30
|
-
}(PureComponent);
|
31
|
-
_defineProperty(Panel, "propTypes", {
|
32
|
-
className: PropTypes.string,
|
33
|
-
children: PropTypes.node
|
34
|
-
});
|
23
|
+
}
|
35
24
|
|
36
25
|
export { Panel as default };
|