Skip to content

Commit

Permalink
Merge pull request #4181 from signalco-io/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
AleksandarDev authored Dec 23, 2023
2 parents 100de2f + ff16ff2 commit dbe4f23
Show file tree
Hide file tree
Showing 21 changed files with 127 additions and 140 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion infra/apps/cloud-primary/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@checkly/pulumi": "1.1.4",
"@pulumi/aws": "6.15.0",
"@pulumi/aws": "6.17.0",
"@pulumi/azure-native": "2.23.0",
"@pulumi/cloudflare": "5.16.0",
"@pulumi/command": "0.9.2",
Expand Down
2 changes: 1 addition & 1 deletion infra/apps/remote-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"dependencies": {
"@checkly/pulumi": "1.1.4",
"@pulumi/aws": "6.15.0",
"@pulumi/aws": "6.17.0",
"@pulumi/azure-native": "2.23.0",
"@pulumi/cloudflare": "5.16.0",
"@pulumi/command": "0.9.2",
Expand Down
2 changes: 1 addition & 1 deletion infra/apps/uier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@checkly/pulumi": "1.1.4",
"@pulumi/aws": "6.15.0",
"@pulumi/aws": "6.17.0",
"@pulumi/azure-native": "2.23.0",
"@pulumi/cloudflare": "5.16.0",
"@pulumi/command": "0.9.2",
Expand Down
2 changes: 1 addition & 1 deletion infra/packages/pulumi/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
},
"dependencies": {
"@checkly/pulumi": "1.1.4",
"@pulumi/aws": "6.15.0",
"@pulumi/aws": "6.17.0",
"@pulumi/azure-native": "2.23.0",
"@pulumi/cloudflare": "5.16.0",
"@pulumi/command": "0.9.2",
Expand Down
20 changes: 10 additions & 10 deletions infra/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Include="xunit" Version="2.6.3" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.5">
<PackageReference Include="xunit" Version="2.6.4" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.6">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
2 changes: 1 addition & 1 deletion web/apps/app/components/dashboards/DashboardView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function DashboardView(props: { dashboard: IDashboardModel, isEditing: boolean,
<GridWrapper isEditing={isEditing} order={widgetsOrder} orderChanged={handleOrderChanged}>
{widgets.map((widget) => (
<WidgetComponent
key={`widget-${widget.id.toString()}`}
key={`widget-${dashboard.id}-${widget.id.toString()}`}
id={widget.id}
onRemove={() => handleRemoveWidget(widget.id)}
isEditMode={isEditing}
Expand Down
4 changes: 2 additions & 2 deletions web/apps/app/components/entity/EntityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export default function EntityCard({ entity, spread, selectable, selected, onSel
return (
<Row spacing={1}>
{selectable && <Checkbox checked={selected ?? false} onChange={onSelection} />}
<Link href={`${KnownPages.Entities}/${entity.id}`} className="h-full grow overflow-hidden">
<Card className={cx('h-full p-1', spread && 'p-0')}>
<Link href={`${KnownPages.Entities}/${entity.id}`} legacyBehavior>
<Card className={cx('h-full p-1 grow overflow-hidden', spread && 'p-0')}>
<Container
spacing={2}
justifyContent="space-between"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export function EntitiesTitle() {
className="min-w-[160px] max-w-xs"
variant="plain"
value={selectedType}
onValueChange={(v: string) => setSelectedType(v)}
onValueChange={setSelectedType}
items={entityTypes.map(t => {
const EntityIcon = EntityIconByType(parseInt(t.value));
return ({
Expand Down
4 changes: 1 addition & 3 deletions web/apps/app/components/widgets/parts/WidgetCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type CardConfig = {
rows?: number;
}

function WidgetCard(props: IWidgetCardProps) {
export default function WidgetCard(props: IWidgetCardProps) {
const {
children,
isEditMode,
Expand Down Expand Up @@ -113,5 +113,3 @@ function WidgetCard(props: IWidgetCardProps) {
</>
);
}

export default WidgetCard;
8 changes: 4 additions & 4 deletions web/apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"@signalco/ui-notifications": "workspace:*",
"@signalco/ui-icons": "workspace:*",
"@tanstack/query-sync-storage-persister": "5.14.2",
"@tanstack/react-query": "5.14.2",
"@tanstack/react-query-devtools": "5.14.5",
"@tanstack/react-query-persist-client": "5.14.2",
"@tanstack/react-query": "5.14.6",
"@tanstack/react-query-devtools": "5.14.6",
"@tanstack/react-query-persist-client": "5.14.6",
"@vercel/analytics": "1.1.1",
"@vercel/speed-insights": "1.0.2",
"@vvo/tzdb": "6.121.0",
"@vvo/tzdb": "6.122.0",
"autoprefixer": "10.4.16",
"classix": "2.1.35",
"cobe": "0.6.3",
Expand Down
8 changes: 4 additions & 4 deletions web/apps/doprocess/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"dependencies": {
"@blocknote/core": "0.9.6",
"@blocknote/react": "0.9.6",
"@clerk/nextjs": "4.29.0",
"@clerk/nextjs": "4.29.1",
"@clerk/themes": "1.7.9",
"@dnd-kit/core": "6.1.0",
"@dnd-kit/modifiers": "7.0.0",
Expand All @@ -40,16 +40,16 @@
"@signalco/ui-icons": "workspace:*",
"@signalco/ui-notifications": "workspace:*",
"@signalco/ui-primitives": "workspace:*",
"@tanstack/react-query": "5.14.2",
"@tanstack/react-query-devtools": "5.14.5",
"@tanstack/react-query": "5.14.6",
"@tanstack/react-query-devtools": "5.14.6",
"@vercel/analytics": "1.1.1",
"classix": "2.1.35",
"drizzle-orm": "0.29.1",
"nanoid": "5.0.4",
"next": "14.0.4",
"next-secure-headers": "2.2.0",
"next-themes": "0.2.1",
"openai": "4.24.0",
"openai": "4.24.1",
"react": "18.2.0",
"react-cool-inview": "3.0.1",
"react-dom": "18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions web/apps/uier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"@signalco/ui-icons": "workspace:*",
"@signalco/ui-notifications": "workspace:*",
"@signalco/ui-primitives": "workspace:*",
"@tanstack/react-query": "5.14.2",
"@tanstack/react-query-devtools": "5.14.5",
"@tanstack/react-query": "5.14.6",
"@tanstack/react-query-devtools": "5.14.6",
"@vercel/analytics": "1.1.1",
"classix": "2.1.35",
"next": "14.0.4",
Expand Down
2 changes: 1 addition & 1 deletion web/packages/ui-icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"devDependencies": {
"@signalco/tsconfig": "workspace:*",
"@signalco/eslint-config-signalco": "workspace:*",
"lucide-react": "0.299.0",
"lucide-react": "0.300.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.3.3"
Expand Down
64 changes: 24 additions & 40 deletions web/packages/ui-primitives/src/Card/Card.tsx
Original file line number Diff line number Diff line change
@@ -1,52 +1,36 @@
import { type HTMLAttributes, type PropsWithChildren, type MouseEventHandler, forwardRef } from 'react';
import { Link } from '../Link';
import { forwardRef, type HTMLAttributes } from 'react';
import { cx } from '../cx';

export type CardProps = Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> & {
export type CardProps = HTMLAttributes<HTMLDivElement> & {
href?: string;
onClick?: MouseEventHandler<HTMLButtonElement>;
};

function LinkCard({ href, children }: PropsWithChildren & Required<Pick<CardProps, 'href'>>) {
return (
<Link href={href}>{children}</Link>
);
}

function ButtonCard({ onClick, children }: PropsWithChildren & Required<Pick<CardProps, 'onClick'>>) {
return (
<button className="text-left" onClick={onClick}>{children}</button>
);
}

function BareCard({ children }: PropsWithChildren) {
return (
<>{children}</>
);
}

function CardWrapper({ href, onClick, children }: PropsWithChildren & Pick<CardProps, 'href' | 'onClick'>) {
if (href) return <LinkCard href={href}>{children}</LinkCard>;
if (onClick) return <ButtonCard onClick={onClick}>{children}</ButtonCard>;
return <BareCard>{children}</BareCard>;
}
const Card = forwardRef<HTMLDivElement, CardProps>(({ href, onClick, className, ...restProps }: CardProps, ref) => {
const handleOnClick = (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
if (onClick) {
onClick(event);
} else if (href) {
event.preventDefault();
event.stopPropagation();
window.location.href = href;
}
}

const CardForwarded = forwardRef<HTMLDivElement, CardProps>(({ href, onClick, className, ...restProps }, ref) => {
return (
<CardWrapper href={href} onClick={onClick}>
<div
ref={ref}
className={cx(
'bg-card rounded-lg p-2 border text-card-foreground shadow-sm',
(href || onClick) && 'hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none',
className
)}
{...restProps} />
</CardWrapper>
<div
ref={ref}
role={onClick ? 'button' : undefined}
onClick={handleOnClick}
className={cx(
'bg-card rounded-lg p-2 border text-card-foreground shadow-sm',
(href || onClick) && 'cursor-default hover:bg-accent hover:text-accent-foreground disabled:opacity-50 disabled:pointer-events-none',
className
)}
{...restProps} />
);
});
CardForwarded.displayName = 'Card';
export const Card = CardForwarded;
Card.displayName = 'Card';
export { Card };

export function CardHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {
return <div className={cx('flex flex-col space-y-1.5 p-6', className)} {...props} />;
Expand Down
2 changes: 2 additions & 0 deletions web/packages/ui-primitives/src/Card/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
'use client';

export * from './Card';
3 changes: 3 additions & 0 deletions web/packages/ui-primitives/src/SelectItems/SelectItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ export function SelectItems(props: SelectItemsProps) {
</SelectPrimitive.Trigger>
<SelectPrimitive.Portal>
<SelectPrimitive.Content
// Note: Temporary fix for: https://github.com/radix-ui/primitives/issues/1658
// TODO: Remove this once the issue is fixed
ref={(ref) => ref?.addEventListener('touchend', (e) => e.preventDefault())}
className={cx(
'relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',
'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1'
Expand Down
2 changes: 1 addition & 1 deletion web/packages/uier-toolbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"classix": "2.1.35",
"postcss": "8.4.32",
"postcss-preset-env": "9.3.0",
"@tanstack/react-query": "5.14.2",
"@tanstack/react-query": "5.14.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-timeago": "7.2.0",
Expand Down
Loading

8 comments on commit dbe4f23

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

signalco-ui-docs – ./web/apps/ui-docs

signalco-ui-docs-signalco.vercel.app
signalco-ui-docs.vercel.app
signalco-ui-docs-git-main-signalco.vercel.app
ui.signalco.io

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

signalco-slco – ./web/apps/slco

signalco-slco-signalco.vercel.app
signalco-slco.vercel.app
slco.signalco.io
signalco-slco-git-main-signalco.vercel.app
slco.io

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

signalco-blog – ./web/apps/blog

signalco-blog-signalco.vercel.app
signalco-blog-git-main-signalco.vercel.app
signalco-blog.vercel.app
blog.signalco.io

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

signalco-uier – ./web/apps/uier

signalco-uier-git-main-signalco.vercel.app
signalco-uier-signalco.vercel.app
signalco-uier.vercel.app
uier.io
next.uier.io

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

signalco-app – ./web/apps/app

signalco-app-signalco.vercel.app
signalco-app.vercel.app
signalco-app-git-main-signalco.vercel.app
app.signalco.io

@vercel
Copy link

@vercel vercel bot commented on dbe4f23 Dec 23, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.