@open-mercato/checkout 0.6.7 → 0.6.8-develop.6874.1.982d6097d8

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 (75) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/dist/modules/checkout/__integration__/TC-CHKT-042.spec.js +39 -0
  3. package/dist/modules/checkout/__integration__/TC-CHKT-042.spec.js.map +7 -0
  4. package/dist/modules/checkout/__integration__/TC-CHKT-043-concurrent-status-update.spec.js +62 -0
  5. package/dist/modules/checkout/__integration__/TC-CHKT-043-concurrent-status-update.spec.js.map +7 -0
  6. package/dist/modules/checkout/api/pay/[slug]/submit/route.js +43 -28
  7. package/dist/modules/checkout/api/pay/[slug]/submit/route.js.map +2 -2
  8. package/dist/modules/checkout/api/transactions/route.js +23 -6
  9. package/dist/modules/checkout/api/transactions/route.js.map +2 -2
  10. package/dist/modules/checkout/backend/checkout/pay-links/page.js +2 -1
  11. package/dist/modules/checkout/backend/checkout/pay-links/page.js.map +2 -2
  12. package/dist/modules/checkout/backend/checkout/templates/page.js +2 -1
  13. package/dist/modules/checkout/backend/checkout/templates/page.js.map +2 -2
  14. package/dist/modules/checkout/backend/checkout/transactions/page.js +2 -1
  15. package/dist/modules/checkout/backend/checkout/transactions/page.js.map +2 -2
  16. package/dist/modules/checkout/commands/links.js +1 -1
  17. package/dist/modules/checkout/commands/links.js.map +2 -2
  18. package/dist/modules/checkout/commands/transactions.js +45 -13
  19. package/dist/modules/checkout/commands/transactions.js.map +2 -2
  20. package/dist/modules/checkout/components/CustomerFieldsEditor.js +2 -2
  21. package/dist/modules/checkout/components/CustomerFieldsEditor.js.map +2 -2
  22. package/dist/modules/checkout/components/GatewaySettingsFields.js +2 -2
  23. package/dist/modules/checkout/components/GatewaySettingsFields.js.map +2 -2
  24. package/dist/modules/checkout/components/LinkTemplateForm.js +8 -8
  25. package/dist/modules/checkout/components/LinkTemplateForm.js.map +2 -2
  26. package/dist/modules/checkout/components/LogoUploadField.js +1 -1
  27. package/dist/modules/checkout/components/LogoUploadField.js.map +2 -2
  28. package/dist/modules/checkout/components/PayPage.js +39 -38
  29. package/dist/modules/checkout/components/PayPage.js.map +2 -2
  30. package/dist/modules/checkout/extension-points.js +68 -0
  31. package/dist/modules/checkout/extension-points.js.map +7 -0
  32. package/dist/modules/checkout/lib/transaction-status-machine.js +31 -0
  33. package/dist/modules/checkout/lib/transaction-status-machine.js.map +7 -0
  34. package/dist/modules/checkout/search.js +44 -6
  35. package/dist/modules/checkout/search.js.map +2 -2
  36. package/dist/modules/checkout/setup.js +28 -0
  37. package/dist/modules/checkout/setup.js.map +2 -2
  38. package/dist/modules/checkout/subscribers/search-reindex-transaction-created.js +32 -0
  39. package/dist/modules/checkout/subscribers/search-reindex-transaction-created.js.map +7 -0
  40. package/dist/modules/checkout/workers/transaction-expiry.worker.js +9 -2
  41. package/dist/modules/checkout/workers/transaction-expiry.worker.js.map +2 -2
  42. package/package.json +10 -9
  43. package/src/modules/checkout/__integration__/TC-CHKT-042.spec.ts +41 -0
  44. package/src/modules/checkout/__integration__/TC-CHKT-043-concurrent-status-update.spec.ts +112 -0
  45. package/src/modules/checkout/__tests__/search.test.ts +21 -0
  46. package/src/modules/checkout/__tests__/setup-schedules.test.ts +99 -0
  47. package/src/modules/checkout/api/pay/[slug]/submit/__tests__/route.test.ts +77 -0
  48. package/src/modules/checkout/api/pay/[slug]/submit/route.ts +58 -28
  49. package/src/modules/checkout/api/transactions/__tests__/route.test.ts +113 -0
  50. package/src/modules/checkout/api/transactions/route.ts +30 -6
  51. package/src/modules/checkout/backend/checkout/pay-links/page.tsx +2 -1
  52. package/src/modules/checkout/backend/checkout/templates/page.tsx +2 -1
  53. package/src/modules/checkout/backend/checkout/transactions/page.tsx +2 -1
  54. package/src/modules/checkout/commands/__tests__/update-transaction-status.test.ts +363 -0
  55. package/src/modules/checkout/commands/links.ts +5 -1
  56. package/src/modules/checkout/commands/transactions.ts +68 -13
  57. package/src/modules/checkout/components/CustomerFieldsEditor.tsx +2 -2
  58. package/src/modules/checkout/components/GatewaySettingsFields.tsx +2 -2
  59. package/src/modules/checkout/components/LinkTemplateForm.tsx +8 -8
  60. package/src/modules/checkout/components/LogoUploadField.tsx +1 -1
  61. package/src/modules/checkout/components/PayPage.tsx +38 -37
  62. package/src/modules/checkout/extension-points.ts +67 -0
  63. package/src/modules/checkout/i18n/de.json +1 -0
  64. package/src/modules/checkout/i18n/en.json +1 -0
  65. package/src/modules/checkout/i18n/es.json +1 -0
  66. package/src/modules/checkout/i18n/ko.json +463 -0
  67. package/src/modules/checkout/i18n/pl.json +1 -0
  68. package/src/modules/checkout/lib/__tests__/transaction-status-machine.test.ts +152 -0
  69. package/src/modules/checkout/lib/transaction-status-machine.ts +71 -0
  70. package/src/modules/checkout/search.ts +44 -6
  71. package/src/modules/checkout/setup.ts +51 -0
  72. package/src/modules/checkout/subscribers/__tests__/search-reindex-transaction-created.test.ts +29 -0
  73. package/src/modules/checkout/subscribers/search-reindex-transaction-created.ts +39 -0
  74. package/src/modules/checkout/workers/__tests__/transaction-expiry.worker.test.ts +124 -0
  75. package/src/modules/checkout/workers/transaction-expiry.worker.ts +11 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/modules/checkout/components/LogoUploadField.tsx"],
