@code0-tech/pictor 0.0.0-mvp.24 → 0.0.0-mvp.26
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/assets/components/form/Input.style.css +1 -1
- package/dist/components/d-member/DNamespaceMember.service.js +7 -7
- package/dist/components/d-member/DNamespaceMemberContent.js +140 -92
- package/dist/components/d-namespace/DNamespace.service.js +2 -2
- package/dist/components/d-organization/DOrganization.service.js +5 -5
- package/dist/components/d-organization/DOrganizatonContent.js +23 -23
- package/dist/components/d-project/DNamespaceProject.service.js +5 -5
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +1 -0
- package/dist/components/d-project/DNamespaceProjectContent.js +42 -35
- package/dist/components/d-project/DNamespaceProjectMenu.d.ts +7 -3
- package/dist/components/d-project/DNamespaceProjectMenu.js +53 -14
- package/dist/components/d-project/index.js +17 -9
- package/dist/components/d-role/DNamespaceRole.service.js +2 -2
- package/dist/components/d-role/DNamespaceRole.view.js +2 -1
- package/dist/components/d-role/DNamespaceRoleContent.js +28 -22
- package/dist/components/d-role/DNamespaceRolePermissions.js +31 -37
- package/dist/components/d-runtime/DRuntime.service.js +2 -2
- package/dist/components/d-runtime/DRuntimeContent.js +10 -10
- package/dist/components/d-user/DUser.service.d.ts +1 -1
- package/dist/components/d-user/DUser.service.js +9 -6
- package/dist/components/d-user/DUserContent.js +9 -9
- package/dist/components/form/CheckboxInput.js +61 -52
- package/dist/components/form/useForm.js +7 -6
- package/dist/index.js +20 -20
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
.input{display:flex;z-index:1;align-items:stretch;box-sizing:border-box}.input{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box}.input:hover{background:#ffffff26}.input:active,.input:focus,.input[aria-selected=true]{background:#fff3;outline:none}.input{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;border-radius:1rem}.input:has(.input__control:focus){background:#fff3;outline:none}.input--not-valid{background:#180016;border:1px solid rgba(217,4,41,.1);color:#ffffffbf;position:relative;box-sizing:border-box}.input__syntax{position:absolute;z-index:-1;overflow:hidden;font-size:.8rem;color:#ffffff80;white-space:pre;padding:.7rem;box-sizing:border-box;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none}.input__syntax-caret{display:inline-block;width:1px;height:1rem;background:#ffffffb3;vertical-align:text-bottom;animation:caret-blink 1s steps(1) infinite;pointer-events:none}@keyframes caret-blink{0%,50%{opacity:1}50.01%,to{opacity:0}}.input__syntax-char{pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none}.input__syntax-char--selected{background:#ffffff1a;padding:4px 0}.input__syntax-block{user-select:none;-webkit-user-select:none;-moz-user-select:none}.input__syntax-block--selected{background:#ffffff1a;padding:4px 0}.input__left,.input__right{display:flex;align-items:stretch;margin:.175rem;gap:.7rem}.input__left>button,.input__right>button{height:100%;padding-left:0;padding-right:0}.input__left--action,.input__right--action{padding:0}.input__left--placeholder,.input__right--placeholder{background:#030014;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;border-radius:.825rem;padding:.7rem}.input__left{padding-left:.7rem}.input__left--icon{align-items:center}.input__right{padding-right:.7rem}.input__right--icon{align-items:center}.input__control{background:none;border:none;outline:none;padding:.7rem;flex:1;width:100%;
|
|
1
|
+
.input{display:flex;z-index:1;align-items:stretch;box-sizing:border-box}.input{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box}.input:hover{background:#ffffff26}.input:active,.input:focus,.input[aria-selected=true]{background:#fff3;outline:none}.input{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;border-radius:1rem}.input:has(.input__control:focus){background:#fff3;outline:none}.input--not-valid{background:#180016;border:1px solid rgba(217,4,41,.1);color:#ffffffbf;position:relative;box-sizing:border-box}.input__syntax{position:absolute;z-index:-1;overflow:hidden;font-size:.8rem;color:#ffffff80;white-space:pre;padding:.7rem;box-sizing:border-box;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none}.input__syntax-caret{display:inline-block;width:1px;height:1rem;background:#ffffffb3;vertical-align:text-bottom;animation:caret-blink 1s steps(1) infinite;pointer-events:none}@keyframes caret-blink{0%,50%{opacity:1}50.01%,to{opacity:0}}.input__syntax-char{pointer-events:none;user-select:none;-webkit-user-select:none;-moz-user-select:none}.input__syntax-char--selected{background:#ffffff1a;padding:4px 0}.input__syntax-block{user-select:none;-webkit-user-select:none;-moz-user-select:none}.input__syntax-block--selected{background:#ffffff1a;padding:4px 0}.input__left,.input__right{display:flex;align-items:stretch;margin:.175rem;gap:.7rem}.input__left>button,.input__right>button{height:100%;padding-left:0;padding-right:0}.input__left--action,.input__right--action{padding:0}.input__left--placeholder,.input__right--placeholder{background:#030014;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px;border-radius:.825rem;padding:.7rem}.input__left{padding-left:.7rem}.input__left--icon{align-items:center}.input__right{padding-right:.7rem}.input__right--icon{align-items:center}.input__control{background:none;border:none;outline:none;padding:.7rem;flex:1;width:100%;font-size:.8rem;box-sizing:border-box;color:#ffffff80}.input__control{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.input__control--syntax{color:transparent;caret-color:transparent}.input__control--syntax::selection{background:transparent}.input__label{text-transform:uppercase;color:#ffffff80;font-size:.7rem;display:block}.input__label{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.input__description{color:#ffffff80;font-size:.8rem;margin:.35rem 0 .7rem;display:block}.input__description{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.input__message{padding:.7rem;z-index:0;display:flex;align-items:center;font-size:.7rem;gap:.35rem;margin-top:.7rem}.input__message{background:#180016;border:1px solid rgba(217,4,41,.1);color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.input__message>svg{width:.8rem;height:.8rem}.pin-input{display:flex;justify-content:space-between;gap:.7rem;position:relative;background:transparent}.pin-input__field{flex:1;width:100%;aspect-ratio:1/1;text-align:center}.number-input::-webkit-outer-spin-button,.number-input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.number-input[type=number]{-moz-appearance:textfield}.radio-input{background:transparent!important;border:none!important;display:flex;align-items:center;box-sizing:border-box;gap:.35rem;position:relative}.radio-input__button{top:-1px;width:18px;height:18px;padding:.35rem}.radio-input__button{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.radio-input__button:active,.radio-input__button:focus,.radio-input__button[aria-selected=true]{background:#353343;outline:none}.radio-input__button{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box}.radio-input__button:disabled,.radio-input__button[data-disabled],.radio-input__button[aria-disabled=true],.radio-input__button--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.radio-input__button{border-radius:1rem}.radio-input__button[data-state=checked]{background:#353343;outline:none}.radio-input__indicator{height:100%;position:relative;display:block;aspect-ratio:1/1}.radio-input__indicator[data-state=checked]{background-color:#70ffb2}.radio-input__indicator[data-state=checked]{border-radius:1rem}.radio-button{padding:0;display:inline-flex}.checkbox-input{background:transparent!important;border:none!important;align-items:center;box-sizing:border-box;gap:.35rem;padding:.35rem 0}.checkbox-input__button{aspect-ratio:1/1;width:1.3rem;height:1.3rem;display:flex;align-items:center;justify-content:center;border-radius:.35rem;cursor:pointer}.checkbox-input__button{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.checkbox-input__button:active,.checkbox-input__button:focus,.checkbox-input__button[aria-selected=true]{background:#353343;outline:none}.checkbox-input__button{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box}.checkbox-input__button:disabled,.checkbox-input__button[data-disabled],.checkbox-input__button[aria-disabled=true],.checkbox-input__button--disabled{cursor:not-allowed;opacity:25%;pointer-events:unset}.checkbox-input__button[data-state=checked]{background:#193334;outline:none}.checkbox-input__indicator{position:relative;display:flex;align-items:center;justify-content:center;top:1px}.switch-input{background:transparent!important;border:none!important}.switch-input .input__control{position:relative;box-sizing:border-box;padding:0;width:.9rem;height:.9rem;appearance:none;outline:none;cursor:pointer;background-color:transparent;border-radius:50%}.switch-input .input__control:checked:after{-webkit-transform:translateX(22px);-ms-transform:translateX(22px);transform:translate(22px);-webkit-transition:.4s;transition:.4s}.switch-input .input__control:checked:before{background:#0e1a24;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;position:absolute;width:2.6rem;height:1.25rem}.switch-input .input__control:after{width:.9rem;height:.9rem;background-color:#fff;border-radius:50%;position:absolute;content:"";-webkit-transition:.4s;transition:.4s}.switch-input .input__control:before{content:"";z-index:-1;-webkit-transition:.4s;transition:.4s;top:-.175rem;left:-.175rem}.switch-input .input__control:before{background:#1c1a2c;border:1px solid rgba(255,255,255,.1);color:#ffffffbf;position:relative;box-sizing:border-box;border-radius:1rem;position:absolute;width:2.6rem;height:1.25rem}
|
|
@@ -2,16 +2,16 @@ import "../../utils/contextStore.js";
|
|
|
2
2
|
import "react";
|
|
3
3
|
import { ReactiveArrayService as t } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
-
class
|
|
6
|
-
getById(
|
|
7
|
-
return this.values(
|
|
5
|
+
class n extends t {
|
|
6
|
+
getById(i, r) {
|
|
7
|
+
return this.values(r).find((e) => e && e.id === i);
|
|
8
8
|
}
|
|
9
|
-
getByNamespaceIdAndUserId(
|
|
9
|
+
getByNamespaceIdAndUserId(i, r) {
|
|
10
10
|
return this.values({
|
|
11
|
-
namespaceId:
|
|
12
|
-
}).find((
|
|
11
|
+
namespaceId: i
|
|
12
|
+
}).find((e) => e.namespace?.id === i && e.user?.id === r);
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
n as DNamespaceMemberReactiveService
|
|
17
17
|
};
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as r, jsx as e, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import { Flex as
|
|
4
|
-
import { useService as
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import a from "react";
|
|
3
|
+
import { Flex as i } from "../flex/Flex.js";
|
|
4
|
+
import { useService as y, useStore as f } from "../../utils/contextStore.js";
|
|
5
5
|
import "merge-props";
|
|
6
|
-
import { DNamespaceMemberReactiveService as
|
|
7
|
-
import { DUserReactiveService as
|
|
8
|
-
import { Menu as
|
|
9
|
-
import { Avatar as
|
|
6
|
+
import { DNamespaceMemberReactiveService as M } from "./DNamespaceMember.service.js";
|
|
7
|
+
import { DUserReactiveService as I } from "../d-user/DUser.service.js";
|
|
8
|
+
import { Menu as w, MenuTrigger as T, MenuPortal as O, MenuContent as j, MenuLabel as m, MenuItem as b, MenuSeparator as _ } from "../menu/Menu.js";
|
|
9
|
+
import { Avatar as ee } from "../avatar/Avatar.js";
|
|
10
10
|
import { Text as o } from "../text/Text.js";
|
|
11
11
|
import "../../_virtual/compiler-runtime.js";
|
|
12
|
-
import { Card as
|
|
13
|
-
import { Badge as
|
|
14
|
-
import { IconTrash as
|
|
15
|
-
import { Button as
|
|
16
|
-
import
|
|
12
|
+
import { Card as v } from "../card/Card.js";
|
|
13
|
+
import { Badge as l } from "../badge/Badge.js";
|
|
14
|
+
import { IconTrash as re, IconArrowUp as B, IconArrowDown as k, IconCornerDownLeft as N, IconMailCheck as ie, IconDots as ne, IconUserOff as oe, IconUserCog as te } from "@tabler/icons-react";
|
|
15
|
+
import { Button as s } from "../button/Button.js";
|
|
16
|
+
import P from "../card/CardSection.js";
|
|
17
17
|
import "@radix-ui/react-checkbox";
|
|
18
|
-
import '../../assets/components/
|
|
18
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
19
19
|
import "../form/EmailInput.js";
|
|
20
20
|
import "../form/Input.js";
|
|
21
21
|
import "../form/InputSuggestion.js";
|
|
@@ -25,152 +25,200 @@ import "@radix-ui/react-one-time-password-field";
|
|
|
25
25
|
import "@radix-ui/react-radio-group";
|
|
26
26
|
import "../form/SwitchInput.js";
|
|
27
27
|
import "../form/TextInput.js";
|
|
28
|
-
|
|
29
|
-
import { DNamespaceRoleReactiveService as
|
|
30
|
-
import { DNamespaceRolePermissions as
|
|
31
|
-
import { Tooltip as
|
|
32
|
-
import { Dialog as
|
|
33
|
-
const
|
|
28
|
+
import { Spacing as U } from "../spacing/Spacing.js";
|
|
29
|
+
import { DNamespaceRoleReactiveService as F } from "../d-role/DNamespaceRole.service.js";
|
|
30
|
+
import { DNamespaceRolePermissions as x } from "../d-role/DNamespaceRolePermissions.js";
|
|
31
|
+
import { Tooltip as le, TooltipTrigger as se, TooltipPortal as ce, TooltipContent as ae, TooltipArrow as de } from "../tooltip/Tooltip.js";
|
|
32
|
+
import { Dialog as L, DialogPortal as W, DialogContent as Y, DialogClose as h } from "../dialog/Dialog.js";
|
|
33
|
+
const Ve = (E) => {
|
|
34
34
|
const {
|
|
35
|
-
memberId:
|
|
36
|
-
onAssignRole:
|
|
35
|
+
memberId: S,
|
|
36
|
+
onAssignRole: V = () => {
|
|
37
37
|
},
|
|
38
|
-
onRemove:
|
|
38
|
+
onRemove: q = () => {
|
|
39
39
|
}
|
|
40
|
-
} =
|
|
40
|
+
} = E, G = y(M), H = f(M), J = y(I), K = f(I), C = y(F), Q = f(F), t = a.useMemo(() => G.getById(S), [H, S]), c = a.useMemo(() => J.getById(t?.user?.id), [K, t]), p = a.useMemo(() => t?.roles?.nodes?.map((n) => C.getById(n?.id, {
|
|
41
41
|
namespaceId: t?.namespace?.id
|
|
42
|
-
})) || [], [
|
|
42
|
+
})) || [], [Q, t]), [g, z] = a.useState(p), [X, A] = a.useState(!1), [Z, R] = a.useState(!1), D = C.values({
|
|
43
43
|
namespaceId: t?.namespace?.id
|
|
44
|
-
}).filter((
|
|
45
|
-
return /* @__PURE__ */ r(
|
|
44
|
+
}).filter((n) => !g.find((d) => d?.id === n.id));
|
|
45
|
+
return /* @__PURE__ */ r(i, { align: "center", style: {
|
|
46
46
|
gap: "1.3rem"
|
|
47
47
|
}, justify: "space-between", children: [
|
|
48
|
-
/* @__PURE__ */ e(
|
|
48
|
+
/* @__PURE__ */ e(L, { open: X, onOpenChange: (n) => A(n), children: /* @__PURE__ */ e(W, { children: /* @__PURE__ */ r(Y, { showCloseButton: !0, title: "Remove member", children: [
|
|
49
49
|
/* @__PURE__ */ r(o, { size: "md", hierarchy: "secondary", children: [
|
|
50
50
|
"Are you sure you want to remove ",
|
|
51
51
|
" ",
|
|
52
|
-
/* @__PURE__ */ e(
|
|
52
|
+
/* @__PURE__ */ e(l, { color: "info", children: /* @__PURE__ */ r(o, { size: "md", style: {
|
|
53
53
|
color: "inherit"
|
|
54
54
|
}, children: [
|
|
55
55
|
"@",
|
|
56
|
-
|
|
56
|
+
c?.username
|
|
57
57
|
] }) }),
|
|
58
58
|
" ",
|
|
59
59
|
" ",
|
|
60
60
|
"from the namespace members?"
|
|
61
61
|
] }),
|
|
62
|
-
/* @__PURE__ */ r(
|
|
63
|
-
/* @__PURE__ */ e(
|
|
64
|
-
/* @__PURE__ */ e(
|
|
62
|
+
/* @__PURE__ */ r(i, { justify: "space-between", align: "center", children: [
|
|
63
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(s, { color: "secondary", children: "No, go back!" }) }),
|
|
64
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(s, { color: "error", onClick: () => q(t), children: "Yes, remove!" }) })
|
|
65
65
|
] })
|
|
66
66
|
] }) }) }),
|
|
67
|
-
/* @__PURE__ */ e(
|
|
67
|
+
/* @__PURE__ */ e(L, { open: Z, onOpenChange: (n) => R(n), children: /* @__PURE__ */ e(W, { children: /* @__PURE__ */ r(Y, { autoFocus: !0, showCloseButton: !0, title: "Assign roles", children: [
|
|
68
68
|
/* @__PURE__ */ e(o, { size: "md", hierarchy: "tertiary", children: "Assign, remove and manage the roles of a active member" }),
|
|
69
|
-
/* @__PURE__ */ r(
|
|
70
|
-
|
|
69
|
+
/* @__PURE__ */ r(v, { paddingSize: "xs", color: "secondary", children: [
|
|
70
|
+
g.map((n) => /* @__PURE__ */ e(P, { border: !0, children: /* @__PURE__ */ r(i, { style: {
|
|
71
71
|
gap: "0.7rem"
|
|
72
72
|
}, align: "center", justify: "space-between", children: [
|
|
73
|
-
/* @__PURE__ */ r(
|
|
73
|
+
/* @__PURE__ */ r(i, { align: "center", style: {
|
|
74
74
|
gap: "1.3rem"
|
|
75
75
|
}, children: [
|
|
76
|
-
/* @__PURE__ */ e(o, { hierarchy: "primary", children:
|
|
77
|
-
/* @__PURE__ */ e(
|
|
76
|
+
/* @__PURE__ */ e(o, { hierarchy: "primary", children: n?.name }),
|
|
77
|
+
/* @__PURE__ */ e(x, { abilities: n?.abilities })
|
|
78
78
|
] }),
|
|
79
|
-
/* @__PURE__ */ e(
|
|
80
|
-
|
|
81
|
-
}, children: /* @__PURE__ */ e(
|
|
82
|
-
] }) },
|
|
83
|
-
/* @__PURE__ */ r(
|
|
84
|
-
/* @__PURE__ */ e(
|
|
85
|
-
/* @__PURE__ */ e(
|
|
86
|
-
/* @__PURE__ */
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
79
|
+
/* @__PURE__ */ e(s, { color: "error", variant: "filled", paddingSize: "xxs", onClick: () => {
|
|
80
|
+
z((d) => d.filter((u) => u?.id != n?.id));
|
|
81
|
+
}, children: /* @__PURE__ */ e(re, { size: 16 }) })
|
|
82
|
+
] }) }, n?.id)),
|
|
83
|
+
/* @__PURE__ */ r(w, { children: [
|
|
84
|
+
/* @__PURE__ */ e(T, { asChild: !0, children: /* @__PURE__ */ e(P, { hover: !0, p: 0.35, border: !0, display: "flex", justify: "center", children: /* @__PURE__ */ e(s, { paddingSize: "xxs", variant: "none", children: "Assign roles" }) }) }),
|
|
85
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ r(j, { side: "bottom", sideOffset: 8, align: "center", color: "secondary", maw: "300px", children: [
|
|
86
|
+
/* @__PURE__ */ r(v, { paddingSize: "xxs", mt: -0.35, mx: -0.35, style: {
|
|
87
|
+
borderWidth: "2px"
|
|
88
|
+
}, children: [
|
|
89
|
+
/* @__PURE__ */ e(m, { children: "Roles to add" }),
|
|
90
|
+
D.map((n, d) => /* @__PURE__ */ r($, { children: [
|
|
91
|
+
/* @__PURE__ */ e(b, { onSelect: () => {
|
|
92
|
+
z((u) => [...u, n]);
|
|
93
|
+
}, children: /* @__PURE__ */ r(i, { align: "center", style: {
|
|
94
|
+
gap: "1.3rem"
|
|
95
|
+
}, children: [
|
|
96
|
+
/* @__PURE__ */ e(o, { hierarchy: "primary", children: n?.name }),
|
|
97
|
+
/* @__PURE__ */ e(x, { abilities: n?.abilities })
|
|
98
|
+
] }) }),
|
|
99
|
+
d < D.length - 1 && /* @__PURE__ */ e(_, {})
|
|
100
|
+
] }))
|
|
101
|
+
] }),
|
|
102
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ r(i, { style: {
|
|
103
|
+
gap: ".35rem"
|
|
104
|
+
}, children: [
|
|
105
|
+
/* @__PURE__ */ r(i, { align: "center", style: {
|
|
106
|
+
gap: "0.35rem"
|
|
92
107
|
}, children: [
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
108
|
+
/* @__PURE__ */ r(i, { children: [
|
|
109
|
+
/* @__PURE__ */ e(l, { border: !0, children: /* @__PURE__ */ e(B, { size: 12 }) }),
|
|
110
|
+
/* @__PURE__ */ e(l, { border: !0, children: /* @__PURE__ */ e(k, { size: 12 }) })
|
|
111
|
+
] }),
|
|
112
|
+
"move"
|
|
113
|
+
] }),
|
|
114
|
+
/* @__PURE__ */ e(U, { spacing: "xxs" }),
|
|
115
|
+
/* @__PURE__ */ r(i, { align: "center", style: {
|
|
116
|
+
gap: ".35rem"
|
|
117
|
+
}, children: [
|
|
118
|
+
/* @__PURE__ */ e(l, { border: !0, children: /* @__PURE__ */ e(N, { size: 12 }) }),
|
|
119
|
+
"insert"
|
|
120
|
+
] })
|
|
121
|
+
] }) })
|
|
98
122
|
] }) })
|
|
99
123
|
] })
|
|
100
124
|
] }),
|
|
101
|
-
/* @__PURE__ */ r(
|
|
102
|
-
/* @__PURE__ */ e(
|
|
103
|
-
/* @__PURE__ */ e(
|
|
125
|
+
/* @__PURE__ */ r(i, { justify: "space-between", align: "center", children: [
|
|
126
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(s, { color: "secondary", children: "No, go back!" }) }),
|
|
127
|
+
/* @__PURE__ */ e(h, { asChild: !0, children: /* @__PURE__ */ e(s, { onClick: () => V(t, g), color: "success", children: "Yes, save!" }) })
|
|
104
128
|
] })
|
|
105
129
|
] }) }) }),
|
|
106
|
-
/* @__PURE__ */ r(
|
|
130
|
+
/* @__PURE__ */ r(i, { style: {
|
|
107
131
|
gap: "1.3rem"
|
|
108
132
|
}, align: "center", children: [
|
|
109
|
-
/* @__PURE__ */ r(
|
|
133
|
+
/* @__PURE__ */ r(i, { align: "center", style: {
|
|
110
134
|
gap: ".7rem"
|
|
111
135
|
}, children: [
|
|
112
|
-
/* @__PURE__ */ e(
|
|
113
|
-
/* @__PURE__ */ r(
|
|
136
|
+
/* @__PURE__ */ e(ee, { identifier: c?.username, bg: "transparent" }),
|
|
137
|
+
/* @__PURE__ */ r(i, { style: {
|
|
114
138
|
flexDirection: "column",
|
|
115
139
|
gap: "0.35rem"
|
|
116
140
|
}, children: [
|
|
117
141
|
/* @__PURE__ */ r(o, { size: "md", hierarchy: "primary", children: [
|
|
118
142
|
"@",
|
|
119
|
-
|
|
143
|
+
c?.username
|
|
120
144
|
] }),
|
|
121
|
-
/* @__PURE__ */ e(o, { size: "sm", hierarchy: "tertiary", children:
|
|
145
|
+
/* @__PURE__ */ e(o, { size: "sm", hierarchy: "tertiary", children: c?.email })
|
|
122
146
|
] })
|
|
123
147
|
] }),
|
|
124
|
-
|
|
148
|
+
p.length > 0 ? /* @__PURE__ */ r(i, { style: {
|
|
125
149
|
flexDirection: "column",
|
|
126
150
|
gap: "0.35rem"
|
|
127
151
|
}, children: [
|
|
128
152
|
/* @__PURE__ */ e(o, { size: "xs", hierarchy: "tertiary", children: "Assigned roles" }),
|
|
129
|
-
/* @__PURE__ */ e(
|
|
153
|
+
/* @__PURE__ */ e(i, { align: "center", style: {
|
|
130
154
|
gap: "0.35rem"
|
|
131
|
-
}, children:
|
|
132
|
-
/* @__PURE__ */ e(
|
|
155
|
+
}, children: p.map((n) => /* @__PURE__ */ r(le, { children: [
|
|
156
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: /* @__PURE__ */ e(l, { color: "info", children: /* @__PURE__ */ e(o, { style: {
|
|
133
157
|
color: "inherit"
|
|
134
|
-
}, hierarchy: "tertiary", children:
|
|
135
|
-
/* @__PURE__ */ e(
|
|
136
|
-
/* @__PURE__ */ e(
|
|
137
|
-
/* @__PURE__ */ e(
|
|
158
|
+
}, hierarchy: "tertiary", children: n?.name }) }) }),
|
|
159
|
+
/* @__PURE__ */ e(ce, { children: /* @__PURE__ */ r(ae, { side: "bottom", children: [
|
|
160
|
+
/* @__PURE__ */ e(x, { abilities: n?.abilities }),
|
|
161
|
+
/* @__PURE__ */ e(de, {})
|
|
138
162
|
] }) })
|
|
139
163
|
] })) })
|
|
140
164
|
] }) : null
|
|
141
165
|
] }),
|
|
142
|
-
/* @__PURE__ */ r(
|
|
166
|
+
/* @__PURE__ */ r(i, { align: "center", style: {
|
|
143
167
|
gap: "1.3rem"
|
|
144
168
|
}, children: [
|
|
145
|
-
/* @__PURE__ */ e(
|
|
169
|
+
/* @__PURE__ */ e(i, { style: {
|
|
146
170
|
flexDirection: "column",
|
|
147
171
|
gap: "0.35rem"
|
|
148
|
-
}, children: /* @__PURE__ */ r(
|
|
172
|
+
}, children: /* @__PURE__ */ r(i, { style: {
|
|
149
173
|
gap: "0.35rem"
|
|
150
174
|
}, align: "center", children: [
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
/* @__PURE__ */ e(
|
|
175
|
+
c?.admin ? /* @__PURE__ */ e(l, { border: !0, color: "primary", children: /* @__PURE__ */ e(o, { hierarchy: "tertiary", children: "Owner" }) }) : null,
|
|
176
|
+
c?.emailVerifiedAt ? /* @__PURE__ */ r(l, { border: !0, color: "primary", children: [
|
|
177
|
+
/* @__PURE__ */ e(ie, { size: 16 }),
|
|
154
178
|
/* @__PURE__ */ e(o, { hierarchy: "tertiary", children: "Email verified" })
|
|
155
179
|
] }) : null
|
|
156
180
|
] }) }),
|
|
157
|
-
t?.userAbilities?.deleteMember || t?.userAbilities?.assignMemberRoles ? /* @__PURE__ */ r(
|
|
158
|
-
/* @__PURE__ */ e(
|
|
159
|
-
/* @__PURE__ */ e(
|
|
160
|
-
/* @__PURE__ */
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
/* @__PURE__ */ e(
|
|
181
|
+
t?.userAbilities?.deleteMember || t?.userAbilities?.assignMemberRoles ? /* @__PURE__ */ r(w, { children: [
|
|
182
|
+
/* @__PURE__ */ e(T, { asChild: !0, children: /* @__PURE__ */ e(s, { variant: "filled", color: "secondary", children: /* @__PURE__ */ e(ne, { size: 16 }) }) }),
|
|
183
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ r(j, { align: "end", side: "bottom", sideOffset: 8, color: "secondary", children: [
|
|
184
|
+
/* @__PURE__ */ r(v, { paddingSize: "xxs", mt: -0.35, mx: -0.35, style: {
|
|
185
|
+
borderWidth: "2px"
|
|
186
|
+
}, children: [
|
|
187
|
+
/* @__PURE__ */ e(m, { children: "Actions" }),
|
|
188
|
+
t?.userAbilities?.deleteMember && /* @__PURE__ */ r(b, { onSelect: () => A(!0), children: [
|
|
189
|
+
/* @__PURE__ */ e(oe, { size: 16 }),
|
|
190
|
+
/* @__PURE__ */ e(o, { children: "Remove member" })
|
|
191
|
+
] }),
|
|
192
|
+
t?.userAbilities?.assignMemberRoles && /* @__PURE__ */ r(b, { onSelect: () => R(!0), children: [
|
|
193
|
+
/* @__PURE__ */ e(te, { size: 16 }),
|
|
194
|
+
/* @__PURE__ */ e(o, { children: "Assign role" })
|
|
195
|
+
] })
|
|
164
196
|
] }),
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
197
|
+
/* @__PURE__ */ e(m, { children: /* @__PURE__ */ r(i, { style: {
|
|
198
|
+
gap: ".35rem"
|
|
199
|
+
}, children: [
|
|
200
|
+
/* @__PURE__ */ r(i, { align: "center", style: {
|
|
201
|
+
gap: "0.35rem"
|
|
202
|
+
}, children: [
|
|
203
|
+
/* @__PURE__ */ r(i, { children: [
|
|
204
|
+
/* @__PURE__ */ e(l, { border: !0, children: /* @__PURE__ */ e(B, { size: 12 }) }),
|
|
205
|
+
/* @__PURE__ */ e(l, { border: !0, children: /* @__PURE__ */ e(k, { size: 12 }) })
|
|
206
|
+
] }),
|
|
207
|
+
"move"
|
|
208
|
+
] }),
|
|
209
|
+
/* @__PURE__ */ e(U, { spacing: "xxs" }),
|
|
210
|
+
/* @__PURE__ */ r(i, { align: "center", style: {
|
|
211
|
+
gap: ".35rem"
|
|
212
|
+
}, children: [
|
|
213
|
+
/* @__PURE__ */ e(l, { border: !0, children: /* @__PURE__ */ e(N, { size: 12 }) }),
|
|
214
|
+
"perform"
|
|
215
|
+
] })
|
|
216
|
+
] }) })
|
|
169
217
|
] }) })
|
|
170
218
|
] }) : null
|
|
171
219
|
] })
|
|
172
220
|
] });
|
|
173
221
|
};
|
|
174
222
|
export {
|
|
175
|
-
|
|
223
|
+
Ve as DNamespaceMemberContent
|
|
176
224
|
};
|
|
@@ -3,8 +3,8 @@ import "react";
|
|
|
3
3
|
import { ReactiveArrayService as i } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
5
|
class p extends i {
|
|
6
|
-
getById(
|
|
7
|
-
return this.values().find((
|
|
6
|
+
getById(r) {
|
|
7
|
+
return this.values().find((e) => e && e.id === r);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../../utils/contextStore.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { ReactiveArrayService as
|
|
3
|
+
import { ReactiveArrayService as i } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
-
class
|
|
6
|
-
getById(
|
|
7
|
-
return this.values().find((
|
|
5
|
+
class p extends i {
|
|
6
|
+
getById(r) {
|
|
7
|
+
return this.values().find((e) => e && e.id === r);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
p as DOrganizationReactiveService
|
|
12
12
|
};
|
|
@@ -3,18 +3,18 @@ import n from "react";
|
|
|
3
3
|
import { useStore as c, useService as s } from "../../utils/contextStore.js";
|
|
4
4
|
import "merge-props";
|
|
5
5
|
import { Text as m } from "../text/Text.js";
|
|
6
|
-
import { DOrganizationReactiveService as
|
|
7
|
-
import {
|
|
8
|
-
import { Flex as
|
|
9
|
-
import { Button as
|
|
6
|
+
import { DOrganizationReactiveService as v } from "./DOrganization.service.js";
|
|
7
|
+
import { IconFolders as k, IconUsers as L, IconServer as N, IconEdit as w, IconLogout as F } from "@tabler/icons-react";
|
|
8
|
+
import { Flex as t } from "../flex/Flex.js";
|
|
9
|
+
import { Button as S } from "../button/Button.js";
|
|
10
10
|
import { Spacing as P } from "../spacing/Spacing.js";
|
|
11
|
-
import { Avatar as
|
|
12
|
-
import { DUserReactiveService as
|
|
11
|
+
import { Avatar as E } from "../avatar/Avatar.js";
|
|
12
|
+
import { DUserReactiveService as b } from "../d-user/DUser.service.js";
|
|
13
13
|
import "../../_virtual/compiler-runtime.js";
|
|
14
14
|
import '../../assets/components/dialog/Dialog.style.css';import '../../assets/components/tooltip/Tooltip.style.css';import '../../assets/components/form/Input.style.css';import '../../assets/components/card/Card.style.css';import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
15
15
|
import "@radix-ui/react-dropdown-menu";
|
|
16
16
|
/* empty css */
|
|
17
|
-
import { useUserSession as
|
|
17
|
+
import { useUserSession as T } from "../d-user/DUser.session.hook.js";
|
|
18
18
|
import { Badge as d } from "../badge/Badge.js";
|
|
19
19
|
import "@radix-ui/react-checkbox";
|
|
20
20
|
/* empty css */
|
|
@@ -27,7 +27,7 @@ import "@radix-ui/react-one-time-password-field";
|
|
|
27
27
|
import "@radix-ui/react-radio-group";
|
|
28
28
|
import "../form/SwitchInput.js";
|
|
29
29
|
import "../form/TextInput.js";
|
|
30
|
-
import { DNamespaceReactiveService as
|
|
30
|
+
import { DNamespaceReactiveService as z } from "../d-namespace/DNamespace.service.js";
|
|
31
31
|
import { DNamespaceMemberReactiveService as x } from "../d-member/DNamespaceMember.service.js";
|
|
32
32
|
import "@radix-ui/react-tooltip";
|
|
33
33
|
/* empty css */
|
|
@@ -40,39 +40,39 @@ const Ie = (I) => {
|
|
|
40
40
|
},
|
|
41
41
|
onSetting: j = () => {
|
|
42
42
|
}
|
|
43
|
-
} = I, B = c(
|
|
44
|
-
return /* @__PURE__ */ i(
|
|
43
|
+
} = I, B = c(v), C = s(v), D = c(z), $ = s(z), A = c(x), R = s(x), U = s(b), O = c(b), u = T(), p = n.useMemo(() => U.getById(u?.user?.id), [O, u]), r = n.useMemo(() => a ? C.getById(a) : null, [B, a]), o = n.useMemo(() => r ? $.getById(r.namespace?.id) : null, [D, r]), g = n.useMemo(() => o && p ? R.getByNamespaceIdAndUserId(o.id, p.id) : null, [A, o, p]), h = o?.projects?.count, y = o?.members?.count, f = o?.runtimes?.count;
|
|
44
|
+
return /* @__PURE__ */ i(t, { align: "center", style: {
|
|
45
45
|
gap: "1.3rem"
|
|
46
46
|
}, justify: "space-between", children: [
|
|
47
|
-
/* @__PURE__ */ i(
|
|
47
|
+
/* @__PURE__ */ i(t, { align: "center", style: {
|
|
48
48
|
gap: "1.3rem"
|
|
49
49
|
}, children: [
|
|
50
|
-
/* @__PURE__ */ e(
|
|
51
|
-
/* @__PURE__ */ i(
|
|
50
|
+
/* @__PURE__ */ e(E, { bg: "transparent", identifier: r?.name ?? "" }),
|
|
51
|
+
/* @__PURE__ */ i(t, { style: {
|
|
52
52
|
flexDirection: "column"
|
|
53
53
|
}, children: [
|
|
54
54
|
/* @__PURE__ */ e(m, { size: "lg", hierarchy: "primary", display: "block", children: r?.name }),
|
|
55
55
|
/* @__PURE__ */ e(P, { spacing: "xxs" }),
|
|
56
|
-
/* @__PURE__ */ i(
|
|
56
|
+
/* @__PURE__ */ i(t, { align: "center", style: {
|
|
57
57
|
gap: "0.35rem",
|
|
58
58
|
flexWrap: "wrap"
|
|
59
59
|
}, children: [
|
|
60
|
-
/* @__PURE__ */ e(d, {
|
|
60
|
+
/* @__PURE__ */ e(d, { border: !0, children: /* @__PURE__ */ i(t, { align: "center", style: {
|
|
61
61
|
gap: "0.35rem"
|
|
62
62
|
}, children: [
|
|
63
63
|
/* @__PURE__ */ e(k, { size: 16 }),
|
|
64
|
-
/* @__PURE__ */ e(m, { size: "xs", hierarchy: "tertiary", children: `${
|
|
64
|
+
/* @__PURE__ */ e(m, { size: "xs", hierarchy: "tertiary", children: `${h ?? 0} project${(h ?? 0) !== 1 ? "s" : ""}` })
|
|
65
65
|
] }) }),
|
|
66
|
-
/* @__PURE__ */ e(d, {
|
|
66
|
+
/* @__PURE__ */ e(d, { border: !0, children: /* @__PURE__ */ i(t, { align: "center", style: {
|
|
67
67
|
gap: "0.35rem"
|
|
68
68
|
}, children: [
|
|
69
69
|
/* @__PURE__ */ e(L, { size: 16 }),
|
|
70
70
|
/* @__PURE__ */ i(m, { size: "xs", hierarchy: "tertiary", children: [
|
|
71
71
|
" ",
|
|
72
|
-
`${
|
|
72
|
+
`${y ?? 0} member${(y ?? 0) !== 1 ? "s" : ""}`
|
|
73
73
|
] })
|
|
74
74
|
] }) }),
|
|
75
|
-
/* @__PURE__ */ e(d, {
|
|
75
|
+
/* @__PURE__ */ e(d, { border: !0, children: /* @__PURE__ */ i(t, { align: "center", style: {
|
|
76
76
|
gap: "0.35rem"
|
|
77
77
|
}, children: [
|
|
78
78
|
/* @__PURE__ */ e(N, { size: 16 }),
|
|
@@ -81,13 +81,13 @@ const Ie = (I) => {
|
|
|
81
81
|
] })
|
|
82
82
|
] })
|
|
83
83
|
] }),
|
|
84
|
-
/* @__PURE__ */ i(
|
|
85
|
-
gap: "0.
|
|
84
|
+
/* @__PURE__ */ i(t, { align: "center", style: {
|
|
85
|
+
gap: "0.7rem"
|
|
86
86
|
}, children: [
|
|
87
|
-
r?.userAbilities?.deleteOrganization || r?.userAbilities?.updateOrganization ? /* @__PURE__ */ e(
|
|
87
|
+
r?.userAbilities?.deleteOrganization || r?.userAbilities?.updateOrganization ? /* @__PURE__ */ e(S, { variant: "filled", color: "secondary", onClick: (l) => {
|
|
88
88
|
l.stopPropagation(), j(r);
|
|
89
89
|
}, children: /* @__PURE__ */ e(w, { size: 16 }) }) : null,
|
|
90
|
-
|
|
90
|
+
g && g.userAbilities?.deleteMember ? /* @__PURE__ */ i(S, { variant: "filled", color: "error", onClick: (l) => {
|
|
91
91
|
l.stopPropagation(), r && M(r);
|
|
92
92
|
}, children: [
|
|
93
93
|
/* @__PURE__ */ e(F, { size: 16 }),
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import "../../utils/contextStore.js";
|
|
2
2
|
import "react";
|
|
3
|
-
import { ReactiveArrayService as
|
|
3
|
+
import { ReactiveArrayService as t } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
|
-
class
|
|
6
|
-
getById(
|
|
7
|
-
return this.values(
|
|
5
|
+
class p extends t {
|
|
6
|
+
getById(r, i) {
|
|
7
|
+
return this.values(i).find((e) => e && e.id === r);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
p as DNamespaceProjectReactiveService
|
|
12
12
|
};
|
|
@@ -5,5 +5,6 @@ import { DNamespaceProjectView } from './DNamespaceProject.view';
|
|
|
5
5
|
export interface DNamespaceProjectContentProps extends Code0Component<HTMLDivElement> {
|
|
6
6
|
projectId: NamespaceProject["id"];
|
|
7
7
|
onSetting?: (project: DNamespaceProjectView) => void;
|
|
8
|
+
minimized?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare const DNamespaceProjectContent: React.FC<DNamespaceProjectContentProps>;
|