@code0-tech/pictor 0.0.0-mvp.23 → 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.
Files changed (36) hide show
  1. package/dist/assets/components/aurora/Aurora.style.css +1 -0
  2. package/dist/assets/components/form/Input.style.css +1 -1
  3. package/dist/components/aurora/Aurora.d.ts +5 -0
  4. package/dist/components/aurora/Aurora.js +23 -0
  5. package/dist/components/d-flow/DFlow.view.d.ts +6 -2
  6. package/dist/components/d-flow/DFlow.view.js +52 -17
  7. package/dist/components/d-flow/control/DFlowControl.js +38 -38
  8. package/dist/components/d-flow/data-type/DFlowDataType.service.js +1 -1
  9. package/dist/components/d-flow/export/DFlowExport.d.ts +6 -0
  10. package/dist/components/d-flow/export/DFlowExport.js +24 -0
  11. package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +1 -1
  12. package/dist/components/d-flow/type/DFlowType.view.d.ts +1 -1
  13. package/dist/components/d-member/DNamespaceMember.service.js +7 -7
  14. package/dist/components/d-namespace/DNamespace.service.js +2 -2
  15. package/dist/components/d-organization/DOrganization.service.js +5 -5
  16. package/dist/components/d-project/DNamespaceProject.service.js +5 -5
  17. package/dist/components/d-project/DNamespaceProjectContent.d.ts +1 -0
  18. package/dist/components/d-project/DNamespaceProjectContent.js +42 -35
  19. package/dist/components/d-project/DNamespaceProjectMenu.d.ts +7 -3
  20. package/dist/components/d-project/DNamespaceProjectMenu.js +23 -13
  21. package/dist/components/d-project/index.js +16 -9
  22. package/dist/components/d-role/DNamespaceRole.service.js +2 -2
  23. package/dist/components/d-role/DNamespaceRole.view.js +2 -1
  24. package/dist/components/d-role/DNamespaceRoleContent.js +30 -24
  25. package/dist/components/d-role/DNamespaceRolePermissions.js +31 -37
  26. package/dist/components/d-runtime/DRuntime.service.js +2 -2
  27. package/dist/components/d-user/DUser.service.d.ts +1 -1
  28. package/dist/components/d-user/DUser.service.js +9 -6
  29. package/dist/components/d-user/DUserInput.d.ts +2 -0
  30. package/dist/components/d-user/DUserInput.js +21 -20
  31. package/dist/components/form/CheckboxInput.js +61 -52
  32. package/dist/components/form/useForm.js +7 -6
  33. package/dist/index.d.ts +1 -0
  34. package/dist/index.js +256 -254
  35. package/dist/utils/generics.js +1 -1
  36. package/package.json +4 -4
@@ -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,5 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { TextInputProps } from '../form';
3
+ import { DUserView } from './DUser.view';
3
4
  export interface DUserInputProps extends TextInputProps {
5
+ filter?: (user: DUserView, index: number) => boolean;
4
6
  }
5
7
  export declare const DUserInput: React.FC<DUserInputProps>;
@@ -1,9 +1,9 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import v from "react";
2
+ import x from "react";
3
3
  import "../../_virtual/compiler-runtime.js";
4
4
  import "@radix-ui/react-checkbox";
5
5
  import "merge-props";
6
- import { IconArrowUp as x, IconArrowDown as S, IconCornerDownLeft as b } from "@tabler/icons-react";
6
+ import { IconArrowUp as S, IconArrowDown as b, IconCornerDownLeft as I } from "@tabler/icons-react";
7
7
  import '../../assets/components/form/Input.style.css';/* empty css */
8
8
  import "../form/EmailInput.js";
9
9
  import "../form/Input.js";
@@ -13,18 +13,19 @@ import "../form/PasswordInput.js";
13
13
  import "@radix-ui/react-one-time-password-field";
14
14
  import "@radix-ui/react-radio-group";
15
15
  import "../form/SwitchInput.js";
16
- import { TextInput as I } from "../form/TextInput.js";
16
+ import { TextInput as L } from "../form/TextInput.js";
17
17
  import { Badge as m } from "../badge/Badge.js";
18
18
  import { Text as l } from "../text/Text.js";
