diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json index 2a053a816b..80c261553c 100644 --- a/packages/components/package-lock.json +++ b/packages/components/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/components", - "version": "5.24.0", + "version": "5.24.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/components", - "version": "5.24.0", + "version": "5.24.1", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "17.0.0", diff --git a/packages/components/package.json b/packages/components/package.json index c7467e5b1c..a2df81d796 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/components", - "version": "5.24.0", + "version": "5.24.1", "description": "Components, models, actions, and utility functions for LabKey applications and pages", "sideEffects": false, "files": [ diff --git a/packages/components/releaseNotes/components.md b/packages/components/releaseNotes/components.md index f9e3b74803..9a5776d9dd 100644 --- a/packages/components/releaseNotes/components.md +++ b/packages/components/releaseNotes/components.md @@ -1,6 +1,10 @@ # @labkey/components Components, models, actions, and utility functions for LabKey applications and pages +### version 5.24.1 +*Released*: 26 November 2024 +- Support Plate Set ELN References + ### version 5.24.0 *Released*: 19 November 2024 - Issue 51645: Escape advanced search characters diff --git a/packages/components/src/internal/components/search/SearchPanel.tsx b/packages/components/src/internal/components/search/SearchPanel.tsx index 5f1d352735..bc6e0814bd 100644 --- a/packages/components/src/internal/components/search/SearchPanel.tsx +++ b/packages/components/src/internal/components/search/SearchPanel.tsx @@ -172,6 +172,7 @@ export const SearchPanel: FC = memo(props => { } if (platesEnabled) { categories.push(SearchCategory.Plate); + categories.push(SearchCategory.PlateSet); } return categories; diff --git a/packages/components/src/internal/components/search/actions.ts b/packages/components/src/internal/components/search/actions.ts index 09c96e29ea..6967640750 100644 --- a/packages/components/src/internal/components/search/actions.ts +++ b/packages/components/src/internal/components/search/actions.ts @@ -210,7 +210,7 @@ export function resolveIconSrc(data: any, category: SearchCategory): string { // else fallback to default } else if (data.sampleSet?.name) { iconSrc = 'samples'; - } else if (data.type) { + } else if (data.type && category !== SearchCategory.PlateSet) { const lcType = data.type.toLowerCase(); if (lcType === 'sampleset') { iconSrc = 'sample_set'; @@ -233,6 +233,7 @@ export function resolveIconSrc(data: any, category: SearchCategory): string { case SearchCategory.NotebookTemplate: iconSrc = 'notebook_blue'; break; + case SearchCategory.PlateSet: case SearchCategory.Plate: iconSrc = 'plates'; break; diff --git a/packages/components/src/internal/components/search/constants.ts b/packages/components/src/internal/components/search/constants.ts index 8281202360..b89cb1b19d 100644 --- a/packages/components/src/internal/components/search/constants.ts +++ b/packages/components/src/internal/components/search/constants.ts @@ -14,6 +14,7 @@ export enum SearchCategory { Notebook = 'notebook', NotebookTemplate = 'notebookTemplate', Plate = 'plate', + PlateSet = 'plateSet', StorageLocation = 'storageLocation', TerminalStorageLocation = 'terminalStorageLocation', WorkflowJob = 'workflowJob', diff --git a/packages/components/src/internal/url/URLResolver.ts b/packages/components/src/internal/url/URLResolver.ts index 9ed643ec3a..23d117084f 100644 --- a/packages/components/src/internal/url/URLResolver.ts +++ b/packages/components/src/internal/url/URLResolver.ts @@ -318,7 +318,7 @@ const RESOLVE_LSID_MAPPERS = [ if (params.type) { const type = params.type; const lsid = params.lsid; - if (!!lsid) { + if (lsid) { if (type?.toLowerCase() === 'data') { const url = ['rd', 'expdata', lsid]; return AppURL.create(...url); @@ -769,6 +769,11 @@ export class URLResolver { if (plateRowId) { return row.set('url', this.mapURL({ url, row, query: plateRowId })); } + } else if (url.indexOf('query-queryDetailsRow') && url.indexOf('.queryName=PlateSet&')) { + const plateSetRowId = row.getIn(['data', 'rowId']); + if (plateSetRowId) { + return row.set('url', this.mapURL({ url, row, query: plateSetRowId })); + } } } return row;