@manta-eu/react 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/dist/components/brand-icons/index.d.ts +6 -0
- package/dist/components/brand-icons/index.d.ts.map +1 -0
- package/dist/components/brand-icons/index.js +34 -0
- package/dist/globals.css +3 -0
- package/dist/graph/nodes/AdMockupCard.d.ts.map +1 -1
- package/dist/graph/nodes/AdMockupCard.js +2 -1
- package/dist/graph/nodes/AttioCompanyView.d.ts.map +1 -1
- package/dist/graph/nodes/AttioCompanyView.js +2 -1
- package/dist/graph/nodes/LinkedinAdAccountView.d.ts.map +1 -1
- package/dist/graph/nodes/LinkedinAdAccountView.js +1 -1
- package/dist/graph/nodes/SlackChannelView.d.ts.map +1 -1
- package/dist/graph/nodes/SlackChannelView.js +2 -1
- package/dist/graph/nodes/SlackMessageView.d.ts.map +1 -1
- package/dist/graph/nodes/SlackMessageView.js +1 -1
- package/dist/graph/nodes/SlackUserView.d.ts.map +1 -1
- package/dist/graph/nodes/SlackUserView.js +2 -1
- package/dist/graph/nodes/SlackWorkspaceView.d.ts.map +1 -1
- package/dist/graph/nodes/SlackWorkspaceView.js +1 -1
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts +2 -0
- package/dist/routes/datastores/components/DatastoreFormDialog.d.ts.map +1 -1
- package/dist/routes/datastores/components/DatastoreFormDialog.js +11 -5
- package/dist/routes/datastores/index.d.ts.map +1 -1
- package/dist/routes/datastores/index.js +15 -11
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const Facebook: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
2
|
+
export declare const Instagram: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
3
|
+
export declare const Linkedin: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
|
+
export declare const Slack: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
5
|
+
export declare const Twitter: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/brand-icons/index.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ,2IAEnB,CAAC;AAEH,eAAO,MAAM,SAAS,2IAIpB,CAAC;AAEH,eAAO,MAAM,QAAQ,2IAInB,CAAC;AAEH,eAAO,MAAM,KAAK,2IAShB,CAAC;AAEH,eAAO,MAAM,OAAO,2IAQlB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createLucideIcon } from "lucide-react";
|
|
2
|
+
// lucide-react 1.0 removed its brand icons. These are the lucide-react 0.525.0 paths (ISC license).
|
|
3
|
+
export const Facebook = createLucideIcon("facebook", [
|
|
4
|
+
["path", { d: "M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z", key: "1jg4f8" }],
|
|
5
|
+
]);
|
|
6
|
+
export const Instagram = createLucideIcon("instagram", [
|
|
7
|
+
["rect", { width: "20", height: "20", x: "2", y: "2", rx: "5", ry: "5", key: "2e1cvw" }],
|
|
8
|
+
["path", { d: "M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z", key: "9exkf1" }],
|
|
9
|
+
["line", { x1: "17.5", x2: "17.51", y1: "6.5", y2: "6.5", key: "r4j83e" }],
|
|
10
|
+
]);
|
|
11
|
+
export const Linkedin = createLucideIcon("linkedin", [
|
|
12
|
+
["path", { d: "M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z", key: "c2jq9f" }],
|
|
13
|
+
["rect", { width: "4", height: "12", x: "2", y: "9", key: "mk3on5" }],
|
|
14
|
+
["circle", { cx: "4", cy: "4", r: "2", key: "bt5ra8" }],
|
|
15
|
+
]);
|
|
16
|
+
export const Slack = createLucideIcon("slack", [
|
|
17
|
+
["rect", { width: "3", height: "8", x: "13", y: "2", rx: "1.5", key: "diqz80" }],
|
|
18
|
+
["path", { d: "M19 8.5V10h1.5A1.5 1.5 0 1 0 19 8.5", key: "183iwg" }],
|
|
19
|
+
["rect", { width: "3", height: "8", x: "8", y: "14", rx: "1.5", key: "hqg7r1" }],
|
|
20
|
+
["path", { d: "M5 15.5V14H3.5A1.5 1.5 0 1 0 5 15.5", key: "76g71w" }],
|
|
21
|
+
["rect", { width: "8", height: "3", x: "14", y: "13", rx: "1.5", key: "1kmz0a" }],
|
|
22
|
+
["path", { d: "M15.5 19H14v1.5a1.5 1.5 0 1 0 1.5-1.5", key: "jc4sz0" }],
|
|
23
|
+
["rect", { width: "8", height: "3", x: "2", y: "8", rx: "1.5", key: "1omvl4" }],
|
|
24
|
+
["path", { d: "M8.5 5H10V3.5A1.5 1.5 0 1 0 8.5 5", key: "16f3cl" }],
|
|
25
|
+
]);
|
|
26
|
+
export const Twitter = createLucideIcon("twitter", [
|
|
27
|
+
[
|
|
28
|
+
"path",
|
|
29
|
+
{
|
|
30
|
+
d: "M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z",
|
|
31
|
+
key: "pff0z6",
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
]);
|
package/dist/globals.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdMockupCard.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/AdMockupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"AdMockupCard.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/AdMockupCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,8BAA8B,CAAC;AASxD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,UAAU,KAAK,IAAI,CAAC;IAC9C,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,GAAG,CAAA;KAAE,CAAC;CAC3B,CAAC;AAIF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,iBAAiB,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC,CAAC;AAEtF,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,2CAYxD;AAED,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,2CAiFpD"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Infinity as InfinityIcon } from "lucide-react";
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { match } from "ts-pattern";
|
|
5
5
|
import { OpenInPlatformLink } from "../OpenInPlatformLink.js";
|
|
6
6
|
import { FacebookAdPreview, InstagramAdPreview } from "#components/ad-preview/index";
|
|
7
|
+
import { Facebook, Instagram } from "#components/brand-icons/index";
|
|
7
8
|
import { cn } from "#style";
|
|
8
9
|
export function AdMockupHeader(props) {
|
|
9
10
|
const { label, iri, schema } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AttioCompanyView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/AttioCompanyView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AttioCompanyView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/AttioCompanyView.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AA2BhD,eAAO,MAAM,gBAAgB,uDA2I3B,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { AttioCompanySchema } from "@manta-eu/ldo";
|
|
3
3
|
import { humanCount, humanNumber } from "@manta-eu/lib/humanize";
|
|
4
4
|
import { isPresent } from "@manta-eu/lib/present";
|
|
5
|
-
import { Building2, Calendar, Coins,
|
|
5
|
+
import { Building2, Calendar, Coins, Handshake, Tags, TrendingUp, Users } from "lucide-react";
|
|
6
6
|
import { Fragment, memo } from "react";
|
|
7
7
|
import { formatCurrency, formatNumber } from "../property-formatters.js";
|
|
8
8
|
import { AttioNodeBody, attioPurple } from "./attio-shared.js";
|
|
@@ -10,6 +10,7 @@ import { CardRows, row } from "./card-rows.js";
|
|
|
10
10
|
import { EntityCardShell } from "./EntityCardShell.js";
|
|
11
11
|
import { EntityImage } from "./EntityImage.js";
|
|
12
12
|
import { firstValue, readEntityIri, toIriArray } from "./typed-node-helpers.js";
|
|
13
|
+
import { Facebook, Linkedin, Twitter } from "#components/brand-icons/index";
|
|
13
14
|
import { useEntity } from "#hooks/use-entity";
|
|
14
15
|
import { formatGraphDate } from "#lib/format-date";
|
|
15
16
|
function socialLink(href, label, icon) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkedinAdAccountView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/LinkedinAdAccountView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LinkedinAdAccountView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/LinkedinAdAccountView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,eAAO,MAAM,qBAAqB,uDAEhC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Linkedin } from "lucide-react";
|
|
3
2
|
import { memo } from "react";
|
|
4
3
|
import { ConnectedAccountCard } from "./ConnectedAccountCard.js";
|
|
4
|
+
import { Linkedin } from "#components/brand-icons/index";
|
|
5
5
|
export const LinkedinAdAccountView = memo(function LinkedinAdAccountView(props) {
|
|
6
6
|
return _jsx(ConnectedAccountCard, { icon: Linkedin, noun: "Ad account", accent: "#0A66C2", ...props });
|
|
7
7
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackChannelView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackChannelView.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"SlackChannelView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackChannelView.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAUhD,eAAO,MAAM,gBAAgB,uDA0D3B,CAAC"}
|
|
@@ -2,13 +2,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { SlackChannelSchema } from "@manta-eu/ldo";
|
|
3
3
|
import { humanCount } from "@manta-eu/lib/humanize";
|
|
4
4
|
import { isPresent } from "@manta-eu/lib/present";
|
|
5
|
-
import { CalendarPlus, Hash, MessageSquareText,
|
|
5
|
+
import { CalendarPlus, Hash, MessageSquareText, Users } from "lucide-react";
|
|
6
6
|
import { memo } from "react";
|
|
7
7
|
import { CardRows, row } from "./card-rows.js";
|
|
8
8
|
import { EntityCardShell } from "./EntityCardShell.js";
|
|
9
9
|
import { slackAubergine } from "./slack-shared.js";
|
|
10
10
|
import { ToneBadge } from "./tone-badge.js";
|
|
11
11
|
import { readEntityIri } from "./typed-node-helpers.js";
|
|
12
|
+
import { Slack } from "#components/brand-icons/index";
|
|
12
13
|
import { useEntity } from "#hooks/use-entity";
|
|
13
14
|
import { formatGraphDate, formatRelativeUpdated } from "#lib/format-date";
|
|
14
15
|
export const SlackChannelView = memo(function SlackChannelView(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackMessageView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackMessageView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SlackMessageView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackMessageView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAIhD,eAAO,MAAM,gBAAgB,uDAiB3B,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Slack } from "lucide-react";
|
|
3
2
|
import { memo } from "react";
|
|
4
3
|
import { EntityCardShell } from "./EntityCardShell.js";
|
|
4
|
+
import { Slack } from "#components/brand-icons/index";
|
|
5
5
|
export const SlackMessageView = memo(function SlackMessageView(props) {
|
|
6
6
|
const { selected, ringColor, onContextMenu } = props;
|
|
7
7
|
return (_jsx(EntityCardShell, { icon: Slack, label: "Slack message", labelMaxWidth: "max-w-80", selected: selected, ringColor: ringColor, onContextMenu: onContextMenu, children: _jsx("div", { className: "w-[260px] bg-muted rounded-[6px] px-[10px] py-[8px]", children: _jsx("span", { className: "typography-tiny text-muted-foreground italic", children: "Sends the report to Slack on execution" }) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackUserView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackUserView.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"SlackUserView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackUserView.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAShD,eAAO,MAAM,aAAa,uDA2CxB,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { SlackUserSchema } from "@manta-eu/ldo";
|
|
3
3
|
import { isPresent } from "@manta-eu/lib/present";
|
|
4
|
-
import { AtSign, Briefcase, Clock
|
|
4
|
+
import { AtSign, Briefcase, Clock } from "lucide-react";
|
|
5
5
|
import { memo } from "react";
|
|
6
6
|
import { CardRows, row } from "./card-rows.js";
|
|
7
7
|
import { EntityCardShell } from "./EntityCardShell.js";
|
|
8
8
|
import { slackAubergine } from "./slack-shared.js";
|
|
9
9
|
import { ToneBadge } from "./tone-badge.js";
|
|
10
10
|
import { readEntityIri } from "./typed-node-helpers.js";
|
|
11
|
+
import { Slack } from "#components/brand-icons/index";
|
|
11
12
|
import { useEntity } from "#hooks/use-entity";
|
|
12
13
|
export const SlackUserView = memo(function SlackUserView(props) {
|
|
13
14
|
const { data, selected = false, ringColor, onContextMenu } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlackWorkspaceView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackWorkspaceView.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SlackWorkspaceView.d.ts","sourceRoot":"","sources":["../../../src/graph/nodes/SlackWorkspaceView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAKhD,eAAO,MAAM,kBAAkB,uDAE7B,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Slack } from "lucide-react";
|
|
3
2
|
import { memo } from "react";
|
|
4
3
|
import { ConnectedAccountCard } from "./ConnectedAccountCard.js";
|
|
5
4
|
import { slackAubergine } from "./slack-shared.js";
|
|
5
|
+
import { Slack } from "#components/brand-icons/index";
|
|
6
6
|
export const SlackWorkspaceView = memo(function SlackWorkspaceView(props) {
|
|
7
7
|
return _jsx(ConnectedAccountCard, { icon: Slack, noun: "Workspace", accent: slackAubergine, ...props });
|
|
8
8
|
});
|
|
@@ -12,7 +12,9 @@ type DatastoreFormDialogProps = {
|
|
|
12
12
|
name: string;
|
|
13
13
|
}) => void;
|
|
14
14
|
onCancel: () => void;
|
|
15
|
+
isSubmitting?: boolean;
|
|
15
16
|
};
|
|
17
|
+
export declare function provisioningNotice(target: DatastoreFormTarget): string;
|
|
16
18
|
export declare function DatastoreFormDialog(props: DatastoreFormDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export {};
|
|
18
20
|
//# sourceMappingURL=DatastoreFormDialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatastoreFormDialog.d.ts","sourceRoot":"","sources":["../../../../src/routes/datastores/components/DatastoreFormDialog.tsx"],"names":[],"mappings":"AAcA,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEN,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7C,QAAQ,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"DatastoreFormDialog.d.ts","sourceRoot":"","sources":["../../../../src/routes/datastores/components/DatastoreFormDialog.tsx"],"names":[],"mappings":"AAcA,MAAM,MAAM,mBAAmB,GAC3B;IAAE,IAAI,EAAE,cAAc,CAAA;CAAE,GACxB;IACE,IAAI,EAAE,WAAW,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEN,KAAK,wBAAwB,GAAG;IAC9B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,QAAQ,EAAE,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAKtE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAmElE"}
|
|
@@ -4,24 +4,30 @@ import { match } from "ts-pattern";
|
|
|
4
4
|
import { Button } from "#components/button/index";
|
|
5
5
|
import { Input } from "#components/input/index";
|
|
6
6
|
import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from "#components/modal/index";
|
|
7
|
+
export function provisioningNotice(target) {
|
|
8
|
+
return match(target)
|
|
9
|
+
.with({ kind: "organization" }, () => "Creating the organization and its first datastore. This can take a minute.")
|
|
10
|
+
.with({ kind: "datastore" }, () => "Creating the datastore. This can take a minute.")
|
|
11
|
+
.exhaustive();
|
|
12
|
+
}
|
|
7
13
|
export function DatastoreFormDialog(props) {
|
|
8
|
-
const { target, onSubmit, onCancel } = props;
|
|
14
|
+
const { target, onSubmit, onCancel, isSubmitting = false } = props;
|
|
9
15
|
const [name, setName] = useState("");
|
|
10
16
|
const isOrganization = target.kind === "organization";
|
|
11
|
-
const canSubmit = !!name.trim();
|
|
17
|
+
const canSubmit = !!name.trim() && !isSubmitting;
|
|
12
18
|
function submit() {
|
|
13
19
|
if (!canSubmit)
|
|
14
20
|
return;
|
|
15
21
|
onSubmit({ name: name.trim() });
|
|
16
22
|
}
|
|
17
|
-
return (_jsx(Dialog, { open: true, onOpenChange: (nextOpen) => !nextOpen && onCancel(), children: _jsxs(DialogContent, { className: "flex flex-col overflow-hidden", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { text: isOrganization ? "Add organization" : "Add datastore" }), _jsx(DialogDescription, { children: match(target)
|
|
23
|
+
return (_jsx(Dialog, { open: true, onOpenChange: (nextOpen) => !nextOpen && !isSubmitting && onCancel(), children: _jsxs(DialogContent, { className: "flex flex-col overflow-hidden", showCloseButton: !isSubmitting, children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { text: isOrganization ? "Add organization" : "Add datastore" }), _jsx(DialogDescription, { children: match(target)
|
|
18
24
|
.with({ kind: "organization" }, () => "Sets up a new top-level organization with its own datastore and a fresh Manta you can build on.")
|
|
19
25
|
.with({ kind: "datastore", parentPath: "/" }, (datastore) => `Adds a top-level datastore in ${datastore.organizationName}.`)
|
|
20
26
|
.with({ kind: "datastore" }, (datastore) => `Adds a datastore nested under ${datastore.parentName}, in ${datastore.organizationName}.`)
|
|
21
|
-
.exhaustive() })] }), _jsx(Input, { autoFocus: true, label: isOrganization ? "Organization name" : "Datastore name", placeholder: isOrganization ? "e.g. Other Reseller Co" : "e.g. Acme Corp", value: name, onChange: (event) => setName(event.target.value), onKeyDown: (event) => {
|
|
27
|
+
.exhaustive() })] }), _jsx(Input, { autoFocus: true, label: isOrganization ? "Organization name" : "Datastore name", placeholder: isOrganization ? "e.g. Other Reseller Co" : "e.g. Acme Corp", value: name, disabled: isSubmitting, onChange: (event) => setName(event.target.value), onKeyDown: (event) => {
|
|
22
28
|
if (event.key === "Enter")
|
|
23
29
|
submit();
|
|
24
30
|
if (event.key === "Escape")
|
|
25
31
|
onCancel();
|
|
26
|
-
} }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "tertiary", onClick: onCancel, children: "Cancel" }), _jsx(Button, { onClick: submit, disabled: !canSubmit,
|
|
32
|
+
} }), _jsx("p", { role: "status", "aria-live": "polite", className: "typography-caption text-muted-foreground min-h-5", children: isSubmitting ? provisioningNotice(target) : "" }), _jsxs(DialogFooter, { children: [_jsx(Button, { variant: "tertiary", onClick: onCancel, disabled: isSubmitting, children: "Cancel" }), _jsx(Button, { onClick: submit, disabled: !canSubmit, isLoading: isSubmitting, label: isOrganization ? "Add organization" : "Add datastore" })] })] }) }));
|
|
27
33
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/datastores/index.tsx"],"names":[],"mappings":"AAqFA,wBAAgB,eAAe,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/routes/datastores/index.tsx"],"names":[],"mappings":"AAqFA,wBAAgB,eAAe,4CAsqB9B"}
|
|
@@ -70,7 +70,7 @@ export function DatastoresRoute() {
|
|
|
70
70
|
const toggleVisibility = useCallback((key) => {
|
|
71
71
|
setVisibility((current) => ({ ...current, [key]: !current[key] }));
|
|
72
72
|
}, []);
|
|
73
|
-
const { data, isLoading, isFetching
|
|
73
|
+
const { data, isLoading, isFetching } = useDatastoreTreeQuery(mantaClient, undefined, {
|
|
74
74
|
enabled: !!isOperator,
|
|
75
75
|
});
|
|
76
76
|
const { data: unlinkedData, error: unlinkedError, isLoading: isUnlinkedLoading, } = useUnlinkedDatastoresQuery(mantaClient, undefined, {
|
|
@@ -82,22 +82,27 @@ export function DatastoresRoute() {
|
|
|
82
82
|
function invalidateTree() {
|
|
83
83
|
void queryClient.invalidateQueries({ queryKey: useDatastoreTreeQuery.getKey() });
|
|
84
84
|
}
|
|
85
|
+
const refreshDatastores = useCallback(async () => {
|
|
86
|
+
await queryClient.invalidateQueries({ queryKey: useDatastoreTreeQuery.getKey() });
|
|
87
|
+
await Promise.all([
|
|
88
|
+
queryClient.refetchQueries({ queryKey: ["DatastoreProvisioningStatuses"] }),
|
|
89
|
+
queryClient.refetchQueries({ queryKey: useUnlinkedDatastoresQuery.getKey() }),
|
|
90
|
+
]);
|
|
91
|
+
}, [queryClient]);
|
|
85
92
|
const handleRefresh = useCallback(() => {
|
|
86
|
-
void
|
|
87
|
-
|
|
88
|
-
void queryClient.refetchQueries({ queryKey: useUnlinkedDatastoresQuery.getKey() });
|
|
89
|
-
}, [refetch, queryClient]);
|
|
93
|
+
void refreshDatastores();
|
|
94
|
+
}, [refreshDatastores]);
|
|
90
95
|
const provisionMutation = useProvisionDatastoreMutation(mantaClient, {
|
|
91
|
-
onSuccess: (result) => {
|
|
92
|
-
invalidateTree();
|
|
96
|
+
onSuccess: async (result) => {
|
|
93
97
|
const { success, name, error, pending } = result.provisionDatastore;
|
|
94
98
|
if (!success) {
|
|
99
|
+
void refreshDatastores();
|
|
95
100
|
toast.error("Couldn't create the datastore", { description: error ?? undefined });
|
|
96
101
|
return;
|
|
97
102
|
}
|
|
98
103
|
// The datastore is usually ready by the time this returns, so read its status now rather
|
|
99
104
|
// than leaving the row stale until the next poll.
|
|
100
|
-
|
|
105
|
+
await refreshDatastores();
|
|
101
106
|
// pending means only that its Dagster run outlived the wait.
|
|
102
107
|
if (pending) {
|
|
103
108
|
toast.success(`Datastore "${name}" is being created`, {
|
|
@@ -442,13 +447,12 @@ export function DatastoresRoute() {
|
|
|
442
447
|
name,
|
|
443
448
|
atOrganizationRoot: false,
|
|
444
449
|
};
|
|
445
|
-
provisionMutation.mutate({ input });
|
|
446
|
-
setFormTarget(null);
|
|
450
|
+
provisionMutation.mutate({ input }, { onSuccess: (result) => result.provisionDatastore.success && setFormTarget(null) });
|
|
447
451
|
}
|
|
448
452
|
return (_jsxs(RouteLayout, { user: user, datastore: datastore, datastores: datastores, isOperator: isOperator, canSwitchDatastore: canSwitchDatastore, logout: logout, children: [_jsx(PageHeader, { title: "Datastores", icon: Database, actions: _jsxs(_Fragment, { children: [_jsx(Button, { iconOnly: true, variant: "tertiary", onClick: handleRefresh, disabled: isFetching, icon: RefreshCcw, "aria-label": "Refresh datastores" }), activeTab === "organizations" && (_jsxs(_Fragment, { children: [filterToggles.map((toggle) => (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(Button, { variant: "secondary", "aria-pressed": toggle.active, onClick: toggle.onToggle, icon: toggle.icon, children: toggle.label }) }), _jsx(TooltipContent, { children: toggle.description })] }, toggle.key))), _jsx(Button, { icon: Plus, onClick: () => setFormTarget({ kind: "organization" }), children: "Add organization" })] }))] }) }), _jsxs(Tabs, { value: activeTab, onValueChange: (tab) => setSearchParams({ tab }, { replace: true }), className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [_jsxs(TabsContent, { value: "organizations", className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: [_jsx("div", { className: "border-b border-muted-border px-5 py-3 shrink-0", children: _jsx(DatastoresToolbar, { tabs: tabsList, searchQuery: searchQuery, onSearchQueryChange: onSearchQueryChange, statusFilter: statusFilter, onStatusFilterChange: handleStatusFilterChange, table: table }) }), _jsxs("div", { className: "flex-1 overflow-auto p-4", children: [isLoading && _jsx(DatastoreTableSkeleton, {}), !isLoading && !isPresent(rows) && (_jsx(EmptyState, { icon: Database, title: "No organizations yet", description: "Provision an organization to give it its first datastore.", children: _jsx(Button, { icon: Plus, onClick: () => setFormTarget({ kind: "organization" }), children: "Add organization" }) })), !isLoading && isPresent(rows) && (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("div", { className: "rounded-xl border border-muted-border bg-card overflow-hidden", children: _jsx(DataTable, { table: table, noResultsMessage: "No datastores match your filters." }) }), _jsx(TablePagination, { table: table, total: rows.length })] }))] })] }), _jsx(TabsContent, { value: "unlinked", className: "flex flex-col flex-1 min-h-0 overflow-hidden", children: _jsx(UnlinkedDatastoresPanel, { tabs: tabsList, table: unlinkedTable, rows: unlinkedRows, searchQuery: unlinkedSearchQuery, onSearchQueryChange: onUnlinkedSearchQueryChange, statusFilter: unlinkedStatusFilter, onStatusFilterChange: onUnlinkedStatusFilterChange, columnLabels: unlinkedColumnLabels, columnDefaultOrder: unlinkedColumnOrder, isLoading: isUnlinkedLoading, errorMessage: unlinkedError != null
|
|
449
453
|
? (parseError(unlinkedError, "Couldn't list unlinked datastores").description ??
|
|
450
454
|
"Couldn't list unlinked datastores")
|
|
451
|
-
: null }) })] }), formTarget && (_jsx(DatastoreFormDialog, { target: formTarget, onSubmit: submitForm, onCancel: () => setFormTarget(null) })), linkDialogTarget && (_jsx(LinkUnlinkedDatastoreDialog, { datastoreId: linkDialogTarget, suggestedMatch: suggestedLinkTarget(linkDialogTarget), organizationNames: organizationNameOptions, existingOrganizationNames: existingOrganizationNames, onClose: () => setLinkDialogTarget(null) })), renameTarget && (_jsx(RenameDatastoreGroupDialog, { target: renameTarget, onSubmit: (name) => {
|
|
455
|
+
: null }) })] }), formTarget && (_jsx(DatastoreFormDialog, { target: formTarget, onSubmit: submitForm, onCancel: () => setFormTarget(null), isSubmitting: provisionMutation.isPending })), linkDialogTarget && (_jsx(LinkUnlinkedDatastoreDialog, { datastoreId: linkDialogTarget, suggestedMatch: suggestedLinkTarget(linkDialogTarget), organizationNames: organizationNameOptions, existingOrganizationNames: existingOrganizationNames, onClose: () => setLinkDialogTarget(null) })), renameTarget && (_jsx(RenameDatastoreGroupDialog, { target: renameTarget, onSubmit: (name) => {
|
|
452
456
|
renameMutation.mutate({
|
|
453
457
|
input: {
|
|
454
458
|
id: renameTarget.id,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@manta-eu/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "The Manta design system, knowledge-graph UI and agent components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -1046,8 +1046,8 @@
|
|
|
1046
1046
|
"@tanstack/react-table": "^8.21.3",
|
|
1047
1047
|
"@types/json-schema": "^7.0.15",
|
|
1048
1048
|
"@unpic/react": "^1.0.2",
|
|
1049
|
-
"agents": "0.22.0",
|
|
1050
|
-
"ai": "7.0.98",
|
|
1049
|
+
"agents": "^0.22.0",
|
|
1050
|
+
"ai": "^7.0.98",
|
|
1051
1051
|
"change-case": "^5.4.4",
|
|
1052
1052
|
"clsx": "^2.1.1",
|
|
1053
1053
|
"cmdk": "^1.1.1",
|
|
@@ -1060,9 +1060,9 @@
|
|
|
1060
1060
|
"hono": "^4.9.8",
|
|
1061
1061
|
"input-otp": "^1.4.2",
|
|
1062
1062
|
"js-cookie": "^3.0.5",
|
|
1063
|
-
"ldkit": "2.8.0",
|
|
1063
|
+
"ldkit": "^2.8.0",
|
|
1064
1064
|
"libphonenumber-js": "^1.11.15",
|
|
1065
|
-
"lucide-react": "^
|
|
1065
|
+
"lucide-react": "^1.17.0",
|
|
1066
1066
|
"mime": "^4.1.0",
|
|
1067
1067
|
"motion": "^12.23.5",
|
|
1068
1068
|
"mustache": "^4.2.0",
|
|
@@ -1081,15 +1081,15 @@
|
|
|
1081
1081
|
"tailwind-merge": "^3.4.0",
|
|
1082
1082
|
"tailwind-variants": "^3.2.2",
|
|
1083
1083
|
"tailwindcss-animate": "^1.0.7",
|
|
1084
|
-
"ts-pattern": "^5.
|
|
1084
|
+
"ts-pattern": "^5.9.0",
|
|
1085
1085
|
"usehooks-ts": "^3.1.1",
|
|
1086
1086
|
"zod": "^4.5.0",
|
|
1087
1087
|
"zustand": "^5.0.2",
|
|
1088
|
-
"@manta-eu/client": "0.1.
|
|
1089
|
-
"@manta-eu/ldo": "0.1.
|
|
1090
|
-
"@manta-eu/
|
|
1091
|
-
"@manta-eu/
|
|
1092
|
-
"@manta-eu/
|
|
1088
|
+
"@manta-eu/client": "0.1.3",
|
|
1089
|
+
"@manta-eu/ldo": "0.1.3",
|
|
1090
|
+
"@manta-eu/datalog-parser": "0.1.3",
|
|
1091
|
+
"@manta-eu/rdf-lib": "0.1.3",
|
|
1092
|
+
"@manta-eu/lib": "0.1.3"
|
|
1093
1093
|
},
|
|
1094
1094
|
"peerDependencies": {
|
|
1095
1095
|
"@ulb-darmstadt/shacl-form": "^2.1.1-rc1",
|
|
@@ -1111,7 +1111,7 @@
|
|
|
1111
1111
|
"@types/react": "^19.2.7",
|
|
1112
1112
|
"@types/react-dom": "^19.2.3",
|
|
1113
1113
|
"ajv": "^8.17.1",
|
|
1114
|
-
"eslint": "^9.
|
|
1114
|
+
"eslint": "^9.39.2",
|
|
1115
1115
|
"happy-dom": "^15.11.7",
|
|
1116
1116
|
"jsdom": "^28.1.0",
|
|
1117
1117
|
"next-themes": "^0.4.6",
|
|
@@ -1122,10 +1122,10 @@
|
|
|
1122
1122
|
"storybook": "^10.2.1",
|
|
1123
1123
|
"tailwindcss": "^4.1.17",
|
|
1124
1124
|
"tsc-alias": "^1.9.5",
|
|
1125
|
-
"typescript": "^5.
|
|
1125
|
+
"typescript": "^5.9.3",
|
|
1126
1126
|
"uuid": "^13.0.0",
|
|
1127
|
-
"vite": "^
|
|
1128
|
-
"vitest": "^
|
|
1127
|
+
"vite": "^7.3.1",
|
|
1128
|
+
"vitest": "^4.1.8",
|
|
1129
1129
|
"@manta-eu/eslint-config": "0.1.0"
|
|
1130
1130
|
},
|
|
1131
1131
|
"imports": {
|