@rio-cloud/rio-uikit 0.15.0-beta-44 → 0.15.0-beta-48
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/applicationLayout/ApplicationLayoutBody.js +3 -1
- package/lib/components/assetTree/AssetTree.less +1 -0
- package/lib/components/bottomSheet/BottomSheet.js +157 -0
- package/lib/components/button/Button.js +110 -7
- package/lib/components/button/ToggleButton.js +11 -108
- package/lib/components/charts/BarChart.js +2 -1
- 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/datepicker/DatePicker.less +4 -0
- package/lib/components/datepicker/DateRangePicker.js +1 -1
- package/lib/components/selects/DropdownHeader.js +2 -6
- package/lib/components/spinner/Spinner.less +2 -2
- package/lib/components/states/MaintenanceState.js +25 -0
- package/lib/components/table/TableCardsSorting.js +7 -7
- 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/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 +20 -4
- package/lib/style/css/_exports/man-uikit.less +1 -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 +42 -0
- package/lib/style/css/_exports/vw-uikit.less +2 -1
- package/lib/style/css/rio-theme/buttons.less +5 -1
- package/lib/style/css/rio-theme/dropdowns.less +6 -26
- package/lib/style/css/rio-theme/navbar.less +1 -1
- package/lib/style/css/rio-theme/navs.less +19 -0
- package/lib/style/css/utils/_imports.less +82 -0
- 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/types.ts +121 -11
- package/lib/utils/SortUtils.js +54 -0
- package/lib/utils/routeUtils.js +3 -3
- package/lib/version.json +1 -1
- package/package.json +4 -3
|
@@ -26,15 +26,16 @@
|
|
|
26
26
|
.shadow-hard-to-bottom();
|
|
27
27
|
margin: -1px 0 0 0;
|
|
28
28
|
padding: 0;
|
|
29
|
-
min-width: 100%;
|
|
30
29
|
|
|
31
30
|
> li {
|
|
32
31
|
> a {
|
|
33
32
|
cursor: pointer;
|
|
34
33
|
line-height: 1.25;
|
|
35
34
|
padding: 7px 13px;
|
|
35
|
+
margin: 2px 6px;
|
|
36
36
|
position: relative;
|
|
37
37
|
user-select: none;
|
|
38
|
+
border-radius: 4px;
|
|
38
39
|
|
|
39
40
|
&:active:focus {
|
|
40
41
|
outline: 0;
|
|
@@ -48,17 +49,11 @@
|
|
|
48
49
|
&:last-child:not(:first-child) {
|
|
49
50
|
margin-bottom: 5px;
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
.TagManager & {
|
|
53
|
-
&:first-child:not(:last-child) {
|
|
54
|
-
margin-top: 0;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
52
|
}
|
|
58
53
|
|
|
59
54
|
> .active > a {
|
|
60
55
|
color: inherit;
|
|
61
|
-
background-color: inherit;
|
|
56
|
+
background-color: inherit;
|
|
62
57
|
}
|
|
63
58
|
|
|
64
59
|
.menuitem:focus {
|
|
@@ -67,47 +62,32 @@
|
|
|
67
62
|
|
|
68
63
|
> .dropdown-header {
|
|
69
64
|
display: flex;
|
|
70
|
-
padding:
|
|
65
|
+
padding: 5px 10px;
|
|
71
66
|
pointer-events: none;
|
|
72
67
|
align-items: center;
|
|
73
68
|
|
|
74
|
-
.dropdown-header-line {
|
|
75
|
-
flex: 1 1 auto;
|
|
76
|
-
|
|
77
|
-
hr {
|
|
78
|
-
border-width: 2px;
|
|
79
|
-
margin: 0;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
69
|
&:not(.center) {
|
|
84
70
|
margin-top: 15px;
|
|
85
71
|
|
|
86
72
|
~ li:not(.dropdown-header) a {
|
|
87
73
|
padding-left: 20px;
|
|
88
74
|
}
|
|
89
|
-
|
|
90
|
-
.dropdown-header-line:first-child {
|
|
91
|
-
flex: 0 0 auto;
|
|
92
|
-
width: 8px;
|
|
93
|
-
}
|
|
94
75
|
}
|
|
95
76
|
|
|
96
77
|
.dropdown-header-text {
|
|
97
78
|
background: @color-white;
|
|
98
|
-
color: @gray
|
|
79
|
+
color: lighten(@gray, 5%);
|
|
99
80
|
font-size: 12px;
|
|
100
81
|
font-weight: @text-medium;
|
|
101
82
|
line-height: 1.25;
|
|
102
83
|
max-width: calc(~"100% - 30px");
|
|
103
|
-
padding: 1px 5px 2px 5px;
|
|
104
84
|
text-align: center;
|
|
105
85
|
text-transform: uppercase;
|
|
106
86
|
}
|
|
107
87
|
}
|
|
108
88
|
|
|
109
89
|
> .divider {
|
|
110
|
-
margin:
|
|
90
|
+
margin: 3px 6px;
|
|
111
91
|
}
|
|
112
92
|
}
|
|
113
93
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@import '../bootstrap/navbar.less';
|
|
2
2
|
|
|
3
3
|
@navbar-height: 50px;
|
|
4
|
-
@navbar-application-dropdown-width: 300px;
|
|
5
4
|
@navbar-height-without-border: @navbar-height - 1;
|
|
5
|
+
@navbar-application-dropdown-width: 300px;
|
|
6
6
|
@navbar-padding-horizontal: @grid-gutter-width;
|
|
7
7
|
@navbar-padding-vertical: 15px;
|
|
8
8
|
@navbar-margin-bottom: @navbar-padding-vertical;
|
|
@@ -164,6 +164,25 @@
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
|
|
167
|
+
&-filled {
|
|
168
|
+
background: @gray-lightest;
|
|
169
|
+
border-radius: 5px;
|
|
170
|
+
box-shadow: none !important;
|
|
171
|
+
padding: 5px;
|
|
172
|
+
|
|
173
|
+
> li.active,
|
|
174
|
+
> li:hover {
|
|
175
|
+
.shadow-default;
|
|
176
|
+
background: @color-white;
|
|
177
|
+
border-radius: 5px;
|
|
178
|
+
font-weight: 600;
|
|
179
|
+
|
|
180
|
+
> a, > span, > div {
|
|
181
|
+
box-shadow: none !important;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
167
186
|
&.nav-justified {
|
|
168
187
|
@media (min-width: 0) {
|
|
169
188
|
display: flex;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// RIO Theme // Responsive Utility Classes
|
|
2
|
+
.resonsive-imports(@breakpoint) {
|
|
3
|
+
@suffix: @breakpoint;
|
|
4
|
+
@import (multiple) "responsive/alignment.less";
|
|
5
|
+
@import (multiple) "responsive/backgrounds.less";
|
|
6
|
+
@import (multiple) "responsive/border.less";
|
|
7
|
+
@import (multiple) "responsive/display.less";
|
|
8
|
+
@import (multiple) "responsive/flexbox.less";
|
|
9
|
+
@import (multiple) "responsive/floating.less";
|
|
10
|
+
@import (multiple) "responsive/grid.less";
|
|
11
|
+
@import (multiple) "responsive/hyphens.less";
|
|
12
|
+
@import (multiple) "responsive/overflow.less";
|
|
13
|
+
@import (multiple) "responsive/position.less";
|
|
14
|
+
@import (multiple) "responsive/spacings.less";
|
|
15
|
+
@import (multiple) "responsive/sizing.less";
|
|
16
|
+
@import (multiple) "responsive/text.less";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// RIO Theme // Utility Classes
|
|
20
|
+
.import-utilities(@default, @xs, @ls, @sm, @md, @lg, @xl, @print) {
|
|
21
|
+
|
|
22
|
+
// Basic Utility Classes
|
|
23
|
+
& when (@default = true) {
|
|
24
|
+
@import (less) 'colors.less';
|
|
25
|
+
@import (less) 'custom.less';
|
|
26
|
+
@import (less) 'cursors.less';
|
|
27
|
+
@import (less) 'ellipsis.less';
|
|
28
|
+
@import (less) 'grid.less';
|
|
29
|
+
@import (less) 'misc.less';
|
|
30
|
+
@import (less) 'opacity.less';
|
|
31
|
+
@import (less) 'overflow.less';
|
|
32
|
+
@import (less) 'position.less';
|
|
33
|
+
@import (less) 'rounded.less';
|
|
34
|
+
@import (less) 'shadows.less';
|
|
35
|
+
@import (less) 'text.less';
|
|
36
|
+
@import (less) 'z-index.less';
|
|
37
|
+
.resonsive-imports(~'');
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Breakpoints
|
|
41
|
+
& when (@xs = true) {
|
|
42
|
+
@media (max-width: @screen-xs-max) {
|
|
43
|
+
.resonsive-imports(-xs);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& when (@ls = true) {
|
|
48
|
+
@media (min-width: @screen-ls) {
|
|
49
|
+
.resonsive-imports(-ls);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& when (@sm = true) {
|
|
54
|
+
@media (min-width: @screen-sm) {
|
|
55
|
+
.resonsive-imports(-sm);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
& when (@md = true) {
|
|
60
|
+
@media (min-width: @screen-md) {
|
|
61
|
+
.resonsive-imports(-md);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
& when (@lg = true) {
|
|
66
|
+
@media (min-width: @screen-lg) {
|
|
67
|
+
.resonsive-imports(-lg);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& when (@xl = true) {
|
|
72
|
+
@media (min-width: @screen-xl) {
|
|
73
|
+
.resonsive-imports(-xl);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
& when (@print = true) {
|
|
78
|
+
@media print {
|
|
79
|
+
.resonsive-imports(-print);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
/* Border */
|
|
2
|
+
|
|
3
|
+
// default values used as shorthand ".border" class
|
|
4
|
+
.border@{suffix} {
|
|
5
|
+
border-style: solid !important;
|
|
6
|
+
border-width: 1px !important;
|
|
7
|
+
border-color: @gray-light !important;
|
|
8
|
+
}
|
|
9
|
+
|
|
2
10
|
.border {
|
|
3
11
|
&-style-solid@{suffix} { border-style: solid !important}
|
|
4
12
|
&-style-dotted@{suffix} { border-style: dotted !important}
|
|
@@ -28,29 +36,29 @@
|
|
|
28
36
|
&-highlight-light@{suffix} { border-color: @color-highlight-light !important}
|
|
29
37
|
&-highlight-lighter@{suffix} { border-color: @color-highlight-lighter !important}
|
|
30
38
|
&-highlight-lightest@{suffix} { border-color: @color-highlight-lightest !important}
|
|
31
|
-
&-highlight-decent
|
|
32
|
-
&-success
|
|
33
|
-
&-warning
|
|
34
|
-
&-danger
|
|
39
|
+
&-highlight-decent@{suffix} { border-color: @color-highlight-decent !important}
|
|
40
|
+
&-success@{suffix} { border-color: @brand-success !important}
|
|
41
|
+
&-warning@{suffix} { border-color: @brand-warning !important}
|
|
42
|
+
&-danger@{suffix} { border-color: @brand-danger !important}
|
|
35
43
|
|
|
36
|
-
&-status-available { border-color: @color-status-available!important }
|
|
37
|
-
&-status-driving { border-color: @color-status-driving !important }
|
|
38
|
-
&-status-resting { border-color: @color-status-resting !important }
|
|
39
|
-
&-status-working { border-color: @color-status-working!important }
|
|
44
|
+
&-status-available@{suffix} { border-color: @color-status-available!important }
|
|
45
|
+
&-status-driving@{suffix} { border-color: @color-status-driving !important }
|
|
46
|
+
&-status-resting@{suffix} { border-color: @color-status-resting !important }
|
|
47
|
+
&-status-working@{suffix} { border-color: @color-status-working!important }
|
|
40
48
|
|
|
41
|
-
&-map-marker-asset { border-color: @color-map-marker-asset !important }
|
|
42
|
-
&-map-marker-poi { border-color: @color-map-marker-poi !important }
|
|
43
|
-
&-map-marker-geofence { border-color: @color-map-marker-geofence !important }
|
|
44
|
-
&-map-marker-route { border-color: @color-map-marker-route !important }
|
|
49
|
+
&-map-marker-asset@{suffix} { border-color: @color-map-marker-asset !important }
|
|
50
|
+
&-map-marker-poi@{suffix} { border-color: @color-map-marker-poi !important }
|
|
51
|
+
&-map-marker-geofence@{suffix} { border-color: @color-map-marker-geofence !important }
|
|
52
|
+
&-map-marker-route@{suffix} { border-color: @color-map-marker-route !important }
|
|
45
53
|
|
|
46
|
-
&-rating-1 { border-color: @color-rating-1 !important }
|
|
47
|
-
&-rating-2 { border-color: @color-rating-2 !important }
|
|
48
|
-
&-rating-3 { border-color: @color-rating-3 !important }
|
|
49
|
-
&-rating-4 { border-color: @color-rating-4 !important }
|
|
50
|
-
&-rating-5 { border-color: @color-rating-5 !important }
|
|
54
|
+
&-rating-1@{suffix} { border-color: @color-rating-1 !important }
|
|
55
|
+
&-rating-2@{suffix} { border-color: @color-rating-2 !important }
|
|
56
|
+
&-rating-3@{suffix} { border-color: @color-rating-3 !important }
|
|
57
|
+
&-rating-4@{suffix} { border-color: @color-rating-4 !important }
|
|
58
|
+
&-rating-5@{suffix} { border-color: @color-rating-5 !important }
|
|
51
59
|
}
|
|
52
60
|
|
|
53
|
-
&-none@{suffix}
|
|
61
|
+
&-none@{suffix} { border: none !important }
|
|
54
62
|
|
|
55
63
|
&-top-none@{suffix}, &-top-0@{suffix} { border-top-style: none !important }
|
|
56
64
|
&-top-only@{suffix} {
|
|
@@ -73,7 +81,7 @@
|
|
|
73
81
|
border-left-style: none !important;
|
|
74
82
|
}
|
|
75
83
|
|
|
76
|
-
&-left-none@{suffix}, &-left-0@{suffix}
|
|
84
|
+
&-left-none@{suffix}, &-left-0@{suffix} { border-left-style: none !important}
|
|
77
85
|
&-left-only@{suffix} {
|
|
78
86
|
border-top-style: none !important;
|
|
79
87
|
border-right-style: none !important;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
.display-inline-block@{suffix} { display: inline-block !important }
|
|
3
3
|
.display-flex@{suffix} { display: flex !important }
|
|
4
4
|
.display-inline-flex@{suffix} { display: inline-flex !important }
|
|
5
|
+
.display-grid@{suffix} { display: grid !important }
|
|
6
|
+
.display-inline-grid@{suffix} { display: inline-grid !important }
|
|
5
7
|
.display-inline@{suffix} { display: inline !important }
|
|
6
8
|
.display-contents@{suffix} { display: contents !important}
|
|
7
9
|
.display-none@{suffix} { display: none !important }
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/* Grid - Basics */
|
|
2
|
+
.grid-template-columns-2@{suffix} { grid-template-columns: repeat(2, auto) !important }
|
|
3
|
+
.grid-template-columns-3@{suffix} { grid-template-columns: repeat(3, auto) !important }
|
|
4
|
+
.grid-template-columns-4@{suffix} { grid-template-columns: repeat(4, auto) !important }
|
|
5
|
+
.grid-template-columns-5@{suffix} { grid-template-columns: repeat(5, auto) !important }
|
|
6
|
+
.grid-template-columns-6@{suffix} { grid-template-columns: repeat(6, auto) !important }
|
package/lib/types.ts
CHANGED
|
@@ -242,6 +242,23 @@ export interface BrowserWarningProps {
|
|
|
242
242
|
onBrowserSelect?: Function;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
|
+
export interface BottomSheetProps {
|
|
246
|
+
show: boolean;
|
|
247
|
+
onClose?: Function;
|
|
248
|
+
width?: number | string;
|
|
249
|
+
height?: number | string;
|
|
250
|
+
title?: string | React.ReactNode;
|
|
251
|
+
showCloseButton?: boolean;
|
|
252
|
+
showMaximizeButton?: boolean;
|
|
253
|
+
onHeightChange?: Function;
|
|
254
|
+
detatch?: boolean;
|
|
255
|
+
useBackdrop?: boolean;
|
|
256
|
+
onBackdropClick?: Function;
|
|
257
|
+
bodyRef?: React.MutableRefObject<object>;
|
|
258
|
+
bodyClassName?: string;
|
|
259
|
+
className?: string;
|
|
260
|
+
}
|
|
261
|
+
|
|
245
262
|
export interface BoundingBox {
|
|
246
263
|
top: number;
|
|
247
264
|
bottom: number;
|
|
@@ -249,6 +266,20 @@ export interface BoundingBox {
|
|
|
249
266
|
right: number;
|
|
250
267
|
}
|
|
251
268
|
|
|
269
|
+
export interface ButtonProps {
|
|
270
|
+
active?: boolean;
|
|
271
|
+
disabled?: boolean;
|
|
272
|
+
asToggle?: boolean;
|
|
273
|
+
iconOnly?: boolean;
|
|
274
|
+
multiline?: boolean;
|
|
275
|
+
block?: boolean;
|
|
276
|
+
onClick?: Function;
|
|
277
|
+
bsStyle?: 'default' | 'primary' | 'info' | 'warning' | 'danger' | 'success' | 'muted';
|
|
278
|
+
bsSize?: 'xs' | 'sm' | 'md' | 'lg';
|
|
279
|
+
variant?: 'link' | 'link-inline' | 'outline' | 'action';
|
|
280
|
+
className?: string;
|
|
281
|
+
}
|
|
282
|
+
|
|
252
283
|
// C --------------------------------------------------------------------------------------------------
|
|
253
284
|
|
|
254
285
|
export interface CarouselProps {
|
|
@@ -269,6 +300,16 @@ export interface CarouselProps {
|
|
|
269
300
|
nextLabel?: string;
|
|
270
301
|
}
|
|
271
302
|
|
|
303
|
+
export interface ChartNeedleProps {
|
|
304
|
+
width?: string;
|
|
305
|
+
height?: string;
|
|
306
|
+
x?: string;
|
|
307
|
+
y?: string;
|
|
308
|
+
rotation?: number;
|
|
309
|
+
className?: string;
|
|
310
|
+
style?: object;
|
|
311
|
+
}
|
|
312
|
+
|
|
272
313
|
export interface CheckboxProps {
|
|
273
314
|
id?: string;
|
|
274
315
|
name?: string;
|
|
@@ -677,6 +718,8 @@ export interface LoadMoreButtonProps {
|
|
|
677
718
|
|
|
678
719
|
// M --------------------------------------------------------------------------------------------------
|
|
679
720
|
|
|
721
|
+
export interface MaintenanceStateProps extends BaseStateProps {}
|
|
722
|
+
|
|
680
723
|
export type markerColor =
|
|
681
724
|
| 'bg-map-marker-asset'
|
|
682
725
|
| 'bg-map-marker-poi'
|
|
@@ -933,7 +976,7 @@ export interface NotificationsContainerProps {
|
|
|
933
976
|
|
|
934
977
|
export type notificationTriggerFunction = (
|
|
935
978
|
message: string | JSX.Element | JSX.Element[],
|
|
936
|
-
title?: string,
|
|
979
|
+
title?: string | JSX.Element | JSX.Element[],
|
|
937
980
|
timeOut?: number,
|
|
938
981
|
callback?: Function,
|
|
939
982
|
priority?: boolean
|
|
@@ -1107,10 +1150,12 @@ export interface PieChartProps {
|
|
|
1107
1150
|
nameKey: string;
|
|
1108
1151
|
color?: Function | string;
|
|
1109
1152
|
filled?: boolean;
|
|
1153
|
+
labels?: boolean;
|
|
1110
1154
|
innerLabels?: boolean;
|
|
1111
1155
|
paddingAngle?: number;
|
|
1112
1156
|
legend?: Legend | boolean;
|
|
1113
1157
|
tooltip?: boolean;
|
|
1158
|
+
pieOptions?: object;
|
|
1114
1159
|
}
|
|
1115
1160
|
|
|
1116
1161
|
export interface Position {
|
|
@@ -1925,6 +1970,43 @@ export interface TypeCounterProps {
|
|
|
1925
1970
|
|
|
1926
1971
|
// U --------------------------------------------------------------------------------------------------
|
|
1927
1972
|
|
|
1973
|
+
export type UseAfterMount = (
|
|
1974
|
+
callback: () => void,
|
|
1975
|
+
deps?: any[]
|
|
1976
|
+
) => void;
|
|
1977
|
+
|
|
1978
|
+
export type UseClickOutside<T extends HTMLElement = any> = (
|
|
1979
|
+
callback: () => void,
|
|
1980
|
+
events?: ['mousedown', 'touchstart']
|
|
1981
|
+
) => React.MutableRefObject<T>;
|
|
1982
|
+
|
|
1983
|
+
export type UseClipboard = (options: { timeout: number }) => {
|
|
1984
|
+
copy: (valueToCopy: any) => void;
|
|
1985
|
+
reset: () => void;
|
|
1986
|
+
error: Error;
|
|
1987
|
+
copied: boolean;
|
|
1988
|
+
};
|
|
1989
|
+
|
|
1990
|
+
export type UseDebugInfo = (
|
|
1991
|
+
componentName: string,
|
|
1992
|
+
props: object
|
|
1993
|
+
) => {
|
|
1994
|
+
count: number,
|
|
1995
|
+
changedProps: any,
|
|
1996
|
+
timeSinceLastRender: number,
|
|
1997
|
+
lastRenderTimestamp: number,
|
|
1998
|
+
};
|
|
1999
|
+
|
|
2000
|
+
export type UseEffectOnce = (
|
|
2001
|
+
callback: () => void
|
|
2002
|
+
) => void;
|
|
2003
|
+
|
|
2004
|
+
export type UseElementSize = (
|
|
2005
|
+
elementRef: { current: Element; }
|
|
2006
|
+
) => [number, number];
|
|
2007
|
+
|
|
2008
|
+
export type UseEsc<T extends keyof WindowEventMap> = (callback: (event: WindowEventMap[T]) => any) => void;
|
|
2009
|
+
|
|
1928
2010
|
export type UseEvent<T extends keyof WindowEventMap> = (
|
|
1929
2011
|
eventType: T,
|
|
1930
2012
|
callback: (event: WindowEventMap[T]) => any,
|
|
@@ -1932,22 +2014,50 @@ export type UseEvent<T extends keyof WindowEventMap> = (
|
|
|
1932
2014
|
target?: HTMLElement
|
|
1933
2015
|
) => void;
|
|
1934
2016
|
|
|
2017
|
+
export type UseInterval = (
|
|
2018
|
+
callback: () => void,
|
|
2019
|
+
delay?: number
|
|
2020
|
+
) => React.MutableRefObject<object>;
|
|
2021
|
+
|
|
1935
2022
|
export type UseKey<T extends keyof WindowEventMap> = (
|
|
1936
2023
|
callback: (event: WindowEventMap[T]) => any,
|
|
1937
2024
|
eventTypes?: [T],
|
|
1938
2025
|
node?: any
|
|
1939
2026
|
) => void;
|
|
1940
2027
|
|
|
1941
|
-
export type
|
|
2028
|
+
export type UseOnlineStatus = () => boolean;
|
|
1942
2029
|
|
|
1943
|
-
export type
|
|
2030
|
+
export type UseOnScreen = (
|
|
2031
|
+
ref: React.MutableRefObject<object>,
|
|
2032
|
+
options?: {
|
|
2033
|
+
rootMargins?: string,
|
|
2034
|
+
threshold?: number | number[]
|
|
2035
|
+
}
|
|
2036
|
+
) => boolean;
|
|
2037
|
+
|
|
2038
|
+
export type UseRenderCount = () => number;
|
|
2039
|
+
|
|
2040
|
+
export type UseStateWithValidation = (
|
|
2041
|
+
validationFn: Function,
|
|
2042
|
+
initialValue: any
|
|
2043
|
+
) => [any, Function, boolean];
|
|
2044
|
+
|
|
2045
|
+
export type UseLocalStorage = (
|
|
2046
|
+
key: string,
|
|
2047
|
+
defaultValue: any
|
|
2048
|
+
) => [any, Function, Function];
|
|
2049
|
+
|
|
2050
|
+
export type UseSessionStorage = (
|
|
2051
|
+
key: string,
|
|
2052
|
+
defaultValue: any
|
|
2053
|
+
) => [any, Function, Function];
|
|
2054
|
+
|
|
2055
|
+
export type UseTimeout = (
|
|
1944
2056
|
callback: () => void,
|
|
1945
|
-
|
|
1946
|
-
) => React.MutableRefObject<
|
|
2057
|
+
delay?: number
|
|
2058
|
+
) => React.MutableRefObject<object>;
|
|
1947
2059
|
|
|
1948
|
-
export type
|
|
1949
|
-
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
copied: boolean;
|
|
1953
|
-
};
|
|
2060
|
+
export type UseWindowResize = (
|
|
2061
|
+
callback: () => void,
|
|
2062
|
+
timeout?: number
|
|
2063
|
+
) => 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.sortByProperty = sortByProperty;
|
|
9
|
+
exports.naturalSortByProperty = naturalSortByProperty;
|
|
10
|
+
exports.SortDirection = void 0;
|
|
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
|
+
}
|
package/lib/utils/routeUtils.js
CHANGED
|
@@ -19,20 +19,20 @@ var _get = _interopRequireDefault(require("lodash/fp/get"));
|
|
|
19
19
|
|
|
20
20
|
var _isFinite = _interopRequireDefault(require("lodash/fp/isFinite"));
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _SortUtils = require("./SortUtils");
|
|
23
23
|
|
|
24
24
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
25
25
|
|
|
26
26
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
27
27
|
|
|
28
28
|
var getSortDirShort = function getSortDirShort(sortDir) {
|
|
29
|
-
return sortDir ===
|
|
29
|
+
return sortDir === _SortUtils.SortDirection.DESCENDING ? '-' : '+';
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
exports.getSortDirShort = getSortDirShort;
|
|
33
33
|
|
|
34
34
|
var parseSorting = function parseSorting(sortValueShort) {
|
|
35
|
-
var sortDir = sortValueShort.startsWith('-') ?
|
|
35
|
+
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
36
|
// therefore, we need to trim the value
|
|
37
37
|
|
|
38
38
|
return {
|
package/lib/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rio-cloud/rio-uikit",
|
|
3
|
-
"version": "0.15.0-beta-
|
|
3
|
+
"version": "0.15.0-beta-48",
|
|
4
4
|
"description": "The RIO UIKIT component library",
|
|
5
5
|
"repository": "https://collaboration.msi.audi.com/stash/projects/RIOFRONT/repos/uikit-web/browse",
|
|
6
6
|
"scripts": {
|
|
7
|
-
"build": "NODE_ENV=production babel src --out-dir lib --copy-files && NODE_ENV=production webpack --progress --stats-children",
|
|
7
|
+
"build": "NODE_ENV=production babel src --out-dir lib --copy-files && NODE_ENV=production webpack --progress --stats-children && echo '👉 Dont forget to perform npm update before release!'",
|
|
8
8
|
"check-licenses": "node tools/check-licenses.js .",
|
|
9
9
|
"check-updates": "node tools/checkUpdates.js",
|
|
10
10
|
"git-tasks": "node tools/gitTasks.js",
|
|
@@ -136,10 +136,11 @@
|
|
|
136
136
|
"prop-types": "^15.7.2",
|
|
137
137
|
"react-bootstrap": "1.6.3",
|
|
138
138
|
"react-content-loader": "^6.0.3",
|
|
139
|
-
"react-datetime": "github:rio-cloud/react-datetime",
|
|
139
|
+
"react-datetime": "github:rio-cloud/react-datetime#v.3.1.0-merged",
|
|
140
140
|
"react-debounce-input": "^3.2.3",
|
|
141
141
|
"react-dropzone": "^4.3.0",
|
|
142
142
|
"react-input-mask": "^3.0.0-alpha.2",
|
|
143
|
+
"react-motion": "^0.5.2",
|
|
143
144
|
"react-notifications": "^1.7.2",
|
|
144
145
|
"react-onclickoutside": "^6.10.0",
|
|
145
146
|
"react-sortable-hoc": "^2.0.0",
|