@cccsaurora/howler-ui 3.1.0-dev.1437 → 3.1.0-dev.1454
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.
|
@@ -15,6 +15,7 @@ import { useTranslation } from 'react-i18next';
|
|
|
15
15
|
import { Link, useNavigate } from 'react-router-dom';
|
|
16
16
|
import { useContextSelector } from 'use-context-selector';
|
|
17
17
|
import { isEvent } from '@cccsaurora/howler-ui/utils/typeUtils';
|
|
18
|
+
import { convertDateToLucene } from '@cccsaurora/howler-ui/utils/utils';
|
|
18
19
|
import { buildViewUrl } from '@cccsaurora/howler-ui/utils/viewUtils';
|
|
19
20
|
// Custom hook to select records by IDs with proper memoization
|
|
20
21
|
const useSelectRecordsByIds = (recordIds) => {
|
|
@@ -87,6 +88,8 @@ const ViewCard = ({ viewId, limit, refreshTick, onRefreshComplete }) => {
|
|
|
87
88
|
const res = await dispatchApi(api.v2.search.post((view.indexes ?? ['hit']), {
|
|
88
89
|
query: view.query,
|
|
89
90
|
rows: limit,
|
|
91
|
+
sort: view.sort,
|
|
92
|
+
filters: view.span ? [`event.created:${convertDateToLucene(view.span)}`] : [],
|
|
90
93
|
metadata: ['analytic']
|
|
91
94
|
}));
|
|
92
95
|
const fetchedRecords = res.items ?? [];
|
|
@@ -98,7 +101,7 @@ const ViewCard = ({ viewId, limit, refreshTick, onRefreshComplete }) => {
|
|
|
98
101
|
isRefreshing.current = false;
|
|
99
102
|
onRefreshComplete?.();
|
|
100
103
|
}
|
|
101
|
-
}, [dispatchApi, limit, view?.query, view?.indexes, loadRecords, onRefreshComplete]);
|
|
104
|
+
}, [dispatchApi, limit, view?.query, view?.indexes, view?.sort, view?.span, loadRecords, onRefreshComplete]);
|
|
102
105
|
const debouncedRefresh = useCallback(() => {
|
|
103
106
|
if (debounceTimerRef.current) {
|
|
104
107
|
clearTimeout(debounceTimerRef.current);
|
package/package.json
CHANGED
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"chart.js": "^4.5.1",
|
|
34
34
|
"chartjs-adapter-dayjs-4": "^1.0.4",
|
|
35
35
|
"chartjs-plugin-zoom": "^2.2.0",
|
|
36
|
-
"dayjs": "^1.11.
|
|
36
|
+
"dayjs": "^1.11.23",
|
|
37
37
|
"dompurify": "^3.4.13",
|
|
38
38
|
"flat": "^6.0.1",
|
|
39
39
|
"fuse.js": "^7.5.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"url": "https://github.com/CybercentreCanada/howler"
|
|
94
94
|
},
|
|
95
95
|
"type": "module",
|
|
96
|
-
"version": "3.1.0-dev.
|
|
96
|
+
"version": "3.1.0-dev.1454",
|
|
97
97
|
"exports": {
|
|
98
98
|
"./i18n": "./i18n.js",
|
|
99
99
|
"./index.css": "./index.css",
|