-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/FOROME-1227
# Conflicts: # src/components/solution-control/solution-control.tsx
- Loading branch information
Showing
65 changed files
with
809 additions
and
1,037 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
trigger: none | ||
pr: none | ||
|
||
pool: | ||
vmImage: "ubuntu-20.04" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/components/breadcrumbs/select-preset-secondary-dataset/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './select-secondary-dataset' |
36 changes: 36 additions & 0 deletions
36
...mponents/breadcrumbs/select-preset-secondary-dataset/select-secondary-dataset-popover.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import styles from '@components/solution-control/solution-control-popover/solution-control-popover.module.css' | ||
|
||
import { MenuList, MenuListItem } from '@ui/menu-list' | ||
import { Popover } from '@ui/popover' | ||
import { IPopoverBaseProps } from '@ui/popover/popover.interface' | ||
import { popoverOffset } from '@pages/ws/ws.constants' | ||
|
||
interface ISelectSecondaryDatasetPopoverProps extends IPopoverBaseProps { | ||
datasetList: string[] | ||
selectedDataset: string | ||
onApply: (datasetName: string) => void | ||
onClose: () => void | ||
} | ||
|
||
export const SelectSecondaryDatasetPopover = ({ | ||
datasetList, | ||
selectedDataset, | ||
onApply, | ||
onClose, | ||
...popoverProps | ||
}: ISelectSecondaryDatasetPopoverProps) => ( | ||
<Popover onClose={onClose} offset={popoverOffset} {...popoverProps}> | ||
<section className={styles.solutionControlCard}> | ||
<MenuList className={styles.solutionControlCard__list} wrap="nowrap"> | ||
{datasetList?.map(datasetName => ( | ||
<MenuListItem | ||
key={datasetName} | ||
label={datasetName} | ||
isSelected={selectedDataset === datasetName} | ||
onClick={() => onApply(datasetName)} | ||
/> | ||
))} | ||
</MenuList> | ||
</section> | ||
</Popover> | ||
) |
50 changes: 50 additions & 0 deletions
50
src/components/breadcrumbs/select-preset-secondary-dataset/select-secondary-dataset.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { observer } from 'mobx-react-lite' | ||
|
||
import { usePopover } from '@core/hooks/use-popover' | ||
import { t } from '@i18n' | ||
import { SolutionControlButton } from '@components/solution-control/solution-control-button' | ||
import { SelectSecondaryDatasetPopover } from './select-secondary-dataset-popover' | ||
|
||
interface ISelectSecondaryDatasetProps { | ||
onChangeDataset: (name: string) => void | ||
selectedDataset: string | ||
datasetList: string[] | ||
} | ||
|
||
export const SelectSecondaryDataset = observer( | ||
({ | ||
selectedDataset, | ||
datasetList, | ||
onChangeDataset, | ||
}: ISelectSecondaryDatasetProps) => { | ||
const { popoverAnchor, isPopoverOpen, onToggle, closePopover } = | ||
usePopover() | ||
|
||
const handleChangeDataset = (datasetName: string) => { | ||
onChangeDataset(datasetName) | ||
|
||
closePopover() | ||
} | ||
|
||
return ( | ||
<> | ||
<SolutionControlButton | ||
solutionName={selectedDataset} | ||
controlName={t('header.secondaryPlaceholder')} | ||
isOpen={isPopoverOpen} | ||
onClick={e => onToggle(e.currentTarget)} | ||
onMouseUp={event => event.stopPropagation()} | ||
/> | ||
|
||
<SelectSecondaryDatasetPopover | ||
isOpen={isPopoverOpen} | ||
onClose={closePopover} | ||
anchorEl={popoverAnchor} | ||
datasetList={datasetList} | ||
selectedDataset={selectedDataset} | ||
onApply={handleChangeDataset} | ||
/> | ||
</> | ||
) | ||
}, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.