Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@labkey/components",
"version": "7.46.3",
"version": "7.46.4-jobSources.0",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
6 changes: 6 additions & 0 deletions packages/components/releaseNotes/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages

### version TBD

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No longer needed.

*Released*: TBD
- Enable adding sources to jobs
- Move export config into `EntityDataType`
- Add `JobInputSources` query to workflow schema

### version 7.45.6
*Released*: 8 July 2026
- Adjust width of API key display control so its copy-to-clipboard button doesn't wrap to the next line
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const ASSAY_RESULT_AUDIT_QUERY: AuditQuery = {
export const WORKFLOW_AUDIT_QUERY: AuditQuery = {
hasDetail: true,
hasTransactionId: true,
label: 'Sample Workflow Events',
label: 'Workflow Events',
value: 'SamplesWorkflowAuditEvent',
};
export const SOURCE_AUDIT_QUERY: AuditQuery = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('getAuditQueries', () => {
test('LKSM professional', () => {
const auditQueries = getAuditQueries(TEST_LKSM_PROFESSIONAL_MODULE_CONTEXT);
expect(auditQueries.length).toBe(18);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(16);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(15);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === WORKFLOW_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === SOURCE_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
Expand Down Expand Up @@ -79,7 +79,7 @@ describe('getAuditQueries', () => {
};
const auditQueries = getAuditQueries(moduleContext);
expect(auditQueries.length).toBe(19);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(17);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(16);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === ASSAY_RESULT_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === WORKFLOW_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { DELETE_ASSAY_RUNS_TOPIC, DELETE_SAMPLES_TOPIC } from '../../util/helpLi

import { SAMPLE_TYPE_KEY, SAMPLES_KEY } from '../../app/constants';

import { SAMPLE_STORAGE_COLUMNS_WITH_SUBSELECT_EXPR } from '../samples/constants';
import { SAMPLE_DATA_EXPORT_CONFIG, SAMPLE_STORAGE_COLUMNS_WITH_SUBSELECT_EXPR } from '../samples/constants';

import { SchemaQuery } from '../../../public/SchemaQuery';

Expand Down Expand Up @@ -146,6 +146,7 @@ export const SampleTypeDataType: EntityDataType = {
folderConfigurableDataType: 'SampleType',
labelColorCol: 'labelcolor',
extraFinderFields: ['storagepositionnumber', 'storageterminallocation'],
exportConfig: SAMPLE_DATA_EXPORT_CONFIG,
};

export const SampleParentDataType = {
Expand All @@ -155,6 +156,11 @@ export const SampleParentDataType = {
containerFilter: Query.containerFilter.currentPlusProjectAndShared,
};

export const SOURCE_EXPORT_CONFIG = {
'exportAlias.name': 'SourceID',
'exportAlias.folder': 'Folder',
};

export const DataClassDataType: EntityDataType = {
typeListingSchemaQuery: SCHEMAS.EXP_TABLES.DATA_CLASSES,
listingSchemaQuery: SCHEMAS.EXP_TABLES.DATA,
Expand Down Expand Up @@ -182,6 +188,7 @@ export const DataClassDataType: EntityDataType = {
typeIcon: 'source_type',
sampleFinderCardType: 'dataclassparent',
folderConfigurableDataType: 'DataClass',
exportConfig: SOURCE_EXPORT_CONFIG,
};

export const ParentEntityLineageColumns = List.of('Inputs/Materials/First', 'Inputs/Data/First');
Expand Down Expand Up @@ -210,5 +217,5 @@ export const DATA_CLASS_IMPORT_PREFIX = 'dataInputs/';

export enum JobOperation {
Delete,
Move
Move,
}
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ export interface EntityDataType {
descriptionSingular: string;
editTypeAppUrlPrefix?: string;
exprColumnsWithSubSelect?: string[];
exportConfig?: Record<string, string>;
extraFinderFields?: string[];
filterArray?: Filter.IFilter[];
filterCardHeaderClass?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { getQueryModelExportParams } from '../../../public/QueryModel/utils';
import { SAMPLE_MANAGER_APP_PROPERTIES } from '../../app/constants';
import { EXPORT_TYPES } from '../../constants';
import { buildURL } from '../../url/AppURL';
import { SAMPLE_DATA_EXPORT_CONFIG } from '../samples/constants';

import { selectRows } from '../../query/selectRows';

Expand All @@ -19,6 +18,7 @@ import { handleRequestFailure } from '../../request';

import { LABEL_TEMPLATE_SQ } from './constants';
import { BarTenderConfiguration, BarTenderResponse, LabelTemplate } from './models';
import { SampleTypeDataType } from '../entities/constants';

function handleBarTenderConfigurationResponse(
resolve: (value: BarTenderConfiguration | PromiseLike<BarTenderConfiguration>) => void
Expand Down Expand Up @@ -147,7 +147,7 @@ export class LabelPrintingServerAPIWrapper implements LabelPrintingAPIWrapper {
Ajax.request({
url: buildURL(SAMPLE_MANAGER_APP_PROPERTIES.controllerName, 'printBarTenderLabels.api'),
params: getQueryModelExportParams(sampleModel, EXPORT_TYPES.LABEL, {
...SAMPLE_DATA_EXPORT_CONFIG,
...SampleTypeDataType.exportConfig,
labelFormat,
numCopies,
// We override the showRows value because of the strange default behavior for grid export that
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/internal/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ export const WORKFLOW = {
JOB_TEMPLATE: new SchemaQuery(WORKFLOW_SCHEMA, 'JobTemplate'),
JOB_PRIORITY: new SchemaQuery(WORKFLOW_SCHEMA, 'WorkflowJobPriority'),
JOB_INPUT_SAMPLES: new SchemaQuery(WORKFLOW_SCHEMA, 'JobInputSamples'),
JOB_INPUT_SOURCES: new SchemaQuery(WORKFLOW_SCHEMA, 'JobInputSources'),
};

// STUDY
Expand Down