4
- "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { ImagePlus, Link2, Loader2, Paperclip, Trash2 } from 'lucide-react'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { apiCall } from '@open-mercato/ui/backend/utils/apiCall'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { Input } from '@open-mercato/ui/primitives/input'\nimport { Label } from '@open-mercato/ui/primitives/label'\nimport { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'\nimport { buildCheckoutAttachmentPreviewUrl } from '../lib/client-utils'\n\ntype UploadResponse = {\n item?: {\n id?: string\n url?: string\n thumbnailUrl?: string\n }\n error?: string\n}\n\ntype Props = {\n entityId: string\n recordId: string\n attachmentId: string | null | undefined\n logoUrl: string | null | undefined\n error?: string\n onChange: (next: { logoAttachmentId: string | null; logoUrl: string | null }) => void\n}\n\nfunction resolvePreviewUrl(attachmentId: string | null | undefined, logoUrl: string | null | undefined): string | null {\n return buildCheckoutAttachmentPreviewUrl(attachmentId) ?? (typeof logoUrl === 'string' && logoUrl.trim().length > 0 ? logoUrl.trim() : null)\n}\n\nexport function LogoUploadField({ entityId, recordId, attachmentId, logoUrl, error: externalError, onChange }: Props) {\n const t = useT()\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const [uploading, setUploading] = React.useState(false)\n const [error, setError] = React.useState<string | null>(null)\n const [previewUrl, setPreviewUrl] = React.useState<string | null>(() => resolvePreviewUrl(attachmentId, logoUrl))\n\n React.useEffect(() => {\n setPreviewUrl(resolvePreviewUrl(attachmentId, logoUrl))\n }, [attachmentId, logoUrl])\n\n const deleteAttachment = React.useCallback(async (targetId: string | null | undefined) => {\n if (!targetId) return\n await apiCall(`/api/attachments?id=${encodeURIComponent(targetId)}`, { method: 'DELETE' })\n }, [])\n\n const handleUpload = React.useCallback(\n async (files: FileList | null) => {\n const file = files?.[0]\n if (!file) return\n setUploading(true)\n setError(null)\n try {\n const previousAttachmentId = attachmentId\n const formData = new FormData()\n formData.set('entityId', entityId)\n formData.set('recordId', recordId)\n formData.set('file', file)\n const call = await apiCall<UploadResponse>('/api/attachments', {\n method: 'POST',\n body: formData,\n })\n if (!call.ok || !call.result?.item?.id) {\n const message = call.result?.error || t('checkout.logoUpload.errors.upload')\n throw new Error(message)\n }\n const nextAttachmentId = call.result.item.id\n setPreviewUrl(call.result.item.thumbnailUrl ?? buildCheckoutAttachmentPreviewUrl(nextAttachmentId) ?? call.result.item.url ?? null)\n onChange({\n logoAttachmentId: nextAttachmentId,\n logoUrl: logoUrl ?? null,\n })\n if (previousAttachmentId && previousAttachmentId !== nextAttachmentId) {\n await deleteAttachment(previousAttachmentId)\n }\n } catch (uploadError) {\n setError(uploadError instanceof Error ? uploadError.message : t('checkout.logoUpload.errors.upload'))\n } finally {\n setUploading(false)\n if (inputRef.current) inputRef.current.value = ''\n }\n },\n [attachmentId, deleteAttachment, entityId, logoUrl, onChange, recordId],\n )\n\n const handleRemoveUpload = React.useCallback(async () => {\n setError(null)\n try {\n if (attachmentId) {\n await deleteAttachment(attachmentId)\n }\n } catch (removeError) {\n setError(removeError instanceof Error ? removeError.message : t('checkout.logoUpload.errors.remove'))\n }\n setPreviewUrl(resolvePreviewUrl(null, logoUrl))\n onChange({ logoAttachmentId: null, logoUrl: logoUrl ?? null })\n }, [attachmentId, deleteAttachment, logoUrl, onChange])\n\n return (\n <div className=\"space-y-3 rounded-xl border border-border/70 bg-muted/30 p-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div className=\"space-y-1\">\n <div className=\"flex items-center gap-2 text-sm font-medium\">\n <ImagePlus className=\"h-4 w-4 text-muted-foreground\" />\n {t('checkout.logoUpload.title')}\n </div>\n <p className=\"text-xs text-muted-foreground\">\n {t('checkout.logoUpload.description')}\n </p>\n </div>\n <div className=\"flex flex-wrap gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => inputRef.current?.click()}\n disabled={uploading}\n >\n {uploading ? <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" /> : <Paperclip className=\"mr-2 h-4 w-4\" />}\n {uploading ? t('checkout.logoUpload.actions.uploading') : t('checkout.logoUpload.actions.attach')}\n </Button>\n {attachmentId ? (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void handleRemoveUpload()}\n >\n <Trash2 className=\"mr-2 h-4 w-4\" />\n {t('checkout.logoUpload.actions.removeUpload')}\n </Button>\n ) : null}\n </div>\n </div>\n\n <input\n ref={inputRef}\n type=\"file\"\n accept=\"image/*\"\n className=\"hidden\"\n onChange={(event) => void handleUpload(event.target.files)}\n />\n\n <div className=\"rounded-lg border border-dashed border-border/70 bg-background px-4 py-6\">\n {previewUrl ? (\n <img src={previewUrl} alt={t('checkout.logoUpload.previewAlt')} className=\"max-h-24 w-auto object-contain\" />\n ) : (\n <div className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n <ImagePlus className=\"h-4 w-4\" />\n {t('checkout.logoUpload.empty')}\n </div>\n )}\n </div>\n\n <div className=\"space-y-2\">\n <Label className=\"flex items-center gap-2\">\n <Link2 className=\"h-4 w-4 text-muted-foreground\" />\n {t('checkout.logoUpload.externalUrl')}\n </Label>\n <Input\n value={logoUrl ?? ''}\n onChange={(event) => {\n setError(null)\n onChange({\n logoAttachmentId: attachmentId ?? null,\n logoUrl: event.target.value || null,\n })\n }}\n placeholder={t('checkout.logoUpload.externalUrlPlaceholder')}\n />\n </div>\n\n {attachmentId ? (\n <Alert variant=\"info\">\n <AlertDescription>\n {t('checkout.logoUpload.notices.attachmentWins')}\n </AlertDescription>\n </Alert>\n ) : null}\n {externalError ? <p className=\"text-xs text-destructive\">{externalError}</p> : null}\n {error ? <p className=\"text-xs text-destructive\">{error}</p> : null}\n </div>\n )\n}\n\nexport default LogoUploadField\n"],
5
- "mappings": ";AA0GU,SACE,KADF;AAxGV,YAAY,WAAW;AACvB,SAAS,WAAW,OAAO,SAAS,WAAW,cAAc;AAC7D,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,aAAa;AACtB,SAAS,OAAO,wBAAwB;AACxC,SAAS,yCAAyC;AAoBlD,SAAS,kBAAkB,cAAyC,SAAmD;AACrH,SAAO,kCAAkC,YAAY,MAAM,OAAO,YAAY,YAAY,QAAQ,KAAK,EAAE,SAAS,IAAI,QAAQ,KAAK,IAAI;AACzI;AAEO,SAAS,gBAAgB,EAAE,UAAU,UAAU,cAAc,SAAS,OAAO,eAAe,SAAS,GAAU;AACpH,QAAM,IAAI,KAAK;AACf,QAAM,WAAW,MAAM,OAAgC,IAAI;AAC3D,QA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B,oBAAC,OAAE,WAAU,4BAA4B,yBAAc,IAAO;AAAA,IAC9E,QAAQ,oBAAC,OAAE,WAAU,4BAA4B,iBAAM,IAAO;AAAA,KACjE;AAEJ;AAEA,IAAO,0BAAQ;",
4
+ "sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { ImagePlus, Link2, Loader2, Paperclip, Trash2 } from 'lucide-react'\nimport { useT } from '@open-mercato/shared/lib/i18n/context'\nimport { apiCall } from '@open-mercato/ui/backend/utils/apiCall'\nimport { Button } from '@open-mercato/ui/primitives/button'\nimport { Input } from '@open-mercato/ui/primitives/input'\nimport { Label } from '@open-mercato/ui/primitives/label'\nimport { Alert, AlertDescription } from '@open-mercato/ui/primitives/alert'\nimport { buildCheckoutAttachmentPreviewUrl } from '../lib/client-utils'\n\ntype UploadResponse = {\n item?: {\n id?: string\n url?: string\n thumbnailUrl?: string\n }\n error?: string\n}\n\ntype Props = {\n entityId: string\n recordId: string\n attachmentId: string | null | undefined\n logoUrl: string | null | undefined\n error?: string\n onChange: (next: { logoAttachmentId: string | null; logoUrl: string | null }) => void\n}\n\nfunction resolvePreviewUrl(attachmentId: string | null | undefined, logoUrl: string | null | undefined): string | null {\n return buildCheckoutAttachmentPreviewUrl(attachmentId) ?? (typeof logoUrl === 'string' && logoUrl.trim().length > 0 ? logoUrl.trim() : null)\n}\n\nexport function LogoUploadField({ entityId, recordId, attachmentId, logoUrl, error: externalError, onChange }: Props) {\n const t = useT()\n const inputRef = React.useRef<HTMLInputElement | null>(null)\n const [uploading, setUploading] = React.useState(false)\n const [error, setError] = React.useState<string | null>(null)\n const [previewUrl, setPreviewUrl] = React.useState<string | null>(() => resolvePreviewUrl(attachmentId, logoUrl))\n\n React.useEffect(() => {\n setPreviewUrl(resolvePreviewUrl(attachmentId, logoUrl))\n }, [attachmentId, logoUrl])\n\n const deleteAttachment = React.useCallback(async (targetId: string | null | undefined) => {\n if (!targetId) return\n await apiCall(`/api/attachments?id=${encodeURIComponent(targetId)}`, { method: 'DELETE' })\n }, [])\n\n const handleUpload = React.useCallback(\n async (files: FileList | null) => {\n const file = files?.[0]\n if (!file) return\n setUploading(true)\n setError(null)\n try {\n const previousAttachmentId = attachmentId\n const formData = new FormData()\n formData.set('entityId', entityId)\n formData.set('recordId', recordId)\n formData.set('file', file)\n const call = await apiCall<UploadResponse>('/api/attachments', {\n method: 'POST',\n body: formData,\n })\n if (!call.ok || !call.result?.item?.id) {\n const message = call.result?.error || t('checkout.logoUpload.errors.upload')\n throw new Error(message)\n }\n const nextAttachmentId = call.result.item.id\n setPreviewUrl(call.result.item.thumbnailUrl ?? buildCheckoutAttachmentPreviewUrl(nextAttachmentId) ?? call.result.item.url ?? null)\n onChange({\n logoAttachmentId: nextAttachmentId,\n logoUrl: logoUrl ?? null,\n })\n if (previousAttachmentId && previousAttachmentId !== nextAttachmentId) {\n await deleteAttachment(previousAttachmentId)\n }\n } catch (uploadError) {\n setError(uploadError instanceof Error ? uploadError.message : t('checkout.logoUpload.errors.upload'))\n } finally {\n setUploading(false)\n if (inputRef.current) inputRef.current.value = ''\n }\n },\n [attachmentId, deleteAttachment, entityId, logoUrl, onChange, recordId],\n )\n\n const handleRemoveUpload = React.useCallback(async () => {\n setError(null)\n try {\n if (attachmentId) {\n await deleteAttachment(attachmentId)\n }\n } catch (removeError) {\n setError(removeError instanceof Error ? removeError.message : t('checkout.logoUpload.errors.remove'))\n }\n setPreviewUrl(resolvePreviewUrl(null, logoUrl))\n onChange({ logoAttachmentId: null, logoUrl: logoUrl ?? null })\n }, [attachmentId, deleteAttachment, logoUrl, onChange])\n\n return (\n <div className=\"space-y-3 rounded-xl border border-border/70 bg-muted/30 p-4\">\n <div className=\"flex flex-wrap items-center justify-between gap-3\">\n <div className=\"space-y-1\">\n <div className=\"flex items-center gap-2 text-sm font-medium\">\n <ImagePlus className=\"h-4 w-4 text-muted-foreground\" />\n {t('checkout.logoUpload.title')}\n </div>\n <p className=\"text-xs text-muted-foreground\">\n {t('checkout.logoUpload.description')}\n </p>\n </div>\n <div className=\"flex flex-wrap gap-2\">\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => inputRef.current?.click()}\n disabled={uploading}\n >\n {uploading ? <Loader2 className=\"mr-2 h-4 w-4 animate-spin\" /> : <Paperclip className=\"mr-2 h-4 w-4\" />}\n {uploading ? t('checkout.logoUpload.actions.uploading') : t('checkout.logoUpload.actions.attach')}\n </Button>\n {attachmentId ? (\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => void handleRemoveUpload()}\n >\n <Trash2 className=\"mr-2 h-4 w-4\" />\n {t('checkout.logoUpload.actions.removeUpload')}\n </Button>\n ) : null}\n </div>\n </div>\n\n <input\n ref={inputRef}\n type=\"file\"\n accept=\"image/*\"\n className=\"hidden\"\n onChange={(event) => void handleUpload(event.target.files)}\n />\n\n <div className=\"rounded-lg border border-dashed border-border/70 bg-background px-4 py-6\">\n {previewUrl ? (\n <img src={previewUrl} alt={t('checkout.logoUpload.previewAlt')} className=\"max-h-24 w-auto object-contain\" />\n ) : (\n <div className=\"flex items-center gap-2 text-sm text-muted-foreground\">\n <ImagePlus className=\"h-4 w-4\" />\n {t('checkout.logoUpload.empty')}\n </div>\n )}\n </div>\n\n <div className=\"space-y-2\">\n <Label className=\"flex items-center gap-2\">\n <Link2 className=\"h-4 w-4 text-muted-foreground\" />\n {t('checkout.logoUpload.externalUrl')}\n </Label>\n <Input\n value={logoUrl ?? ''}\n onChange={(event) => {\n setError(null)\n onChange({\n logoAttachmentId: attachmentId ?? null,\n logoUrl: event.target.value || null,\n })\n }}\n placeholder={t('checkout.logoUpload.externalUrlPlaceholder')}\n />\n </div>\n\n {attachmentId ? (\n <Alert status=\"information\">\n <AlertDescription>\n {t('checkout.logoUpload.notices.attachmentWins')}\n </AlertDescription>\n </Alert>\n ) : null}\n {externalError ? <p className=\"text-xs text-destructive\">{externalError}</p> : null}\n {error ? <p className=\"text-xs text-destructive\">{error}</p> : null}\n </div>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AC9B,EAAE,2BAA2B;AAAA,OAChC,GAEJ;AAAA,IAEA,qBAAC,SAAI,WAAU,aACb;AAAA,2BAAC,SAAM,WAAU,2BACf;AAAA,4BAAC,SAAM,WAAU,iCAAgC;AAAA,QAChD,EAAE,iCAAiC;AAAA,SACtC;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,OAAO,WAAW;AAAA,UAClB,UAAU,CAAC,UAAU;AACnB,qBAAS,IAAI;AACb,qBAAS;AAAA,cACP,kBAAkB,gBAAgB;AAAA,cAClC,SAAS,MAAM,OAAO,SAAS;AAAA,YACjC,CAAC;AAAA,UACH;AAAA,UACA,aAAa,EAAE,4CAA4C;AAAA;AAAA,MAC7D;AAAA,OACF;AAAA,IAEC,eACC,oBAAC,SAAM,QAAO,eACZ,8BAAC,oBACE,YAAE,4CAA4C,GACjD,GACF,IACE;AAAA,IACH,gBAAgB,oBAAC,OAAE,WAAU,4BAA4B,yBAAc,IAAO;AAAA,IAC9E,QAAQ,oBAAC,OAAE,WAAU,4BAA4B,iBAAM,IAAO;AAAA,KACjE;AAEJ;AAEA,IAAO,0BAAQ;",
6
6
  "names": []
