@gen-epix/ui-client-casedb 4.1.0 → 4.2.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.
Files changed (41) hide show
  1. package/dist/_chunks/AddCasesToEventDialog.js +98 -98
  2. package/dist/_chunks/AddCasesToEventDialog.js.map +1 -1
  3. package/dist/_chunks/CaseContentForm.js +10 -10
  4. package/dist/_chunks/CaseInfoDialog.js +220 -220
  5. package/dist/_chunks/CaseInfoDialog.js.map +1 -1
  6. package/dist/_chunks/CaseSetInfoDialog.js +224 -224
  7. package/dist/_chunks/CaseSetInfoDialog.js.map +1 -1
  8. package/dist/_chunks/Dashboard.js +295 -295
  9. package/dist/_chunks/Dashboard.js.map +1 -1
  10. package/dist/_chunks/FindSimilarCasesDialog.js +76 -76
  11. package/dist/_chunks/FindSimilarCasesDialog.js.map +1 -1
  12. package/dist/_chunks/LegendaItem.js.map +1 -1
  13. package/dist/_chunks/PanelSeparator.js +3 -3
  14. package/dist/_chunks/PanelSeparator.js.map +1 -1
  15. package/dist/_chunks/Upload.js +318 -318
  16. package/dist/_chunks/Upload.js.map +1 -1
  17. package/dist/_chunks/chunk-BV7QT456.js +1 -1
  18. package/dist/_chunks/chunk-BV7QT456.js.map +1 -1
  19. package/dist/_chunks/cloneDeep.js +1 -1
  20. package/dist/_chunks/cloneDeep.js.map +1 -1
  21. package/dist/_chunks/esm.js +3 -3
  22. package/dist/_chunks/esm.js.map +1 -1
  23. package/dist/_chunks/index.module.js +1 -1
  24. package/dist/_chunks/index.module.js.map +1 -1
  25. package/dist/_chunks/react.js +1 -1
  26. package/dist/_chunks/react.js.map +1 -1
  27. package/dist/_chunks/shallow.js +2 -2
  28. package/dist/_chunks/shallow.js.map +1 -1
  29. package/dist/_chunks/vanilla.js +1 -1
  30. package/dist/_chunks/vanilla.js.map +1 -1
  31. package/dist/_chunks/yup.js +24 -24
  32. package/dist/_chunks/yup.js.map +1 -1
  33. package/dist/components/form/fields/ArrangementEditor/index.js +30 -30
  34. package/dist/components/ui/CreateEventDialog/index.js +40 -40
  35. package/dist/components/ui/CreateEventDialog/index.js.map +1 -1
  36. package/dist/components/ui/SequenceDownloadDialog/index.js +22 -22
  37. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +59 -59
  38. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -1
  39. package/package.json +68 -67
  40. package/dist/_chunks/index.esm.js +0 -1465
  41. package/dist/_chunks/index.esm.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"LegendaItem.js","names":["useSyncExternalStoreExports"],"sources":["../../builtin:esm-external-require-react","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/shim/index.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.2.8/node_modules/use-sync-external-store/shim/with-selector.js","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.2.18_immer@11.1.18_react@19.2.8_use-sync-external-store@1.6.0_react@19.2.8_/node_modules/zustand/esm/traditional.mjs","../../src/components/ui/Dashboard/context/DashboardContext.tsx","../../src/components/ui/LegendaItem/LegendaItem.tsx"],"sourcesContent":["import * as m from 'react';module.exports = { ...m };","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","import React from 'react';\nimport useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector.js';\nimport { createStore } from 'zustand/vanilla';\n\nconst { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;\nconst identity = (arg) => arg;\nfunction useStoreWithEqualityFn(api, selector = identity, equalityFn) {\n const slice = useSyncExternalStoreWithSelector(\n api.subscribe,\n api.getState,\n api.getInitialState,\n selector,\n equalityFn\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createWithEqualityFnImpl = (createState, defaultEqualityFn) => {\n const api = createStore(createState);\n const useBoundStoreWithEqualityFn = (selector, equalityFn = defaultEqualityFn) => useStoreWithEqualityFn(api, selector, equalityFn);\n Object.assign(useBoundStoreWithEqualityFn, api);\n return useBoundStoreWithEqualityFn;\n};\nconst createWithEqualityFn = ((createState, defaultEqualityFn) => createState ? createWithEqualityFnImpl(createState, defaultEqualityFn) : createWithEqualityFnImpl);\n\nexport { createWithEqualityFn, useStoreWithEqualityFn };\n","import type { CaseDbCaseSet } from '@gen-epix/api-casedb';\nimport { createContext } from 'react';\nimport type { Subject } from '@gen-epix/ui-core/classes/Subject';\n\nimport type {\n Highlighting,\n LineListRangeSubjectValue,\n LinkedScrollSubjectValue,\n} from '../../../../models/caseDb';\n\nexport type DashboardContextValue = {\n caseSet?: CaseDbCaseSet;\n highlight: (highlighting: Highlighting) => void;\n highlightSubject: Subject<Highlighting>;\n lineListRangeSubject: Subject<LineListRangeSubjectValue>;\n linkedScrollSubject: Subject<LinkedScrollSubjectValue>;\n reset: () => void;\n};\n\nexport const DashboardContext = createContext<DashboardContextValue>(null);\n","import type { TooltipProps } from '@mui/material';\nimport {\n Box,\n ListItemIcon,\n ListItemText,\n MenuItem,\n Tooltip,\n useTheme,\n} from '@mui/material';\nimport { ConfigService } from '@gen-epix/ui-client-common/classes/services/ConfigService';\nimport { useStore } from 'zustand';\nimport FilterAltIcon from '@mui/icons-material/FilterAlt';\nimport type {\n MouseEvent,\n ReactElement,\n ReactNode,\n} from 'react';\nimport {\n use,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport isArray from 'lodash/isArray';\nimport { useStoreWithEqualityFn } from 'zustand/traditional';\n\nimport type { CaseDbConfig } from '../../../models/config';\nimport { DashboardStoreContext } from '../../../stores/dashboardStore';\nimport type { StratificationLegendaItem } from '../../../models/stratification';\nimport {\n STRATIFICATION_MODE,\n STRATIFICATION_SELECTED,\n} from '../../../models/stratification';\nimport { ContextMenu } from '../ContextMenu';\nimport type { ContextMenuConfigWithAnchor } from '../ContextMenu';\nimport { DASHBOARD_COMPONENT_NAME } from '../../../constants/dashboard';\nimport { DashboardContext } from '../Dashboard/context/DashboardContext';\n\nexport type LegendaItemProps = {\n readonly children?: ReactNode;\n readonly item: StratificationLegendaItem;\n readonly tooltip?: boolean;\n readonly tooltipProps?: Partial<TooltipProps>;\n};\n\nexport const LegendaItem = ({ children, item, tooltip, tooltipProps }: LegendaItemProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n const dashboardContext = use(DashboardContext);\n const dashboardStore = use(DashboardStoreContext);\n const stratification = useStore(dashboardStore, (state) => state.stratification);\n const sortedData = useStore(dashboardStore, (state) => state.sortedData);\n const setFilterValue = useStore(dashboardStore, (state) => state.setFilterValue);\n const filters = useStoreWithEqualityFn(dashboardStore, (state) => state.filters, (a, b) => JSON.stringify(a.map(filter => filter.filterValue)) === JSON.stringify(b.map(filter => filter.filterValue)));\n const [focussedLegendaItem, setFocussedLegendaItem] = useState<StratificationLegendaItem>(null);\n const [contextMenuConfig, setContextMenuConfig] = useState<ContextMenuConfigWithAnchor | null>(null);\n\n const parseIdsFromAnchorElement = useCallback((element: Element): string[] => {\n if (!stratification?.caseIdColors) {\n return [];\n }\n\n const caseIds: string[] = [];\n const color = element.getAttribute('data-color');\n\n Object.entries(stratification.caseIdColors).forEach(([caseId, rowColor]) => {\n if (rowColor === color) {\n caseIds.push(caseId);\n }\n });\n\n return caseIds;\n }, [stratification]);\n\n const onClick = useCallback((event: MouseEvent<HTMLDivElement>) => {\n setFocussedLegendaItem(item);\n setContextMenuConfig({\n anchorElement: event.currentTarget,\n mouseEvent: event.nativeEvent,\n parseIdsFromAnchorElement,\n });\n }, [item, parseIdsFromAnchorElement]);\n\n const onMouseOver = useCallback(() => {\n dashboardContext.highlight({\n caseIds: Object.entries(stratification?.caseIdColors).filter(([_itemId, itemColor]) => itemColor === item.color).map(([itemId]) => itemId),\n origin: DASHBOARD_COMPONENT_NAME.LEGENDA,\n });\n }, [item.color, stratification, dashboardContext]);\n\n const onMouseLeave = useCallback(() => {\n dashboardContext.highlight({\n caseIds: [],\n origin: DASHBOARD_COMPONENT_NAME.LEGENDA,\n });\n }, [dashboardContext]);\n\n const onNodeMenuClose = useCallback(() => {\n setContextMenuConfig(null);\n }, []);\n\n const onShowOnlySelectedLegendaItemMenuItemClick = useCallback(async (onMenuClose: () => void) => {\n if (stratification?.mode === STRATIFICATION_MODE.SELECTION) {\n if (focussedLegendaItem.rowValue.raw === STRATIFICATION_SELECTED.SELECTED.toString()) {\n await setFilterValue('selected', focussedLegendaItem.caseIds);\n } else {\n await setFilterValue('selected', focussedLegendaItem.caseIds);\n }\n } else if (stratification?.mode === STRATIFICATION_MODE.FIELD) {\n const filter = filters.find(f => f.id === stratification.col.id);\n if (filter) {\n const filterValue = isArray(filter.initialFilterValue) ? [focussedLegendaItem.rowValue.raw] : focussedLegendaItem.rowValue.raw;\n await setFilterValue(stratification.col.id, filterValue);\n }\n } else {\n // not implemented\n }\n\n onMenuClose();\n }, [filters, focussedLegendaItem, setFilterValue, stratification]);\n\n const getEpiContextMenuExtraItems = useCallback((onMenuClose: () => void): ReactElement => {\n if (!focussedLegendaItem) {\n return null;\n }\n let label: string;\n\n if (stratification?.mode === STRATIFICATION_MODE.SELECTION) {\n if (!focussedLegendaItem.caseIds?.length || focussedLegendaItem.caseIds?.length === sortedData.length) {\n return null;\n }\n label = t('Filter (show only {{label}})', { label: focussedLegendaItem?.rowValue?.raw === STRATIFICATION_SELECTED.SELECTED.toString() ? t('selected rows') : t('unselected rows') });\n } else if (stratification?.mode === STRATIFICATION_MODE.FIELD) {\n if (!focussedLegendaItem || focussedLegendaItem?.rowValue?.isMissing || !stratification?.col?.id) {\n return null;\n }\n const filter = filters.find(f => f.id === stratification.col.id);\n if (!filter) {\n return null;\n }\n label = t('Filter (show only {{label}})', { label: focussedLegendaItem.rowValue.short });\n } else {\n return null;\n }\n\n return (\n <MenuItem\n divider\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={async () => onShowOnlySelectedLegendaItemMenuItemClick(onMenuClose)}\n >\n <ListItemIcon>\n <FilterAltIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {label}\n </ListItemText>\n </MenuItem>\n );\n }, [filters, focussedLegendaItem, onShowOnlySelectedLegendaItemMenuItemClick, stratification, t, sortedData]);\n\n const disabled = stratification?.mode === STRATIFICATION_MODE.FIELD && item.caseIds.length === 0;\n\n const innerContent = useMemo(() => {\n const value = item.rowValue.isMissing ? ConfigService.getInstance<CaseDbConfig>().config.epi.DATA_MISSING_CHARACTER : item.rowValue.short;\n return (\n <Box\n sx={{\n alignItems: 'center',\n cursor: disabled ? 'initial' : 'pointer',\n display: 'flex',\n opacity: disabled ? 0.3 : 1,\n }}\n >\n <Box\n sx={{\n background: item.color,\n height: theme.spacing(2),\n marginRight: theme.spacing(1),\n minHeight: theme.spacing(2),\n minWidth: theme.spacing(2),\n outline: `1px solid ${theme.palette.background.paper}`,\n width: theme.spacing(2),\n }}\n />\n <Box\n sx={{\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {children || value}\n </Box>\n </Box>\n );\n }, [children, disabled, item.color, item.rowValue.isMissing, item.rowValue.short, theme]);\n\n return (\n <>\n <Box\n component={'div'}\n data-color={item.color}\n onClick={disabled ? undefined : onClick}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n >\n {tooltip && (\n <Tooltip\n {...tooltipProps}\n title={item.rowValue.full}\n >\n {innerContent}\n </Tooltip>\n )}\n {!tooltip && innerContent}\n </Box>\n <ContextMenu\n config={contextMenuConfig}\n getExtraItems={getEpiContextMenuExtraItems}\n onMenuClose={onNodeMenuClose}\n />\n </>\n );\n};\n"],"x_google_ignoreList":[1,2,3,4,5,6,7],"mappings":";;;;;;;;;;;;;;;;CAA2B,EAAO,UAAU,EAAE,GAAG,EAAE;;CCWnD,IAAI,IAAA,EAAA;CACJ,SAAS,EAAG,GAAG,GAAG;EAChB,OAAQ,MAAM,MAAY,MAAN,KAAW,IAAI,KAAM,IAAI,MAAQ,MAAM,KAAK,MAAM;CACxE;CACA,IAAI,IAA0B,OAAO,OAAO,MAA7B,aAAkC,OAAO,KAAK,GAC3D,IAAW,EAAM,UACjB,IAAY,EAAM,WAClB,IAAkB,EAAM,iBACxB,IAAgB,EAAM;CACxB,SAAS,EAAuB,GAAW,GAAa;EACtD,IAAI,IAAQ,EAAY,GACtB,IAAY,EAAS,EAAE,MAAM;GAAS;GAAoB;EAAY,EAAE,CAAC,GACzE,IAAO,EAAU,EAAE,CAAC,MACpB,IAAc,EAAU;EAmB1B,OAlBA,EACE,WAAY;GAGV,AAFA,EAAK,QAAQ,GACb,EAAK,cAAc,GACnB,EAAuB,CAAI,KAAK,EAAY,EAAQ,QAAK,CAAC;EAC5D,GACA;GAAC;GAAW;GAAO;EAAW,CAChC,GACA,EACE,WAAY;GAEV,OADA,EAAuB,CAAI,KAAK,EAAY,EAAQ,QAAK,CAAC,GACnD,EAAU,WAAY;IAC3B,EAAuB,CAAI,KAAK,EAAY,EAAQ,QAAK,CAAC;GAC5D,CAAC;EACH,GACA,CAAC,CAAS,CACZ,GACA,EAAc,CAAK,GACZ;CACT;CACA,SAAS,EAAuB,GAAM;EACpC,IAAI,IAAoB,EAAK;EAC7B,IAAO,EAAK;EACZ,IAAI;GACF,IAAI,IAAY,EAAkB;GAClC,OAAO,CAAC,EAAS,GAAM,CAAS;EAClC,QAAgB;GACd,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QAAQ,WAAW;IAC/C,OAAO,EAAM,QAAQ,CAAC;GACxB,EACD,CAAA,GACD,kBAAC,GAAD;IACE,IAAI;KACF,UAAU;KACV,cAAc;KACd,YAAY;IACd;IAEC,UAAA,KAAY;GACV,CAAA,CACF;;CAET,GAAG;EAAC;EAAU;EAAU,EAAK;EAAO,EAAK,SAAS;EAAW,EAAK,SAAS;EAAO;CAAK,CAAC;CAExF,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,WAAW;EACX,cAAY,EAAK;EACjB,SAAS,IAAW,KAAA,IAAY;EAClB;EACD;EALf,UAAA,CAOG,KACC,kBAAC,GAAD;GACE,GAAI;GACJ,OAAO,EAAK,SAAS;GAEpB,UAAA;EACM,CAAA,GAEV,CAAC,KAAW,CACV;CACL,CAAA,GAAA,kBAAC,GAAD;EACE,QAAQ;EACR,eAAe;EACf,aAAa;CACd,CAAA,CACD,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"LegendaItem.js","names":["useSyncExternalStoreExports"],"sources":["../../builtin:esm-external-require-react","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0/node_modules/use-sync-external-store/shim/index.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../../../../node_modules/.pnpm/use-sync-external-store@1.6.0_react@19.3.0/node_modules/use-sync-external-store/shim/with-selector.js","../../../../node_modules/.pnpm/zustand@5.0.15_@types+react@19.3.0_immer@11.1.18_react@19.3.0_use-sync-external-store@1.6.0_react@19.3.0_/node_modules/zustand/esm/traditional.mjs","../../src/components/ui/Dashboard/context/DashboardContext.tsx","../../src/components/ui/LegendaItem/LegendaItem.tsx"],"sourcesContent":["import * as m from 'react';module.exports = { ...m };","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","import React from 'react';\nimport useSyncExternalStoreExports from 'use-sync-external-store/shim/with-selector.js';\nimport { createStore } from 'zustand/vanilla';\n\nconst { useSyncExternalStoreWithSelector } = useSyncExternalStoreExports;\nconst identity = (arg) => arg;\nfunction useStoreWithEqualityFn(api, selector = identity, equalityFn) {\n const slice = useSyncExternalStoreWithSelector(\n api.subscribe,\n api.getState,\n api.getInitialState,\n selector,\n equalityFn\n );\n React.useDebugValue(slice);\n return slice;\n}\nconst createWithEqualityFnImpl = (createState, defaultEqualityFn) => {\n const api = createStore(createState);\n const useBoundStoreWithEqualityFn = (selector, equalityFn = defaultEqualityFn) => useStoreWithEqualityFn(api, selector, equalityFn);\n Object.assign(useBoundStoreWithEqualityFn, api);\n return useBoundStoreWithEqualityFn;\n};\nconst createWithEqualityFn = ((createState, defaultEqualityFn) => createState ? createWithEqualityFnImpl(createState, defaultEqualityFn) : createWithEqualityFnImpl);\n\nexport { createWithEqualityFn, useStoreWithEqualityFn };\n","import type { CaseDbCaseSet } from '@gen-epix/api-casedb';\nimport { createContext } from 'react';\nimport type { Subject } from '@gen-epix/ui-core/classes/Subject';\n\nimport type {\n Highlighting,\n LineListRangeSubjectValue,\n LinkedScrollSubjectValue,\n} from '../../../../models/caseDb';\n\nexport type DashboardContextValue = {\n caseSet?: CaseDbCaseSet;\n highlight: (highlighting: Highlighting) => void;\n highlightSubject: Subject<Highlighting>;\n lineListRangeSubject: Subject<LineListRangeSubjectValue>;\n linkedScrollSubject: Subject<LinkedScrollSubjectValue>;\n reset: () => void;\n};\n\nexport const DashboardContext = createContext<DashboardContextValue>(null);\n","import type { TooltipProps } from '@mui/material';\nimport {\n Box,\n ListItemIcon,\n ListItemText,\n MenuItem,\n Tooltip,\n useTheme,\n} from '@mui/material';\nimport { ConfigService } from '@gen-epix/ui-client-common/classes/services/ConfigService';\nimport { useStore } from 'zustand';\nimport FilterAltIcon from '@mui/icons-material/FilterAlt';\nimport type {\n MouseEvent,\n ReactElement,\n ReactNode,\n} from 'react';\nimport {\n use,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport { useTranslation } from 'react-i18next';\nimport isArray from 'lodash/isArray';\nimport { useStoreWithEqualityFn } from 'zustand/traditional';\n\nimport type { CaseDbConfig } from '../../../models/config';\nimport { DashboardStoreContext } from '../../../stores/dashboardStore';\nimport type { StratificationLegendaItem } from '../../../models/stratification';\nimport {\n STRATIFICATION_MODE,\n STRATIFICATION_SELECTED,\n} from '../../../models/stratification';\nimport { ContextMenu } from '../ContextMenu';\nimport type { ContextMenuConfigWithAnchor } from '../ContextMenu';\nimport { DASHBOARD_COMPONENT_NAME } from '../../../constants/dashboard';\nimport { DashboardContext } from '../Dashboard/context/DashboardContext';\n\nexport type LegendaItemProps = {\n readonly children?: ReactNode;\n readonly item: StratificationLegendaItem;\n readonly tooltip?: boolean;\n readonly tooltipProps?: Partial<TooltipProps>;\n};\n\nexport const LegendaItem = ({ children, item, tooltip, tooltipProps }: LegendaItemProps) => {\n const theme = useTheme();\n const { t } = useTranslation();\n const dashboardContext = use(DashboardContext);\n const dashboardStore = use(DashboardStoreContext);\n const stratification = useStore(dashboardStore, (state) => state.stratification);\n const sortedData = useStore(dashboardStore, (state) => state.sortedData);\n const setFilterValue = useStore(dashboardStore, (state) => state.setFilterValue);\n const filters = useStoreWithEqualityFn(dashboardStore, (state) => state.filters, (a, b) => JSON.stringify(a.map(filter => filter.filterValue)) === JSON.stringify(b.map(filter => filter.filterValue)));\n const [focussedLegendaItem, setFocussedLegendaItem] = useState<StratificationLegendaItem>(null);\n const [contextMenuConfig, setContextMenuConfig] = useState<ContextMenuConfigWithAnchor | null>(null);\n\n const parseIdsFromAnchorElement = useCallback((element: Element): string[] => {\n if (!stratification?.caseIdColors) {\n return [];\n }\n\n const caseIds: string[] = [];\n const color = element.getAttribute('data-color');\n\n Object.entries(stratification.caseIdColors).forEach(([caseId, rowColor]) => {\n if (rowColor === color) {\n caseIds.push(caseId);\n }\n });\n\n return caseIds;\n }, [stratification]);\n\n const onClick = useCallback((event: MouseEvent<HTMLDivElement>) => {\n setFocussedLegendaItem(item);\n setContextMenuConfig({\n anchorElement: event.currentTarget,\n mouseEvent: event.nativeEvent,\n parseIdsFromAnchorElement,\n });\n }, [item, parseIdsFromAnchorElement]);\n\n const onMouseOver = useCallback(() => {\n dashboardContext.highlight({\n caseIds: Object.entries(stratification?.caseIdColors).filter(([_itemId, itemColor]) => itemColor === item.color).map(([itemId]) => itemId),\n origin: DASHBOARD_COMPONENT_NAME.LEGENDA,\n });\n }, [item.color, stratification, dashboardContext]);\n\n const onMouseLeave = useCallback(() => {\n dashboardContext.highlight({\n caseIds: [],\n origin: DASHBOARD_COMPONENT_NAME.LEGENDA,\n });\n }, [dashboardContext]);\n\n const onNodeMenuClose = useCallback(() => {\n setContextMenuConfig(null);\n }, []);\n\n const onShowOnlySelectedLegendaItemMenuItemClick = useCallback(async (onMenuClose: () => void) => {\n if (stratification?.mode === STRATIFICATION_MODE.SELECTION) {\n if (focussedLegendaItem.rowValue.raw === STRATIFICATION_SELECTED.SELECTED.toString()) {\n await setFilterValue('selected', focussedLegendaItem.caseIds);\n } else {\n await setFilterValue('selected', focussedLegendaItem.caseIds);\n }\n } else if (stratification?.mode === STRATIFICATION_MODE.FIELD) {\n const filter = filters.find(f => f.id === stratification.col.id);\n if (filter) {\n const filterValue = isArray(filter.initialFilterValue) ? [focussedLegendaItem.rowValue.raw] : focussedLegendaItem.rowValue.raw;\n await setFilterValue(stratification.col.id, filterValue);\n }\n } else {\n // not implemented\n }\n\n onMenuClose();\n }, [filters, focussedLegendaItem, setFilterValue, stratification]);\n\n const getEpiContextMenuExtraItems = useCallback((onMenuClose: () => void): ReactElement => {\n if (!focussedLegendaItem) {\n return null;\n }\n let label: string;\n\n if (stratification?.mode === STRATIFICATION_MODE.SELECTION) {\n if (!focussedLegendaItem.caseIds?.length || focussedLegendaItem.caseIds?.length === sortedData.length) {\n return null;\n }\n label = t('Filter (show only {{label}})', { label: focussedLegendaItem?.rowValue?.raw === STRATIFICATION_SELECTED.SELECTED.toString() ? t('selected rows') : t('unselected rows') });\n } else if (stratification?.mode === STRATIFICATION_MODE.FIELD) {\n if (!focussedLegendaItem || focussedLegendaItem?.rowValue?.isMissing || !stratification?.col?.id) {\n return null;\n }\n const filter = filters.find(f => f.id === stratification.col.id);\n if (!filter) {\n return null;\n }\n label = t('Filter (show only {{label}})', { label: focussedLegendaItem.rowValue.short });\n } else {\n return null;\n }\n\n return (\n <MenuItem\n divider\n // eslint-disable-next-line @eslint-react/kit/jsx-no-bind\n onClick={async () => onShowOnlySelectedLegendaItemMenuItemClick(onMenuClose)}\n >\n <ListItemIcon>\n <FilterAltIcon fontSize={'small'} />\n </ListItemIcon>\n <ListItemText>\n {label}\n </ListItemText>\n </MenuItem>\n );\n }, [filters, focussedLegendaItem, onShowOnlySelectedLegendaItemMenuItemClick, stratification, t, sortedData]);\n\n const disabled = stratification?.mode === STRATIFICATION_MODE.FIELD && item.caseIds.length === 0;\n\n const innerContent = useMemo(() => {\n const value = item.rowValue.isMissing ? ConfigService.getInstance<CaseDbConfig>().config.epi.DATA_MISSING_CHARACTER : item.rowValue.short;\n return (\n <Box\n sx={{\n alignItems: 'center',\n cursor: disabled ? 'initial' : 'pointer',\n display: 'flex',\n opacity: disabled ? 0.3 : 1,\n }}\n >\n <Box\n sx={{\n background: item.color,\n height: theme.spacing(2),\n marginRight: theme.spacing(1),\n minHeight: theme.spacing(2),\n minWidth: theme.spacing(2),\n outline: `1px solid ${theme.palette.background.paper}`,\n width: theme.spacing(2),\n }}\n />\n <Box\n sx={{\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n }}\n >\n {children || value}\n </Box>\n </Box>\n );\n }, [children, disabled, item.color, item.rowValue.isMissing, item.rowValue.short, theme]);\n\n return (\n <>\n <Box\n component={'div'}\n data-color={item.color}\n onClick={disabled ? undefined : onClick}\n onMouseLeave={onMouseLeave}\n onMouseOver={onMouseOver}\n >\n {tooltip && (\n <Tooltip\n {...tooltipProps}\n title={item.rowValue.full}\n >\n {innerContent}\n </Tooltip>\n )}\n {!tooltip && innerContent}\n </Box>\n <ContextMenu\n config={contextMenuConfig}\n getExtraItems={getEpiContextMenuExtraItems}\n onMenuClose={onNodeMenuClose}\n />\n </>\n );\n};\n"],"x_google_ignoreList":[1,2,3,4,5,6,7],"mappings":";;;;;;;;;;;;;;;;CAA2B,EAAO,UAAU,EAAE,GAAG,EAAE;;CCWnD,IAAI,IAAA,EAAA;CACJ,SAAS,EAAG,GAAG,GAAG;EAChB,OAAQ,MAAM,MAAY,MAAN,KAAW,IAAI,KAAM,IAAI,MAAQ,MAAM,KAAK,MAAM;CACxE;CACA,IAAI,IAA0B,OAAO,OAAO,MAA7B,aAAkC,OAAO,KAAK,GAC3D,IAAW,EAAM,UACjB,IAAY,EAAM,WAClB,IAAkB,EAAM,iBACxB,IAAgB,EAAM;CACxB,SAAS,EAAuB,GAAW,GAAa;EACtD,IAAI,IAAQ,EAAY,GACtB,IAAY,EAAS,EAAE,MAAM;GAAS;GAAoB;EAAY,EAAE,CAAC,GACzE,IAAO,EAAU,EAAE,CAAC,MACpB,IAAc,EAAU;EAmB1B,OAlBA,EACE,WAAY;GAGV,AAFA,EAAK,QAAQ,GACb,EAAK,cAAc,GACnB,EAAuB,CAAI,KAAK,EAAY,EAAQ,QAAK,CAAC;EAC5D,GACA;GAAC;GAAW;GAAO;EAAW,CAChC,GACA,EACE,WAAY;GAEV,OADA,EAAuB,CAAI,KAAK,EAAY,EAAQ,QAAK,CAAC,GACnD,EAAU,WAAY;IAC3B,EAAu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,IAAW,YAAY;IAC/B,SAAS;IACT,SAAS,IAAW,KAAM;GAC5B;GANF,UAAA,CAQE,kBAAC,GAAD,EACE,IAAI;IACF,YAAY,EAAK;IACjB,QAAQ,EAAM,QAAQ,CAAC;IACvB,aAAa,EAAM,QAAQ,CAAC;IAC5B,WAAW,EAAM,QAAQ,CAAC;IAC1B,UAAU,EAAM,QAAQ,CAAC;IACzB,SAAS,aAAa,EAAM,QAAQ,WAAW;IAC/C,OAAO,EAAM,QAAQ,CAAC;GACxB,EACD,CAAA,GACD,kBAAC,GAAD;IACE,IAAI;KACF,UAAU;KACV,cAAc;KACd,YAAY;IACd;IAEC,UAAA,KAAY;GACV,CAAA,CACF;;CAET,GAAG;EAAC;EAAU;EAAU,EAAK;EAAO,EAAK,SAAS;EAAW,EAAK,SAAS;EAAO;CAAK,CAAC;CAExF,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,WAAW;EACX,cAAY,EAAK;EACjB,SAAS,IAAW,KAAA,IAAY;EAClB;EACD;EALf,UAAA,CAOG,KACC,kBAAC,GAAD;GACE,GAAI;GACJ,OAAO,EAAK,SAAS;GAEpB,UAAA;EACM,CAAA,GAEV,CAAC,KAAW,CACV;CACL,CAAA,GAAA,kBAAC,GAAD;EACE,QAAQ;EACR,eAAe;EACf,aAAa;CACd,CAAA,CACD,EAAA,CAAA;AAEN"}
@@ -2,7 +2,7 @@ import { Box as e, styled as t, useTheme as n } from "@mui/material";
2
2
  import { createContext as r, useCallback as i, useContext as a, useEffect as o, useId as s, useImperativeHandle as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f, useSyncExternalStore as p } from "react";
3
3
  import { useTranslation as m } from "react-i18next";
4
4
  import { jsx as h } from "react/jsx-runtime";
5
- //#region ../../node_modules/.pnpm/react-resizable-panels@4.12.3_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-resizable-panels/dist/react-resizable-panels.js
5
+ //#region ../../node_modules/.pnpm/react-resizable-panels@4.12.4_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-resizable-panels/dist/react-resizable-panels.js
6
6
  function g(e, t) {
7
7
  let n = getComputedStyle(e);
8
8
  return t * parseFloat(n.fontSize);
@@ -930,7 +930,7 @@ function Ge(e) {
930
930
  }
931
931
  for (let n of t.hitRegions) if (n.separator) {
932
932
  let { element: t } = n.separator;
933
- t.hasPointerCapture?.(e.pointerId) || t.setPointerCapture?.(e.pointerId);
933
+ t.isConnected && !t.hasPointerCapture?.(e.pointerId) && t.setPointerCapture?.(e.pointerId);
934
934
  }
935
935
  Ue({
936
936
  document: e.currentTarget,
@@ -1549,7 +1549,7 @@ function gt({ children: e, className: t, disabled: n, disableDoubleClick: r, ele
1549
1549
  }), i = xe(C, (e) => {
1550
1550
  let { derivedPanelConstraints: n, layout: r, separatorToPanels: i } = e.next, a = i.get(t);
1551
1551
  if (a) {
1552
- let e = a[0], t = a.indexOf(e);
1552
+ let e = a[0], t = n.findIndex((t) => t.panelId === e.id);
1553
1553
  m(ht({
1554
1554
  layout: r,
1555
1555
  panelConstraints: n,