@code0-tech/pictor 0.0.0-mvp.24 → 0.0.0-mvp.25
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-namespace/DNamespace.service.js +2 -2
- package/dist/components/d-organization/DOrganization.service.js +5 -5
- 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 +23 -13
- package/dist/components/d-project/index.js +16 -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 +30 -24
- package/dist/components/d-role/DNamespaceRolePermissions.js +31 -37
- package/dist/components/d-runtime/DRuntime.service.js +2 -2
- package/dist/components/d-user/DUser.service.d.ts +1 -1
- package/dist/components/d-user/DUser.service.js +9 -6
- 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
|
};
|
|
@@ -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
|
};
|
|
@@ -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>;
|
|
@@ -1,61 +1,68 @@
|
|
|
1
|
-
import { jsxs as i, jsx as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { useService as a } from "../../utils/contextStore.js";
|
|
3
|
-
import
|
|
3
|
+
import p from "react";
|
|
4
4
|
import "merge-props";
|
|
5
5
|
import { Flex as t } from "../flex/Flex.js";
|
|
6
|
-
import { DNamespaceProjectReactiveService as
|
|
7
|
-
import { Avatar as
|
|
8
|
-
import { Text as
|
|
6
|
+
import { DNamespaceProjectReactiveService as y } from "./DNamespaceProject.service.js";
|
|
7
|
+
import { Avatar as g } from "../avatar/Avatar.js";
|
|
8
|
+
import { Text as n } from "../text/Text.js";
|
|
9
9
|
import { Badge as c } from "../badge/Badge.js";
|
|
10
|
-
import { IconGitFork as
|
|
11
|
-
import { DRuntimeReactiveService as
|
|
10
|
+
import { IconGitFork as x, IconServer as v, IconServerSpark as z, IconEdit as j } from "@tabler/icons-react";
|
|
11
|
+
import { DRuntimeReactiveService as b } from "../d-runtime/DRuntime.service.js";
|
|
12
12
|
import "../../_virtual/compiler-runtime.js";
|
|
13
13
|
import '../../assets/components/card/Card.style.css';/* empty css */
|
|
14
|
-
import { Button as
|
|
15
|
-
const T = (
|
|
14
|
+
import { Button as S } from "../button/Button.js";
|
|
15
|
+
const T = (d) => {
|
|
16
16
|
const {
|
|
17
|
-
projectId:
|
|
18
|
-
onSetting:
|
|
19
|
-
}
|
|
20
|
-
|
|
17
|
+
projectId: s,
|
|
18
|
+
onSetting: u = () => {
|
|
19
|
+
},
|
|
20
|
+
minimized: o = !1
|
|
21
|
+
} = d, l = a(y), h = o ? null : a(b), r = p.useMemo(() => l.getById(s), [l, s]), m = o ? null : p.useMemo(() => r ? h.getById(r.primaryRuntime?.id) : null, [r]);
|
|
21
22
|
return /* @__PURE__ */ i(t, { align: "center", style: {
|
|
22
23
|
gap: "1.3rem"
|
|
23
24
|
}, justify: "space-between", children: [
|
|
24
25
|
/* @__PURE__ */ i(t, { align: "center", style: {
|
|
25
|
-
gap: "
|
|
26
|
+
gap: "0.7rem"
|
|
26
27
|
}, children: [
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
+
/* @__PURE__ */ e(g, { bg: "transparent", identifier: r?.name ?? "" }),
|
|
28
29
|
/* @__PURE__ */ i(t, { style: {
|
|
29
30
|
flexDirection: "column",
|
|
30
31
|
gap: "0.35rem"
|
|
31
32
|
}, children: [
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ e(n, { size: o ? "xs" : "md", hierarchy: "secondary", display: "block", children: r?.name }),
|
|
34
|
+
/* @__PURE__ */ e(n, { size: o ? "xs" : "sm", hierarchy: "tertiary", display: "block", children: r?.description })
|
|
34
35
|
] })
|
|
35
36
|
] }),
|
|
36
|
-
/* @__PURE__ */ i(t, { align: "center", style: {
|
|
37
|
+
o ? null : /* @__PURE__ */ i(t, { align: "center", style: {
|
|
37
38
|
gap: "1.3rem"
|
|
38
39
|
}, children: [
|
|
39
|
-
/* @__PURE__ */ i(t, {
|
|
40
|
-
|
|
41
|
-
|
|
40
|
+
/* @__PURE__ */ i(t, { style: {
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
gap: "0.35rem"
|
|
42
43
|
}, children: [
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
44
|
+
/* @__PURE__ */ e(n, { size: "xs", hierarchy: "tertiary", children: "Usage" }),
|
|
45
|
+
/* @__PURE__ */ i(t, { align: "center", style: {
|
|
46
|
+
gap: "0.35rem",
|
|
47
|
+
flexWrap: "wrap"
|
|
48
|
+
}, children: [
|
|
49
|
+
/* @__PURE__ */ i(c, { border: !0, children: [
|
|
50
|
+
/* @__PURE__ */ e(x, { size: 16 }),
|
|
51
|
+
/* @__PURE__ */ e(n, { size: "xs", children: r?.flows?.count ?? 0 })
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ i(c, { border: !0, children: [
|
|
54
|
+
/* @__PURE__ */ e(v, { size: 16 }),
|
|
55
|
+
/* @__PURE__ */ e(n, { size: "xs", children: r?.runtimes?.count ?? 0 })
|
|
56
|
+
] }),
|
|
57
|
+
m && /* @__PURE__ */ i(c, { border: !0, children: [
|
|
58
|
+
/* @__PURE__ */ e(z, { size: 16 }),
|
|
59
|
+
/* @__PURE__ */ e(n, { size: "xs", children: m.name })
|
|
60
|
+
] })
|
|
54
61
|
] })
|
|
55
62
|
] }),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, children: /* @__PURE__ */
|
|
63
|
+
r?.userAbilities?.deleteNamespaceProject || r?.userAbilities?.updateNamespaceProject ? /* @__PURE__ */ e(S, { color: "secondary", variant: "filled", onClick: (f) => {
|
|
64
|
+
f.stopPropagation(), u(r);
|
|
65
|
+
}, children: /* @__PURE__ */ e(j, { size: 16 }) }) : null
|
|
59
66
|
] })
|
|
60
67
|
] });
|
|
61
68
|
};
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { MenuProps } from '../menu/Menu';
|
|
3
|
-
import { Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
3
|
+
import { Namespace, Scalars } from '@code0-tech/sagittarius-graphql-types';
|
|
4
|
+
import { DNamespaceProjectView } from './DNamespaceProject.view';
|
|
4
5
|
export interface DNamespaceProjectMenuProps extends MenuProps {
|
|
5
|
-
|
|
6
|
-
|
|
6
|
+
onProjectSelect: (project: DNamespaceProjectView) => void;
|
|
7
|
+
namespaceId: Namespace["id"];
|
|
8
|
+
filter?: (project: DNamespaceProjectView, index: number) => boolean;
|
|
9
|
+
projectId?: Scalars['NamespaceProjectID']['output'];
|
|
10
|
+
children?: React.ReactNode;
|
|
7
11
|
}
|
|
8
12
|
declare const DNamespaceProjectMenu: React.FC<DNamespaceProjectMenuProps>;
|
|
9
13
|
export default DNamespaceProjectMenu;
|
|
@@ -1,18 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as e, Fragment as M } from "react/jsx-runtime";
|
|
2
2
|
import s from "react";
|
|
3
|
-
import { Menu as
|
|
4
|
-
import { DNamespaceProjectReactiveService as
|
|
5
|
-
import { useService as
|
|
6
|
-
import { Button as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { Menu as S, MenuTrigger as g, MenuPortal as v, MenuContent as x, MenuItem as P, MenuSeparator as I } from "../menu/Menu.js";
|
|
4
|
+
import { DNamespaceProjectReactiveService as d } from "./DNamespaceProject.service.js";
|
|
5
|
+
import { useService as u } from "../../utils/contextStore.js";
|
|
6
|
+
import { Button as C } from "../button/Button.js";
|
|
7
|
+
import { DNamespaceProjectContent as D } from "./DNamespaceProjectContent.js";
|
|
8
|
+
const F = (t) => {
|
|
9
|
+
const {
|
|
10
|
+
onProjectSelect: l,
|
|
11
|
+
namespaceId: n,
|
|
12
|
+
filter: p = () => !0,
|
|
13
|
+
projectId: f,
|
|
14
|
+
children: o
|
|
15
|
+
} = t, c = u(d), i = u(d), h = c.getById(f), m = s.useMemo(() => c.values({
|
|
16
|
+
namespaceId: n
|
|
17
|
+
}).filter(p), [i, n]);
|
|
18
|
+
return s.useMemo(() => /* @__PURE__ */ a(S, { ...t, children: [
|
|
19
|
+
/* @__PURE__ */ e(g, { asChild: !0, children: o || /* @__PURE__ */ e(C, { variant: "none", paddingSize: "xxs", children: h?.name }) }),
|
|
20
|
+
/* @__PURE__ */ e(v, { children: /* @__PURE__ */ e(x, { side: "bottom", align: "center", sideOffset: 8, maw: "200px", children: m.map((r, j) => /* @__PURE__ */ a(M, { children: [
|
|
21
|
+
/* @__PURE__ */ e(P, { onSelect: () => l(r), children: /* @__PURE__ */ e(D, { minimized: !0, projectId: r.id }) }, r.id),
|
|
22
|
+
j < m.length - 1 && /* @__PURE__ */ e(I, {})
|
|
23
|
+
] })) }) })
|
|
14
24
|
] }), [i]);
|
|
15
25
|
};
|
|
16
26
|
export {
|
|
17
|
-
|
|
27
|
+
F as default
|
|
18
28
|
};
|
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
import { DNamespaceProjectReactiveService as
|
|
2
|
-
import { DNamespaceProjectView as
|
|
3
|
-
import { DNamespaceProjectCard as
|
|
4
|
-
import { DNamespaceProjectList as
|
|
1
|
+
import { DNamespaceProjectReactiveService as d } from "./DNamespaceProject.service.js";
|
|
2
|
+
import { DNamespaceProjectView as C } from "./DNamespaceProject.view.js";
|
|
3
|
+
import { DNamespaceProjectCard as R } from "./DNamespaceProjectCard.js";
|
|
4
|
+
import { DNamespaceProjectList as V } from "./DNamespaceProjectList.js";
|
|
5
5
|
import "react/jsx-runtime";
|
|
6
6
|
import "react";
|
|
7
7
|
import "../../_virtual/compiler-runtime.js";
|
|
8
|
-
import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
8
|
+
import '../../assets/components/card/Card.style.css';import '../../assets/components/badge/Badge.style.css';import '../../assets/components/text/Text.style.css';import '../../assets/components/avatar/Avatar.style.css';import '../../assets/components/flex/Flex.style.css';import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
9
9
|
import "merge-props";
|
|
10
10
|
import "@radix-ui/react-dropdown-menu";
|
|
11
11
|
import "../../utils/contextStore.js";
|
|
12
12
|
import "../button/Button.js";
|
|
13
|
+
/* empty css */
|
|
14
|
+
import "js-md5";
|
|
15
|
+
/* empty css */
|
|
16
|
+
/* empty css */
|
|
17
|
+
/* empty css */
|
|
18
|
+
import "@tabler/icons-react";
|
|
19
|
+
/* empty css */
|
|
13
20
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
R as DNamespaceProjectCard,
|
|
22
|
+
V as DNamespaceProjectList,
|
|
23
|
+
d as DNamespaceProjectReactiveService,
|
|
24
|
+
C as DNamespaceProjectView
|
|
18
25
|
};
|
|
@@ -3,8 +3,8 @@ import "react";
|
|
|
3
3
|
import { ReactiveArrayService as t } from "../../utils/reactiveArrayService.js";
|
|
4
4
|
import "merge-props";
|
|
5
5
|
class s extends t {
|
|
6
|
-
getById(
|
|
7
|
-
return this.values(r).find((
|
|
6
|
+
getById(i, r) {
|
|
7
|
+
return this.values(r).find((e) => e && e.id === i);
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
export {
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e, Fragment as y } from "react/jsx-runtime";
|
|
2
2
|
import g from "react";
|
|
3
3
|
import { Flex as o } from "../flex/Flex.js";
|
|
4
|
-
import { useService as a, useStore as
|
|
4
|
+
import { useService as a, useStore as m } from "../../utils/contextStore.js";
|
|
5
5
|
import "merge-props";
|
|
6
6
|
import { DNamespaceRoleReactiveService as x } from "./DNamespaceRole.service.js";
|
|
7
7
|
import { Text as n } from "../text/Text.js";
|
|
8
8
|
import { Button as u } from "../button/Button.js";
|
|
9
9
|
import { IconFolders as G, IconUsers as H, IconSettings as J } from "@tabler/icons-react";
|
|
10
10
|
import { DNamespaceRolePermissions as K } from "./DNamespaceRolePermissions.js";
|
|
11
|
-
import { DNamespaceMemberReactiveService as
|
|
11
|
+
import { DNamespaceMemberReactiveService as f } from "../d-member/DNamespaceMember.service.js";
|
|
12
12
|
import "../../_virtual/compiler-runtime.js";
|
|
13
|
-
import { Card as
|
|
13
|
+
import { Card as b } from "../card/Card.js";
|
|
14
14
|
import { DUserReactiveService as v } from "../d-user/DUser.service.js";
|
|
15
15
|
import '../../assets/components/dialog/Dialog.style.css';import '../../assets/components/form/Input.style.css';import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
16
16
|
import "@radix-ui/react-dropdown-menu";
|
|
17
17
|
import { Avatar as S } from "../avatar/Avatar.js";
|
|
18
|
-
import { Badge as
|
|
18
|
+
import { Badge as d } from "../badge/Badge.js";
|
|
19
19
|
import p from "../card/CardSection.js";
|
|
20
20
|
import "@radix-ui/react-checkbox";
|
|
21
21
|
/* empty css */
|
|
@@ -29,20 +29,20 @@ import "@radix-ui/react-radio-group";
|
|
|
29
29
|
import "../form/SwitchInput.js";
|
|
30
30
|
import "../form/TextInput.js";
|
|
31
31
|
import { Spacing as z } from "../spacing/Spacing.js";
|
|
32
|
-
import { Tooltip as R, TooltipTrigger as A, TooltipPortal as j, TooltipContent as
|
|
32
|
+
import { Tooltip as R, TooltipTrigger as A, TooltipPortal as j, TooltipContent as D, TooltipArrow as C } from "../tooltip/Tooltip.js";
|
|
33
33
|
import "@radix-ui/react-dialog";
|
|
34
34
|
/* empty css */
|
|
35
|
-
import { DNamespaceProjectReactiveService as
|
|
36
|
-
const
|
|
35
|
+
import { DNamespaceProjectReactiveService as P } from "../d-project/DNamespaceProject.service.js";
|
|
36
|
+
const Ce = (w) => {
|
|
37
37
|
const {
|
|
38
38
|
roleId: h,
|
|
39
|
-
onSetting:
|
|
39
|
+
onSetting: I = () => {
|
|
40
40
|
},
|
|
41
|
-
onMembersViewMore:
|
|
41
|
+
onMembersViewMore: M = () => {
|
|
42
42
|
},
|
|
43
43
|
onProjectsViewMore: N = () => {
|
|
44
44
|
}
|
|
45
|
-
} =
|
|
45
|
+
} = w, T = a(x), k = m(x), B = a(P), V = m(P), F = a(f), U = m(f), W = a(v), E = m(v), i = g.useMemo(() => T.getById(h), [k, h]), s = g.useMemo(() => B.values({
|
|
46
46
|
namespaceId: i?.namespace?.id
|
|
47
47
|
}).filter((t) => i?.assignedProjects?.nodes?.map((l) => l?.id).includes(t.id)), [V, i]), c = g.useMemo(() => F.values({
|
|
48
48
|
namespaceId: i?.namespace?.id
|
|
@@ -54,7 +54,13 @@ const De = (I) => {
|
|
|
54
54
|
gap: "1.3rem"
|
|
55
55
|
}, children: [
|
|
56
56
|
/* @__PURE__ */ e(n, { size: "lg", hierarchy: "primary", display: "block", children: i?.name }),
|
|
57
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ r(o, { style: {
|
|
58
|
+
flexDirection: "column",
|
|
59
|
+
gap: "0.35rem"
|
|
60
|
+
}, children: [
|
|
61
|
+
/* @__PURE__ */ e(n, { size: "xs", hierarchy: "tertiary", children: "Permissions" }),
|
|
62
|
+
/* @__PURE__ */ e(K, { abilities: i?.abilities })
|
|
63
|
+
] })
|
|
58
64
|
] }),
|
|
59
65
|
/* @__PURE__ */ r(o, { align: "center", style: {
|
|
60
66
|
gap: "1.3rem"
|
|
@@ -68,18 +74,18 @@ const De = (I) => {
|
|
|
68
74
|
gap: "0.35rem"
|
|
69
75
|
}, children: [
|
|
70
76
|
/* @__PURE__ */ r(R, { children: [
|
|
71
|
-
/* @__PURE__ */ e(A, { asChild: !0, children: /* @__PURE__ */ r(
|
|
77
|
+
/* @__PURE__ */ e(A, { asChild: !0, children: /* @__PURE__ */ r(d, { border: !0, style: {
|
|
72
78
|
verticalAlign: "middle"
|
|
73
79
|
}, children: [
|
|
74
80
|
/* @__PURE__ */ e(G, { size: 16 }),
|
|
75
81
|
/* @__PURE__ */ e(n, { hierarchy: "tertiary", size: "xs", children: s.length })
|
|
76
82
|
] }) }),
|
|
77
|
-
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ r(
|
|
83
|
+
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ r(D, { side: "bottom", maw: "200px", children: [
|
|
78
84
|
/* @__PURE__ */ e(n, { children: "Assigned projects" }),
|
|
79
|
-
/* @__PURE__ */ e(
|
|
85
|
+
/* @__PURE__ */ e(C, {}),
|
|
80
86
|
s.length > 0 ? /* @__PURE__ */ r(y, { children: [
|
|
81
87
|
/* @__PURE__ */ e(z, { spacing: "xxs" }),
|
|
82
|
-
/* @__PURE__ */ r(
|
|
88
|
+
/* @__PURE__ */ r(b, { paddingSize: "xs", mb: -0.35, mx: -0.7, style: {
|
|
83
89
|
borderWidth: "2px"
|
|
84
90
|
}, children: [
|
|
85
91
|
s.slice(0, 1).map((t) => /* @__PURE__ */ e(p, { border: !0, children: /* @__PURE__ */ r(o, { align: "center", style: {
|
|
@@ -96,25 +102,25 @@ const De = (I) => {
|
|
|
96
102
|
] }) }, t.id)),
|
|
97
103
|
i && s.slice(1, s.length).length > 0 ? /* @__PURE__ */ e(p, { border: !0, display: "flex", p: 0.35, justify: "center", hover: !0, children: /* @__PURE__ */ r(u, { paddingSize: "xxs", variant: "none", onClick: () => N(i), children: [
|
|
98
104
|
/* @__PURE__ */ e(n, { size: "xs", children: "View more" }),
|
|
99
|
-
/* @__PURE__ */ e(
|
|
105
|
+
/* @__PURE__ */ e(d, { border: !0, children: s.slice(1, s.length).length })
|
|
100
106
|
] }) }) : null
|
|
101
107
|
] })
|
|
102
108
|
] }) : null
|
|
103
109
|
] }) })
|
|
104
110
|
] }),
|
|
105
111
|
/* @__PURE__ */ r(R, { children: [
|
|
106
|
-
/* @__PURE__ */ e(A, { asChild: !0, children: /* @__PURE__ */ r(
|
|
112
|
+
/* @__PURE__ */ e(A, { asChild: !0, children: /* @__PURE__ */ r(d, { border: !0, style: {
|
|
107
113
|
verticalAlign: "middle"
|
|
108
114
|
}, children: [
|
|
109
115
|
/* @__PURE__ */ e(H, { size: 16 }),
|
|
110
116
|
/* @__PURE__ */ e(n, { hierarchy: "tertiary", size: "xs", children: c.length })
|
|
111
117
|
] }) }),
|
|
112
|
-
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ r(
|
|
118
|
+
/* @__PURE__ */ e(j, { children: /* @__PURE__ */ r(D, { side: "bottom", maw: "200px", children: [
|
|
113
119
|
/* @__PURE__ */ e(n, { children: "Assigned members" }),
|
|
114
|
-
/* @__PURE__ */ e(
|
|
120
|
+
/* @__PURE__ */ e(C, {}),
|
|
115
121
|
c.length > 0 ? /* @__PURE__ */ r(y, { children: [
|
|
116
122
|
/* @__PURE__ */ e(z, { spacing: "xxs" }),
|
|
117
|
-
/* @__PURE__ */ r(
|
|
123
|
+
/* @__PURE__ */ r(b, { paddingSize: "xs", mb: -0.35, mx: -0.7, style: {
|
|
118
124
|
borderWidth: "2px"
|
|
119
125
|
}, children: [
|
|
120
126
|
c.slice(0, 1).map((t) => {
|
|
@@ -135,9 +141,9 @@ const De = (I) => {
|
|
|
135
141
|
] })
|
|
136
142
|
] }) }, t.id);
|
|
137
143
|
}),
|
|
138
|
-
i && c.slice(1, c.length).length > 0 ? /* @__PURE__ */ e(p, { border: !0, display: "flex", p: 0.35, justify: "center", hover: !0, children: /* @__PURE__ */ r(u, { paddingSize: "xxs", variant: "none", onClick: () =>
|
|
144
|
+
i && c.slice(1, c.length).length > 0 ? /* @__PURE__ */ e(p, { border: !0, display: "flex", p: 0.35, justify: "center", hover: !0, children: /* @__PURE__ */ r(u, { paddingSize: "xxs", variant: "none", onClick: () => M(i), children: [
|
|
139
145
|
/* @__PURE__ */ e(n, { size: "xs", children: "View more" }),
|
|
140
|
-
/* @__PURE__ */ e(
|
|
146
|
+
/* @__PURE__ */ e(d, { border: !0, children: c.length - 1 })
|
|
141
147
|
] }) }) : null
|
|
142
148
|
] })
|
|
143
149
|
] }) : null
|
|
@@ -146,11 +152,11 @@ const De = (I) => {
|
|
|
146
152
|
] })
|
|
147
153
|
] }),
|
|
148
154
|
q && /* @__PURE__ */ e(u, { color: "secondary", onClick: (t) => {
|
|
149
|
-
t.stopPropagation(),
|
|
155
|
+
t.stopPropagation(), I(i);
|
|
150
156
|
}, children: /* @__PURE__ */ e(J, { size: 16 }) })
|
|
151
157
|
] })
|
|
152
158
|
] });
|
|
153
159
|
};
|
|
154
160
|
export {
|
|
155
|
-
|
|
161
|
+
Ce as DNamespaceRoleContent
|
|
156
162
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import { Flex as
|
|
4
|
-
import { Text as
|
|
5
|
-
import { Badge as
|
|
1
|
+
import { jsx as i, jsxs as s, Fragment as l } from "react/jsx-runtime";
|
|
2
|
+
import m from "react";
|
|
3
|
+
import { Flex as A } from "../flex/Flex.js";
|
|
4
|
+
import { Text as c } from "../text/Text.js";
|
|
5
|
+
import { Badge as a } from "../badge/Badge.js";
|
|
6
6
|
import { IconCheck as T } from "@tabler/icons-react";
|
|
7
|
-
import { Tooltip as _, TooltipTrigger as u, TooltipPortal as
|
|
8
|
-
const
|
|
7
|
+
import { Tooltip as _, TooltipTrigger as u, TooltipPortal as C, TooltipContent as R, TooltipArrow as f } from "../tooltip/Tooltip.js";
|
|
8
|
+
const h = {
|
|
9
9
|
ASSIGN_MEMBER_ROLES: "members",
|
|
10
10
|
INVITE_MEMBER: "members",
|
|
11
11
|
DELETE_MEMBER: "members",
|
|
@@ -41,27 +41,27 @@ const f = {
|
|
|
41
41
|
organization: "the organization",
|
|
42
42
|
admin: "everything"
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function N(e) {
|
|
45
45
|
return e.startsWith("CREATE_") ? "create" : e.startsWith("UPDATE_") ? "update" : e.startsWith("DELETE_") ? "delete" : e.startsWith("ASSIGN_") ? "assign" : e.startsWith("READ_") ? "read" : "manage";
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function d(e) {
|
|
48
48
|
const r = Array.from(new Set(e));
|
|
49
49
|
return r.length === 1 ? r[0] : "manage";
|
|
50
50
|
}
|
|
51
51
|
function S(e) {
|
|
52
52
|
if (!e || e.length === 0) return [];
|
|
53
53
|
const r = /* @__PURE__ */ new Map();
|
|
54
|
-
for (const
|
|
55
|
-
const o =
|
|
54
|
+
for (const n of e) {
|
|
55
|
+
const o = h[n];
|
|
56
56
|
if (!o) continue;
|
|
57
57
|
const t = r.get(o) ?? [];
|
|
58
|
-
t.push(
|
|
58
|
+
t.push(n), r.set(o, t);
|
|
59
59
|
}
|
|
60
|
-
return Array.from(r.entries()).map(([
|
|
61
|
-
const t = o.map(
|
|
60
|
+
return Array.from(r.entries()).map(([n, o]) => {
|
|
61
|
+
const t = o.map(N), E = d(t);
|
|
62
62
|
return {
|
|
63
|
-
category:
|
|
64
|
-
label: p[
|
|
63
|
+
category: n,
|
|
64
|
+
label: p[n],
|
|
65
65
|
abilities: o,
|
|
66
66
|
action: E
|
|
67
67
|
};
|
|
@@ -69,41 +69,41 @@ function S(e) {
|
|
|
69
69
|
}
|
|
70
70
|
function g(e) {
|
|
71
71
|
if (e.length === 0) return "No special permissions.";
|
|
72
|
-
const r = (t) => /* @__PURE__ */ s(
|
|
72
|
+
const r = (t) => /* @__PURE__ */ s(l, { children: [
|
|
73
73
|
t.action,
|
|
74
74
|
" ",
|
|
75
75
|
/* @__PURE__ */ s(_, { children: [
|
|
76
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ i(u, { asChild: !0, children: /* @__PURE__ */ i(a, { color: "info", style: {
|
|
77
77
|
verticalAlign: "middle"
|
|
78
|
-
}, children: /* @__PURE__ */
|
|
78
|
+
}, children: /* @__PURE__ */ i(c, { style: {
|
|
79
79
|
color: "inherit"
|
|
80
80
|
}, children: t.label }) }) }),
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ i(C, { children: /* @__PURE__ */ s(R, { side: "bottom", children: [
|
|
82
|
+
/* @__PURE__ */ i(A, { style: {
|
|
83
83
|
flexDirection: "column",
|
|
84
84
|
gap: "0.25rem"
|
|
85
|
-
}, children: t.abilities.map((E) => /* @__PURE__ */ s(
|
|
85
|
+
}, children: t.abilities.map((E) => /* @__PURE__ */ s(A, { align: "center", style: {
|
|
86
86
|
gap: "0.35rem"
|
|
87
87
|
}, children: [
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ i(T, { size: 16 }),
|
|
89
|
+
/* @__PURE__ */ i(c, { size: "xs", children: E })
|
|
90
90
|
] }, E)) }),
|
|
91
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ i(f, {})
|
|
92
92
|
] }) })
|
|
93
93
|
] })
|
|
94
94
|
] });
|
|
95
95
|
if (e.length === 1) {
|
|
96
96
|
const t = e[0];
|
|
97
|
-
return /* @__PURE__ */ s(
|
|
97
|
+
return /* @__PURE__ */ s(l, { children: [
|
|
98
98
|
"Can ",
|
|
99
99
|
r(t)
|
|
100
100
|
] });
|
|
101
101
|
}
|
|
102
|
-
const
|
|
103
|
-
return /* @__PURE__ */ s(
|
|
102
|
+
const n = e.slice(0, -1), o = e[e.length - 1];
|
|
103
|
+
return /* @__PURE__ */ s(l, { children: [
|
|
104
104
|
"Can",
|
|
105
105
|
" ",
|
|
106
|
-
|
|
106
|
+
n.map((t, E) => /* @__PURE__ */ s(m.Fragment, { children: [
|
|
107
107
|
E > 0 && ", ",
|
|
108
108
|
r(t)
|
|
109
109
|
] }, t.category)),
|
|
@@ -115,14 +115,8 @@ function g(e) {
|
|
|
115
115
|
const b = (e) => {
|
|
116
116
|
const {
|
|
117
117
|
abilities: r
|
|
118
|
-
} = e,
|
|
119
|
-
return /* @__PURE__ */
|
|
120
|
-
flexDirection: "column",
|
|
121
|
-
gap: "0.35rem"
|
|
122
|
-
}, children: [
|
|
123
|
-
/* @__PURE__ */ n(l, { size: "xs", hierarchy: "tertiary", children: "Permissions" }),
|
|
124
|
-
/* @__PURE__ */ n(l, { size: "sm", hierarchy: "secondary", children: g(i) })
|
|
125
|
-
] });
|
|
118
|
+
} = e, n = m.useMemo(() => S(r), [r]);
|
|
119
|
+
return /* @__PURE__ */ i(c, { size: "sm", hierarchy: "secondary", children: g(n) });
|
|
126
120
|
};
|
|
127
121
|
export {
|
|
128
122
|
b as DNamespaceRolePermissions
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactiveArrayService } from '../../utils
|
|
1
|
+
import { ReactiveArrayService } from '../../utils';
|
|
2
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> {
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
import "../../utils/contextStore.js";
|
|
2
|
+
import "react";
|
|
1
3
|
import { ReactiveArrayService as t } from "../../utils/reactiveArrayService.js";
|
|
2
|
-
|
|
4
|
+
import "merge-props";
|
|
5
|
+
class o extends t {
|
|
3
6
|
//TODO: inject UI error handler for toasts
|
|
4
7
|
//no id's need to be injected here because the root query has a users field
|
|
5
|
-
getById(
|
|
6
|
-
return this.values().find((
|
|
8
|
+
getById(r) {
|
|
9
|
+
return this.values().find((e) => e && e.id === r);
|
|
7
10
|
}
|
|
8
|
-
getByUsername(
|
|
9
|
-
return this.values().find((
|
|
11
|
+
getByUsername(r) {
|
|
12
|
+
return this.values().find((e) => e && e.username === r);
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
export {
|
|
13
|
-
|
|
16
|
+
o as DUserReactiveService
|
|
14
17
|
};
|
|
@@ -1,67 +1,76 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { c as
|
|
3
|
-
import
|
|
4
|
-
import { Checkbox as
|
|
1
|
+
import { jsx as n, jsxs as j, Fragment as S } from "react/jsx-runtime";
|
|
2
|
+
import { c as $ } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import z from "react";
|
|
4
|
+
import { Checkbox as y, CheckboxIndicator as D } from "@radix-ui/react-checkbox";
|
|
5
5
|
import { InputLabel as F } from "./InputLabel.js";
|
|
6
6
|
import { InputDescription as L } from "./InputDescription.js";
|
|
7
|
-
import { mergeCode0Props as
|
|
7
|
+
import { mergeCode0Props as E } from "../../utils/utils.js";
|
|
8
8
|
import { InputMessage as P } from "./InputMessage.js";
|
|
9
9
|
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
10
|
-
import { IconMinus as
|
|
11
|
-
const
|
|
12
|
-
const e =
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
10
|
+
import { IconMinus as T, IconCheck as q } from "@tabler/icons-react";
|
|
11
|
+
const Y = (l) => {
|
|
12
|
+
const e = $.c(40), {
|
|
13
|
+
title: b,
|
|
14
|
+
description: _,
|
|
15
|
+
formValidation: k,
|
|
16
|
+
...N
|
|
17
|
+
} = l;
|
|
18
|
+
let x;
|
|
19
|
+
e[0] !== k ? (x = k === void 0 ? {
|
|
20
|
+
valid: !0,
|
|
21
|
+
notValidMessage: null,
|
|
22
|
+
setValue: w
|
|
23
|
+
} : k, e[0] = k, e[1] = x) : x = e[1];
|
|
24
|
+
const i = x, [t, R] = z.useState(l.initialValue ?? "indeterminate");
|
|
25
|
+
let g;
|
|
26
|
+
e[2] !== t || e[3] !== i ? (g = () => {
|
|
27
|
+
i.setValue(t);
|
|
28
|
+
}, e[2] = t, e[3] = i, e[4] = g) : g = e[4];
|
|
29
|
+
let v;
|
|
30
|
+
e[5] !== t ? (v = [t], e[5] = t, e[6] = v) : v = e[6], z.useEffect(g, v);
|
|
31
|
+
let o;
|
|
32
|
+
e[7] !== b ? (o = b ? /* @__PURE__ */ n(F, { children: b }) : null, e[7] = b, e[8] = o) : o = e[8];
|
|
33
|
+
let c;
|
|
34
|
+
e[9] !== _ ? (c = _ ? /* @__PURE__ */ n(L, { children: _ }) : null, e[9] = _, e[10] = c) : c = e[10];
|
|
35
|
+
const V = `input ${i?.valid ? "" : "input--not-valid"} checkbox-input`;
|
|
36
|
+
let s;
|
|
37
|
+
e[11] !== V ? (s = E(V, {}), e[11] = V, e[12] = s) : s = e[12];
|
|
38
|
+
let r;
|
|
39
|
+
e[13] === Symbol.for("react.memo_cache_sentinel") ? (r = () => R(A), e[13] = r) : r = e[13];
|
|
40
|
+
const I = y, M = E("checkbox-input__button", N);
|
|
41
|
+
let a;
|
|
42
|
+
e[14] !== t ? (a = t === "indeterminate" && /* @__PURE__ */ n(T, { size: 16 }), e[14] = t, e[15] = a) : a = e[15];
|
|
35
43
|
let m;
|
|
36
|
-
e[
|
|
44
|
+
e[16] !== t ? (m = t === !0 && /* @__PURE__ */ n(q, { size: 16 }), e[16] = t, e[17] = m) : m = e[17];
|
|
37
45
|
let f;
|
|
38
|
-
e[
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
f
|
|
43
|
-
] }), e[19] = m, e[20] = f, e[21] = h) : h = e[21];
|
|
46
|
+
e[18] !== a || e[19] !== m ? (f = /* @__PURE__ */ j(D, { className: "checkbox-input__indicator", children: [
|
|
47
|
+
a,
|
|
48
|
+
m
|
|
49
|
+
] }), e[18] = a, e[19] = m, e[20] = f) : f = e[20];
|
|
44
50
|
let u;
|
|
45
|
-
e[
|
|
46
|
-
let
|
|
47
|
-
e[
|
|
48
|
-
let
|
|
49
|
-
e[29] !==
|
|
51
|
+
e[21] !== I || e[22] !== t || e[23] !== f || e[24] !== M ? (u = /* @__PURE__ */ n(I, { checked: t, defaultChecked: t, ...M, children: f }), e[21] = I, e[22] = t, e[23] = f, e[24] = M, e[25] = u) : u = e[25];
|
|
52
|
+
let d;
|
|
53
|
+
e[26] !== l.label ? (d = /* @__PURE__ */ n("div", { className: "input__right input__right--action}", children: l.label }), e[26] = l.label, e[27] = d) : d = e[27];
|
|
54
|
+
let h;
|
|
55
|
+
e[28] !== u || e[29] !== d || e[30] !== s || e[31] !== r ? (h = /* @__PURE__ */ j("div", { ...s, onClick: r, children: [
|
|
50
56
|
u,
|
|
51
|
-
|
|
52
|
-
] }), e[29] =
|
|
57
|
+
d
|
|
58
|
+
] }), e[28] = u, e[29] = d, e[30] = s, e[31] = r, e[32] = h) : h = e[32];
|
|
59
|
+
let p;
|
|
60
|
+
e[33] !== i ? (p = !i?.valid && i?.notValidMessage ? /* @__PURE__ */ n(P, { children: i.notValidMessage }) : null, e[33] = i, e[34] = p) : p = e[34];
|
|
53
61
|
let C;
|
|
54
|
-
e[
|
|
55
|
-
let b;
|
|
56
|
-
return e[35] !== k || e[36] !== C || e[37] !== o || e[38] !== c ? (b = /* @__PURE__ */ v(N, { children: [
|
|
62
|
+
return e[35] !== h || e[36] !== p || e[37] !== o || e[38] !== c ? (C = /* @__PURE__ */ j(S, { children: [
|
|
57
63
|
o,
|
|
58
64
|
c,
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
] }), e[35] =
|
|
65
|
+
h,
|
|
66
|
+
p
|
|
67
|
+
] }), e[35] = h, e[36] = p, e[37] = o, e[38] = c, e[39] = C) : C = e[39], C;
|
|
62
68
|
};
|
|
63
|
-
function
|
|
69
|
+
function w(l) {
|
|
70
|
+
}
|
|
71
|
+
function A(l) {
|
|
72
|
+
return !l;
|
|
64
73
|
}
|
|
65
74
|
export {
|
|
66
|
-
|
|
75
|
+
Y as CheckboxInput
|
|
67
76
|
};
|
|
@@ -35,6 +35,7 @@ class _ {
|
|
|
35
35
|
return {
|
|
36
36
|
// @ts-ignore – z.B. wenn dein Input `defaultValue` kennt
|
|
37
37
|
defaultValue: r,
|
|
38
|
+
initialValue: r,
|
|
38
39
|
formValidation: {
|
|
39
40
|
setValue: (n) => {
|
|
40
41
|
this.changeValue(s, n);
|
|
@@ -76,15 +77,15 @@ const I = (i) => {
|
|
|
76
77
|
let d;
|
|
77
78
|
t[6] !== m || t[7] !== a || t[8] !== n ? (d = new _(P, n, a, m), t[6] = m, t[7] = a, t[8] = n, t[9] = d) : d = t[9];
|
|
78
79
|
const v = d;
|
|
79
|
-
let
|
|
80
|
-
t[10] !== s || t[11] !== a || t[12] !== n ? (
|
|
80
|
+
let V;
|
|
81
|
+
t[10] !== s || t[11] !== a || t[12] !== n ? (V = () => {
|
|
81
82
|
y(!0);
|
|
82
83
|
const g = new _(P, n, a, !1);
|
|
83
84
|
s && g.isValid() && s(n);
|
|
84
|
-
}, t[10] = s, t[11] = a, t[12] = n, t[13] =
|
|
85
|
-
const p =
|
|
86
|
-
let
|
|
87
|
-
return t[14] !== p || t[15] !== v ? (
|
|
85
|
+
}, t[10] = s, t[11] = a, t[12] = n, t[13] = V) : V = t[13];
|
|
86
|
+
const p = V;
|
|
87
|
+
let f;
|
|
88
|
+
return t[14] !== p || t[15] !== v ? (f = [v, p], t[14] = p, t[15] = v, t[16] = f) : f = t[16], f;
|
|
88
89
|
};
|
|
89
90
|
export {
|
|
90
91
|
I as useForm
|
package/dist/index.js
CHANGED
|
@@ -65,15 +65,15 @@ import { DNamespaceProjectReactiveService as tr } from "./components/d-project/D
|
|
|
65
65
|
import { DNamespaceProjectView as ir } from "./components/d-project/DNamespaceProject.view.js";
|
|
66
66
|
import { DNamespaceProjectCard as ar } from "./components/d-project/DNamespaceProjectCard.js";
|
|
67
67
|
import { DNamespaceProjectList as xr } from "./components/d-project/DNamespaceProjectList.js";
|
|
68
|
-
import {
|
|
69
|
-
import {
|
|
70
|
-
import {
|
|
71
|
-
import {
|
|
72
|
-
import {
|
|
73
|
-
import {
|
|
74
|
-
import {
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
68
|
+
import { DRuntimeReactiveService as lr } from "./components/d-runtime/DRuntime.service.js";
|
|
69
|
+
import { DRuntimeView as sr } from "./components/d-runtime/DRuntime.view.js";
|
|
70
|
+
import { DRuntimeCard as Dr } from "./components/d-runtime/DRuntimeCard.js";
|
|
71
|
+
import { DRuntimeList as Sr } from "./components/d-runtime/DRuntimeList.js";
|
|
72
|
+
import { DResizableHandle as wr, DResizablePanel as vr, DResizablePanelGroup as Cr } from "./components/d-resizable/DResizable.js";
|
|
73
|
+
import { DNamespaceRoleReactiveService as Rr } from "./components/d-role/DNamespaceRole.service.js";
|
|
74
|
+
import { DNamespaceRoleView as Tr } from "./components/d-role/DNamespaceRole.view.js";
|
|
75
|
+
import { DNamespaceRoleList as Nr } from "./components/d-role/DNamespaceRoleList.js";
|
|
76
|
+
import { DNamespaceRoleCard as Pr } from "./components/d-role/DNamespaceRoleCard.js";
|
|
77
77
|
import { Dialog as Ar, DialogClose as Lr, DialogContent as yr, DialogDescription as Or, DialogFooter as Ur, DialogHeader as Gr, DialogOverlay as jr, DialogPortal as zr, DialogTitle as Br, DialogTrigger as hr } from "./components/dialog/Dialog.js";
|
|
78
78
|
import { CheckboxInput as Hr } from "./components/form/CheckboxInput.js";
|
|
79
79
|
import { EmailInput as kr, emailValidation as _r } from "./components/form/EmailInput.js";
|
|
@@ -148,21 +148,21 @@ export {
|
|
|
148
148
|
tr as DNamespaceProjectReactiveService,
|
|
149
149
|
ir as DNamespaceProjectView,
|
|
150
150
|
He as DNamespaceReactiveService,
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
151
|
+
Pr as DNamespaceRoleCard,
|
|
152
|
+
Nr as DNamespaceRoleList,
|
|
153
|
+
Rr as DNamespaceRoleReactiveService,
|
|
154
|
+
Tr as DNamespaceRoleView,
|
|
155
155
|
ke as DNamespaceView,
|
|
156
156
|
or as DOrganizationList,
|
|
157
157
|
Qe as DOrganizationReactiveService,
|
|
158
158
|
Je as DOrganizationView,
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
159
|
+
wr as DResizableHandle,
|
|
160
|
+
vr as DResizablePanel,
|
|
161
|
+
Cr as DResizablePanelGroup,
|
|
162
|
+
Dr as DRuntimeCard,
|
|
163
|
+
Sr as DRuntimeList,
|
|
164
|
+
lr as DRuntimeReactiveService,
|
|
165
|
+
sr as DRuntimeView,
|
|
166
166
|
Qo as DUserCard,
|
|
167
167
|
Xo as DUserInput,
|
|
168
168
|
Jo as DUserList,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code0-tech/pictor",
|
|
3
|
-
"version": "0.0.0-mvp.
|
|
3
|
+
"version": "0.0.0-mvp.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A simple template for a custom React component library",
|
|
6
6
|
"scripts": {
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@vitejs/plugin-react": "^5.1.1",
|
|
52
52
|
"@vitest/browser-playwright": "^4.0.14",
|
|
53
53
|
"@vitest/coverage-v8": "^4.0.14",
|
|
54
|
-
"@xyflow/react": "^12.
|
|
54
|
+
"@xyflow/react": "^12.10.0",
|
|
55
55
|
"axe-playwright": "^2.2.2",
|
|
56
56
|
"babel-loader": "^10.0.0",
|
|
57
57
|
"babel-plugin-react-compiler": "^19.1.0-rc.3",
|