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

### version 6.39.0
*Released*: 2 May 2025
- Export `getSourceDomainDefaultSystemFields`

### version 6.38.2
*Released*: 30 April 2025
- Remove remnants of Edit with Grid from Bulk Edit modal
Expand Down
15 changes: 8 additions & 7 deletions packages/components/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,6 @@ import {
import { DisableableAnchor } from './internal/components/base/DisableableAnchor';
import {
DateFormatType,
ISO_DATE_FORMAT_STRING,
ISO_DATE_TIME_FORMAT_STRING,
formatDate,
formatDateTime,
fromDate,
Expand All @@ -163,6 +161,8 @@ import {
getTimeFormat,
isDateBetween,
isDateTimeInPast,
ISO_DATE_FORMAT_STRING,
ISO_DATE_TIME_FORMAT_STRING,
isRelativeDateFilterValue,
joinDateTimeFormat,
parseDate,
Expand Down Expand Up @@ -394,9 +394,9 @@ import {
import {
deleteSampleSet,
fetchSamples,
getLookupRowIdsFromSelection,
getGroupedSampleDisplayColumns,
getGroupedSampleDomainFields,
getLookupRowIdsFromSelection,
getSampleSet,
getSampleTypeDetails,
getSelectedSampleIdsFromSelectionKey,
Expand Down Expand Up @@ -535,6 +535,7 @@ import {
} from './internal/components/entities/constants';
import { getModuleCustomLabels } from './internal/components/labels/actions';
import {
createEntityParentKey,
getCellKeyColumnMap,
getEntityDescription,
getEntityNoun,
Expand All @@ -544,11 +545,10 @@ import {
getUniqueIdColumnMetadata,
isDataClassEntity,
isSampleEntity,
parseEntityParentKey,
SAMPLE_ID_FIELD_KEY,
sampleDeleteDependencyText,
updateCellKeySampleIdMap,
createEntityParentKey,
parseEntityParentKey,
} from './internal/components/entities/utils';
import {
ALIQUOT_CREATION,
Expand All @@ -562,8 +562,8 @@ import { DEFAULT_ALIQUOT_NAMING_PATTERN, SampleTypeModel } from './internal/comp
import { EditableDetailPanel } from './public/QueryModel/EditableDetailPanel';
import { Pagination } from './internal/components/pagination/Pagination';
import {
createSnapshotSelectionKey,
createOrderedSnapshotSelectionKey,
createSnapshotSelectionKey,
getQueryModelExportParams,
runDetailsColumnsForQueryModel,
} from './public/QueryModel/utils';
Expand Down Expand Up @@ -596,7 +596,7 @@ import {
saveDomain,
setDomainFields,
} from './internal/components/domainproperties/actions';
import { createFormInputId } from './internal/components/domainproperties/utils';
import { createFormInputId, getSourceDomainDefaultSystemFields } from './internal/components/domainproperties/utils';
import {
DomainDesign,
DomainDetails,
Expand Down Expand Up @@ -1358,6 +1358,7 @@ export {
isAllSamplesSchema,
getFilterForSampleOperation,
getSampleDomainDefaultSystemFields,
getSourceDomainDefaultSystemFields,
getSampleStatusColor,
getSampleStatus,
getSampleStatusContainerFilter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export const SystemFields: FC<Props> = memo(({ fields, disabledSystemFields, onS
<input
className="grid-panel__row-checkbox"
type="checkbox"
disabled={!row.get('Disableble')}
disabled={!row.get('Disableable')}
checked={selected === true}
onChange={onChange} // eslint-disable-line
/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
const DESCRIPTION_FIELD = {
Name: 'Description',
Label: 'Description',
DataType: 'Text',
Required: false,
Description: 'Contains a description for this data object',
Disableble: true,
};
Name: 'Description',
Label: 'Description',
DataType: 'Text',
Required: false,
Description: 'Contains a description for this data object',
Disableable: true,
};

export const DATACLASS_DOMAIN_SYSTEM_FIELDS = [
{
Expand All @@ -14,7 +14,7 @@ export const DATACLASS_DOMAIN_SYSTEM_FIELDS = [
DataType: 'Text',
Required: true,
Description: 'Contains a short name for this data object',
Disableble: false,
Disableable: false,
},
DESCRIPTION_FIELD,
];
Expand All @@ -26,7 +26,7 @@ export const SOURCE_DOMAIN_SYSTEM_FIELDS = [
DataType: 'Text',
Required: true,
Description: 'Contains a short name for this data object',
Disableble: false,
Disableable: false,
},
DESCRIPTION_FIELD,
];
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ export const getDatasetSystemFields = (studyProperties: StudyProperties): System
DataType: 'Text',
Required: true,
Description: 'Subject identifier',
Disableble: false,
Disableable: false,
},
{
Name: 'SequenceNum',
Label: 'Sequence Num',
DataType: 'Decimal (floating point)',
Required: isVisitBased,
Description: '',
Disableble: false,
Disableable: false,
},
];

Expand All @@ -76,15 +76,15 @@ export const getDatasetSystemFields = (studyProperties: StudyProperties): System
DataType: 'DateTime',
Required: true,
Description: 'The day of the visit. Primarily used in date-based studies.',
Disableble: false,
Disableable: false,
});
systemFields.push({
Name: 'Day',
Label: 'Day',
DataType: 'Integer',
Required: false,
Description: 'The day of the visit. Primarily used in date-based studies.',
Disableble: false,
Disableable: false,
});
}

Expand All @@ -94,7 +94,7 @@ export const getDatasetSystemFields = (studyProperties: StudyProperties): System
DataType: 'Integer',
Required: true,
Description: '',
Disableble: false,
Disableable: false,
});

return systemFields;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2221,9 +2221,9 @@ export interface NameExpressionsValidationResults {
export interface SystemField {
DataType: string;
Description: string;
Disableble: boolean;
Editable?: boolean;
Disableable: boolean;
Enabled?: boolean;
IsCalculated?: boolean;
Label: string;
Name: string;
Required: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import { OrderedMap, Set } from 'immutable';
import { IParentAlias } from '../entities/models';

import { DOMAIN_FIELD_PREFIX } from './constants';
import { SystemField } from './models';
import { SOURCE_DOMAIN_SYSTEM_FIELDS } from './dataclasses/constants';

export function createFormInputName(name: string): string {
return [DOMAIN_FIELD_PREFIX, name].join('-');
Expand Down Expand Up @@ -115,3 +117,7 @@ export function parentAliasInvalid(alias: Partial<IParentAlias>): boolean {

return !!(aliasValueInvalid || parentValueInvalid || alias.isDupe);
}

export function getSourceDomainDefaultSystemFields(): SystemField[] {
return SOURCE_DOMAIN_SYSTEM_FIELDS;
}
24 changes: 12 additions & 12 deletions packages/components/src/internal/components/samples/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,56 +228,56 @@ export const SAMPLE_DOMAIN_DEFAULT_SYSTEM_FIELDS = [
Required: true,
// For user clarity, below text differs intentionally from schema browser
Description: 'Unique ID generated from the Naming Pattern or Aliquot Naming Pattern',
Disableble: false,
Disableable: false,
},
{
Name: 'SampleState',
Label: 'Status',
DataType: 'Integer',
Required: false,
Description: 'Represents the status of the sample',
Disableble: false,
Disableable: false,
},
{
Name: 'Description',
Label: 'Description',
DataType: 'Text',
Required: false,
Description: 'Contains a Description for this sample',
Disableble: true,
Disableable: true,
},
{
Name: 'MaterialExpDate',
Label: 'Expiration Date',
DataType: 'DateTime',
Required: false,
Description: 'The date that this sample expires on',
Disableble: true,
Disableable: true,
},
{
Name: 'StoredAmount',
Label: 'Amount',
DataType: 'Decimal (floating point)',
Required: false,
Description: 'The amount of this sample',
Disableble: true,
Disableable: true,
},
{
Name: 'Units',
Label: 'Units',
DataType: 'Text',
Required: false,
Description: 'The units associated with the Amount value for this sample',
Disableble: true,
Disableable: true,
},
{
Name: 'AliquotCount',
Label: 'Aliquots Created Count',
DataType: 'Integer',
Required: false,
Description: '',
Disableble: true,
Editable: false,
Disableable: true,
IsCalculated: true,
},
];

Expand All @@ -288,18 +288,18 @@ export const SAMPLE_DOMAIN_INVENTORY_SYSTEM_FIELDS = [
DataType: 'Integer',
Required: false,
Description: '',
Disableble: true,
Disableable: true,
},
{
Name: 'StorageLocation',
Label: 'Storage Location',
DataType: 'Text',
Required: false,
Description: '',
Disableble: true,
Disableable: true,
},
{ Name: 'StorageRow', Label: 'Storage Row', DataType: 'Text', Required: false, Description: '', Disableble: true },
{ Name: 'StorageCol', Label: 'Storage Col', DataType: 'Text', Required: false, Description: '', Disableble: true },
{ Name: 'StorageRow', Label: 'Storage Row', DataType: 'Text', Required: false, Description: '', Disableable: true },
{ Name: 'StorageCol', Label: 'Storage Col', DataType: 'Text', Required: false, Description: '', Disableable: true },
];

export const AMOUNT_PRECISION_ERROR_TEXT = 'Amount used is too precise for selected units.';
Expand Down