@code0-tech/pictor 0.0.0-mvp.2 → 0.0.0-mvp.21
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/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/assets/components/alert/Alert.style.css +1 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/toast/Toast.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
- package/dist/components/alert/Alert.d.ts +7 -0
- package/dist/components/alert/Alert.js +38 -0
- package/dist/components/avatar/Avatar.js +2 -2
- package/dist/components/badge/Badge.js +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js +16 -28
- package/dist/components/button/Button.d.ts +2 -1
- package/dist/components/button/Button.js +23 -20
- package/dist/components/button-group/ButtonGroup.js +6 -5
- package/dist/components/card/Card.d.ts +2 -1
- package/dist/components/card/Card.js +25 -22
- package/dist/components/card/CardSection.d.ts +1 -0
- package/dist/components/card/CardSection.js +18 -12
- package/dist/components/col/Col.js +9 -8
- package/dist/components/command/Command.js +19 -18
- package/dist/components/container/Container.js +12 -11
- package/dist/components/d-flow/DFlow.edges.hook.js +9 -10
- package/dist/components/d-flow/DFlow.js +6 -4
- package/dist/components/d-flow/DFlow.nodes.hook.js +18 -19
- package/dist/components/d-flow/control/DFlowControl.js +50 -46
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +89 -5
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +18 -4
- package/dist/components/d-flow/data-type/index.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +220 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +227 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +241 -5
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -6
- package/dist/components/d-flow/edge/DFlowEdge.js +1 -1
- package/dist/components/d-flow/folder/DFlowFolder.js +16 -15
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +1 -1
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +19 -20
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +56 -56
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +72 -76
- package/dist/components/d-flow/index.js +8 -8
- package/dist/components/d-flow/input/DFlowInputDataType.js +201 -201
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +6 -5
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +61 -62
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +9 -8
- package/dist/components/d-flow/tab/DFlowTabs.js +1 -1
- package/dist/components/d-flow/validation/DFlowValidation.js +15 -14
- package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
- package/dist/components/d-fullscreen/DFullScreen.js +24 -18
- package/dist/components/d-layout/DLayout.js +27 -26
- package/dist/components/d-license/DNamespaceLicense.service.d.ts +11 -0
- package/dist/components/d-license/DNamespaceLicense.service.js +12 -0
- package/dist/components/d-license/index.d.ts +2 -0
- package/dist/components/d-license/index.js +6 -0
- package/dist/components/d-member/DNamespaceMember.service.d.ts +13 -0
- package/dist/components/d-member/DNamespaceMember.service.js +15 -0
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.d.ts +4 -1
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.js +4 -1
- package/dist/components/d-member/index.d.ts +2 -0
- package/dist/components/d-member/index.js +6 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +1 -1
- package/dist/components/d-namespace/DNamespace.service.js +5 -4
- package/dist/components/d-namespace/index.d.ts +0 -10
- package/dist/components/d-namespace/index.js +4 -33
- package/dist/components/d-organization/DOrganization.service.d.ts +3 -3
- package/dist/components/d-organization/DOrganization.service.js +5 -4
- package/dist/components/d-organization/DOrganization.view.d.ts +4 -1
- package/dist/components/d-organization/DOrganization.view.js +21 -18
- package/dist/components/d-organization/DOrganizationCard.d.ts +3 -3
- package/dist/components/d-organization/DOrganizationCard.js +13 -60
- package/dist/components/d-organization/DOrganizationList.d.ts +11 -0
- package/dist/components/d-organization/DOrganizationList.js +23 -0
- package/dist/components/d-organization/DOrganizatonContent.d.ts +9 -0
- package/dist/components/d-organization/DOrganizatonContent.js +86 -0
- package/dist/components/d-organization/index.d.ts +1 -0
- package/dist/components/d-organization/index.js +15 -10
- package/dist/components/d-project/DNamespaceProject.service.d.ts +12 -0
- package/dist/components/d-project/DNamespaceProject.service.js +12 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.d.ts +4 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.js +13 -10
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectCard.d.ts +1 -1
- package/dist/components/d-project/DNamespaceProjectCard.js +15 -0
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +8 -0
- package/dist/components/d-project/DNamespaceProjectContent.js +70 -0
- package/dist/components/d-project/DNamespaceProjectList.d.ts +11 -0
- package/dist/components/d-project/DNamespaceProjectList.js +25 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.d.ts +1 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.js +3 -3
- package/dist/components/d-project/index.d.ts +5 -0
- package/dist/components/d-project/index.js +24 -0
- package/dist/components/d-resizable/DResizable.js +17 -16
- package/dist/components/d-role/DNamespaceRole.service.d.ts +13 -0
- package/dist/components/d-role/DNamespaceRole.service.js +12 -0
- package/dist/components/d-role/index.d.ts +2 -0
- package/dist/components/d-role/index.js +6 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +5 -2
- package/dist/components/d-runtime/DRuntime.service.js +0 -2
- package/dist/components/d-runtime/DRuntime.view.d.ts +4 -1
- package/dist/components/d-runtime/DRuntime.view.js +6 -3
- package/dist/components/d-runtime/DRuntimeCard.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeCard.js +17 -0
- package/dist/components/d-runtime/DRuntimeContent.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeContent.js +40 -0
- package/dist/components/d-runtime/DRuntimeList.d.ts +10 -0
- package/dist/components/d-runtime/DRuntimeList.js +22 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -2
- package/dist/components/d-user/DUser.service.d.ts +1 -3
- package/dist/components/d-user/DUser.service.js +3 -9
- package/dist/components/d-user/DUser.session.hook.d.ts +3 -0
- package/dist/components/d-user/DUser.session.hook.js +16 -0
- package/dist/components/d-user/DUser.view.d.ts +4 -1
- package/dist/components/d-user/DUser.view.js +13 -10
- package/dist/components/d-user/DUserCard.d.ts +7 -0
- package/dist/components/d-user/DUserCard.js +15 -0
- package/dist/components/d-user/DUserContent.d.ts +7 -0
- package/dist/components/d-user/DUserContent.js +84 -0
- package/dist/components/d-user/DUserList.d.ts +10 -0
- package/dist/components/d-user/DUserList.js +22 -0
- package/dist/components/d-user/DUserMenu.js +19 -19
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +15 -8
- package/dist/components/dialog/Dialog.js +18 -17
- package/dist/components/file-tabs/FileTabs.js +41 -40
- package/dist/components/flex/Flex.js +2 -2
- package/dist/components/form/CheckboxInput.js +2 -2
- package/dist/components/form/Input.js +1 -1
- package/dist/components/form/InputDescription.js +1 -1
- package/dist/components/form/InputLabel.js +1 -1
- package/dist/components/form/InputMessage.js +1 -1
- package/dist/components/form/InputSuggestion.js +1 -1
- package/dist/components/form/PinInput.js +2 -2
- package/dist/components/form/RadioGroup.js +2 -2
- package/dist/components/form/RadioInput.js +2 -2
- package/dist/components/form/useForm.d.ts +2 -1
- package/dist/components/form/useForm.js +66 -32
- package/dist/components/menu/Menu.js +2 -2
- package/dist/components/quote/Quote.js +32 -36
- package/dist/components/row/Row.js +10 -9
- package/dist/components/scroll-area/ScrollArea.js +18 -17
- package/dist/components/segmented-control/SegmentedControl.js +12 -11
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.js +2 -2
- package/dist/components/toast/Toast.d.ts +13 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/tooltip/Tooltip.js +10 -9
- package/dist/index.d.ts +8 -0
- package/dist/index.js +238 -210
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/utils/arrayService.d.ts +2 -2
- package/dist/utils/contextStore.js +1 -1
- package/dist/utils/generics.js +88 -89
- package/dist/utils/reactiveArrayService.d.ts +3 -3
- package/dist/utils/reactiveArrayService.js +52 -42
- package/dist/utils/types.d.ts +2 -2
- package/package.json +31 -30
- package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/Badge.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Card.css +0 -1
- package/dist/assets/Command.css +0 -1
- package/dist/assets/DFlowFolder.css +0 -1
- package/dist/assets/DFlowFunctionDefaultCard.css +0 -1
- package/dist/assets/DFlowInputDataType.css +0 -1
- package/dist/assets/DFlowMiniMap.css +0 -1
- package/dist/assets/DFlowValidation.css +0 -1
- package/dist/assets/DLayout.css +0 -1
- package/dist/assets/DResizable.css +0 -1
- package/dist/assets/Dialog.css +0 -1
- package/dist/assets/FileTabs.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/Menu.css +0 -1
- package/dist/assets/SegmentedControl.css +0 -1
- package/dist/assets/Text.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/compiler-runtime-BNHg76kC.js +0 -36
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +0 -8
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +0 -11
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +0 -9
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +0 -9
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +0 -57
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +0 -10
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +0 -11
- /package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +0 -0
- /package/dist/assets/{ButtonGroup.css → components/button-group/ButtonGroup.style.css} +0 -0
- /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
- /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
- /package/dist/assets/{DFlowSuggestionSearchInput.css → components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css} +0 -0
- /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
- /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
- /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
- /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.d.ts +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.js +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.d.ts +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.js +0 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useService as n } from "../../utils/contextStore.js";
|
|
3
|
+
import a from "react";
|
|
4
|
+
import "merge-props";
|
|
5
|
+
import { Flex as o } from "../flex/Flex.js";
|
|
6
|
+
import { DNamespaceReactiveService as z } from "../d-namespace/DNamespace.service.js";
|
|
7
|
+
import { DOrganizationReactiveService as j } from "../d-organization/DOrganization.service.js";
|
|
8
|
+
import "../../_virtual/compiler-runtime.js";
|
|
9
|
+
import '../../assets/components/menu/Menu.style.css';import '../../assets/components/spacing/Spacing.style.css';import '../../assets/components/card/Card.style.css';/* empty css */
|
|
10
|
+
import { Text as c } from "../text/Text.js";
|
|
11
|
+
import { IconGitFork as I, IconServer as x, IconServerSpark as R, IconSettings as _ } from "@tabler/icons-react";
|
|
12
|
+
import { Button as B } from "../button/Button.js";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import { Avatar as D } from "../avatar/Avatar.js";
|
|
15
|
+
import { DUserReactiveService as b } from "../d-user/DUser.service.js";
|
|
16
|
+
/* empty css */
|
|
17
|
+
import "@radix-ui/react-dropdown-menu";
|
|
18
|
+
import { Badge as s } from "../badge/Badge.js";
|
|
19
|
+
import { DNamespaceProjectReactiveService as P } from "./DNamespaceProject.service.js";
|
|
20
|
+
import { DRuntimeReactiveService as k } from "../d-runtime/DRuntime.service.js";
|
|
21
|
+
const Y = (m) => {
|
|
22
|
+
const {
|
|
23
|
+
projectId: y,
|
|
24
|
+
onSetting: g = () => {
|
|
25
|
+
}
|
|
26
|
+
} = m, p = n(P), l = n(z), f = n(j), v = n(b), h = n(k), e = a.useMemo(() => p.getById(m.projectId), [p, m.projectId]), d = a.useMemo(() => e ? h.getById(e.primaryRuntime?.id) : null, [e]), t = a.useMemo(() => e ? l.getById(e.namespace?.id) : null, [l, e]), u = a.useMemo(() => t && t.parent ? t.parent.__typename === "Organization" ? f.getById(t.parent.id) : t.parent.__typename === "User" ? v.getById(t.parent.id) : null : null, []);
|
|
27
|
+
return /* @__PURE__ */ i(o, { align: "center", style: {
|
|
28
|
+
gap: "1.3rem"
|
|
29
|
+
}, justify: "space-between", children: [
|
|
30
|
+
/* @__PURE__ */ i(o, { align: "center", style: {
|
|
31
|
+
gap: "1.3rem"
|
|
32
|
+
}, children: [
|
|
33
|
+
/* @__PURE__ */ r(D, { bg: "transparent", identifier: (t?.parent?.__typename === "User" ? u.username : t?.parent?.__typename === "Organization" ? u.name : "") ?? "" }),
|
|
34
|
+
/* @__PURE__ */ i(o, { style: {
|
|
35
|
+
flexDirection: "column",
|
|
36
|
+
gap: "0.35rem"
|
|
37
|
+
}, children: [
|
|
38
|
+
/* @__PURE__ */ r(c, { size: "lg", hierarchy: "primary", display: "block", children: e?.name }),
|
|
39
|
+
/* @__PURE__ */ r(c, { size: "sm", hierarchy: "tertiary", display: "block", children: e?.description })
|
|
40
|
+
] })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ i(o, { align: "center", style: {
|
|
43
|
+
gap: "1.3rem"
|
|
44
|
+
}, children: [
|
|
45
|
+
/* @__PURE__ */ i(o, { align: "center", style: {
|
|
46
|
+
gap: "0.35rem",
|
|
47
|
+
flexWrap: "wrap"
|
|
48
|
+
}, children: [
|
|
49
|
+
/* @__PURE__ */ i(s, { color: "secondary", children: [
|
|
50
|
+
/* @__PURE__ */ r(I, { size: 16 }),
|
|
51
|
+
/* @__PURE__ */ r(c, { size: "xs", children: e?.flows?.count ?? 0 })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ i(s, { color: "secondary", children: [
|
|
54
|
+
/* @__PURE__ */ r(x, { size: 16 }),
|
|
55
|
+
/* @__PURE__ */ r(c, { size: "xs", children: e?.runtimes?.count ?? 0 })
|
|
56
|
+
] }),
|
|
57
|
+
d && /* @__PURE__ */ i(s, { color: "secondary", children: [
|
|
58
|
+
/* @__PURE__ */ r(R, { size: 16 }),
|
|
59
|
+
/* @__PURE__ */ r(c, { size: "xs", children: d.name })
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
e?.userAbilities?.deleteNamespaceProject || e?.userAbilities?.updateNamespaceProject ? /* @__PURE__ */ r(B, { color: "secondary", onClick: (S) => {
|
|
63
|
+
S.stopPropagation(), g(y);
|
|
64
|
+
}, children: /* @__PURE__ */ r(_, { size: 16 }) }) : null
|
|
65
|
+
] })
|
|
66
|
+
] });
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
Y as DNamespaceProjectContent
|
|
70
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Namespace, NamespaceProject } from '@code0-tech/sagittarius-graphql-types';
|
|
3
|
+
import { Card } from '../card/Card';
|
|
4
|
+
import { DNamespaceProjectView } from './DNamespaceProject.view';
|
|
5
|
+
export interface DNamespaceProjectListProps extends Omit<Card, "children" | "onSelect"> {
|
|
6
|
+
namespaceId: Namespace["id"];
|
|
7
|
+
filter?: (project: DNamespaceProjectView, index: number) => boolean;
|
|
8
|
+
onSetting?: (projectId: NamespaceProject["id"]) => void;
|
|
9
|
+
onSelect?: (projectId: NamespaceProject["id"]) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const DNamespaceProjectList: React.FC<DNamespaceProjectListProps>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import f from "react";
|
|
3
|
+
import { Card as u } from "../card/Card.js";
|
|
4
|
+
import { useService as S, useStore as l } from "../../utils/contextStore.js";
|
|
5
|
+
import "merge-props";
|
|
6
|
+
import { DNamespaceProjectReactiveService as i } from "./DNamespaceProject.service.js";
|
|
7
|
+
import v from "../card/CardSection.js";
|
|
8
|
+
import { DNamespaceProjectContent as j } from "./DNamespaceProjectContent.js";
|
|
9
|
+
const b = (c) => {
|
|
10
|
+
const {
|
|
11
|
+
namespaceId: t,
|
|
12
|
+
filter: m = () => !0,
|
|
13
|
+
onSetting: s,
|
|
14
|
+
onSelect: o,
|
|
15
|
+
...n
|
|
16
|
+
} = c, p = S(i), a = l(i), d = f.useMemo(() => p.values({
|
|
17
|
+
namespaceId: t
|
|
18
|
+
}), [a, t]);
|
|
19
|
+
return /* @__PURE__ */ r(u, { ...n, children: d.filter(m).map((e) => e.id && /* @__PURE__ */ r(v, { border: !0, hover: !0, onClick: () => {
|
|
20
|
+
o && o(e.id);
|
|
21
|
+
}, children: /* @__PURE__ */ r(j, { onSetting: s, projectId: e?.id }) }, e.id)) });
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
b as DNamespaceProjectList
|
|
25
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { MenuProps } from '
|
|
2
|
+
import { MenuProps } from '../menu/Menu';
|
|
3
3
|
import { Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
4
|
export interface DNamespaceProjectMenuProps extends MenuProps {
|
|
5
5
|
projectId: Scalars['NamespaceProjectID']['output'];
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as m, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import s from "react";
|
|
3
|
-
import { Menu as u, MenuTrigger as d, MenuPortal as l, MenuContent as f, MenuItem as p } from "
|
|
3
|
+
import { Menu as u, MenuTrigger as d, MenuPortal as l, MenuContent as f, MenuItem as p } from "../menu/Menu.js";
|
|
4
4
|
import { DNamespaceProjectReactiveService as o } from "./DNamespaceProject.service.js";
|
|
5
|
-
import { useService as c } from "
|
|
6
|
-
import { Button as h } from "
|
|
5
|
+
import { useService as c } from "../../utils/contextStore.js";
|
|
6
|
+
import { Button as h } from "../button/Button.js";
|
|
7
7
|
const x = (t) => {
|
|
8
8
|
const n = c(o), i = c(o), a = n.getById(t.projectId);
|
|
9
9
|
return s.useMemo(() => /* @__PURE__ */ m(u, { ...t, children: [
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { DNamespaceProjectReactiveService as L } from "./DNamespaceProject.service.js";
|
|
2
|
+
import { DNamespaceProjectView as S } from "./DNamespaceProject.view.js";
|
|
3
|
+
import "react/jsx-runtime";
|
|
4
|
+
import "../../_virtual/compiler-runtime.js";
|
|
5
|
+
import '../../assets/components/badge/Badge.style.css';import '../../assets/components/menu/Menu.style.css';import '../../assets/components/avatar/Avatar.style.css';import '../../assets/components/spacing/Spacing.style.css';import '../../assets/components/text/Text.style.css';import '../../assets/components/flex/Flex.style.css';import '../../assets/components/card/Card.style.css';/* empty css */
|
|
6
|
+
import "react";
|
|
7
|
+
import "merge-props";
|
|
8
|
+
import "../../utils/contextStore.js";
|
|
9
|
+
/* empty css */
|
|
10
|
+
/* empty css */
|
|
11
|
+
import "@tabler/icons-react";
|
|
12
|
+
import "../button/Button.js";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import "js-md5";
|
|
15
|
+
/* empty css */
|
|
16
|
+
/* empty css */
|
|
17
|
+
import "@radix-ui/react-dropdown-menu";
|
|
18
|
+
/* empty css */
|
|
19
|
+
import { DNamespaceProjectList as b } from "./DNamespaceProjectList.js";
|
|
20
|
+
export {
|
|
21
|
+
b as DNamespaceProjectList,
|
|
22
|
+
L as DNamespaceProjectReactiveService,
|
|
23
|
+
S as DNamespaceProjectView
|
|
24
|
+
};
|
|
@@ -1,31 +1,32 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { c as
|
|
3
|
-
import { mergeCode0Props as
|
|
4
|
-
import { PanelGroup as o, Panel as c, PanelResizeHandle as
|
|
5
|
-
import '../../assets/DResizable.css'
|
|
6
|
-
|
|
2
|
+
import { c as r } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { mergeCode0Props as n } from "../../utils/utils.js";
|
|
4
|
+
import { PanelGroup as o, Panel as c, PanelResizeHandle as m } from "react-resizable-panels";
|
|
5
|
+
import '../../assets/components/d-resizable/DResizable.style.css';/* empty css */
|
|
6
|
+
const u = (a) => {
|
|
7
|
+
const e = r.c(4);
|
|
7
8
|
let l;
|
|
8
|
-
e[0] !== a ? (l =
|
|
9
|
+
e[0] !== a ? (l = n("d-resizable", a), e[0] = a, e[1] = l) : l = e[1];
|
|
9
10
|
const t = l;
|
|
10
11
|
let s;
|
|
11
12
|
return e[2] !== t ? (s = /* @__PURE__ */ i(o, { "data-slot": "resizable-panel-group", ...t }), e[2] = t, e[3] = s) : s = e[3], s;
|
|
12
|
-
},
|
|
13
|
-
const e =
|
|
13
|
+
}, P = (a) => {
|
|
14
|
+
const e = r.c(4);
|
|
14
15
|
let l;
|
|
15
|
-
e[0] !== a ? (l =
|
|
16
|
+
e[0] !== a ? (l = n("d-resizable__panel", a), e[0] = a, e[1] = l) : l = e[1];
|
|
16
17
|
let t;
|
|
17
18
|
return e[2] !== l ? (t = /* @__PURE__ */ i(c, { "data-slot": "resizable-panel", ...l }), e[2] = l, e[3] = t) : t = e[3], t;
|
|
18
|
-
},
|
|
19
|
-
const e =
|
|
19
|
+
}, h = (a) => {
|
|
20
|
+
const e = r.c(5);
|
|
20
21
|
let l;
|
|
21
|
-
e[0] !== a ? (l =
|
|
22
|
+
e[0] !== a ? (l = n("d-resizable__handle", a), e[0] = a, e[1] = l) : l = e[1];
|
|
22
23
|
let t;
|
|
23
24
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (t = /* @__PURE__ */ i("div", { className: "d-resizable__handle-bar" }), e[2] = t) : t = e[2];
|
|
24
25
|
let s;
|
|
25
|
-
return e[3] !== l ? (s = /* @__PURE__ */ i(
|
|
26
|
+
return e[3] !== l ? (s = /* @__PURE__ */ i(m, { "data-slot": "resizable-handle", ...l, children: t }), e[3] = l, e[4] = s) : s = e[4], s;
|
|
26
27
|
};
|
|
27
28
|
export {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
h as DResizableHandle,
|
|
30
|
+
P as DResizablePanel,
|
|
31
|
+
u as DResizablePanelGroup
|
|
31
32
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactiveArrayService } from '../../utils';
|
|
2
|
+
import { DNamespaceRoleView } from './DNamespaceRole.view';
|
|
3
|
+
import { Namespace, NamespaceRole, NamespacesRolesAssignAbilitiesInput, NamespacesRolesAssignAbilitiesPayload, NamespacesRolesAssignProjectsInput, NamespacesRolesAssignProjectsPayload, NamespacesRolesCreateInput, NamespacesRolesCreatePayload, NamespacesRolesDeleteInput, NamespacesRolesDeletePayload } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export type DRoleDependencies = {
|
|
5
|
+
namespaceId: Namespace['id'];
|
|
6
|
+
};
|
|
7
|
+
export declare abstract class DNamespaceRoleReactiveService extends ReactiveArrayService<DNamespaceRoleView, DRoleDependencies> {
|
|
8
|
+
getById(id: NamespaceRole['id'], dependencies?: DRoleDependencies): DNamespaceRoleView | undefined;
|
|
9
|
+
abstract roleAssignAbilities(payload: NamespacesRolesAssignAbilitiesInput): Promise<NamespacesRolesAssignAbilitiesPayload | undefined>;
|
|
10
|
+
abstract roleAssignProject(payload: NamespacesRolesAssignProjectsInput): Promise<NamespacesRolesAssignProjectsPayload | undefined>;
|
|
11
|
+
abstract roleCreate(payload: NamespacesRolesCreateInput): Promise<NamespacesRolesCreatePayload | undefined>;
|
|
12
|
+
abstract roleDelete(payload: NamespacesRolesDeleteInput): Promise<NamespacesRolesDeletePayload | undefined>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "../../utils/contextStore.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { ReactiveArrayService as t } from "../../utils/reactiveArrayService.js";
|
|
4
|
+
import "merge-props";
|
|
5
|
+
class s extends t {
|
|
6
|
+
getById(e, r) {
|
|
7
|
+
return this.values(r).find((i) => i.id === e);
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
s as DNamespaceRoleReactiveService
|
|
12
|
+
};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { ReactiveArrayService } from '../../utils/reactiveArrayService';
|
|
2
2
|
import { DRuntimeView } from './DRuntime.view';
|
|
3
|
-
import { Runtime, RuntimesCreateInput, RuntimesCreatePayload, RuntimesDeleteInput, RuntimesDeletePayload, RuntimesRotateTokenInput, RuntimesRotateTokenPayload } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
-
export
|
|
3
|
+
import { Namespace, Runtime, RuntimesCreateInput, RuntimesCreatePayload, RuntimesDeleteInput, RuntimesDeletePayload, RuntimesRotateTokenInput, RuntimesRotateTokenPayload } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
export type DRuntimeDependencies = {
|
|
5
|
+
namespaceId: Namespace['id'];
|
|
6
|
+
};
|
|
7
|
+
export declare abstract class DRuntimeReactiveService extends ReactiveArrayService<DRuntimeView, DRuntimeDependencies> {
|
|
5
8
|
getById(id: Runtime['id']): DRuntimeView | undefined;
|
|
6
9
|
abstract runtimeCreate(payload: RuntimesCreateInput): Promise<RuntimesCreatePayload | undefined>;
|
|
7
10
|
abstract runtimeDelete(payload: RuntimesDeleteInput): Promise<RuntimesDeletePayload | undefined>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ReactiveArrayService as r } from "../../utils/reactiveArrayService.js";
|
|
2
2
|
class c extends r {
|
|
3
|
-
//TODO: inject UI error handler for toasts
|
|
4
|
-
//inject: namespaceId because the runtimes query needs it
|
|
5
3
|
getById(e) {
|
|
6
4
|
return this.values().find((i) => i.id === e);
|
|
7
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataTypeConnection, FlowTypeConnection, Maybe, Namespace, NamespaceProjectConnection, Runtime, RuntimeStatusType, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
1
|
+
import { DataTypeConnection, FlowTypeConnection, Maybe, Namespace, NamespaceProjectConnection, Runtime, RuntimeStatusType, RuntimeUserAbilities, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
export declare class DRuntimeView {
|
|
3
3
|
/** Time when this Runtime was created */
|
|
4
4
|
private readonly _createdAt?;
|
|
@@ -22,6 +22,8 @@ export declare class DRuntimeView {
|
|
|
22
22
|
private readonly _token?;
|
|
23
23
|
/** Time when this Runtime was last updated */
|
|
24
24
|
private readonly _updatedAt?;
|
|
25
|
+
/** Abilities for the current user on this Runtime */
|
|
26
|
+
private readonly _userAbilities?;
|
|
25
27
|
constructor(payload: Runtime);
|
|
26
28
|
get createdAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
27
29
|
get dataTypes(): Maybe<DataTypeConnection> | undefined;
|
|
@@ -34,5 +36,6 @@ export declare class DRuntimeView {
|
|
|
34
36
|
get status(): Maybe<RuntimeStatusType> | undefined;
|
|
35
37
|
get token(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
36
38
|
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
39
|
+
get userAbilities(): Maybe<RuntimeUserAbilities> | undefined;
|
|
37
40
|
json(): Runtime;
|
|
38
41
|
}
|
|
@@ -15,9 +15,9 @@ function o(e, t) {
|
|
|
15
15
|
}
|
|
16
16
|
return (t === "string" ? String : Number)(e);
|
|
17
17
|
}
|
|
18
|
-
class
|
|
18
|
+
class u {
|
|
19
19
|
constructor(t) {
|
|
20
|
-
i(this, "_createdAt", void 0), i(this, "_dataTypes", void 0), i(this, "_description", void 0), i(this, "_flowTypes", void 0), i(this, "_id", void 0), i(this, "_name", void 0), i(this, "_namespace", void 0), i(this, "_projects", void 0), i(this, "_status", void 0), i(this, "_token", void 0), i(this, "_updatedAt", void 0), this._createdAt = t.createdAt, this._dataTypes = t.dataTypes, this._description = t.description, this._flowTypes = t.flowTypes, this._id = t.id, this._name = t.name, this._namespace = t.namespace, this._projects = t.projects, this._status = t.status, this._token = t.token, this._updatedAt = t.updatedAt;
|
|
20
|
+
i(this, "_createdAt", void 0), i(this, "_dataTypes", void 0), i(this, "_description", void 0), i(this, "_flowTypes", void 0), i(this, "_id", void 0), i(this, "_name", void 0), i(this, "_namespace", void 0), i(this, "_projects", void 0), i(this, "_status", void 0), i(this, "_token", void 0), i(this, "_updatedAt", void 0), i(this, "_userAbilities", void 0), this._createdAt = t.createdAt, this._dataTypes = t.dataTypes, this._description = t.description, this._flowTypes = t.flowTypes, this._id = t.id, this._name = t.name, this._namespace = t.namespace, this._projects = t.projects, this._status = t.status, this._token = t.token, this._updatedAt = t.updatedAt, this._userAbilities = t.userAbilities;
|
|
21
21
|
}
|
|
22
22
|
get createdAt() {
|
|
23
23
|
return this._createdAt;
|
|
@@ -52,6 +52,9 @@ class a {
|
|
|
52
52
|
get updatedAt() {
|
|
53
53
|
return this._updatedAt;
|
|
54
54
|
}
|
|
55
|
+
get userAbilities() {
|
|
56
|
+
return this._userAbilities;
|
|
57
|
+
}
|
|
55
58
|
json() {
|
|
56
59
|
return {
|
|
57
60
|
createdAt: this._createdAt,
|
|
@@ -69,5 +72,5 @@ class a {
|
|
|
69
72
|
}
|
|
70
73
|
}
|
|
71
74
|
export {
|
|
72
|
-
|
|
75
|
+
u as DRuntimeView
|
|
73
76
|
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Runtime } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface DRuntimeCardProps {
|
|
4
|
+
runtimeId: Runtime['id'];
|
|
5
|
+
onSetting?: (runtimeId: Runtime['id']) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DRuntimeCard: React.FC<DRuntimeCardProps>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { Card as p } from "../card/Card.js";
|
|
4
|
+
import { DRuntimeContent as s } from "./DRuntimeContent.js";
|
|
5
|
+
const x = (m) => {
|
|
6
|
+
const t = c.c(3), {
|
|
7
|
+
runtimeId: n,
|
|
8
|
+
onSetting: e
|
|
9
|
+
} = m, r = e === void 0 ? f : e;
|
|
10
|
+
let o;
|
|
11
|
+
return t[0] !== r || t[1] !== n ? (o = /* @__PURE__ */ i(p, { children: /* @__PURE__ */ i(s, { runtimeId: n, onSetting: r }) }), t[0] = r, t[1] = n, t[2] = o) : o = t[2], o;
|
|
12
|
+
};
|
|
13
|
+
function f() {
|
|
14
|
+
}
|
|
15
|
+
export {
|
|
16
|
+
x as DRuntimeCard
|
|
17
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Runtime } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface DRuntimeContentProps {
|
|
4
|
+
runtimeId: Runtime['id'];
|
|
5
|
+
onSetting?: (runtimeId: Runtime['id']) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DRuntimeContent: React.FC<DRuntimeContentProps>;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import d from "react";
|
|
3
|
+
import { Text as n } from "../text/Text.js";
|
|
4
|
+
import { Flex as t } from "../flex/Flex.js";
|
|
5
|
+
import { IconSettings as h } from "@tabler/icons-react";
|
|
6
|
+
import { Button as f } from "../button/Button.js";
|
|
7
|
+
import { useService as g, useStore as y } from "../../utils/contextStore.js";
|
|
8
|
+
import "merge-props";
|
|
9
|
+
import { DRuntimeReactiveService as c } from "./DRuntime.service.js";
|
|
10
|
+
import { Badge as s } from "../badge/Badge.js";
|
|
11
|
+
const v = (m) => {
|
|
12
|
+
const {
|
|
13
|
+
runtimeId: i,
|
|
14
|
+
onSetting: l = () => {
|
|
15
|
+
}
|
|
16
|
+
} = m, a = g(c), p = y(c), r = d.useMemo(() => a.getById(i), [p, i]);
|
|
17
|
+
return /* @__PURE__ */ o(t, { justify: "space-between", align: "center", children: [
|
|
18
|
+
/* @__PURE__ */ o(t, { style: {
|
|
19
|
+
flexDirection: "column",
|
|
20
|
+
gap: "0.35rem"
|
|
21
|
+
}, children: [
|
|
22
|
+
/* @__PURE__ */ e(n, { size: "lg", hierarchy: "primary", display: "block", children: r?.name }),
|
|
23
|
+
/* @__PURE__ */ e(n, { size: "sm", hierarchy: "tertiary", display: "block", children: r?.description })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ o(t, { align: "center", style: {
|
|
26
|
+
gap: "1.3rem"
|
|
27
|
+
}, children: [
|
|
28
|
+
/* @__PURE__ */ e(t, { align: "center", style: {
|
|
29
|
+
gap: "0.35rem",
|
|
30
|
+
flexWrap: "wrap"
|
|
31
|
+
}, children: r?.status === "CONNECTED" ? /* @__PURE__ */ e(s, { color: "success", children: "CONNECTED" }) : /* @__PURE__ */ e(s, { color: "error", children: "DISCONNECTED" }) }),
|
|
32
|
+
r?.userAbilities?.deleteRuntime || r?.userAbilities?.updateRuntime || r?.userAbilities?.rotateRuntimeToken ? /* @__PURE__ */ e(f, { color: "secondary", onClick: (u) => {
|
|
33
|
+
u.stopPropagation(), l(i);
|
|
34
|
+
}, children: /* @__PURE__ */ e(h, { size: 16 }) }) : null
|
|
35
|
+
] })
|
|
36
|
+
] });
|
|
37
|
+
};
|
|
38
|
+
export {
|
|
39
|
+
v as DRuntimeContent
|
|
40
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Runtime } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { DRuntimeView } from './DRuntime.view';
|
|
3
|
+
import { Card } from '../card/Card';
|
|
4
|
+
import { default as React } from 'react';
|
|
5
|
+
export interface DRuntimeListProps extends Omit<Card, "children" | "onSelect"> {
|
|
6
|
+
filter?: (runtime: DRuntimeView, index: number) => boolean;
|
|
7
|
+
onSelect?: (userId: Runtime['id']) => void;
|
|
8
|
+
onSetting?: (runtimeId: Runtime['id']) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DRuntimeList: React.FC<DRuntimeListProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { Card as f } from "../card/Card.js";
|
|
3
|
+
import p from "react";
|
|
4
|
+
import { useService as S, useStore as l } from "../../utils/contextStore.js";
|
|
5
|
+
import "merge-props";
|
|
6
|
+
import { DRuntimeReactiveService as o } from "./DRuntime.service.js";
|
|
7
|
+
import a from "../card/CardSection.js";
|
|
8
|
+
import { DRuntimeContent as v } from "./DRuntimeContent.js";
|
|
9
|
+
const k = (i) => {
|
|
10
|
+
const {
|
|
11
|
+
filter: m = () => !0,
|
|
12
|
+
onSetting: n,
|
|
13
|
+
onSelect: t,
|
|
14
|
+
...c
|
|
15
|
+
} = i, s = S(o), u = l(o), d = p.useMemo(() => s.values(), [u]);
|
|
16
|
+
return /* @__PURE__ */ r(f, { ...c, children: d.filter(m).map((e) => e.id && /* @__PURE__ */ r(a, { border: !0, hover: !0, onClick: () => {
|
|
17
|
+
t && t(e.id);
|
|
18
|
+
}, children: /* @__PURE__ */ r(v, { onSetting: n, runtimeId: e?.id }) }, e.id)) });
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
k as DRuntimeList
|
|
22
|
+
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
import { DRuntimeReactiveService as
|
|
1
|
+
import { DRuntimeReactiveService as t } from "./DRuntime.service.js";
|
|
2
2
|
import { DRuntimeView as m } from "./DRuntime.view.js";
|
|
3
|
+
import { DRuntimeCard as R } from "./DRuntimeCard.js";
|
|
4
|
+
import { DRuntimeList as n } from "./DRuntimeList.js";
|
|
3
5
|
export {
|
|
4
|
-
|
|
6
|
+
R as DRuntimeCard,
|
|
7
|
+
n as DRuntimeList,
|
|
8
|
+
t as DRuntimeReactiveService,
|
|
5
9
|
m as DRuntimeView
|
|
6
10
|
};
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ReactiveArrayService } from '../../utils/reactiveArrayService';
|
|
2
|
-
import { User, UsersEmailVerificationInput, UsersEmailVerificationPayload,
|
|
2
|
+
import { User, UsersEmailVerificationInput, UsersEmailVerificationPayload, UsersIdentityLinkInput, UsersIdentityLinkPayload, UsersIdentityLoginInput, UsersIdentityLoginPayload, UsersIdentityRegisterInput, UsersIdentityRegisterPayload, UsersIdentityUnlinkInput, UsersIdentityUnlinkPayload, UsersLoginInput, UsersLoginPayload, UsersLogoutInput, UsersLogoutPayload, UsersMfaBackupCodesRotateInput, UsersMfaBackupCodesRotatePayload, UsersMfaTotpGenerateSecretInput, UsersMfaTotpGenerateSecretPayload, UsersMfaTotpValidateSecretInput, UsersMfaTotpValidateSecretPayload, UsersPasswordResetInput, UsersPasswordResetPayload, UsersPasswordResetRequestInput, UsersPasswordResetRequestPayload, UsersRegisterInput, UsersRegisterPayload } from '@code0-tech/sagittarius-graphql-types';
|
|
3
3
|
import { DUserView } from './DUser.view';
|
|
4
4
|
export declare abstract class DUserReactiveService extends ReactiveArrayService<DUserView> {
|
|
5
|
-
createUserSession(payload: UserSession): void;
|
|
6
|
-
getUserSession(): UserSession | undefined;
|
|
7
5
|
getById(id: User['id']): DUserView | undefined;
|
|
8
6
|
abstract usersEmailVerification(payload: UsersEmailVerificationInput): Promise<UsersEmailVerificationPayload | undefined>;
|
|
9
7
|
abstract usersIdentityLink(payload: UsersIdentityLinkInput): Promise<UsersIdentityLinkPayload | undefined>;
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
import { ReactiveArrayService as
|
|
2
|
-
class
|
|
1
|
+
import { ReactiveArrayService as i } from "../../utils/reactiveArrayService.js";
|
|
2
|
+
class a extends i {
|
|
3
3
|
//TODO: inject UI error handler for toasts
|
|
4
4
|
//no id's need to be injected here because the root query has a users field
|
|
5
|
-
createUserSession(e) {
|
|
6
|
-
window.localStorage.setItem("ide_code-zero_session", JSON.stringify(e));
|
|
7
|
-
}
|
|
8
|
-
getUserSession() {
|
|
9
|
-
return JSON.parse(window.localStorage.getItem("ide_code-zero_session"));
|
|
10
|
-
}
|
|
11
5
|
getById(e) {
|
|
12
6
|
return this.values().find((r) => r.id === e);
|
|
13
7
|
}
|
|
14
8
|
}
|
|
15
9
|
export {
|
|
16
|
-
|
|
10
|
+
a as DUserReactiveService
|
|
17
11
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { c } from "../../_virtual/compiler-runtime.js";
|
|
2
|
+
import i from "react";
|
|
3
|
+
const a = () => {
|
|
4
|
+
const e = c.c(2), [n, r] = i.useState(void 0);
|
|
5
|
+
let s, o;
|
|
6
|
+
return e[0] === Symbol.for("react.memo_cache_sentinel") ? (s = () => {
|
|
7
|
+
const t = JSON.parse(localStorage.getItem("ide_code-zero_session"));
|
|
8
|
+
t && t.token ? r(t) : r(null);
|
|
9
|
+
}, o = [], e[0] = s, e[1] = o) : (s = e[0], o = e[1]), i.useEffect(s, o), n;
|
|
10
|
+
}, S = (e) => {
|
|
11
|
+
localStorage.setItem("ide_code-zero_session", JSON.stringify(e));
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
S as setUserSession,
|
|
15
|
+
a as useUserSession
|
|
16
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Maybe, Namespace, NamespaceMemberConnection, Scalars, User, UserIdentityConnection, UserSessionConnection } from '@code0-tech/sagittarius-graphql-types';
|
|
1
|
+
import { Maybe, Namespace, NamespaceMemberConnection, Scalars, User, UserIdentityConnection, UserSessionConnection, UserUserAbilities } from '@code0-tech/sagittarius-graphql-types';
|
|
2
2
|
export declare class DUserView {
|
|
3
3
|
/** Global admin status of the user */
|
|
4
4
|
private _admin?;
|
|
@@ -28,6 +28,8 @@ export declare class DUserView {
|
|
|
28
28
|
private readonly _updatedAt?;
|
|
29
29
|
/** Username of the user */
|
|
30
30
|
private _username?;
|
|
31
|
+
/** Abilities for the current user on this User */
|
|
32
|
+
private readonly _userAbilities?;
|
|
31
33
|
constructor(user: User);
|
|
32
34
|
get admin(): Maybe<Scalars["Boolean"]["output"]> | undefined;
|
|
33
35
|
get avatarPath(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
@@ -43,6 +45,7 @@ export declare class DUserView {
|
|
|
43
45
|
get sessions(): Maybe<UserSessionConnection> | undefined;
|
|
44
46
|
get updatedAt(): Maybe<Scalars["Time"]["output"]> | undefined;
|
|
45
47
|
get username(): Maybe<Scalars["String"]["output"]> | undefined;
|
|
48
|
+
get userAbilities(): Maybe<UserUserAbilities> | undefined;
|
|
46
49
|
set admin(value: Maybe<Scalars["Boolean"]["output"]>);
|
|
47
50
|
set email(value: Maybe<Scalars["String"]["output"]>);
|
|
48
51
|
set firstname(value: Maybe<Scalars["String"]["output"]>);
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
function i
|
|
2
|
-
return (e =
|
|
1
|
+
function t(i, e, s) {
|
|
2
|
+
return (e = r(e)) in i ? Object.defineProperty(i, e, { value: s, enumerable: !0, configurable: !0, writable: !0 }) : i[e] = s, i;
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
var e =
|
|
4
|
+
function r(i) {
|
|
5
|
+
var e = n(i, "string");
|
|
6
6
|
return typeof e == "symbol" ? e : e + "";
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
if (typeof
|
|
10
|
-
var s =
|
|
8
|
+
function n(i, e) {
|
|
9
|
+
if (typeof i != "object" || !i) return i;
|
|
10
|
+
var s = i[Symbol.toPrimitive];
|
|
11
11
|
if (s !== void 0) {
|
|
12
|
-
var a = s.call(
|
|
12
|
+
var a = s.call(i, e);
|
|
13
13
|
if (typeof a != "object") return a;
|
|
14
14
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
15
15
|
}
|
|
16
|
-
return (e === "string" ? String : Number)(
|
|
16
|
+
return (e === "string" ? String : Number)(i);
|
|
17
17
|
}
|
|
18
18
|
class m {
|
|
19
19
|
constructor(e) {
|
|
20
|
-
|
|
20
|
+
t(this, "_admin", void 0), t(this, "_avatarPath", void 0), t(this, "_createdAt", void 0), t(this, "_email", void 0), t(this, "_emailVerifiedAt", void 0), t(this, "_firstname", void 0), t(this, "_id", void 0), t(this, "_identities", void 0), t(this, "_lastname", void 0), t(this, "_namespace", void 0), t(this, "_namespaceMemberships", void 0), t(this, "_sessions", void 0), t(this, "_updatedAt", void 0), t(this, "_username", void 0), t(this, "_userAbilities", void 0), this._admin = e.admin, this._avatarPath = e.avatarPath, this._createdAt = e.createdAt, this._email = e.email, this._emailVerifiedAt = e.emailVerifiedAt, this._firstname = e.firstname, this._id = e.id, this._identities = e.identities, this._lastname = e.lastname, this._namespace = e.namespace, this._namespaceMemberships = e.namespaceMemberships, this._sessions = e.sessions, this._updatedAt = e.updatedAt, this._username = e.username, this._userAbilities = e.userAbilities;
|
|
21
21
|
}
|
|
22
22
|
get admin() {
|
|
23
23
|
return this._admin;
|
|
@@ -61,6 +61,9 @@ class m {
|
|
|
61
61
|
get username() {
|
|
62
62
|
return this._username;
|
|
63
63
|
}
|
|
64
|
+
get userAbilities() {
|
|
65
|
+
return this._userAbilities;
|
|
66
|
+
}
|
|
64
67
|
set admin(e) {
|
|
65
68
|
this._admin = e;
|
|
66
69
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { User } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
export interface DUserCardProps {
|
|
4
|
+
userId: User['id'];
|
|
5
|
+
onRemove?: (userId: User['id']) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DUserCard: React.FC<DUserCardProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as n } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import { Card as i } from "../card/Card.js";
|
|
4
|
+
import { DUserContent as c } from "./DUserContent.js";
|
|
5
|
+
const a = (s) => {
|
|
6
|
+
const r = n.c(3), {
|
|
7
|
+
userId: t,
|
|
8
|
+
onRemove: e
|
|
9
|
+
} = s;
|
|
10
|
+
let o;
|
|
11
|
+
return r[0] !== e || r[1] !== t ? (o = /* @__PURE__ */ m(i, { children: /* @__PURE__ */ m(c, { userId: t, onRemove: e }) }), r[0] = e, r[1] = t, r[2] = o) : o = r[2], o;
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
a as DUserCard
|
|
15
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { User } from '@code0-tech/sagittarius-graphql-types';
|
|
3
|
+
export interface DUserContentProps {
|
|
4
|
+
userId: User['id'];
|
|
5
|
+
onRemove?: (userId: User['id']) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const DUserContent: React.FC<DUserContentProps>;
|