@rio-cloud/rio-uikit 0.15.1 → 0.16.0-beta-1
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/README.md +46 -3
- package/lib/components/actionBarItem/ActionBarItem.js +4 -4
- package/lib/components/actionBarItem/ActionBarItemPopoverContent.js +43 -0
- package/lib/components/actionBarItem/ActionBarOverlay.js +8 -3
- package/lib/components/applicationHeader/AppMenuDropdown.js +9 -13
- package/lib/components/applicationLayout/ApplicationLayout.js +2 -0
- package/lib/components/applicationLayout/ApplicationLayoutBody.js +5 -3
- package/lib/components/assetTree/AssetTree.js +1 -1
- package/lib/components/assetTree/Tree.js +2 -2
- package/lib/components/assetTree/TreeLeaf.js +9 -9
- package/lib/components/bottomSheet/BottomSheet.js +11 -7
- package/lib/components/carousel/Carousel.js +7 -426
- package/lib/components/checkbox/Checkbox.js +4 -4
- package/lib/components/datepicker/DatePicker.js +15 -6
- package/lib/components/dropdown/ButtonDropdown.js +8 -11
- package/lib/components/listMenu/ListMenu.js +40 -23
- package/lib/components/numberInput/NumberInput.js +6 -6
- package/lib/components/onboarding/OnboardingTip.js +9 -9
- package/lib/components/states/NotBookedState.js +2 -2
- package/lib/components/table/TableSettingsDialogFooter.js +1 -1
- package/lib/components/teaser/Teaser.js +1 -1
- package/lib/components/teaser/TeaserContainer.js +8 -8
- package/lib/components/tooltip/Tooltip.js +4 -4
- package/lib/es/DeviceUtils.d.ts +4 -2
- package/lib/es/deviceUtils.js +12 -0
- package/lib/hooks/useClipboard.js +2 -2
- package/lib/style/css/_exports/man-uikit.less +7 -5
- package/lib/style/css/_exports/rio-buyButton.less +30 -41
- package/lib/style/css/_exports/rio-uikit-core.less +105 -127
- package/lib/style/css/_exports/rio-uikit-print-utilities.less +6 -11
- package/lib/style/css/_exports/rio-uikit-responsive-utilities.less +6 -11
- package/lib/style/css/_exports/rio-uikit.less +5 -4
- package/lib/style/css/_exports/rio-website.less +35 -13
- package/lib/style/css/_exports/vw-uikit.less +10 -8
- package/lib/style/css/animations/_imports.less +9 -0
- package/lib/style/css/animations/collapse.less +16 -0
- package/lib/style/css/animations/fade.less +28 -0
- package/lib/style/css/animations/pinging.less +7 -0
- package/lib/style/css/animations/rotate.less +52 -0
- package/lib/style/css/animations/scale.less +35 -0
- package/lib/style/css/animations/slide.less +39 -0
- package/lib/style/css/animations/spinning.less +4 -0
- package/lib/style/css/animations/transition.less +129 -0
- package/lib/style/css/animations/translate.less +28 -0
- package/lib/style/css/components/Activity.less +93 -0
- package/lib/style/css/components/ApplicationHeader.less +438 -0
- package/lib/style/css/components/ApplicationLayout.less +236 -0
- package/lib/style/css/components/AssetTree.less +443 -0
- package/lib/style/css/components/AutoSuggest.less +22 -0
- package/lib/style/css/components/BottomSheet.less +14 -0
- package/lib/style/css/components/Carousel.less +212 -0
- package/lib/style/css/components/Checkbox.less +224 -0
- package/lib/style/css/components/ClearableInput.less +115 -0
- package/lib/style/css/components/Counter.less +142 -0
- package/lib/style/css/components/DataTabs.less +100 -0
- package/lib/style/css/components/DatePicker.less +391 -0
- package/lib/style/css/components/Dialog.less +482 -0
- package/lib/style/css/components/Dropdown.less +186 -0
- package/lib/style/css/components/Expander.less +196 -0
- package/lib/style/css/components/FilePicker.less +8 -0
- package/lib/style/css/components/ListMenu.less +77 -0
- package/lib/style/css/components/MapHere.less +91 -0
- package/lib/style/css/components/MapMarker.less +347 -0
- package/lib/style/css/components/MapSettings.less +140 -0
- package/lib/style/css/components/NoData.less +8 -0
- package/lib/style/css/components/Notification.less +234 -0
- package/lib/style/css/components/RadioButton.less +173 -0
- package/lib/style/css/components/Resizer.less +43 -0
- package/lib/style/css/components/Select.less +274 -0
- package/lib/style/css/components/Sidebar.less +157 -0
- package/lib/style/css/components/Slider.less +278 -0
- package/lib/style/css/components/Spinner.less +49 -0
- package/lib/style/css/components/StatsWidget.less +111 -0
- package/lib/style/css/components/SteppedProgressBar.less +323 -0
- package/lib/style/css/components/SupportMarker.less +34 -0
- package/lib/style/css/components/Switch.less +145 -0
- package/lib/style/css/components/TableSettingsDialog.less +96 -0
- package/lib/style/css/components/TableSortArrows.less +54 -0
- package/lib/style/css/components/Tag.less +246 -0
- package/lib/style/css/components/TagManager.less +4 -0
- package/lib/style/css/components/Teaser.less +12 -0
- package/lib/style/css/components/Timeline.less +69 -0
- package/lib/style/css/components/Tooltip.less +230 -0
- package/lib/style/css/design/alerts.less +55 -0
- package/lib/style/css/design/aspect-ratio.less +23 -0
- package/lib/style/css/design/badges.less +120 -0
- package/lib/style/css/design/blockquote.less +49 -0
- package/lib/style/css/design/border.less +192 -0
- package/lib/style/css/design/breadcrumbs.less +20 -0
- package/lib/style/css/design/button-groups.less +194 -0
- package/lib/style/css/design/buttons.less +540 -0
- package/lib/style/css/design/callouts.less +27 -0
- package/lib/style/css/design/caret.less +28 -0
- package/lib/style/css/design/close.less +12 -0
- package/lib/style/css/design/code.less +45 -0
- package/lib/style/css/design/colors.less +202 -0
- package/lib/style/css/design/cols.less +56 -0
- package/lib/style/css/design/container.less +29 -0
- package/lib/style/css/design/cursors.less +19 -0
- package/lib/style/css/design/custom.less +20 -0
- package/lib/style/css/design/ellipsis.less +46 -0
- package/lib/style/css/design/flexgrid.less +7 -0
- package/lib/style/css/design/fonts.less +318 -0
- package/lib/style/css/design/form-input-groups.less +245 -0
- package/lib/style/css/design/form-inputs.less +655 -0
- package/lib/style/css/design/iframe.less +80 -0
- package/lib/style/css/design/images.less +47 -0
- package/lib/style/css/design/labels.less +66 -0
- package/lib/style/css/design/list-group.less +95 -0
- package/lib/style/css/design/navs.less +254 -0
- package/lib/style/css/design/normalize.less +436 -0
- package/lib/style/css/design/opacity.less +26 -0
- package/lib/style/css/design/overflow.less +1 -0
- package/lib/style/css/design/pagination.less +161 -0
- package/lib/style/css/design/panels.less +105 -0
- package/lib/style/css/design/popovers.less +117 -0
- package/lib/style/css/design/position.less +16 -0
- package/lib/style/css/design/progress-bars.less +131 -0
- package/lib/style/css/design/responsive/_imports.less +68 -0
- package/lib/style/css/design/responsive/backgrounds.less +32 -0
- package/lib/style/css/design/responsive/display.less +9 -0
- package/lib/style/css/design/responsive/flexgrid.less +75 -0
- package/lib/style/css/design/responsive/floating.less +4 -0
- package/lib/style/css/design/responsive/gap.less +41 -0
- package/lib/style/css/design/responsive/hyphens.less +14 -0
- package/lib/style/css/design/responsive/margin.less +127 -0
- package/lib/style/css/design/responsive/overflow.less +16 -0
- package/lib/style/css/design/responsive/padding.less +71 -0
- package/lib/style/css/design/responsive/position.less +102 -0
- package/lib/style/css/design/responsive/sizing.less +115 -0
- package/lib/style/css/design/responsive/text.less +71 -0
- package/lib/style/css/design/responsive/visibility.less +115 -0
- package/lib/style/css/design/responsive-embed.less +31 -0
- package/lib/style/css/design/responsive-video.less +22 -0
- package/lib/style/css/design/rioglyph.less +24 -0
- package/lib/style/css/design/rounded.less +44 -0
- package/lib/style/css/design/shadows.less +65 -0
- package/lib/style/css/design/tables.less +976 -0
- package/lib/style/css/design/text.less +201 -0
- package/lib/style/css/design/theme.less +200 -0
- package/lib/style/css/design/thumbnails.less +29 -0
- package/lib/style/css/design/transition.less +33 -0
- package/lib/style/css/design/type.less +159 -0
- package/lib/style/css/design/utilities.less +75 -0
- package/lib/style/css/design/visibilty.less +38 -0
- package/lib/style/css/design/wells.less +17 -0
- package/lib/style/css/design/z-index.less +21 -0
- package/lib/style/css/mapping/breakpoint-map.less +44 -0
- package/lib/style/css/mapping/color-map.less +200 -0
- package/lib/style/css/mapping/cols-map.less +15 -0
- package/lib/style/css/mapping/numbers-map.less +16 -0
- package/lib/style/css/mapping/positions-map.less +21 -0
- package/lib/style/css/mapping/sizes-map.less +129 -0
- package/lib/style/css/mapping/spacings-map.less +28 -0
- package/lib/style/css/mixins/_mixins.less +13 -0
- package/lib/style/css/mixins/alerts.less +13 -0
- package/lib/style/css/mixins/border-radius.less +16 -0
- package/lib/style/css/mixins/buttons.less +117 -0
- package/lib/style/css/mixins/clearfix.less +9 -0
- package/lib/style/css/mixins/cols.less +59 -0
- package/lib/style/css/mixins/forms.less +61 -0
- package/lib/style/css/mixins/panels.less +27 -0
- package/lib/style/css/mixins/placeholder.less +17 -0
- package/lib/style/css/mixins/reset.less +27 -0
- package/lib/style/css/mixins/sizings.less +21 -0
- package/lib/style/css/mixins/spinner.less +30 -0
- package/lib/style/css/mixins/table.less +26 -0
- package/lib/style/css/mixins/tabs.less +4 -0
- package/lib/style/css/mixins/text.less +5 -0
- package/lib/style/css/print/print.less +1 -4
- package/lib/style/css/rio-theme/alerts.less +23 -61
- package/lib/style/css/rio-theme/badges.less +16 -28
- package/lib/style/css/rio-theme/blockquote.less +14 -97
- package/lib/style/css/rio-theme/mixins/alerts.less +13 -1
- package/lib/style/css/shared/colors.json +1 -1
- package/lib/style/css/shared/colors.less +11 -8
- package/lib/style/css/shared/text.less +6 -5
- package/lib/style/css/utils/responsive/grid.less +15 -6
- package/lib/style/css/variables.less +179 -0
- package/lib/style/fonts/rioglyph/rioglyph.less +1 -11
- package/lib/types.ts +38 -57
- package/lib/utils/buttonEffect.js +3 -1
- package/lib/utils/deviceUtils.js +40 -3
- package/lib/utils/init.js +22 -7
- package/lib/version.json +1 -1
- package/package.json +46 -30
|
@@ -2,435 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
5
|
Object.defineProperty(exports, "__esModule", {
|
|
8
6
|
value: true
|
|
9
7
|
});
|
|
10
|
-
exports
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
15
|
-
|
|
16
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
17
|
-
|
|
18
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
19
|
-
|
|
20
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
21
|
-
|
|
22
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
23
|
-
|
|
24
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
25
|
-
|
|
26
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
27
|
-
|
|
28
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
29
|
-
|
|
30
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
31
|
-
|
|
32
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
33
|
-
|
|
34
|
-
var _without = _interopRequireDefault(require("lodash/fp/without"));
|
|
35
|
-
|
|
36
|
-
var _CarouselCaption = _interopRequireDefault(require("./CarouselCaption"));
|
|
37
|
-
|
|
38
|
-
var _CarouselItem = _interopRequireDefault(require("./CarouselItem"));
|
|
39
|
-
|
|
40
|
-
var _excluded = ["slide", "indicators", "controls", "wrap", "prevIcon", "prevLabel", "nextIcon", "nextLabel", "className", "children"];
|
|
41
|
-
|
|
42
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
43
|
-
|
|
44
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
45
|
-
|
|
46
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
47
|
-
|
|
48
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
49
|
-
|
|
50
|
-
// import SafeAnchor from './SafeAnchor';
|
|
51
|
-
var propTypes = {
|
|
52
|
-
slide: _propTypes.default.bool,
|
|
53
|
-
indicators: _propTypes.default.bool,
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* The amount of time to delay between automatically cycling an item.
|
|
57
|
-
* If `null`, carousel will not automatically cycle.
|
|
58
|
-
*/
|
|
59
|
-
interval: _propTypes.default.number,
|
|
60
|
-
controls: _propTypes.default.bool,
|
|
61
|
-
pauseOnHover: _propTypes.default.bool,
|
|
62
|
-
wrap: _propTypes.default.bool,
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Callback fired when the active item changes.
|
|
66
|
-
*
|
|
67
|
-
* ```js
|
|
68
|
-
* (eventKey: any, ?event: Object) => any
|
|
69
|
-
* ```
|
|
70
|
-
*
|
|
71
|
-
* If this callback takes two or more arguments, the second argument will
|
|
72
|
-
* be a persisted event object with `direction` set to the direction of the
|
|
73
|
-
* transition.
|
|
74
|
-
*/
|
|
75
|
-
onSelect: _propTypes.default.func,
|
|
76
|
-
onSlideEnd: _propTypes.default.func,
|
|
77
|
-
activeIndex: _propTypes.default.number,
|
|
78
|
-
defaultActiveIndex: _propTypes.default.number,
|
|
79
|
-
direction: _propTypes.default.oneOf(['prev', 'next']),
|
|
80
|
-
prevIcon: _propTypes.default.node,
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Label shown to screen readers only, can be used to show the previous element
|
|
84
|
-
* in the carousel.
|
|
85
|
-
* Set to null to deactivate.
|
|
86
|
-
*/
|
|
87
|
-
prevLabel: _propTypes.default.string,
|
|
88
|
-
nextIcon: _propTypes.default.node,
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Label shown to screen readers only, can be used to show the next element
|
|
92
|
-
* in the carousel.
|
|
93
|
-
* Set to null to deactivate.
|
|
94
|
-
*/
|
|
95
|
-
nextLabel: _propTypes.default.string
|
|
96
|
-
};
|
|
97
|
-
var defaultProps = {
|
|
98
|
-
slide: true,
|
|
99
|
-
interval: 5000,
|
|
100
|
-
pauseOnHover: true,
|
|
101
|
-
wrap: true,
|
|
102
|
-
indicators: true,
|
|
103
|
-
controls: true,
|
|
104
|
-
prevIcon: /*#__PURE__*/_react.default.createElement("span", {
|
|
105
|
-
className: 'rioglyph rioglyph-chevron-left'
|
|
106
|
-
}),
|
|
107
|
-
prevLabel: 'Previous',
|
|
108
|
-
nextIcon: /*#__PURE__*/_react.default.createElement("span", {
|
|
109
|
-
className: 'rioglyph rioglyph-chevron-right'
|
|
110
|
-
}),
|
|
111
|
-
nextLabel: 'Next'
|
|
112
|
-
};
|
|
113
|
-
|
|
114
|
-
var Carousel = /*#__PURE__*/function (_React$Component) {
|
|
115
|
-
(0, _inherits2.default)(Carousel, _React$Component);
|
|
116
|
-
|
|
117
|
-
var _super = _createSuper(Carousel);
|
|
118
|
-
|
|
119
|
-
function Carousel(props, context) {
|
|
120
|
-
var _this;
|
|
121
|
-
|
|
122
|
-
(0, _classCallCheck2.default)(this, Carousel);
|
|
123
|
-
_this = _super.call(this, props, context);
|
|
124
|
-
_this.handleMouseOver = _this.handleMouseOver.bind((0, _assertThisInitialized2.default)(_this));
|
|
125
|
-
_this.handleMouseOut = _this.handleMouseOut.bind((0, _assertThisInitialized2.default)(_this));
|
|
126
|
-
_this.handlePrev = _this.handlePrev.bind((0, _assertThisInitialized2.default)(_this));
|
|
127
|
-
_this.handleNext = _this.handleNext.bind((0, _assertThisInitialized2.default)(_this));
|
|
128
|
-
_this.handleItemAnimateOutEnd = _this.handleItemAnimateOutEnd.bind((0, _assertThisInitialized2.default)(_this));
|
|
129
|
-
var defaultActiveIndex = props.defaultActiveIndex;
|
|
130
|
-
_this.state = {
|
|
131
|
-
activeIndex: defaultActiveIndex != null ? defaultActiveIndex : 0,
|
|
132
|
-
previousActiveIndex: null,
|
|
133
|
-
direction: null
|
|
134
|
-
};
|
|
135
|
-
_this.isUnmounted = false;
|
|
136
|
-
return _this;
|
|
8
|
+
Object.defineProperty(exports, "default", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function get() {
|
|
11
|
+
return _Carousel2.default;
|
|
137
12
|
}
|
|
13
|
+
});
|
|
138
14
|
|
|
139
|
-
|
|
140
|
-
key: "componentDidMount",
|
|
141
|
-
value: function componentDidMount() {
|
|
142
|
-
this.waitForNext();
|
|
143
|
-
} // eslint-disable-next-line camelcase
|
|
144
|
-
|
|
145
|
-
}, {
|
|
146
|
-
key: "UNSAFE_componentWillReceiveProps",
|
|
147
|
-
value: function UNSAFE_componentWillReceiveProps(nextProps) {
|
|
148
|
-
var activeIndex = this.getActiveIndex();
|
|
149
|
-
|
|
150
|
-
if (nextProps.activeIndex != null && nextProps.activeIndex !== activeIndex) {
|
|
151
|
-
clearTimeout(this.timeout);
|
|
152
|
-
this.setState({
|
|
153
|
-
previousActiveIndex: activeIndex,
|
|
154
|
-
direction: nextProps.direction != null ? nextProps.direction : this.getDirection(activeIndex, nextProps.activeIndex)
|
|
155
|
-
});
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
if (nextProps.activeIndex == null && this.state.activeIndex >= nextProps.children.length) {
|
|
159
|
-
this.setState({
|
|
160
|
-
activeIndex: 0,
|
|
161
|
-
previousActiveIndex: null,
|
|
162
|
-
direction: null
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}, {
|
|
167
|
-
key: "componentWillUnmount",
|
|
168
|
-
value: function componentWillUnmount() {
|
|
169
|
-
clearTimeout(this.timeout);
|
|
170
|
-
this.isUnmounted = true;
|
|
171
|
-
}
|
|
172
|
-
}, {
|
|
173
|
-
key: "getActiveIndex",
|
|
174
|
-
value: function getActiveIndex() {
|
|
175
|
-
var activeIndexProp = this.props.activeIndex;
|
|
176
|
-
return activeIndexProp != null ? activeIndexProp : this.state.activeIndex;
|
|
177
|
-
}
|
|
178
|
-
}, {
|
|
179
|
-
key: "getDirection",
|
|
180
|
-
value: function getDirection(prevIndex, index) {
|
|
181
|
-
if (prevIndex === index) {
|
|
182
|
-
return null;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return prevIndex > index ? 'prev' : 'next';
|
|
186
|
-
}
|
|
187
|
-
}, {
|
|
188
|
-
key: "handleItemAnimateOutEnd",
|
|
189
|
-
value: function handleItemAnimateOutEnd() {
|
|
190
|
-
var _this2 = this;
|
|
191
|
-
|
|
192
|
-
this.setState({
|
|
193
|
-
previousActiveIndex: null,
|
|
194
|
-
direction: null
|
|
195
|
-
}, function () {
|
|
196
|
-
_this2.waitForNext();
|
|
197
|
-
|
|
198
|
-
if (_this2.props.onSlideEnd) {
|
|
199
|
-
_this2.props.onSlideEnd();
|
|
200
|
-
}
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}, {
|
|
204
|
-
key: "handleMouseOut",
|
|
205
|
-
value: function handleMouseOut() {
|
|
206
|
-
if (this.isPaused) {
|
|
207
|
-
this.play();
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}, {
|
|
211
|
-
key: "handleMouseOver",
|
|
212
|
-
value: function handleMouseOver() {
|
|
213
|
-
if (this.props.pauseOnHover) {
|
|
214
|
-
this.pause();
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}, {
|
|
218
|
-
key: "handleNext",
|
|
219
|
-
value: function handleNext(event) {
|
|
220
|
-
var index = this.getActiveIndex() + 1;
|
|
221
|
-
var count = this.props.children.length;
|
|
222
|
-
|
|
223
|
-
if (index > count - 1) {
|
|
224
|
-
if (!this.props.wrap) {
|
|
225
|
-
return;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
index = 0;
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
this.select(index, event, 'next');
|
|
232
|
-
}
|
|
233
|
-
}, {
|
|
234
|
-
key: "handlePrev",
|
|
235
|
-
value: function handlePrev(event) {
|
|
236
|
-
var index = this.getActiveIndex() - 1;
|
|
237
|
-
|
|
238
|
-
if (index < 0) {
|
|
239
|
-
if (!this.props.wrap) {
|
|
240
|
-
return;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
index = this.props.children.length - 1;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
this.select(index, event, 'prev');
|
|
247
|
-
} // This might be a public API.
|
|
248
|
-
|
|
249
|
-
}, {
|
|
250
|
-
key: "pause",
|
|
251
|
-
value: function pause() {
|
|
252
|
-
this.isPaused = true;
|
|
253
|
-
clearTimeout(this.timeout);
|
|
254
|
-
} // This might be a public API.
|
|
255
|
-
|
|
256
|
-
}, {
|
|
257
|
-
key: "play",
|
|
258
|
-
value: function play() {
|
|
259
|
-
this.isPaused = false;
|
|
260
|
-
this.waitForNext();
|
|
261
|
-
}
|
|
262
|
-
}, {
|
|
263
|
-
key: "select",
|
|
264
|
-
value: function select(index, event, direction) {
|
|
265
|
-
clearTimeout(this.timeout); // TODO: Is this necessary? Seems like the only risk is if the component
|
|
266
|
-
// unmounts while handleItemAnimateOutEnd fires.
|
|
267
|
-
|
|
268
|
-
if (this.isUnmounted) {
|
|
269
|
-
return;
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
var previousActiveIndex = this.props.slide ? this.getActiveIndex() : null;
|
|
273
|
-
direction = direction || this.getDirection(previousActiveIndex, index);
|
|
274
|
-
var onSelect = this.props.onSelect;
|
|
275
|
-
|
|
276
|
-
if (onSelect) {
|
|
277
|
-
if (onSelect.length > 1) {
|
|
278
|
-
// React SyntheticEvents are pooled, so we need to remove this event
|
|
279
|
-
// from the pool to add a custom property. To avoid unnecessarily
|
|
280
|
-
// removing objects from the pool, only do this when the listener
|
|
281
|
-
// actually wants the event.
|
|
282
|
-
if (event) {
|
|
283
|
-
event.persist();
|
|
284
|
-
event.direction = direction;
|
|
285
|
-
} else {
|
|
286
|
-
event = {
|
|
287
|
-
direction: direction
|
|
288
|
-
};
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
onSelect(index, event);
|
|
292
|
-
} else {
|
|
293
|
-
onSelect(index);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
if (this.props.activeIndex == null && index !== previousActiveIndex) {
|
|
298
|
-
if (this.state.previousActiveIndex != null) {
|
|
299
|
-
// If currently animating don't activate the new index.
|
|
300
|
-
// TODO: look into queueing this canceled call and
|
|
301
|
-
// animating after the current animation has ended.
|
|
302
|
-
return;
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
this.setState({
|
|
306
|
-
activeIndex: index,
|
|
307
|
-
previousActiveIndex: previousActiveIndex,
|
|
308
|
-
direction: direction
|
|
309
|
-
});
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
}, {
|
|
313
|
-
key: "waitForNext",
|
|
314
|
-
value: function waitForNext() {
|
|
315
|
-
var _this$props = this.props,
|
|
316
|
-
slide = _this$props.slide,
|
|
317
|
-
interval = _this$props.interval,
|
|
318
|
-
activeIndexProp = _this$props.activeIndex;
|
|
319
|
-
|
|
320
|
-
if (!this.isPaused && slide && interval && activeIndexProp == null) {
|
|
321
|
-
this.timeout = setTimeout(this.handleNext, interval);
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}, {
|
|
325
|
-
key: "renderControls",
|
|
326
|
-
value: function renderControls(properties) {
|
|
327
|
-
var wrap = properties.wrap,
|
|
328
|
-
children = properties.children,
|
|
329
|
-
activeIndex = properties.activeIndex,
|
|
330
|
-
prevIcon = properties.prevIcon,
|
|
331
|
-
nextIcon = properties.nextIcon,
|
|
332
|
-
prevLabel = properties.prevLabel,
|
|
333
|
-
nextLabel = properties.nextLabel;
|
|
334
|
-
var controlClassName = 'carousel-control';
|
|
335
|
-
var count = children.length;
|
|
336
|
-
return [(wrap || activeIndex !== 0) && /*#__PURE__*/_react.default.createElement("a", {
|
|
337
|
-
key: "prev",
|
|
338
|
-
className: (0, _classnames.default)(controlClassName, 'left'),
|
|
339
|
-
onClick: this.handlePrev
|
|
340
|
-
}, prevIcon, prevLabel && /*#__PURE__*/_react.default.createElement("span", {
|
|
341
|
-
className: "sr-only"
|
|
342
|
-
}, prevLabel)), (wrap || activeIndex !== count - 1) && /*#__PURE__*/_react.default.createElement("a", {
|
|
343
|
-
key: "next",
|
|
344
|
-
className: (0, _classnames.default)(controlClassName, 'right'),
|
|
345
|
-
onClick: this.handleNext
|
|
346
|
-
}, nextIcon, nextLabel && /*#__PURE__*/_react.default.createElement("span", {
|
|
347
|
-
className: "sr-only"
|
|
348
|
-
}, nextLabel))];
|
|
349
|
-
}
|
|
350
|
-
}, {
|
|
351
|
-
key: "renderIndicators",
|
|
352
|
-
value: function renderIndicators(children, activeIndex) {
|
|
353
|
-
var _this3 = this;
|
|
354
|
-
|
|
355
|
-
var indicators = [];
|
|
356
|
-
|
|
357
|
-
_react.default.Children.map(children, function (child, index) {
|
|
358
|
-
indicators.push( /*#__PURE__*/_react.default.createElement("li", {
|
|
359
|
-
key: index,
|
|
360
|
-
className: index === activeIndex ? 'active' : null,
|
|
361
|
-
onClick: function onClick(e) {
|
|
362
|
-
return _this3.select(index, e);
|
|
363
|
-
}
|
|
364
|
-
}), // Force whitespace between indicator elements. Bootstrap requires
|
|
365
|
-
// this for correct spacing of elements.
|
|
366
|
-
' ');
|
|
367
|
-
});
|
|
368
|
-
|
|
369
|
-
return /*#__PURE__*/_react.default.createElement("ol", {
|
|
370
|
-
className: 'carousel-indicators'
|
|
371
|
-
}, indicators);
|
|
372
|
-
}
|
|
373
|
-
}, {
|
|
374
|
-
key: "render",
|
|
375
|
-
value: function render() {
|
|
376
|
-
var _this4 = this;
|
|
377
|
-
|
|
378
|
-
var _this$props2 = this.props,
|
|
379
|
-
slide = _this$props2.slide,
|
|
380
|
-
indicators = _this$props2.indicators,
|
|
381
|
-
controls = _this$props2.controls,
|
|
382
|
-
wrap = _this$props2.wrap,
|
|
383
|
-
prevIcon = _this$props2.prevIcon,
|
|
384
|
-
prevLabel = _this$props2.prevLabel,
|
|
385
|
-
nextIcon = _this$props2.nextIcon,
|
|
386
|
-
nextLabel = _this$props2.nextLabel,
|
|
387
|
-
className = _this$props2.className,
|
|
388
|
-
children = _this$props2.children,
|
|
389
|
-
props = (0, _objectWithoutProperties2.default)(_this$props2, _excluded);
|
|
390
|
-
var _this$state = this.state,
|
|
391
|
-
previousActiveIndex = _this$state.previousActiveIndex,
|
|
392
|
-
direction = _this$state.direction;
|
|
393
|
-
var elementProps = (0, _without.default)(['interval', 'pauseOnHover', 'onSelect', 'onSlideEnd', 'activeIndex', // Accessed via this.getActiveIndex().
|
|
394
|
-
'defaultActiveIndex', 'direction'])(props);
|
|
395
|
-
var activeIndex = this.getActiveIndex();
|
|
396
|
-
var classes = {
|
|
397
|
-
// ...getClassSet(bsProps),
|
|
398
|
-
slide: slide
|
|
399
|
-
};
|
|
400
|
-
return /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, elementProps, {
|
|
401
|
-
className: (0, _classnames.default)('carousel', className, classes),
|
|
402
|
-
onMouseOver: this.handleMouseOver,
|
|
403
|
-
onMouseOut: this.handleMouseOut
|
|
404
|
-
}), indicators && this.renderIndicators(children, activeIndex), /*#__PURE__*/_react.default.createElement("div", {
|
|
405
|
-
className: 'carousel-inner'
|
|
406
|
-
}, _react.default.Children.map(children, function (child, index) {
|
|
407
|
-
var active = index === activeIndex;
|
|
408
|
-
var previousActive = slide && index === previousActiveIndex;
|
|
409
|
-
return /*#__PURE__*/(0, _react.cloneElement)(child, {
|
|
410
|
-
active: active,
|
|
411
|
-
index: index,
|
|
412
|
-
animateOut: previousActive,
|
|
413
|
-
animateIn: active && previousActiveIndex != null && slide,
|
|
414
|
-
direction: direction,
|
|
415
|
-
onAnimateOutEnd: previousActive ? _this4.handleItemAnimateOutEnd : null
|
|
416
|
-
});
|
|
417
|
-
})), controls && this.renderControls({
|
|
418
|
-
wrap: wrap,
|
|
419
|
-
children: children,
|
|
420
|
-
activeIndex: activeIndex,
|
|
421
|
-
prevIcon: prevIcon,
|
|
422
|
-
prevLabel: prevLabel,
|
|
423
|
-
nextIcon: nextIcon,
|
|
424
|
-
nextLabel: nextLabel
|
|
425
|
-
}));
|
|
426
|
-
}
|
|
427
|
-
}]);
|
|
428
|
-
return Carousel;
|
|
429
|
-
}(_react.default.Component);
|
|
15
|
+
var _react = _interopRequireDefault(require("react"));
|
|
430
16
|
|
|
431
|
-
|
|
432
|
-
Carousel.defaultProps = defaultProps;
|
|
433
|
-
Carousel.Caption = _CarouselCaption.default;
|
|
434
|
-
Carousel.Item = _CarouselItem.default;
|
|
435
|
-
var _default = Carousel;
|
|
436
|
-
exports.default = _default;
|
|
17
|
+
var _Carousel2 = _interopRequireDefault(require("react-bootstrap/Carousel"));
|
|
@@ -42,7 +42,7 @@ var CheckboxIcon = function CheckboxIcon(props) {
|
|
|
42
42
|
className: "rioglyph ".concat(icon),
|
|
43
43
|
style: iconStyles
|
|
44
44
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
45
|
-
className:
|
|
45
|
+
className: "checkbox-label"
|
|
46
46
|
}, text));
|
|
47
47
|
};
|
|
48
48
|
|
|
@@ -58,7 +58,7 @@ var Checkbox = function Checkbox(props) {
|
|
|
58
58
|
iconLabelPosition = props.iconLabelPosition,
|
|
59
59
|
iconSize = props.iconSize,
|
|
60
60
|
_props$id = props.id,
|
|
61
|
-
id = _props$id === void 0 ? name : _props$id,
|
|
61
|
+
id = _props$id === void 0 ? props.name : _props$id,
|
|
62
62
|
indeterminate = props.indeterminate,
|
|
63
63
|
inline = props.inline,
|
|
64
64
|
inputRef = props.inputRef,
|
|
@@ -132,7 +132,7 @@ var Checkbox = function Checkbox(props) {
|
|
|
132
132
|
}), /*#__PURE__*/_react.default.createElement("input", {
|
|
133
133
|
id: id,
|
|
134
134
|
name: name,
|
|
135
|
-
type:
|
|
135
|
+
type: "checkbox",
|
|
136
136
|
checked: checked,
|
|
137
137
|
required: required,
|
|
138
138
|
defaultChecked: defaultChecked,
|
|
@@ -147,7 +147,7 @@ var Checkbox = function Checkbox(props) {
|
|
|
147
147
|
iconLabelPosition: iconLabelPosition,
|
|
148
148
|
text: text
|
|
149
149
|
}), renderDefault && /*#__PURE__*/_react.default.createElement("span", {
|
|
150
|
-
className:
|
|
150
|
+
className: "checkbox-text"
|
|
151
151
|
}, /*#__PURE__*/_react.default.createElement("span", null, text)), renderCustomContent && children);
|
|
152
152
|
};
|
|
153
153
|
|
|
@@ -27,7 +27,7 @@ var _moment = _interopRequireDefault(require("moment"));
|
|
|
27
27
|
|
|
28
28
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
29
29
|
|
|
30
|
-
var _excluded = ["dropup", "alignRight", "onChange", "className"];
|
|
30
|
+
var _excluded = ["dropup", "alignRight", "onChange", "className", "mandatory", "dateValidation"];
|
|
31
31
|
|
|
32
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
33
33
|
|
|
@@ -37,11 +37,13 @@ var isValidDate = function isValidDate(date) {
|
|
|
37
37
|
return (0, _typeof2.default)(date) === 'object';
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
var DatePicker = function DatePicker(props
|
|
40
|
+
var DatePicker = function DatePicker(props) {
|
|
41
41
|
var dropup = props.dropup,
|
|
42
42
|
alignRight = props.alignRight,
|
|
43
43
|
onChange = props.onChange,
|
|
44
44
|
className = props.className,
|
|
45
|
+
mandatory = props.mandatory,
|
|
46
|
+
dateValidation = props.dateValidation,
|
|
45
47
|
remainingProp = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
46
48
|
|
|
47
49
|
var _useState = (0, _react.useState)(false),
|
|
@@ -49,13 +51,17 @@ var DatePicker = function DatePicker(props, ref) {
|
|
|
49
51
|
hasError = _useState2[0],
|
|
50
52
|
setHasError = _useState2[1];
|
|
51
53
|
|
|
54
|
+
var validateDate = function validateDate(dateToValidate) {
|
|
55
|
+
return dateValidation ? dateValidation(dateToValidate) : isValidDate(dateToValidate);
|
|
56
|
+
};
|
|
57
|
+
|
|
52
58
|
var handleChange = function handleChange(date) {
|
|
53
|
-
var isValid =
|
|
59
|
+
var isValid = mandatory ? validateDate(date) : true;
|
|
54
60
|
setHasError(!isValid);
|
|
55
61
|
onChange(date, isValid);
|
|
56
62
|
};
|
|
57
63
|
|
|
58
|
-
var classes = (0, _classnames.default)('DatePicker', hasError && 'has-error', dropup && 'dropup', alignRight && 'align-right', className && className);
|
|
64
|
+
var classes = (0, _classnames.default)('DatePicker', 'form-group', hasError && 'has-error', dropup && 'dropup', alignRight && 'align-right', className && className);
|
|
59
65
|
return /*#__PURE__*/_react.default.createElement(_reactDatetime.default, (0, _extends2.default)({}, remainingProp, {
|
|
60
66
|
onChange: handleChange,
|
|
61
67
|
className: classes
|
|
@@ -69,7 +75,8 @@ DatePicker.defaultProps = {
|
|
|
69
75
|
locale: 'en-GB',
|
|
70
76
|
onChange: function onChange() {},
|
|
71
77
|
clearableInput: false,
|
|
72
|
-
minWidth: 0
|
|
78
|
+
minWidth: 0,
|
|
79
|
+
mandatory: true
|
|
73
80
|
};
|
|
74
81
|
DatePicker.propTypes = {
|
|
75
82
|
className: _propTypes.default.string,
|
|
@@ -80,7 +87,9 @@ DatePicker.propTypes = {
|
|
|
80
87
|
onChange: _propTypes.default.func,
|
|
81
88
|
dropup: _propTypes.default.bool,
|
|
82
89
|
minWidth: _propTypes.default.number,
|
|
83
|
-
alignRight: _propTypes.default.bool
|
|
90
|
+
alignRight: _propTypes.default.bool,
|
|
91
|
+
mandatory: _propTypes.default.bool,
|
|
92
|
+
dateValidation: _propTypes.default.func
|
|
84
93
|
};
|
|
85
94
|
var _default = DatePicker;
|
|
86
95
|
exports.default = _default;
|
|
@@ -85,7 +85,8 @@ var ButtonDropdown = function ButtonDropdown(props) {
|
|
|
85
85
|
onOpen = props.onOpen,
|
|
86
86
|
onClose = props.onClose,
|
|
87
87
|
onLabelButtonClick = props.onLabelButtonClick,
|
|
88
|
-
usePortal = props.usePortal
|
|
88
|
+
usePortal = props.usePortal,
|
|
89
|
+
popperConfig = props.popperConfig;
|
|
89
90
|
|
|
90
91
|
var _useState = (0, _react.useState)(open),
|
|
91
92
|
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
@@ -102,17 +103,12 @@ var ButtonDropdown = function ButtonDropdown(props) {
|
|
|
102
103
|
refDropdownMenu = _React$useState4[0],
|
|
103
104
|
setRefDropdownMenu = _React$useState4[1];
|
|
104
105
|
|
|
105
|
-
var
|
|
106
|
-
name: 'flip',
|
|
107
|
-
options: {
|
|
108
|
-
fallbackPlacements: ['top-start', 'top-end']
|
|
109
|
-
}
|
|
110
|
-
}];
|
|
111
|
-
|
|
112
|
-
var _usePopper = (0, _reactPopper.usePopper)(refDropdownToggle, refDropdownMenu, {
|
|
106
|
+
var defaultPopperConfig = {
|
|
113
107
|
placement: getPlacement(pullRight, dropup),
|
|
114
|
-
modifiers:
|
|
115
|
-
}
|
|
108
|
+
modifiers: []
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var _usePopper = (0, _reactPopper.usePopper)(refDropdownToggle, refDropdownMenu, popperConfig || defaultPopperConfig),
|
|
116
112
|
styles = _usePopper.styles,
|
|
117
113
|
attributes = _usePopper.attributes;
|
|
118
114
|
|
|
@@ -229,6 +225,7 @@ ButtonDropdown.propTypes = {
|
|
|
229
225
|
toggleClassName: _propTypes.default.string,
|
|
230
226
|
onLabelButtonClick: _propTypes.default.func,
|
|
231
227
|
customDropdown: _propTypes.default.node,
|
|
228
|
+
popperConfig: _propTypes.default.object,
|
|
232
229
|
enableOnClickOutside: _propTypes.default.func,
|
|
233
230
|
disableOnClickOutside: _propTypes.default.func,
|
|
234
231
|
onOpen: _propTypes.default.func,
|