diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json index eb000a34f6..4537df3047 100644 --- a/packages/components/package-lock.json +++ b/packages/components/package-lock.json @@ -1,12 +1,12 @@ { "name": "@labkey/components", - "version": "6.39.0", + "version": "6.39.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@labkey/components", - "version": "6.39.0", + "version": "6.39.1", "license": "SEE LICENSE IN LICENSE.txt", "dependencies": { "@hello-pangea/dnd": "18.0.1", diff --git a/packages/components/package.json b/packages/components/package.json index 2fecb4e1d0..4ff806ed4b 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@labkey/components", - "version": "6.39.0", + "version": "6.39.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 59fe7958cb..53ad58d8af 100644 --- a/packages/components/releaseNotes/components.md +++ b/packages/components/releaseNotes/components.md @@ -1,6 +1,12 @@ # @labkey/components Components, models, actions, and utility functions for LabKey applications and pages +### version 6.39.1 +*Released*: 2 May 2025 +- Issue 52979: App grid customize view doesn't expand lookup field with special char +- Issue 52472: Re-clicking the Source Types, Sample Types or Assay links in the mega menu removes the sort=Name parameter from the url +- Customize view available field data-fieldkey attribute to use encoded fieldKey values + ### version 6.39.0 *Released*: 2 May 2025 - Export `getSourceDomainDefaultSystemFields` diff --git a/packages/components/src/internal/app/utils.ts b/packages/components/src/internal/app/utils.ts index 53b1154f63..e4d8c0969a 100644 --- a/packages/components/src/internal/app/utils.ts +++ b/packages/components/src/internal/app/utils.ts @@ -580,6 +580,7 @@ export function addSourcesSectionConfig( emptyText: 'No source types have been defined', filteredEmptyText: 'No source types available', iconURL: imageURL('_images', 'source_type.svg'), + headerURLParams: { 'sourcetypegrid.sort': 'Name' }, // Issue 52472 }); if (user && userCanDesignSourceTypes(user)) { sourcesMenuConfig = sourcesMenuConfig.merge({ @@ -596,6 +597,7 @@ export function getSamplesSectionConfig(user: User): MenuSectionConfig { emptyText: 'No sample types have been defined', filteredEmptyText: 'No sample types available', iconURL: imageURL('_images', 'samples.svg'), + headerURLParams: { 'samplesetgrid.sort': 'Name' }, // Issue 52472 }); if (user && user.hasDesignSampleTypesPermission()) { samplesMenuConfig = samplesMenuConfig.merge({ @@ -616,6 +618,7 @@ export function addAssaysSectionConfig( emptyText: 'No assays have been defined', filteredEmptyText: 'No assays available', iconURL: imageURL('_images', 'assay.svg'), + headerURLParams: { 'allassaysgrid.sort': 'Name', 'activeassaysgrid.sort': 'Name' }, // Issue 52472 }); if (user && user.hasDesignAssaysPermission()) { assaysMenuConfig = assaysMenuConfig.merge({ @@ -660,6 +663,7 @@ function getMediaSectionConfig(): MenuSectionConfig { function getRegistrySectionConfig(): MenuSectionConfig { return new MenuSectionConfig({ iconURL: imageURL('_images', 'molecule.svg'), + headerURLParams: { 'query.sort': 'Name' }, // Issue 52472 }); } diff --git a/packages/components/src/internal/components/ColumnSelectionModal.tsx b/packages/components/src/internal/components/ColumnSelectionModal.tsx index f7082c4079..5100727782 100644 --- a/packages/components/src/internal/components/ColumnSelectionModal.tsx +++ b/packages/components/src/internal/components/ColumnSelectionModal.tsx @@ -105,7 +105,6 @@ export const ColumnChoice: FC = memo(props => { false ); const supportsExpand = !!onExpandColumn; - const colFieldKey = column.index; const disabled = disabledMsg !== undefined; // 46256: use encoded fieldKeyPath @@ -136,12 +135,12 @@ export const ColumnChoice: FC = memo(props => { ); return ( -
+
{supportsExpand && ( <> {parentFieldKeys.map((parent, index) => ( // eslint-disable-next-line react/no-array-index-key -
+
))}
{column.isLookup() && !isExpanded && ( diff --git a/packages/components/src/internal/components/navigation/ProductMenuSection.tsx b/packages/components/src/internal/components/navigation/ProductMenuSection.tsx index 5f11e8686b..54bef00b46 100644 --- a/packages/components/src/internal/components/navigation/ProductMenuSection.tsx +++ b/packages/components/src/internal/components/navigation/ProductMenuSection.tsx @@ -106,12 +106,16 @@ export const ProductMenuSection: FC = memo(props => { section.productId, currentProductId, containerPath, - undefined, + config.headerURLParams, config.headerURLPart ?? section.key ); if (headerURL instanceof AppURL) { - headerEl = {label}; + headerEl = ( + + {label} + + ); } else { headerEl = {label}; } diff --git a/packages/components/src/internal/components/navigation/model.ts b/packages/components/src/internal/components/navigation/model.ts index 4d2f826bfb..be5c2851af 100644 --- a/packages/components/src/internal/components/navigation/model.ts +++ b/packages/components/src/internal/components/navigation/model.ts @@ -177,7 +177,7 @@ export class ProductMenuModel extends Record({ }); return List(sections); - }; + } setLoadedSections(sections: List): ProductMenuModel { return this.merge({ @@ -219,6 +219,7 @@ export class MenuSectionConfig extends Record({ filteredEmptyText: undefined, emptyAppURL: undefined, emptyURLText: 'Get started...', + headerURLParams: undefined, headerURLPart: undefined, headerText: undefined, iconCls: undefined, @@ -232,6 +233,7 @@ export class MenuSectionConfig extends Record({ declare filteredEmptyText?: string; declare emptyAppURL?: AppURL; declare emptyURLText: string; + declare headerURLParams: Record; declare headerURLPart: string; declare headerText?: string; declare iconCls?: string; diff --git a/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx b/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx index f32b36d080..b4f747e033 100644 --- a/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx +++ b/packages/components/src/public/QueryModel/CustomizeGridViewModal.tsx @@ -9,9 +9,10 @@ import { QueryColumn } from '../QueryColumn'; import { SCHEMAS } from '../../internal/schemas'; -import { QueryModel } from './QueryModel'; import { QueryInfo } from '../QueryInfo'; +import { QueryModel } from './QueryModel'; + export const includedColumnsForCustomizationFilter = (column: QueryColumn, showAllColumns: boolean): boolean => { const isAncestor = column.fieldKeyPath?.indexOf('/Ancestors') >= 0; const isAncestorChild = column.fieldKeyPath?.indexOf('Ancestors/') >= 0; @@ -34,12 +35,15 @@ export const includedColumnsForCustomizationFilter = (column: QueryColumn, showA export const getExpandQueryInfo = async (queryInfo: QueryInfo, column: QueryColumn): Promise => { const fkQueryInfo = await getQueryDetails({ - fk: column.index, + fk: column.fieldKeyPath, // Issue 52979: use encoded fieldKeyPath lookup: column.lookup, schemaQuery: queryInfo.schemaQuery, }); // For data classes, we want to limit the Ancestor filters to exclude 'Samples' - if (column.index === QueryColumn.ANCESTORS_PREFIX && queryInfo.schemaQuery.schemaName === SCHEMAS.DATA_CLASSES.SCHEMA) { + if ( + column.fieldKey === QueryColumn.ANCESTORS_PREFIX && + queryInfo.schemaQuery.schemaName === SCHEMAS.DATA_CLASSES.SCHEMA + ) { fkQueryInfo.columns = fkQueryInfo.columns.filter( col => col.fieldKey !== 'Samples' && col.fieldKey !== 'MediaSamples' );