-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving inbox search composer: Updated react components and workbench …
…version (#263) * Added latest InboxSearchComposer code and it's dependencies * updated package.json * Update package.json * updated code * updated dependent files * updated * Update Table.js * updated dependent code * Update CheckBox.js * Updates * updates * Update useCustomMDMS.js * Updated logic * updated package and readme * Update micro-ui/web/micro-ui-internals/packages/react-components/README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update micro-ui/web/micro-ui-internals/packages/libraries/README.md Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --------- Co-authored-by: Jagankumar <[email protected]> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e121574
commit 0aef9d0
Showing
32 changed files
with
1,460 additions
and
287 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
2 changes: 1 addition & 1 deletion
2
micro-ui/web/micro-ui-internals/packages/libraries/package.json
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
2 changes: 1 addition & 1 deletion
2
micro-ui/web/micro-ui-internals/packages/react-components/package.json
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
56 changes: 56 additions & 0 deletions
56
micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/HorizontalNavV2.js
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,56 @@ | ||
import React, {useState} from 'react' | ||
import { useTranslation } from 'react-i18next' | ||
import BreakLine from './BreakLine' | ||
const HorizontalNavV2 = ({ configNavItems, activeLink, setActiveLink, showNav = false, children, customStyle = {}, customClassName = "", inFormComposer = true, navClassName = "", navStyles = {},fromSearchComp=false,horizontalLine=false }) => { | ||
const { t } = useTranslation() | ||
const setActive = (item) => { | ||
setActiveLink(item) | ||
} | ||
|
||
const MenuItem = ({ item }) => { | ||
let itemComponent = item.code; | ||
|
||
const Item = () => ( | ||
<span className="menu-item"> | ||
<div className="menu-label">{t(itemComponent)}</div> | ||
</span> | ||
); | ||
|
||
return ( | ||
<Item /> | ||
); | ||
}; | ||
|
||
if(fromSearchComp) { | ||
return ( | ||
<div className={navClassName} style={fromSearchComp ?{width:"100%",...navStyles} :{...navStyles}}> | ||
{showNav && <div className={fromSearchComp?`horizontal-nav ${customClassName}`:`horizontal-nav ${customClassName}`} style={inFormComposer?{ marginLeft: "16px", marginRight: "16px", marginTop:"0px",...customStyle }:{...customStyle}} > | ||
{configNavItems?.map((item, index) => ( | ||
<div className={`sidebar-list-search-form ${activeLink?.name === item.name ? "active" : ""}`} key={index} onClick={() => setActive(item)}> | ||
<MenuItem item={item} /> | ||
</div> | ||
))} | ||
</div> | ||
} | ||
{/* Commenting out for now due to horizontal line coming in every inbox as well */} | ||
{horizontalLine && <BreakLine style={{margin:"0px 16px 0px 16px"}}/>} | ||
{children} | ||
</div> | ||
) | ||
} | ||
return ( | ||
<div className={navClassName} style={{...navStyles}}> | ||
{showNav && <div className={`horizontal-nav ${customClassName}`} style={inFormComposer?{ marginLeft: "16px", marginRight: "16px", ...customStyle }:{...customStyle}} > | ||
{configNavItems?.map((item, index) => ( | ||
<div className={`sidebar-list ${activeLink?.name === item.name ? "active" : ""}`} key={index} onClick={() => setActive(item)}> | ||
<MenuItem item={item} /> | ||
</div> | ||
))} | ||
</div> | ||
} | ||
{children} | ||
</div> | ||
) | ||
} | ||
|
||
export default HorizontalNavV2 |
1 change: 0 additions & 1 deletion
1
micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/InboxSearchLinks.js
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
14 changes: 14 additions & 0 deletions
14
micro-ui/web/micro-ui-internals/packages/react-components/src/atoms/RemovableTagNew.js
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,14 @@ | ||
import React from "react"; | ||
import { Close } from "./svgindex"; | ||
|
||
const RemoveableTagNew = ({ text={}, onClick, extraStyles,disabled = false }) => ( | ||
<div className="tag inbox-tag" style={extraStyles?extraStyles?.tagStyles:{}} > | ||
<span className="text inbox-tag-label" style={extraStyles?extraStyles?.textStyles:{}}>{`${text?.label} :`}</span> | ||
<span className="text inbox-tag-values" style={extraStyles?extraStyles?.textStyles:{}}>{text?.value}</span> | ||
<span onClick={disabled?null:onClick}> | ||
<Close className="close" style={extraStyles?extraStyles?.closeIconStyles:{}} /> | ||
</span> | ||
</div> | ||
); | ||
|
||
export default RemoveableTagNew; |
Oops, something went wrong.