@rio-cloud/rio-uikit 1.4.1 → 1.5.0
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/.DS_Store +0 -0
- package/FadeExpander.d.ts +2 -0
- package/FadeExpander.js +2 -0
- package/FadeUp.d.ts +2 -0
- package/FadeUp.js +2 -0
- package/XAxis.d.ts +2 -0
- package/XAxis.js +2 -0
- package/YAxis.d.ts +2 -0
- package/YAxis.js +2 -0
- package/components/applicationLayout/ApplicationLayoutBody.d.ts +5 -0
- package/components/applicationLayout/ApplicationLayoutBody.js +10 -1
- package/components/charts/Area.d.ts +11 -3
- package/components/charts/Area.js +9 -1
- package/components/charts/AreaChart.d.ts +4 -3
- package/components/charts/AreaChart.js +9 -8
- package/components/charts/Bar.d.ts +6 -2
- package/components/charts/Bar.js +3 -4
- package/components/charts/BarChart.d.ts +2 -1
- package/components/charts/BarChart.js +8 -4
- package/components/charts/ComposedChart.d.ts +6 -5
- package/components/charts/ComposedChart.js +16 -11
- package/components/charts/Line.d.ts +11 -3
- package/components/charts/Line.js +9 -1
- package/components/charts/LineChart.d.ts +6 -4
- package/components/charts/LineChart.js +10 -9
- package/components/charts/ReferenceLine.d.ts +8 -4
- package/components/charts/ReferenceLine.js +18 -2
- package/components/charts/XAxis.d.ts +7 -0
- package/components/charts/XAxis.js +18 -0
- package/components/charts/YAxis.d.ts +5 -0
- package/components/charts/YAxis.js +2 -0
- package/components/collapse/Collapse.js +3 -2
- package/components/fade/FadeExpander.d.ts +27 -0
- package/components/fade/FadeExpander.js +41 -0
- package/components/fade/FadeUp.d.ts +27 -0
- package/components/fade/FadeUp.js +28 -0
- package/components/listMenu/ListMenu.d.ts +7 -0
- package/components/listMenu/ListMenu.js +6 -3
- package/components/map/components/features/Route.d.ts +13 -2
- package/components/map/components/features/Route.js +19 -11
- package/components/map/components/features/basics/Polygon.d.ts +1 -0
- package/components/map/components/features/basics/Polygon.js +1 -0
- package/components/map/components/features/basics/Polyline.d.ts +3 -1
- package/components/map/components/features/basics/Polyline.js +5 -16
- package/components/map/components/features/basics/polygonColors.d.ts +252 -0
- package/components/map/components/features/basics/polygonColors.js +252 -0
- package/components/map/utils/mapTypes.d.ts +1 -1
- package/components/map/utils/mapTypes.js +2 -0
- package/components/mapMarker/SingleMapMarker.d.ts +3 -2
- package/components/mapMarker/SingleMapMarker.js +3 -3
- package/components/selects/BaseSelectDropdown.d.ts +0 -1
- package/components/selects/BaseSelectDropdown.js +7 -1
- package/components/selects/Multiselect.js +1 -4
- package/components/selects/Select.d.ts +1 -1
- package/components/selects/Select.js +1 -4
- package/components/smoothScrollbars/SmoothScrollbars.js +28 -3
- package/hooks/useSorting.d.ts +29 -0
- package/hooks/useSorting.js +41 -0
- package/lib/es/FadeExpander.d.ts +2 -0
- package/lib/es/FadeExpander.js +7 -0
- package/lib/es/FadeUp.d.ts +2 -0
- package/lib/es/FadeUp.js +7 -0
- package/lib/es/XAxis.d.ts +2 -0
- package/lib/es/XAxis.js +7 -0
- package/lib/es/YAxis.d.ts +2 -0
- package/lib/es/YAxis.js +7 -0
- package/lib/es/components/applicationLayout/ApplicationLayoutBody.d.ts +5 -0
- package/lib/es/components/applicationLayout/ApplicationLayoutBody.js +10 -1
- package/lib/es/components/charts/Area.d.ts +11 -3
- package/lib/es/components/charts/Area.js +11 -1
- package/lib/es/components/charts/AreaChart.d.ts +4 -3
- package/lib/es/components/charts/AreaChart.js +8 -7
- package/lib/es/components/charts/Bar.d.ts +6 -2
- package/lib/es/components/charts/Bar.js +5 -4
- package/lib/es/components/charts/BarChart.d.ts +2 -1
- package/lib/es/components/charts/BarChart.js +7 -3
- package/lib/es/components/charts/ComposedChart.d.ts +6 -5
- package/lib/es/components/charts/ComposedChart.js +15 -10
- package/lib/es/components/charts/Line.d.ts +11 -3
- package/lib/es/components/charts/Line.js +11 -1
- package/lib/es/components/charts/LineChart.d.ts +6 -4
- package/lib/es/components/charts/LineChart.js +9 -8
- package/lib/es/components/charts/ReferenceLine.d.ts +8 -4
- package/lib/es/components/charts/ReferenceLine.js +21 -2
- package/lib/es/components/charts/XAxis.d.ts +7 -0
- package/lib/es/components/charts/XAxis.js +23 -0
- package/lib/es/components/charts/YAxis.d.ts +5 -0
- package/lib/es/components/charts/YAxis.js +4 -0
- package/lib/es/components/collapse/Collapse.js +3 -2
- package/lib/es/components/fade/FadeExpander.d.ts +27 -0
- package/lib/es/components/fade/FadeExpander.js +43 -0
- package/lib/es/components/fade/FadeUp.d.ts +27 -0
- package/lib/es/components/fade/FadeUp.js +30 -0
- package/lib/es/components/listMenu/ListMenu.d.ts +7 -0
- package/lib/es/components/listMenu/ListMenu.js +6 -3
- package/lib/es/components/map/components/features/Route.d.ts +13 -2
- package/lib/es/components/map/components/features/Route.js +20 -12
- package/lib/es/components/map/components/features/basics/Polygon.d.ts +1 -0
- package/lib/es/components/map/components/features/basics/Polygon.js +10 -0
- package/lib/es/components/map/components/features/basics/Polyline.d.ts +3 -1
- package/lib/es/components/map/components/features/basics/Polyline.js +5 -16
- package/lib/es/components/map/components/features/basics/polygonColors.d.ts +252 -0
- package/lib/es/components/map/components/features/basics/polygonColors.js +255 -0
- package/lib/es/components/map/utils/mapTypes.d.ts +1 -1
- package/lib/es/components/map/utils/mapTypes.js +2 -0
- package/lib/es/components/mapMarker/SingleMapMarker.d.ts +3 -2
- package/lib/es/components/mapMarker/SingleMapMarker.js +3 -3
- package/lib/es/components/selects/BaseSelectDropdown.d.ts +0 -1
- package/lib/es/components/selects/BaseSelectDropdown.js +6 -0
- package/lib/es/components/selects/Multiselect.js +1 -4
- package/lib/es/components/selects/Select.d.ts +1 -1
- package/lib/es/components/selects/Select.js +1 -4
- package/lib/es/components/smoothScrollbars/SmoothScrollbars.js +27 -2
- package/lib/es/hooks/useSorting.d.ts +29 -0
- package/lib/es/hooks/useSorting.js +43 -0
- package/lib/es/storageUtils.d.ts +1 -0
- package/lib/es/storageUtils.js +4 -0
- package/lib/es/styles/variables/colors/colors.json +4 -3
- package/lib/es/urlFeatureToggles.d.ts +1 -0
- package/lib/es/urlFeatureToggles.js +4 -0
- package/lib/es/useSorting.d.ts +2 -0
- package/lib/es/useSorting.js +7 -0
- package/lib/es/utils/storageUtils.d.ts +5 -0
- package/lib/es/utils/storageUtils.js +32 -0
- package/lib/es/utils/urlFeatureToggles.d.ts +10 -0
- package/lib/es/utils/urlFeatureToggles.js +41 -0
- package/lib/es/version.json +1 -1
- package/package.json +15 -4
- package/storageUtils.d.ts +1 -0
- package/storageUtils.js +1 -0
- package/styles/variables/colors/colors.json +4 -3
- package/urlFeatureToggles.d.ts +1 -0
- package/urlFeatureToggles.js +1 -0
- package/useSorting.d.ts +2 -0
- package/useSorting.js +2 -0
- package/utils/storageUtils.d.ts +5 -0
- package/utils/storageUtils.js +29 -0
- package/utils/urlFeatureToggles.d.ts +10 -0
- package/utils/urlFeatureToggles.js +32 -0
- package/version.json +1 -1
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
export const colorMapColdplay = {
|
|
2
|
+
'color-coldplay-wine': {
|
|
3
|
+
stroke: 'rgba(82, 13, 78, 0.65)',
|
|
4
|
+
fill: 'rgba(82, 13, 78, 0.25)',
|
|
5
|
+
},
|
|
6
|
+
'color-coldplay-aubergine': {
|
|
7
|
+
stroke: 'rgba(90, 72, 118, 0.65)',
|
|
8
|
+
fill: 'rgba(90, 72, 118, 0.25)',
|
|
9
|
+
},
|
|
10
|
+
'color-coldplay-kashmir': {
|
|
11
|
+
stroke: 'rgba(83, 110, 139, 0.65)',
|
|
12
|
+
fill: 'rgba(83, 110, 139, 0.25)',
|
|
13
|
+
},
|
|
14
|
+
'color-coldplay-fountain': {
|
|
15
|
+
stroke: 'rgba(103, 171, 197, 0.65)',
|
|
16
|
+
fill: 'rgba(103, 171, 197, 0.25)',
|
|
17
|
+
},
|
|
18
|
+
'color-coldplay-turquoise': {
|
|
19
|
+
stroke: 'rgba(78, 204, 193, 0.65)',
|
|
20
|
+
fill: 'rgba(78, 204, 193, 0.25)',
|
|
21
|
+
},
|
|
22
|
+
'color-coldplay-bermuda': {
|
|
23
|
+
stroke: 'rgba(121, 212, 179, 0.65)',
|
|
24
|
+
fill: 'rgba(121, 212, 179, 0.25)',
|
|
25
|
+
},
|
|
26
|
+
'color-coldplay-moos': {
|
|
27
|
+
stroke: 'rgba(161, 218, 163, 0.65)',
|
|
28
|
+
fill: 'rgba(161, 218, 163, 0.25)',
|
|
29
|
+
},
|
|
30
|
+
'color-coldplay-primrose': {
|
|
31
|
+
stroke: 'rgba(199, 226, 145, 0.65)',
|
|
32
|
+
fill: 'rgba(199, 226, 145, 0.25)',
|
|
33
|
+
},
|
|
34
|
+
'color-coldplay-khaki': {
|
|
35
|
+
stroke: 'rgba(240, 235, 131, 0.65)',
|
|
36
|
+
fill: 'rgba(240, 235, 131, 0.25)',
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
export const colorMapWarmup = {
|
|
40
|
+
'color-warmup-crimson': {
|
|
41
|
+
stroke: 'rgba(49, 20, 79, 0.65)',
|
|
42
|
+
fill: 'rgba(49, 20, 79, 0.25)',
|
|
43
|
+
},
|
|
44
|
+
'color-warmup-victoria': {
|
|
45
|
+
stroke: 'rgba(73, 61, 109, 0.65)',
|
|
46
|
+
fill: 'rgba(73, 61, 109, 0.25)',
|
|
47
|
+
},
|
|
48
|
+
'color-warmup-cadillac': {
|
|
49
|
+
stroke: 'rgba(126, 62, 114, 0.65)',
|
|
50
|
+
fill: 'rgba(126, 62, 114, 0.25)',
|
|
51
|
+
},
|
|
52
|
+
'color-warmup-raspberry': {
|
|
53
|
+
stroke: 'rgba(178, 54, 114, 0.65)',
|
|
54
|
+
fill: 'rgba(178, 54, 114, 0.25)',
|
|
55
|
+
},
|
|
56
|
+
'color-warmup-cerise': {
|
|
57
|
+
stroke: 'rgba(231, 36, 114, 0.65)',
|
|
58
|
+
fill: 'rgba(231, 36, 114, 0.25)',
|
|
59
|
+
},
|
|
60
|
+
'color-warmup-charm': {
|
|
61
|
+
stroke: 'rgba(201, 119, 141, 0.65)',
|
|
62
|
+
fill: 'rgba(201, 119, 141, 0.25)',
|
|
63
|
+
},
|
|
64
|
+
'color-warmup-salmon': {
|
|
65
|
+
stroke: 'rgba(241, 149, 136, 0.65)',
|
|
66
|
+
fill: 'rgba(241, 149, 136, 0.25)',
|
|
67
|
+
},
|
|
68
|
+
'color-warmup-cherokee': {
|
|
69
|
+
stroke: 'rgba(245, 187, 137, 0.65)',
|
|
70
|
+
fill: 'rgba(245, 187, 137, 0.25)',
|
|
71
|
+
},
|
|
72
|
+
'color-warmup-corn': {
|
|
73
|
+
stroke: 'rgba(253, 224, 130, 0.65)',
|
|
74
|
+
fill: 'rgba(253, 224, 130, 0.25)',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
export const colorMapGray = {
|
|
78
|
+
'gray-darkest': {
|
|
79
|
+
stroke: 'rgba(42, 55, 64, 0.65)',
|
|
80
|
+
fill: 'rgba(42, 55, 64, 0.25)',
|
|
81
|
+
},
|
|
82
|
+
'gray-darker': {
|
|
83
|
+
stroke: 'rgba(76, 86, 103, 0.65)',
|
|
84
|
+
fill: 'rgba(76, 86, 103, 0.25)',
|
|
85
|
+
},
|
|
86
|
+
'gray-dark': {
|
|
87
|
+
stroke: 'rgba(105, 122, 139, 0.65)',
|
|
88
|
+
fill: 'rgba(105, 122, 139, 0.25)',
|
|
89
|
+
},
|
|
90
|
+
gray: {
|
|
91
|
+
stroke: 'rgba(167, 175, 187, 0.65)',
|
|
92
|
+
fill: 'rgba(167, 175, 187, 0.25)',
|
|
93
|
+
},
|
|
94
|
+
'gray-light': {
|
|
95
|
+
stroke: 'rgba(208, 216, 222, 0.65)',
|
|
96
|
+
fill: 'rgba(208, 216, 222, 0.25)',
|
|
97
|
+
},
|
|
98
|
+
'gray-lighter': {
|
|
99
|
+
stroke: 'rgba(229, 235, 240, 0.65)',
|
|
100
|
+
fill: 'rgba(229, 235, 240, 0.25)',
|
|
101
|
+
},
|
|
102
|
+
'gray-lightest': {
|
|
103
|
+
stroke: 'rgba(246, 248, 249, 0.65)',
|
|
104
|
+
fill: 'rgba(246, 248, 249, 0.25)',
|
|
105
|
+
},
|
|
106
|
+
'gray-decent': {
|
|
107
|
+
stroke: 'rgba(253, 253, 253, 0.65)',
|
|
108
|
+
fill: 'rgba(253, 253, 253, 0.25)',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
export const colorMapBrand = {
|
|
112
|
+
'brand-primary': {
|
|
113
|
+
stroke: 'rgba(48, 180, 192, 0.65)',
|
|
114
|
+
fill: 'rgba(48, 180, 192, 0.25)',
|
|
115
|
+
},
|
|
116
|
+
'brand-secondary': {
|
|
117
|
+
stroke: 'rgba(178, 54, 114, 0.65)',
|
|
118
|
+
fill: 'rgba(178, 54, 114, 0.25)',
|
|
119
|
+
},
|
|
120
|
+
'brand-info': {
|
|
121
|
+
stroke: 'rgba(75, 128, 166, 0.65)',
|
|
122
|
+
fill: 'rgba(75, 128, 166, 0.25)',
|
|
123
|
+
},
|
|
124
|
+
'brand-success': {
|
|
125
|
+
stroke: 'rgba(92, 184, 92, 0.65)',
|
|
126
|
+
fill: 'rgba(92, 184, 92, 0.25)',
|
|
127
|
+
},
|
|
128
|
+
'brand-warning': {
|
|
129
|
+
stroke: 'rgba(255, 142, 60, 0.65)',
|
|
130
|
+
fill: 'rgba(255, 142, 60, 0.25)',
|
|
131
|
+
},
|
|
132
|
+
'brand-danger': {
|
|
133
|
+
stroke: 'rgba(226, 40, 55, 0.65)',
|
|
134
|
+
fill: 'rgba(226, 40, 55, 0.25)',
|
|
135
|
+
},
|
|
136
|
+
};
|
|
137
|
+
export const colorMapStatus = {
|
|
138
|
+
'color-status-available': {
|
|
139
|
+
stroke: 'rgba(35, 155, 125, 0.65)',
|
|
140
|
+
fill: 'rgba(35, 155, 125, 0.25)',
|
|
141
|
+
},
|
|
142
|
+
'color-status-driving': {
|
|
143
|
+
stroke: 'rgba(54, 144, 174, 0.65)',
|
|
144
|
+
fill: 'rgba(54, 144, 174, 0.25)',
|
|
145
|
+
},
|
|
146
|
+
'color-status-resting': {
|
|
147
|
+
stroke: 'rgba(98, 107, 114, 0.65)',
|
|
148
|
+
fill: 'rgba(98, 107, 114, 0.25)',
|
|
149
|
+
},
|
|
150
|
+
'color-status-working': {
|
|
151
|
+
stroke: 'rgba(148, 72, 139, 0.65)',
|
|
152
|
+
fill: 'rgba(148, 72, 139, 0.25)',
|
|
153
|
+
},
|
|
154
|
+
};
|
|
155
|
+
export const colorMapMarker = {
|
|
156
|
+
'color-map-marker-text': {
|
|
157
|
+
stroke: 'rgba(255, 255, 255, 0.65)',
|
|
158
|
+
fill: 'rgba(255, 255, 255, 0.25)',
|
|
159
|
+
},
|
|
160
|
+
'color-map-marker-active': {
|
|
161
|
+
stroke: 'rgba(255, 255, 255, 0.65)',
|
|
162
|
+
fill: 'rgba(255, 255, 255, 0.25)',
|
|
163
|
+
},
|
|
164
|
+
'color-map-marker-asset': {
|
|
165
|
+
stroke: 'rgba(42, 55, 64, 0.65)',
|
|
166
|
+
fill: 'rgba(42, 55, 64, 0.25)',
|
|
167
|
+
},
|
|
168
|
+
'color-map-marker-poi': {
|
|
169
|
+
stroke: 'rgba(203, 57, 149, 0.65)',
|
|
170
|
+
fill: 'rgba(203, 57, 149, 0.25)',
|
|
171
|
+
},
|
|
172
|
+
'color-map-marker-geofence': {
|
|
173
|
+
stroke: 'rgba(242, 84, 95, 0.65)',
|
|
174
|
+
fill: 'rgba(242, 84, 95, 0.25)',
|
|
175
|
+
},
|
|
176
|
+
'color-map-marker-route': {
|
|
177
|
+
stroke: 'rgba(54, 175, 215, 0.65)',
|
|
178
|
+
fill: 'rgba(54, 175, 215, 0.25)',
|
|
179
|
+
},
|
|
180
|
+
'color-map-marker-info': {
|
|
181
|
+
stroke: 'rgba(63, 117, 155, 0.65)',
|
|
182
|
+
fill: 'rgba(63, 117, 155, 0.25)',
|
|
183
|
+
},
|
|
184
|
+
'color-map-marker-success': {
|
|
185
|
+
stroke: 'rgba(92, 184, 92, 0.65)',
|
|
186
|
+
fill: 'rgba(92, 184, 92, 0.25)',
|
|
187
|
+
},
|
|
188
|
+
'color-map-marker-warning': {
|
|
189
|
+
stroke: 'rgba(255, 142, 60, 0.65)',
|
|
190
|
+
fill: 'rgba(255, 142, 60, 0.25)',
|
|
191
|
+
},
|
|
192
|
+
'color-map-marker-danger': {
|
|
193
|
+
stroke: 'rgba(226, 40, 55, 0.65)',
|
|
194
|
+
fill: 'rgba(226, 40, 55, 0.25)',
|
|
195
|
+
},
|
|
196
|
+
};
|
|
197
|
+
export const colorMapRating = {
|
|
198
|
+
'color-rating-1': {
|
|
199
|
+
stroke: 'rgba(226, 40, 55, 0.65)',
|
|
200
|
+
fill: 'rgba(226, 40, 55, 0.25)',
|
|
201
|
+
},
|
|
202
|
+
'color-rating-2': {
|
|
203
|
+
stroke: 'rgba(255, 142, 60, 0.65)',
|
|
204
|
+
fill: 'rgba(255, 142, 60, 0.25)',
|
|
205
|
+
},
|
|
206
|
+
'color-rating-3': {
|
|
207
|
+
stroke: 'rgba(248, 197, 117, 0.65)',
|
|
208
|
+
fill: 'rgba(248, 197, 117, 0.25)',
|
|
209
|
+
},
|
|
210
|
+
'color-rating-4': {
|
|
211
|
+
stroke: 'rgba(92, 184, 92, 0.65)',
|
|
212
|
+
fill: 'rgba(92, 184, 92, 0.25)',
|
|
213
|
+
},
|
|
214
|
+
'color-rating-5': {
|
|
215
|
+
stroke: 'rgba(75, 146, 76, 0.65)',
|
|
216
|
+
fill: 'rgba(75, 146, 76, 0.25)',
|
|
217
|
+
},
|
|
218
|
+
};
|
|
219
|
+
export const colorMapHighlight = {
|
|
220
|
+
'color-highlight-darkest': {
|
|
221
|
+
stroke: 'rgba(21, 75, 86, 0.65)',
|
|
222
|
+
fill: 'rgba(21, 75, 86, 0.25)',
|
|
223
|
+
},
|
|
224
|
+
'color-highlight-darker': {
|
|
225
|
+
stroke: 'rgba(32, 110, 126, 0.65)',
|
|
226
|
+
fill: 'rgba(32, 110, 126, 0.25)',
|
|
227
|
+
},
|
|
228
|
+
'color-highlight-dark': {
|
|
229
|
+
stroke: 'rgba(38, 136, 151, 0.65)',
|
|
230
|
+
fill: 'rgba(38, 136, 151, 0.25)',
|
|
231
|
+
},
|
|
232
|
+
'color-highlight': {
|
|
233
|
+
stroke: 'rgba(48, 180, 192, 0.65)',
|
|
234
|
+
fill: 'rgba(48, 180, 192, 0.25)',
|
|
235
|
+
},
|
|
236
|
+
'color-highlight-light': {
|
|
237
|
+
stroke: 'rgba(141, 219, 227, 0.65)',
|
|
238
|
+
fill: 'rgba(141, 219, 227, 0.25)',
|
|
239
|
+
},
|
|
240
|
+
'color-highlight-lighter': {
|
|
241
|
+
stroke: 'rgba(206, 240, 243, 0.65)',
|
|
242
|
+
fill: 'rgba(206, 240, 243, 0.25)',
|
|
243
|
+
},
|
|
244
|
+
'color-highlight-lightest': {
|
|
245
|
+
stroke: 'rgba(235, 249, 250, 0.65)',
|
|
246
|
+
fill: 'rgba(235, 249, 250, 0.25)',
|
|
247
|
+
},
|
|
248
|
+
'color-highlight-decent': {
|
|
249
|
+
stroke: 'rgba(243, 251, 252, 0.65)',
|
|
250
|
+
fill: 'rgba(243, 251, 252, 0.25)',
|
|
251
|
+
},
|
|
252
|
+
};
|
|
@@ -161,6 +161,6 @@ export type IncidentDataPoint = {
|
|
|
161
161
|
roadClosed: boolean;
|
|
162
162
|
position: Position;
|
|
163
163
|
};
|
|
164
|
-
export declare const markerColorOptions: readonly ["bg-map-marker-asset", "bg-map-marker-poi", "bg-map-marker-geofence", "bg-map-marker-route", "bg-map-marker-info", "bg-map-marker-success", "bg-map-marker-warning", "bg-map-marker-danger"];
|
|
164
|
+
export declare const markerColorOptions: readonly ["bg-map-marker-asset", "bg-map-marker-poi", "bg-map-marker-geofence", "bg-map-marker-route", "bg-map-marker-info", "bg-map-marker-success", "bg-map-marker-warning", "bg-map-marker-danger", "bg-map-marker-restrictions"];
|
|
165
165
|
export type MarkerColor = (typeof markerColorOptions)[number];
|
|
166
166
|
export declare const markerColorMapping: Record<MarkerColor, string>;
|
|
@@ -19,6 +19,7 @@ export const markerColorOptions = [
|
|
|
19
19
|
'bg-map-marker-success',
|
|
20
20
|
'bg-map-marker-warning',
|
|
21
21
|
'bg-map-marker-danger',
|
|
22
|
+
'bg-map-marker-restrictions',
|
|
22
23
|
];
|
|
23
24
|
export const markerColorMapping = {
|
|
24
25
|
'bg-map-marker-asset': '--color-map-marker-asset',
|
|
@@ -29,4 +30,5 @@ export const markerColorMapping = {
|
|
|
29
30
|
'bg-map-marker-success': '--color-map-marker-success',
|
|
30
31
|
'bg-map-marker-warning': '--color-map-marker-warning',
|
|
31
32
|
'bg-map-marker-danger': '--color-map-marker-danger',
|
|
33
|
+
'bg-map-marker-restrictions': '--color-map-marker-restrictions',
|
|
32
34
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type ReactNode } from 'react';
|
|
1
|
+
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
2
|
import { type MarkerColor } from '../map/utils/mapTypes';
|
|
3
|
-
export type SingleMapMarkerProps = {
|
|
3
|
+
export type SingleMapMarkerProps = ComponentProps<'div'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Defines the rotation of the arrow in deg.
|
|
6
6
|
*
|
|
@@ -73,6 +73,7 @@ export type SingleMapMarkerProps = {
|
|
|
73
73
|
* - `bg-map-marker-success`
|
|
74
74
|
* - `bg-map-marker-warning`
|
|
75
75
|
* - `bg-map-marker-danger`
|
|
76
|
+
* - `bg-map-marker-restrictions`
|
|
76
77
|
*
|
|
77
78
|
* @default 'bg-map-marker-asset'
|
|
78
79
|
*/
|
|
@@ -16,12 +16,12 @@ const MapStateIndicator = (props) => {
|
|
|
16
16
|
};
|
|
17
17
|
const getIcons = (iconNames = []) => iconNames.map((name, index) => (_jsx("div", { className: `rio-map-icon rioglyph rioglyph-${name}` }, `rio-map-icon-${name}-${index}`)));
|
|
18
18
|
const SingleMapMarker = (props) => {
|
|
19
|
-
const { bearing = DEFAULT_BEARING, name, warningCount = 0, exceptionCount = 0, active = false, clickable = true, fixed = false, moving = false, pinging = false, anchorIconName, stateIconName, iconNames, markerColor = 'bg-map-marker-asset', textColor, anchorSize, markerOnHover = false, anchorOnly = !name && !iconNames, cursor = 'cursor-pointer', } = props;
|
|
19
|
+
const { bearing = DEFAULT_BEARING, name, warningCount = 0, exceptionCount = 0, active = false, clickable = true, fixed = false, moving = false, pinging = false, anchorIconName, stateIconName, iconNames, markerColor = 'bg-map-marker-asset', textColor, anchorSize, markerOnHover = false, anchorOnly = !name && !iconNames, cursor = 'cursor-pointer', className, style, } = props;
|
|
20
20
|
const largeAnchor = anchorSize === 'lg';
|
|
21
|
-
const classes = classNames(active && 'active', 'rio-map-marker', 'rio-map-marker-bottom-center', !clickable && 'not-clickable');
|
|
21
|
+
const classes = classNames(active && 'active', 'rio-map-marker', 'rio-map-marker-bottom-center', !clickable && 'not-clickable', className);
|
|
22
22
|
const anchorClasses = classNames('rio-map-anchor', largeAnchor ? 'rio-map-anchor-lg' : '', cursor);
|
|
23
23
|
const singleClasses = classNames('rio-map-single', fixed && 'fixed', moving && 'moving', textColor, markerOnHover && 'visible-on-hover', active && 'active', pinging && 'pinging', cursor);
|
|
24
24
|
const markerBackgroundColor = `var(${markerColorMapping[markerColor]})`;
|
|
25
|
-
return (_jsx("div", Object.assign({ className: classes, style: { color: markerBackgroundColor }, "data-marker-type": markerColor.replace('bg-', 'single-') }, { children: _jsxs("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: [!anchorOnly && (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: singleClasses }, { children: [_jsx(MapStateIndicator, { moving: moving, bearing: bearing, stateIconName: stateIconName }), getIcons(iconNames), name && _jsx("div", Object.assign({ className: 'rio-map-name' }, { children: name })), exceptionCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount })), warningCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount }))] })), _jsx("div", { className: 'rio-map-anchor-arrow' })] })), _jsx("div", Object.assign({ className: anchorClasses }, { children: anchorIconName && largeAnchor && _jsx("span", { className: `rioglyph rioglyph-${anchorIconName}` }) }))] })) })));
|
|
25
|
+
return (_jsx("div", Object.assign({ className: classes, style: Object.assign(Object.assign({}, style), { color: markerBackgroundColor }), "data-marker-type": markerColor.replace('bg-', 'single-') }, { children: _jsxs("div", Object.assign({ className: 'rio-map-marker-translate' }, { children: [!anchorOnly && (_jsxs(_Fragment, { children: [_jsxs("div", Object.assign({ className: singleClasses }, { children: [_jsx(MapStateIndicator, { moving: moving, bearing: bearing, stateIconName: stateIconName }), getIcons(iconNames), name && _jsx("div", Object.assign({ className: 'rio-map-name' }, { children: name })), exceptionCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble exception' }, { children: exceptionCount })), warningCount > 0 && _jsx("div", Object.assign({ className: 'rio-map-bubble warning' }, { children: warningCount }))] })), _jsx("div", { className: 'rio-map-anchor-arrow' })] })), _jsx("div", Object.assign({ className: anchorClasses }, { children: anchorIconName && largeAnchor && _jsx("span", { className: `rioglyph rioglyph-${anchorIconName}` }) }))] })) })));
|
|
26
26
|
};
|
|
27
27
|
export default SingleMapMarker;
|
|
@@ -48,7 +48,6 @@ export type BaseSelectDropdownProps<T extends SelectOption> = {
|
|
|
48
48
|
noItemMessage?: string | React.ReactNode;
|
|
49
49
|
focusedItemIndex?: number;
|
|
50
50
|
dropdownClassName?: string;
|
|
51
|
-
requestItemDOMValues?: boolean;
|
|
52
51
|
keyboardUsed?: boolean;
|
|
53
52
|
useActiveClass?: boolean;
|
|
54
53
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// @ts-ignore-next-line importsNotUsedAsValues
|
|
3
|
-
import { useLayoutEffect, useRef, useState } from 'react';
|
|
3
|
+
import { useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
import isEmpty from 'lodash/fp/isEmpty';
|
|
6
6
|
import noop from 'lodash/fp/noop';
|
|
@@ -40,6 +40,12 @@ const BaseSelectDropdown = (props) => {
|
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
}, [dropDirection, dropdownMenuRef]);
|
|
43
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (dropdownMenuRef.current) {
|
|
46
|
+
updateDOMValues(updateItemDOMValues());
|
|
47
|
+
}
|
|
48
|
+
}, [dropdownMenuRef.current]);
|
|
43
49
|
// update internal state for isOpen
|
|
44
50
|
const [previousIsOpen, setPreviousIsOpen] = useState(isOpen);
|
|
45
51
|
if (isOpen && !previousIsOpen) {
|
|
@@ -24,7 +24,6 @@ const Multiselect = (props) => {
|
|
|
24
24
|
const [filteredOptions, setFilteredOptions] = useState(options);
|
|
25
25
|
const [itemDOMValues, setItemDOMValues] = useState([]);
|
|
26
26
|
const [focusedItemIndex, setFocusedItemIndex] = useState(DEFAULT_FOCUSED_ITEM_INDEX);
|
|
27
|
-
const [requestItemDOMValues, setRequestItemDOMValues] = useState(false);
|
|
28
27
|
const [keyboardUsed, setKeyboardUsed] = useState(false);
|
|
29
28
|
const refToggle = useRef(null);
|
|
30
29
|
const refMultiSelectWrapper = useRef(null);
|
|
@@ -57,12 +56,10 @@ const Multiselect = (props) => {
|
|
|
57
56
|
if (!isEqual(options, previousOptions)) {
|
|
58
57
|
updateSelectedItems(options, value);
|
|
59
58
|
setFilteredOptions(options);
|
|
60
|
-
setRequestItemDOMValues(true);
|
|
61
59
|
setPreviousOptions(options);
|
|
62
60
|
}
|
|
63
61
|
const updateDOMValues = (updatedItemDOMValues = []) => {
|
|
64
62
|
setItemDOMValues(updatedItemDOMValues);
|
|
65
|
-
setRequestItemDOMValues(false);
|
|
66
63
|
};
|
|
67
64
|
const renderFilter = () => (_jsx(MultiselectToggleFilter, { isActive: isFilterActive || !!filterValue, selectedItemIds: selectedItemIds, filterValue: filterValue, onFilterChange: handleFilterChange, multiline: multiline }));
|
|
68
65
|
const renderSelection = () => {
|
|
@@ -86,7 +83,7 @@ const Multiselect = (props) => {
|
|
|
86
83
|
option.selected = selectedItemIds.indexOf(option.id) !== -1;
|
|
87
84
|
return option;
|
|
88
85
|
});
|
|
89
|
-
return (_jsx(BaseSelectDropdown, { isOpen: isOpen, isLoading: isLoading, options: nonSelectedOptions, focusedItemIndex: focusedItemIndex, keyboardUsed: keyboardUsed, updateDOMValues: updateDOMValues, onSelect: onOptionChange, onClose: closeMenu, noItemMessage: noItemMessage, pullRight: pullRight, useActiveClass: true, dropup: dropup, autoDropDirection: autoDropDirection
|
|
86
|
+
return (_jsx(BaseSelectDropdown, { isOpen: isOpen, isLoading: isLoading, options: nonSelectedOptions, focusedItemIndex: focusedItemIndex, keyboardUsed: keyboardUsed, updateDOMValues: updateDOMValues, onSelect: onOptionChange, onClose: closeMenu, noItemMessage: noItemMessage, pullRight: pullRight, useActiveClass: true, dropup: dropup, autoDropDirection: autoDropDirection }));
|
|
90
87
|
};
|
|
91
88
|
const handleFilterChange = (event) => {
|
|
92
89
|
event.preventDefault();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type SelectOption } from './BaseSelectDropdown';
|
|
3
|
-
import { WithFeedbackAndAddonProps } from './WithFeedbackAndAddon';
|
|
3
|
+
import { type WithFeedbackAndAddonProps } from './WithFeedbackAndAddon';
|
|
4
4
|
export type { SelectOption } from './BaseSelectDropdown';
|
|
5
5
|
export type SelectProps<T extends SelectOption> = Omit<WithFeedbackAndAddonProps, 'bsSize'> & {
|
|
6
6
|
/**
|
|
@@ -23,7 +23,6 @@ const Select = (props) => {
|
|
|
23
23
|
const [filteredOptions, setFilteredOptions] = useState(options);
|
|
24
24
|
const [itemDOMValues, setItemDOMValues] = useState([]);
|
|
25
25
|
const [focusedItemIndex, setFocusedItemIndex] = useState(DEFAULT_FOCUSED_ITEM_INDEX);
|
|
26
|
-
const [requestItemDOMValues, setRequestItemDOMValues] = useState(false);
|
|
27
26
|
const [keyboardUsed, setKeyboardUsed] = useState(false);
|
|
28
27
|
const refSelect = useRef();
|
|
29
28
|
const refToggle = useRef(null);
|
|
@@ -44,7 +43,6 @@ const Select = (props) => {
|
|
|
44
43
|
if (!isEqual(options, previousOptions)) {
|
|
45
44
|
updateSelectedItem(options, value);
|
|
46
45
|
setFilteredOptions(options);
|
|
47
|
-
setRequestItemDOMValues(true);
|
|
48
46
|
setPreviousOptions(options);
|
|
49
47
|
}
|
|
50
48
|
const [previousValue, setPreviousValue] = useState(value);
|
|
@@ -54,7 +52,6 @@ const Select = (props) => {
|
|
|
54
52
|
}
|
|
55
53
|
const updateDOMValues = (itemDOMValuesToUpdated = []) => {
|
|
56
54
|
setItemDOMValues(itemDOMValuesToUpdated);
|
|
57
|
-
setRequestItemDOMValues(false);
|
|
58
55
|
};
|
|
59
56
|
const handleClearSelectedItem = () => {
|
|
60
57
|
setSelectedItem(null);
|
|
@@ -82,7 +79,7 @@ const Select = (props) => {
|
|
|
82
79
|
else if (keyboardUsed) {
|
|
83
80
|
currentFocusedItemIndex = 0;
|
|
84
81
|
}
|
|
85
|
-
return (_jsx(BaseSelectDropdown, { isOpen: isOpen, isLoading: isLoading, options: filteredOptions, focusedItemIndex: currentFocusedItemIndex, keyboardUsed: keyboardUsed, updateDOMValues: updateDOMValues, onSelect: onOptionChange, onClose: closeMenu, noItemMessage: noItemMessage, pullRight: pullRight, dropup: dropup, autoDropDirection: autoDropDirection, dropdownClassName: dropdownClassName
|
|
82
|
+
return (_jsx(BaseSelectDropdown, { isOpen: isOpen, isLoading: isLoading, options: filteredOptions, focusedItemIndex: currentFocusedItemIndex, keyboardUsed: keyboardUsed, updateDOMValues: updateDOMValues, onSelect: onOptionChange, onClose: closeMenu, noItemMessage: noItemMessage, pullRight: pullRight, dropup: dropup, autoDropDirection: autoDropDirection, dropdownClassName: dropdownClassName }));
|
|
86
83
|
};
|
|
87
84
|
const handleFilterChange = (event) => {
|
|
88
85
|
event.preventDefault();
|
|
@@ -1,17 +1,42 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
// @ts-ignore-next-line importsNotUsedAsValues
|
|
3
|
-
import { forwardRef } from 'react';
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useRef, } from 'react';
|
|
4
4
|
import { Scrollbars } from 'react-custom-scrollbars-2';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import noop from 'lodash/fp/noop';
|
|
7
|
+
import debounce from 'lodash/fp/debounce';
|
|
8
|
+
const RESIZE_THROTTLING = 100;
|
|
7
9
|
const SmoothScrollbars = forwardRef((componentProps, ref) => {
|
|
8
10
|
const { slideIn = false, largeTrack = false, trackOffset = false, className = '', onScroll = noop, tagName = 'div', autoHeight = false, autoHeightMin = 0, autoHeightMax = 200, children, } = componentProps;
|
|
11
|
+
const scrollbarsRef = useRef(null);
|
|
12
|
+
const contentRef = useRef(null);
|
|
13
|
+
useImperativeHandle(ref, () => scrollbarsRef.current);
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
if (!contentRef.current || !scrollbarsRef.current) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const updateScrollbars = debounce(RESIZE_THROTTLING)(() => {
|
|
19
|
+
if (scrollbarsRef.current) {
|
|
20
|
+
// Trigger a update for the scrollbars.
|
|
21
|
+
// This is needed since the lib does not automatically update on content height changes
|
|
22
|
+
// See: https://github.com/RobPethick/react-custom-scrollbars-2/issues/12
|
|
23
|
+
// Use type assertion to tell TypeScript that 'update' exists
|
|
24
|
+
scrollbarsRef.current.update();
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const resizeObserver = new ResizeObserver(updateScrollbars);
|
|
28
|
+
resizeObserver.observe(contentRef.current);
|
|
29
|
+
return () => {
|
|
30
|
+
resizeObserver.disconnect();
|
|
31
|
+
updateScrollbars.cancel();
|
|
32
|
+
};
|
|
33
|
+
}, []);
|
|
9
34
|
const wrapperClassNames = classNames(className, slideIn && 'scrollbar-fly-in', 'smooth-scrollbar-wrapper');
|
|
10
35
|
const renderTrackVerticalNames = classNames('scrollbar-track-vertical', largeTrack && 'scrollbar-track-size-large', trackOffset && 'scrollbar-track-offset');
|
|
11
36
|
const renderThumbVerticalNames = classNames('scrollbar-thumb-vertical', largeTrack && 'scrollbar-thumb-size-large');
|
|
12
37
|
const renderTrackHorizontalNames = classNames('scrollbar-track-horizontal', largeTrack && 'scrollbar-track-size-large', trackOffset && 'scrollbar-track-offset');
|
|
13
38
|
const renderThumbHorizontalNames = classNames('scrollbar-thumb-horizontal', largeTrack && 'scrollbar-thumb-size-large');
|
|
14
|
-
return (_jsx(Scrollbars, Object.assign({ ref:
|
|
39
|
+
return (_jsx(Scrollbars, Object.assign({ ref: scrollbarsRef, tagName: tagName, onScroll: onScroll, className: wrapperClassNames, hideTracksWhenNotNeeded: true, autoHeight: autoHeight, autoHeightMin: autoHeightMin, autoHeightMax: autoHeightMax, renderView: props => {
|
|
15
40
|
return _jsx("div", Object.assign({}, props, { className: 'scrollbar-view' }));
|
|
16
41
|
}, renderTrackVertical: props => {
|
|
17
42
|
return _jsx("div", Object.assign({}, props, { className: renderTrackVerticalNames }));
|
|
@@ -21,6 +46,6 @@ const SmoothScrollbars = forwardRef((componentProps, ref) => {
|
|
|
21
46
|
return _jsx("div", Object.assign({}, props, { className: renderTrackHorizontalNames }));
|
|
22
47
|
}, renderThumbHorizontal: props => {
|
|
23
48
|
return _jsx("div", Object.assign({}, props, { className: renderThumbHorizontalNames }));
|
|
24
|
-
} }, { children: children })));
|
|
49
|
+
} }, { children: _jsx("div", Object.assign({ className: 'scrollbar-content-wrapper', ref: contentRef }, { children: children })) })));
|
|
25
50
|
});
|
|
26
51
|
export default SmoothScrollbars;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type SortDirectionType } from '../utils/SortUtils';
|
|
2
|
+
type SortKey<T> = keyof T | [keyof T, keyof T];
|
|
3
|
+
type UseSortingResult<T> = {
|
|
4
|
+
/**
|
|
5
|
+
* The sorted data
|
|
6
|
+
*/
|
|
7
|
+
sortedItems: T[];
|
|
8
|
+
/**
|
|
9
|
+
* The key(s) to sort the data for
|
|
10
|
+
*/
|
|
11
|
+
sortKey: SortKey<T>;
|
|
12
|
+
/**
|
|
13
|
+
* The current direction that the data is sorted
|
|
14
|
+
*/
|
|
15
|
+
sortDirection: SortDirectionType;
|
|
16
|
+
/**
|
|
17
|
+
* Function to change the sorting key(s) afterwards
|
|
18
|
+
* @param newKey the new sorting key(s)
|
|
19
|
+
* @returns
|
|
20
|
+
*/
|
|
21
|
+
setSortKey: (newKey: SortKey<T>) => void;
|
|
22
|
+
/**
|
|
23
|
+
* Function to toggle the sorting between ascending and descending order
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
toggleDirection: () => void;
|
|
27
|
+
};
|
|
28
|
+
declare const useSorting: <T>(items: T[], initialKey: SortKey<T>, initialDirection?: SortDirectionType, enableNaturalSort?: boolean, isCaseSensitive?: boolean) => UseSortingResult<T>;
|
|
29
|
+
export default useSorting;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useState, useMemo } from 'react';
|
|
2
|
+
import { naturalSortByProperty, SortDirection } from '../utils/SortUtils';
|
|
3
|
+
const useSorting = (items, initialKey, initialDirection = SortDirection.ASCENDING, enableNaturalSort = true, isCaseSensitive = false) => {
|
|
4
|
+
const [sortKey, setSortKey] = useState(initialKey);
|
|
5
|
+
const [sortDirection, setSortDirection] = useState(initialDirection);
|
|
6
|
+
const sortedItems = useMemo(() => {
|
|
7
|
+
const sortByKey = (arr, key) => {
|
|
8
|
+
return enableNaturalSort
|
|
9
|
+
? naturalSortByProperty(arr, key, sortDirection, isCaseSensitive)
|
|
10
|
+
: arr.sort((a, b) => {
|
|
11
|
+
const aVal = a[key];
|
|
12
|
+
const bVal = b[key];
|
|
13
|
+
if (aVal < bVal)
|
|
14
|
+
return sortDirection === SortDirection.ASCENDING ? -1 : 1;
|
|
15
|
+
if (aVal > bVal)
|
|
16
|
+
return sortDirection === SortDirection.ASCENDING ? 1 : -1;
|
|
17
|
+
return 0;
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
if (Array.isArray(sortKey)) {
|
|
21
|
+
const [primaryKey, secondaryKey] = sortKey;
|
|
22
|
+
const primarySorted = sortByKey(items, primaryKey);
|
|
23
|
+
// Group items with the same primary key value
|
|
24
|
+
const groups = primarySorted.reduce((acc, item) => {
|
|
25
|
+
const key = String(item[primaryKey]);
|
|
26
|
+
if (!acc[key])
|
|
27
|
+
acc[key] = [];
|
|
28
|
+
acc[key].push(item);
|
|
29
|
+
return acc;
|
|
30
|
+
}, {});
|
|
31
|
+
// Sort each group by the secondary key and flatten the result
|
|
32
|
+
return Object.values(groups).flatMap(group => sortByKey(group, secondaryKey));
|
|
33
|
+
}
|
|
34
|
+
return sortByKey(items, sortKey);
|
|
35
|
+
}, [items, sortKey, sortDirection, enableNaturalSort, isCaseSensitive]);
|
|
36
|
+
const toggleDirection = () => {
|
|
37
|
+
setSortDirection(prev => prev === SortDirection.ASCENDING ? SortDirection.DESCENDING : SortDirection.ASCENDING);
|
|
38
|
+
};
|
|
39
|
+
return { sortedItems, sortKey, sortDirection, setSortKey, toggleDirection };
|
|
40
|
+
};
|
|
41
|
+
export default useSorting;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var FadeExpander_1 = require("./components/fade/FadeExpander");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(FadeExpander_1).default; } });
|
|
7
|
+
tslib_1.__exportStar(require("./components/fade/FadeExpander"), exports);
|
package/lib/es/FadeUp.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var FadeUp_1 = require("./components/fade/FadeUp");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(FadeUp_1).default; } });
|
|
7
|
+
tslib_1.__exportStar(require("./components/fade/FadeUp"), exports);
|
package/lib/es/XAxis.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var XAxis_1 = require("./components/charts/XAxis");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(XAxis_1).default; } });
|
|
7
|
+
tslib_1.__exportStar(require("./components/charts/XAxis"), exports);
|
package/lib/es/YAxis.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var YAxis_1 = require("./components/charts/YAxis");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(YAxis_1).default; } });
|
|
7
|
+
tslib_1.__exportStar(require("./components/charts/YAxis"), exports);
|
|
@@ -12,6 +12,11 @@ export type ApplicationLayoutBodyProps = {
|
|
|
12
12
|
* @default true
|
|
13
13
|
*/
|
|
14
14
|
forceScrollbar?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Prop to trigger scroll reset from outside. This comes in handy when changing the body content
|
|
17
|
+
* and to reset the scrolling like when the pathname changes from an body internal menu.
|
|
18
|
+
*/
|
|
19
|
+
scrollResetTrigger?: any;
|
|
15
20
|
/**
|
|
16
21
|
* The ApplicationLayoutBodyBanner component.
|
|
17
22
|
*/
|
|
@@ -9,11 +9,20 @@ const SmoothScrollbars_1 = tslib_1.__importDefault(require("../smoothScrollbars/
|
|
|
9
9
|
const RESIZE_THROTTLING = 200;
|
|
10
10
|
const DEFAULT_BOTTOM_BAR_HEIGHT = 54;
|
|
11
11
|
const ApplicationLayoutBody = (0, react_1.forwardRef)((props, ref) => {
|
|
12
|
-
const { className, innerClassName, forceScrollbar = true, enableScrollToTop = true, banner, navigation, bottomBar, bottomBarHeight = DEFAULT_BOTTOM_BAR_HEIGHT, children } = props, remainingProps = tslib_1.__rest(props, ["className", "innerClassName", "forceScrollbar", "enableScrollToTop", "banner", "navigation", "bottomBar", "bottomBarHeight", "children"]);
|
|
12
|
+
const { className, innerClassName, forceScrollbar = true, enableScrollToTop = true, banner, navigation, bottomBar, bottomBarHeight = DEFAULT_BOTTOM_BAR_HEIGHT, scrollResetTrigger, children } = props, remainingProps = tslib_1.__rest(props, ["className", "innerClassName", "forceScrollbar", "enableScrollToTop", "banner", "navigation", "bottomBar", "bottomBarHeight", "scrollResetTrigger", "children"]);
|
|
13
13
|
const [offset, setOffset] = (0, react_1.useState)(0);
|
|
14
14
|
const moduleContentRef = (0, react_1.useRef)(null);
|
|
15
15
|
const layoutBodyRef = (0, react_1.useRef)(null);
|
|
16
16
|
(0, react_1.useImperativeHandle)(ref, () => layoutBodyRef, []);
|
|
17
|
+
// Reset scroll position when children are different. This fixes the issue of
|
|
18
|
+
// changing body content (like in another route) and still having the same scroll position
|
|
19
|
+
// biome-ignore lint/correctness/useExhaustiveDependencies: <explanation>
|
|
20
|
+
(0, react_1.useEffect)(() => {
|
|
21
|
+
if (moduleContentRef.current) {
|
|
22
|
+
moduleContentRef.current.scrollTop(0);
|
|
23
|
+
setOffset(0);
|
|
24
|
+
}
|
|
25
|
+
}, [scrollResetTrigger]);
|
|
17
26
|
(0, react_1.useEffect)(() => {
|
|
18
27
|
var _a;
|
|
19
28
|
if (((_a = layoutBodyRef.current) === null || _a === void 0 ? void 0 : _a.parentNode) instanceof HTMLElement) {
|