Skip to content

Commit

Permalink
update package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
olmobrutall committed Feb 27, 2020
1 parent b8c618b commit 08f7812
Show file tree
Hide file tree
Showing 5 changed files with 149 additions and 227 deletions.
27 changes: 10 additions & 17 deletions Signum.React/Scripts/Components/Typeahead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -276,25 +276,18 @@ interface CustomToggleProps {
onClick?: (e: React.MouseEvent<any>) => void;
}

class CustomToggle extends React.Component<CustomToggleProps> {
constructor(props: CustomToggleProps, context: any) {
super(props, context);
}

handleClick = (e: React.MouseEvent<any>) => {
e.preventDefault();
this.props.onClick!(e);
}

render() {
return (
<a href="" onClick={this.handleClick}>
{this.props.children}
</a>
);
}
}
const CustomToggle = React.forwardRef(function CustomToggle(p: { children: React.ReactNode, onClick: React.MouseEventHandler }, ref: React.Ref<HTMLAnchorElement>) {

return (
<a
ref={ref}
href=""
onClick={e => { e.preventDefault(); p.onClick(e); }}>
{p.children}
</a>
);
});

Typeahead.defaultProps = {
getItems: undefined as any,
Expand Down
2 changes: 1 addition & 1 deletion Signum.React/Scripts/Frames/ReactVisitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class ReactVisitor {

const oldChildren = React.Children.toArray(element.props.children);

const newChildren = React.Children.map(oldChildren, c => this.visitChild(c));
const newChildren = React.Children.map(oldChildren, c => this.visitChild(c as React.ReactChild));

if (newChildren.length != oldChildren.length || newChildren.some((n, i) => n !== oldChildren[i]))
return React.cloneElement(element, undefined, newChildren);
Expand Down
37 changes: 16 additions & 21 deletions Signum.React/Scripts/QuickLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,29 +174,24 @@ export function QuickLinkWidget(p: QuickLinkWidgetProps) {
}


class QuickLinkToggle extends React.Component<{ onClick?: (e: React.MouseEvent<any>) => void, links: any[] | undefined }> {
const QuickLinkToggle = React.forwardRef(function CustomToggle(p: { onClick: React.MouseEventHandler, links: any[] | undefined }, ref: React.Ref<HTMLAnchorElement>) {

handleClick = (e: React.MouseEvent<any>) => {
e.preventDefault();
this.props.onClick!(e);
}
const links = p.links;

render() {
const links = this.props.links;
return (
<a
className={classes("badge badge-pill", links?.some(l => !l.isShy) ? "badge-warning" : "badge-light", "sf-quicklinks")}
title={StyleContext.default.titleLabels ? QuickLinkMessage.Quicklinks.niceToString() : undefined}
role="button"
href="#"
data-toggle="dropdown"
onClick={this.handleClick} >
{links && <FontAwesomeIcon icon="star" />}
{links ? "\u00A0" + links.length : "…"}
</a>
);
}
}
return (
<a
ref={ref}
className={classes("badge badge-pill", links?.some(l => !l.isShy) ? "badge-warning" : "badge-light", "sf-quicklinks")}
title={StyleContext.default.titleLabels ? QuickLinkMessage.Quicklinks.niceToString() : undefined}
role="button"
href="#"
data-toggle="dropdown"
onClick={e => { e.preventDefault(); p.onClick(e); }}>
{links && <FontAwesomeIcon icon="star" />}
{links ? "\u00A0" + links.length : "…"}
</a>
);
});

export interface QuickLinkOptions {
isVisible?: boolean;
Expand Down
28 changes: 14 additions & 14 deletions Signum.React/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@
},
"homepage": "https://github.com/signumsoftware/framework#readme",
"dependencies": {
"@fortawesome/fontawesome-svg-core": "1.2.25",
"@fortawesome/free-brands-svg-icons": "5.11.2",
"@fortawesome/free-regular-svg-icons": "5.11.2",
"@fortawesome/free-solid-svg-icons": "5.11.2",
"@fortawesome/react-fontawesome": "0.1.6",
"@fortawesome/fontawesome-svg-core": "1.2.27",
"@fortawesome/free-brands-svg-icons": "5.12.1",
"@fortawesome/free-regular-svg-icons": "5.12.1",
"@fortawesome/free-solid-svg-icons": "5.12.1",
"@fortawesome/react-fontawesome": "0.1.8",
"@types/d3": "5.7.2",
"@types/d3-scale-chromatic": "1.3.1",
"@types/history": "4.7.3",
"@types/history": "4.7.5",
"@types/prop-types": "15.7.3",
"@types/react": "16.9.15",
"@types/react-dom": "16.9.4",
"@types/react-router": "5.1.2",
"@types/react-router-dom": "5.1.1",
"@types/react-transition-group": "4.2.3",
"@types/react-widgets": "4.3.3",
"@types/react": "16.9.23",
"@types/react-dom": "16.9.5",
"@types/react-router": "5.1.4",
"@types/react-router-dom": "5.1.3",
"@types/react-transition-group": "4.2.4",
"@types/query-string": "5.1.0",
"moment": "2.24.0",
"numbro": "2.1.2",
"popper.js": "1.15.0",
"query-string": "5.1.1",
"react": "16.11.0",
"react-bootstrap": "1.0.0-beta.14",
"react-dom": "16.11.0"
"react": "16.12.0",
"react-bootstrap": "1.0.0-beta.16",
"react-dom": "16.12.0"
}
}
Loading

1 comment on commit 08f7812

@olmobrutall
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updates package.json

I've updated npm/yarn modules in Framework / Extensions / Southwind.

Check the changes in this southwind commit.

Please sign in to comment.