7
7
  }
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
+ import { extensionPoints } from "@open-mercato/checkout/modules/checkout/extension-points";
4
5
  import Link from "next/link";
5
6
  import { useParams, useRouter, useSearchParams } from "next/navigation";
6
- import { ComponentReplacementHandles } from "@open-mercato/shared/modules/widgets/component-registry";
7
7
  import { useLocale, useT } from "@open-mercato/shared/lib/i18n/context";
8
8
  import { locales } from "@open-mercato/shared/lib/i18n/config";
9
9
  import { resolveLocaleFromCandidates } from "@open-mercato/shared/lib/i18n/locale";
@@ -36,17 +36,17 @@ import {
36
36
  } from "../lib/customerDataValidation.js";
37
37
  import { createLogger } from "@open-mercato/shared/lib/logger";
38
38
  const logger = createLogger("checkout").child({ component: "PayPage" });
39
- const PAGE_HANDLE = ComponentReplacementHandles.page("checkout.pay-page");
40
- const HEADER_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "header");
41
- const DESCRIPTION_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "description");
42
- const SUMMARY_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "summary");
43
- const PRICING_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "pricing");
44
- const PAYMENT_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "payment");
45
- const CUSTOMER_FORM_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "customer-form");
46
- const LEGAL_CONSENT_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "legal-consent");
47
- const GATEWAY_FORM_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "gateway-form");
48
- const HELP_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "help");
49
- const FOOTER_HANDLE = ComponentReplacementHandles.section("checkout.pay-page", "footer");
39
+ const PAGE_HANDLE = extensionPoints.hosts.payPage.componentId;
40
+ const HEADER_HANDLE = extensionPoints.hosts.header.componentId;
41
+ const DESCRIPTION_HANDLE = extensionPoints.hosts.description.componentId;
42
+ const SUMMARY_HANDLE = extensionPoints.hosts.summary.componentId;
43
+ const PRICING_HANDLE = extensionPoints.hosts.pricing.componentId;
44
+ const PAYMENT_HANDLE = extensionPoints.hosts.payment.componentId;
45
+ const CUSTOMER_FORM_HANDLE = extensionPoints.hosts.customerForm.componentId;
46
+ const LEGAL_CONSENT_HANDLE = extensionPoints.hosts.legalConsent.componentId;
47
+ const GATEWAY_FORM_HANDLE = extensionPoints.hosts.gatewayForm.componentId;
48
+ const HELP_HANDLE = extensionPoints.hosts.help.componentId;
49
+ const FOOTER_HANDLE = extensionPoints.hosts.footer.componentId;
50
50
  const CHECKOUT_THEME_FALLBACKS = {
51
51
  accent: "#1E3A8A",
52
52
  accentSecondary: "#F59E0B",
@@ -855,9 +855,9 @@ function PayPagePaymentForm({
855
855
  const embeddedPaymentSession = paymentSession?.type === "embedded" ? paymentSession : null;
856
856
  return /* @__PURE__ */ jsxs("section", { className: "space-y-4", children: [
857
857
  submissionError ? /* @__PURE__ */ jsx(Alert, { status: "error", style: "lighter", size: "default", children: /* @__PURE__ */ jsx(AlertDescription, { children: submissionError }) }) : null,
858
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:gateway-widget:before", context: injectionContext }),
858
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.gatewayWidgetBefore.spotId, context: injectionContext }),
859
859
  embeddedPaymentSession && embeddedRenderer ? /* @__PURE__ */ jsxs(Fragment, { children: [
860
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:gateway-widget:renderer:before", context: injectionContext }),
860
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.gatewayRendererBefore.spotId, context: injectionContext }),
861
861
  React.createElement(embeddedRenderer, {
862
862
  providerKey: embeddedPaymentSession.providerKey ?? "",
863
863
  transactionId: activeTransactionId ?? "",
@@ -867,9 +867,9 @@ function PayPagePaymentForm({
867
867
  onComplete,
868
868
  onError
869
869
  }),
870
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:gateway-widget:renderer:after", context: injectionContext })
870
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.gatewayRendererAfter.spotId, context: injectionContext })
871
871
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
872
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:gateway-widget:actions:before", context: injectionContext }),
872
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.gatewayActionsBefore.spotId, context: injectionContext }),
873
873
  /* @__PURE__ */ jsx(
874
874
  Button,
875
875
  {
@@ -886,9 +886,9 @@ function PayPagePaymentForm({
886
886
  ] })
887
887
  }
888
888
  ),
889
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:gateway-widget:actions:after", context: injectionContext })
889
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.gatewayActionsAfter.spotId, context: injectionContext })
890
890
  ] }),
