@acmekit/dashboard 2.13.7 → 2.13.8
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/api-key-management-create-D57V3NN2.mjs +170 -0
- package/dist/api-key-management-detail-QURSBB6T.mjs +307 -0
- package/dist/api-key-management-edit-GG5V77GY.mjs +106 -0
- package/dist/api-key-management-list-PL64LD22.mjs +400 -0
- package/dist/app.js +16930 -1004
- package/dist/app.mjs +793 -884
- package/dist/chunk-22YYMH6M.mjs +382 -0
- package/dist/chunk-2U3RK3JG.mjs +474 -0
- package/dist/chunk-535OVBXR.mjs +226 -0
- package/dist/chunk-6SQCO25J.mjs +65 -0
- package/dist/chunk-774WSTCC.mjs +19 -0
- package/dist/chunk-7ZHDHEUH.mjs +1837 -0
- package/dist/chunk-C76H5USB.mjs +16 -0
- package/dist/chunk-DFFLVEZ5.mjs +40 -0
- package/dist/chunk-DN3MIYQH.mjs +140 -0
- package/dist/chunk-DQCEH3X2.mjs +28 -0
- package/dist/chunk-DTY37DDZ.mjs +20 -0
- package/dist/chunk-FXYH54JP.mjs +16 -0
- package/dist/chunk-G22WWLPG.mjs +44 -0
- package/dist/chunk-G2VJOHHV.mjs +32 -0
- package/dist/chunk-GBFVWROS.mjs +58 -0
- package/dist/chunk-ITNQKZQQ.mjs +142 -0
- package/dist/chunk-IUCDCPJU.mjs +0 -0
- package/dist/chunk-LKWTBYYC.mjs +35 -0
- package/dist/{chunk-4VYJHIB3.mjs → chunk-ND3ODI36.mjs} +0 -72
- package/dist/chunk-OAHCJFG3.mjs +17 -0
- package/dist/chunk-OHAFITSB.mjs +54 -0
- package/dist/chunk-RPAL6FHW.mjs +73 -0
- package/dist/{chunk-JSJZMTQG.mjs → chunk-RREPQMYC.mjs} +14 -41
- package/dist/chunk-S3REQHPQ.mjs +86 -0
- package/dist/chunk-S4DMV3ZT.mjs +35 -0
- package/dist/chunk-TCNCAWYD.mjs +9 -0
- package/dist/chunk-ULSPL3DR.mjs +126 -0
- package/dist/chunk-VBT5YZ4K.mjs +129 -0
- package/dist/chunk-WILMJYUB.mjs +35 -0
- package/dist/chunk-XIM7X4FB.mjs +83 -0
- package/dist/chunk-YB52HEIR.mjs +387 -0
- package/dist/chunk-YRWSG3YM.mjs +80 -0
- package/dist/{invite-S5USGDOZ.mjs → invite-BAFXQBLJ.mjs} +15 -7
- package/dist/{login-AIMR26AL.mjs → login-YURMNRCS.mjs} +23 -9
- package/dist/profile-detail-SJWODS2K.mjs +96 -0
- package/dist/profile-edit-HSGF4UXZ.mjs +173 -0
- package/dist/{reset-password-UQPRHMB3.mjs → reset-password-RQ5M7HQC.mjs} +8 -4
- package/dist/settings-3XWLL5LG.mjs +545 -0
- package/dist/store-detail-SQKV5KBD.mjs +109 -0
- package/dist/store-edit-WGGIJMYJ.mjs +97 -0
- package/dist/store-metadata-CSBUGX6Z.mjs +49 -0
- package/dist/translation-list-H5X4DVCC.mjs +587 -0
- package/dist/translations-edit-NPAUN2GZ.mjs +5376 -0
- package/dist/user-detail-7SUQ35G7.mjs +169 -0
- package/dist/user-edit-KUZV37AH.mjs +114 -0
- package/dist/user-invite-OREFWWYL.mjs +361 -0
- package/dist/user-list-OWUR75OP.mjs +1116 -0
- package/dist/user-metadata-QHUX5SHZ.mjs +51 -0
- package/dist/workflow-execution-detail-MWNM25TF.mjs +820 -0
- package/dist/workflow-execution-list-IGYF44UH.mjs +175 -0
- package/package.json +9 -9
- package/src/components/layout/settings-layout/settings-layout.tsx +8 -2
- package/dist/chunk-FBTP4AJM.mjs +0 -221
- package/dist/chunk-QYOO4QR6.mjs +0 -73
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SingleColumnPage
|
|
3
|
+
} from "./chunk-22YYMH6M.mjs";
|
|
4
|
+
import {
|
|
5
|
+
useExtension
|
|
6
|
+
} from "./chunk-C5P5PL3E.mjs";
|
|
7
|
+
import {
|
|
8
|
+
useMe
|
|
9
|
+
} from "./chunk-YRWSG3YM.mjs";
|
|
10
|
+
import {
|
|
11
|
+
SingleColumnPageSkeleton
|
|
12
|
+
} from "./chunk-ITNQKZQQ.mjs";
|
|
13
|
+
import {
|
|
14
|
+
languages
|
|
15
|
+
} from "./chunk-535OVBXR.mjs";
|
|
16
|
+
import {
|
|
17
|
+
ActionMenu
|
|
18
|
+
} from "./chunk-S3REQHPQ.mjs";
|
|
19
|
+
import "./chunk-OAHCJFG3.mjs";
|
|
20
|
+
import "./chunk-S4DMV3ZT.mjs";
|
|
21
|
+
import "./chunk-FXYH54JP.mjs";
|
|
22
|
+
import "./chunk-774WSTCC.mjs";
|
|
23
|
+
import "./chunk-DTY37DDZ.mjs";
|
|
24
|
+
import "./chunk-QZ7TP4HQ.mjs";
|
|
25
|
+
|
|
26
|
+
// src/routes/profile/profile-detail/components/profile-general-section/profile-general-section.tsx
|
|
27
|
+
import { PencilSquare } from "@acmekit/icons";
|
|
28
|
+
import { Container, Heading, Text } from "@acmekit/ui";
|
|
29
|
+
import { useTranslation } from "react-i18next";
|
|
30
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
31
|
+
var ProfileGeneralSection = ({ user }) => {
|
|
32
|
+
const { i18n, t } = useTranslation();
|
|
33
|
+
const name = [user.first_name, user.last_name].filter(Boolean).join(" ");
|
|
34
|
+
return /* @__PURE__ */ jsxs(Container, { className: "divide-y p-0", children: [
|
|
35
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
36
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
37
|
+
/* @__PURE__ */ jsx(Heading, { children: t("profile.domain") }),
|
|
38
|
+
/* @__PURE__ */ jsx(Text, { className: "text-ui-fg-subtle", size: "small", children: t("profile.manageYourProfileDetails") })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
ActionMenu,
|
|
42
|
+
{
|
|
43
|
+
groups: [
|
|
44
|
+
{
|
|
45
|
+
actions: [
|
|
46
|
+
{
|
|
47
|
+
label: t("actions.edit"),
|
|
48
|
+
to: "edit",
|
|
49
|
+
icon: /* @__PURE__ */ jsx(PencilSquare, {})
|
|
50
|
+
}
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
] }),
|
|
57
|
+
/* @__PURE__ */ jsxs("div", { className: "text-ui-fg-subtle grid grid-cols-2 items-center px-6 py-4", children: [
|
|
58
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.name") }),
|
|
59
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: name || "-" })
|
|
60
|
+
] }),
|
|
61
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
|
|
62
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("fields.email") }),
|
|
63
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: user.email })
|
|
64
|
+
] }),
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 items-center px-6 py-4", children: [
|
|
66
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", weight: "plus", children: t("profile.fields.languageLabel") }),
|
|
67
|
+
/* @__PURE__ */ jsx(Text, { size: "small", leading: "compact", children: languages.find((lang) => lang.code === i18n.language)?.display_name || "-" })
|
|
68
|
+
] })
|
|
69
|
+
] });
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
// src/routes/profile/profile-detail/profile-detail.tsx
|
|
73
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
74
|
+
var ProfileDetail = () => {
|
|
75
|
+
const { user, isPending: isLoading, isError, error } = useMe();
|
|
76
|
+
const { getWidgets } = useExtension();
|
|
77
|
+
if (isLoading || !user) {
|
|
78
|
+
return /* @__PURE__ */ jsx2(SingleColumnPageSkeleton, { sections: 1 });
|
|
79
|
+
}
|
|
80
|
+
if (isError) {
|
|
81
|
+
throw error;
|
|
82
|
+
}
|
|
83
|
+
return /* @__PURE__ */ jsx2(
|
|
84
|
+
SingleColumnPage,
|
|
85
|
+
{
|
|
86
|
+
widgets: {
|
|
87
|
+
after: getWidgets("profile.details.after"),
|
|
88
|
+
before: getWidgets("profile.details.before")
|
|
89
|
+
},
|
|
90
|
+
children: /* @__PURE__ */ jsx2(ProfileGeneralSection, { user })
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
};
|
|
94
|
+
export {
|
|
95
|
+
ProfileDetail as Component
|
|
96
|
+
};
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import "./chunk-IUCDCPJU.mjs";
|
|
2
|
+
import {
|
|
3
|
+
useMe,
|
|
4
|
+
useUpdateUser
|
|
5
|
+
} from "./chunk-YRWSG3YM.mjs";
|
|
6
|
+
import {
|
|
7
|
+
KeyboundForm,
|
|
8
|
+
RouteDrawer,
|
|
9
|
+
useRouteModal
|
|
10
|
+
} from "./chunk-2U3RK3JG.mjs";
|
|
11
|
+
import {
|
|
12
|
+
Form
|
|
13
|
+
} from "./chunk-ND3ODI36.mjs";
|
|
14
|
+
import {
|
|
15
|
+
languages
|
|
16
|
+
} from "./chunk-535OVBXR.mjs";
|
|
17
|
+
import {
|
|
18
|
+
useDocumentDirection
|
|
19
|
+
} from "./chunk-S4DMV3ZT.mjs";
|
|
20
|
+
import "./chunk-FXYH54JP.mjs";
|
|
21
|
+
import "./chunk-774WSTCC.mjs";
|
|
22
|
+
import "./chunk-DTY37DDZ.mjs";
|
|
23
|
+
import "./chunk-QZ7TP4HQ.mjs";
|
|
24
|
+
|
|
25
|
+
// src/routes/profile/profile-edit/profile-edit.tsx
|
|
26
|
+
import { Heading } from "@acmekit/ui";
|
|
27
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
28
|
+
|
|
29
|
+
// src/routes/profile/profile-edit/components/edit-profile-form/edit-profile-form.tsx
|
|
30
|
+
import { zodResolver } from "@hookform/resolvers/zod";
|
|
31
|
+
import { Button, Input, Select, toast } from "@acmekit/ui";
|
|
32
|
+
import { useForm } from "react-hook-form";
|
|
33
|
+
import { useTranslation } from "react-i18next";
|
|
34
|
+
import * as zod from "zod";
|
|
35
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
36
|
+
var EditProfileSchema = zod.object({
|
|
37
|
+
first_name: zod.string().optional(),
|
|
38
|
+
last_name: zod.string().optional(),
|
|
39
|
+
language: zod.string()
|
|
40
|
+
// usage_insights: zod.boolean(),
|
|
41
|
+
});
|
|
42
|
+
var EditProfileForm = ({ user }) => {
|
|
43
|
+
const { t, i18n } = useTranslation();
|
|
44
|
+
const { handleSuccess } = useRouteModal();
|
|
45
|
+
const direction = useDocumentDirection();
|
|
46
|
+
const form = useForm({
|
|
47
|
+
defaultValues: {
|
|
48
|
+
first_name: user.first_name ?? "",
|
|
49
|
+
last_name: user.last_name ?? "",
|
|
50
|
+
language: i18n.language
|
|
51
|
+
// usage_insights: usageInsights,
|
|
52
|
+
},
|
|
53
|
+
resolver: zodResolver(EditProfileSchema)
|
|
54
|
+
});
|
|
55
|
+
const changeLanguage = async (code) => {
|
|
56
|
+
await i18n.changeLanguage(code);
|
|
57
|
+
};
|
|
58
|
+
const sortedLanguages = languages.sort(
|
|
59
|
+
(a, b) => a.display_name.localeCompare(b.display_name)
|
|
60
|
+
);
|
|
61
|
+
const { mutateAsync, isPending } = useUpdateUser(user.id);
|
|
62
|
+
const handleSubmit = form.handleSubmit(async (values) => {
|
|
63
|
+
await mutateAsync(
|
|
64
|
+
{
|
|
65
|
+
first_name: values.first_name,
|
|
66
|
+
last_name: values.last_name
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
onError: (error) => {
|
|
70
|
+
toast.error(error.message);
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
await changeLanguage(values.language);
|
|
76
|
+
toast.success(t("profile.toast.edit"));
|
|
77
|
+
handleSuccess();
|
|
78
|
+
});
|
|
79
|
+
return /* @__PURE__ */ jsx(RouteDrawer.Form, { form, children: /* @__PURE__ */ jsxs(KeyboundForm, { onSubmit: handleSubmit, className: "flex flex-1 flex-col", children: [
|
|
80
|
+
/* @__PURE__ */ jsx(RouteDrawer.Body, { children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-y-8", children: [
|
|
81
|
+
/* @__PURE__ */ jsxs("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
82
|
+
/* @__PURE__ */ jsx(
|
|
83
|
+
Form.Field,
|
|
84
|
+
{
|
|
85
|
+
control: form.control,
|
|
86
|
+
name: "first_name",
|
|
87
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
88
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("fields.firstName") }),
|
|
89
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
90
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
91
|
+
] })
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ jsx(
|
|
95
|
+
Form.Field,
|
|
96
|
+
{
|
|
97
|
+
control: form.control,
|
|
98
|
+
name: "last_name",
|
|
99
|
+
render: ({ field }) => /* @__PURE__ */ jsxs(Form.Item, { children: [
|
|
100
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("fields.lastName") }),
|
|
101
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsx(Input, { ...field }) }),
|
|
102
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
103
|
+
] })
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
] }),
|
|
107
|
+
/* @__PURE__ */ jsx(
|
|
108
|
+
Form.Field,
|
|
109
|
+
{
|
|
110
|
+
control: form.control,
|
|
111
|
+
name: "language",
|
|
112
|
+
render: ({ field: { ref, ...field } }) => /* @__PURE__ */ jsxs(Form.Item, { className: "gap-y-4", children: [
|
|
113
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
114
|
+
/* @__PURE__ */ jsx(Form.Label, { children: t("profile.fields.languageLabel") }),
|
|
115
|
+
/* @__PURE__ */ jsx(Form.Hint, { children: t("profile.edit.languageHint") })
|
|
116
|
+
] }),
|
|
117
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
118
|
+
/* @__PURE__ */ jsx(Form.Control, { children: /* @__PURE__ */ jsxs(
|
|
119
|
+
Select,
|
|
120
|
+
{
|
|
121
|
+
dir: direction,
|
|
122
|
+
...field,
|
|
123
|
+
onValueChange: field.onChange,
|
|
124
|
+
children: [
|
|
125
|
+
/* @__PURE__ */ jsx(Select.Trigger, { ref, className: "py-1 text-[13px]", children: /* @__PURE__ */ jsx(
|
|
126
|
+
Select.Value,
|
|
127
|
+
{
|
|
128
|
+
placeholder: t("profile.edit.languagePlaceholder"),
|
|
129
|
+
children: sortedLanguages.find(
|
|
130
|
+
(language) => language.code === field.value
|
|
131
|
+
)?.display_name
|
|
132
|
+
}
|
|
133
|
+
) }),
|
|
134
|
+
/* @__PURE__ */ jsx(Select.Content, { children: languages.map((language) => /* @__PURE__ */ jsx(
|
|
135
|
+
Select.Item,
|
|
136
|
+
{
|
|
137
|
+
value: language.code,
|
|
138
|
+
children: language.display_name
|
|
139
|
+
},
|
|
140
|
+
language.code
|
|
141
|
+
)) })
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
) }),
|
|
145
|
+
/* @__PURE__ */ jsx(Form.ErrorMessage, {})
|
|
146
|
+
] })
|
|
147
|
+
] })
|
|
148
|
+
}
|
|
149
|
+
)
|
|
150
|
+
] }) }),
|
|
151
|
+
/* @__PURE__ */ jsx(RouteDrawer.Footer, { children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-x-2", children: [
|
|
152
|
+
/* @__PURE__ */ jsx(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ jsx(Button, { size: "small", variant: "secondary", children: t("actions.cancel") }) }),
|
|
153
|
+
/* @__PURE__ */ jsx(Button, { size: "small", type: "submit", isLoading: isPending, children: t("actions.save") })
|
|
154
|
+
] }) })
|
|
155
|
+
] }) });
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
// src/routes/profile/profile-edit/profile-edit.tsx
|
|
159
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
160
|
+
var ProfileEdit = () => {
|
|
161
|
+
const { user, isPending: isLoading, isError, error } = useMe();
|
|
162
|
+
const { t } = useTranslation2();
|
|
163
|
+
if (isError) {
|
|
164
|
+
throw error;
|
|
165
|
+
}
|
|
166
|
+
return /* @__PURE__ */ jsxs2(RouteDrawer, { children: [
|
|
167
|
+
/* @__PURE__ */ jsx2(RouteDrawer.Header, { className: "capitalize", children: /* @__PURE__ */ jsx2(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ jsx2(Heading, { children: t("profile.edit.header") }) }) }),
|
|
168
|
+
!isLoading && user && /* @__PURE__ */ jsx2(EditProfileForm, { user })
|
|
169
|
+
] });
|
|
170
|
+
};
|
|
171
|
+
export {
|
|
172
|
+
ProfileEdit as Component
|
|
173
|
+
};
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
+
import "./chunk-RREPQMYC.mjs";
|
|
2
|
+
import "./chunk-G2VJOHHV.mjs";
|
|
1
3
|
import {
|
|
2
4
|
i18n
|
|
3
5
|
} from "./chunk-W3WS3HKB.mjs";
|
|
4
|
-
import "./chunk-C5P5PL3E.mjs";
|
|
5
|
-
import "./chunk-JSJZMTQG.mjs";
|
|
6
6
|
import {
|
|
7
|
-
Form,
|
|
8
7
|
useResetPasswordForEmailPass,
|
|
9
8
|
useUpdateProviderForEmailPass
|
|
10
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-GBFVWROS.mjs";
|
|
10
|
+
import "./chunk-C5P5PL3E.mjs";
|
|
11
|
+
import {
|
|
12
|
+
Form
|
|
13
|
+
} from "./chunk-ND3ODI36.mjs";
|
|
14
|
+
import "./chunk-DTY37DDZ.mjs";
|
|
11
15
|
import "./chunk-QZ7TP4HQ.mjs";
|
|
12
16
|
|
|
13
17
|
// src/routes/reset-password/reset-password.tsx
|