@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.
@@ -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%;box-shadow:none;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;box-shadow: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;box-shadow:none!important;align-items:center;box-sizing:border-box;gap:.35rem;padding:.35rem 0}.checkbox-input__button{aspect-ratio:1/1;width:17px;height:17px;display:flex;align-items:center;justify-content:center}.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{border-radius:1rem}.checkbox-input__indicator{position:relative;display:flex;align-items:center;justify-content:center;top:1px}.switch-input{background:transparent!important;box-shadow: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}
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 m extends t {
6
- getById(e, i) {
7
- return this.values(i).find((r) => r.id === e);
5
+ class n extends t {
6
+ getById(i, r) {
7
+ return this.values(r).find((e) => e && e.id === i);
8
8
  }
9
- getByNamespaceIdAndUserId(e, i) {
9
+ getByNamespaceIdAndUserId(i, r) {
10
10
  return this.values({
11
- namespaceId: e
12
- }).find((r) => r.namespace?.id === e && r.user?.id === i);
11
+ namespaceId: i
12
+ }).find((e) => e.namespace?.id === i && e.user?.id === r);
13
13
  }
14
14
  }
15
15
  export {
16
- m as DNamespaceMemberReactiveService
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(e) {
7
- return this.values().find((r) => r.id === e);
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 r } from "../../utils/reactiveArrayService.js";
3
+ import { ReactiveArrayService as i } from "../../utils/reactiveArrayService.js";
4
4
  import "merge-props";
5
- class n extends r {
6
- getById(e) {
7
- return this.values().find((i) => i.id === e);
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
- n as DOrganizationReactiveService
11
+ p as DOrganizationReactiveService
12
12
  };
@@ -1,12 +1,12 @@
1
1
  import "../../utils/contextStore.js";
2
2
  import "react";
3
- import { ReactiveArrayService as i } from "../../utils/reactiveArrayService.js";
3
+ import { ReactiveArrayService as t } from "../../utils/reactiveArrayService.js";
4
4
  import "merge-props";
5
- class s extends i {
6
- getById(e, r) {
7
- return this.values(r).find((t) => t.id === e);
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
- s as DNamespaceProjectReactiveService
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 r } from "react/jsx-runtime";
1
+ import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import { useService as a } from "../../utils/contextStore.js";
3
- import l from "react";
3
+ import p from "react";
4
4
  import "merge-props";
5
5
  import { Flex as t } from "../flex/Flex.js";
6
- import { DNamespaceProjectReactiveService as g } from "./DNamespaceProject.service.js";
7
- import { Avatar as h } from "../avatar/Avatar.js";
8
- import { Text as o } from "../text/Text.js";
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 f, IconServer as j, IconServerSpark as v, IconSettings as x } from "@tabler/icons-react";
11
- import { DRuntimeReactiveService as S } from "../d-runtime/DRuntime.service.js";
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 z } from "../button/Button.js";
15
- const T = (p) => {
14
+ import { Button as S } from "../button/Button.js";
15
+ const T = (d) => {
16
16
  const {
17
- projectId: n,
18
- onSetting: d = () => {
19
- }
20
- } = p, s = a(g), u = a(S), e = l.useMemo(() => s.getById(n), [s, n]), m = l.useMemo(() => e ? u.getById(e.primaryRuntime?.id) : null, [e]);
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: "1.3rem"
26
+ gap: "0.7rem"
26
27
  }, children: [
27
- /* @__PURE__ */ r(h, { bg: "transparent", identifier: e?.name ?? "" }),
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__ */ r(o, { size: "lg", hierarchy: "primary", display: "block", children: e?.name }),
33
- /* @__PURE__ */ r(o, { size: "sm", hierarchy: "tertiary", display: "block", children: e?.description })
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, { align: "center", style: {
40
- gap: "0.35rem",
41
- flexWrap: "wrap"
40
+ /* @__PURE__ */ i(t, { style: {
41
+ flexDirection: "column",
42
+ gap: "0.35rem"
42
43
  }, children: [
43
- /* @__PURE__ */ i(c, { color: "secondary", children: [
44
- /* @__PURE__ */ r(f, { size: 16 }),
45
- /* @__PURE__ */ r(o, { size: "xs", children: e?.flows?.count ?? 0 })
46
- ] }),
47
- /* @__PURE__ */ i(c, { color: "secondary", children: [
48
- /* @__PURE__ */ r(j, { size: 16 }),
49
- /* @__PURE__ */ r(o, { size: "xs", children: e?.runtimes?.count ?? 0 })
50
- ] }),
51
- m && /* @__PURE__ */ i(c, { color: "secondary", children: [
52
- /* @__PURE__ */ r(v, { size: 16 }),
53
- /* @__PURE__ */ r(o, { size: "xs", children: m.name })
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
- e?.userAbilities?.deleteNamespaceProject || e?.userAbilities?.updateNamespaceProject ? /* @__PURE__ */ r(z, { color: "secondary", onClick: (y) => {
57
- y.stopPropagation(), d(e);
58
- }, children: /* @__PURE__ */ r(x, { size: 16 }) }) : null
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
- projectId: Scalars['NamespaceProjectID']['output'];
6
- onProjectSelect: (id: Scalars['NamespaceProjectID']['output']) => void;
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 m, jsx as e } from "react/jsx-runtime";
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 u, MenuTrigger as d, MenuPortal as l, MenuContent as f, MenuItem as p } from "../menu/Menu.js";
4
- import { DNamespaceProjectReactiveService as o } from "./DNamespaceProject.service.js";
5
- import { useService as c } from "../../utils/contextStore.js";
6
- import { Button as h } from "../button/Button.js";
7
- const x = (t) => {
8
- const n = c(o), i = c(o), a = n.getById(t.projectId);
9
- return s.useMemo(() => /* @__PURE__ */ m(u, { ...t, children: [
10
- /* @__PURE__ */ e(d, { asChild: !0, children: /* @__PURE__ */ e(h, { variant: "none", style: {
11
- background: "transparent"
12
- }, children: a?.name }) }),
13
- /* @__PURE__ */ e(l, { children: /* @__PURE__ */ e(f, { side: "bottom", align: "start", sideOffset: 0, children: n.values().map((r) => /* @__PURE__ */ e(p, { onSelect: () => t.onProjectSelect(r.id), children: r.name }, r.id)) }) })
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
- x as default
27
+ F as default
18
28
  };
@@ -1,18 +1,25 @@
1
- import { DNamespaceProjectReactiveService as f } from "./DNamespaceProject.service.js";
2
- import { DNamespaceProjectView as x } from "./DNamespaceProject.view.js";
3
- import { DNamespaceProjectCard as N } from "./DNamespaceProjectCard.js";
4
- import { DNamespaceProjectList as v } from "./DNamespaceProjectList.js";
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
- N as DNamespaceProjectCard,
15
- v as DNamespaceProjectList,
16
- f as DNamespaceProjectReactiveService,
17
- x as DNamespaceProjectView
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(e, r) {
7
- return this.values(r).find((i) => i.id === e);
6
+ getById(i, r) {
7
+ return this.values(r).find((e) => e && e.id === i);
8
8
  }
9
9
  }
10
10
  export {
@@ -51,7 +51,8 @@ class u {
51
51
  id: this._id,
52
52
  name: this._name,
53
53
  namespace: this._namespace,
54
- updatedAt: this._updatedAt
54
+ updatedAt: this._updatedAt,
55
+ userAbilities: this._userAbilities
55
56
  };
56
57
  }
57
58
  }
@@ -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 d } from "../../utils/contextStore.js";
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 b } from "../d-member/DNamespaceMember.service.js";
11
+ import { DNamespaceMemberReactiveService as f } from "../d-member/DNamespaceMember.service.js";
12
12
  import "../../_virtual/compiler-runtime.js";
13
- import { Card as f } from "../card/Card.js";
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 m } from "../badge/Badge.js";
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 C, TooltipArrow as D } from "../tooltip/Tooltip.js";
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 w } from "../d-project/DNamespaceProject.service.js";
36
- const De = (I) => {
35
+ import { DNamespaceProjectReactiveService as P } from "../d-project/DNamespaceProject.service.js";
36
+ const Ce = (w) => {
37
37
  const {
38
38
  roleId: h,
39
- onSetting: M = () => {
39
+ onSetting: I = () => {
40
40
  },
41
- onMembersViewMore: P = () => {
41
+ onMembersViewMore: M = () => {
42
42
  },
43
43
  onProjectsViewMore: N = () => {
44
44
  }
45
- } = I, T = a(x), k = d(x), B = a(w), V = d(w), F = a(b), U = d(b), W = a(v), E = d(v), i = g.useMemo(() => T.getById(h), [k, h]), s = g.useMemo(() => B.values({
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__ */ e(K, { abilities: i?.abilities })
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(m, { border: !0, style: {
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(C, { side: "bottom", maw: "200px", children: [
83
+ /* @__PURE__ */ e(j, { children: /* @__PURE__ */ r(D, { side: "bottom", maw: "200px", children: [
78
84
  /* @__PURE__ */ e(n, { children: "Assigned projects" }),
79
- /* @__PURE__ */ e(D, {}),
85
+ /* @__PURE__ */ e(C, {}),
80
86
  s.length > 0 ? /* @__PURE__ */ r(y, { children: [
81
87
  /* @__PURE__ */ e(z, { spacing: "xxs" }),
82
- /* @__PURE__ */ r(f, { paddingSize: "xs", mb: -0.35, mx: -0.7, style: {
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(m, { border: !0, children: s.slice(1, s.length).length })
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(m, { border: !0, style: {
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(C, { side: "bottom", maw: "200px", children: [
118
+ /* @__PURE__ */ e(j, { children: /* @__PURE__ */ r(D, { side: "bottom", maw: "200px", children: [
113
119
  /* @__PURE__ */ e(n, { children: "Assigned members" }),
114
- /* @__PURE__ */ e(D, {}),
120
+ /* @__PURE__ */ e(C, {}),
115
121
  c.length > 0 ? /* @__PURE__ */ r(y, { children: [
116
122
  /* @__PURE__ */ e(z, { spacing: "xxs" }),
117
- /* @__PURE__ */ r(f, { paddingSize: "xs", mb: -0.35, mx: -0.7, style: {
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: () => P(i), children: [
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(m, { border: !0, children: c.length - 1 })
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(), M(i);
155
+ t.stopPropagation(), I(i);
150
156
  }, children: /* @__PURE__ */ e(J, { size: 16 }) })
151
157
  ] })
152
158
  ] });
153
159
  };
154
160
  export {
155
- De as DNamespaceRoleContent
161
+ Ce as DNamespaceRoleContent
156
162
  };
@@ -1,11 +1,11 @@
1
- import { jsxs as s, jsx as n, Fragment as c } from "react/jsx-runtime";
2
- import a from "react";
3
- import { Flex as m } from "../flex/Flex.js";
4
- import { Text as l } from "../text/Text.js";
5
- import { Badge as A } from "../badge/Badge.js";
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 h, TooltipContent as C, TooltipArrow as R } from "../tooltip/Tooltip.js";
8
- const f = {
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 d(e) {
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 N(e) {
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 i of e) {
55
- const o = f[i];
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(i), r.set(o, t);
58
+ t.push(n), r.set(o, t);
59
59
  }
60
- return Array.from(r.entries()).map(([i, o]) => {
61
- const t = o.map(d), E = N(t);
60
+ return Array.from(r.entries()).map(([n, o]) => {
61
+ const t = o.map(N), E = d(t);
62
62
  return {
63
- category: i,
64
- label: p[i],
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(c, { children: [
72
+ const r = (t) => /* @__PURE__ */ s(l, { children: [
73
73
  t.action,
74
74
  " ",
75
75
  /* @__PURE__ */ s(_, { children: [
76
- /* @__PURE__ */ n(u, { asChild: !0, children: /* @__PURE__ */ n(A, { color: "info", style: {
76
+ /* @__PURE__ */ i(u, { asChild: !0, children: /* @__PURE__ */ i(a, { color: "info", style: {
77
77
  verticalAlign: "middle"
78
- }, children: /* @__PURE__ */ n(l, { style: {
78
+ }, children: /* @__PURE__ */ i(c, { style: {
79
79
  color: "inherit"
80
80
  }, children: t.label }) }) }),
81
- /* @__PURE__ */ n(h, { children: /* @__PURE__ */ s(C, { side: "bottom", children: [
82
- /* @__PURE__ */ n(m, { style: {
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(m, { align: "center", style: {
85
+ }, children: t.abilities.map((E) => /* @__PURE__ */ s(A, { align: "center", style: {
86
86
  gap: "0.35rem"
87
87
  }, children: [
88
- /* @__PURE__ */ n(T, { size: 16 }),
89
- /* @__PURE__ */ n(l, { size: "xs", children: E })
88
+ /* @__PURE__ */ i(T, { size: 16 }),
89
+ /* @__PURE__ */ i(c, { size: "xs", children: E })
90
90
  ] }, E)) }),
91
- /* @__PURE__ */ n(R, {})
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(c, { children: [
97
+ return /* @__PURE__ */ s(l, { children: [
98
98
  "Can ",
99
99
  r(t)
100
100
  ] });
101
101
  }
102
- const i = e.slice(0, -1), o = e[e.length - 1];
103
- return /* @__PURE__ */ s(c, { children: [
102
+ const n = e.slice(0, -1), o = e[e.length - 1];
103
+ return /* @__PURE__ */ s(l, { children: [
104
104
  "Can",
105
105
  " ",
106
- i.map((t, E) => /* @__PURE__ */ s(a.Fragment, { children: [
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, i = a.useMemo(() => S(r), [r]);
119
- return /* @__PURE__ */ s(m, { style: {
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,7 +1,7 @@
1
1
  import { ReactiveArrayService as r } from "../../utils/reactiveArrayService.js";
2
2
  class c extends r {
3
- getById(e) {
4
- return this.values().find((i) => i.id === e);
3
+ getById(i) {
4
+ return this.values().find((e) => e && e.id === i);
5
5
  }
6
6
  }
7
7
  export {
@@ -1,4 +1,4 @@
1
- import { ReactiveArrayService } from '../../utils/reactiveArrayService';
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
- class a extends t {
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(e) {
6
- return this.values().find((r) => r.id === e);
8
+ getById(r) {
9
+ return this.values().find((e) => e && e.id === r);
7
10
  }
8
- getByUsername(e) {
9
- return this.values().find((r) => r.username === e);
11
+ getByUsername(r) {
12
+ return this.values().find((e) => e && e.username === r);
10
13
  }
11
14
  }
12
15
  export {
13
- a as DUserReactiveService
16
+ o as DUserReactiveService
14
17
  };
@@ -1,67 +1,76 @@
1
- import { jsx as r, jsxs as v, Fragment as N } from "react/jsx-runtime";
2
- import { c as R } from "../../_virtual/compiler-runtime.js";
3
- import $ from "react";
4
- import { Checkbox as D, CheckboxIndicator as E } from "@radix-ui/react-checkbox";
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 j } from "../../utils/utils.js";
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 S, IconCheck as T } from "@tabler/icons-react";
11
- const U = (l) => {
12
- const e = R.c(40), [i, z] = $.useState(l.initialValue ?? "indeterminate");
13
- let a, t, s, d, n, o, c;
14
- if (e[0] !== i || e[1] !== l) {
15
- const {
16
- title: g,
17
- description: x,
18
- formValidation: M,
19
- ...V
20
- } = l;
21
- t = M === void 0 ? {
22
- valid: !0,
23
- notValidMessage: null,
24
- setValue: q
25
- } : M, e[9] !== g ? (o = g ? /* @__PURE__ */ r(F, { children: g }) : null, e[9] = g, e[10] = o) : o = e[10], e[11] !== x ? (c = x ? /* @__PURE__ */ r(L, { children: x }) : null, e[11] = x, e[12] = c) : c = e[12];
26
- const I = `input ${t?.valid ? "" : "input--not-valid"} checkbox-input`;
27
- e[13] !== I ? (n = j(I, {}), e[13] = I, e[14] = n) : n = e[14], a = D, s = i, d = j("checkbox-input__button", {
28
- ...V,
29
- onCheckedChange: (_) => {
30
- V.onCheckedChange && V.onCheckedChange(_), z(_), t.setValue(_);
31
- }
32
- }), e[0] = i, e[1] = l, e[2] = a, e[3] = t, e[4] = s, e[5] = d, e[6] = n, e[7] = o, e[8] = c;
33
- } else
34
- a = e[2], t = e[3], s = e[4], d = e[5], n = e[6], o = e[7], c = e[8];
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[15] !== i ? (m = i === "indeterminate" && /* @__PURE__ */ r(S, { size: 10 }), e[15] = i, e[16] = m) : m = e[16];
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[17] !== i ? (f = i === !0 && /* @__PURE__ */ r(T, { size: 10 }), e[17] = i, e[18] = f) : f = e[18];
39
- let h;
40
- e[19] !== m || e[20] !== f ? (h = /* @__PURE__ */ v(E, { className: "checkbox-input__indicator", children: [
41
- m,
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[22] !== a || e[23] !== s || e[24] !== d || e[25] !== h ? (u = /* @__PURE__ */ r(a, { defaultChecked: s, ...d, children: h }), e[22] = a, e[23] = s, e[24] = d, e[25] = h, e[26] = u) : u = e[26];
46
- let p;
47
- e[27] !== l.label ? (p = /* @__PURE__ */ r("div", { className: "input__right input__right--action}", children: l.label }), e[27] = l.label, e[28] = p) : p = e[28];
48
- let k;
49
- e[29] !== n || e[30] !== u || e[31] !== p ? (k = /* @__PURE__ */ v("div", { ...n, children: [
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
- p
52
- ] }), e[29] = n, e[30] = u, e[31] = p, e[32] = k) : k = e[32];
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[33] !== t ? (C = !t?.valid && t?.notValidMessage ? /* @__PURE__ */ r(P, { children: t.notValidMessage }) : null, e[33] = t, e[34] = C) : C = e[34];
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
- k,
60
- C
61
- ] }), e[35] = k, e[36] = C, e[37] = o, e[38] = c, e[39] = b) : b = e[39], b;
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 q(l) {
69
+ function w(l) {
70
+ }
71
+ function A(l) {
72
+ return !l;
64
73
  }
65
74
  export {
66
- U as CheckboxInput
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 f;
80
- t[10] !== s || t[11] !== a || t[12] !== n ? (f = () => {
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] = f) : f = t[13];
85
- const p = f;
86
- let V;
87
- return t[14] !== p || t[15] !== v ? (V = [v, p], t[14] = p, t[15] = v, t[16] = V) : V = t[16], 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 { DResizableHandle as lr, DResizablePanel as cr, DResizablePanelGroup as sr } from "./components/d-resizable/DResizable.js";
69
- import { DNamespaceRoleReactiveService as Dr } from "./components/d-role/DNamespaceRole.service.js";
70
- import { DNamespaceRoleView as Sr } from "./components/d-role/DNamespaceRole.view.js";
71
- import { DNamespaceRoleList as wr } from "./components/d-role/DNamespaceRoleList.js";
72
- import { DNamespaceRoleCard as Cr } from "./components/d-role/DNamespaceRoleCard.js";
73
- import { DRuntimeReactiveService as Rr } from "./components/d-runtime/DRuntime.service.js";
74
- import { DRuntimeView as Tr } from "./components/d-runtime/DRuntime.view.js";
75
- import { DRuntimeCard as Nr } from "./components/d-runtime/DRuntimeCard.js";
76
- import { DRuntimeList as Pr } from "./components/d-runtime/DRuntimeList.js";
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
- Cr as DNamespaceRoleCard,
152
- wr as DNamespaceRoleList,
153
- Dr as DNamespaceRoleReactiveService,
154
- Sr as DNamespaceRoleView,
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
- lr as DResizableHandle,
160
- cr as DResizablePanel,
161
- sr as DResizablePanelGroup,
162
- Nr as DRuntimeCard,
163
- Pr as DRuntimeList,
164
- Rr as DRuntimeReactiveService,
165
- Tr as DRuntimeView,
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.24",
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.9.3",
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",