891
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:gateway-widget:after", context: injectionContext }),
891
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.gatewayWidgetAfter.spotId, context: injectionContext }),
892
892
  paymentSession ? /* @__PURE__ */ jsx(
893
893
  Button,
894
894
  {
@@ -971,7 +971,8 @@ function PayPageFooter({ payload, themeTokens }) {
971
971
  en: t("common.languages.english", "English"),
972
972
  pl: t("common.languages.polish", "Polski"),
973
973
  es: t("common.languages.spanish", "Espa\xF1ol"),
974
- de: t("common.languages.german", "Deutsch")
974
+ de: t("common.languages.german", "Deutsch"),
975
+ ko: t("common.languages.korean", "\uD55C\uAD6D\uC5B4")
975
976
  }), [t]);
976
977
  const setLocale = React.useCallback(async (nextLocale) => {
977
978
  if (nextLocale === locale) return;
@@ -1643,9 +1644,9 @@ function PayPage({
1643
1644
  }
1644
1645
  if (!injectionContext) return null;
1645
1646
  const leftColumn = /* @__PURE__ */ jsxs("div", { className: "space-y-6", children: [
1646
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:header:before", context: injectionContext }),
1647
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.headerBefore.spotId, context: injectionContext }),
1647
1648
  /* @__PURE__ */ jsx("div", { "data-component-handle": HEADER_HANDLE, children: /* @__PURE__ */ jsx(HeaderComponent, { payload, preview: isPreview, themeTokens }) }),
1648
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:header:after", context: injectionContext }),
1649
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.headerAfter.spotId, context: injectionContext }),
1649
1650
  payload.description || publicCustomFields.length > 0 ? /* @__PURE__ */ jsxs(Fragment, { children: [
1650
1651
  /* @__PURE__ */ jsx("div", { "data-component-handle": DESCRIPTION_HANDLE, children: /* @__PURE__ */ jsx(
1651
1652
  DescriptionComponent,
@@ -1655,9 +1656,9 @@ function PayPage({
1655
1656
  themeTokens
1656
1657
  }
1657
1658
  ) }),
1658
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:description:after", context: injectionContext })
1659
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.descriptionAfter.spotId, context: injectionContext })
1659
1660
  ] }) : null,
1660
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:customer-fields:before", context: injectionContext }),
1661
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.customerFieldsBefore.spotId, context: injectionContext }),
1661
1662
  shouldCollectCustomerDetails ? /* @__PURE__ */ jsx("div", { "data-component-handle": CUSTOMER_FORM_HANDLE, children: /* @__PURE__ */ jsx(
1662
1663
  CustomerFormComponent,
1663
1664
  {
@@ -1670,10 +1671,10 @@ function PayPage({
1670
1671
  themeTokens
1671
1672
  }
1672
1673
  ) }) : null,
1673
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:customer-fields:after", context: injectionContext })
1674
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.customerFieldsAfter.spotId, context: injectionContext })
1674
1675
  ] });
