@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.
Files changed (83) hide show
  1. package/dist/api-key-management-create-VWUERPPB.mjs +170 -0
  2. package/dist/api-key-management-detail-V4ENQHYY.mjs +306 -0
  3. package/dist/api-key-management-edit-R44OHS7B.mjs +106 -0
  4. package/dist/api-key-management-list-K2XPKF5E.mjs +400 -0
  5. package/dist/app.js +16765 -1370
  6. package/dist/app.mjs +786 -1030
  7. package/dist/chunk-22YYMH6M.mjs +382 -0
  8. package/dist/chunk-2U3RK3JG.mjs +474 -0
  9. package/dist/chunk-535OVBXR.mjs +226 -0
  10. package/dist/chunk-774WSTCC.mjs +19 -0
  11. package/dist/chunk-C76H5USB.mjs +16 -0
  12. package/dist/chunk-DFFLVEZ5.mjs +40 -0
  13. package/dist/chunk-DN3MIYQH.mjs +140 -0
  14. package/dist/chunk-DQCEH3X2.mjs +28 -0
  15. package/dist/chunk-DTY37DDZ.mjs +20 -0
  16. package/dist/chunk-EFRMWHRX.mjs +84 -0
  17. package/dist/chunk-FXYH54JP.mjs +16 -0
  18. package/dist/chunk-G22WWLPG.mjs +44 -0
  19. package/dist/chunk-G2VJOHHV.mjs +32 -0
  20. package/dist/chunk-GBFVWROS.mjs +58 -0
  21. package/dist/chunk-ITNQKZQQ.mjs +142 -0
  22. package/dist/chunk-IUCDCPJU.mjs +0 -0
  23. package/dist/chunk-LKWTBYYC.mjs +35 -0
  24. package/dist/{chunk-4VYJHIB3.mjs → chunk-ND3ODI36.mjs} +0 -72
  25. package/dist/chunk-OAHCJFG3.mjs +17 -0
  26. package/dist/chunk-RPAL6FHW.mjs +73 -0
  27. package/dist/{chunk-JSJZMTQG.mjs → chunk-RREPQMYC.mjs} +14 -41
  28. package/dist/chunk-S3REQHPQ.mjs +86 -0
  29. package/dist/chunk-S4DMV3ZT.mjs +35 -0
  30. package/dist/chunk-ST2YB7JN.mjs +74 -0
  31. package/dist/chunk-TCNCAWYD.mjs +9 -0
  32. package/dist/chunk-ULSPL3DR.mjs +126 -0
  33. package/dist/chunk-WILMJYUB.mjs +35 -0
  34. package/dist/chunk-XIM7X4FB.mjs +83 -0
  35. package/dist/chunk-YLPAZ2DP.mjs +1837 -0
  36. package/dist/chunk-YRWSG3YM.mjs +80 -0
  37. package/dist/{invite-S5USGDOZ.mjs → invite-XGPZZBUP.mjs} +15 -7
  38. package/dist/{login-AIMR26AL.mjs → login-GNP3QIPI.mjs} +25 -12
  39. package/dist/profile-detail-YX27F7N6.mjs +96 -0
  40. package/dist/profile-edit-2VRDU75O.mjs +173 -0
  41. package/dist/{reset-password-UQPRHMB3.mjs → reset-password-TWRNZO6Z.mjs} +7 -3
  42. package/dist/settings-3XWLL5LG.mjs +545 -0
  43. package/dist/translation-list-CCEQJNED.mjs +581 -0
  44. package/dist/translations-edit-E57GVUFV.mjs +5376 -0
  45. package/dist/user-detail-KUSRRVNX.mjs +169 -0
  46. package/dist/user-edit-HTN3ZGCL.mjs +114 -0
  47. package/dist/user-invite-E3FAAU3V.mjs +361 -0
  48. package/dist/user-list-KNJ5S3IM.mjs +1116 -0
  49. package/dist/user-metadata-5GQK75DT.mjs +425 -0
  50. package/dist/workflow-execution-detail-LZXCRVNC.mjs +819 -0
  51. package/dist/workflow-execution-list-HQ3V6TML.mjs +175 -0
  52. package/package.json +9 -9
  53. package/src/components/layout/settings-layout/settings-layout.tsx +8 -2
  54. package/src/dashboard-app/routes/get-route.map.tsx +1 -14
  55. package/src/hooks/api/api-keys.tsx +0 -49
  56. package/src/hooks/api/index.ts +0 -1
  57. package/src/providers/keybind-provider/hooks.tsx +0 -145
  58. package/src/routes/translations/translation-list/translation-list.tsx +10 -21
  59. package/src/routes/translations/translations-edit/translations-edit.tsx +14 -11
  60. package/src/vite-env.d.ts +3 -1
  61. package/dist/chunk-FBTP4AJM.mjs +0 -221
  62. package/dist/chunk-QYOO4QR6.mjs +0 -73
  63. package/src/components/data-table/helpers/sales-channels/index.ts +0 -4
  64. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-columns.tsx +0 -61
  65. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-empty-state.tsx +0 -22
  66. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-filters.tsx +0 -33
  67. package/src/components/data-table/helpers/sales-channels/use-sales-channel-table-query.tsx +0 -30
  68. package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/api-key-sales-channel-section.tsx +0 -206
  69. package/src/routes/api-key-management/api-key-management-detail/components/api-key-sales-channel-section/index.ts +0 -1
  70. package/src/routes/store/common/hooks/use-currencies-table-columns.tsx +0 -29
  71. package/src/routes/store/common/hooks/use-currencies-table-query.tsx +0 -21
  72. package/src/routes/store/common/hooks/use-locales-table-columns.tsx +0 -29
  73. package/src/routes/store/common/hooks/use-locales-table-query.tsx +0 -21
  74. package/src/routes/store/store-detail/components/store-general-section/index.ts +0 -1
  75. package/src/routes/store/store-detail/components/store-general-section/store-general-section.tsx +0 -48
  76. package/src/routes/store/store-detail/index.ts +0 -2
  77. package/src/routes/store/store-detail/loader.ts +0 -18
  78. package/src/routes/store/store-detail/store-detail.tsx +0 -42
  79. package/src/routes/store/store-edit/components/edit-store-form/edit-store-form.tsx +0 -83
  80. package/src/routes/store/store-edit/index.ts +0 -1
  81. package/src/routes/store/store-edit/store-edit.tsx +0 -25
  82. package/src/routes/store/store-metadata/index.ts +0 -1
  83. 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"
@@ -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,2 +0,0 @@
1
- export { storeLoader as loader } from "./loader"
2
- export { StoreDetail as Component } from "./store-detail"
@@ -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
- }