@rio-cloud/rio-uikit 0.16.1-beta.23 → 0.16.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/ActionBarItem.d.ts +1 -1
- package/ActionBarItemList.d.ts +1 -1
- package/ActionBarItemListItem.d.ts +1 -1
- package/ActionBarItemListSeparator.d.ts +1 -1
- package/Activity.d.ts +1 -1
- package/AnimatedNumber.d.ts +1 -1
- package/AppNavigationBar.d.ts +1 -1
- package/ApplicationHeader.d.ts +1 -1
- package/ApplicationLayout.d.ts +1 -1
- package/ApplicationLayoutBodyBanner.d.ts +1 -1
- package/ApplicationLayoutBodyBottomBar.d.ts +1 -1
- package/ApplicationLayoutBodyNavigation.d.ts +1 -1
- package/Area.d.ts +1 -1
- package/AreaChart.d.ts +1 -1
- package/AreaGradient.d.ts +1 -1
- package/AssetTree.d.ts +1 -1
- package/AutoSuggest.d.ts +6 -5
- package/Bar.d.ts +5 -2
- package/BarChart.d.ts +1 -1
- package/BottomSheet.d.ts +1 -1
- package/BrowserWarning.d.ts +1 -1
- package/Button.d.ts +24 -2
- package/ButtonDropdown.d.ts +1 -1
- package/Carousel.d.ts +3 -1
- package/ChartNeedle.d.ts +1 -1
- package/ChartTooltip.d.ts +1 -1
- package/Checkbox.d.ts +1 -1
- package/Circle.d.ts +1 -1
- package/ClearableInput.d.ts +1 -1
- package/ClusterLayer.d.ts +1 -1
- package/ClusterMapMarker.d.ts +1 -1
- package/ClusterUtils.d.ts +1 -1
- package/Collapse.d.ts +1 -1
- package/Colors.d.ts +1 -1
- package/ConfirmationDialog.d.ts +9 -2
- package/ContentLoader.d.ts +5 -2
- package/ContextMenu.d.ts +1 -1
- package/ContextMenuItem.d.ts +1 -1
- package/CustomState.d.ts +1 -1
- package/DataTab.d.ts +1 -1
- package/DataTabs.d.ts +1 -1
- package/DatePicker.d.ts +1 -1
- package/DateRangePicker.d.ts +1 -1
- package/DeviceUtils.d.ts +1 -1
- package/Dialog.d.ts +1 -1
- package/DomMarker.d.ts +1 -1
- package/DropdownSubmenu.d.ts +1 -1
- package/EmptyState.d.ts +1 -1
- package/EnhancedMapEvent.d.ts +1 -1
- package/ErrorState.d.ts +1 -1
- package/EventUtils.d.ts +1 -1
- package/ExpanderList.d.ts +5 -5
- package/ExpanderPanel.d.ts +1 -1
- package/Fade.d.ts +11 -2
- package/FilePicker.d.ts +6 -2
- package/ForbiddenState.d.ts +1 -1
- package/ImagePreloader.d.ts +1 -1
- package/IncidentsLayer.d.ts +1 -1
- package/InfoDialog.d.ts +1 -1
- package/Legend.d.ts +1 -1
- package/Line.d.ts +1 -1
- package/LineChart.d.ts +1 -1
- package/ListMenu.d.ts +6 -5
- package/LoadMoreButton.d.ts +1 -1
- package/MaintenanceState.d.ts +1 -1
- package/Map.d.ts +10 -7
- package/MapBoundingBoxButton.d.ts +1 -1
- package/MapCenterMarkerButton.d.ts +1 -1
- package/MapClusterSettings.d.ts +1 -1
- package/MapCustomerPoiSettingsItem.d.ts +1 -1
- package/MapLayerGroup.d.ts +1 -1
- package/MapLayerIncidentsItem.d.ts +1 -1
- package/MapLayerRoadRestrictionsItem.d.ts +1 -1
- package/MapLayerSettings.d.ts +1 -1
- package/MapLayerTrafficItem.d.ts +1 -1
- package/MapLockMarkerButton.d.ts +1 -1
- package/MapSettings.d.ts +1 -1
- package/MapSettingsItem.d.ts +1 -1
- package/MapSettingsPanel.d.ts +1 -1
- package/MapSettingsTile.d.ts +1 -1
- package/MapTypeSettings.d.ts +1 -1
- package/MapWorkshopPoiSettingsItem.d.ts +1 -1
- package/Marker.d.ts +1 -1
- package/MarkerLayer.d.ts +1 -1
- package/MediaDialog.d.ts +8 -4
- package/MenuItem.d.ts +2 -2
- package/Multiselect.d.ts +11 -4
- package/NoData.d.ts +1 -1
- package/NotBookedState.d.ts +1 -1
- package/NotFoundState.d.ts +1 -1
- package/Notification.d.ts +1 -1
- package/NotificationsContainer.d.ts +1 -1
- package/NumberControl.d.ts +5 -2
- package/NumberInput.d.ts +5 -2
- package/OnboardingTip.d.ts +27 -2
- package/OverlayTrigger.d.ts +26 -2
- package/Pager.d.ts +1 -1
- package/PieChart.d.ts +1 -1
- package/Polygon.d.ts +1 -1
- package/Polyline.d.ts +1 -1
- package/Popover.d.ts +8 -2
- package/Position.d.ts +1 -1
- package/PositionUtils.d.ts +1 -1
- package/RadialBarChart.d.ts +1 -1
- package/RadioButton.d.ts +1 -1
- package/RangeSlider.d.ts +1 -1
- package/ReleaseNotes.d.ts +1 -1
- package/ReleaseNotesDialog.d.ts +1 -1
- package/Resizer.d.ts +10 -2
- package/ResponsiveVideo.d.ts +5 -2
- package/Route.d.ts +1 -1
- package/RuleConnector.d.ts +9 -0
- package/RuleConnector.js +2 -0
- package/RuleContainer.d.ts +5 -0
- package/RuleContainer.js +2 -0
- package/RulesWrapper.d.ts +5 -0
- package/RulesWrapper.js +2 -0
- package/SaveDialog.d.ts +9 -2
- package/Select.d.ts +5 -5
- package/Sidebar.d.ts +8 -2
- package/SimpleButtonDropdown.d.ts +1 -1
- package/SimpleClusterLayer.d.ts +1 -1
- package/SimpleDialog.d.ts +9 -2
- package/SimpleTooltip.d.ts +26 -2
- package/SingleButtonDropdown.d.ts +1 -1
- package/SingleMapMarker.d.ts +1 -1
- package/Slider.d.ts +1 -1
- package/SortArrowDown.d.ts +1 -1
- package/SortArrowUp.d.ts +1 -1
- package/SortArrows.d.ts +1 -1
- package/SortDirection.d.ts +1 -1
- package/SortUtils.d.ts +1 -1
- package/Spinner.d.ts +1 -1
- package/SplitButtonDropdown.d.ts +1 -1
- package/SplitDialog.d.ts +9 -2
- package/StatsWidget.d.ts +1 -1
- package/StatsWidgetNumber.d.ts +1 -1
- package/StatsWidgetSpacer.d.ts +1 -1
- package/StatsWidgets.d.ts +1 -1
- package/StatusBar.d.ts +1 -1
- package/SteppedProgressBar.d.ts +6 -2
- package/SubNavigation.d.ts +1 -1
- package/Switch.d.ts +5 -2
- package/TableCardsSorting.d.ts +1 -1
- package/TableSearch.d.ts +1 -1
- package/TableSettingsDialog.d.ts +1 -1
- package/TableToolbar.d.ts +1 -1
- package/TableViewToggles.d.ts +1 -1
- package/Tag.d.ts +1 -1
- package/TagList.d.ts +1 -1
- package/TagManager.d.ts +5 -5
- package/Teaser.d.ts +1 -1
- package/TeaserContainer.d.ts +1 -1
- package/TextMarker.d.ts +1 -1
- package/TimePicker.d.ts +1 -1
- package/ToggleButton.d.ts +1 -1
- package/Tooltip.d.ts +29 -2
- package/TrafficLayer.d.ts +1 -1
- package/Tree.d.ts +1 -1
- package/TreeCategory.d.ts +1 -1
- package/TreeOption.d.ts +1 -1
- package/TreeSearch.d.ts +1 -1
- package/TreeSummary.d.ts +1 -1
- package/TruckLayer.d.ts +1 -1
- package/TypeCounter.d.ts +1 -1
- package/VolkswagenApplicationHeader.d.ts +1 -1
- package/components/button/Button.js +6 -3
- package/components/datepicker/DatePicker.js +5 -2
- package/components/dialog/SplitDialog.js +5 -2
- package/components/dropdown/ButtonDropdown.js +9 -3
- package/components/map/components/Map.js +24 -1
- package/components/overlay/OverlayTrigger.js +2 -1
- package/components/rules/RuleConnector.js +76 -0
- package/components/rules/RuleContainer.js +68 -0
- package/components/rules/RulesWrapper.js +17 -0
- package/components/selects/BaseDropdownMenu.js +40 -26
- package/components/selects/Multiselect.js +5 -3
- package/components/selects/Select.js +7 -5
- package/framer-motion.d.ts +1 -0
- package/index.d.ts +7 -1
- package/index.js +6 -0
- package/lib/es/AutoSuggest.d.ts +6 -5
- package/lib/es/Bar.d.ts +4 -1
- package/lib/es/Button.d.ts +23 -1
- package/lib/es/Carousel.d.ts +2 -0
- package/lib/es/ConfirmationDialog.d.ts +8 -1
- package/lib/es/ContentLoader.d.ts +4 -1
- package/lib/es/ExpanderList.d.ts +5 -5
- package/lib/es/Fade.d.ts +10 -1
- package/lib/es/FilePicker.d.ts +5 -1
- package/lib/es/ListMenu.d.ts +6 -5
- package/lib/es/Map.d.ts +10 -7
- package/lib/es/MediaDialog.d.ts +8 -4
- package/lib/es/MenuItem.d.ts +1 -1
- package/lib/es/Multiselect.d.ts +11 -4
- package/lib/es/NumberControl.d.ts +4 -1
- package/lib/es/NumberInput.d.ts +4 -1
- package/lib/es/OnboardingTip.d.ts +26 -1
- package/lib/es/OverlayTrigger.d.ts +25 -1
- package/lib/es/Popover.d.ts +7 -1
- package/lib/es/Resizer.d.ts +9 -1
- package/lib/es/ResponsiveVideo.d.ts +4 -1
- package/lib/es/RuleConnector.d.ts +9 -0
- package/lib/es/RuleConnector.js +13 -0
- package/lib/es/RuleContainer.d.ts +5 -0
- package/lib/es/RuleContainer.js +13 -0
- package/lib/es/RulesWrapper.d.ts +5 -0
- package/lib/es/RulesWrapper.js +13 -0
- package/lib/es/SaveDialog.d.ts +8 -1
- package/lib/es/Select.d.ts +5 -5
- package/lib/es/Sidebar.d.ts +7 -1
- package/lib/es/SimpleDialog.d.ts +8 -1
- package/lib/es/SimpleTooltip.d.ts +25 -1
- package/lib/es/SplitDialog.d.ts +8 -1
- package/lib/es/SteppedProgressBar.d.ts +5 -1
- package/lib/es/Switch.d.ts +4 -1
- package/lib/es/TagManager.d.ts +5 -5
- package/lib/es/Tooltip.d.ts +28 -1
- package/lib/es/components/button/Button.js +6 -3
- package/lib/es/components/datepicker/DatePicker.js +3 -3
- package/lib/es/components/dialog/SplitDialog.js +5 -2
- package/lib/es/components/dropdown/ButtonDropdown.js +9 -3
- package/lib/es/components/map/components/Map.js +24 -1
- package/lib/es/components/overlay/OverlayTrigger.js +2 -1
- package/lib/es/components/rules/RuleConnector.js +84 -0
- package/lib/es/components/rules/RuleContainer.js +76 -0
- package/lib/es/components/rules/RulesWrapper.js +25 -0
- package/lib/es/components/selects/BaseDropdownMenu.js +40 -26
- package/lib/es/components/selects/Multiselect.js +5 -3
- package/lib/es/components/selects/Select.js +7 -5
- package/lib/es/framer-motion.d.ts +1 -0
- package/lib/es/index.d.ts +8 -2
- package/lib/es/index.js +24 -0
- package/lib/es/styles/components/Dialog.less +10 -0
- package/lib/es/styles/components/Dropdown.less +11 -2
- package/lib/es/styles/components/Select.less +5 -6
- package/lib/es/styles/design/box-sizing.less +8 -0
- package/lib/es/styles/design/fonts.less +23 -23
- package/lib/es/styles/design/normalize.less +0 -2
- package/lib/es/styles/design/responsive/flexgrid.less +4 -6
- package/lib/es/styles/design/responsive/sizing.less +3 -0
- package/lib/es/styles/design/tables.less +5 -0
- package/lib/es/styles/mixins/panels.less +3 -3
- package/lib/es/styles/print/print.less +36 -4
- package/lib/es/styles/rio-uikit-core.less +2 -1
- package/lib/es/styles/rio-uikit-print-utilities.less +1 -0
- package/lib/es/themes/Website/styles/rio-website.less +2 -2
- package/lib/es/types.ts +40 -16
- package/lib/es/utils/init.js +1 -1
- package/lib/es/version.json +1 -1
- package/package.json +13 -11
- package/styles/components/Dialog.less +10 -0
- package/styles/components/Dropdown.less +11 -2
- package/styles/components/Select.less +5 -6
- package/styles/design/box-sizing.less +8 -0
- package/styles/design/fonts.less +23 -23
- package/styles/design/normalize.less +0 -2
- package/styles/design/responsive/flexgrid.less +4 -6
- package/styles/design/responsive/sizing.less +3 -0
- package/styles/design/tables.less +5 -0
- package/styles/mixins/panels.less +3 -3
- package/styles/print/print.less +36 -4
- package/styles/rio-uikit-core.less +2 -1
- package/styles/rio-uikit-print-utilities.less +1 -0
- package/themes/Website/styles/rio-website.less +2 -2
- package/types.ts +40 -16
- package/useAfterMount.d.ts +1 -1
- package/useClickOutside.d.ts +1 -1
- package/useClipboard.d.ts +1 -1
- package/useDebugInfo.d.ts +1 -1
- package/useEffectOnce.d.ts +1 -1
- package/useElementSize.d.ts +1 -1
- package/useEsc.d.ts +1 -1
- package/useEvent.d.ts +1 -1
- package/useFullscreen.d.ts +1 -1
- package/useInterval.d.ts +1 -1
- package/useKey.d.ts +1 -1
- package/useLocalStorage.d.ts +1 -1
- package/useOnScreen.d.ts +1 -1
- package/useOnlineStatus.d.ts +1 -1
- package/useRenderCount.d.ts +1 -1
- package/useResizeObserver.d.ts +1 -1
- package/useSessionStorage.d.ts +1 -1
- package/useStateWithValidation.d.ts +1 -1
- package/useTimeout.d.ts +1 -1
- package/useWindowResize.d.ts +1 -1
- package/utils/init.js +1 -1
- package/version.json +1 -1
- package/.DS_Store +0 -0
- package/components/.DS_Store +0 -0
- package/components/map/.DS_Store +0 -0
- package/lib/.DS_Store +0 -0
- package/lib/es/.DS_Store +0 -0
- package/lib/es/components/.DS_Store +0 -0
- package/lib/es/styles/.DS_Store +0 -0
- package/lib/es/themes/.DS_Store +0 -0
- package/styles/.DS_Store +0 -0
- package/themes/.DS_Store +0 -0
- package/themes/Volkswagen/.DS_Store +0 -0
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/ResponsiveVideo' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ResponsiveVideoProps } from './types';
|
|
4
|
-
export default class ResponsiveVideo extends React.Component<ResponsiveVideoProps> {
|
|
4
|
+
export default class ResponsiveVideo extends React.Component<ResponsiveVideoProps> {
|
|
5
|
+
static ASPECT_RATIO_4_BY_3 = '4by3';
|
|
6
|
+
static ASPECT_RATIO_16_BY_9 = '16by9';
|
|
7
|
+
}
|
|
5
8
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare module '@rio-cloud/rio-uikit/lib/es/RuleConnector' {
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { RuleConnectorProps } from './types';
|
|
4
|
+
export default class RuleConnector extends React.Component<RuleConnectorProps> {
|
|
5
|
+
static START = 'start';
|
|
6
|
+
static CENTER = 'center';
|
|
7
|
+
static END = 'end';
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _RuleConnector2["default"];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _RuleConnector2 = _interopRequireDefault(require("./components/rules/RuleConnector"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _RuleContainer2["default"];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _RuleContainer2 = _interopRequireDefault(require("./components/rules/RuleContainer"));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "default", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function get() {
|
|
10
|
+
return _RulesWrapper2["default"];
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _RulesWrapper2 = _interopRequireDefault(require("./components/rules/RulesWrapper"));
|
package/lib/es/SaveDialog.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/SaveDialog' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SaveDialogProps } from './types';
|
|
4
|
-
export default class SaveDialog extends React.Component<SaveDialogProps> {
|
|
4
|
+
export default class SaveDialog extends React.Component<SaveDialogProps> {
|
|
5
|
+
static SIZE_SM = 'sm';
|
|
6
|
+
static SIZE_MD = 'md';
|
|
7
|
+
static SIZE_LG = 'lg';
|
|
8
|
+
static SIZE_XL = 'xl';
|
|
9
|
+
static SIZE_FULL = 'full';
|
|
10
|
+
static SIZE_FULL_SCREEN = 'fullscreen';
|
|
11
|
+
}
|
|
5
12
|
}
|
package/lib/es/Select.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SelectProps } from './types';
|
|
3
|
+
|
|
4
|
+
export { SelectOption } from './types';
|
|
5
|
+
export default class Select extends React.Component<SelectProps> {}
|
package/lib/es/Sidebar.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/Sidebar' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SidebarProps } from './types';
|
|
4
|
-
export default class Sidebar extends React.Component<SidebarProps> {
|
|
4
|
+
export default class Sidebar extends React.Component<SidebarProps> {
|
|
5
|
+
static LEFT = 'left';
|
|
6
|
+
static RIGHT = 'right';
|
|
7
|
+
|
|
8
|
+
static MODE_FLY = 'fly';
|
|
9
|
+
static MODE_FLUID = 'fluid';
|
|
10
|
+
}
|
|
5
11
|
}
|
package/lib/es/SimpleDialog.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/SimpleDialog' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SimpleDialogProps } from './types';
|
|
4
|
-
export default class SimpleDialog extends React.Component<SimpleDialogProps> {
|
|
4
|
+
export default class SimpleDialog extends React.Component<SimpleDialogProps> {
|
|
5
|
+
static SIZE_SM = 'sm';
|
|
6
|
+
static SIZE_MD = 'md';
|
|
7
|
+
static SIZE_LG = 'lg';
|
|
8
|
+
static SIZE_XL = 'xl';
|
|
9
|
+
static SIZE_FULL = 'full';
|
|
10
|
+
static SIZE_FULL_SCREEN = 'fullscreen';
|
|
11
|
+
}
|
|
5
12
|
}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/SimpleTooltip' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SimpleTooltipProps } from './types';
|
|
4
|
-
export default class SimpleTooltip extends React.Component<SimpleTooltipProps> {
|
|
4
|
+
export default class SimpleTooltip extends React.Component<SimpleTooltipProps> {
|
|
5
|
+
static TRIGGER_CLICK = 'click';
|
|
6
|
+
static TRIGGER_HOVER = 'hover';
|
|
7
|
+
static TRIGGER_FOCUS = 'focus';
|
|
8
|
+
|
|
9
|
+
static AUTO_START = 'auto-start';
|
|
10
|
+
static AUTO = 'auto';
|
|
11
|
+
static AUTO_END = 'auto-end';
|
|
12
|
+
|
|
13
|
+
static TOP_START = 'top-start';
|
|
14
|
+
static TOP = 'top';
|
|
15
|
+
static TOP_END = 'top-end';
|
|
16
|
+
|
|
17
|
+
static BOTTOM_START = 'bottom-start';
|
|
18
|
+
static BOTTOM = 'bottom';
|
|
19
|
+
static BOTTOM_END = 'bottom-end';
|
|
20
|
+
|
|
21
|
+
static RIGHT_START = 'right-start';
|
|
22
|
+
static RIGHT = 'right';
|
|
23
|
+
static RIGHT_END = 'right-end';
|
|
24
|
+
|
|
25
|
+
static LEFT_START = 'left-start';
|
|
26
|
+
static LEFT = 'left';
|
|
27
|
+
static LEFT_END = 'left-end';
|
|
28
|
+
}
|
|
5
29
|
}
|
package/lib/es/SplitDialog.d.ts
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/SplitDialog' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SplitDialogProps } from './types';
|
|
4
|
-
export default class SplitDialog extends React.Component<SplitDialogProps> {
|
|
4
|
+
export default class SplitDialog extends React.Component<SplitDialogProps> {
|
|
5
|
+
static SIZE_SM = 'sm';
|
|
6
|
+
static SIZE_MD = 'md';
|
|
7
|
+
static SIZE_LG = 'lg';
|
|
8
|
+
static SIZE_XL = 'xl';
|
|
9
|
+
static SIZE_FULL = 'full';
|
|
10
|
+
static SIZE_FULL_SCREEN = 'fullscreen';
|
|
11
|
+
}
|
|
5
12
|
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/SteppedProgressBar' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SteppedProgressBarProps } from './types';
|
|
4
|
-
export default class SteppedProgressBar extends React.Component<SteppedProgressBarProps> {
|
|
4
|
+
export default class SteppedProgressBar extends React.Component<SteppedProgressBarProps> {
|
|
5
|
+
static VARIANT_CIRCLE = 'circle';
|
|
6
|
+
static VARIANT_RECTANGLE = 'rectangle';
|
|
7
|
+
static VARIANT_ROADSIGN = 'roadsign';
|
|
8
|
+
}
|
|
5
9
|
}
|
package/lib/es/Switch.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/Switch' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { SwitchProps } from './types';
|
|
4
|
-
export default class Switch extends React.Component<SwitchProps> {
|
|
4
|
+
export default class Switch extends React.Component<SwitchProps> {
|
|
5
|
+
static LABEL_POSITION_LEFT = 'left';
|
|
6
|
+
static LABEL_POSITION_RIGHT = 'right';
|
|
7
|
+
}
|
|
5
8
|
}
|
package/lib/es/TagManager.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TagManagerProps } from './types';
|
|
3
|
+
|
|
4
|
+
export { TagManagerTag } from './types';
|
|
5
|
+
export default class TagManager extends React.Component<TagManagerProps> {}
|
package/lib/es/Tooltip.d.ts
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
declare module '@rio-cloud/rio-uikit/lib/es/Tooltip' {
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TooltipProps } from './types';
|
|
4
|
-
export default class Tooltip extends React.Component<TooltipProps> {
|
|
4
|
+
export default class Tooltip extends React.Component<TooltipProps> {
|
|
5
|
+
static STYLE_DEFAULT = 'default';
|
|
6
|
+
static STYLE_ONBOARDING = 'onboarding';
|
|
7
|
+
|
|
8
|
+
static AUTO_START = 'auto-start';
|
|
9
|
+
static AUTO = 'auto';
|
|
10
|
+
static AUTO_END = 'auto-end';
|
|
11
|
+
|
|
12
|
+
static TOP_START = 'top-start';
|
|
13
|
+
static TOP = 'top';
|
|
14
|
+
static TOP_END = 'top-end';
|
|
15
|
+
|
|
16
|
+
static BOTTOM_START = 'bottom-start';
|
|
17
|
+
static BOTTOM = 'bottom';
|
|
18
|
+
static BOTTOM_END = 'bottom-end';
|
|
19
|
+
|
|
20
|
+
static RIGHT_START = 'right-start';
|
|
21
|
+
static RIGHT = 'right';
|
|
22
|
+
static RIGHT_END = 'right-end';
|
|
23
|
+
|
|
24
|
+
static LEFT_START = 'left-start';
|
|
25
|
+
static LEFT = 'left';
|
|
26
|
+
static LEFT_END = 'left-end';
|
|
27
|
+
|
|
28
|
+
static TEXT_ALIGNMENT_LEFT = 'left';
|
|
29
|
+
static TEXT_ALIGNMENT_CENTER = 'center';
|
|
30
|
+
static TEXT_ALIGNMENT_RIGHT = 'right';
|
|
31
|
+
}
|
|
5
32
|
}
|
|
@@ -13,7 +13,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
15
|
var _buttonEffect = require("../../utils/buttonEffect");
|
|
16
|
-
var _excluded = ["active", "disabled", "asToggle", "onClick", "bsStyle", "bsSize", "variant", "iconOnly", "multiline", "block", "className", "children"];
|
|
16
|
+
var _excluded = ["active", "disabled", "asToggle", "onClick", "bsStyle", "bsSize", "variant", "iconOnly", "multiline", "block", "className", "noRippleEffect", "children"];
|
|
17
17
|
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); }
|
|
18
18
|
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; }
|
|
19
19
|
var Button = function Button(props) {
|
|
@@ -28,6 +28,7 @@ var Button = function Button(props) {
|
|
|
28
28
|
multiline = props.multiline,
|
|
29
29
|
block = props.block,
|
|
30
30
|
className = props.className,
|
|
31
|
+
noRippleEffect = props.noRippleEffect,
|
|
31
32
|
children = props.children,
|
|
32
33
|
remainingProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
33
34
|
var _useState = (0, _react.useState)(active),
|
|
@@ -45,7 +46,7 @@ var Button = function Button(props) {
|
|
|
45
46
|
// Register a dedicated click event on the button to interrupt
|
|
46
47
|
// the actual 'onClick' callback passed into the component from outside
|
|
47
48
|
(0, _react.useEffect)(function () {
|
|
48
|
-
if (!btnRef.current) {
|
|
49
|
+
if (noRippleEffect || !btnRef.current) {
|
|
49
50
|
return;
|
|
50
51
|
}
|
|
51
52
|
var mouseListener = btnRef.current.addEventListener('mousedown', _buttonEffect.createButtonRipple, false);
|
|
@@ -54,7 +55,7 @@ var Button = function Button(props) {
|
|
|
54
55
|
mouseListener && btnRef.current.removeEventListener('mousedown', _buttonEffect.createButtonRipple, false);
|
|
55
56
|
touchListener && btnRef.current.removeEventListener('touchstart', _buttonEffect.createButtonRipple, false);
|
|
56
57
|
};
|
|
57
|
-
}, [btnRef.current]);
|
|
58
|
+
}, [btnRef.current, noRippleEffect]);
|
|
58
59
|
|
|
59
60
|
// Intercept click handler only for toggle button to update
|
|
60
61
|
// internal state and blur after click
|
|
@@ -102,6 +103,7 @@ Button.defaultProps = {
|
|
|
102
103
|
iconOnly: false,
|
|
103
104
|
multiline: false,
|
|
104
105
|
block: false,
|
|
106
|
+
noRippleEffect: false,
|
|
105
107
|
onClick: function onClick() {},
|
|
106
108
|
className: '',
|
|
107
109
|
bsStyle: 'default'
|
|
@@ -117,6 +119,7 @@ Button.propTypes = {
|
|
|
117
119
|
bsStyle: _propTypes["default"].oneOf([Button.DEFAULT, Button.PRIMARY, Button.SECONDARY, Button.INFO, Button.WARNING, Button.DANGER, Button.SUCCESS, Button.MUTED]),
|
|
118
120
|
bsSize: _propTypes["default"].oneOf([Button.XS, Button.SM, Button.MD, Button.LG]),
|
|
119
121
|
variant: _propTypes["default"].oneOf([Button.VARIANT_LINK, Button.VARIANT_LINK_INLINE, Button.VARIANT_OUTLINE, Button.VARIANT_ACTION]),
|
|
122
|
+
noRippleEffect: _propTypes["default"].bool,
|
|
120
123
|
className: _propTypes["default"].string
|
|
121
124
|
};
|
|
122
125
|
var _default = Button;
|
|
@@ -12,12 +12,12 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
|
|
|
12
12
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
14
14
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
15
|
-
var _reactDatetime = _interopRequireDefault(require("react-datetime"));
|
|
16
|
-
var _moment = _interopRequireDefault(require("moment"));
|
|
17
15
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
16
|
+
var _reactDatetime = _interopRequireDefault(require("react-datetime"));
|
|
18
17
|
var _excluded = ["dropup", "alignRight", "onChange", "className", "mandatory", "dateValidation"];
|
|
19
18
|
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); }
|
|
20
19
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
|
|
20
|
+
var Datetime = _reactDatetime["default"]["default"] ? _reactDatetime["default"]["default"] : _reactDatetime["default"];
|
|
21
21
|
var isValidDate = function isValidDate(date) {
|
|
22
22
|
return (0, _typeof2["default"])(date) === 'object';
|
|
23
23
|
};
|
|
@@ -42,7 +42,7 @@ var DatePicker = function DatePicker(props) {
|
|
|
42
42
|
onChange(date, isValid);
|
|
43
43
|
};
|
|
44
44
|
var classes = (0, _classnames["default"])('DatePicker', 'form-group', hasError && 'has-error', dropup && 'dropup', alignRight && 'align-right', className && className);
|
|
45
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
45
|
+
return /*#__PURE__*/_react["default"].createElement(Datetime, (0, _extends2["default"])({}, remainingProp, {
|
|
46
46
|
onChange: handleChange,
|
|
47
47
|
className: classes
|
|
48
48
|
}));
|
|
@@ -7,18 +7,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
11
|
var _react = _interopRequireDefault(require("react"));
|
|
11
12
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
14
|
var _Dialog = _interopRequireDefault(require("./Dialog"));
|
|
14
15
|
var _baseDialogPropTypes = _interopRequireDefault(require("./baseDialogPropTypes"));
|
|
16
|
+
var _excluded = ["leftContent", "rightContent", "onClose", "className"];
|
|
15
17
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
18
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
19
|
var SplitDialog = function SplitDialog(props) {
|
|
18
20
|
var leftContent = props.leftContent,
|
|
19
21
|
rightContent = props.rightContent,
|
|
20
22
|
onClose = props.onClose,
|
|
21
|
-
className = props.className
|
|
23
|
+
className = props.className,
|
|
24
|
+
remainingProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
22
25
|
var dialogClassName = "split-dialog ".concat(className);
|
|
23
26
|
var dividerClasses = (0, _classnames["default"])('split-divider', 'bg-lighter');
|
|
24
27
|
var body = /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -30,7 +33,7 @@ var SplitDialog = function SplitDialog(props) {
|
|
|
30
33
|
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
31
34
|
className: "split-right"
|
|
32
35
|
}, rightContent));
|
|
33
|
-
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], (0, _extends2["default"])({},
|
|
36
|
+
return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], (0, _extends2["default"])({}, remainingProps, {
|
|
34
37
|
body: body,
|
|
35
38
|
onHide: onClose,
|
|
36
39
|
className: dialogClassName
|
|
@@ -75,11 +75,16 @@ var ButtonDropdown = function ButtonDropdown(props) {
|
|
|
75
75
|
_React$useState4 = (0, _slicedToArray2["default"])(_React$useState3, 2),
|
|
76
76
|
refDropdownMenu = _React$useState4[0],
|
|
77
77
|
setRefDropdownMenu = _React$useState4[1];
|
|
78
|
+
var _React$useState5 = _react["default"].useState(null),
|
|
79
|
+
_React$useState6 = (0, _slicedToArray2["default"])(_React$useState5, 2),
|
|
80
|
+
refSplitButtonToggle = _React$useState6[0],
|
|
81
|
+
setRefSplitButtonToggle = _React$useState6[1];
|
|
78
82
|
var defaultPopperConfig = {
|
|
79
83
|
placement: getPlacement(pullRight, dropup),
|
|
80
84
|
modifiers: []
|
|
81
85
|
};
|
|
82
|
-
var
|
|
86
|
+
var popperParentRef = splitButton && pullRight ? refSplitButtonToggle : refDropdownToggle;
|
|
87
|
+
var _usePopper = (0, _reactPopper.usePopper)(popperParentRef, refDropdownMenu, popperConfig || defaultPopperConfig),
|
|
83
88
|
styles = _usePopper.styles,
|
|
84
89
|
attributes = _usePopper.attributes;
|
|
85
90
|
var wrapperRef = (0, _useClickOutside["default"])(function () {
|
|
@@ -121,7 +126,7 @@ var ButtonDropdown = function ButtonDropdown(props) {
|
|
|
121
126
|
var handleDropdownButtonClick = splitButton ? handleSplitLabelButtonClick : toggleOpen;
|
|
122
127
|
var isOpen = isUncontrolled ? internalOpen : open;
|
|
123
128
|
var wrapperClasses = (0, _classnames["default"])('dropdown', 'btn-group', isOpen && 'open', className);
|
|
124
|
-
var dropdownClasses = (0, _classnames["default"])(usePortal && 'dropdown-portal', dropdownClassName);
|
|
129
|
+
var dropdownClasses = (0, _classnames["default"])(usePortal && 'dropdown-portal', splitButton && pullRight && 'pull-right', dropdownClassName);
|
|
125
130
|
var dropdownMenu = /*#__PURE__*/_react["default"].createElement(_MenuItems["default"], (0, _extends2["default"])({
|
|
126
131
|
className: dropdownClasses,
|
|
127
132
|
ref: setRefDropdownMenu,
|
|
@@ -145,7 +150,8 @@ var ButtonDropdown = function ButtonDropdown(props) {
|
|
|
145
150
|
bsStyle: bsStyle,
|
|
146
151
|
disabled: disabled,
|
|
147
152
|
className: toggleClassName,
|
|
148
|
-
onClick: toggleOpen
|
|
153
|
+
onClick: toggleOpen,
|
|
154
|
+
ref: setRefSplitButtonToggle
|
|
149
155
|
}), isOpen && usePortal && /*#__PURE__*/_reactDom["default"].createPortal(dropdownMenu, dropdownRoot), isOpen && !usePortal && dropdownMenu);
|
|
150
156
|
};
|
|
151
157
|
ButtonDropdown.defaultProps = {
|
|
@@ -139,6 +139,7 @@ var Map = function Map(props) {
|
|
|
139
139
|
eventListenerMap = props.eventListenerMap,
|
|
140
140
|
mapType = props.mapType,
|
|
141
141
|
mapLayer = props.mapLayer,
|
|
142
|
+
externalShowCluster = props.showCluster,
|
|
142
143
|
showScaleBar = props.showScaleBar,
|
|
143
144
|
onMapLayerChange = props.onMapLayerChange,
|
|
144
145
|
onMapTypeChange = props.onMapTypeChange,
|
|
@@ -168,7 +169,7 @@ var Map = function Map(props) {
|
|
|
168
169
|
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
169
170
|
activeLayers = _useState10[0],
|
|
170
171
|
setActiveLayers = _useState10[1];
|
|
171
|
-
var _useState11 = (0, _react.useState)(
|
|
172
|
+
var _useState11 = (0, _react.useState)(externalShowCluster),
|
|
172
173
|
_useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
|
|
173
174
|
showCluster = _useState12[0],
|
|
174
175
|
setShowCluster = _useState12[1];
|
|
@@ -255,6 +256,8 @@ var Map = function Map(props) {
|
|
|
255
256
|
};
|
|
256
257
|
}
|
|
257
258
|
}, []);
|
|
259
|
+
|
|
260
|
+
// Update BoundingBox from outside
|
|
258
261
|
(0, _react.useEffect)(function () {
|
|
259
262
|
if (api && boundingBox) {
|
|
260
263
|
var top = boundingBox.top,
|
|
@@ -266,16 +269,35 @@ var Map = function Map(props) {
|
|
|
266
269
|
}, zoomAnimation);
|
|
267
270
|
}
|
|
268
271
|
}, [boundingBox]);
|
|
272
|
+
|
|
273
|
+
// Update Zoom from outside
|
|
269
274
|
(0, _react.useEffect)(function () {
|
|
270
275
|
if (api && zoom) {
|
|
271
276
|
api.map.setZoom(zoom, zoomAnimation);
|
|
272
277
|
}
|
|
273
278
|
}, [zoom]);
|
|
279
|
+
|
|
280
|
+
// Update Lat & Lng from outside
|
|
274
281
|
(0, _react.useEffect)(function () {
|
|
275
282
|
if (api && center) {
|
|
276
283
|
api.map.setCenter(center, zoomAnimation);
|
|
277
284
|
}
|
|
278
285
|
}, [center]);
|
|
286
|
+
|
|
287
|
+
// Update MapType from outside
|
|
288
|
+
(0, _react.useEffect)(function () {
|
|
289
|
+
return setBaseLayer(mapType);
|
|
290
|
+
}, [mapType]);
|
|
291
|
+
|
|
292
|
+
// Update MapLayer from outside
|
|
293
|
+
(0, _react.useEffect)(function () {
|
|
294
|
+
return setActiveLayers(mapLayer);
|
|
295
|
+
}, [mapLayer]);
|
|
296
|
+
|
|
297
|
+
// Update Cluster setting from outside
|
|
298
|
+
(0, _react.useEffect)(function () {
|
|
299
|
+
return setShowCluster(externalShowCluster);
|
|
300
|
+
}, [externalShowCluster]);
|
|
279
301
|
var handleMapTypeChange = function handleMapTypeChange(newMapType) {
|
|
280
302
|
setBaseLayer(newMapType);
|
|
281
303
|
onMapTypeChange(newMapType, mapType);
|
|
@@ -357,6 +379,7 @@ var Map = function Map(props) {
|
|
|
357
379
|
return getLayer(api, layer, language);
|
|
358
380
|
}, activeLayers), renderChildren()));
|
|
359
381
|
};
|
|
382
|
+
;
|
|
360
383
|
Map.TYPE_DEFAULT = _constants.MAP_TYPE_DEFAULT;
|
|
361
384
|
Map.TYPE_FLEET_STYLE = _constants.MAP_TYPE_FLEET_STYLE;
|
|
362
385
|
Map.TYPE_SATELLITE = _constants.MAP_TYPE_SATELLITE;
|
|
@@ -13,10 +13,11 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
13
13
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
14
14
|
var _OverlayTrigger2 = _interopRequireDefault(require("react-bootstrap/OverlayTrigger"));
|
|
15
15
|
var _excluded = ["rootClose"];
|
|
16
|
+
var _OverlayTrigger = _OverlayTrigger2["default"]["default"] ? _OverlayTrigger2["default"]["default"] : _OverlayTrigger2["default"];
|
|
16
17
|
function OverlayTrigger(props) {
|
|
17
18
|
var rootClose = props.rootClose,
|
|
18
19
|
remainingProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
19
|
-
return /*#__PURE__*/_react["default"].createElement(
|
|
20
|
+
return /*#__PURE__*/_react["default"].createElement(_OverlayTrigger, (0, _extends2["default"])({
|
|
20
21
|
rootClose: rootClose
|
|
21
22
|
}, remainingProps));
|
|
22
23
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
var _excluded = ["placement", "icon", "hidden", "background", "pageBackground", "contentClassName", "hasBorder", "borderColor", "className", "children"];
|
|
14
|
+
var getBorderColorFromBg = function getBorderColorFromBg(bg) {
|
|
15
|
+
return bg.replace('bg', 'border-color');
|
|
16
|
+
};
|
|
17
|
+
var RuleConnector = function RuleConnector(props) {
|
|
18
|
+
var placement = props.placement,
|
|
19
|
+
icon = props.icon,
|
|
20
|
+
hidden = props.hidden,
|
|
21
|
+
background = props.background,
|
|
22
|
+
pageBackground = props.pageBackground,
|
|
23
|
+
contentClassName = props.contentClassName,
|
|
24
|
+
hasBorder = props.hasBorder,
|
|
25
|
+
borderColor = props.borderColor,
|
|
26
|
+
className = props.className,
|
|
27
|
+
children = props.children,
|
|
28
|
+
remainingProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
29
|
+
var wrapperClassNames = (0, _classnames["default"])('RuleConnector', 'height-20', 'display-flex', "justify-content-".concat(placement), 'align-items-center', 'position-relative', hidden && 'opacity-0', className);
|
|
30
|
+
var commonRoundedClasses = (0, _classnames["default"])('width-20', 'height-20', 'rounded-circle', 'position-relative', 'z-index-2', 'box-sizing-content-box');
|
|
31
|
+
var commonRoundedBorderClippingClasses = (0, _classnames["default"])('position-relative', 'width-20', 'height-20');
|
|
32
|
+
var leftRoundedBox = (0, _classnames["default"])('margin-right--10', commonRoundedClasses, pageBackground, hasBorder && "border ".concat(borderColor));
|
|
33
|
+
var leftRoundedBoxBorderClipping = (0, _classnames["default"])('right-50pct', commonRoundedBorderClippingClasses, pageBackground);
|
|
34
|
+
var contentWrapperClassNames = (0, _classnames["default"])('padding-left-20 padding-right-20', 'z-index-1', background, hasBorder && "border ".concat(getBorderColorFromBg(background)));
|
|
35
|
+
var rightRoundedBox = (0, _classnames["default"])('margin-left--10', commonRoundedClasses, pageBackground, hasBorder && "border ".concat(borderColor));
|
|
36
|
+
var rightRoundedBoxBorderClipping = (0, _classnames["default"])('left-50pct', commonRoundedBorderClippingClasses, pageBackground);
|
|
37
|
+
return /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
|
|
38
|
+
"data-testid": "ruleConnector"
|
|
39
|
+
}, remainingProps, {
|
|
40
|
+
className: wrapperClassNames
|
|
41
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
42
|
+
className: leftRoundedBox
|
|
43
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
44
|
+
className: leftRoundedBoxBorderClipping
|
|
45
|
+
})), /*#__PURE__*/_react["default"].createElement("span", {
|
|
46
|
+
className: contentWrapperClassNames
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement("span", {
|
|
48
|
+
className: contentClassName
|
|
49
|
+
}, children ? children : /*#__PURE__*/_react["default"].createElement("span", {
|
|
50
|
+
className: "rioglyph ".concat(icon),
|
|
51
|
+
"data-testid": "ruleConnectorIcon"
|
|
52
|
+
}))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
53
|
+
className: rightRoundedBox
|
|
54
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
55
|
+
className: rightRoundedBoxBorderClipping
|
|
56
|
+
})));
|
|
57
|
+
};
|
|
58
|
+
RuleConnector.START = 'start';
|
|
59
|
+
RuleConnector.CENTER = 'center';
|
|
60
|
+
RuleConnector.END = 'end';
|
|
61
|
+
RuleConnector.defaultProps = {
|
|
62
|
+
placement: 'center',
|
|
63
|
+
icon: 'rioglyph-plus',
|
|
64
|
+
hidden: false,
|
|
65
|
+
background: 'bg-lightest',
|
|
66
|
+
pageBackground: 'bg-white',
|
|
67
|
+
contentClassName: 'text-color-light',
|
|
68
|
+
hasBorder: false,
|
|
69
|
+
borderColor: '',
|
|
70
|
+
className: ''
|
|
71
|
+
};
|
|
72
|
+
RuleConnector.propTypes = {
|
|
73
|
+
placement: _propTypes["default"].oneOf([RuleConnector.START, RuleConnector.CENTER, RuleConnector.END]),
|
|
74
|
+
icon: _propTypes["default"].string,
|
|
75
|
+
hidden: _propTypes["default"].bool,
|
|
76
|
+
background: _propTypes["default"].string,
|
|
77
|
+
pageBackground: _propTypes["default"].string,
|
|
78
|
+
contentClassName: _propTypes["default"].string,
|
|
79
|
+
hasBorder: _propTypes["default"].bool,
|
|
80
|
+
borderColor: _propTypes["default"].string,
|
|
81
|
+
className: _propTypes["default"].string
|
|
82
|
+
};
|
|
83
|
+
var _default = RuleConnector;
|
|
84
|
+
exports["default"] = _default;
|