1675
1676
  const paymentFlow = /* @__PURE__ */ jsxs(Fragment, { children: [
1676
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:pricing:before", context: injectionContext }),
1677
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.pricingBefore.spotId, context: injectionContext }),
1677
1678
  /* @__PURE__ */ jsx("div", { "data-component-handle": PRICING_HANDLE, children: /* @__PURE__ */ jsx(
1678
1679
  PricingComponent,
1679
1680
  {
@@ -1706,8 +1707,8 @@ function PayPage({
1706
1707
  themeTokens
1707
1708
  }
1708
1709
  ) }),
1709
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:pricing:after", context: injectionContext }),
1710
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:summary:before", context: injectionContext }),
1710
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.pricingAfter.spotId, context: injectionContext }),
1711
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.summaryBefore.spotId, context: injectionContext }),
1711
1712
  /* @__PURE__ */ jsx("div", { "data-component-handle": SUMMARY_HANDLE, children: /* @__PURE__ */ jsx(
1712
1713
  SummaryComponent,
1713
1714
  {
@@ -1719,8 +1720,8 @@ function PayPage({
1719
1720
  themeTokens
1720
1721
  }
1721
1722
  ) }),
1722
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:summary:after", context: injectionContext }),
1723
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:legal-consent:before", context: injectionContext }),
1723
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.summaryAfter.spotId, context: injectionContext }),
1724
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.legalConsentBefore.spotId, context: injectionContext }),
1724
1725
  /* @__PURE__ */ jsx("div", { "data-component-handle": LEGAL_CONSENT_HANDLE, children: /* @__PURE__ */ jsx(
1725
1726
  LegalConsentComponent,
1726
1727
  {
@@ -1733,8 +1734,8 @@ function PayPage({
1733
1734
  themeTokens
1734
1735
  }
1735
1736
  ) }),
1736
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:legal-consent:after", context: injectionContext }),
1737
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:submit:before", context: injectionContext }),
1737
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.legalConsentAfter.spotId, context: injectionContext }),
1738
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.submitBefore.spotId, context: injectionContext }),
1738
1739
  /* @__PURE__ */ jsx("div", { "data-component-handle": GATEWAY_FORM_HANDLE, children: /* @__PURE__ */ jsx(
1739
1740
  PaymentFormComponent,
1740
1741
  {
@@ -1763,20 +1764,20 @@ function PayPage({
1763
1764
  themeTokens
1764
1765
  }
1765
1766
  ) }),
1766
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:submit:after", context: injectionContext }),
1767
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:help:before", context: injectionContext }),
1767
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.submitAfter.spotId, context: injectionContext }),
1768
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.helpBefore.spotId, context: injectionContext }),
1768
1769
  /* @__PURE__ */ jsx("div", { "data-component-handle": HELP_HANDLE, children: /* @__PURE__ */ jsx(HelpComponent, { payload, preview: isPreview, themeTokens }) }),
