-
Notifications
You must be signed in to change notification settings - Fork 1
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' of https://github.com/MeasureAuthoringTool/mad…
…ie-editor into MAT-6401_noContextError
- Loading branch information
Showing
16 changed files
with
608 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from "react"; | ||
import { MadieDialog } from "@madie/madie-design-system/dist/react"; | ||
import ErrorIcon from "@mui/icons-material/Error"; | ||
|
||
const ConfirmationDialog = ({ open, onClose, onSubmit }) => { | ||
return ( | ||
<MadieDialog | ||
title="Are you sure?" | ||
dialogProps={{ | ||
onClose, | ||
open, | ||
}} | ||
cancelButtonProps={{ | ||
variant: "secondary", | ||
cancelText: "Cancel", | ||
"data-testid": "confirmation-cancel-button", | ||
}} | ||
continueButtonProps={{ | ||
variant: "cyan", | ||
type: "submit", | ||
"data-testid": "confirmation-clear-button", | ||
continueText: "Clear", | ||
onClick: onSubmit, | ||
}} | ||
> | ||
<div id="discard-changes-dialog-body"> | ||
<section className="dialog-warning-body"> | ||
<p>You are about to clear this function, including all arguments.</p> | ||
</section> | ||
<section className="dialog-warning-action"> | ||
<ErrorIcon /> | ||
<p>This action cannot be undone!</p> | ||
</section> | ||
</div> | ||
</MadieDialog> | ||
); | ||
}; | ||
|
||
export default ConfirmationDialog; |
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
46 changes: 46 additions & 0 deletions
46
src/CqlBuilderPanel/functionsSection/FunctionSectionNavTabs.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,46 @@ | ||
import React from "react"; | ||
import { Tabs, Tab } from "@madie/madie-design-system/dist/react"; | ||
|
||
export interface NavTabProps { | ||
activeTab: string; | ||
setActiveTab: (value: string) => void; | ||
functionCount: number; | ||
loading: boolean; | ||
} | ||
|
||
export default function FunctionSectionNavTabs(props: NavTabProps) { | ||
const { activeTab, setActiveTab, functionCount, loading } = props; | ||
|
||
return ( | ||
<div style={{ borderBottom: "1px solid #b0b0b0" }} tw="flex flex-row"> | ||
<Tabs | ||
id="function-tabs" | ||
value={activeTab} | ||
onChange={(e, v) => { | ||
setActiveTab(v); | ||
}} | ||
type="B" | ||
visibleScrollbar | ||
variant="scrollable" | ||
scrollButtons={false} | ||
> | ||
<Tab | ||
tabIndex={0} | ||
aria-label="Function" | ||
type="B" | ||
label="Function" | ||
data-testid="function-tab" | ||
value="function" | ||
/> | ||
<Tab | ||
tabIndex={0} | ||
aria-label="Saved Functions" | ||
type="B" | ||
label={`Saved Functions ${!loading ? "(" + functionCount + ")" : ""}`} | ||
data-testid="saved-functions-tab" | ||
value="saved-functions" | ||
/> | ||
</Tabs> | ||
</div> | ||
); | ||
} |
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,89 @@ | ||
#function-form { | ||
font-family: Rubik, sans-serif; | ||
grid-column: span 5 / span 14; | ||
display: flex; | ||
flex-direction: column; | ||
padding-top: 32px; | ||
textArea { | ||
box-sizing: border-box; | ||
border-radius: 3px; | ||
border: solid 1px #8c8c8c; | ||
background-color: #fff; | ||
opacity: 1; | ||
height: 100%; | ||
font-size: 14px; | ||
font-weight: 400; | ||
resize: both; | ||
color: #333; | ||
&::placeholder { | ||
color: #717171; | ||
opacity: 1; | ||
} | ||
} | ||
> .content { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
position: relative; | ||
.subTitle { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
align-items: baseline; | ||
padding-bottom: 8px; | ||
margin-bottom: 33px; | ||
border-bottom: solid 1px; | ||
position: relative; | ||
h2 { | ||
font-size: 24px; | ||
border: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
} | ||
h3 { | ||
font-weight: 400; | ||
font-size: 32px; | ||
line-height: 48px; | ||
display: flex; | ||
flex-direction: row; | ||
padding-bottom: 8px; | ||
border-bottom: solid 1px #8c8c8c; | ||
} | ||
label:not(.Mui-disabled) { | ||
font-weight: 500; | ||
font-size: 14px; | ||
line-height: 17px; | ||
color: #333333; | ||
text-transform: none; | ||
margin-bottom: 7px; | ||
} | ||
} | ||
.form-actions { | ||
display: flex; | ||
flex-direction: row; | ||
min-width: 100%; | ||
justify-content: end; | ||
> .cancel-button { | ||
margin-top: 1rem; | ||
margin-right: 32px; | ||
} | ||
> #clear-function-btn:focus { | ||
margin-right: 16px; | ||
} | ||
> button[type="submit"] { | ||
margin-top: 0; | ||
} | ||
} | ||
.left-box { | ||
width: 40%; | ||
float: left; | ||
} | ||
.right-box { | ||
width: 55%; | ||
font-family: Rubik, sans-serif; | ||
margin-left: 30px; | ||
height: 80%; | ||
float: right; | ||
} | ||
} |
Oops, something went wrong.