@open-mercato/core 0.6.7-develop.6595.1.e93ecd3cfa → 0.6.7-develop.6597.1.b8f069b7fe
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/.turbo/turbo-build.log +1 -1
- package/dist/modules/customers/components/calendar/CalendarTabs.js +1 -1
- package/dist/modules/customers/components/calendar/CalendarTabs.js.map +2 -2
- package/dist/modules/sales/backend/sales/documents/[id]/page.js +2 -17
- package/dist/modules/sales/backend/sales/documents/[id]/page.js.map +2 -2
- package/dist/modules/sales/components/ContactEmailDisplay.js +24 -0
- package/dist/modules/sales/components/ContactEmailDisplay.js.map +7 -0
- package/package.json +7 -7
- package/src/modules/customers/components/calendar/CalendarTabs.tsx +1 -1
- package/src/modules/sales/backend/sales/documents/[id]/page.tsx +4 -15
- package/src/modules/sales/components/ContactEmailDisplay.tsx +27 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Mail } from "lucide-react";
|
|
4
|
+
function ContactEmailDisplay({ value, emptyLabel }) {
|
|
5
|
+
const emailValue = typeof value === "string" ? value.trim() : "";
|
|
6
|
+
if (!emailValue.length) {
|
|
7
|
+
return /* @__PURE__ */ jsx("span", { className: "text-sm text-muted-foreground", children: emptyLabel });
|
|
8
|
+
}
|
|
9
|
+
return /* @__PURE__ */ jsxs(
|
|
10
|
+
"a",
|
|
11
|
+
{
|
|
12
|
+
className: "inline-flex max-w-full items-center gap-2 text-sm text-primary hover:text-primary/80 hover:underline",
|
|
13
|
+
href: `mailto:${emailValue}`,
|
|
14
|
+
children: [
|
|
15
|
+
/* @__PURE__ */ jsx(Mail, { className: "h-4 w-4 shrink-0", "aria-hidden": true }),
|
|
16
|
+
/* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", title: emailValue, children: emailValue })
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
ContactEmailDisplay
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=ContactEmailDisplay.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/modules/sales/components/ContactEmailDisplay.tsx"],
|
|
4
|
+
"sourcesContent": ["\"use client\"\n\nimport * as React from 'react'\nimport { Mail } from 'lucide-react'\n\ntype ContactEmailDisplayProps = {\n value: string | null | undefined\n emptyLabel: string\n}\n\nexport function ContactEmailDisplay({ value, emptyLabel }: ContactEmailDisplayProps) {\n const emailValue = typeof value === 'string' ? value.trim() : ''\n if (!emailValue.length) {\n return <span className=\"text-sm text-muted-foreground\">{emptyLabel}</span>\n }\n return (\n <a\n className=\"inline-flex max-w-full items-center gap-2 text-sm text-primary hover:text-primary/80 hover:underline\"\n href={`mailto:${emailValue}`}\n >\n <Mail className=\"h-4 w-4 shrink-0\" aria-hidden />\n <span className=\"min-w-0 truncate\" title={emailValue}>\n {emailValue}\n </span>\n </a>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAaW,cAGP,YAHO;AAVX,SAAS,YAAY;AAOd,SAAS,oBAAoB,EAAE,OAAO,WAAW,GAA6B;AACnF,QAAM,aAAa,OAAO,UAAU,WAAW,MAAM,KAAK,IAAI;AAC9D,MAAI,CAAC,WAAW,QAAQ;AACtB,WAAO,oBAAC,UAAK,WAAU,iCAAiC,sBAAW;AAAA,EACrE;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,MAAM,UAAU,UAAU;AAAA,MAE1B;AAAA,4BAAC,QAAK,WAAU,oBAAmB,eAAW,MAAC;AAAA,QAC/C,oBAAC,UAAK,WAAU,oBAAmB,OAAO,YACvC,sBACH;AAAA;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-mercato/core",
|
|
3
|
-
"version": "0.6.7-develop.
|
|
3
|
+
"version": "0.6.7-develop.6597.1.b8f069b7fe",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -254,16 +254,16 @@
|
|
|
254
254
|
"zod": "^4.4.3"
|
|
255
255
|
},
|
|
256
256
|
"peerDependencies": {
|
|
257
|
-
"@open-mercato/ai-assistant": "0.6.7-develop.
|
|
258
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
259
|
-
"@open-mercato/ui": "0.6.7-develop.
|
|
257
|
+
"@open-mercato/ai-assistant": "0.6.7-develop.6597.1.b8f069b7fe",
|
|
258
|
+
"@open-mercato/shared": "0.6.7-develop.6597.1.b8f069b7fe",
|
|
259
|
+
"@open-mercato/ui": "0.6.7-develop.6597.1.b8f069b7fe",
|
|
260
260
|
"react": "^19.0.0",
|
|
261
261
|
"react-dom": "^19.0.0"
|
|
262
262
|
},
|
|
263
263
|
"devDependencies": {
|
|
264
|
-
"@open-mercato/ai-assistant": "0.6.7-develop.
|
|
265
|
-
"@open-mercato/shared": "0.6.7-develop.
|
|
266
|
-
"@open-mercato/ui": "0.6.7-develop.
|
|
264
|
+
"@open-mercato/ai-assistant": "0.6.7-develop.6597.1.b8f069b7fe",
|
|
265
|
+
"@open-mercato/shared": "0.6.7-develop.6597.1.b8f069b7fe",
|
|
266
|
+
"@open-mercato/ui": "0.6.7-develop.6597.1.b8f069b7fe",
|
|
267
267
|
"@testing-library/dom": "^10.4.1",
|
|
268
268
|
"@testing-library/jest-dom": "^6.9.1",
|
|
269
269
|
"@testing-library/react": "^16.3.1",
|
|
@@ -24,7 +24,7 @@ export function CalendarTabs({ tab, counts, view, onTabChange, onViewChange }: C
|
|
|
24
24
|
variant="underline"
|
|
25
25
|
>
|
|
26
26
|
<div className="flex flex-wrap items-stretch justify-between gap-x-3 gap-y-2">
|
|
27
|
-
<div className="min-w-0 max-w-full overflow-x-auto">
|
|
27
|
+
<div className="min-w-0 max-w-full overflow-x-auto scrollbar-hide [mask-image:linear-gradient(to_right,black_calc(100%-1.5rem),transparent)] sm:[mask-image:none]">
|
|
28
28
|
<TabsList className="shrink-0">
|
|
29
29
|
<TabsTrigger value="all" leading={<LayoutGrid className="size-4" />}>
|
|
30
30
|
{t('customers.calendar.tabs.all', 'All Scheduled')}
|
|
@@ -37,6 +37,7 @@ import { mapCrudServerErrorToFormErrors } from '@open-mercato/ui/backend/utils/s
|
|
|
37
37
|
import { useT } from '@open-mercato/shared/lib/i18n/context'
|
|
38
38
|
import { useConfirmDialog } from '@open-mercato/ui/backend/confirm-dialog'
|
|
39
39
|
import { cn } from '@open-mercato/shared/lib/utils'
|
|
40
|
+
import { ContactEmailDisplay } from '@open-mercato/core/modules/sales/components/ContactEmailDisplay'
|
|
40
41
|
import { DocumentCustomerCard } from '@open-mercato/core/modules/sales/components/DocumentCustomerCard'
|
|
41
42
|
import { SalesDocumentAddressesSection } from '@open-mercato/core/modules/sales/components/documents/AddressesSection'
|
|
42
43
|
import { SalesDocumentItemsSection } from '@open-mercato/core/modules/sales/components/documents/ItemsSection'
|
|
@@ -3976,21 +3977,9 @@ export default function SalesDocumentDetailPage({
|
|
|
3976
3977
|
]
|
|
3977
3978
|
|
|
3978
3979
|
const renderEmailDisplay = React.useCallback(
|
|
3979
|
-
({ value, emptyLabel }: { value: string | null | undefined; emptyLabel: string }) =>
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
return <span className="text-sm text-muted-foreground">{emptyLabel}</span>
|
|
3983
|
-
}
|
|
3984
|
-
return (
|
|
3985
|
-
<a
|
|
3986
|
-
className="inline-flex items-center gap-2 text-sm text-primary hover:text-primary/80 hover:underline"
|
|
3987
|
-
href={`mailto:${emailValue}`}
|
|
3988
|
-
>
|
|
3989
|
-
<Mail className="h-4 w-4" aria-hidden />
|
|
3990
|
-
<span className="truncate">{emailValue}</span>
|
|
3991
|
-
</a>
|
|
3992
|
-
)
|
|
3993
|
-
},
|
|
3980
|
+
({ value, emptyLabel }: { value: string | null | undefined; emptyLabel: string }) => (
|
|
3981
|
+
<ContactEmailDisplay value={value} emptyLabel={emptyLabel} />
|
|
3982
|
+
),
|
|
3994
3983
|
[]
|
|
3995
3984
|
)
|
|
3996
3985
|
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { Mail } from 'lucide-react'
|
|
5
|
+
|
|
6
|
+
type ContactEmailDisplayProps = {
|
|
7
|
+
value: string | null | undefined
|
|
8
|
+
emptyLabel: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export function ContactEmailDisplay({ value, emptyLabel }: ContactEmailDisplayProps) {
|
|
12
|
+
const emailValue = typeof value === 'string' ? value.trim() : ''
|
|
13
|
+
if (!emailValue.length) {
|
|
14
|
+
return <span className="text-sm text-muted-foreground">{emptyLabel}</span>
|
|
15
|
+
}
|
|
16
|
+
return (
|
|
17
|
+
<a
|
|
18
|
+
className="inline-flex max-w-full items-center gap-2 text-sm text-primary hover:text-primary/80 hover:underline"
|
|
19
|
+
href={`mailto:${emailValue}`}
|
|
20
|
+
>
|
|
21
|
+
<Mail className="h-4 w-4 shrink-0" aria-hidden />
|
|
22
|
+
<span className="min-w-0 truncate" title={emailValue}>
|
|
23
|
+
{emailValue}
|
|
24
|
+
</span>
|
|
25
|
+
</a>
|
|
26
|
+
)
|
|
27
|
+
}
|