1769
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:help:after", context: injectionContext })
1770
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.helpAfter.spotId, context: injectionContext })
1770
1771
  ] });
1771
1772
  const rightColumn = /* @__PURE__ */ jsxs(Fragment, { children: [
1772
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:payment:before", context: injectionContext }),
1773
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.paymentBefore.spotId, context: injectionContext }),
1773
1774
  /* @__PURE__ */ jsx("div", { "data-component-handle": PAYMENT_HANDLE, children: /* @__PURE__ */ jsx(PaymentSectionComponent, { payload, preview: isPreview, themeTokens, children: paymentFlow }) }),
1774
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:payment:after", context: injectionContext })
1775
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.paymentAfter.spotId, context: injectionContext })
1775
1776
  ] });
1776
1777
  const footer = /* @__PURE__ */ jsxs(Fragment, { children: [
1777
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:footer:before", context: injectionContext }),
1778
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.footerBefore.spotId, context: injectionContext }),
1778
1779
  /* @__PURE__ */ jsx("div", { "data-component-handle": FOOTER_HANDLE, children: /* @__PURE__ */ jsx(FooterComponent, { payload, themeTokens }) }),
1779
- /* @__PURE__ */ jsx(InjectionSpot, { spotId: "checkout.pay-page:footer:after", context: injectionContext })
1780
+ /* @__PURE__ */ jsx(InjectionSpot, { spotId: extensionPoints.hosts.footerAfter.spotId, context: injectionContext })
1780
1781
  ] });
1781
1782
  return /* @__PURE__ */ jsx("div", { "data-component-handle": PAGE_HANDLE, children: /* @__PURE__ */ jsx(
1782
1783
  SurfaceComponent,