@code0-tech/pictor 0.0.0-mvp.2 → 0.0.0-mvp.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/compiler-runtime.js +5 -0
- package/dist/_virtual/compiler-runtime2.js +4 -0
- package/dist/_virtual/react-compiler-runtime.development.js +4 -0
- package/dist/_virtual/react-compiler-runtime.production.js +4 -0
- package/dist/assets/components/alert/Alert.style.css +1 -0
- package/dist/assets/components/avatar/Avatar.style.css +1 -0
- package/dist/assets/components/badge/Badge.style.css +1 -0
- package/dist/assets/components/button/Button.style.css +1 -0
- package/dist/assets/components/card/Card.style.css +1 -0
- package/dist/assets/components/command/Command.style.css +1 -0
- package/dist/assets/components/d-flow/DFlow.style.css +1 -0
- package/dist/assets/components/d-flow/folder/DFlowFolder.style.css +1 -0
- package/dist/assets/components/d-flow/function/DFlowFunctionDefaultCard.style.css +1 -0
- package/dist/assets/components/d-flow/input/DFlowInputDataType.style.css +1 -0
- package/dist/assets/components/d-flow/minimap/DFlowMiniMap.style.css +1 -0
- package/dist/assets/components/d-flow/validation/DFlowValidation.style.css +1 -0
- package/dist/assets/components/d-layout/DLayout.style.css +1 -0
- package/dist/assets/components/d-resizable/DResizable.style.css +1 -0
- package/dist/assets/components/dialog/Dialog.style.css +1 -0
- package/dist/assets/components/file-tabs/FileTabs.style.css +1 -0
- package/dist/assets/components/form/Input.style.css +1 -0
- package/dist/assets/components/menu/Menu.style.css +1 -0
- package/dist/assets/{ScrollArea.css → components/scroll-area/ScrollArea.style.css} +1 -1
- package/dist/assets/components/segmented-control/SegmentedControl.style.css +1 -0
- package/dist/assets/components/spacing/Spacing.style.css +1 -0
- package/dist/assets/components/tab/Tab.style.css +1 -0
- package/dist/assets/components/text/Text.style.css +1 -0
- package/dist/assets/components/toast/Toast.style.css +1 -0
- package/dist/assets/components/tooltip/Tooltip.style.css +1 -0
- package/dist/assets/{DFlow.css → node_modules/@xyflow/react/dist/style.css} +1 -1
- package/dist/components/alert/Alert.d.ts +7 -0
- package/dist/components/alert/Alert.js +38 -0
- package/dist/components/avatar/Avatar.js +2 -2
- package/dist/components/badge/Badge.js +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js +16 -28
- package/dist/components/button/Button.d.ts +2 -1
- package/dist/components/button/Button.js +23 -20
- package/dist/components/button-group/ButtonGroup.js +6 -5
- package/dist/components/card/Card.d.ts +2 -1
- package/dist/components/card/Card.js +25 -22
- package/dist/components/card/CardSection.d.ts +1 -0
- package/dist/components/card/CardSection.js +18 -12
- package/dist/components/col/Col.js +9 -8
- package/dist/components/command/Command.js +19 -18
- package/dist/components/container/Container.js +12 -11
- package/dist/components/d-flow/DFlow.edges.hook.js +9 -10
- package/dist/components/d-flow/DFlow.js +6 -4
- package/dist/components/d-flow/DFlow.nodes.hook.js +18 -19
- package/dist/components/d-flow/control/DFlowControl.js +50 -46
- package/dist/components/d-flow/data-type/DFlowDataType.service.js +89 -5
- package/dist/components/d-flow/data-type/DFlowDataType.validation.value.js +18 -4
- package/dist/components/d-flow/data-type/index.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsKeyRule.js +220 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeContainsTypeRule.js +227 -4
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeParentRule.js +1 -1
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeReturnTypeRule.js +241 -5
- package/dist/components/d-flow/data-type/rules/DFlowDataTypeRules.js +8 -6
- package/dist/components/d-flow/edge/DFlowEdge.js +1 -1
- package/dist/components/d-flow/folder/DFlowFolder.js +16 -15
- package/dist/components/d-flow/function/DFlowFunction.return.hook.js +1 -1
- package/dist/components/d-flow/function/DFlowFunction.vaildation.hook.js +19 -20
- package/dist/components/d-flow/function/DFlowFunctionDefaultCard.js +56 -56
- package/dist/components/d-flow/function/DFlowFunctionGroupCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionSuggestionCard.js +1 -1
- package/dist/components/d-flow/function/DFlowFunctionTriggerCard.js +72 -76
- package/dist/components/d-flow/index.js +8 -8
- package/dist/components/d-flow/input/DFlowInputDataType.js +201 -201
- package/dist/components/d-flow/minimap/DFlowMiniMap.js +6 -5
- package/dist/components/d-flow/suggestion/DFlowSuggestion.hook.js +61 -62
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenu.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuFooter.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionMenuSearchBar.js +1 -1
- package/dist/components/d-flow/suggestion/DFlowSuggestionSearchInput.js +9 -8
- package/dist/components/d-flow/tab/DFlowTabs.js +1 -1
- package/dist/components/d-flow/validation/DFlowValidation.js +15 -14
- package/dist/components/d-fullscreen/DFullScreen.d.ts +1 -2
- package/dist/components/d-fullscreen/DFullScreen.js +24 -18
- package/dist/components/d-layout/DLayout.js +27 -26
- package/dist/components/d-license/DNamespaceLicense.service.d.ts +11 -0
- package/dist/components/d-license/DNamespaceLicense.service.js +12 -0
- package/dist/components/d-license/index.d.ts +2 -0
- package/dist/components/d-license/index.js +6 -0
- package/dist/components/d-member/DNamespaceMember.service.d.ts +13 -0
- package/dist/components/d-member/DNamespaceMember.service.js +15 -0
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.d.ts +4 -1
- package/dist/components/{d-namespace/member → d-member}/DNamespaceMember.view.js +4 -1
- package/dist/components/d-member/index.d.ts +2 -0
- package/dist/components/d-member/index.js +6 -0
- package/dist/components/d-namespace/DNamespace.service.d.ts +1 -1
- package/dist/components/d-namespace/DNamespace.service.js +5 -4
- package/dist/components/d-namespace/index.d.ts +0 -10
- package/dist/components/d-namespace/index.js +4 -33
- package/dist/components/d-organization/DOrganization.service.d.ts +3 -3
- package/dist/components/d-organization/DOrganization.service.js +5 -4
- package/dist/components/d-organization/DOrganization.view.d.ts +4 -1
- package/dist/components/d-organization/DOrganization.view.js +21 -18
- package/dist/components/d-organization/DOrganizationCard.d.ts +3 -3
- package/dist/components/d-organization/DOrganizationCard.js +13 -60
- package/dist/components/d-organization/DOrganizationList.d.ts +11 -0
- package/dist/components/d-organization/DOrganizationList.js +23 -0
- package/dist/components/d-organization/DOrganizatonContent.d.ts +9 -0
- package/dist/components/d-organization/DOrganizatonContent.js +86 -0
- package/dist/components/d-organization/index.d.ts +1 -0
- package/dist/components/d-organization/index.js +15 -10
- package/dist/components/d-project/DNamespaceProject.service.d.ts +12 -0
- package/dist/components/d-project/DNamespaceProject.service.js +12 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.d.ts +4 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProject.view.js +13 -10
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectCard.d.ts +1 -1
- package/dist/components/d-project/DNamespaceProjectCard.js +15 -0
- package/dist/components/d-project/DNamespaceProjectContent.d.ts +8 -0
- package/dist/components/d-project/DNamespaceProjectContent.js +70 -0
- package/dist/components/d-project/DNamespaceProjectList.d.ts +11 -0
- package/dist/components/d-project/DNamespaceProjectList.js +25 -0
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.d.ts +1 -1
- package/dist/components/{d-namespace/project → d-project}/DNamespaceProjectMenu.js +3 -3
- package/dist/components/d-project/index.d.ts +5 -0
- package/dist/components/d-project/index.js +24 -0
- package/dist/components/d-resizable/DResizable.js +17 -16
- package/dist/components/d-role/DNamespaceRole.service.d.ts +13 -0
- package/dist/components/d-role/DNamespaceRole.service.js +12 -0
- package/dist/components/d-role/index.d.ts +2 -0
- package/dist/components/d-role/index.js +6 -0
- package/dist/components/d-runtime/DRuntime.service.d.ts +5 -2
- package/dist/components/d-runtime/DRuntime.service.js +0 -2
- package/dist/components/d-runtime/DRuntime.view.d.ts +4 -1
- package/dist/components/d-runtime/DRuntime.view.js +6 -3
- package/dist/components/d-runtime/DRuntimeCard.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeCard.js +17 -0
- package/dist/components/d-runtime/DRuntimeContent.d.ts +7 -0
- package/dist/components/d-runtime/DRuntimeContent.js +40 -0
- package/dist/components/d-runtime/DRuntimeList.d.ts +10 -0
- package/dist/components/d-runtime/DRuntimeList.js +22 -0
- package/dist/components/d-runtime/index.d.ts +2 -0
- package/dist/components/d-runtime/index.js +6 -2
- package/dist/components/d-user/DUser.service.d.ts +1 -3
- package/dist/components/d-user/DUser.service.js +3 -9
- package/dist/components/d-user/DUser.session.hook.d.ts +3 -0
- package/dist/components/d-user/DUser.session.hook.js +16 -0
- package/dist/components/d-user/DUser.view.d.ts +4 -1
- package/dist/components/d-user/DUser.view.js +13 -10
- package/dist/components/d-user/DUserCard.d.ts +7 -0
- package/dist/components/d-user/DUserCard.js +15 -0
- package/dist/components/d-user/DUserContent.d.ts +7 -0
- package/dist/components/d-user/DUserContent.js +84 -0
- package/dist/components/d-user/DUserList.d.ts +10 -0
- package/dist/components/d-user/DUserList.js +22 -0
- package/dist/components/d-user/DUserMenu.js +19 -19
- package/dist/components/d-user/index.d.ts +3 -0
- package/dist/components/d-user/index.js +15 -8
- package/dist/components/dialog/Dialog.js +18 -17
- package/dist/components/file-tabs/FileTabs.js +41 -40
- package/dist/components/flex/Flex.js +2 -2
- package/dist/components/form/CheckboxInput.js +2 -2
- package/dist/components/form/Input.js +1 -1
- package/dist/components/form/InputDescription.js +1 -1
- package/dist/components/form/InputLabel.js +1 -1
- package/dist/components/form/InputMessage.js +1 -1
- package/dist/components/form/InputSuggestion.js +1 -1
- package/dist/components/form/PinInput.js +2 -2
- package/dist/components/form/RadioGroup.js +2 -2
- package/dist/components/form/RadioInput.js +2 -2
- package/dist/components/form/useForm.d.ts +2 -1
- package/dist/components/form/useForm.js +27 -18
- package/dist/components/menu/Menu.js +2 -2
- package/dist/components/quote/Quote.js +32 -36
- package/dist/components/row/Row.js +10 -9
- package/dist/components/scroll-area/ScrollArea.js +18 -17
- package/dist/components/segmented-control/SegmentedControl.js +12 -11
- package/dist/components/spacing/Spacing.d.ts +6 -0
- package/dist/components/spacing/Spacing.js +23 -0
- package/dist/components/tab/Tab.d.ts +11 -0
- package/dist/components/tab/Tab.js +40 -0
- package/dist/components/text/Text.js +2 -2
- package/dist/components/toast/Toast.d.ts +13 -0
- package/dist/components/toast/Toast.js +62 -0
- package/dist/components/tooltip/Tooltip.js +10 -9
- package/dist/index.d.ts +8 -0
- package/dist/index.js +238 -210
- package/dist/node_modules/react/cjs/react-compiler-runtime.development.js +21 -0
- package/dist/node_modules/react/cjs/react-compiler-runtime.production.js +14 -0
- package/dist/node_modules/react/compiler-runtime.js +10 -0
- package/dist/utils/arrayService.d.ts +2 -2
- package/dist/utils/contextStore.js +1 -1
- package/dist/utils/generics.js +88 -89
- package/dist/utils/reactiveArrayService.d.ts +3 -3
- package/dist/utils/reactiveArrayService.js +52 -42
- package/dist/utils/types.d.ts +2 -2
- package/package.json +31 -30
- package/dist/DFlowDataType.service-Dz8pQUeO.js +0 -793
- package/dist/assets/Avatar.css +0 -1
- package/dist/assets/Badge.css +0 -1
- package/dist/assets/Button.css +0 -1
- package/dist/assets/Card.css +0 -1
- package/dist/assets/Command.css +0 -1
- package/dist/assets/DFlowFolder.css +0 -1
- package/dist/assets/DFlowFunctionDefaultCard.css +0 -1
- package/dist/assets/DFlowInputDataType.css +0 -1
- package/dist/assets/DFlowMiniMap.css +0 -1
- package/dist/assets/DFlowValidation.css +0 -1
- package/dist/assets/DLayout.css +0 -1
- package/dist/assets/DResizable.css +0 -1
- package/dist/assets/Dialog.css +0 -1
- package/dist/assets/FileTabs.css +0 -1
- package/dist/assets/Input.css +0 -1
- package/dist/assets/Menu.css +0 -1
- package/dist/assets/SegmentedControl.css +0 -1
- package/dist/assets/Text.css +0 -1
- package/dist/assets/Tooltip.css +0 -1
- package/dist/compiler-runtime-BNHg76kC.js +0 -36
- package/dist/components/d-namespace/license/DNamespaceLicense.service.d.ts +0 -8
- package/dist/components/d-namespace/license/DNamespaceLicense.service.js +0 -11
- package/dist/components/d-namespace/member/DNamespaceMember.service.d.ts +0 -9
- package/dist/components/d-namespace/member/DNamespaceMember.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProject.service.d.ts +0 -9
- package/dist/components/d-namespace/project/DNamespaceProject.service.js +0 -11
- package/dist/components/d-namespace/project/DNamespaceProjectCard.js +0 -57
- package/dist/components/d-namespace/role/DNamespaceRole.service.d.ts +0 -10
- package/dist/components/d-namespace/role/DNamespaceRole.service.js +0 -11
- /package/dist/assets/{Breadcrumb.css → components/breadcrumb/Breadcrumb.style.css} +0 -0
- /package/dist/assets/{ButtonGroup.css → components/button-group/ButtonGroup.style.css} +0 -0
- /package/dist/assets/{Col.css → components/col/Col.style.css} +0 -0
- /package/dist/assets/{Container.css → components/container/Container.style.css} +0 -0
- /package/dist/assets/{DFlowSuggestionSearchInput.css → components/d-flow/suggestion/DFlowSuggestionSearchInput.style.css} +0 -0
- /package/dist/assets/{DFullScreen.css → components/d-fullscreen/DFullScreen.style.css} +0 -0
- /package/dist/assets/{Flex.css → components/flex/Flex.style.css} +0 -0
- /package/dist/assets/{Quote.css → components/quote/Quote.style.css} +0 -0
- /package/dist/assets/{Row.css → components/row/Row.style.css} +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.d.ts +0 -0
- /package/dist/components/{d-namespace/license → d-license}/DNamespaceLicense.view.js +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.d.ts +0 -0
- /package/dist/components/{d-namespace/role → d-role}/DNamespaceRole.view.js +0 -0
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { jsx as d, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import { c as V } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import B from "react";
|
|
4
|
+
import { Flex as h } from "../flex/Flex.js";
|
|
5
|
+
import { Avatar as E } from "../avatar/Avatar.js";
|
|
6
|
+
import { useUserSession as k } from "./DUser.session.hook.js";
|
|
7
|
+
import { useService as w } from "../../utils/contextStore.js";
|
|
8
|
+
import "merge-props";
|
|
9
|
+
import { DUserReactiveService as F } from "./DUser.service.js";
|
|
10
|
+
import { Text as R } from "../text/Text.js";
|
|
11
|
+
import { Badge as C } from "../badge/Badge.js";
|
|
12
|
+
import { IconMailCheck as M } from "@tabler/icons-react";
|
|
13
|
+
import "../button/Button.js";
|
|
14
|
+
const Z = (D) => {
|
|
15
|
+
const e = V.c(37), {
|
|
16
|
+
userId: u,
|
|
17
|
+
onRemove: A
|
|
18
|
+
} = D, z = A === void 0 ? T : A, b = w(F), I = k(), [U, $] = B.useState(!1);
|
|
19
|
+
let y;
|
|
20
|
+
e[0] !== u || e[1] !== b ? (y = b.getById(u), e[0] = u, e[1] = b, e[2] = y) : y = e[2];
|
|
21
|
+
const t = y, j = I?.user?.id === t.id;
|
|
22
|
+
let g;
|
|
23
|
+
e[3] === Symbol.for("react.memo_cache_sentinel") ? (g = {
|
|
24
|
+
gap: ".7rem"
|
|
25
|
+
}, e[3] = g) : g = e[3];
|
|
26
|
+
let r;
|
|
27
|
+
e[4] !== t.username ? (r = /* @__PURE__ */ d(E, { identifier: t.username, bg: "transparent" }), e[4] = t.username, e[5] = r) : r = e[5];
|
|
28
|
+
let v;
|
|
29
|
+
e[6] === Symbol.for("react.memo_cache_sentinel") ? (v = {
|
|
30
|
+
gap: ".35rem",
|
|
31
|
+
flexDirection: "column"
|
|
32
|
+
}, e[6] = v) : v = e[6];
|
|
33
|
+
let S;
|
|
34
|
+
e[7] === Symbol.for("react.memo_cache_sentinel") ? (S = {
|
|
35
|
+
gap: "0.35rem"
|
|
36
|
+
}, e[7] = S) : S = e[7];
|
|
37
|
+
let i;
|
|
38
|
+
e[8] !== t.username ? (i = /* @__PURE__ */ d(R, { size: "md", hierarchy: "primary", children: t.username }), e[8] = t.username, e[9] = i) : i = e[9];
|
|
39
|
+
let l;
|
|
40
|
+
e[10] !== t.admin ? (l = t.admin ? /* @__PURE__ */ d(C, { color: "secondary", children: "Admin" }) : null, e[10] = t.admin, e[11] = l) : l = e[11];
|
|
41
|
+
let s;
|
|
42
|
+
e[12] !== i || e[13] !== l ? (s = /* @__PURE__ */ p(h, { align: "center", style: S, children: [
|
|
43
|
+
i,
|
|
44
|
+
l
|
|
45
|
+
] }), e[12] = i, e[13] = l, e[14] = s) : s = e[14];
|
|
46
|
+
let n;
|
|
47
|
+
e[15] !== t.email ? (n = /* @__PURE__ */ d(R, { size: "md", hierarchy: "tertiary", children: t.email }), e[15] = t.email, e[16] = n) : n = e[16];
|
|
48
|
+
let m;
|
|
49
|
+
e[17] !== s || e[18] !== n ? (m = /* @__PURE__ */ p(h, { style: v, children: [
|
|
50
|
+
s,
|
|
51
|
+
n
|
|
52
|
+
] }), e[17] = s, e[18] = n, e[19] = m) : m = e[19];
|
|
53
|
+
let o;
|
|
54
|
+
e[20] !== m || e[21] !== r ? (o = /* @__PURE__ */ p(h, { style: g, align: "center", children: [
|
|
55
|
+
r,
|
|
56
|
+
m
|
|
57
|
+
] }), e[20] = m, e[21] = r, e[22] = o) : o = e[22];
|
|
58
|
+
let _;
|
|
59
|
+
e[23] === Symbol.for("react.memo_cache_sentinel") ? (_ = {
|
|
60
|
+
gap: "1.3rem"
|
|
61
|
+
}, e[23] = _) : _ = e[23];
|
|
62
|
+
let c;
|
|
63
|
+
e[24] !== t.emailVerifiedAt ? (c = t.emailVerifiedAt ? /* @__PURE__ */ p(C, { color: "secondary", children: [
|
|
64
|
+
/* @__PURE__ */ d(M, { size: 16 }),
|
|
65
|
+
/* @__PURE__ */ d(R, { size: "xs", children: "Email verified" })
|
|
66
|
+
] }) : null, e[24] = t.emailVerifiedAt, e[25] = c) : c = e[25];
|
|
67
|
+
let a;
|
|
68
|
+
e[26] !== j || e[27] !== z || e[28] !== U || e[29] !== u ? (a = null, e[26] = j, e[27] = z, e[28] = U, e[29] = u, e[30] = a) : a = e[30];
|
|
69
|
+
let f;
|
|
70
|
+
e[31] !== c || e[32] !== a ? (f = /* @__PURE__ */ p(h, { style: _, align: "center", children: [
|
|
71
|
+
c,
|
|
72
|
+
a
|
|
73
|
+
] }), e[31] = c, e[32] = a, e[33] = f) : f = e[33];
|
|
74
|
+
let x;
|
|
75
|
+
return e[34] !== o || e[35] !== f ? (x = /* @__PURE__ */ p(h, { justify: "space-between", align: "center", children: [
|
|
76
|
+
o,
|
|
77
|
+
f
|
|
78
|
+
] }), e[34] = o, e[35] = f, e[36] = x) : x = e[36], x;
|
|
79
|
+
};
|
|
80
|
+
function T() {
|
|
81
|
+
}
|
|
82
|
+
export {
|
|
83
|
+
Z as DUserContent
|
|
84
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { User } from '@code0-tech/sagittarius-graphql-types';
|
|
2
|
+
import { DUserView } from './DUser.view';
|
|
3
|
+
import { default as React } from 'react';
|
|
4
|
+
import { Card } from '../card/Card';
|
|
5
|
+
export interface DUserListProps extends Omit<Card, "children" | "onSelect"> {
|
|
6
|
+
filter?: (user: DUserView, index: number) => boolean;
|
|
7
|
+
onSelect?: (userId: User['id']) => void;
|
|
8
|
+
onRemove?: (userId: User['id']) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const DUserList: React.FC<DUserListProps>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { useService as u, useStore as l } from "../../utils/contextStore.js";
|
|
4
|
+
import "merge-props";
|
|
5
|
+
import { DUserReactiveService as t } from "./DUser.service.js";
|
|
6
|
+
import { Card as v } from "../card/Card.js";
|
|
7
|
+
import S from "../card/CardSection.js";
|
|
8
|
+
import { DUserContent as a } from "./DUserContent.js";
|
|
9
|
+
const k = (i) => {
|
|
10
|
+
const {
|
|
11
|
+
filter: m = () => !0,
|
|
12
|
+
onRemove: s,
|
|
13
|
+
onSelect: o,
|
|
14
|
+
...c
|
|
15
|
+
} = i, n = u(t), d = l(t), f = p.useMemo(() => n.values(), [d]);
|
|
16
|
+
return /* @__PURE__ */ e(v, { ...c, children: f.filter(m).map((r) => r && r.id && /* @__PURE__ */ e(S, { border: !0, hover: !0, onClick: () => {
|
|
17
|
+
o && o(r.id);
|
|
18
|
+
}, children: /* @__PURE__ */ e(a, { onRemove: s, userId: r?.id }) }, r.id)) });
|
|
19
|
+
};
|
|
20
|
+
export {
|
|
21
|
+
k as DUserList
|
|
22
|
+
};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Menu as
|
|
4
|
-
import { DUserReactiveService as
|
|
5
|
-
import { useService as
|
|
6
|
-
import { Avatar as
|
|
7
|
-
import { Text as
|
|
8
|
-
import { Flex as
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */ e(
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { Menu as l, MenuTrigger as u, MenuPortal as d, MenuContent as h } from "../menu/Menu.js";
|
|
4
|
+
import { DUserReactiveService as s } from "./DUser.service.js";
|
|
5
|
+
import { useService as f, useStore as x } from "../../utils/contextStore.js";
|
|
6
|
+
import { Avatar as y } from "../avatar/Avatar.js";
|
|
7
|
+
import { Text as c } from "../text/Text.js";
|
|
8
|
+
import { Flex as m } from "../flex/Flex.js";
|
|
9
|
+
const z = (t) => {
|
|
10
|
+
const n = f(s), a = x(s), r = o.useMemo(() => n.getById(t.userId), [a, n]);
|
|
11
|
+
return o.useMemo(() => /* @__PURE__ */ i(l, { ...t, children: [
|
|
12
|
+
/* @__PURE__ */ e(u, { asChild: !0, children: /* @__PURE__ */ i(m, { align: "center", style: {
|
|
13
13
|
gap: ".5rem"
|
|
14
14
|
}, children: [
|
|
15
|
-
/* @__PURE__ */ e(
|
|
16
|
-
/* @__PURE__ */
|
|
15
|
+
/* @__PURE__ */ e(y, { src: r?.avatarPath ?? "", identifier: r?.username ?? "" }),
|
|
16
|
+
/* @__PURE__ */ i(m, { style: {
|
|
17
17
|
flexDirection: "column"
|
|
18
18
|
}, children: [
|
|
19
|
-
/* @__PURE__ */ e(
|
|
20
|
-
/* @__PURE__ */ e(
|
|
19
|
+
/* @__PURE__ */ e(c, { size: "md", hierarchy: "secondary", children: r?.username }),
|
|
20
|
+
/* @__PURE__ */ e(c, { size: "xs", hierarchy: "tertiary", children: r?.email })
|
|
21
21
|
] })
|
|
22
22
|
] }) }),
|
|
23
|
-
/* @__PURE__ */ e(
|
|
24
|
-
] }), [
|
|
23
|
+
/* @__PURE__ */ e(d, { children: /* @__PURE__ */ e(h, { side: "bottom", align: "start", sideOffset: 8, children: t.children }) })
|
|
24
|
+
] }), [r]);
|
|
25
25
|
};
|
|
26
26
|
export {
|
|
27
|
-
|
|
27
|
+
z as default
|
|
28
28
|
};
|
|
@@ -1,17 +1,24 @@
|
|
|
1
|
-
import { DUserReactiveService as
|
|
2
|
-
import { DUserView as
|
|
1
|
+
import { DUserReactiveService as a } from "./DUser.service.js";
|
|
2
|
+
import { DUserView as n } from "./DUser.view.js";
|
|
3
3
|
import "react/jsx-runtime";
|
|
4
4
|
import "react";
|
|
5
|
-
import "../../compiler-runtime
|
|
6
|
-
import '../../assets/Flex.css';import '../../assets/Text.css';import '../../assets/Avatar.css';import '../../assets/Menu.css';/* empty css
|
|
5
|
+
import "../../_virtual/compiler-runtime.js";
|
|
6
|
+
import '../../assets/components/flex/Flex.style.css';import '../../assets/components/text/Text.style.css';import '../../assets/components/avatar/Avatar.style.css';import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
7
7
|
import "merge-props";
|
|
8
8
|
import "@radix-ui/react-dropdown-menu";
|
|
9
9
|
import "../../utils/contextStore.js";
|
|
10
10
|
import "js-md5";
|
|
11
11
|
/* empty css */
|
|
12
|
-
/* empty css
|
|
13
|
-
/* empty css
|
|
12
|
+
/* empty css */
|
|
13
|
+
/* empty css */
|
|
14
|
+
import { DUserCard as d } from "./DUserCard.js";
|
|
15
|
+
import { DUserList as w } from "./DUserList.js";
|
|
16
|
+
import { setUserSession as L, useUserSession as R } from "./DUser.session.hook.js";
|
|
14
17
|
export {
|
|
15
|
-
|
|
16
|
-
w as
|
|
18
|
+
d as DUserCard,
|
|
19
|
+
w as DUserList,
|
|
20
|
+
a as DUserReactiveService,
|
|
21
|
+
n as DUserView,
|
|
22
|
+
L as setUserSession,
|
|
23
|
+
R as useUserSession
|
|
17
24
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { jsx as n, jsxs as g } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "../../compiler-runtime
|
|
2
|
+
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import * as r from "@radix-ui/react-dialog";
|
|
4
4
|
import { mergeCode0Props as s } from "../../utils/utils.js";
|
|
5
5
|
import { IconX as d } from "@tabler/icons-react";
|
|
6
|
-
import '../../assets/Dialog.css'
|
|
6
|
+
import '../../assets/components/dialog/Dialog.style.css';/* empty css */
|
|
7
|
+
const v = (i) => {
|
|
7
8
|
const t = c.c(4);
|
|
8
9
|
let e;
|
|
9
10
|
t[0] !== i ? (e = s("dialog", i), t[0] = i, t[1] = e) : e = t[1];
|
|
10
11
|
const o = e;
|
|
11
12
|
let l;
|
|
12
13
|
return t[2] !== o ? (l = /* @__PURE__ */ n(r.Root, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
13
|
-
},
|
|
14
|
+
}, P = (i) => {
|
|
14
15
|
const t = c.c(4);
|
|
15
16
|
let e;
|
|
16
17
|
t[0] !== i ? (e = s("dialog__trigger", i), t[0] = i, t[1] = e) : e = t[1];
|
|
17
18
|
const o = e;
|
|
18
19
|
let l;
|
|
19
20
|
return t[2] !== o ? (l = /* @__PURE__ */ n(r.Trigger, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
20
|
-
},
|
|
21
|
+
}, x = (i) => {
|
|
21
22
|
const t = c.c(4);
|
|
22
23
|
let e;
|
|
23
24
|
t[0] !== i ? (e = s("dialog__portal", i), t[0] = i, t[1] = e) : e = t[1];
|
|
@@ -38,7 +39,7 @@ import '../../assets/Dialog.css';const C = (i) => {
|
|
|
38
39
|
const o = e;
|
|
39
40
|
let l;
|
|
40
41
|
return t[2] !== o ? (l = /* @__PURE__ */ n(r.Overlay, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
41
|
-
},
|
|
42
|
+
}, y = (i) => {
|
|
42
43
|
const t = c.c(9);
|
|
43
44
|
let e;
|
|
44
45
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ n(m, {}), t[0] = e) : e = t[0];
|
|
@@ -55,28 +56,28 @@ import '../../assets/Dialog.css';const C = (i) => {
|
|
|
55
56
|
i.children
|
|
56
57
|
] })
|
|
57
58
|
] }), t[5] = i.children, t[6] = l, t[7] = a, t[8] = f) : f = t[8], f;
|
|
58
|
-
},
|
|
59
|
+
}, T = (i) => {
|
|
59
60
|
const t = c.c(4);
|
|
60
61
|
let e;
|
|
61
62
|
t[0] !== i ? (e = s("dialog__title", i), t[0] = i, t[1] = e) : e = t[1];
|
|
62
63
|
const o = e;
|
|
63
64
|
let l;
|
|
64
65
|
return t[2] !== o ? (l = /* @__PURE__ */ n(r.Title, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
65
|
-
},
|
|
66
|
+
}, w = (i) => {
|
|
66
67
|
const t = c.c(4);
|
|
67
68
|
let e;
|
|
68
69
|
t[0] !== i ? (e = s("dialog__description", i), t[0] = i, t[1] = e) : e = t[1];
|
|
69
70
|
const o = e;
|
|
70
71
|
let l;
|
|
71
72
|
return t[2] !== o ? (l = /* @__PURE__ */ n(r.Description, { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
72
|
-
},
|
|
73
|
+
}, B = (i) => {
|
|
73
74
|
const t = c.c(4);
|
|
74
75
|
let e;
|
|
75
76
|
t[0] !== i ? (e = s("dialog__header", i), t[0] = i, t[1] = e) : e = t[1];
|
|
76
77
|
const o = e;
|
|
77
78
|
let l;
|
|
78
79
|
return t[2] !== o ? (l = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
79
|
-
},
|
|
80
|
+
}, j = (i) => {
|
|
80
81
|
const t = c.c(4);
|
|
81
82
|
let e;
|
|
82
83
|
t[0] !== i ? (e = s("dialog__footer", i), t[0] = i, t[1] = e) : e = t[1];
|
|
@@ -85,14 +86,14 @@ import '../../assets/Dialog.css';const C = (i) => {
|
|
|
85
86
|
return t[2] !== o ? (l = /* @__PURE__ */ n("div", { ...o }), t[2] = o, t[3] = l) : l = t[3], l;
|
|
86
87
|
};
|
|
87
88
|
export {
|
|
88
|
-
|
|
89
|
+
v as Dialog,
|
|
89
90
|
_ as DialogClose,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
y as DialogContent,
|
|
92
|
+
w as DialogDescription,
|
|
93
|
+
j as DialogFooter,
|
|
94
|
+
B as DialogHeader,
|
|
94
95
|
m as DialogOverlay,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
96
|
+
x as DialogPortal,
|
|
97
|
+
T as DialogTitle,
|
|
98
|
+
P as DialogTrigger
|
|
98
99
|
};
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { c as
|
|
1
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { c as b } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { Tabs as g, List as T, Trigger as v, Content as C } from "@radix-ui/react-tabs";
|
|
4
4
|
import { mergeCode0Props as h } from "../../utils/utils.js";
|
|
5
|
+
import '../../assets/components/file-tabs/FileTabs.style.css';/* empty css */
|
|
5
6
|
import { IconX as S } from "@tabler/icons-react";
|
|
6
7
|
import { ScrollAreaViewport as x, ScrollAreaScrollbar as A, ScrollAreaThumb as F, ScrollArea as $ } from "../scroll-area/ScrollArea.js";
|
|
7
|
-
|
|
8
|
-
const e =
|
|
8
|
+
const E = (t) => {
|
|
9
|
+
const e = b.c(4);
|
|
9
10
|
let i;
|
|
10
|
-
e[0] !==
|
|
11
|
-
let
|
|
12
|
-
return e[2] !== i ? (
|
|
13
|
-
},
|
|
14
|
-
const e =
|
|
11
|
+
e[0] !== t ? (i = h("file-tabs", t), e[0] = t, e[1] = i) : i = e[1];
|
|
12
|
+
let l;
|
|
13
|
+
return e[2] !== i ? (l = /* @__PURE__ */ a(g, { "data-slot": "tabs", ...i }), e[2] = i, e[3] = l) : l = e[3], l;
|
|
14
|
+
}, I = (t) => {
|
|
15
|
+
const e = b.c(10);
|
|
15
16
|
let i;
|
|
16
|
-
e[0] !==
|
|
17
|
-
let
|
|
18
|
-
e[2] !==
|
|
17
|
+
e[0] !== t ? (i = h("file-tabs__list", t), e[0] = t, e[1] = i) : i = e[1];
|
|
18
|
+
let l;
|
|
19
|
+
e[2] !== t.children ? (l = /* @__PURE__ */ m("div", { className: "file-tabs__list-content", children: [
|
|
19
20
|
" ",
|
|
20
|
-
|
|
21
|
-
] }), e[2] =
|
|
21
|
+
t.children
|
|
22
|
+
] }), e[2] = t.children, e[3] = l) : l = e[3];
|
|
22
23
|
let n;
|
|
23
|
-
e[4] !==
|
|
24
|
+
e[4] !== t.controls ? (n = t.controls ? /* @__PURE__ */ a("div", { className: "file-tabs__list-controls", children: t.controls }) : null, e[4] = t.controls, e[5] = n) : n = e[5];
|
|
24
25
|
let c;
|
|
25
|
-
return e[6] !== i || e[7] !==
|
|
26
|
-
|
|
26
|
+
return e[6] !== i || e[7] !== l || e[8] !== n ? (c = /* @__PURE__ */ m(T, { "data-slot": "tabs", ...i, children: [
|
|
27
|
+
l,
|
|
27
28
|
n
|
|
28
|
-
] }), e[6] = i, e[7] =
|
|
29
|
-
},
|
|
30
|
-
const e =
|
|
31
|
-
let
|
|
32
|
-
e[0] !==
|
|
33
|
-
const n =
|
|
29
|
+
] }), e[6] = i, e[7] = l, e[8] = n, e[9] = c) : c = e[9], c;
|
|
30
|
+
}, P = (t) => {
|
|
31
|
+
const e = b.c(10), i = t.value;
|
|
32
|
+
let l;
|
|
33
|
+
e[0] !== t ? (l = h("file-tabs__trigger", t), e[0] = t, e[1] = l) : l = e[1];
|
|
34
|
+
const n = l;
|
|
34
35
|
let c;
|
|
35
|
-
e[2] !==
|
|
36
|
+
e[2] !== t.closable || e[3] !== t.onClose ? (c = t.closable ? /* @__PURE__ */ a("div", { className: "file-tabs__trigger-icon", onClick: t.onClose, children: /* @__PURE__ */ a(S, { size: 16 }) }) : null, e[2] = t.closable, e[3] = t.onClose, e[4] = c) : c = e[4];
|
|
36
37
|
let s;
|
|
37
|
-
return e[5] !==
|
|
38
|
-
|
|
38
|
+
return e[5] !== t.children || e[6] !== t.value || e[7] !== n || e[8] !== c ? (s = /* @__PURE__ */ m(v, { "data-slot": "tabs", "data-value": i, ...n, children: [
|
|
39
|
+
t.children,
|
|
39
40
|
c
|
|
40
|
-
] }), e[5] =
|
|
41
|
-
},
|
|
42
|
-
const e =
|
|
43
|
-
let i,
|
|
44
|
-
if (e[0] !==
|
|
41
|
+
] }), e[5] = t.children, e[6] = t.value, e[7] = n, e[8] = c, e[9] = s) : s = e[9], s;
|
|
42
|
+
}, R = (t) => {
|
|
43
|
+
const e = b.c(15);
|
|
44
|
+
let i, l, n, c;
|
|
45
|
+
if (e[0] !== t) {
|
|
45
46
|
const {
|
|
46
47
|
children: _,
|
|
47
48
|
...u
|
|
48
|
-
} =
|
|
49
|
-
|
|
49
|
+
} = t;
|
|
50
|
+
l = _, i = C, c = "tabs", n = h("file-tabs__content", u), e[0] = t, e[1] = i, e[2] = l, e[3] = n, e[4] = c;
|
|
50
51
|
} else
|
|
51
|
-
i = e[1],
|
|
52
|
+
i = e[1], l = e[2], n = e[3], c = e[4];
|
|
52
53
|
const s = n;
|
|
53
54
|
let o;
|
|
54
|
-
e[5] !==
|
|
55
|
+
e[5] !== l ? (o = /* @__PURE__ */ a(x, { children: l }), e[5] = l, e[6] = o) : o = e[6];
|
|
55
56
|
let f;
|
|
56
57
|
e[7] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ a(A, { orientation: "vertical", children: /* @__PURE__ */ a(F, {}) }), e[7] = f) : f = e[7];
|
|
57
58
|
let r;
|
|
58
|
-
e[8] !== o ? (r = /* @__PURE__ */
|
|
59
|
+
e[8] !== o ? (r = /* @__PURE__ */ m($, { h: "700px", children: [
|
|
59
60
|
o,
|
|
60
61
|
f
|
|
61
62
|
] }), e[8] = o, e[9] = r) : r = e[9];
|
|
@@ -63,8 +64,8 @@ import '../../assets/FileTabs.css';const z = (l) => {
|
|
|
63
64
|
return e[10] !== i || e[11] !== c || e[12] !== s || e[13] !== r ? (d = /* @__PURE__ */ a(i, { "data-slot": c, ...s, children: r }), e[10] = i, e[11] = c, e[12] = s, e[13] = r, e[14] = d) : d = e[14], d;
|
|
64
65
|
};
|
|
65
66
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
E as FileTabs,
|
|
68
|
+
R as FileTabsContent,
|
|
69
|
+
I as FileTabsList,
|
|
70
|
+
P as FileTabsTrigger
|
|
70
71
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { c as s } from "../../compiler-runtime
|
|
2
|
+
import { c as s } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { mergeCode0Props as n } from "../../utils/utils.js";
|
|
4
|
-
import '../../assets/Flex.css';/* empty css
|
|
4
|
+
import '../../assets/components/flex/Flex.style.css';/* empty css */
|
|
5
5
|
const h = (i) => {
|
|
6
6
|
const e = s.c(6);
|
|
7
7
|
let t, r;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as r, jsxs as v, Fragment as N } from "react/jsx-runtime";
|
|
2
|
-
import { c as R } from "../../compiler-runtime
|
|
2
|
+
import { c as R } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import $ from "react";
|
|
4
4
|
import { Checkbox as D, CheckboxIndicator as E } from "@radix-ui/react-checkbox";
|
|
5
5
|
import { InputLabel as F } from "./InputLabel.js";
|
|
6
6
|
import { InputDescription as L } from "./InputDescription.js";
|
|
7
7
|
import { mergeCode0Props as j } from "../../utils/utils.js";
|
|
8
8
|
import { InputMessage as P } from "./InputMessage.js";
|
|
9
|
-
import '../../assets/Input.css';/* empty css
|
|
9
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
10
10
|
import { IconMinus as S, IconCheck as T } from "@tabler/icons-react";
|
|
11
11
|
const U = (l) => {
|
|
12
12
|
const e = R.c(40), [i, z] = $.useState(l.initialValue ?? "indeterminate");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as f, jsx as r, Fragment as T } from "react/jsx-runtime";
|
|
2
2
|
import h, { useRef as v, useState as x, useEffect as V, useMemo as k } from "react";
|
|
3
3
|
import { mergeCode0Props as y } from "../../utils/utils.js";
|
|
4
|
-
import '../../assets/Input.css';/* empty css
|
|
4
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
5
5
|
import { InputLabel as A } from "./InputLabel.js";
|
|
6
6
|
import { InputDescription as K } from "./InputDescription.js";
|
|
7
7
|
import { InputMessage as H } from "./InputMessage.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as c, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { c as m } from "../../compiler-runtime
|
|
2
|
+
import { c as m } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { IconExclamationCircle as n } from "@tabler/icons-react";
|
|
4
4
|
const f = (r) => {
|
|
5
5
|
const e = m.c(3), {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as p, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { c as I } from "../../compiler-runtime
|
|
2
|
+
import { c as I } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { MenuContent as x, MenuLabel as M, MenuItem as w } from "../menu/Menu.js";
|
|
4
4
|
import l from "react";
|
|
5
5
|
import { ScrollArea as R, ScrollAreaViewport as G, ScrollAreaScrollbar as A, ScrollAreaThumb as D } from "../scroll-area/ScrollArea.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as d, jsxs as F, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { c as I } from "../../compiler-runtime
|
|
2
|
+
import { c as I } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import { OneTimePasswordFieldInput as C, OneTimePasswordFieldHiddenInput as M, OneTimePasswordField as T } from "@radix-ui/react-one-time-password-field";
|
|
4
4
|
import { mergeCode0Props as V } from "../../utils/utils.js";
|
|
5
5
|
import { InputLabel as _ } from "./InputLabel.js";
|
|
6
6
|
import { InputDescription as $ } from "./InputDescription.js";
|
|
7
7
|
import { InputMessage as w } from "./InputMessage.js";
|
|
8
|
-
import '../../assets/Input.css';/* empty css
|
|
8
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
9
9
|
const y = (l) => {
|
|
10
10
|
const e = I.c(26);
|
|
11
11
|
let t, i, r, n, o, s;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as p, jsxs as x, Fragment as R } from "react/jsx-runtime";
|
|
2
|
-
import { c as C } from "../../compiler-runtime
|
|
2
|
+
import { c as C } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import * as M from "@radix-ui/react-radio-group";
|
|
4
4
|
import { mergeCode0Props as v } from "../../utils/utils.js";
|
|
5
5
|
import { InputLabel as G } from "./InputLabel.js";
|
|
6
6
|
import { InputDescription as I } from "./InputDescription.js";
|
|
7
7
|
import { InputMessage as j } from "./InputMessage.js";
|
|
8
|
-
import '../../assets/Input.css';/* empty css
|
|
8
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
9
9
|
const k = (u) => {
|
|
10
10
|
const e = C.c(22);
|
|
11
11
|
let o, t, a, r, l, i;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as c, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import { c as f } from "../../compiler-runtime
|
|
2
|
+
import { c as f } from "../../_virtual/compiler-runtime.js";
|
|
3
3
|
import * as s from "@radix-ui/react-radio-group";
|
|
4
4
|
import { mergeCode0Props as d } from "../../utils/utils.js";
|
|
5
|
-
import '../../assets/Input.css';/* empty css
|
|
5
|
+
import '../../assets/components/form/Input.style.css';/* empty css */
|
|
6
6
|
const R = (t) => {
|
|
7
7
|
const e = f.c(11);
|
|
8
8
|
let l;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type Validations<Values> = Partial<{
|
|
2
|
-
[Key in keyof Values]: (value: Values[Key]) => string | null;
|
|
2
|
+
[Key in keyof Values]: (value: Values[Key], values?: Values) => string | null;
|
|
3
3
|
}>;
|
|
4
4
|
export interface FormValidationProps<Values> {
|
|
5
5
|
initialValues: Values;
|
|
@@ -21,5 +21,6 @@ export type ValidationsProps<Values> = Partial<{
|
|
|
21
21
|
export type FormValidationReturn<Values> = [IValidation<Values>, () => void];
|
|
22
22
|
export interface IValidation<Values> {
|
|
23
23
|
getInputProps<Key extends keyof Values>(key: Key): ValidationProps<Values[Key]>;
|
|
24
|
+
isValid(): boolean;
|
|
24
25
|
}
|
|
25
26
|
export declare const useForm: <Values extends Record<string, any> = Record<string, any>>(props: FormValidationProps<Values>) => FormValidationReturn<Values>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useState as c, useMemo as
|
|
2
|
-
function
|
|
3
|
-
return (t =
|
|
1
|
+
import { useState as c, useMemo as p, useCallback as g } from "react";
|
|
2
|
+
function l(e, t, i) {
|
|
3
|
+
return (t = b(t)) in e ? Object.defineProperty(e, t, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = i, e;
|
|
4
4
|
}
|
|
5
|
-
function
|
|
5
|
+
function b(e) {
|
|
6
6
|
var t = P(e, "string");
|
|
7
7
|
return typeof t == "symbol" ? t : t + "";
|
|
8
8
|
}
|
|
@@ -10,29 +10,38 @@ function P(e, t) {
|
|
|
10
10
|
if (typeof e != "object" || !e) return e;
|
|
11
11
|
var i = e[Symbol.toPrimitive];
|
|
12
12
|
if (i !== void 0) {
|
|
13
|
-
var
|
|
14
|
-
if (typeof
|
|
13
|
+
var r = i.call(e, t);
|
|
14
|
+
if (typeof r != "object") return r;
|
|
15
15
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
16
16
|
}
|
|
17
17
|
return (t === "string" ? String : Number)(e);
|
|
18
18
|
}
|
|
19
19
|
class d {
|
|
20
|
-
constructor(t, i,
|
|
21
|
-
|
|
20
|
+
constructor(t, i, r, n) {
|
|
21
|
+
l(this, "changeValue", void 0), l(this, "initialRender", void 0), l(this, "currentValues", void 0), l(this, "currentValidations", void 0), this.changeValue = t, this.currentValues = i, this.currentValidations = r, this.initialRender = n;
|
|
22
|
+
}
|
|
23
|
+
isValid() {
|
|
24
|
+
if (!this.currentValidations) return !0;
|
|
25
|
+
for (const t in this.currentValidations) {
|
|
26
|
+
const i = this.currentValidations[t];
|
|
27
|
+
if (i && i(this.currentValues[t], this.currentValues) !== null)
|
|
28
|
+
return !1;
|
|
29
|
+
}
|
|
30
|
+
return !0;
|
|
22
31
|
}
|
|
23
32
|
getInputProps(t) {
|
|
24
|
-
const i = this.currentValues[t] || null,
|
|
33
|
+
const i = this.currentValues[t] || null, r = t, n = this.currentValidations && this.currentValidations[t] ? this.currentValidations[t] : (u) => null, s = this.initialRender ? null : n(i, this.currentValues);
|
|
25
34
|
return {
|
|
26
35
|
initialValue: i,
|
|
27
36
|
formValidation: {
|
|
28
|
-
setValue: (
|
|
29
|
-
this.changeValue(
|
|
37
|
+
setValue: (u) => {
|
|
38
|
+
this.changeValue(r, u);
|
|
30
39
|
},
|
|
31
40
|
...this.initialRender ? {
|
|
32
41
|
valid: !0
|
|
33
42
|
} : {
|
|
34
|
-
notValidMessage:
|
|
35
|
-
valid:
|
|
43
|
+
notValidMessage: s,
|
|
44
|
+
valid: s === null ? !0 : !s
|
|
36
45
|
}
|
|
37
46
|
},
|
|
38
47
|
...this.currentValidations && this.currentValidations[t] ? {
|
|
@@ -45,12 +54,12 @@ const w = (e) => {
|
|
|
45
54
|
const {
|
|
46
55
|
initialValues: t,
|
|
47
56
|
validate: i = {},
|
|
48
|
-
onSubmit:
|
|
49
|
-
} = e, [
|
|
50
|
-
let
|
|
51
|
-
|
|
57
|
+
onSubmit: r
|
|
58
|
+
} = e, [n, s] = c(t), u = (a, m) => s((o) => (o[a] = m, o)), V = p(() => new d(u, t, i, !0), []), [h, f] = c(V), v = g(() => {
|
|
59
|
+
let a = new d(u, n, i, !1);
|
|
60
|
+
f(() => a), r && a.isValid() && r(n);
|
|
52
61
|
}, []);
|
|
53
|
-
return [
|
|
62
|
+
return [h, v];
|
|
54
63
|
};
|
|
55
64
|
export {
|
|
56
65
|
w as useForm
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { c } from "../../compiler-runtime
|
|
3
|
-
import '../../assets/Menu.css';/* empty css
|
|
2
|
+
import { c } from "../../_virtual/compiler-runtime.js";
|
|
3
|
+
import '../../assets/components/menu/Menu.style.css';/* empty css */
|
|
4
4
|
import { mergeCode0Props as r } from "../../utils/utils.js";
|
|
5
5
|
import { DropdownMenuContent as s, DropdownMenuLabel as f, DropdownMenuItem as m, DropdownMenu as M, DropdownMenuTrigger as _, DropdownMenuPortal as a, DropdownMenuGroup as g, DropdownMenuSub as w, DropdownMenuSubTrigger as d, DropdownMenuSubContent as b, DropdownMenuSeparator as D, DropdownMenuArrow as $ } from "@radix-ui/react-dropdown-menu";
|
|
6
6
|
const A = (o) => {
|