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.5.1",
"version": "7.5.2-fb-copyFolderSettings.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
*Released*: TBD
- Copy folder access settings when copying freezers and assay designs
- GitHub Issue #284: Freezer copy
- GitHub Issue #305: Assay design copy

### version 7.5.1
*Released*: 24 December 2025
- Add `displaySelectedOptions` prop and respect setting when passing `selectedOptions` to the underlying `SelectInput`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
} from './DomainPropertiesPanelCollapse';

interface OwnProps {
dataTypeCopyId?: number; // RowId for the data type being copied, if applicable
dataTypeName?: string;
dataTypeRowId?: number;
entityDataType: EntityDataType;
Expand All @@ -35,6 +36,7 @@ export const DataTypeFoldersPanelImpl: FC<OwnProps & InjectedDomainPropertiesPan
collapsed,
togglePanel,
controlledCollapse,
dataTypeCopyId,
dataTypeRowId,
dataTypeName,
onUpdateExcludedFolders,
Expand All @@ -53,6 +55,8 @@ export const DataTypeFoldersPanelImpl: FC<OwnProps & InjectedDomainPropertiesPan
const [excludedContainerIdsDB, setExcludedContainerIdsDB] = useState<string[]>();
const [excludedContainerIds, setExcludedContainerIds] = useState<string[]>();
const [relatedExcludedContainerIdsDB, setRelatedExcludedContainerIdsDB] = useState<string[]>();
const copy = !!dataTypeCopyId && !dataTypeRowId;
const isNewEntity = !dataTypeRowId && !copy;

useEffect(
() => {
Expand All @@ -62,6 +66,7 @@ export const DataTypeFoldersPanelImpl: FC<OwnProps & InjectedDomainPropertiesPan

try {
const containers = await api.folder.getContainers(container, moduleContext, true, true, true);
const dataTypeRowId_ = copy ? dataTypeCopyId : dataTypeRowId;

const allContainers_ = containers.map(container_ => {
return {
Expand All @@ -77,10 +82,13 @@ export const DataTypeFoldersPanelImpl: FC<OwnProps & InjectedDomainPropertiesPan

const excludedContainerIds_ = await api.folder.getDataTypeExcludedContainers(
entityDataType.folderConfigurableDataType,
dataTypeRowId
dataTypeRowId_
);
setExcludedContainerIdsDB(excludedContainerIds_);
setExcludedContainerIds(excludedContainerIds_);
if (copy) {
onUpdateExcludedFolders(entityDataType.folderConfigurableDataType, excludedContainerIds_);
}

const allDataCounts_ = await api.query.getDataTypeFolderDataCount(
entityDataType,
Expand Down Expand Up @@ -178,7 +186,7 @@ export const DataTypeFoldersPanelImpl: FC<OwnProps & InjectedDomainPropertiesPan
noHeader
columns={2}
inactiveSectionLabel="Archived Folders"
isNewEntity={!dataTypeRowId}
isNewEntity={isNewEntity}
showUncheckedWarning={!!dataTypeRowId}
/>
</div>
Expand All @@ -194,7 +202,7 @@ export const DataTypeFoldersPanelImpl: FC<OwnProps & InjectedDomainPropertiesPan
uncheckedEntitiesDB={excludedContainerIdsDB}
dataTypeLabel="Include in Folders"
inactiveSectionLabel="Archived Folders"
isNewEntity={!dataTypeRowId}
isNewEntity={isNewEntity}
showUncheckedWarning={!!dataTypeRowId}
/>
</div>
Expand All @@ -208,7 +216,7 @@ export const DataTypeFoldersPanelImpl: FC<OwnProps & InjectedDomainPropertiesPan
hiddenEntities={excludedContainerIds}
dataTypeLabel={relatedDataTypeLabel}
inactiveSectionLabel="Archived Folders"
isNewEntity={!dataTypeRowId}
isNewEntity={isNewEntity}
showUncheckedWarning={false}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ export interface AssayDesignerPanelsProps {
hideAdvancedProperties?: boolean;
hideEmptyBatchDomain?: boolean;
initModel: AssayProtocolModel;
initProtocolId?: number; // used for copy assay design since initModel will not have the protocolId in that case
onCancel: () => void;
onChange?: (model: AssayProtocolModel) => void;
onComplete: (model: AssayProtocolModel) => void;
Expand Down Expand Up @@ -392,6 +393,7 @@ export class AssayDesignerPanelsImpl extends React.PureComponent<Props, State> {
appPropertiesOnly,
hideAdvancedProperties,
initModel,
initProtocolId,
domainFormDisplayOptions,
currentPanelIndex,
validatePanel,
Expand Down Expand Up @@ -475,6 +477,7 @@ export class AssayDesignerPanelsImpl extends React.PureComponent<Props, State> {
{appPropertiesOnly && allowFolderExclusion && (
<DataTypeFoldersPanel
controlledCollapse
dataTypeCopyId={initProtocolId}
dataTypeName={protocolModel?.name}
dataTypeRowId={protocolModel?.protocolId}
entityDataType={AssayRunDataType}
Expand Down