@fleetbase/ember-ui 0.3.3 → 0.3.4
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/addon/components/layout/sidebar/item.hbs +3 -1
- package/addon/helpers/format-date.js +7 -11
- package/addon/styles/components/chat.css +4 -2
- package/addon/styles/layout/next.css +44 -5
- package/addon/utils/smart-humanize.js +2 -0
- package/package.json +2 -2
- package/patches/{ember-leaflet.patch → ember-leaflet@5.1.3.patch} +2 -3
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
...attributes
|
|
8
8
|
>
|
|
9
9
|
<div class="next-nav-item-icon-container {{@iconWrapperClass}}">
|
|
10
|
-
{{#if @
|
|
10
|
+
{{#if @iconComponent}}
|
|
11
|
+
{{component @iconComponent options=@iconComponentOptions}}
|
|
12
|
+
{{else if @icon}}
|
|
11
13
|
<FaIcon @prefix={{@iconPrefix}} @icon={{@icon}} @size={{or @iconSize "xs"}} class={{@iconClass}} />
|
|
12
14
|
{{/if}}
|
|
13
15
|
</div>
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import formatDateUtil from '../utils/format-date';
|
|
2
1
|
import { helper } from '@ember/component/helper';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
2
|
+
import { parse, format } from 'date-fns';
|
|
3
|
+
import isObject from '@fleetbase/ember-core/utils/is-object';
|
|
4
|
+
import isEmptyObject from '@fleetbase/ember-core/utils/is-empty-object';
|
|
5
5
|
|
|
6
|
-
export default helper(function formatDate([dateInstance, formatString = 'PPP p', parseOptions =
|
|
7
|
-
if (
|
|
6
|
+
export default helper(function formatDate([dateInstance, formatString = 'PPP p', parseOptions = {}]) {
|
|
7
|
+
if (isObject(formatString)) {
|
|
8
8
|
parseOptions = formatString;
|
|
9
9
|
formatString = 'PPP p';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
if (typeof dateInstance === 'string') {
|
|
13
|
-
|
|
14
|
-
dateInstance = parse(dateInstance, parseOptions.formatString, new Date(), parseOptions.options ?? {});
|
|
15
|
-
} else {
|
|
16
|
-
dateInstance = new Date(dateInstance);
|
|
17
|
-
}
|
|
13
|
+
dateInstance = isEmptyObject(parseOptions) ? new Date(dateInstance) : parse(dateInstance, parseOptions?.formatString ?? formatString, new Date(), parseOptions ?? {});
|
|
18
14
|
}
|
|
19
15
|
|
|
20
|
-
return
|
|
16
|
+
return format(dateInstance, formatString);
|
|
21
17
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
.chat-tray-panel-container
|
|
1
|
+
body.fleetbase-console .chat-tray-panel-container,
|
|
2
|
+
body.fleetbase-console .chat-tray-panel-container.ember-basic-dropdown-content {
|
|
2
3
|
box-shadow:
|
|
3
4
|
0 4px 6px -1px rgb(0 0 0 / 0.1),
|
|
4
5
|
0 2px 4px -2px rgb(0 0 0 / 0.1);
|
|
@@ -13,7 +14,8 @@
|
|
|
13
14
|
@apply space-y-2;
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
body[data-theme='dark'] .chat-tray-panel-container
|
|
17
|
+
body[data-theme='dark'] .chat-tray-panel-container,
|
|
18
|
+
body[data-theme='dark'] .chat-tray-panel-container.ember-basic-dropdown-content {
|
|
17
19
|
background-color: #111827;
|
|
18
20
|
border-color: #374151;
|
|
19
21
|
}
|
|
@@ -881,6 +881,14 @@ body[data-theme='light'] .next-map-container-toolbar > .next-map-container-view-
|
|
|
881
881
|
right: 0;
|
|
882
882
|
}
|
|
883
883
|
|
|
884
|
+
body[data-theme="dark"] .next-map-container-view-switch > button > .status-badge.info-status-badge > span {
|
|
885
|
+
@apply bg-gray-800 border border-gray-700;
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
body[data-theme="light"] .next-map-container-view-switch > button > .status-badge.info-status-badge > span {
|
|
889
|
+
@apply bg-white border border-gray-200 text-black;
|
|
890
|
+
}
|
|
891
|
+
|
|
884
892
|
.next-map-container-table-container {
|
|
885
893
|
@apply bg-white opacity-100 relative;
|
|
886
894
|
width: 100%;
|
|
@@ -999,6 +1007,10 @@ body[data-theme='dark'] .next-view-header-item.is-open {
|
|
|
999
1007
|
@apply flex flex-1 items-center justify-end;
|
|
1000
1008
|
}
|
|
1001
1009
|
|
|
1010
|
+
body[data-theme="light"] .next-content-panel-wrapper .next-content-panel-container .next-content-panel > .next-content-panel-header .next-content-panel-header-right .status-badge.info-status-badge > span {
|
|
1011
|
+
@apply bg-blue-500 border border-blue-600;
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1002
1014
|
.next-content-panel-wrapper .next-content-panel-container .next-content-panel > .next-content-panel-header .next-content-panel-header-right > .btn-wrapper > .btn {
|
|
1003
1015
|
@apply py-1.5 text-xs;
|
|
1004
1016
|
}
|
|
@@ -1234,7 +1246,11 @@ body[data-theme='dark'] .next-view-header .next-view-header-right .next-user-but
|
|
|
1234
1246
|
}
|
|
1235
1247
|
|
|
1236
1248
|
.next-sidebar .next-nav-item.active {
|
|
1237
|
-
@apply bg-
|
|
1249
|
+
@apply bg-blue-500 text-white;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
body[data-theme='light'] .next-view-container > nav.next-sidebar a.next-nav-item.active .next-nav-item-icon-container svg {
|
|
1253
|
+
@apply text-white;
|
|
1238
1254
|
}
|
|
1239
1255
|
|
|
1240
1256
|
body[data-theme='dark'] .next-sidebar .next-nav-item.active {
|
|
@@ -1242,17 +1258,28 @@ body[data-theme='dark'] .next-sidebar .next-nav-item.active {
|
|
|
1242
1258
|
}
|
|
1243
1259
|
|
|
1244
1260
|
.next-sidebar .next-nav-item .next-nav-item-icon-container {
|
|
1245
|
-
margin-top: -2px;
|
|
1246
1261
|
@apply w-5;
|
|
1247
1262
|
}
|
|
1248
1263
|
|
|
1249
|
-
.next-sidebar .next-nav-item .next-nav-item-icon-container svg {
|
|
1264
|
+
body[data-theme='dark'] .next-sidebar .next-nav-item .next-nav-item-icon-container svg {
|
|
1250
1265
|
@apply text-gray-100;
|
|
1251
1266
|
}
|
|
1252
1267
|
|
|
1268
|
+
.next-sidebar .next-content-panel-wrapper .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle,
|
|
1269
|
+
.next-sidebar .next-content-panel-wrapper .next-content-panel-container .next-content-panel > .next-content-panel-header,
|
|
1270
|
+
body[data-theme='dark'] .next-sidebar .next-content-panel-wrapper .next-content-panel-container .next-content-panel > .next-content-panel-header,
|
|
1271
|
+
body[data-theme='dark'] .next-sidebar .next-content-panel-wrapper .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle {
|
|
1272
|
+
border-color: transparent;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1253
1275
|
.next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle {
|
|
1254
1276
|
min-height: auto;
|
|
1255
|
-
|
|
1277
|
+
border-color: transparent;
|
|
1278
|
+
@apply flex flex-row items-center justify-between px-3 py-0.5 rounded-md text-sm mb-1 border border-transparent;
|
|
1279
|
+
}
|
|
1280
|
+
|
|
1281
|
+
body[data-theme="light"] .next-sidebar .next-content-panel-wrapper .next-content-panel-container .next-content-panel > .next-content-panel-header.next-sidebar-panel-toggle {
|
|
1282
|
+
background-color: #ffffff;
|
|
1256
1283
|
}
|
|
1257
1284
|
|
|
1258
1285
|
.next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle > .next-content-panel-header-left > .next-content-panel-title-container {
|
|
@@ -1260,13 +1287,25 @@ body[data-theme='dark'] .next-sidebar .next-nav-item.active {
|
|
|
1260
1287
|
}
|
|
1261
1288
|
|
|
1262
1289
|
.next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle:hover {
|
|
1263
|
-
|
|
1290
|
+
border-color: transparent;
|
|
1291
|
+
@apply bg-gray-100;
|
|
1264
1292
|
}
|
|
1265
1293
|
|
|
1266
1294
|
body[data-theme='dark'] .next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle:hover {
|
|
1295
|
+
border-color: transparent;
|
|
1267
1296
|
@apply bg-gray-700;
|
|
1268
1297
|
}
|
|
1269
1298
|
|
|
1299
|
+
body[data-theme='light'] .next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle:hover {
|
|
1300
|
+
border-color: transparent;
|
|
1301
|
+
@apply bg-blue-500;
|
|
1302
|
+
}
|
|
1303
|
+
|
|
1304
|
+
body[data-theme='light'] .next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle:hover a.next-content-panel-header-left,
|
|
1305
|
+
body[data-theme='light'] .next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle:hover a.next-content-panel-header-left .icon-container > svg {
|
|
1306
|
+
color: #ffffff;
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1270
1309
|
.next-sidebar .next-sidebar-panel-container > .next-sidebar-panel > .next-content-panel > .next-sidebar-panel-toggle > .left {
|
|
1271
1310
|
@apply flex-1 flex flex-row items-center;
|
|
1272
1311
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fleetbase/ember-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Fleetbase UI provides all the interface components, helpers, services and utilities for building a Fleetbase extension into the Console.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fleetbase-ui",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"pnpm": {
|
|
188
188
|
"patchedDependencies": {
|
|
189
189
|
"ember-gridstack@4.0.0": "patches/ember-gridstack@4.0.0.patch",
|
|
190
|
-
"ember-leaflet": "patches/ember-leaflet.patch"
|
|
190
|
+
"ember-leaflet@5.1.3": "patches/ember-leaflet@5.1.3.patch"
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/addon/components/marker-layer.js b/addon/components/marker-layer.js
|
|
2
|
-
index 132bc4876f0c2847e732fd66e79b06dedf0ea470..
|
|
2
|
+
index 132bc4876f0c2847e732fd66e79b06dedf0ea470..93a4a446e0ebecc4eebe6e9d3b7831f2b986d036 100644
|
|
3
3
|
--- a/addon/components/marker-layer.js
|
|
4
4
|
+++ b/addon/components/marker-layer.js
|
|
5
5
|
@@ -264,13 +264,15 @@ export default class MarkerLayer extends InteractiveLayer {
|
|
@@ -8,12 +8,11 @@ index 132bc4876f0c2847e732fd66e79b06dedf0ea470..ae87f033f1b12301a9a892ced7e40865
|
|
|
8
8
|
updateFn(layer, value) {
|
|
9
9
|
- let enabled = layer.dragging.enabled();
|
|
10
10
|
layer.setIcon(value);
|
|
11
|
-
|
|
11
|
+
|
|
12
12
|
- if (enabled) {
|
|
13
13
|
- layer.dragging.enable();
|
|
14
14
|
- } else {
|
|
15
15
|
- layer.dragging.disable();
|
|
16
|
-
+
|
|
17
16
|
+ if (layer.dragging) {
|
|
18
17
|
+ let enabled = layer.dragging.enabled();
|
|
19
18
|
+ if (enabled) {
|