Skip to content

Commit 5cfb2fb

Browse files
committed
Merge branch 'develop' into fb_domainLookup52063
2 parents bc71d0f + e6431a3 commit 5cfb2fb

14 files changed

Lines changed: 679 additions & 55 deletions

File tree

packages/components/package-lock.json

Lines changed: 6 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/components/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@labkey/components",
3-
"version": "6.67.2-domainLookup52063.0",
3+
"version": "6.68.0",
44
"description": "Components, models, actions, and utility functions for LabKey applications and pages",
55
"sideEffects": false,
66
"files": [
@@ -50,7 +50,7 @@
5050
"homepage": "https://github.com/LabKey/labkey-ui-components#readme",
5151
"dependencies": {
5252
"@hello-pangea/dnd": "18.0.1",
53-
"@labkey/api": "1.43.1",
53+
"@labkey/api": "1.43.2",
5454
"@testing-library/dom": "~10.4.0",
5555
"@testing-library/jest-dom": "~6.6.3",
5656
"@testing-library/react": "~16.3.0",

packages/components/releaseNotes/components.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ Components, models, actions, and utility functions for LabKey applications and p
66
- Issue 52063: Domain designer to handle lookup to a query with a pipe character
77
- don't just split on '|', as the queryName could contain '|' characters
88

9+
### version 6.68.0
10+
*Released* 2 November 2025
11+
- Add auditing of what method was used for CRUD
12+
- Modified api.query.insertRows/updateRows/deleteRows/saveRows and moveEntities to accept and process editMethod parameter and record request hash in 'requestSource`
13+
14+
### version 6.67.3
15+
*Released*: 1 November 2025
16+
- Issue 54160: Non US date parsing in the app
17+
- Added `getAltNonUSParseFormats` date utility function to provide alternative parse formats for common non-US date/datetime formats
18+
- Update DatePickerInput to use alternative parse formats when server date format is non-US
19+
- Update parseDate utility function to use alternative non-US parse formats
20+
921
### version 6.67.2
1022
*Released* 31 October 2025
1123
- Issue 53449: resolve lineage items from container path

packages/components/src/index.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import {
5151
applyDevTools,
5252
arrayEquals,
5353
blurActiveElement,
54+
camelCaseToTitleCase,
5455
capitalizeFirstChar,
5556
caseInsensitive,
5657
debounce,
@@ -218,6 +219,7 @@ import {
218219
getContainerFilterForFolder,
219220
getContainerFilterForLookups,
220221
getQueryDetails,
222+
getRequestAuditDetail,
221223
getVerbForInsertOption,
222224
importData,
223225
InsertFormats,
@@ -228,6 +230,7 @@ import {
228230
loadQueries,
229231
loadQueriesFromTable,
230232
QueryCommandResponse,
233+
saveRows,
231234
selectDistinctRows,
232235
selectRowsDeprecated,
233236
updateRows,
@@ -252,6 +255,7 @@ import { flattenBrowseDataTreeResponse, loadReports } from './internal/query/rep
252255
import {
253256
AssayUploadTabs,
254257
DataViewInfoTypes,
258+
EDIT_METHOD,
255259
EXPORT_TYPES,
256260
GRID_CHECKBOX_OPTIONS,
257261
IMPORT_DATA_FORM_TYPES,
@@ -1189,6 +1193,7 @@ export {
11891193
BreadcrumbCreate,
11901194
buildURL,
11911195
BulkUpdateForm,
1196+
camelCaseToTitleCase,
11921197
cancelEvent,
11931198
capitalizeFirstChar,
11941199
Cards,
@@ -1282,6 +1287,7 @@ export {
12821287
DropdownButton,
12831288
DropdownMenu,
12841289
DropdownSection,
1290+
EDIT_METHOD,
12851291
EditableDetailPanel,
12861292
EditableGrid,
12871293
EditableGridEvent,
@@ -1420,6 +1426,7 @@ export {
14201426
getQueryFormLabelFieldName,
14211427
getQueryModelExportParams,
14221428
getQueryParams,
1429+
getRequestAuditDetail,
14231430
getRolesByUniqueName,
14241431
getSampleDomainDefaultSystemFields,
14251432
getSampleFinderLocalStorageKey,
@@ -1701,6 +1708,7 @@ export {
17011708
SampleTypeModel,
17021709
saveDomain,
17031710
SavedSettings,
1711+
saveRows,
17041712
SchemaDetails,
17051713
SchemaQuery,
17061714
SCHEMAS,

packages/components/src/internal/components/assay/actions.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ import { handleRequestFailure } from '../../request';
2222
import { AssayProtocolModel } from '../domainproperties/assay/models';
2323

2424
import { AssayUploadResultModel } from './models';
25+
import { getRequestAuditDetail } from '../../query/api';
26+
import { EDIT_METHOD } from '../../constants';
2527

2628
let assayDefinitionCache: { [key: string]: Promise<AssayDefinitionModel[]> } = {};
2729
let protocolCache: Record<string, Promise<AssayProtocolModel>> = {};
@@ -94,12 +96,16 @@ export function getProtocol(options: GetProtocolOptions): Promise<AssayProtocolM
9496
return protocolCache[key];
9597
}
9698

97-
export type ImportAssayRunOptions = Omit<AssayDOM.ImportRunOptions, 'success' | 'failure' | 'scope'>;
99+
export interface ImportAssayRunOptions extends Omit<AssayDOM.ImportRunOptions, 'success' | 'failure' | 'scope'> {
100+
editMethod?: EDIT_METHOD;
101+
}
98102

99103
export function importAssayRun(config: ImportAssayRunOptions): Promise<AssayUploadResultModel> {
100104
return new Promise((resolve, reject) => {
105+
const { editMethod, ...importConfig } = config;
106+
importConfig['auditDetails'] = getRequestAuditDetail(editMethod);
101107
AssayDOM.importRun({
102-
...config,
108+
...importConfig,
103109
success: rawModel => {
104110
resolve(new AssayUploadResultModel(rawModel));
105111
},

packages/components/src/internal/components/entities/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { getSelected, getSelectedDataDeprecated } from '../../actions';
66
import { SampleOperation } from '../samples/constants';
77
import { SchemaQuery } from '../../../public/SchemaQuery';
88
import { getFilterForSampleOperation, isSamplesSchema } from '../samples/utils';
9-
import { importData, InsertOptions } from '../../query/api';
9+
import { getRequestAuditDetail, importData, InsertOptions } from '../../query/api';
1010
import { caseInsensitive, generateId } from '../../util/utils';
1111
import { request } from '../../request';
1212
import { EntityCreationType } from '../samples/models';
@@ -982,6 +982,7 @@ export function moveEntities(options: MoveEntitiesOptions): Promise<Query.MoveRo
982982

983983
Query.moveRows({
984984
...params,
985+
auditDetails: getRequestAuditDetail(),
985986
success: (response: Query.MoveRowsResponse) => {
986987
if (response.success) {
987988
resolve(response);

packages/components/src/internal/components/forms/input/DatePickerInput.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ import DatePicker from 'react-datepicker';
1919
import { FormsyInjectedProps, withFormsy } from '../formsy';
2020
import { FieldLabel } from '../FieldLabel';
2121
import {
22+
getAltParseFormats,
2223
getDateFromISO,
2324
getDateTimeDisplayValue,
2425
getJsonDateFormatString,
@@ -250,14 +251,15 @@ export class DatePickerInputImpl extends DisableableInput<DatePickerInputImplPro
250251
} = this.props;
251252
const { isDisabled, selectedDate, invalid, invalidStart } = this.state;
252253
const { dateFormat, timeFormat } = getPickerDateAndTimeFormat(queryColumn, hideTime, selectedDate);
254+
const altDateFormats = getAltParseFormats(dateFormat);
253255
const validValueInvalidStart = !invalid && invalidStart;
254256
const isTimeOnly = queryColumn.isTimeColumn;
255257
const picker = (
256258
<DatePicker
257259
autoComplete="off"
258260
autoFocus={autoFocus}
259261
className={inputClassName}
260-
dateFormat={dateFormat}
262+
dateFormat={altDateFormats.length > 1 ? altDateFormats : dateFormat}
261263
disabled={isDisabled}
262264
id={queryColumn.fieldKey}
263265
isClearable={isClearable}

packages/components/src/internal/components/samples/actions.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { SCHEMAS } from '../../schemas';
3535

3636
import {
3737
getQueryDetails,
38+
getRequestAuditDetail,
3839
invalidateFullQueryDetailsCache,
3940
ISelectRowsResult,
4041
selectDistinctRows,
@@ -53,6 +54,7 @@ import { QueryInfo } from '../../../public/QueryInfo';
5354
import { ALL_AMOUNT_AND_UNITS_COLUMNS_LC, SAMPLE_STORAGE_COLUMNS_LC, STORED_AMOUNT_FIELDS } from './constants';
5455
import { FindField, GroupedSampleFields, SampleState, SampleStateType } from './models';
5556
import { executeSql, ExecuteSqlResponseWithSession } from '../../query/executeSql';
57+
import { EDIT_METHOD } from '../../constants';
5658

5759
export async function getSampleSet(config: IEntityTypeDetails): Promise<any> {
5860
const response = await request({
@@ -556,7 +558,8 @@ export function updateSampleStorageData(
556558
sampleStorageData: SampleStorageData[],
557559
containerPath?: string,
558560
userComment?: string,
559-
isDiscard = false
561+
isDiscard = false,
562+
editMethod?: EDIT_METHOD
560563
): Promise<any> {
561564
if (sampleStorageData.length === 0) {
562565
return Promise.resolve();
@@ -568,6 +571,7 @@ export function updateSampleStorageData(
568571
jsonData: {
569572
sampleRows: sampleStorageData,
570573
[STORED_AMOUNT_FIELDS.AUDIT_COMMENT]: userComment,
574+
...getRequestAuditDetail(editMethod),
571575
isDiscard,
572576
},
573577
success: Utils.getCallbackWrapper(response => {

packages/components/src/internal/constants.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const MAX_EDITABLE_GRID_ROWS = MAX_SELECTION_ACTION_ROWS;
3434
export const LOOKUP_DEFAULT_SIZE = 25;
3535

3636
export enum AssayUploadTabs {
37-
Grid = 1,
3837
Files = 2,
38+
Grid = 1,
3939
}
4040

4141
export enum EXPORT_TYPES {
@@ -49,6 +49,17 @@ export enum EXPORT_TYPES {
4949
LABEL_TEMPLATE,
5050
}
5151

52+
export enum EDIT_METHOD {
53+
BULK_EDIT = 'BulkEdit',
54+
BULK_EDIT_LINEAGE = 'BulkEditLineage',
55+
DETAIL_EDIT = 'DetailEdit',
56+
DETAIL_EDIT_LINEAGE = 'DetailEditLineage',
57+
FORM_INSERT = 'FormInsert',
58+
GRID_EDIT = 'GridEdit',
59+
GRID_INSERT = 'GridInsert',
60+
STORAGE_VIEW_ACTION = 'StorageViewAction',
61+
}
62+
5263
export enum KEYS {
5364
Backspace = 8,
5465
Tab = 9,

packages/components/src/internal/query/APIWrapper.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import {
5555
insertRows,
5656
InsertRowsOptions,
5757
QueryCommandResponse,
58+
saveRows,
5859
saveRowsByContainer,
5960
SaveRowsOptions,
6061
SelectDistinctOptions,
@@ -65,6 +66,7 @@ import {
6566
} from './api';
6667
import { executeSql, ExecuteSqlOptions, ExecuteSqlResponse } from './executeSql';
6768
import { selectRows, SelectRowsOptions, SelectRowsResponse } from './selectRows';
69+
import { EDIT_METHOD } from '../constants';
6870

6971
export interface QueryAPIWrapper {
7072
clearSelected: (options: ClearSelectedOptions) => Promise<SelectResponse>;
@@ -125,6 +127,7 @@ export interface QueryAPIWrapper {
125127
inherit: boolean,
126128
shared: boolean
127129
) => Promise<void>;
130+
saveRows: (options: SaveRowsOptions) => Promise<Query.SaveRowsResponse>;
128131
saveRowsByContainer: (options: SaveRowsOptions, containerField?: string) => Promise<Query.SaveRowsResponse>;
129132
saveSessionView: (
130133
schemaQuery: SchemaQuery,
@@ -159,6 +162,7 @@ export interface QueryAPIWrapper {
159162
rows: any[],
160163
containerPaths: string[],
161164
auditUserComment: string,
165+
editMethod?: EDIT_METHOD,
162166
containerField?: string
163167
) => Promise<Query.SaveRowsResponse | QueryCommandResponse>;
164168
}
@@ -182,6 +186,7 @@ export class QueryServerAPIWrapper implements QueryAPIWrapper {
182186
incrementClientSideMetricCount = incrementClientSideMetricCount;
183187
incrementRowCountMetric = incrementRowCountMetric;
184188
insertRows = insertRows;
189+
saveRows = saveRows;
185190
renameGridView = renameGridView;
186191
replaceSelected = replaceSelected;
187192
saveGridView = saveGridView;
@@ -225,6 +230,7 @@ export function getQueryTestAPIWrapper(
225230
renameGridView: mockFn(),
226231
replaceSelected: mockFn(),
227232
saveGridView: mockFn(),
233+
saveRows: mockFn(),
228234
saveRowsByContainer: mockFn(),
229235
saveSessionView: mockFn(),
230236
selectRows: mockFn(),

0 commit comments

Comments
 (0)