+
+ {!selectedInputFile && view === 'inputs' && (
+
{inputFiles.map((inputFile, index) => {
return (
-
{inputFile.name}
-
+
);
})}
)}
+ {view === 'functions' && (
+
+
Sample function list
+ {functionList.map((fn) => (
+
+ {fn.name}
+
+ ))}
+
+ )}
{selectedInputFile && (
<>
@@ -127,7 +166,7 @@ function InputPanel({ addNewInput }: InputPanelProps) {
diff --git a/src/css/RMLMappingEditor.module.scss b/src/css/RMLMappingEditor.module.scss
index a1c34f5..8add04f 100644
--- a/src/css/RMLMappingEditor.module.scss
+++ b/src/css/RMLMappingEditor.module.scss
@@ -97,7 +97,6 @@
justify-content: center;
}
-
.header {
composes: centered;
padding: 0 10px;
@@ -284,13 +283,13 @@
overflow: auto;
}
-.inputFilesList {
+.inputItemsList {
composes: stretch;
overflow: auto;
padding: 8px;
}
-.inputFile {
+.inputItem {
cursor: pointer;
padding: 7px 10px;
border-radius: 5px;
@@ -302,11 +301,11 @@
color: var(--secondary-text-color);
}
-.inputFile:hover {
+.inputItem:hover {
background-color: var(--explorer-item-hover-color);
}
-.inputFile.Selected {
+.inputItem.Selected {
background-color: var(--explorer-item-selected-color);
color: var(--primary-text-color);
}
@@ -410,6 +409,10 @@
}
}
+.functionsListHeader {
+ color: var(--button-selected-text-color);
+ padding: 8px 12px;
+}
.collapsePanelButtonLeft {
margin-right: 10px;
}
diff --git a/src/util/TypeUtil.ts b/src/util/TypeUtil.ts
index de57f40..f72126f 100644
--- a/src/util/TypeUtil.ts
+++ b/src/util/TypeUtil.ts
@@ -16,6 +16,10 @@ export type ValueOf = T[keyof T];
export type ClickEvent = React.MouseEvent;
+export enum ViewType {
+ INPUTS = 'inputs',
+ FUNCTIONS = 'functions',
+}
export type PanelType = ValueOf;
-export type InputType = ValueOf;
\ No newline at end of file
+export type InputType = ValueOf;