@cccsaurora/howler-ui 2.19.0-dev.1282 → 2.19.0-dev.1295
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/api/index.d.ts +1 -1
- package/api/search/action.js +1 -1
- package/api/search/analytic.js +1 -1
- package/api/search/case.js +1 -1
- package/api/search/count/hit.js +1 -1
- package/api/search/dossier.js +1 -1
- package/api/search/eql/hit.js +1 -1
- package/api/search/explain/hit.js +1 -1
- package/api/search/facet/hit.js +1 -1
- package/api/search/grouped/hit.js +1 -1
- package/api/search/grouped/user.js +1 -1
- package/api/search/histogram/hit.js +1 -1
- package/api/search/hit.js +1 -1
- package/api/search/overview.js +1 -1
- package/api/search/sigma/hit.js +1 -1
- package/api/search/template.js +1 -1
- package/api/search/user.js +1 -1
- package/api/search/view.js +1 -1
- package/api/v2/search/facet.js +1 -1
- package/api/v2/search/index.js +1 -1
- package/api/view/index.d.ts +1 -1
- package/branding/AppBrand.d.ts +2 -2
- package/commons/components/app/AppSkeleton.js +1 -1
- package/commons/components/app/hooks/useAppConfigs.d.ts +2 -2
- package/commons/components/app/hooks/useAppSitemap.d.ts +5 -2
- package/commons/components/breadcrumbs/BreadcrumbIcon.js +1 -1
- package/commons/components/breadcrumbs/Breadcrumbs.d.ts +3 -2
- package/commons/components/display/AppToc.d.ts +2 -1
- package/commons/components/display/AppToc.js +1 -1
- package/commons/components/display/hooks/useAppColor.d.ts +1 -1
- package/commons/components/leftnav/LeftNavDrawer.d.ts +2 -1
- package/commons/components/leftnav/LeftNavGroup.d.ts +2 -1
- package/commons/components/leftnav/LeftNavItem.d.ts +2 -1
- package/commons/components/leftnav/LeftNavItem.js +1 -1
- package/commons/components/notification/Notification.js +1 -1
- package/commons/components/notification/elements/NotificationHeader.js +1 -1
- package/commons/components/notification/elements/NotificationItems.js +1 -1
- package/commons/components/notification/elements/item/NotificationItemAuthor.js +1 -1
- package/commons/components/pages/PageCenter.d.ts +2 -1
- package/commons/components/pages/PageContent.d.ts +2 -1
- package/commons/components/pages/PageFullScreen.d.ts +2 -1
- package/commons/components/search/AppSearch.js +1 -1
- package/commons/components/search/AppSearchInput.d.ts +2 -1
- package/commons/components/search/AppSearchResult.d.ts +2 -1
- package/commons/components/topnav/AppBar.d.ts +2 -1
- package/commons/components/topnav/AppName.d.ts +3 -2
- package/commons/components/topnav/AppSwitcher.d.ts +2 -1
- package/commons/components/topnav/ThemeSelection.d.ts +2 -1
- package/commons/components/topnav/ThemeSelection.js +1 -1
- package/commons/components/topnav/UserProfile.d.ts +2 -1
- package/commons/components/topnav/UserProfile.js +1 -1
- package/commons/components/utils/hooks/useThemeBuilder.d.ts +1 -1
- package/components/app/App.js +2 -2
- package/components/app/drawers/ApiKeyDrawer.js +1 -1
- package/components/app/hooks/useMatchers.js +4 -4
- package/components/app/hooks/useTitle.js +1 -1
- package/components/app/providers/AnalyticProvider.js +1 -1
- package/components/app/providers/AvatarProvider.js +1 -1
- package/components/app/providers/FavouritesProvider.js +1 -1
- package/components/app/providers/GridColumnsProvider.d.ts +1 -1
- package/components/app/providers/GridColumnsProvider.js +1 -1
- package/components/app/providers/OverviewProvider.js +1 -1
- package/components/app/providers/RecordProvider.js +2 -2
- package/components/app/providers/RecordSearchProvider.js +2 -2
- package/components/app/providers/SocketProvider.js +3 -3
- package/components/app/providers/UserListProvider.test.js +6 -6
- package/components/app/providers/ViewProvider.js +3 -3
- package/components/elements/Comment.js +2 -2
- package/components/elements/ContextMenu.test.js +3 -3
- package/components/elements/EditRow.js +4 -4
- package/components/elements/ObjectDetails.js +1 -1
- package/components/elements/UserList.js +1 -1
- package/components/elements/addons/buttons/index.d.ts +1 -1
- package/components/elements/addons/layout/FlexOne.d.ts +3 -2
- package/components/elements/addons/layout/FlexPort.d.ts +2 -1
- package/components/elements/addons/layout/FlexVertical.d.ts +2 -1
- package/components/elements/addons/layout/vsbox/VSBoxElement.d.ts +2 -1
- package/components/elements/addons/lists/TuiList.d.ts +2 -1
- package/components/elements/addons/lists/TuiListBase.d.ts +2 -1
- package/components/elements/addons/lists/TuiListElement.d.ts +2 -1
- package/components/elements/addons/lists/TuiListMenu.d.ts +2 -1
- package/components/elements/addons/lists/TuiListMenu.js +1 -1
- package/components/elements/addons/lists/table/TuiTableHeader.d.ts +3 -2
- package/components/elements/addons/lists/table/index.d.ts +1 -1
- package/components/elements/case/CaseCard.js +2 -2
- package/components/elements/display/ActionButton.js +1 -1
- package/components/elements/display/ChipPopper.js +1 -1
- package/components/elements/display/ClassificationChip.d.ts +1 -1
- package/components/elements/display/HandlebarsMarkdown.js +3 -3
- package/components/elements/display/HowlerAvatar.js +2 -2
- package/components/elements/display/Image.js +3 -3
- package/components/elements/display/Markdown.js +2 -2
- package/components/elements/display/handlebars/helpers.js +3 -3
- package/components/elements/display/json/JSONViewer.js +2 -2
- package/components/elements/display/modals/RationaleModal.js +2 -2
- package/components/elements/display/modals/RationaleModal.test.js +1 -1
- package/components/elements/event/EventCard.js +1 -1
- package/components/elements/hit/HitActions.d.ts +1 -1
- package/components/elements/hit/HitActions.js +1 -1
- package/components/elements/hit/HitBanner.js +1 -1
- package/components/elements/hit/HitCard.js +1 -1
- package/components/elements/hit/HitLabels.js +1 -1
- package/components/elements/hit/HitNotebooks.js +9 -9
- package/components/elements/hit/HitOutline.js +1 -1
- package/components/elements/hit/HitOverview.js +1 -1
- package/components/elements/hit/HitPreview.js +1 -1
- package/components/elements/hit/HitSummary.js +2 -2
- package/components/elements/hit/ResolvePivotUrl.d.ts +1 -1
- package/components/elements/hit/actions/ButtonActions.js +1 -3
- package/components/elements/hit/aggregate/HitGraph.js +1 -1
- package/components/elements/hit/elements/AnalyticLink.js +1 -1
- package/components/elements/hit/elements/Assigned.js +1 -1
- package/components/elements/hit/grid/AddColumnModal.js +1 -1
- package/components/elements/hit/grid/ColumnHeader.js +1 -1
- package/components/elements/hit/grid/RecordRow.js +1 -1
- package/components/elements/hit/grid/RecordTable.js +2 -2
- package/components/elements/hit/outlines/DefaultOutline.js +1 -3
- package/components/elements/hit/related/PivotLink.js +1 -1
- package/components/elements/record/RecordComments.js +5 -7
- package/components/elements/record/RecordContextMenu.js +2 -2
- package/components/elements/record/RecordContextMenu.test.js +4 -4
- package/components/elements/record/RecordWorklog.js +1 -1
- package/components/elements/view/LayoutToggle.d.ts +1 -1
- package/components/hooks/useHitActions.js +1 -1
- package/components/hooks/useLocalStorage.js +1 -1
- package/components/hooks/useLocalStorageItem.test.js +2 -2
- package/components/hooks/useMyChart.d.ts +23 -23
- package/components/hooks/useMySnackbar.js +1 -1
- package/components/hooks/useMyUserFunctions.d.ts +21 -21
- package/components/hooks/useRelatedRecords.js +1 -1
- package/components/logins/Login.js +1 -1
- package/components/logins/auth/OAuthLogin.js +1 -1
- package/components/logins/hooks/useLogin.js +2 -2
- package/components/routes/action/edit/ActionEditor.js +4 -4
- package/components/routes/action/shared/OperationEntry.js +1 -1
- package/components/routes/action/shared/OperationStep.js +1 -1
- package/components/routes/action/useMyActionFunctions.js +1 -1
- package/components/routes/action/view/ActionDetails.js +2 -2
- package/components/routes/action/view/ActionSearch.js +4 -4
- package/components/routes/admin/users/UserEditor.js +1 -1
- package/components/routes/admin/users/UserSearch.js +5 -5
- package/components/routes/advanced/QueryBuilder.js +2 -2
- package/components/routes/advanced/luceneCompletionProvider.js +1 -1
- package/components/routes/analytics/AnalyticComments.js +3 -5
- package/components/routes/analytics/AnalyticDetails.js +2 -2
- package/components/routes/analytics/AnalyticHitComments.js +1 -1
- package/components/routes/analytics/AnalyticHitComments.test.js +1 -1
- package/components/routes/analytics/AnalyticOverview.js +2 -2
- package/components/routes/analytics/AnalyticOverviews.js +1 -1
- package/components/routes/analytics/AnalyticSearch.js +2 -2
- package/components/routes/analytics/AnalyticTemplates.js +1 -1
- package/components/routes/analytics/TriageSettings.js +2 -2
- package/components/routes/analytics/widgets/Assessment.js +1 -1
- package/components/routes/analytics/widgets/Created.js +1 -1
- package/components/routes/analytics/widgets/Escalation.js +1 -1
- package/components/routes/analytics/widgets/Stacked.js +1 -1
- package/components/routes/cases/CaseViewer.js +1 -1
- package/components/routes/cases/Cases.js +3 -3
- package/components/routes/cases/constants.d.ts +1 -1
- package/components/routes/cases/detail/CaseDashboard.js +1 -1
- package/components/routes/cases/detail/CaseDetails.js +3 -3
- package/components/routes/cases/detail/CaseObservables.js +2 -2
- package/components/routes/cases/detail/CaseRules.js +3 -3
- package/components/routes/cases/detail/CaseSearch.js +2 -2
- package/components/routes/cases/detail/CaseSearch.test.js +1 -1
- package/components/routes/cases/detail/CaseTask.js +4 -4
- package/components/routes/cases/detail/CaseTimeline.js +2 -2
- package/components/routes/cases/detail/CreateRuleDialog.test.js +1 -1
- package/components/routes/cases/detail/ItemPage.js +1 -1
- package/components/routes/cases/detail/MarkdownPage.js +1 -1
- package/components/routes/cases/detail/TaskPanel.js +2 -2
- package/components/routes/cases/detail/sidebar/CaseFolder.js +2 -2
- package/components/routes/cases/detail/sidebar/CaseFolderContextMenu.js +1 -1
- package/components/routes/cases/detail/utils.d.ts +1 -1
- package/components/routes/cases/hooks/useCase.js +2 -5
- package/components/routes/cases/modals/AddRecordToCaseModal.js +2 -2
- package/components/routes/cases/modals/AddToCaseModal.js +1 -1
- package/components/routes/cases/modals/CreateCaseModal.js +1 -1
- package/components/routes/cases/modals/RenameItemModal.js +2 -2
- package/components/routes/cases/modals/ResolveModal.js +1 -1
- package/components/routes/cases/modals/hooks.d.ts +1 -1
- package/components/routes/dossiers/DossierEditor.js +2 -2
- package/components/routes/dossiers/DossierEditor.test.js +1 -1
- package/components/routes/dossiers/Dossiers.js +3 -3
- package/components/routes/dossiers/PivotForm.js +2 -4
- package/components/routes/events/EventViewer.js +1 -1
- package/components/routes/help/ApiDocumentation.js +1 -1
- package/components/routes/help/HitBannerDocumentation.js +1 -1
- package/components/routes/help/HitSchemaDocumentation.js +1 -1
- package/components/routes/help/RetentionDocumentation.js +2 -2
- package/components/routes/help/SearchDocumentation.js +1 -1
- package/components/routes/hits/search/InformationPane.js +5 -5
- package/components/routes/hits/search/QuerySettings.test.js +4 -5
- package/components/routes/hits/search/RecordBrowser.js +1 -1
- package/components/routes/hits/search/ViewLink.js +1 -1
- package/components/routes/hits/search/shared/CustomSort.js +1 -1
- package/components/routes/hits/search/shared/HitFilter.d.ts +1 -1
- package/components/routes/hits/search/shared/HitSort.d.ts +1 -1
- package/components/routes/hits/search/shared/HitSort.js +1 -1
- package/components/routes/hits/search/shared/SearchSpan.d.ts +1 -1
- package/components/routes/hits/search/shared/SearchSpan.js +1 -1
- package/components/routes/hits/view/HitViewer.js +3 -3
- package/components/routes/home/AddNewCard.js +2 -2
- package/components/routes/home/AnalyticCard.js +1 -1
- package/components/routes/home/EntryWrapper.js +1 -1
- package/components/routes/home/HomeSettings.js +1 -1
- package/components/routes/home/ViewCard.js +5 -5
- package/components/routes/home/index.js +2 -2
- package/components/routes/overviews/OverviewCard.js +1 -1
- package/components/routes/overviews/OverviewViewer.js +3 -3
- package/components/routes/overviews/Overviews.js +3 -3
- package/components/routes/overviews/markdownExtendedTokenProvider.js +15 -15
- package/components/routes/settings/ProfileSection.js +2 -2
- package/components/routes/templates/TemplateEditor.d.ts +3 -2
- package/components/routes/templates/TemplateEditor.js +1 -1
- package/components/routes/templates/TemplateViewer.js +3 -3
- package/components/routes/templates/Templates.js +3 -3
- package/components/routes/views/ViewComposer.js +3 -3
- package/components/routes/views/Views.js +2 -2
- package/i18n.js +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
- package/plugins/clue/components/ClueLeadForm.js +1 -1
- package/plugins/clue/components/CluePivotForm.js +2 -2
- package/plugins/clue/helpers.js +4 -4
- package/plugins/clue/index.d.ts +2 -1
- package/rest/AxiosClient.test.js +1 -0
- package/utils/Throttler.test.js +2 -2
- package/utils/actionUtils.d.ts +3 -3
- package/utils/classificationParser.js +20 -20
- package/utils/constants.d.ts +3 -3
- package/utils/localStorage.js +1 -1
- package/utils/menuUtils.js +0 -4
- package/utils/stringUtils.test.js +1 -1
- package/utils/utils.d.ts +1 -1
- package/utils/utils.js +2 -2
- package/utils/utils.test.js +1 -1
- package/utils/xsrf.js +1 -1
|
@@ -181,7 +181,7 @@ const getGroups = (groupParts, c12nDef, format, isMobile, autoSelect = false) =>
|
|
|
181
181
|
// Check if there are any required group assignments
|
|
182
182
|
for (const subgroup of g2Set) {
|
|
183
183
|
const required = c12nDef.params_map?.[subgroup]?.require_group;
|
|
184
|
-
if (
|
|
184
|
+
if (required) {
|
|
185
185
|
g1Set.add(required);
|
|
186
186
|
}
|
|
187
187
|
}
|
|
@@ -286,24 +286,24 @@ export const normalizedClassification = (parts, c12nDef, format, isMobile, skipA
|
|
|
286
286
|
if (!c12nDef.enforce || !!c12nDef.invalid_mode)
|
|
287
287
|
return c12nDef.UNRESTRICTED;
|
|
288
288
|
const longFormat = format === 'short' || !!isMobile ? false : true;
|
|
289
|
-
const groupDelim =
|
|
289
|
+
const groupDelim = longFormat ? 'REL TO ' : 'REL ';
|
|
290
290
|
const { lvlIdx, lvl } = parts;
|
|
291
291
|
let { groups, subgroups, req } = parts;
|
|
292
292
|
// convert to correct format
|
|
293
293
|
req = req.map(r => {
|
|
294
|
-
if (
|
|
294
|
+
if (longFormat) {
|
|
295
295
|
return c12nDef.access_req_map_stl[r] || r;
|
|
296
296
|
}
|
|
297
297
|
return c12nDef.access_req_map_lts[r] || r;
|
|
298
298
|
});
|
|
299
299
|
groups = groups.map(g => {
|
|
300
|
-
if (
|
|
300
|
+
if (longFormat) {
|
|
301
301
|
return c12nDef.groups_map_stl[g] || g;
|
|
302
302
|
}
|
|
303
303
|
return c12nDef.groups_map_lts[g] || g;
|
|
304
304
|
});
|
|
305
305
|
subgroups = subgroups.map(g => {
|
|
306
|
-
if (
|
|
306
|
+
if (longFormat) {
|
|
307
307
|
return c12nDef.subgroups_map_stl[g] || g;
|
|
308
308
|
}
|
|
309
309
|
return c12nDef.subgroups_map_lts[g] || g;
|
|
@@ -312,14 +312,14 @@ export const normalizedClassification = (parts, c12nDef, format, isMobile, skipA
|
|
|
312
312
|
let out = lvl;
|
|
313
313
|
let requiredLvlIdx = 0;
|
|
314
314
|
for (const r of req) {
|
|
315
|
-
const rl =
|
|
315
|
+
const rl = c12nDef.params_map?.[r]?.require_lvl ? c12nDef.params_map[r].require_lvl : 0;
|
|
316
316
|
requiredLvlIdx = Math.max(requiredLvlIdx, rl);
|
|
317
317
|
}
|
|
318
318
|
out = getLevelText(Math.max(lvlIdx, requiredLvlIdx), c12nDef, format, isMobile);
|
|
319
319
|
// 2. Check for all required items if they should be shown inside the groups display part
|
|
320
320
|
const reqGrp = new Set();
|
|
321
321
|
for (const r of req) {
|
|
322
|
-
if (
|
|
322
|
+
if (c12nDef.params_map[r]?.is_required_group) {
|
|
323
323
|
reqGrp.add(r);
|
|
324
324
|
}
|
|
325
325
|
}
|
|
@@ -332,7 +332,7 @@ export const normalizedClassification = (parts, c12nDef, format, isMobile, skipA
|
|
|
332
332
|
}
|
|
333
333
|
// 3. Add auto-selected subgroups
|
|
334
334
|
let tempSubGroups = [...subgroups];
|
|
335
|
-
if (
|
|
335
|
+
if (longFormat) {
|
|
336
336
|
if (subgroups.length > 0 && c12nDef.subgroups_auto_select.length > 0 && !skipAutoSelect) {
|
|
337
337
|
tempSubGroups = Array.from(new Set([...subgroups, ...c12nDef.subgroups_auto_select])).sort();
|
|
338
338
|
}
|
|
@@ -346,11 +346,11 @@ export const normalizedClassification = (parts, c12nDef, format, isMobile, skipA
|
|
|
346
346
|
let tempGroups = [];
|
|
347
347
|
for (const sg of tempSubGroups) {
|
|
348
348
|
const rGrp = c12nDef.params_map[sg]?.require_group;
|
|
349
|
-
if (
|
|
349
|
+
if (rGrp) {
|
|
350
350
|
tempGroups.push(rGrp);
|
|
351
351
|
}
|
|
352
352
|
const limToGrp = c12nDef.params_map[sg]?.limited_to_group;
|
|
353
|
-
if (
|
|
353
|
+
if (limToGrp) {
|
|
354
354
|
if (limToGrp in tempGroups) {
|
|
355
355
|
tempGroups = [limToGrp];
|
|
356
356
|
}
|
|
@@ -360,7 +360,7 @@ export const normalizedClassification = (parts, c12nDef, format, isMobile, skipA
|
|
|
360
360
|
}
|
|
361
361
|
}
|
|
362
362
|
for (const g of tempGroups) {
|
|
363
|
-
if (
|
|
363
|
+
if (longFormat) {
|
|
364
364
|
groups.push(c12nDef.groups_map_stl[g] || g);
|
|
365
365
|
}
|
|
366
366
|
else {
|
|
@@ -369,7 +369,7 @@ export const normalizedClassification = (parts, c12nDef, format, isMobile, skipA
|
|
|
369
369
|
}
|
|
370
370
|
groups = Array.from(new Set(groups));
|
|
371
371
|
// 5. Add auto-selected groups
|
|
372
|
-
if (
|
|
372
|
+
if (longFormat) {
|
|
373
373
|
if (groups.length > 0 && c12nDef.groups_auto_select.length > 0 && !skipAutoSelect) {
|
|
374
374
|
groups = Array.from(new Set([...groups, ...c12nDef.groups_auto_select])).sort();
|
|
375
375
|
}
|
|
@@ -528,36 +528,36 @@ export const applyClassificationRules = (parts, c12nDef, format, isMobile, userC
|
|
|
528
528
|
}
|
|
529
529
|
// Sort all lists and format all returns
|
|
530
530
|
retParts.req = retParts.req.sort().map(r => {
|
|
531
|
-
if (
|
|
531
|
+
if (longFormat) {
|
|
532
532
|
return c12nDef.access_req_map_stl[r] || r;
|
|
533
533
|
}
|
|
534
534
|
return c12nDef.access_req_map_lts[r] || r;
|
|
535
535
|
});
|
|
536
536
|
retParts.groups = retParts.groups.sort().map(g => {
|
|
537
|
-
if (
|
|
537
|
+
if (longFormat) {
|
|
538
538
|
return c12nDef.groups_map_stl[g] || g;
|
|
539
539
|
}
|
|
540
540
|
return c12nDef.groups_map_lts[g] || g;
|
|
541
541
|
});
|
|
542
542
|
retParts.subgroups = retParts.subgroups.sort().map(sg => {
|
|
543
|
-
if (
|
|
543
|
+
if (longFormat) {
|
|
544
544
|
return c12nDef.subgroups_map_stl[sg] || sg;
|
|
545
545
|
}
|
|
546
546
|
return c12nDef.subgroups_map_lts[sg] || sg;
|
|
547
547
|
});
|
|
548
548
|
disabledList.groups = disabledList.groups.sort().map(g => {
|
|
549
|
-
if (
|
|
549
|
+
if (longFormat) {
|
|
550
550
|
return c12nDef.groups_map_stl[g] || g;
|
|
551
551
|
}
|
|
552
552
|
return c12nDef.groups_map_lts[g] || g;
|
|
553
553
|
});
|
|
554
554
|
disabledList.levels = disabledList.levels.sort().map(l => {
|
|
555
|
-
if (
|
|
555
|
+
if (longFormat) {
|
|
556
556
|
return c12nDef.levels_map_stl[l] || l;
|
|
557
557
|
}
|
|
558
558
|
return c12nDef.levels_map_lts[l] || l;
|
|
559
559
|
});
|
|
560
|
-
if (
|
|
560
|
+
if (longFormat) {
|
|
561
561
|
retParts.lvl = c12nDef.levels_map_stl[retParts.lvl] || retParts.lvl;
|
|
562
562
|
}
|
|
563
563
|
else {
|
|
@@ -649,7 +649,7 @@ export const getMaxClassification = (c12n_1, c12n_2, c12nDef, format, isMobile)
|
|
|
649
649
|
*
|
|
650
650
|
*/
|
|
651
651
|
export const isAccessible = (user_c12n, c12n, c12nDef, enforce = false, ignoreInvalid = true) => {
|
|
652
|
-
if (
|
|
652
|
+
if (c12nDef.invalid_mode)
|
|
653
653
|
return false;
|
|
654
654
|
if (!enforce)
|
|
655
655
|
return true;
|
|
@@ -671,7 +671,7 @@ export const isAccessible = (user_c12n, c12n, c12nDef, enforce = false, ignoreIn
|
|
|
671
671
|
}
|
|
672
672
|
catch (e) {
|
|
673
673
|
if (e instanceof InvalidClassification) {
|
|
674
|
-
if (
|
|
674
|
+
if (ignoreInvalid) {
|
|
675
675
|
return false;
|
|
676
676
|
}
|
|
677
677
|
}
|
package/utils/constants.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ export declare const VERSION: any;
|
|
|
5
5
|
export declare const MY_LOCAL_STORAGE_PREFIX = "howler.ui";
|
|
6
6
|
export declare const MY_SESSION_STORAGE_PREFIX = "howler.ui.cache";
|
|
7
7
|
export declare const ESCALATION_COLORS: {
|
|
8
|
-
alert:
|
|
9
|
-
evidence:
|
|
10
|
-
hit:
|
|
8
|
+
alert: 'warning';
|
|
9
|
+
evidence: 'error';
|
|
10
|
+
hit: 'primary';
|
|
11
11
|
};
|
|
12
12
|
export declare const STATUS_COLORS: {
|
|
13
13
|
open: string;
|
package/utils/localStorage.js
CHANGED
|
@@ -25,7 +25,7 @@ export const getStored = (name) => {
|
|
|
25
25
|
try {
|
|
26
26
|
return JSON.parse(localStorage.getItem(buildName(name)));
|
|
27
27
|
}
|
|
28
|
-
catch
|
|
28
|
+
catch {
|
|
29
29
|
// Migrating from the old system, some values were not JSON encoded. Decoding them will cause an exception.
|
|
30
30
|
// Obviously, this is not optimal, but it's the only way to get Typescript to play nice.
|
|
31
31
|
// When this is called, T will be type string.
|
package/utils/menuUtils.js
CHANGED
|
@@ -55,7 +55,6 @@ class AppMenuBuilder {
|
|
|
55
55
|
const target = this.menuFromIndex(menuLocation.index, menuLocation.subIndex);
|
|
56
56
|
if (!Array.isArray(target) && this.isGroupElement(target)) {
|
|
57
57
|
if (item.type === 'divider') {
|
|
58
|
-
console.warn(`Skipping DIVIDER Operation: INSERT on Target: ${targetId}, Dividers cannot be inserted to sub-menus`);
|
|
59
58
|
return;
|
|
60
59
|
}
|
|
61
60
|
const group = target.element;
|
|
@@ -69,7 +68,6 @@ class AppMenuBuilder {
|
|
|
69
68
|
}
|
|
70
69
|
if (menuLocation.index !== -1 && isNil(menuLocation.subIndex)) {
|
|
71
70
|
if (item.type === 'divider') {
|
|
72
|
-
console.warn(`Skipping DIVIDER Operation: INSERT on Target: ${targetId}, Dividers cannot be inserted to sub-menus`);
|
|
73
71
|
return;
|
|
74
72
|
}
|
|
75
73
|
if (!this.isItemElement(target)) {
|
|
@@ -103,7 +101,6 @@ class AppMenuBuilder {
|
|
|
103
101
|
const menuLocation = this.indexOfMenuId(targetId);
|
|
104
102
|
if (!isNil(menuLocation.subIndex)) {
|
|
105
103
|
if (item.type === 'divider') {
|
|
106
|
-
console.warn(`Skipping DIVIDER Operation: INSERT on Target: ${targetId}, Dividers cannot be inserted to sub-menus`);
|
|
107
104
|
return;
|
|
108
105
|
}
|
|
109
106
|
const parentElement = this.menuFromIndex(menuLocation.index);
|
|
@@ -134,7 +131,6 @@ class AppMenuBuilder {
|
|
|
134
131
|
const menuLocation = this.indexOfMenuId(targetId);
|
|
135
132
|
if (!isNil(menuLocation.subIndex)) {
|
|
136
133
|
if (item.type === 'divider') {
|
|
137
|
-
console.warn(`Skipping DIVIDER Operation: INSERT on Target: ${targetId}, Dividers cannot be inserted to sub-menus`);
|
|
138
134
|
return;
|
|
139
135
|
}
|
|
140
136
|
const parentElement = this.menuFromIndex(menuLocation.index);
|
|
@@ -54,7 +54,7 @@ describe('safeFieldValue', () => {
|
|
|
54
54
|
expect(safeFieldValue(true)).toBe('"true"');
|
|
55
55
|
});
|
|
56
56
|
it('escapes backslash before escaping quotes (order matters)', () => {
|
|
57
|
-
expect(safeFieldValue('\\"')).toBe('"\\\\\\"
|
|
57
|
+
expect(safeFieldValue('\\"')).toBe('"\\\\\\""');
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
describe('safeFieldValueURI', () => {
|
package/utils/utils.d.ts
CHANGED
|
@@ -11,8 +11,8 @@ export declare const delay: (ms: number, rejectOnCancel?: boolean) => {
|
|
|
11
11
|
cancel: () => void;
|
|
12
12
|
then<TResult1 = void, TResult2 = never>(onfulfilled?: (value: void) => TResult1 | PromiseLike<TResult1>, onrejected?: (reason: any) => TResult2 | PromiseLike<TResult2>): Promise<TResult1 | TResult2>;
|
|
13
13
|
catch<TResult = never>(onrejected?: (reason: any) => TResult | PromiseLike<TResult>): Promise<void | TResult>;
|
|
14
|
-
finally(onfinally?: () => void): Promise<void>;
|
|
15
14
|
readonly [Symbol.toStringTag]: string;
|
|
15
|
+
finally(onfinally?: () => void): Promise<void>;
|
|
16
16
|
};
|
|
17
17
|
type Timestamp = {
|
|
18
18
|
timestamp?: string;
|
package/utils/utils.js
CHANGED
|
@@ -105,7 +105,7 @@ export const searchObject = (o, query, returnFlat = false) => {
|
|
|
105
105
|
const filteredData = Object.fromEntries(Object.entries(flatten(o)).filter(([k, v]) => regex.test(k) || regex.test(v))) ?? {};
|
|
106
106
|
return returnFlat ? filteredData : unflatten(filteredData);
|
|
107
107
|
}
|
|
108
|
-
catch
|
|
108
|
+
catch {
|
|
109
109
|
return returnFlat ? flatten(o) : o;
|
|
110
110
|
}
|
|
111
111
|
};
|
|
@@ -140,7 +140,7 @@ export const tryParse = (json) => {
|
|
|
140
140
|
try {
|
|
141
141
|
return JSON.parse(json);
|
|
142
142
|
}
|
|
143
|
-
catch
|
|
143
|
+
catch {
|
|
144
144
|
return json;
|
|
145
145
|
}
|
|
146
146
|
};
|
package/utils/utils.test.js
CHANGED
|
@@ -320,7 +320,7 @@ describe('delay', () => {
|
|
|
320
320
|
it('does not resolve before the specified time', async () => {
|
|
321
321
|
vi.useFakeTimers();
|
|
322
322
|
let resolved = false;
|
|
323
|
-
delay(200).then(() => {
|
|
323
|
+
void delay(200).then(() => {
|
|
324
324
|
resolved = true;
|
|
325
325
|
});
|
|
326
326
|
vi.advanceTimersByTime(100);
|