@acmekit/dashboard 2.13.7 → 2.13.9
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-VWUERPPB.mjs +170 -0
- package/dist/api-key-management-detail-V4ENQHYY.mjs +306 -0
- package/dist/api-key-management-edit-R44OHS7B.mjs +106 -0
- package/dist/api-key-management-list-K2XPKF5E.mjs +400 -0
- package/dist/app.js +16765 -1370
- package/dist/app.mjs +786 -1030
- package/dist/chunk-22YYMH6M.mjs +382 -0
- package/dist/chunk-2U3RK3JG.mjs +474 -0
- package/dist/chunk-535OVBXR.mjs +226 -0
- package/dist/chunk-774WSTCC.mjs +19 -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-EFRMWHRX.mjs +84 -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-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-ST2YB7JN.mjs +74 -0
- package/dist/chunk-TCNCAWYD.mjs +9 -0
- package/dist/chunk-ULSPL3DR.mjs +126 -0
- package/dist/chunk-WILMJYUB.mjs +35 -0
- package/dist/chunk-XIM7X4FB.mjs +83 -0
- package/dist/chunk-YLPAZ2DP.mjs +1837 -0
- package/dist/chunk-YRWSG3YM.mjs +80 -0
- package/dist/{invite-S5USGDOZ.mjs → invite-XGPZZBUP.mjs} +15 -7
- package/dist/{login-AIMR26AL.mjs → login-GNP3QIPI.mjs} +25 -12
- package/dist/profile-detail-YX27F7N6.mjs +96 -0
- package/dist/profile-edit-2VRDU75O.mjs +173 -0
- package/dist/{reset-password-UQPRHMB3.mjs → reset-password-TWRNZO6Z.mjs} +7 -3
- package/dist/settings-3XWLL5LG.mjs +545 -0
- package/dist/translation-list-CCEQJNED.mjs +581 -0
- package/dist/translations-edit-E57GVUFV.mjs +5376 -0
- package/dist/user-detail-KUSRRVNX.mjs +169 -0
- package/dist/user-edit-HTN3ZGCL.mjs +114 -0
- package/dist/user-invite-E3FAAU3V.mjs +361 -0
- package/dist/user-list-KNJ5S3IM.mjs +1116 -0
- package/dist/user-metadata-5GQK75DT.mjs +425 -0
- package/dist/workflow-execution-detail-LZXCRVNC.mjs +819 -0
- package/dist/workflow-execution-list-HQ3V6TML.mjs +175 -0
- package/package.json +9 -9
- package/src/components/layout/settings-layout/settings-layout.tsx +8 -2
- package/src/dashboard-app/routes/get-route.map.tsx +1 -14
- package/src/hooks/api/api-keys.tsx +0 -49
- package/src/hooks/api/index.ts +0 -1
- package/src/providers/keybind-provider/hooks.tsx +0 -145
- package/src/routes/translations/translation-list/translation-list.tsx +10 -21
- package/src/routes/translations/translations-edit/translations-edit.tsx +14 -11
- package/src/vite-env.d.ts +3 -1
- package/dist/chunk-FBTP4AJM.mjs +0 -221
- package/dist/chunk-QYOO4QR6.mjs +0 -73
- package/src/components/data-table/helpers/sales-channels/index.ts +0 -4
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-columns.tsx +0 -61
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-empty-state.tsx +0 -22
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-filters.tsx +0 -33
- package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-query.tsx +0 -30
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +0 -206
- package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/index.ts +0 -1
- package/src/routes/store/common/hooks/use-currencies-table-columns.tsx +0 -29
- package/src/routes/store/common/hooks/use-currencies-table-query.tsx +0 -21
- package/src/routes/store/common/hooks/use-locales-table-columns.tsx +0 -29
- package/src/routes/store/common/hooks/use-locales-table-query.tsx +0 -21
- package/src/routes/store/store-detail/components/store-general-section/index.ts +0 -1
- package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +0 -48
- package/src/routes/store/store-detail/index.ts +0 -2
- package/src/routes/store/store-detail/loader.ts +0 -18
- package/src/routes/store/store-detail/store-detail.tsx +0 -42
- package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +0 -83
- package/src/routes/store/store-edit/index.ts +0 -1
- package/src/routes/store/store-edit/store-edit.tsx +0 -25
- package/src/routes/store/store-metadata/index.ts +0 -1
- package/src/routes/store/store-metadata/store-metadata.tsx +0 -24
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useQueryParams } from "../../../../hooks/use-query-params"
|
|
2
|
-
|
|
3
|
-
export const useCurrenciesTableQuery = ({
|
|
4
|
-
pageSize = 10,
|
|
5
|
-
prefix,
|
|
6
|
-
}: {
|
|
7
|
-
pageSize?: number
|
|
8
|
-
prefix?: string
|
|
9
|
-
}) => {
|
|
10
|
-
const raw = useQueryParams(["order", "q", "offset"], prefix)
|
|
11
|
-
|
|
12
|
-
const { offset, ...rest } = raw
|
|
13
|
-
|
|
14
|
-
const searchParams = {
|
|
15
|
-
limit: pageSize,
|
|
16
|
-
offset: offset ? parseInt(offset) : 0,
|
|
17
|
-
...rest,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return { searchParams, raw }
|
|
21
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { HttpTypes } from "@acmekit/types"
|
|
2
|
-
import { createColumnHelper } from "@tanstack/react-table"
|
|
3
|
-
import { useMemo } from "react"
|
|
4
|
-
import { useTranslation } from "react-i18next"
|
|
5
|
-
|
|
6
|
-
import {
|
|
7
|
-
TextCell,
|
|
8
|
-
TextHeader,
|
|
9
|
-
} from "../../../../components/table/table-cells/common/text-cell"
|
|
10
|
-
|
|
11
|
-
const columnHelper = createColumnHelper<HttpTypes.AdminLocale>()
|
|
12
|
-
|
|
13
|
-
export const useLocalesTableColumns = () => {
|
|
14
|
-
const { t } = useTranslation()
|
|
15
|
-
|
|
16
|
-
return useMemo(
|
|
17
|
-
() => [
|
|
18
|
-
columnHelper.accessor("code", {
|
|
19
|
-
header: () => <TextHeader text={t("fields.code")} />,
|
|
20
|
-
cell: ({ getValue }) => <TextCell text={getValue()} />,
|
|
21
|
-
}),
|
|
22
|
-
columnHelper.accessor("name", {
|
|
23
|
-
header: () => <TextHeader text={t("fields.name")} />,
|
|
24
|
-
cell: ({ getValue }) => <TextCell text={getValue()} />,
|
|
25
|
-
}),
|
|
26
|
-
],
|
|
27
|
-
[t]
|
|
28
|
-
)
|
|
29
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { useQueryParams } from "../../../../hooks/use-query-params"
|
|
2
|
-
|
|
3
|
-
export const useLocalesTableQuery = ({
|
|
4
|
-
pageSize = 10,
|
|
5
|
-
prefix,
|
|
6
|
-
}: {
|
|
7
|
-
pageSize?: number
|
|
8
|
-
prefix?: string
|
|
9
|
-
}) => {
|
|
10
|
-
const raw = useQueryParams(["order", "q", "offset"], prefix)
|
|
11
|
-
|
|
12
|
-
const { offset, ...rest } = raw
|
|
13
|
-
|
|
14
|
-
const searchParams = {
|
|
15
|
-
limit: pageSize,
|
|
16
|
-
offset: offset ? parseInt(offset) : 0,
|
|
17
|
-
...rest,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return { searchParams, raw }
|
|
21
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./store-general-section"
|
package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { PencilSquare } from "@acmekit/icons"
|
|
2
|
-
import { AdminStore } from "@acmekit/types"
|
|
3
|
-
import { Container, Heading, Text } from "@acmekit/ui"
|
|
4
|
-
import { useTranslation } from "react-i18next"
|
|
5
|
-
|
|
6
|
-
import { ActionMenu } from "../../../../../components/common/action-menu"
|
|
7
|
-
|
|
8
|
-
type StoreGeneralSectionProps = {
|
|
9
|
-
store: AdminStore
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export const StoreGeneralSection = ({ store }: StoreGeneralSectionProps) => {
|
|
13
|
-
const { t } = useTranslation()
|
|
14
|
-
|
|
15
|
-
return (
|
|
16
|
-
<Container className="divide-y p-0">
|
|
17
|
-
<div className="flex items-center justify-between px-6 py-4">
|
|
18
|
-
<div>
|
|
19
|
-
<Heading>{t("store.domain")}</Heading>
|
|
20
|
-
<Text className="text-ui-fg-subtle" size="small">
|
|
21
|
-
{t("store.manageYourStoresDetails")}
|
|
22
|
-
</Text>
|
|
23
|
-
</div>
|
|
24
|
-
<ActionMenu
|
|
25
|
-
groups={[
|
|
26
|
-
{
|
|
27
|
-
actions: [
|
|
28
|
-
{
|
|
29
|
-
icon: <PencilSquare />,
|
|
30
|
-
label: t("actions.edit"),
|
|
31
|
-
to: "edit",
|
|
32
|
-
},
|
|
33
|
-
],
|
|
34
|
-
},
|
|
35
|
-
]}
|
|
36
|
-
/>
|
|
37
|
-
</div>
|
|
38
|
-
<div className="text-ui-fg-subtle grid grid-cols-2 px-6 py-4">
|
|
39
|
-
<Text size="small" leading="compact" weight="plus">
|
|
40
|
-
{t("fields.name")}
|
|
41
|
-
</Text>
|
|
42
|
-
<Text size="small" leading="compact">
|
|
43
|
-
{store.name}
|
|
44
|
-
</Text>
|
|
45
|
-
</div>
|
|
46
|
-
</Container>
|
|
47
|
-
)
|
|
48
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { HttpTypes } from "@acmekit/types"
|
|
2
|
-
|
|
3
|
-
import { retrieveActiveStore, storeQueryKeys } from "../../../hooks/api/store"
|
|
4
|
-
import { queryClient } from "../../../lib/query-client"
|
|
5
|
-
|
|
6
|
-
const storeDetailQuery = () => ({
|
|
7
|
-
queryKey: storeQueryKeys.details(),
|
|
8
|
-
queryFn: async () => retrieveActiveStore(),
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
export const storeLoader = async () => {
|
|
12
|
-
const query = storeDetailQuery()
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
queryClient.getQueryData<HttpTypes.AdminStoreResponse>(query.queryKey) ??
|
|
16
|
-
(await queryClient.fetchQuery(query))
|
|
17
|
-
)
|
|
18
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { useLoaderData } from "react-router-dom"
|
|
2
|
-
|
|
3
|
-
import { useStore } from "../../../hooks/api/store"
|
|
4
|
-
import { StoreGeneralSection } from "./components/store-general-section"
|
|
5
|
-
import { storeLoader } from "./loader"
|
|
6
|
-
|
|
7
|
-
import { SingleColumnPageSkeleton } from "../../../components/common/skeleton"
|
|
8
|
-
import { SingleColumnPage } from "../../../components/layout/pages"
|
|
9
|
-
import { useExtension } from "../../../providers/extension-provider"
|
|
10
|
-
|
|
11
|
-
export const StoreDetail = () => {
|
|
12
|
-
const initialData = useLoaderData() as Awaited<ReturnType<typeof storeLoader>>
|
|
13
|
-
|
|
14
|
-
const { store, isPending, isError, error } = useStore(undefined, {
|
|
15
|
-
initialData,
|
|
16
|
-
})
|
|
17
|
-
|
|
18
|
-
const { getWidgets } = useExtension()
|
|
19
|
-
|
|
20
|
-
if (isPending || !store) {
|
|
21
|
-
return <SingleColumnPageSkeleton sections={1} showJSON showMetadata />
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (isError) {
|
|
25
|
-
throw error
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return (
|
|
29
|
-
<SingleColumnPage
|
|
30
|
-
widgets={{
|
|
31
|
-
before: getWidgets("store.details.before"),
|
|
32
|
-
after: getWidgets("store.details.after"),
|
|
33
|
-
}}
|
|
34
|
-
data={store}
|
|
35
|
-
hasOutlet
|
|
36
|
-
showMetadata
|
|
37
|
-
showJSON
|
|
38
|
-
>
|
|
39
|
-
<StoreGeneralSection store={store} />
|
|
40
|
-
</SingleColumnPage>
|
|
41
|
-
)
|
|
42
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { zodResolver } from "@hookform/resolvers/zod"
|
|
2
|
-
import { HttpTypes } from "@acmekit/types"
|
|
3
|
-
import { Button, Input, toast } from "@acmekit/ui"
|
|
4
|
-
import { useForm } from "react-hook-form"
|
|
5
|
-
import { useTranslation } from "react-i18next"
|
|
6
|
-
import { z } from "zod"
|
|
7
|
-
|
|
8
|
-
import { Form } from "../../../../../components/common/form"
|
|
9
|
-
import { RouteDrawer, useRouteModal } from "../../../../../components/modals"
|
|
10
|
-
import { KeyboundForm } from "../../../../../components/utilities/keybound-form"
|
|
11
|
-
import { useUpdateStore } from "../../../../../hooks/api/store"
|
|
12
|
-
|
|
13
|
-
type EditStoreFormProps = {
|
|
14
|
-
store: HttpTypes.AdminStore
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const EditStoreSchema = z.object({
|
|
18
|
-
name: z.string().min(1),
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
export const EditStoreForm = ({ store }: EditStoreFormProps) => {
|
|
22
|
-
const { t } = useTranslation()
|
|
23
|
-
const { handleSuccess } = useRouteModal()
|
|
24
|
-
const form = useForm<z.infer<typeof EditStoreSchema>>({
|
|
25
|
-
defaultValues: {
|
|
26
|
-
name: store.name,
|
|
27
|
-
},
|
|
28
|
-
resolver: zodResolver(EditStoreSchema),
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
const { mutateAsync, isPending } = useUpdateStore(store.id)
|
|
32
|
-
|
|
33
|
-
const handleSubmit = form.handleSubmit(async (values) => {
|
|
34
|
-
await mutateAsync(values, {
|
|
35
|
-
onSuccess: () => {
|
|
36
|
-
toast.success(t("store.toast.update"))
|
|
37
|
-
handleSuccess()
|
|
38
|
-
},
|
|
39
|
-
onError: (error) => {
|
|
40
|
-
toast.error(error.message)
|
|
41
|
-
},
|
|
42
|
-
})
|
|
43
|
-
})
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<RouteDrawer.Form form={form}>
|
|
47
|
-
<KeyboundForm
|
|
48
|
-
onSubmit={handleSubmit}
|
|
49
|
-
className="flex h-full flex-col overflow-hidden"
|
|
50
|
-
>
|
|
51
|
-
<RouteDrawer.Body className="overflow-y-auto">
|
|
52
|
-
<div className="flex flex-col gap-y-8">
|
|
53
|
-
<Form.Field
|
|
54
|
-
control={form.control}
|
|
55
|
-
name="name"
|
|
56
|
-
render={({ field }) => (
|
|
57
|
-
<Form.Item>
|
|
58
|
-
<Form.Label>{t("fields.name")}</Form.Label>
|
|
59
|
-
<Form.Control>
|
|
60
|
-
<Input placeholder="ACME" {...field} />
|
|
61
|
-
</Form.Control>
|
|
62
|
-
<Form.ErrorMessage />
|
|
63
|
-
</Form.Item>
|
|
64
|
-
)}
|
|
65
|
-
/>
|
|
66
|
-
</div>
|
|
67
|
-
</RouteDrawer.Body>
|
|
68
|
-
<RouteDrawer.Footer>
|
|
69
|
-
<div className="flex items-center justify-end gap-x-2">
|
|
70
|
-
<RouteDrawer.Close asChild>
|
|
71
|
-
<Button size="small" variant="secondary">
|
|
72
|
-
{t("actions.cancel")}
|
|
73
|
-
</Button>
|
|
74
|
-
</RouteDrawer.Close>
|
|
75
|
-
<Button size="small" isLoading={isPending} type="submit">
|
|
76
|
-
{t("actions.save")}
|
|
77
|
-
</Button>
|
|
78
|
-
</div>
|
|
79
|
-
</RouteDrawer.Footer>
|
|
80
|
-
</KeyboundForm>
|
|
81
|
-
</RouteDrawer.Form>
|
|
82
|
-
)
|
|
83
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { StoreEdit as Component } from "./store-edit"
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Heading } from "@acmekit/ui"
|
|
2
|
-
import { useTranslation } from "react-i18next"
|
|
3
|
-
import { RouteDrawer } from "../../../components/modals"
|
|
4
|
-
import { useStore } from "../../../hooks/api/store"
|
|
5
|
-
import { EditStoreForm } from "./components/edit-store-form/edit-store-form"
|
|
6
|
-
|
|
7
|
-
export const StoreEdit = () => {
|
|
8
|
-
const { t } = useTranslation()
|
|
9
|
-
const { store, isPending: isLoading, isError, error } = useStore()
|
|
10
|
-
|
|
11
|
-
if (isError) {
|
|
12
|
-
throw error
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const ready = !!store && !isLoading
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<RouteDrawer>
|
|
19
|
-
<RouteDrawer.Header>
|
|
20
|
-
<Heading>{t("store.edit.header")}</Heading>
|
|
21
|
-
</RouteDrawer.Header>
|
|
22
|
-
{ready && <EditStoreForm store={store} />}
|
|
23
|
-
</RouteDrawer>
|
|
24
|
-
)
|
|
25
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { StoreMetadata as Component } from "./store-metadata"
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { MetadataForm } from "../../../components/forms/metadata-form"
|
|
2
|
-
import { RouteDrawer } from "../../../components/modals"
|
|
3
|
-
import { useStore, useUpdateStore } from "../../../hooks/api"
|
|
4
|
-
|
|
5
|
-
export const StoreMetadata = () => {
|
|
6
|
-
const { store, isPending, isError, error } = useStore()
|
|
7
|
-
|
|
8
|
-
const { mutateAsync, isPending: isMutating } = useUpdateStore(store?.id!)
|
|
9
|
-
|
|
10
|
-
if (isError) {
|
|
11
|
-
throw error
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
return (
|
|
15
|
-
<RouteDrawer>
|
|
16
|
-
<MetadataForm
|
|
17
|
-
isPending={isPending}
|
|
18
|
-
isMutating={isMutating}
|
|
19
|
-
hook={mutateAsync}
|
|
20
|
-
metadata={store?.metadata}
|
|
21
|
-
/>
|
|
22
|
-
</RouteDrawer>
|
|
23
|
-
)
|
|
24
|
-
}
|