Skip to content
Merged
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": "6.58.6",
"version": "6.58.7",
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
"sideEffects": false,
"files": [
Expand Down
5 changes: 5 additions & 0 deletions packages/components/releaseNotes/components.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# @labkey/components
Components, models, actions, and utility functions for LabKey applications and pages

### version 6.58.7
*Released*: 29 August 2025
- Update default audit level
- Add `Assay Result Events` audit event type

### version 6.58.6
*Released*: 26 August 2025
- Merge from release25.7-SNAPSHOT to develop
Expand Down
2 changes: 2 additions & 0 deletions packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ import { ItemsLegend } from './internal/components/chart/ItemsLegend';
import { AuditDetailsModel, TimelineEventModel } from './internal/components/auditlog/models';
import {
ASSAY_AUDIT_QUERY,
ASSAY_RESULT_AUDIT_QUERY,
AUDIT_EVENT_TYPE_PARAM,
CONTAINER_AUDIT_QUERY,
DATACLASS_DATA_UPDATE_AUDIT_QUERY,
Expand Down Expand Up @@ -1153,6 +1154,7 @@ export {
areUnitsCompatible,
arrayEquals,
ASSAY_AUDIT_QUERY,
ASSAY_RESULT_AUDIT_QUERY,
ASSAY_DESIGNER_ROLE,
AssayContext,
AssayContextConsumer,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@ export const ASSAY_AUDIT_QUERY: AuditQuery = {
value: 'assayauditevent',
label: 'Assay Events',
};
export const ASSAY_RESULT_AUDIT_QUERY: AuditQuery = {
hasDetail: true,
hasTransactionId: true,
label: 'Assay Result Events',
value: 'assayresultauditevent',
};
export const WORKFLOW_AUDIT_QUERY: AuditQuery = {
hasDetail: true,
label: 'Sample Workflow Events',
Expand Down
16 changes: 10 additions & 6 deletions packages/components/src/internal/components/auditlog/utils.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
import { getAuditQueries, getEventDataValueDisplay, getTimelineEntityUrl } from './utils';
import {
ASSAY_AUDIT_QUERY,
ASSAY_RESULT_AUDIT_QUERY,
DATACLASS_DATA_UPDATE_AUDIT_QUERY,
INVENTORY_AUDIT_QUERY,
NOTEBOOK_AUDIT_QUERY,
Expand All @@ -28,9 +29,10 @@ import {
describe('getAuditQueries', () => {
test('LKS starter', () => {
const auditQueries = getAuditQueries(TEST_LKS_STARTER_MODULE_CONTEXT);
expect(auditQueries.length).toBe(13);
expect(auditQueries.length).toBe(14);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(11);
expect(auditQueries.findIndex(entry => entry === ASSAY_RESULT_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(12);
expect(auditQueries.findIndex(entry => entry === WORKFLOW_AUDIT_QUERY)).toBe(-1);
expect(auditQueries.findIndex(entry => entry === SOURCE_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
});
Expand All @@ -40,14 +42,15 @@ describe('getAuditQueries', () => {
expect(auditQueries.length).toBe(12);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(10);
expect(auditQueries.findIndex(entry => entry === ASSAY_AUDIT_QUERY)).toBe(-1);
expect(auditQueries.findIndex(entry => entry === ASSAY_RESULT_AUDIT_QUERY)).toBe(-1);
expect(auditQueries.findIndex(entry => entry === WORKFLOW_AUDIT_QUERY)).toBe(-1);
expect(auditQueries.findIndex(entry => entry === SOURCE_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
});

test('LKSM professional', () => {
const auditQueries = getAuditQueries(TEST_LKSM_PROFESSIONAL_MODULE_CONTEXT);
expect(auditQueries.length).toBe(16);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(14);
expect(auditQueries.length).toBe(17);
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 All @@ -69,9 +72,10 @@ describe('getAuditQueries', () => {
},
};
const auditQueries = getAuditQueries(moduleContext);
expect(auditQueries.length).toBe(17);
expect(auditQueries.findIndex(entry => entry === INVENTORY_AUDIT_QUERY)).toBe(15);
expect(auditQueries.length).toBe(18);
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);
expect(auditQueries.findIndex(entry => entry === NOTEBOOK_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
expect(auditQueries.findIndex(entry => entry === NOTEBOOK_REVIEW_AUDIT_QUERY)).toBeGreaterThanOrEqual(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,17 @@ import {
SOURCE_AUDIT_QUERY,
WORKFLOW_AUDIT_QUERY,
REPORT_AUDIT_QUERY,
ASSAY_RESULT_AUDIT_QUERY,
} from './constants';

export function getAuditQueries(ctx: ModuleContext): AuditQuery[] {
const queries = [...COMMON_AUDIT_QUERIES];
if (isProductFoldersEnabled(ctx)) queries.push(CONTAINER_AUDIT_QUERY);
if (isWorkflowEnabled(ctx)) queries.push(WORKFLOW_AUDIT_QUERY);
if (isAssayEnabled(ctx)) queries.push(ASSAY_AUDIT_QUERY);
if (isAssayEnabled(ctx)) {
queries.push(ASSAY_AUDIT_QUERY);
queries.push(ASSAY_RESULT_AUDIT_QUERY);
}
if (isSampleManagerEnabled(ctx) && !isRegistryEnabled(ctx)) queries.push(SOURCE_AUDIT_QUERY);
if (isRegistryEnabled(ctx)) {
queries.push(DATACLASS_DATA_UPDATE_AUDIT_QUERY);
Expand Down