@rio-cloud/rio-uikit 0.15.0-beta-45 → 0.15.0-beta-49
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 +12 -8
- package/lib/components/actionBarItem/ActionBarItem.js +9 -0
- package/lib/components/actionBarItem/ActionBarItemList.js +38 -0
- package/lib/components/actionBarItem/ActionBarItemListItem.js +51 -0
- package/lib/components/actionBarItem/ActionBarItemListSeparator.js +37 -0
- package/lib/components/actionBarItem/ActionBarOverlay.js +2 -2
- package/lib/components/animatedNumber/AnimatedNumber.js +81 -0
- package/lib/components/applicationHeader/ApplicationHeader.js +4 -1
- package/lib/components/applicationLayout/ApplicationLayoutBody.js +3 -1
- package/lib/components/assetTree/AssetTree.less +1 -0
- package/lib/components/assetTree/Tree.js +3 -3
- package/lib/components/autosuggest/AutoSuggest.js +5 -3
- package/lib/components/bottomSheet/BottomSheet.js +157 -0
- package/lib/components/button/Button.js +127 -7
- package/lib/components/button/ToggleButton.js +11 -108
- package/lib/components/charts/BarChart.js +4 -3
- package/lib/components/charts/ChartNeedle.js +57 -0
- package/lib/components/charts/PieChart.js +19 -15
- package/lib/components/charts/RadialBarChart.js +4 -1
- package/lib/components/charts/chartHelper.js +3 -3
- package/lib/components/checkbox/Checkbox.js +127 -171
- package/lib/components/checkbox/Checkbox.less +4 -2
- package/lib/components/clearableInput/ClearableInput.js +2 -2
- package/lib/components/clearableInput/ClearableInput.less +1 -0
- package/lib/components/dataTabs/DataTabs.js +78 -120
- package/lib/components/datepicker/DatePicker.less +4 -0
- package/lib/components/datepicker/DateRangePicker.js +3 -3
- package/lib/components/dialog/Dialog.js +2 -2
- package/lib/components/dialog/InfoDialog.js +2 -2
- package/lib/components/dialog/MediaDialog.js +2 -2
- package/lib/components/dialog/SaveDialog.js +2 -2
- package/lib/components/dialog/SimpleDialog.js +2 -2
- package/lib/components/dialog/SplitDialog.js +2 -2
- package/lib/components/driverName/DriverName.js +1 -1
- package/lib/components/dropdown/ButtonDropdown.js +2 -2
- package/lib/components/dropdown/DropdownSubmenu.less +2 -2
- package/lib/components/fade/Fade.js +2 -2
- package/lib/components/filepicker/FilePicker.js +2 -2
- package/lib/components/listMenu/ListMenu.js +2 -2
- package/lib/components/loadMore/LoadMoreButton.js +1 -1
- package/lib/components/map/components/Map.js +2 -2
- package/lib/components/map/components/constants.js +1 -1
- package/lib/components/map/components/features/Route.js +2 -2
- package/lib/components/map/components/features/basics/MapLayerGroup.js +2 -2
- package/lib/components/map/components/features/basics/marker/Marker.js +2 -1
- package/lib/components/map/components/features/basics/marker/TextMarker.js +1 -1
- package/lib/components/map/components/features/layers/MarkerLayer.js +2 -2
- package/lib/components/map/components/features/layers/clustering/SimpleClusterLayer.js +2 -2
- package/lib/components/map/utils/eventHandling.js +5 -4
- package/lib/components/map/utils/hooks.js +1 -1
- package/lib/components/map/utils/validation.js +1 -1
- package/lib/components/numberControl/NumberControl.js +161 -145
- package/lib/components/numberInput/NumberInput.js +147 -229
- package/lib/components/onboarding/OnboardingTip.js +1 -1
- package/lib/components/overlay/OverlayTrigger.js +2 -1
- package/lib/components/radiobutton/RadioButton.js +116 -148
- package/lib/components/radiobutton/RadioButton.less +10 -6
- package/lib/components/resizer/Resizer.less +2 -2
- package/lib/components/selects/BaseDropdownMenu.js +2 -2
- package/lib/components/selects/DropdownHeader.js +2 -6
- package/lib/components/spinner/Spinner.js +1 -1
- package/lib/components/spinner/Spinner.less +2 -2
- package/lib/components/states/MaintenanceState.js +25 -0
- package/lib/components/states/baseStatePropTypes.js +1 -1
- package/lib/components/supportMarker/toggleSupportMarker.js +1 -1
- package/lib/components/table/SortArrows.js +1 -1
- package/lib/components/table/TableCardsSorting.js +7 -7
- package/lib/components/table/TableSettingsDialog.js +2 -2
- package/lib/components/table/TableSettingsListItem.js +1 -1
- package/lib/components/teaser/Teaser.js +1 -1
- package/lib/components/timepicker/TimePicker.js +10 -2
- package/lib/components/tooltip/Tooltip.js +4 -4
- package/lib/es/ActionBarItem.d.ts +6 -0
- package/lib/es/ActionBarItemList.d.ts +5 -0
- package/lib/es/ActionBarItemList.js +15 -0
- package/lib/es/ActionBarItemListItem.d.ts +5 -0
- package/lib/es/ActionBarItemListItem.js +15 -0
- package/lib/es/ActionBarItemListSeparator.d.ts +5 -0
- package/lib/es/ActionBarItemListSeparator.js +15 -0
- package/lib/es/AnimatedNumber.d.ts +5 -0
- package/lib/es/AnimatedNumber.js +15 -0
- package/lib/es/BottomSheet.d.ts +5 -0
- package/lib/es/BottomSheet.js +15 -0
- package/lib/es/ChartNeedle.d.ts +5 -0
- package/lib/es/ChartNeedle.js +15 -0
- package/lib/es/DeviceUtils.d.ts +5 -0
- package/lib/es/MaintenanceState.d.ts +5 -0
- package/lib/es/MaintenanceState.js +15 -0
- package/lib/es/SortDirection.d.ts +6 -0
- package/lib/es/SortDirection.js +13 -0
- package/lib/es/SortUtils.d.ts +6 -0
- package/lib/es/SortUtils.js +19 -0
- package/lib/es/SupportMarker.js +15 -0
- package/lib/es/deviceUtils.js +14 -2
- package/lib/es/routeUtils.js +6 -6
- package/lib/es/useAfterMount.d.ts +4 -0
- package/lib/es/useAfterMount.js +15 -0
- package/lib/es/useClickOutside.d.ts +4 -0
- package/lib/es/useClickOutside.js +15 -0
- package/lib/es/useClipboard.d.ts +4 -0
- package/lib/es/useClipboard.js +15 -0
- package/lib/es/useDebugInfo.d.ts +4 -0
- package/lib/es/useDebugInfo.js +15 -0
- package/lib/es/useEffectOnce.d.ts +4 -0
- package/lib/es/useEffectOnce.js +15 -0
- package/lib/es/useElementSize.d.ts +4 -0
- package/lib/es/useElementSize.js +15 -0
- package/lib/es/useEsc.d.ts +4 -0
- package/lib/es/useEsc.js +15 -0
- package/lib/es/useEvent.d.ts +4 -0
- package/lib/es/useEvent.js +15 -0
- package/lib/es/useInterval.d.ts +4 -0
- package/lib/es/useInterval.js +15 -0
- package/lib/es/useKey.d.ts +4 -0
- package/lib/es/useKey.js +15 -0
- package/lib/es/useLocalStorage.d.ts +4 -0
- package/lib/es/useLocalStorage.js +13 -0
- package/lib/es/useOnMount.js +15 -0
- package/lib/es/useOnScreen.d.ts +4 -0
- package/lib/es/useOnScreen.js +15 -0
- package/lib/es/useOnlineStatus.d.ts +4 -0
- package/lib/es/useOnlineStatus.js +15 -0
- package/lib/es/useRenderCount.d.ts +4 -0
- package/lib/es/useRenderCount.js +15 -0
- package/lib/es/useSessionStorage.d.ts +4 -0
- package/lib/es/useSessionStorage.js +13 -0
- package/lib/es/useStateWithValidation.d.ts +4 -0
- package/lib/es/useStateWithValidation.js +15 -0
- package/lib/es/useTimeout.d.ts +4 -0
- package/lib/es/useTimeout.js +15 -0
- package/lib/es/useWindowResize.d.ts +4 -0
- package/lib/es/useWindowResize.js +15 -0
- package/lib/hooks/useDebugInfo.js +55 -0
- package/lib/hooks/useInterval.js +30 -0
- package/lib/hooks/useOnScreen.js +46 -0
- package/lib/hooks/useOnlineStatus.js +30 -0
- package/lib/hooks/useRenderCount.js +17 -0
- package/lib/hooks/useStateWithValidation.js +33 -0
- package/lib/hooks/useStorage.js +53 -0
- package/lib/hooks/useTimeout.js +9 -6
- package/lib/hooks/useWindowResize.js +9 -3
- package/lib/index.js +280 -264
- package/lib/mapIndex.js +72 -72
- package/lib/style/css/_exports/man-uikit.less +1 -0
- package/lib/style/css/_exports/rio-buyButton.less +5 -0
- package/lib/style/css/_exports/rio-uikit-core.less +2 -2
- package/lib/style/css/_exports/rio-uikit-print-utilities.less +21 -0
- package/lib/style/css/_exports/rio-uikit-responsive-utilities.less +2 -1
- package/lib/style/css/_exports/rio-uikit.less +1 -0
- package/lib/style/css/_exports/rio-website.less +70 -0
- package/lib/style/css/_exports/vw-uikit.less +2 -1
- package/lib/style/css/bootstrap/dropdowns.less +13 -13
- package/lib/style/css/rio-theme/button-groups.less +1 -1
- package/lib/style/css/rio-theme/buttons.less +57 -1
- package/lib/style/css/rio-theme/carousel.less +1 -1
- package/lib/style/css/rio-theme/dropdowns.less +6 -26
- package/lib/style/css/rio-theme/navbar.less +45 -2
- package/lib/style/css/rio-theme/navs.less +19 -0
- package/lib/style/css/rio-theme/pagination.less +1 -1
- package/lib/style/css/utils/_imports.less +82 -0
- package/lib/style/css/utils/animations/translate.less +4 -1
- package/lib/style/css/utils/responsive/border.less +27 -19
- package/lib/style/css/utils/responsive/display.less +2 -0
- package/lib/style/css/utils/responsive/grid.less +6 -0
- package/lib/style/css/utils/responsive/sizing.less +1 -1
- package/lib/style/css/utils/text.less +3 -0
- package/lib/style/fonts/rioglyph/rioglyph.less +74 -14
- package/lib/style/fonts/rioglyph/rioglyph.svg +106 -34
- package/lib/style/fonts/rioglyph/rioglyph.ttf +0 -0
- package/lib/style/fonts/rioglyph/rioglyph.woff +0 -0
- package/lib/types.ts +150 -11
- package/lib/utils/SortUtils.js +54 -0
- package/lib/utils/buttonEffect.js +68 -0
- package/lib/utils/deviceUtils.js +1 -1
- package/lib/utils/logDeprecatedWarnings.js +1 -1
- package/lib/utils/logPropError.js +1 -1
- package/lib/utils/routeUtils.js +7 -6
- package/lib/utils/scrollItemIntoView.js +1 -1
- package/lib/version.json +1 -1
- package/package.json +65 -69
package/lib/types.ts
CHANGED
|
@@ -20,6 +20,21 @@ export interface ActionBarItemProps {
|
|
|
20
20
|
title?: string | React.ReactNode;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
export interface ActionBarItemListProps {
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface ActionBarItemListItemProps {
|
|
28
|
+
hasLink?: boolean;
|
|
29
|
+
icon?: string;
|
|
30
|
+
onClick?: Function;
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ActionBarItemListSeparatorProps {
|
|
35
|
+
className?: string;
|
|
36
|
+
}
|
|
37
|
+
|
|
23
38
|
export interface ActivityProps {
|
|
24
39
|
activity: string;
|
|
25
40
|
bsSize?: string;
|
|
@@ -31,6 +46,17 @@ export interface ActivityProps {
|
|
|
31
46
|
|
|
32
47
|
export type ActionBarItemPopoverWidth = 100 | 150 | 200 | 250 | 300 | 350 | 400 | 450 | 500;
|
|
33
48
|
|
|
49
|
+
export interface AnimatedNumberProps {
|
|
50
|
+
start: number;
|
|
51
|
+
end: number;
|
|
52
|
+
prefix?: string;
|
|
53
|
+
unit?: string;
|
|
54
|
+
speed?: number;
|
|
55
|
+
decreasing?: boolean;
|
|
56
|
+
onEnd?: Function;
|
|
57
|
+
className?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
34
60
|
export interface ApplicationHeaderProps {
|
|
35
61
|
label?: React.ReactNode;
|
|
36
62
|
homeRoute?: React.ReactNode;
|
|
@@ -242,6 +268,23 @@ export interface BrowserWarningProps {
|
|
|
242
268
|
onBrowserSelect?: Function;
|
|
243
269
|
}
|
|
244
270
|
|
|
271
|
+
export interface BottomSheetProps {
|
|
272
|
+
show: boolean;
|
|
273
|
+
onClose?: Function;
|
|
274
|
+
width?: number | string;
|
|
275
|
+
height?: number | string;
|
|
276
|
+
title?: string | React.ReactNode;
|
|
277
|
+
showCloseButton?: boolean;
|
|
278
|
+
showMaximizeButton?: boolean;
|
|
279
|
+
onHeightChange?: Function;
|
|
280
|
+
detatch?: boolean;
|
|
281
|
+
useBackdrop?: boolean;
|
|
282
|
+
onBackdropClick?: Function;
|
|
283
|
+
bodyRef?: React.MutableRefObject<object>;
|
|
284
|
+
bodyClassName?: string;
|
|
285
|
+
className?: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
245
288
|
export interface BoundingBox {
|
|
246
289
|
top: number;
|
|
247
290
|
bottom: number;
|
|
@@ -249,6 +292,20 @@ export interface BoundingBox {
|
|
|
249
292
|
right: number;
|
|
250
293
|
}
|
|
251
294
|
|
|
295
|
+
export interface ButtonProps {
|
|
296
|
+
active?: boolean;
|
|
297
|
+
disabled?: boolean;
|
|
298
|
+
asToggle?: boolean;
|
|
299
|
+
iconOnly?: boolean;
|
|
300
|
+
multiline?: boolean;
|
|
301
|
+
block?: boolean;
|
|
302
|
+
onClick?: Function;
|
|
303
|
+
bsStyle?: 'default' | 'primary' | 'secondary' | 'info' | 'warning' | 'danger' | 'success' | 'muted';
|
|
304
|
+
bsSize?: 'xs' | 'sm' | 'md' | 'lg';
|
|
305
|
+
variant?: 'link' | 'link-inline' | 'outline' | 'action';
|
|
306
|
+
className?: string;
|
|
307
|
+
}
|
|
308
|
+
|
|
252
309
|
// C --------------------------------------------------------------------------------------------------
|
|
253
310
|
|
|
254
311
|
export interface CarouselProps {
|
|
@@ -269,6 +326,16 @@ export interface CarouselProps {
|
|
|
269
326
|
nextLabel?: string;
|
|
270
327
|
}
|
|
271
328
|
|
|
329
|
+
export interface ChartNeedleProps {
|
|
330
|
+
width?: string;
|
|
331
|
+
height?: string;
|
|
332
|
+
x?: string;
|
|
333
|
+
y?: string;
|
|
334
|
+
rotation?: number;
|
|
335
|
+
className?: string;
|
|
336
|
+
style?: object;
|
|
337
|
+
}
|
|
338
|
+
|
|
272
339
|
export interface CheckboxProps {
|
|
273
340
|
id?: string;
|
|
274
341
|
name?: string;
|
|
@@ -280,6 +347,7 @@ export interface CheckboxProps {
|
|
|
280
347
|
indeterminate?: boolean;
|
|
281
348
|
inline?: boolean;
|
|
282
349
|
right?: boolean;
|
|
350
|
+
custom?: boolean;
|
|
283
351
|
onClick?: Function;
|
|
284
352
|
error?: boolean;
|
|
285
353
|
size?: string;
|
|
@@ -677,6 +745,8 @@ export interface LoadMoreButtonProps {
|
|
|
677
745
|
|
|
678
746
|
// M --------------------------------------------------------------------------------------------------
|
|
679
747
|
|
|
748
|
+
export interface MaintenanceStateProps extends BaseStateProps {}
|
|
749
|
+
|
|
680
750
|
export type markerColor =
|
|
681
751
|
| 'bg-map-marker-asset'
|
|
682
752
|
| 'bg-map-marker-poi'
|
|
@@ -933,7 +1003,7 @@ export interface NotificationsContainerProps {
|
|
|
933
1003
|
|
|
934
1004
|
export type notificationTriggerFunction = (
|
|
935
1005
|
message: string | JSX.Element | JSX.Element[],
|
|
936
|
-
title?: string,
|
|
1006
|
+
title?: string | JSX.Element | JSX.Element[],
|
|
937
1007
|
timeOut?: number,
|
|
938
1008
|
callback?: Function,
|
|
939
1009
|
priority?: boolean
|
|
@@ -1107,10 +1177,12 @@ export interface PieChartProps {
|
|
|
1107
1177
|
nameKey: string;
|
|
1108
1178
|
color?: Function | string;
|
|
1109
1179
|
filled?: boolean;
|
|
1180
|
+
labels?: boolean;
|
|
1110
1181
|
innerLabels?: boolean;
|
|
1111
1182
|
paddingAngle?: number;
|
|
1112
1183
|
legend?: Legend | boolean;
|
|
1113
1184
|
tooltip?: boolean;
|
|
1185
|
+
pieOptions?: object;
|
|
1114
1186
|
}
|
|
1115
1187
|
|
|
1116
1188
|
export interface Position {
|
|
@@ -1186,6 +1258,7 @@ export interface RadioButtonProps {
|
|
|
1186
1258
|
className?: string;
|
|
1187
1259
|
inline?: boolean;
|
|
1188
1260
|
right?: boolean;
|
|
1261
|
+
custom?: boolean;
|
|
1189
1262
|
name?: string;
|
|
1190
1263
|
value?: string | string[] | number;
|
|
1191
1264
|
tabIndex?: number;
|
|
@@ -1786,6 +1859,7 @@ export interface TimePickerProps {
|
|
|
1786
1859
|
onComplete?: Function;
|
|
1787
1860
|
value?: string;
|
|
1788
1861
|
alwaysShowMask?: boolean;
|
|
1862
|
+
showIcon?: boolean;
|
|
1789
1863
|
className?: string;
|
|
1790
1864
|
inputProps?: TimePickerInputProps;
|
|
1791
1865
|
}
|
|
@@ -1925,6 +1999,43 @@ export interface TypeCounterProps {
|
|
|
1925
1999
|
|
|
1926
2000
|
// U --------------------------------------------------------------------------------------------------
|
|
1927
2001
|
|
|
2002
|
+
export type UseAfterMount = (
|
|
2003
|
+
callback: () => void,
|
|
2004
|
+
deps?: any[]
|
|
2005
|
+
) => void;
|
|
2006
|
+
|
|
2007
|
+
export type UseClickOutside<T extends HTMLElement = any> = (
|
|
2008
|
+
callback: () => void,
|
|
2009
|
+
events?: ['mousedown', 'touchstart']
|
|
2010
|
+
) => React.MutableRefObject<T>;
|
|
2011
|
+
|
|
2012
|
+
export type UseClipboard = (options: { timeout: number }) => {
|
|
2013
|
+
copy: (valueToCopy: any) => void;
|
|
2014
|
+
reset: () => void;
|
|
2015
|
+
error: Error;
|
|
2016
|
+
copied: boolean;
|
|
2017
|
+
};
|
|
2018
|
+
|
|
2019
|
+
export type UseDebugInfo = (
|
|
2020
|
+
componentName: string,
|
|
2021
|
+
props: object
|
|
2022
|
+
) => {
|
|
2023
|
+
count: number,
|
|
2024
|
+
changedProps: any,
|
|
2025
|
+
timeSinceLastRender: number,
|
|
2026
|
+
lastRenderTimestamp: number,
|
|
2027
|
+
};
|
|
2028
|
+
|
|
2029
|
+
export type UseEffectOnce = (
|
|
2030
|
+
callback: () => void
|
|
2031
|
+
) => void;
|
|
2032
|
+
|
|
2033
|
+
export type UseElementSize = (
|
|
2034
|
+
elementRef: { current: Element; }
|
|
2035
|
+
) => [number, number];
|
|
2036
|
+
|
|
2037
|
+
export type UseEsc<T extends keyof WindowEventMap> = (callback: (event: WindowEventMap[T]) => any) => void;
|
|
2038
|
+
|
|
1928
2039
|
export type UseEvent<T extends keyof WindowEventMap> = (
|
|
1929
2040
|
eventType: T,
|
|
1930
2041
|
callback: (event: WindowEventMap[T]) => any,
|
|
@@ -1932,22 +2043,50 @@ export type UseEvent<T extends keyof WindowEventMap> = (
|
|
|
1932
2043
|
target?: HTMLElement
|
|
1933
2044
|
) => void;
|
|
1934
2045
|
|
|
2046
|
+
export type UseInterval = (
|
|
2047
|
+
callback: () => void,
|
|
2048
|
+
delay?: number
|
|
2049
|
+
) => React.MutableRefObject<object>;
|
|
2050
|
+
|
|
1935
2051
|
export type UseKey<T extends keyof WindowEventMap> = (
|
|
1936
2052
|
callback: (event: WindowEventMap[T]) => any,
|
|
1937
2053
|
eventTypes?: [T],
|
|
1938
2054
|
node?: any
|
|
1939
2055
|
) => void;
|
|
1940
2056
|
|
|
1941
|
-
export type
|
|
2057
|
+
export type UseOnlineStatus = () => boolean;
|
|
1942
2058
|
|
|
1943
|
-
export type
|
|
2059
|
+
export type UseOnScreen = (
|
|
2060
|
+
ref: React.MutableRefObject<object>,
|
|
2061
|
+
options?: {
|
|
2062
|
+
rootMargins?: string,
|
|
2063
|
+
threshold?: number | number[]
|
|
2064
|
+
}
|
|
2065
|
+
) => boolean;
|
|
2066
|
+
|
|
2067
|
+
export type UseRenderCount = () => number;
|
|
2068
|
+
|
|
2069
|
+
export type UseStateWithValidation = (
|
|
2070
|
+
validationFn: Function,
|
|
2071
|
+
initialValue: any
|
|
2072
|
+
) => [any, Function, boolean];
|
|
2073
|
+
|
|
2074
|
+
export type UseLocalStorage = (
|
|
2075
|
+
key: string,
|
|
2076
|
+
defaultValue: any
|
|
2077
|
+
) => [any, Function, Function];
|
|
2078
|
+
|
|
2079
|
+
export type UseSessionStorage = (
|
|
2080
|
+
key: string,
|
|
2081
|
+
defaultValue: any
|
|
2082
|
+
) => [any, Function, Function];
|
|
2083
|
+
|
|
2084
|
+
export type UseTimeout = (
|
|
1944
2085
|
callback: () => void,
|
|
1945
|
-
|
|
1946
|
-
) => React.MutableRefObject<
|
|
2086
|
+
delay?: number
|
|
2087
|
+
) => React.MutableRefObject<object>;
|
|
1947
2088
|
|
|
1948
|
-
export type
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
copied: boolean;
|
|
1953
|
-
};
|
|
2089
|
+
export type UseWindowResize = (
|
|
2090
|
+
callback: () => void,
|
|
2091
|
+
timeout?: number
|
|
2092
|
+
) => void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.SortDirection = void 0;
|
|
9
|
+
exports.naturalSortByProperty = naturalSortByProperty;
|
|
10
|
+
exports.sortByProperty = sortByProperty;
|
|
11
|
+
|
|
12
|
+
var _orderBy = _interopRequireDefault(require("lodash/fp/orderBy"));
|
|
13
|
+
|
|
14
|
+
var _naturalOrderby = require("natural-orderby");
|
|
15
|
+
|
|
16
|
+
var SortDirection = {
|
|
17
|
+
ASCENDING: 'asc',
|
|
18
|
+
DESCENDING: 'desc'
|
|
19
|
+
};
|
|
20
|
+
exports.SortDirection = SortDirection;
|
|
21
|
+
|
|
22
|
+
var toLowerCaseProp = function toLowerCaseProp(element, prop) {
|
|
23
|
+
if (typeof element[prop] === 'string') {
|
|
24
|
+
return element[prop].toLowerCase();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return element[prop];
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
function sortByProperty(array, property) {
|
|
31
|
+
var sortDirection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : SortDirection.ASCENDING;
|
|
32
|
+
var isCaseSensitiv = arguments.length > 3 ? arguments[3] : undefined;
|
|
33
|
+
|
|
34
|
+
if (!isCaseSensitiv) {
|
|
35
|
+
return (0, _orderBy.default)(function (element) {
|
|
36
|
+
return toLowerCaseProp(element, property);
|
|
37
|
+
}, sortDirection, array);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
return (0, _orderBy.default)(property, sortDirection, array);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function naturalSortByProperty(array, property) {
|
|
44
|
+
var sortDirection = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : SortDirection.ASCENDING;
|
|
45
|
+
var isCaseSensitiv = arguments.length > 3 ? arguments[3] : undefined;
|
|
46
|
+
|
|
47
|
+
if (!isCaseSensitiv) {
|
|
48
|
+
return (0, _naturalOrderby.orderBy)(array, function (element) {
|
|
49
|
+
return toLowerCaseProp(element, property);
|
|
50
|
+
}, sortDirection);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return (0, _naturalOrderby.orderBy)(array, property, sortDirection);
|
|
54
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.registerButtonEffect = exports.createButtonRipple = void 0;
|
|
7
|
+
|
|
8
|
+
var createButtonRipple = function createButtonRipple(event, target) {
|
|
9
|
+
var button = target || event.currentTarget;
|
|
10
|
+
var buttonRect = button.getBoundingClientRect();
|
|
11
|
+
var circle = document.createElement('span');
|
|
12
|
+
var diameter = Math.max(button.clientWidth, button.clientHeight);
|
|
13
|
+
var radius = diameter / 2;
|
|
14
|
+
circle.style.width = circle.style.height = "".concat(diameter, "px");
|
|
15
|
+
circle.style.left = "".concat(event.clientX - buttonRect.left - radius, "px");
|
|
16
|
+
circle.style.top = "".concat(event.clientY - buttonRect.top - radius, "px");
|
|
17
|
+
circle.classList.add('btn-ripple');
|
|
18
|
+
var rippleElement = button.getElementsByClassName('btn-ripple')[0]; // Cleanup previous ripple element from current button in case there
|
|
19
|
+
// are multiple clicks on the button itself
|
|
20
|
+
|
|
21
|
+
if (rippleElement) {
|
|
22
|
+
rippleElement.remove();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
button.appendChild(circle); // Cleanup ripple element after some time
|
|
26
|
+
|
|
27
|
+
setTimeout(function () {
|
|
28
|
+
return circle.remove();
|
|
29
|
+
}, 1000);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
exports.createButtonRipple = createButtonRipple;
|
|
33
|
+
|
|
34
|
+
var isTargetEligibleForEffect = function isTargetEligibleForEffect(target) {
|
|
35
|
+
if (!target || !target.className) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
var className = target.className;
|
|
40
|
+
var isButton = className.includes('btn ');
|
|
41
|
+
var isNotButtonComponent = !className.includes('btn-component');
|
|
42
|
+
var isNotDisabled = !className.includes('disabled');
|
|
43
|
+
return isButton && isNotButtonComponent && isNotDisabled;
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
var enableButtonRipple = function enableButtonRipple(event) {
|
|
47
|
+
var target = event.target;
|
|
48
|
+
|
|
49
|
+
if (target) {
|
|
50
|
+
var isButton = isTargetEligibleForEffect(target);
|
|
51
|
+
var isChildOfButton = !isButton && isTargetEligibleForEffect(target.parentElement);
|
|
52
|
+
|
|
53
|
+
if (isButton || isChildOfButton) {
|
|
54
|
+
createButtonRipple(event, isChildOfButton ? target.parentElement : target);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
var registerButtonEffect = function (document) {
|
|
60
|
+
if (!document) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
document.addEventListener('mousedown', enableButtonRipple, false);
|
|
65
|
+
document.addEventListener('touchstart', enableButtonRipple, false);
|
|
66
|
+
}(document);
|
|
67
|
+
|
|
68
|
+
exports.registerButtonEffect = registerButtonEffect;
|
package/lib/utils/deviceUtils.js
CHANGED
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.isDesktop = exports.initdocumentBootstrapping = exports.inIframe = exports.hasTouch = exports.autoInitDocumentBootstrapping = void 0;
|
|
9
9
|
|
|
10
10
|
var _throttle = _interopRequireDefault(require("lodash/fp/throttle"));
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.logDeprecatedWarnings = exports.default = exports.BASE_URL = void 0;
|
|
9
9
|
|
|
10
10
|
var _has = _interopRequireDefault(require("lodash/fp/has"));
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.logPropError = exports.default = exports.BASE_URL = void 0;
|
|
9
9
|
|
|
10
10
|
var _has = _interopRequireDefault(require("lodash/fp/has"));
|
|
11
11
|
|
package/lib/utils/routeUtils.js
CHANGED
|
@@ -5,9 +5,10 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
+
exports.getSortDirShort = void 0;
|
|
8
9
|
exports.mapColumnsSettingsToStrings = mapColumnsSettingsToStrings;
|
|
9
10
|
exports.parseColumnsSettingsStrings = parseColumnsSettingsStrings;
|
|
10
|
-
exports.parseSorting =
|
|
11
|
+
exports.parseSorting = void 0;
|
|
11
12
|
|
|
12
13
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
13
14
|
|
|
@@ -19,20 +20,20 @@ var _get = _interopRequireDefault(require("lodash/fp/get"));
|
|
|
19
20
|
|
|
20
21
|
var _isFinite = _interopRequireDefault(require("lodash/fp/isFinite"));
|
|
21
22
|
|
|
22
|
-
var
|
|
23
|
+
var _SortUtils = require("./SortUtils");
|
|
23
24
|
|
|
24
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object);
|
|
25
|
+
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; }
|
|
25
26
|
|
|
26
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
27
|
+
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; }
|
|
27
28
|
|
|
28
29
|
var getSortDirShort = function getSortDirShort(sortDir) {
|
|
29
|
-
return sortDir ===
|
|
30
|
+
return sortDir === _SortUtils.SortDirection.DESCENDING ? '-' : '+';
|
|
30
31
|
};
|
|
31
32
|
|
|
32
33
|
exports.getSortDirShort = getSortDirShort;
|
|
33
34
|
|
|
34
35
|
var parseSorting = function parseSorting(sortValueShort) {
|
|
35
|
-
var sortDir = sortValueShort.startsWith('-') ?
|
|
36
|
+
var sortDir = sortValueShort.startsWith('-') ? _SortUtils.SortDirection.DESCENDING : _SortUtils.SortDirection.ASCENDING; // Note: due to a bug in qs 6.7.0 the '+' sorting will be parsed as a space by qs even though decoding is disabled
|
|
36
37
|
// therefore, we need to trim the value
|
|
37
38
|
|
|
38
39
|
return {
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.UP = exports.DOWN = void 0;
|
|
6
7
|
exports.default = scrollItemIntoView;
|
|
7
|
-
exports.DOWN = exports.UP = void 0;
|
|
8
8
|
var UP = 'up';
|
|
9
9
|
exports.UP = UP;
|
|
10
10
|
var DOWN = 'down'; // Scroll to selected dropdown menu-item in case the item is not visible due to overflow
|
package/lib/version.json
CHANGED