19
- import { useService as L, useStore as U } from "../../utils/contextStore.js";
19
+ import { useService as U, useStore as D } from "../../utils/contextStore.js";
20
20
  import { DUserReactiveService as g } from "./DUser.service.js";
21
- import { MenuLabel as D, MenuItem as w } from "../menu/Menu.js";
21
+ import { MenuLabel as w, MenuItem as z } from "../menu/Menu.js";
22
22
  import { Flex as s } from "../flex/Flex.js";
23
- import { Spacing as z } from "../spacing/Spacing.js";
24
- const $ = (p) => {
23
+ import { Spacing as B } from "../spacing/Spacing.js";
24
+ const P = (p) => {
25
25
  const {
26
- ...h
27
- } = p, u = L(g), d = U(g), f = v.useMemo(() => u.values().map((r) => ({
26
+ filter: h = () => !0,
27
+ ...d
28
+ } = p, u = U(g), f = D(g), y = x.useMemo(() => u.values().filter(h).map((r) => ({
28
29
  value: r.username || "",
29
30
  children: /* @__PURE__ */ o(s, { align: "end", style: {
30
31
  gap: "0.35rem"
@@ -35,31 +36,31 @@ const $ = (p) => {
35
36
  insertMode: "insert",
36
37
  valueData: r,
37
38
  groupBy: "Users"
38
- })), [d]);
39
- return /* @__PURE__ */ e(I, { placeholder: "Enter users", suggestionsEmptyState: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ e(l, { children: "No user found" }) }), onLastTokenChange: (r) => {
39
+ })), [f]);
40
+ return /* @__PURE__ */ e(L, { placeholder: "Enter users", suggestionsEmptyState: /* @__PURE__ */ e(z, { children: /* @__PURE__ */ e(l, { children: "No user found" }) }), onLastTokenChange: (r) => {
40
41
  u.getByUsername(r);
41
- }, suggestionsFooter: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ o(s, { style: {
42
+ }, suggestionsFooter: /* @__PURE__ */ e(w, { children: /* @__PURE__ */ o(s, { style: {
42
43
  gap: ".35rem"
43
44
  }, children: [
44
45
  /* @__PURE__ */ o(s, { align: "center", style: {
45
46
  gap: "0.35rem"
46
47
  }, children: [
47
48
  /* @__PURE__ */ o(s, { children: [
48
- /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(x, { size: 12 }) }),
49
- /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(S, { size: 12 }) })
49
+ /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(S, { size: 12 }) }),
50
+ /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(b, { size: 12 }) })
50
51
  ] }),
51
52
  "move"
52
53
  ] }),
53
- /* @__PURE__ */ e(z, { spacing: "xxs" }),
54
+ /* @__PURE__ */ e(B, { spacing: "xxs" }),
54
55
  /* @__PURE__ */ o(s, { align: "center", style: {
55
56
  gap: ".35rem"
56
57
  }, children: [
57
- /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(b, { size: 12 }) }),
58
+ /* @__PURE__ */ e(m, { border: !0, children: /* @__PURE__ */ e(I, { size: 12 }) }),
58
59
  "insert"
59
60
  ] })
60
61
  ] }) }), filterSuggestionsByLastToken: !0, enforceUniqueSuggestions: !0, transformSyntax: (r, a = []) => {
61
62
  let t = 0;
62
- return a.map((i, y) => {
63
+ return a.map((i, v) => {
63
64
  if (typeof i == "object") {
64
65
  const c = {
65
66
  type: "block",
@@ -77,7 +78,7 @@ const $ = (p) => {
77
78
  }
78
79
  const n = i ?? "";
79
80
  if (n.length) {
80
- if (y == a.length - 1) {
81
+ if (v == a.length - 1) {
81
82
  const c = {
82
83
  type: "text",
83
84
  start: t,
@@ -90,8 +91,8 @@ const $ = (p) => {
90
91
  return t += n.length, {};
91
92
  }
92
93
  });
93
- }, ...h, suggestions: f });
94
+ }, ...d, suggestions: y });
94
95
  };
95
96
  export {
96
- $ as DUserInput
97
+ P as DUserInput
97
98
  };