Skip to content

Commit

Permalink
Merge pull request #75 from qoretechnologies/develop
Browse files Browse the repository at this point in the history
v1.1.11
  • Loading branch information
Foxhoundn authored Sep 12, 2023
2 parents 2649679 + 963e8a6 commit 001f755
Show file tree
Hide file tree
Showing 32 changed files with 649 additions and 747 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"@blueprintjs/datetime": "^3.15.2",
"@blueprintjs/select": "^3.11.2",
"@monaco-editor/react": "^4.5.2",
"@qoretechnologies/reqore": "^0.37.0",
"@qoretechnologies/reqore": "^0.37.3",
"@types/jest": "^27.0.1",
"@types/lodash": "^4.14.197",
"@types/node": "^16.7.13",
Expand Down
1 change: 1 addition & 0 deletions src/js/components/Headbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Headbar extends React.Component {
ref={this.handleRef}
style={{
flex: '0 1 auto',
display: 'flex',
}}
>
{/* @ts-ignore ts-migrate(2349) FIXME: This expression is not callable. */}
Expand Down
25 changes: 7 additions & 18 deletions src/js/components/breadcrumbs/collapsedCrumb.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,19 @@
// @flow
import { Menu, MenuItem, Popover, PopoverInteractionKind, Position } from '@blueprintjs/core';
import { ReqoreDropdown } from '@qoretechnologies/reqore';
import map from 'lodash/map';
import React from 'react';
import { browserHistory } from 'react-router';

type Props = {
links: any;
};

// @ts-ignore ts-migrate(2724) FIXME: 'React' has no exported member named 'Element'. Di... Remove this comment to see the full error message
const CollapsedCrumb: Function = ({ links }: Props) => (
<li>
<Popover
position={Position.BOTTOM_LEFT}
interactionKind={PopoverInteractionKind.HOVER}
content={
<Menu>
{map(links, (link, name) => (
<MenuItem key={name} text={name} onClick={() => browserHistory.push(link)} />
))}
</Menu>
}
>
<span className="bp3-breadcrumbs-collapsed" />
</Popover>
</li>
<ReqoreDropdown
items={map(links, (link, name) => ({
label: name,
onClick: () => browserHistory.push(link),
}))}
/>
);

export default CollapsedCrumb;
24 changes: 8 additions & 16 deletions src/js/components/breadcrumbs/crumb.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @flow
import React from 'react';
import { ReqoreButton, ReqoreIcon } from '@qoretechnologies/reqore';
import { Link } from 'react-router';

type Props = {
Expand All @@ -19,26 +19,18 @@ const Crumb: Function = ({
active,
}: // @ts-ignore ts-migrate(2724) FIXME: 'React' has no exported member named 'Element'. Di... Remove this comment to see the full error message
Props) => (
<li>
<>
<ReqoreIcon icon="ArrowRightSLine" />
{link ? (
<Link
className={`bp3-breadcrumb ${disabled ? 'bp3-disabled' : ''} ${
active ? 'bp3-breadcrumb-current' : ''
}`}
to={link}
>
<ReqoreButton as={Link} active={active} disabled={disabled} to={link} flat>
{text || children}
</Link>
</ReqoreButton>
) : (
<span
className={`bp3-breadcrumb ${disabled ? 'bp3-disabled' : ''} ${
active ? 'bp3-breadcrumb-current' : ''
}`}
>
<ReqoreButton active={active} disabled={disabled} flat>
{text || children}
</span>
</ReqoreButton>
)}
</li>
</>
);

export default Crumb;
28 changes: 15 additions & 13 deletions src/js/components/breadcrumbs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// @flow
import { Icon } from '@blueprintjs/core';
import { ReqoreControlGroup, ReqoreIcon } from '@qoretechnologies/reqore';
import { IReqoreIconName } from '@qoretechnologies/reqore/dist/types/icons';
import qoreLogo from '../../../img/qore_logo_purple.png';
import CollapsedCrumb from './collapsedCrumb';
import Crumb from './crumb';
Expand All @@ -8,9 +9,10 @@ import CrumbTabs from './tabs';
type Props = {
children?: any;
collapsed?: boolean;
onClick?: Function;
onClick?: any;
noFloat?: boolean;
icon?: string;
icon?: IReqoreIconName;
noIcon?: boolean;
};

const Breadcrumbs: Function = ({
Expand All @@ -19,22 +21,22 @@ const Breadcrumbs: Function = ({
noFloat,
icon,
collapsed = false,
noIcon,
}: // @ts-ignore ts-migrate(2724) FIXME: 'React' has no exported member named 'Element'. Di... Remove this comment to see the full error message
Props) => (
<ul className={`bp3-breadcrumbs ${noFloat ? '' : 'pull-left'}`}>
<ReqoreControlGroup gapSize="small" fluid>
{!collapsed && children ? (
// @ts-ignore ts-migrate(2322) FIXME: Type 'Function' is not assignable to type 'MouseEv... Remove this comment to see the full error message
<li onClick={onClick}>
<>
{icon ? (
// @ts-ignore ts-migrate(2322) FIXME: Type 'string' is not assignable to type 'IconName ... Remove this comment to see the full error message
<Icon className="bp3-breadcrumb" icon={icon} />
) : (
<img src={qoreLogo} style={{ width: '15px' }} />
<ReqoreIcon icon={icon || 'SideBarLine'} onClick={onClick} />
) : noIcon ? null : (
<ReqoreIcon image={qoreLogo} />
)}
</li>
</>
) : null}

{children}
</ul>
</ReqoreControlGroup>
);

export { Breadcrumbs, Crumb, CrumbTabs, CollapsedCrumb };
export { Breadcrumbs, CollapsedCrumb, Crumb, CrumbTabs };
Loading

0 comments on commit 001f755

Please sign in to comment.