@nukleus-sports/ui-patterns 0.2.0 → 0.3.1
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/chunk-JDVXTCUB.js +237 -0
- package/dist/chunk-JDVXTCUB.js.map +1 -0
- package/dist/client.cjs +376 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +45 -0
- package/dist/client.d.ts +45 -0
- package/dist/client.js +127 -0
- package/dist/client.js.map +1 -0
- package/dist/index.cjs +245 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -1
- package/dist/index.d.ts +47 -1
- package/dist/index.js +8 -0
- package/dist/marketing.cjs +244 -251
- package/dist/marketing.cjs.map +1 -1
- package/dist/marketing.d.cts +33 -371
- package/dist/marketing.d.ts +33 -371
- package/dist/marketing.js +232 -457
- package/dist/marketing.js.map +1 -1
- package/package.json +12 -5
package/dist/marketing.js
CHANGED
|
@@ -1,234 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var ENTITY_AVATAR_SIZE_PX = {
|
|
5
|
-
xs: 16,
|
|
6
|
-
sm: 24,
|
|
7
|
-
md: 32,
|
|
8
|
-
lg: 48,
|
|
9
|
-
xl: 64
|
|
10
|
-
};
|
|
11
|
-
var sizeClasses = {
|
|
12
|
-
xs: "h-4 w-4",
|
|
13
|
-
sm: "h-6 w-6",
|
|
14
|
-
md: "h-8 w-8",
|
|
15
|
-
lg: "h-12 w-12",
|
|
16
|
-
xl: "h-16 w-16"
|
|
17
|
-
};
|
|
18
|
-
var initialSizeClasses = {
|
|
19
|
-
xs: "text-[8px]",
|
|
20
|
-
sm: "text-xs",
|
|
21
|
-
md: "text-sm",
|
|
22
|
-
lg: "text-base",
|
|
23
|
-
xl: "text-lg"
|
|
24
|
-
};
|
|
25
|
-
var contactSizeClasses = {
|
|
26
|
-
xs: "h-4 w-4",
|
|
27
|
-
sm: "h-6 w-6",
|
|
28
|
-
md: "h-8 w-8",
|
|
29
|
-
lg: "h-12 w-12",
|
|
30
|
-
xl: "h-16 w-16"
|
|
31
|
-
};
|
|
32
|
-
var contactInitialSizeClasses = {
|
|
33
|
-
xs: "text-[8px]",
|
|
34
|
-
sm: "text-[10px]",
|
|
35
|
-
md: "text-sm",
|
|
36
|
-
lg: "text-base",
|
|
37
|
-
xl: "text-lg"
|
|
38
|
-
};
|
|
39
|
-
function EntityAvatar({
|
|
40
|
-
entityType = "initials",
|
|
41
|
-
entityData,
|
|
42
|
-
firstName,
|
|
43
|
-
lastName,
|
|
44
|
-
name,
|
|
45
|
-
imageUrl,
|
|
46
|
-
resolveImageUrl,
|
|
47
|
-
size = "md",
|
|
48
|
-
className,
|
|
49
|
-
fallbackClassName,
|
|
50
|
-
showInitials = true,
|
|
51
|
-
cacheBreaker
|
|
52
|
-
}) {
|
|
53
|
-
const extractedFirstName = firstName || entityData?.first_name || "";
|
|
54
|
-
const extractedLastName = lastName || entityData?.last_name || "";
|
|
55
|
-
const extractedName = name || entityData?.name || "";
|
|
56
|
-
const isSquared = entityType === "team" || entityType === "company";
|
|
57
|
-
const usesContactSizes = entityType === "contact" || entityType === "company" || entityType === "initials";
|
|
58
|
-
const avatarSizeClasses = usesContactSizes ? contactSizeClasses : sizeClasses;
|
|
59
|
-
const initialsSizeClasses = usesContactSizes ? contactInitialSizeClasses : initialSizeClasses;
|
|
60
|
-
const defaultSize = usesContactSizes ? "sm" : "md";
|
|
61
|
-
const effectiveSize = size || defaultSize;
|
|
62
|
-
const getRawImageUrl = () => {
|
|
63
|
-
if (imageUrl) return imageUrl;
|
|
64
|
-
switch (entityType) {
|
|
65
|
-
case "player":
|
|
66
|
-
return entityData?.player_image_url ?? null;
|
|
67
|
-
case "coach":
|
|
68
|
-
return entityData?.coach_image_url ?? null;
|
|
69
|
-
case "team":
|
|
70
|
-
return entityData?.team_logo_url ?? null;
|
|
71
|
-
case "initials":
|
|
72
|
-
case "contact":
|
|
73
|
-
case "company":
|
|
74
|
-
return entityData?.avatar_url ?? null;
|
|
75
|
-
case "agency":
|
|
76
|
-
return entityData?.profile_image_url ?? null;
|
|
77
|
-
default:
|
|
78
|
-
return null;
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
const getImageUrl = () => {
|
|
82
|
-
const rawUrl = getRawImageUrl();
|
|
83
|
-
if (!rawUrl) return null;
|
|
84
|
-
if (resolveImageUrl) {
|
|
85
|
-
return resolveImageUrl(rawUrl, { entityType, size: effectiveSize, cacheBreaker });
|
|
86
|
-
}
|
|
87
|
-
if (rawUrl.startsWith("http") || rawUrl.startsWith("data:")) {
|
|
88
|
-
return rawUrl;
|
|
89
|
-
}
|
|
90
|
-
return null;
|
|
91
|
-
};
|
|
92
|
-
const getInitials = () => {
|
|
93
|
-
if (!showInitials) {
|
|
94
|
-
const defaults = {
|
|
95
|
-
player: "P",
|
|
96
|
-
coach: "C",
|
|
97
|
-
team: "T",
|
|
98
|
-
contact: "C",
|
|
99
|
-
company: "C",
|
|
100
|
-
agency: "",
|
|
101
|
-
initials: ""
|
|
102
|
-
};
|
|
103
|
-
return defaults[entityType];
|
|
104
|
-
}
|
|
105
|
-
switch (entityType) {
|
|
106
|
-
case "player":
|
|
107
|
-
case "coach":
|
|
108
|
-
case "agency": {
|
|
109
|
-
const first = extractedFirstName?.[0] || "";
|
|
110
|
-
const last = extractedLastName?.[0] || "";
|
|
111
|
-
const initials2 = (first + last).toUpperCase();
|
|
112
|
-
if (initials2) return initials2;
|
|
113
|
-
if (entityType === "player") return "P";
|
|
114
|
-
if (entityType === "coach") return "C";
|
|
115
|
-
return "?";
|
|
116
|
-
}
|
|
117
|
-
case "team": {
|
|
118
|
-
const teamName = entityData?.team || "";
|
|
119
|
-
const nickname = entityData?.nickname || "";
|
|
120
|
-
const displayName = nickname || teamName || "";
|
|
121
|
-
const words = displayName.trim().split(/\s+/);
|
|
122
|
-
if (words.length >= 2) {
|
|
123
|
-
return (words[0][0] + words[1][0]).toUpperCase();
|
|
124
|
-
} else if (words.length === 1 && words[0].length >= 2) {
|
|
125
|
-
return words[0].substring(0, 2).toUpperCase();
|
|
126
|
-
}
|
|
127
|
-
return "T";
|
|
128
|
-
}
|
|
129
|
-
case "initials": {
|
|
130
|
-
const displayName = extractedName.trim();
|
|
131
|
-
if (!displayName) return "?";
|
|
132
|
-
const nameParts = displayName.trim().split(/\s+/);
|
|
133
|
-
if (nameParts.length >= 2) {
|
|
134
|
-
return (nameParts[0][0] + nameParts[nameParts.length - 1][0]).toUpperCase();
|
|
135
|
-
}
|
|
136
|
-
return displayName.substring(0, 2).toUpperCase();
|
|
137
|
-
}
|
|
138
|
-
case "contact":
|
|
139
|
-
case "company": {
|
|
140
|
-
const displayName = extractedName;
|
|
141
|
-
if (!displayName) return "C";
|
|
142
|
-
const nameParts = displayName.trim().split(/\s+/);
|
|
143
|
-
if (nameParts.length >= 2) {
|
|
144
|
-
if (entityType === "company") {
|
|
145
|
-
return (nameParts[0][0] + nameParts[1][0]).toUpperCase();
|
|
146
|
-
} else {
|
|
147
|
-
return (nameParts[0][0] + nameParts[nameParts.length - 1][0]).toUpperCase();
|
|
148
|
-
}
|
|
149
|
-
}
|
|
150
|
-
return displayName.substring(0, 2).toUpperCase();
|
|
151
|
-
}
|
|
152
|
-
default:
|
|
153
|
-
return "?";
|
|
154
|
-
}
|
|
155
|
-
};
|
|
156
|
-
const getDefaultImageUrl = () => {
|
|
157
|
-
switch (entityType) {
|
|
158
|
-
case "player":
|
|
159
|
-
case "coach":
|
|
160
|
-
return "/images/headshot_default.png";
|
|
161
|
-
case "team":
|
|
162
|
-
return "/images/team_default.png";
|
|
163
|
-
case "contact":
|
|
164
|
-
return "/images/contact_default.png";
|
|
165
|
-
case "company":
|
|
166
|
-
return "/images/company_default.png";
|
|
167
|
-
case "agency":
|
|
168
|
-
return "/images/agency_default.png";
|
|
169
|
-
case "initials":
|
|
170
|
-
return "/images/headshot_default.png";
|
|
171
|
-
default:
|
|
172
|
-
return "/images/headshot_default.png";
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
const getAltText = () => {
|
|
176
|
-
switch (entityType) {
|
|
177
|
-
case "player":
|
|
178
|
-
return `${extractedFirstName} ${extractedLastName}`.trim() || "Player avatar";
|
|
179
|
-
case "coach":
|
|
180
|
-
return `${extractedFirstName} ${extractedLastName}`.trim() || "Coach avatar";
|
|
181
|
-
case "team":
|
|
182
|
-
return `${entityData?.team || entityData?.nickname || "Team"} logo`;
|
|
183
|
-
case "initials":
|
|
184
|
-
return `${extractedName}`.trim() || "User avatar";
|
|
185
|
-
case "contact":
|
|
186
|
-
return extractedName || "Profile Picture";
|
|
187
|
-
case "company":
|
|
188
|
-
return extractedName || "Company avatar";
|
|
189
|
-
case "agency":
|
|
190
|
-
return `${extractedFirstName} ${extractedLastName}`.trim() || "User avatar";
|
|
191
|
-
default:
|
|
192
|
-
return "Avatar";
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
const processedImageUrl = getImageUrl();
|
|
196
|
-
const defaultImageUrl = getDefaultImageUrl();
|
|
197
|
-
const initials = getInitials();
|
|
198
|
-
const altText = getAltText();
|
|
199
|
-
const hasValidImage = Boolean(
|
|
200
|
-
processedImageUrl && processedImageUrl !== "null" && processedImageUrl !== null && processedImageUrl.trim() !== ""
|
|
201
|
-
);
|
|
202
|
-
return /* @__PURE__ */ jsxs(Avatar, { className: cn(avatarSizeClasses[effectiveSize], isSquared && "rounded-lg", className), children: [
|
|
203
|
-
hasValidImage && /* @__PURE__ */ jsx(AvatarImage, { src: processedImageUrl, alt: altText }),
|
|
204
|
-
/* @__PURE__ */ jsx(
|
|
205
|
-
AvatarFallback,
|
|
206
|
-
{
|
|
207
|
-
className: cn(
|
|
208
|
-
initialsSizeClasses[effectiveSize],
|
|
209
|
-
isSquared && "rounded-lg bg-greys-grey-table-h",
|
|
210
|
-
fallbackClassName
|
|
211
|
-
),
|
|
212
|
-
children: entityType === "contact" || entityType === "initials" ? initials : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
213
|
-
/* @__PURE__ */ jsx(
|
|
214
|
-
"img",
|
|
215
|
-
{
|
|
216
|
-
src: defaultImageUrl,
|
|
217
|
-
alt: altText,
|
|
218
|
-
className: "aspect-square h-full w-full object-cover"
|
|
219
|
-
}
|
|
220
|
-
),
|
|
221
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: initials })
|
|
222
|
-
] })
|
|
223
|
-
}
|
|
224
|
-
)
|
|
225
|
-
] });
|
|
226
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
EntityAvatar
|
|
3
|
+
} from "./chunk-JDVXTCUB.js";
|
|
227
4
|
|
|
228
5
|
// src/marketing/row-actions-dropdown.tsx
|
|
229
6
|
import {
|
|
230
7
|
Button,
|
|
231
|
-
cn
|
|
8
|
+
cn,
|
|
232
9
|
DropdownMenu,
|
|
233
10
|
DropdownMenuContent,
|
|
234
11
|
DropdownMenuItem,
|
|
@@ -239,7 +16,7 @@ import {
|
|
|
239
16
|
TooltipTrigger
|
|
240
17
|
} from "@nukleus-sports/ui-web";
|
|
241
18
|
import { MoreIcon } from "@nukleus-sports/icons";
|
|
242
|
-
import { jsx
|
|
19
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
243
20
|
function RowActionsDropdown({
|
|
244
21
|
actions,
|
|
245
22
|
trigger,
|
|
@@ -251,28 +28,28 @@ function RowActionsDropdown({
|
|
|
251
28
|
}) {
|
|
252
29
|
const visibleActions = actions.filter((a) => a.when !== false);
|
|
253
30
|
if (visibleActions.length === 0) return null;
|
|
254
|
-
return /* @__PURE__ */
|
|
255
|
-
/* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { modal, children: [
|
|
32
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ jsx(
|
|
256
33
|
Button,
|
|
257
34
|
{
|
|
258
35
|
variant: "text",
|
|
259
36
|
size: "sm",
|
|
260
37
|
"aria-label": ariaLabel ?? "Row actions",
|
|
261
38
|
onClick: (e) => e.stopPropagation(),
|
|
262
|
-
className:
|
|
263
|
-
children: /* @__PURE__ */
|
|
39
|
+
className: cn("h-8 w-8 p-0 shrink-0", triggerClassName),
|
|
40
|
+
children: /* @__PURE__ */ jsx(MoreIcon, { className: "h-14 w-16 text-btn-primary", "aria-hidden": "true" })
|
|
264
41
|
}
|
|
265
42
|
) }),
|
|
266
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
267
44
|
DropdownMenuContent,
|
|
268
45
|
{
|
|
269
46
|
align,
|
|
270
|
-
className:
|
|
47
|
+
className: cn(
|
|
271
48
|
"rounded-[10px] bg-table px-0 py-2 dark:border dark:border-text-secondary shadow-[0_4px_18px_-6px_rgba(0,0,0,0.12)]",
|
|
272
49
|
contentClassName
|
|
273
50
|
),
|
|
274
51
|
children: visibleActions.map((action, i) => {
|
|
275
|
-
const item = /* @__PURE__ */
|
|
52
|
+
const item = /* @__PURE__ */ jsx(
|
|
276
53
|
DropdownMenuItem,
|
|
277
54
|
{
|
|
278
55
|
disabled: action.disabled,
|
|
@@ -284,7 +61,7 @@ function RowActionsDropdown({
|
|
|
284
61
|
}
|
|
285
62
|
action.onClick(e);
|
|
286
63
|
},
|
|
287
|
-
className:
|
|
64
|
+
className: cn(
|
|
288
65
|
action.destructive && "text-semantic-color-status-priority-blocked-hot-copy hover:!text-semantic-color-status-priority-blocked-hot-copy",
|
|
289
66
|
action.className
|
|
290
67
|
),
|
|
@@ -293,9 +70,9 @@ function RowActionsDropdown({
|
|
|
293
70
|
i
|
|
294
71
|
);
|
|
295
72
|
if (action.disabled && action.disabledTooltip) {
|
|
296
|
-
return /* @__PURE__ */
|
|
297
|
-
/* @__PURE__ */
|
|
298
|
-
/* @__PURE__ */
|
|
73
|
+
return /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
74
|
+
/* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx("div", { children: item }) }),
|
|
75
|
+
/* @__PURE__ */ jsx(TooltipContent, { children: action.disabledTooltip })
|
|
299
76
|
] }) }, i);
|
|
300
77
|
}
|
|
301
78
|
return item;
|
|
@@ -306,26 +83,26 @@ function RowActionsDropdown({
|
|
|
306
83
|
}
|
|
307
84
|
|
|
308
85
|
// src/marketing/deal-empty-state.tsx
|
|
309
|
-
import { cn as
|
|
310
|
-
import { jsx as
|
|
86
|
+
import { cn as cn2 } from "@nukleus-sports/ui-web";
|
|
87
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
311
88
|
function DealEmptyState({ message, className, messageClassName }) {
|
|
312
|
-
return /* @__PURE__ */
|
|
89
|
+
return /* @__PURE__ */ jsx2("div", { className: cn2("flex items-center justify-center py-10 px-6", className), children: /* @__PURE__ */ jsx2(
|
|
313
90
|
"p",
|
|
314
91
|
{
|
|
315
|
-
className:
|
|
92
|
+
className: cn2("body-text text-text-secondary text-center max-w-[380px]", messageClassName),
|
|
316
93
|
children: message
|
|
317
94
|
}
|
|
318
95
|
) });
|
|
319
96
|
}
|
|
320
97
|
|
|
321
98
|
// src/marketing/contract-details-card.tsx
|
|
322
|
-
import { cn as
|
|
99
|
+
import { cn as cn3 } from "@nukleus-sports/ui-web";
|
|
323
100
|
import { formatDealDate } from "@nukleus-sports/core";
|
|
324
|
-
import { jsx as
|
|
101
|
+
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
325
102
|
function Row({ label, children }) {
|
|
326
|
-
return /* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
/* @__PURE__ */
|
|
103
|
+
return /* @__PURE__ */ jsxs2("div", { className: "flex min-w-0 flex-col gap-2", children: [
|
|
104
|
+
/* @__PURE__ */ jsx3("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: label }),
|
|
105
|
+
/* @__PURE__ */ jsx3("div", { className: "body-text text-text-primary whitespace-pre-wrap break-words font-ss02-ss05", children })
|
|
329
106
|
] });
|
|
330
107
|
}
|
|
331
108
|
function usageAfterTerm({
|
|
@@ -342,31 +119,31 @@ function ContractDetailsCard({
|
|
|
342
119
|
}) {
|
|
343
120
|
const usage = usageAfterTerm(details);
|
|
344
121
|
const exclusive = details.is_exclusive == null ? null : details.is_exclusive ? "Exclusive" : "Not exclusive";
|
|
345
|
-
return /* @__PURE__ */
|
|
122
|
+
return /* @__PURE__ */ jsxs2(
|
|
346
123
|
"div",
|
|
347
124
|
{
|
|
348
|
-
className:
|
|
125
|
+
className: cn3(
|
|
349
126
|
"flex w-full flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-4 py-3",
|
|
350
127
|
className
|
|
351
128
|
),
|
|
352
129
|
children: [
|
|
353
|
-
/* @__PURE__ */
|
|
354
|
-
/* @__PURE__ */
|
|
355
|
-
caption && /* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-1", children: [
|
|
131
|
+
/* @__PURE__ */ jsx3("h3", { className: "header-xl-medium-card text-text-primary font-ss02-ss05", children: title }),
|
|
132
|
+
caption && /* @__PURE__ */ jsx3("p", { className: "label-xs-text text-text-secondary", children: caption })
|
|
356
133
|
] }),
|
|
357
|
-
details.warnings.length > 0 && /* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */
|
|
134
|
+
details.warnings.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2 rounded-[10px] bg-semantic-color-status-priority-in-progress-warm-fill px-3 py-2", children: [
|
|
135
|
+
/* @__PURE__ */ jsxs2("span", { className: "label-base-medium text-semantic-color-status-priority-in-progress-warm-copy", children: [
|
|
359
136
|
"Worth checking (",
|
|
360
137
|
details.warnings.length,
|
|
361
138
|
")"
|
|
362
139
|
] }),
|
|
363
|
-
details.warnings.map((warning, index) => /* @__PURE__ */
|
|
140
|
+
details.warnings.map((warning, index) => /* @__PURE__ */ jsxs2(
|
|
364
141
|
"p",
|
|
365
142
|
{
|
|
366
143
|
className: "body-text text-semantic-color-status-priority-in-progress-warm-copy break-words",
|
|
367
144
|
children: [
|
|
368
|
-
/* @__PURE__ */
|
|
369
|
-
warning.detail && /* @__PURE__ */
|
|
145
|
+
/* @__PURE__ */ jsx3("span", { className: "font-medium", children: warning.issue }),
|
|
146
|
+
warning.detail && /* @__PURE__ */ jsxs2("span", { children: [
|
|
370
147
|
": ",
|
|
371
148
|
warning.detail
|
|
372
149
|
] })
|
|
@@ -375,34 +152,34 @@ function ContractDetailsCard({
|
|
|
375
152
|
`${warning.issue}-${index}`
|
|
376
153
|
))
|
|
377
154
|
] }),
|
|
378
|
-
/* @__PURE__ */
|
|
379
|
-
details.territory && /* @__PURE__ */
|
|
380
|
-
details.contracting_entity && /* @__PURE__ */
|
|
381
|
-
exclusive && /* @__PURE__ */
|
|
382
|
-
usage && /* @__PURE__ */
|
|
155
|
+
/* @__PURE__ */ jsxs2("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2", children: [
|
|
156
|
+
details.territory && /* @__PURE__ */ jsx3(Row, { label: "Territory", children: details.territory }),
|
|
157
|
+
details.contracting_entity && /* @__PURE__ */ jsx3(Row, { label: "Contracting Entity", children: details.contracting_entity }),
|
|
158
|
+
exclusive && /* @__PURE__ */ jsx3(Row, { label: "Exclusivity", children: exclusive }),
|
|
159
|
+
usage && /* @__PURE__ */ jsx3(Row, { label: "Usage After Term", children: usage })
|
|
383
160
|
] }),
|
|
384
|
-
details.exclusivity && /* @__PURE__ */
|
|
385
|
-
details.payment_terms && /* @__PURE__ */
|
|
386
|
-
details.usage_after_term && /* @__PURE__ */
|
|
387
|
-
details.deliverables.length > 0 && /* @__PURE__ */
|
|
388
|
-
/* @__PURE__ */
|
|
161
|
+
details.exclusivity && /* @__PURE__ */ jsx3(Row, { label: "Exclusivity Terms", children: details.exclusivity }),
|
|
162
|
+
details.payment_terms && /* @__PURE__ */ jsx3(Row, { label: "Payment Terms", children: details.payment_terms }),
|
|
163
|
+
details.usage_after_term && /* @__PURE__ */ jsx3(Row, { label: "Usage Rights", children: details.usage_after_term }),
|
|
164
|
+
details.deliverables.length > 0 && /* @__PURE__ */ jsxs2("div", { className: "flex flex-col gap-2", children: [
|
|
165
|
+
/* @__PURE__ */ jsxs2("span", { className: "label-base-medium text-text-secondary font-ss02-ss05", children: [
|
|
389
166
|
"Deliverables (",
|
|
390
167
|
details.deliverables.length,
|
|
391
168
|
")"
|
|
392
169
|
] }),
|
|
393
|
-
/* @__PURE__ */
|
|
170
|
+
/* @__PURE__ */ jsx3("ul", { className: "flex flex-col divide-y divide-greys-grey-strokes-tables rounded-[10px] border border-greys-grey-strokes-tables", children: details.deliverables.map((deliverable, index) => /* @__PURE__ */ jsxs2(
|
|
394
171
|
"li",
|
|
395
172
|
{
|
|
396
173
|
className: "flex flex-col gap-1 px-3 py-2 sm:flex-row sm:items-start sm:justify-between sm:gap-4",
|
|
397
174
|
children: [
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
deliverable.units != null && deliverable.units > 1 && /* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ jsxs2("span", { className: "min-w-0 body-text text-text-primary break-words", children: [
|
|
176
|
+
deliverable.units != null && deliverable.units > 1 && /* @__PURE__ */ jsxs2("span", { className: "font-medium", children: [
|
|
400
177
|
deliverable.units,
|
|
401
178
|
" \xD7 "
|
|
402
179
|
] }),
|
|
403
180
|
deliverable.description
|
|
404
181
|
] }),
|
|
405
|
-
deliverable.due_date && /* @__PURE__ */
|
|
182
|
+
deliverable.due_date && /* @__PURE__ */ jsxs2("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
406
183
|
"Due ",
|
|
407
184
|
formatDealDate(deliverable.due_date)
|
|
408
185
|
] })
|
|
@@ -418,14 +195,14 @@ function ContractDetailsCard({
|
|
|
418
195
|
|
|
419
196
|
// src/marketing/manual-deal-card.tsx
|
|
420
197
|
import { useState } from "react";
|
|
421
|
-
import { Button as Button2, cn as
|
|
198
|
+
import { Button as Button2, cn as cn5 } from "@nukleus-sports/ui-web";
|
|
422
199
|
import { ArrowDownFormIcon, XsViewInvoiceIcon } from "@nukleus-sports/icons";
|
|
423
200
|
import { fmtUSD, fmtUSDWhole, formatDealDate as formatDealDate2 } from "@nukleus-sports/core";
|
|
424
201
|
|
|
425
202
|
// src/marketing/deal-card-parts.tsx
|
|
426
|
-
import { cn as
|
|
203
|
+
import { cn as cn4 } from "@nukleus-sports/ui-web";
|
|
427
204
|
import { CheckRingRoundIcon } from "@nukleus-sports/icons";
|
|
428
|
-
import { jsx as
|
|
205
|
+
import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
429
206
|
var STATUS_STYLES = {
|
|
430
207
|
Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
|
|
431
208
|
Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
|
|
@@ -438,22 +215,22 @@ function TrackingItem({ label, done }) {
|
|
|
438
215
|
// like "Deliverables met - 0/4" wrap in the grid instead of being
|
|
439
216
|
// squeezed to an equal share. (clientapp's version — see ProjectDealCard's
|
|
440
217
|
// module doc.)
|
|
441
|
-
/* @__PURE__ */
|
|
442
|
-
/* @__PURE__ */
|
|
218
|
+
/* @__PURE__ */ jsxs3("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
|
|
219
|
+
/* @__PURE__ */ jsx4(
|
|
443
220
|
CheckRingRoundIcon,
|
|
444
221
|
{
|
|
445
222
|
width: 12,
|
|
446
223
|
height: 12,
|
|
447
|
-
className:
|
|
224
|
+
className: cn4(
|
|
448
225
|
"shrink-0 transition-opacity",
|
|
449
226
|
done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
|
|
450
227
|
)
|
|
451
228
|
}
|
|
452
229
|
),
|
|
453
|
-
/* @__PURE__ */
|
|
230
|
+
/* @__PURE__ */ jsx4(
|
|
454
231
|
"span",
|
|
455
232
|
{
|
|
456
|
-
className:
|
|
233
|
+
className: cn4(
|
|
457
234
|
"label-xs-table truncate max-lg:whitespace-normal",
|
|
458
235
|
done ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
459
236
|
),
|
|
@@ -465,7 +242,7 @@ function TrackingItem({ label, done }) {
|
|
|
465
242
|
}
|
|
466
243
|
|
|
467
244
|
// src/marketing/manual-deal-card.tsx
|
|
468
|
-
import { Fragment
|
|
245
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
469
246
|
function resolveDealDocument(meta) {
|
|
470
247
|
const url = meta.uploaded_document?.url ?? meta.document_url ?? null;
|
|
471
248
|
if (!url) return null;
|
|
@@ -489,7 +266,7 @@ function ManualDealCard({
|
|
|
489
266
|
const dateRange = [startDate, endDate].filter((d) => Boolean(d) && d !== "\u2014").join(" - ");
|
|
490
267
|
const metaLine = [meta.deal_category, dateRange].filter(Boolean).join(" \u2022 ");
|
|
491
268
|
const doc = resolveDealDocument(meta);
|
|
492
|
-
const previewDocButton = doc && onOpenDocument && /* @__PURE__ */
|
|
269
|
+
const previewDocButton = doc && onOpenDocument && /* @__PURE__ */ jsxs4(
|
|
493
270
|
Button2,
|
|
494
271
|
{
|
|
495
272
|
variant: "unstyled",
|
|
@@ -502,7 +279,7 @@ function ManualDealCard({
|
|
|
502
279
|
},
|
|
503
280
|
children: [
|
|
504
281
|
"Preview Doc",
|
|
505
|
-
/* @__PURE__ */
|
|
282
|
+
/* @__PURE__ */ jsx5(XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
506
283
|
]
|
|
507
284
|
}
|
|
508
285
|
);
|
|
@@ -516,18 +293,18 @@ function ManualDealCard({
|
|
|
516
293
|
when: Boolean(onDelete)
|
|
517
294
|
}
|
|
518
295
|
];
|
|
519
|
-
return /* @__PURE__ */
|
|
296
|
+
return /* @__PURE__ */ jsxs4(
|
|
520
297
|
"div",
|
|
521
298
|
{
|
|
522
|
-
className:
|
|
299
|
+
className: cn5(
|
|
523
300
|
"bg-card border-b last:border-b-0 border-grey-strokes-tables w-full font-ss02",
|
|
524
301
|
className
|
|
525
302
|
),
|
|
526
303
|
children: [
|
|
527
|
-
/* @__PURE__ */
|
|
528
|
-
/* @__PURE__ */
|
|
529
|
-
/* @__PURE__ */
|
|
530
|
-
/* @__PURE__ */
|
|
304
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col sm:hidden", children: [
|
|
305
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-start p-2 justify-between flex-[1_0_0]", children: [
|
|
306
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex gap-1 items-start", children: [
|
|
307
|
+
/* @__PURE__ */ jsx5(
|
|
531
308
|
Button2,
|
|
532
309
|
{
|
|
533
310
|
variant: "unstyled",
|
|
@@ -536,12 +313,12 @@ function ManualDealCard({
|
|
|
536
313
|
onClick: () => setIsExpanded((v) => !v),
|
|
537
314
|
className: "flex p-[6px] items-center justify-center gap-[10px]",
|
|
538
315
|
"aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
|
|
539
|
-
children: /* @__PURE__ */
|
|
316
|
+
children: /* @__PURE__ */ jsx5(
|
|
540
317
|
ArrowDownFormIcon,
|
|
541
318
|
{
|
|
542
319
|
width: 12.004,
|
|
543
320
|
height: 5.999,
|
|
544
|
-
className:
|
|
321
|
+
className: cn5(
|
|
545
322
|
"text-greys-icons transition-transform duration-200",
|
|
546
323
|
isExpanded && "rotate-180"
|
|
547
324
|
)
|
|
@@ -549,14 +326,14 @@ function ManualDealCard({
|
|
|
549
326
|
)
|
|
550
327
|
}
|
|
551
328
|
),
|
|
552
|
-
/* @__PURE__ */
|
|
329
|
+
/* @__PURE__ */ jsx5("span", { className: "header-xl-medium-card text-text-primary", children: brandName })
|
|
553
330
|
] }),
|
|
554
|
-
/* @__PURE__ */
|
|
331
|
+
/* @__PURE__ */ jsx5("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) })
|
|
555
332
|
] }),
|
|
556
|
-
isExpanded && /* @__PURE__ */
|
|
557
|
-
/* @__PURE__ */
|
|
558
|
-
/* @__PURE__ */
|
|
559
|
-
/* @__PURE__ */
|
|
333
|
+
isExpanded && /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
334
|
+
/* @__PURE__ */ jsx5("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
335
|
+
/* @__PURE__ */ jsxs4("div", { className: "p-2 flex items-start justify-between gap-1 bg-greys-table-hover rounded-[0_0_10px_10px]", children: [
|
|
336
|
+
/* @__PURE__ */ jsx5(
|
|
560
337
|
Button2,
|
|
561
338
|
{
|
|
562
339
|
variant: "unstyled",
|
|
@@ -571,9 +348,9 @@ function ManualDealCard({
|
|
|
571
348
|
] })
|
|
572
349
|
] })
|
|
573
350
|
] }),
|
|
574
|
-
/* @__PURE__ */
|
|
575
|
-
/* @__PURE__ */
|
|
576
|
-
/* @__PURE__ */
|
|
351
|
+
/* @__PURE__ */ jsxs4("div", { className: "group hidden sm:flex flex-col gap-3 p-3", children: [
|
|
352
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex gap-3 items-start w-full", children: [
|
|
353
|
+
/* @__PURE__ */ jsx5(
|
|
577
354
|
EntityAvatar,
|
|
578
355
|
{
|
|
579
356
|
entityType: "company",
|
|
@@ -584,16 +361,16 @@ function ManualDealCard({
|
|
|
584
361
|
className: "shrink-0 rounded-[34px]"
|
|
585
362
|
}
|
|
586
363
|
),
|
|
587
|
-
/* @__PURE__ */
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
/* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-1 flex-col gap-2 justify-center min-w-0", children: [
|
|
365
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex gap-2 items-center min-w-0", children: [
|
|
366
|
+
/* @__PURE__ */ jsx5("span", { className: "text-text-primary header-xl-medium-card truncate", children: brandName }),
|
|
590
367
|
previewDocButton
|
|
591
368
|
] }),
|
|
592
|
-
metaLine && /* @__PURE__ */
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
deal.lead_agent_name ? /* @__PURE__ */
|
|
596
|
-
/* @__PURE__ */
|
|
369
|
+
metaLine && /* @__PURE__ */ jsx5("div", { className: "label-xs-text text-text-secondary break-words", children: metaLine }),
|
|
370
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex gap-3 items-center min-w-0", children: [
|
|
371
|
+
/* @__PURE__ */ jsx5("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Lead" }),
|
|
372
|
+
deal.lead_agent_name ? /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
373
|
+
/* @__PURE__ */ jsx5(
|
|
597
374
|
EntityAvatar,
|
|
598
375
|
{
|
|
599
376
|
entityType: "initials",
|
|
@@ -604,47 +381,47 @@ function ManualDealCard({
|
|
|
604
381
|
className: "shrink-0"
|
|
605
382
|
}
|
|
606
383
|
),
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
] }) : /* @__PURE__ */
|
|
384
|
+
/* @__PURE__ */ jsx5("span", { className: "label-xs-text text-text-secondary truncate", children: deal.lead_agent_name })
|
|
385
|
+
] }) : /* @__PURE__ */ jsx5("span", { className: "label-xs-text text-text-secondary truncate", children: "--" })
|
|
609
386
|
] })
|
|
610
387
|
] }),
|
|
611
|
-
/* @__PURE__ */
|
|
612
|
-
/* @__PURE__ */
|
|
613
|
-
/* @__PURE__ */
|
|
614
|
-
/* @__PURE__ */
|
|
388
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
|
|
389
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex items-start gap-2", children: [
|
|
390
|
+
/* @__PURE__ */ jsx5("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSDWhole(meta.total_deal_amount) }),
|
|
391
|
+
/* @__PURE__ */ jsx5(RowActionsDropdown, { actions, ariaLabel: "Deal options" })
|
|
615
392
|
] }),
|
|
616
|
-
/* @__PURE__ */
|
|
393
|
+
/* @__PURE__ */ jsx5(
|
|
617
394
|
"div",
|
|
618
395
|
{
|
|
619
|
-
className:
|
|
396
|
+
className: cn5(
|
|
620
397
|
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
|
|
621
398
|
STATUS_STYLES.Complete
|
|
622
399
|
),
|
|
623
|
-
children: /* @__PURE__ */
|
|
400
|
+
children: /* @__PURE__ */ jsx5("span", { className: "label-xs-medium", children: "Complete" })
|
|
624
401
|
}
|
|
625
402
|
),
|
|
626
403
|
asideFooter
|
|
627
404
|
] })
|
|
628
405
|
] }),
|
|
629
|
-
/* @__PURE__ */
|
|
630
|
-
/* @__PURE__ */
|
|
631
|
-
/* @__PURE__ */
|
|
632
|
-
meta.has_third_party && /* @__PURE__ */
|
|
406
|
+
/* @__PURE__ */ jsxs4("div", { className: "grid w-full grid-cols-2 items-center gap-x-3 gap-y-2 md:grid-cols-3 lg:flex lg:justify-between lg:gap-0", children: [
|
|
407
|
+
/* @__PURE__ */ jsx5(TrackingItem, { label: "Client paid", done: true }),
|
|
408
|
+
/* @__PURE__ */ jsx5(TrackingItem, { label: "Agency paid", done: true }),
|
|
409
|
+
meta.has_third_party && /* @__PURE__ */ jsx5(TrackingItem, { label: "Third Party paid", done: true })
|
|
633
410
|
] }),
|
|
634
|
-
/* @__PURE__ */
|
|
635
|
-
/* @__PURE__ */
|
|
636
|
-
/* @__PURE__ */
|
|
637
|
-
/* @__PURE__ */
|
|
411
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
412
|
+
/* @__PURE__ */ jsx5("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ jsx5("div", { className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px] w-full" }) }),
|
|
413
|
+
/* @__PURE__ */ jsxs4("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
|
|
414
|
+
/* @__PURE__ */ jsx5(
|
|
638
415
|
"span",
|
|
639
416
|
{
|
|
640
|
-
className:
|
|
417
|
+
className: cn5(
|
|
641
418
|
"min-w-0 flex-1 label-xs-table",
|
|
642
419
|
meta.total_deal_amount > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
643
420
|
),
|
|
644
421
|
children: `${fmtUSD(meta.total_deal_amount)}${meta.total_deal_amount > 0 ? " collected" : ""}`
|
|
645
422
|
}
|
|
646
423
|
),
|
|
647
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ jsx5("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" })
|
|
648
425
|
] })
|
|
649
426
|
] })
|
|
650
427
|
] })
|
|
@@ -657,7 +434,7 @@ function ManualDealCard({
|
|
|
657
434
|
import { useEffect, useState as useState2 } from "react";
|
|
658
435
|
import {
|
|
659
436
|
Button as Button3,
|
|
660
|
-
cn as
|
|
437
|
+
cn as cn6,
|
|
661
438
|
Dialog,
|
|
662
439
|
DialogContent,
|
|
663
440
|
DialogHeader,
|
|
@@ -666,7 +443,7 @@ import {
|
|
|
666
443
|
} from "@nukleus-sports/ui-web";
|
|
667
444
|
import { DownloadIcon } from "@nukleus-sports/icons";
|
|
668
445
|
import { fmt, fmtCurrency, fmtDate } from "@nukleus-sports/core";
|
|
669
|
-
import { jsx as
|
|
446
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
670
447
|
var DESKTOP_BREAKPOINT_QUERY = "(min-width: 640px)";
|
|
671
448
|
function useIsDesktopViewport() {
|
|
672
449
|
const [isDesktop, setIsDesktop] = useState2(
|
|
@@ -682,22 +459,22 @@ function useIsDesktopViewport() {
|
|
|
682
459
|
return isDesktop;
|
|
683
460
|
}
|
|
684
461
|
function ReadOnlyField({ label, value }) {
|
|
685
|
-
return /* @__PURE__ */
|
|
686
|
-
/* @__PURE__ */
|
|
687
|
-
/* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
463
|
+
/* @__PURE__ */ jsx6("span", { className: "label-xs-medium text-text-secondary", children: label }),
|
|
464
|
+
/* @__PURE__ */ jsx6("div", { className: "flex items-center px-[0px] py-[6px]", children: /* @__PURE__ */ jsx6("span", { className: "body-text text-text-primary whitespace-nowrap", children: value || "--" }) })
|
|
688
465
|
] });
|
|
689
466
|
}
|
|
690
467
|
function ReadOnlyPartyCard({ title, children, className }) {
|
|
691
|
-
return /* @__PURE__ */
|
|
468
|
+
return /* @__PURE__ */ jsxs5(
|
|
692
469
|
"div",
|
|
693
470
|
{
|
|
694
|
-
className:
|
|
471
|
+
className: cn6(
|
|
695
472
|
"flex flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-6 py-4",
|
|
696
473
|
className
|
|
697
474
|
),
|
|
698
475
|
children: [
|
|
699
|
-
/* @__PURE__ */
|
|
700
|
-
/* @__PURE__ */
|
|
476
|
+
/* @__PURE__ */ jsx6("h3", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: title }),
|
|
477
|
+
/* @__PURE__ */ jsx6("div", { className: "flex flex-col gap-4", children })
|
|
701
478
|
]
|
|
702
479
|
}
|
|
703
480
|
);
|
|
@@ -716,20 +493,20 @@ function ManualDealPreviewDialog({
|
|
|
716
493
|
const meta = deal.metadata;
|
|
717
494
|
const doc = resolveDealDocument(meta);
|
|
718
495
|
const cardCls = isDesktop ? "flex-1 min-w-0 h-[479px]" : "w-full h-auto";
|
|
719
|
-
const cards = /* @__PURE__ */
|
|
720
|
-
/* @__PURE__ */
|
|
721
|
-
/* @__PURE__ */
|
|
722
|
-
/* @__PURE__ */
|
|
723
|
-
/* @__PURE__ */
|
|
724
|
-
/* @__PURE__ */
|
|
725
|
-
/* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
496
|
+
const cards = /* @__PURE__ */ jsxs5("div", { className: cn6("flex gap-4 sm:gap-[12px]", !isDesktop && "flex-col"), children: [
|
|
497
|
+
/* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Brand", className: cardCls, children: [
|
|
498
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Brand Name", value: fmt(meta.brand_name) }),
|
|
499
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Deal Category", value: fmt(meta.deal_category) }),
|
|
500
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Total Deal Amount", value: fmtCurrency(meta.total_deal_amount) }),
|
|
501
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.brand_payment_due_date) }),
|
|
502
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Deal Start Date", value: fmtDate(meta.start_date) }),
|
|
503
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Deal End Date", value: fmtDate(meta.end_date) })
|
|
727
504
|
] }),
|
|
728
|
-
/* @__PURE__ */
|
|
729
|
-
/* @__PURE__ */
|
|
730
|
-
/* @__PURE__ */
|
|
731
|
-
/* @__PURE__ */
|
|
732
|
-
meta.client_name?.trim() && clientImageUrl && /* @__PURE__ */
|
|
505
|
+
/* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Client", className: cardCls, children: [
|
|
506
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
507
|
+
/* @__PURE__ */ jsx6("span", { className: "label-xs-medium text-text-secondary", children: "Client Name" }),
|
|
508
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
|
|
509
|
+
meta.client_name?.trim() && clientImageUrl && /* @__PURE__ */ jsx6(
|
|
733
510
|
EntityAvatar,
|
|
734
511
|
{
|
|
735
512
|
entityType: "player",
|
|
@@ -740,23 +517,23 @@ function ManualDealPreviewDialog({
|
|
|
740
517
|
className: "shrink-0"
|
|
741
518
|
}
|
|
742
519
|
),
|
|
743
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ jsx6("span", { className: "body-text text-text-primary whitespace-nowrap", children: fmt(meta.client_name) })
|
|
744
521
|
] })
|
|
745
522
|
] }),
|
|
746
|
-
/* @__PURE__ */
|
|
523
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Client's Invoice Name", value: fmt(meta.client_invoice_name) })
|
|
747
524
|
] }),
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
/* @__PURE__ */
|
|
750
|
-
/* @__PURE__ */
|
|
525
|
+
/* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Agency", className: cardCls, children: [
|
|
526
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Agency Name", value: fmt(meta.agency_name) }),
|
|
527
|
+
/* @__PURE__ */ jsx6(
|
|
751
528
|
ReadOnlyField,
|
|
752
529
|
{
|
|
753
530
|
label: "Commission %",
|
|
754
531
|
value: meta.agency_commission ? `${meta.agency_commission}%` : "--"
|
|
755
532
|
}
|
|
756
533
|
),
|
|
757
|
-
/* @__PURE__ */
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */
|
|
534
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Payment Due Date", value: fmtDate(meta.agency_payment_due_date) }),
|
|
535
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
536
|
+
/* @__PURE__ */ jsx6(
|
|
760
537
|
"span",
|
|
761
538
|
{
|
|
762
539
|
className: "text-[13px] font-medium leading-normal text-text-secondary",
|
|
@@ -764,8 +541,8 @@ function ManualDealPreviewDialog({
|
|
|
764
541
|
children: "Lead Agent"
|
|
765
542
|
}
|
|
766
543
|
),
|
|
767
|
-
/* @__PURE__ */
|
|
768
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
|
|
545
|
+
/* @__PURE__ */ jsx6(
|
|
769
546
|
EntityAvatar,
|
|
770
547
|
{
|
|
771
548
|
entityType: "initials",
|
|
@@ -776,7 +553,7 @@ function ManualDealPreviewDialog({
|
|
|
776
553
|
className: "shrink-0"
|
|
777
554
|
}
|
|
778
555
|
),
|
|
779
|
-
/* @__PURE__ */
|
|
556
|
+
/* @__PURE__ */ jsx6(
|
|
780
557
|
"span",
|
|
781
558
|
{
|
|
782
559
|
className: "overflow-hidden text-ellipsis text-[14px] leading-[15px] text-text-secondary whitespace-nowrap",
|
|
@@ -787,23 +564,23 @@ function ManualDealPreviewDialog({
|
|
|
787
564
|
] })
|
|
788
565
|
] })
|
|
789
566
|
] }),
|
|
790
|
-
meta.has_third_party && /* @__PURE__ */
|
|
791
|
-
/* @__PURE__ */
|
|
792
|
-
/* @__PURE__ */
|
|
567
|
+
meta.has_third_party && /* @__PURE__ */ jsxs5(ReadOnlyPartyCard, { title: "Third Party", className: cardCls, children: [
|
|
568
|
+
/* @__PURE__ */ jsx6(ReadOnlyField, { label: "Third Party Name", value: fmt(meta.third_party_name) }),
|
|
569
|
+
/* @__PURE__ */ jsx6(
|
|
793
570
|
ReadOnlyField,
|
|
794
571
|
{
|
|
795
572
|
label: "Third Party Invoice Name",
|
|
796
573
|
value: fmt(meta.third_party_invoice_name)
|
|
797
574
|
}
|
|
798
575
|
),
|
|
799
|
-
/* @__PURE__ */
|
|
576
|
+
/* @__PURE__ */ jsx6(
|
|
800
577
|
ReadOnlyField,
|
|
801
578
|
{
|
|
802
579
|
label: "Commission %",
|
|
803
580
|
value: meta.third_party_commission ? `${meta.third_party_commission}%` : "--"
|
|
804
581
|
}
|
|
805
582
|
),
|
|
806
|
-
/* @__PURE__ */
|
|
583
|
+
/* @__PURE__ */ jsx6(
|
|
807
584
|
ReadOnlyField,
|
|
808
585
|
{
|
|
809
586
|
label: "Payment Due Date",
|
|
@@ -813,8 +590,8 @@ function ManualDealPreviewDialog({
|
|
|
813
590
|
] })
|
|
814
591
|
] });
|
|
815
592
|
const summary = meta.summary || meta.notes || null;
|
|
816
|
-
const notes = /* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
593
|
+
const notes = /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[12px] rounded-[10px] border border-grey-strokes-tables bg-card px-[16px] py-[12px] shrink-0 w-full", children: [
|
|
594
|
+
/* @__PURE__ */ jsx6(
|
|
818
595
|
"h3",
|
|
819
596
|
{
|
|
820
597
|
className: "header-xl-medium-card text-text-primary whitespace-nowrap",
|
|
@@ -822,10 +599,10 @@ function ManualDealPreviewDialog({
|
|
|
822
599
|
children: "Contract Summary"
|
|
823
600
|
}
|
|
824
601
|
),
|
|
825
|
-
/* @__PURE__ */
|
|
602
|
+
/* @__PURE__ */ jsx6("div", { className: "flex min-h-[70px] items-start rounded-[5px] bg-greys-background-hover px-[12px] py-[6px]", children: /* @__PURE__ */ jsx6(
|
|
826
603
|
"p",
|
|
827
604
|
{
|
|
828
|
-
className:
|
|
605
|
+
className: cn6(
|
|
829
606
|
"flex-1 min-w-0 body-text whitespace-pre-wrap break-words",
|
|
830
607
|
summary ? "text-text-primary" : "text-text-secondary"
|
|
831
608
|
),
|
|
@@ -834,8 +611,8 @@ function ManualDealPreviewDialog({
|
|
|
834
611
|
}
|
|
835
612
|
) })
|
|
836
613
|
] });
|
|
837
|
-
const contractDetailsCard = meta.contract_details ? /* @__PURE__ */
|
|
838
|
-
const documentButton = doc && /* @__PURE__ */
|
|
614
|
+
const contractDetailsCard = meta.contract_details ? /* @__PURE__ */ jsx6(ContractDetailsCard, { details: meta.contract_details }) : null;
|
|
615
|
+
const documentButton = doc && /* @__PURE__ */ jsxs5(
|
|
839
616
|
Button3,
|
|
840
617
|
{
|
|
841
618
|
variant: "ghost",
|
|
@@ -843,8 +620,8 @@ function ManualDealPreviewDialog({
|
|
|
843
620
|
className: "flex h-full p-0 bg-transparent hover:bg-transparent items-center gap-[12px] hover:opacity-80 transition-opacity",
|
|
844
621
|
onClick: () => onOpenDocument(doc),
|
|
845
622
|
children: [
|
|
846
|
-
/* @__PURE__ */
|
|
847
|
-
/* @__PURE__ */
|
|
623
|
+
/* @__PURE__ */ jsx6(DownloadIcon, { className: "size-5 shrink-0 text-primary-color-nuk-ui-elem" }),
|
|
624
|
+
/* @__PURE__ */ jsx6(
|
|
848
625
|
"span",
|
|
849
626
|
{
|
|
850
627
|
className: "text-[14px] font-normal leading-[15px] text-primary-color-nuk-text overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]",
|
|
@@ -855,8 +632,8 @@ function ManualDealPreviewDialog({
|
|
|
855
632
|
]
|
|
856
633
|
}
|
|
857
634
|
);
|
|
858
|
-
const footerButtons = /* @__PURE__ */
|
|
859
|
-
onEdit && /* @__PURE__ */
|
|
635
|
+
const footerButtons = /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-[12px]", children: [
|
|
636
|
+
onEdit && /* @__PURE__ */ jsx6(
|
|
860
637
|
Button3,
|
|
861
638
|
{
|
|
862
639
|
variant: "outline",
|
|
@@ -865,7 +642,7 @@ function ManualDealPreviewDialog({
|
|
|
865
642
|
children: "Edit Deal"
|
|
866
643
|
}
|
|
867
644
|
),
|
|
868
|
-
/* @__PURE__ */
|
|
645
|
+
/* @__PURE__ */ jsx6(
|
|
869
646
|
Button3,
|
|
870
647
|
{
|
|
871
648
|
onClick: () => onOpenChange(false),
|
|
@@ -875,20 +652,20 @@ function ManualDealPreviewDialog({
|
|
|
875
652
|
)
|
|
876
653
|
] });
|
|
877
654
|
if (isDesktop) {
|
|
878
|
-
return /* @__PURE__ */
|
|
879
|
-
/* @__PURE__ */
|
|
880
|
-
/* @__PURE__ */
|
|
655
|
+
return /* @__PURE__ */ jsx6(Dialog, { open, onOpenChange, children: /* @__PURE__ */ jsxs5(DialogContent, { className: "flex h-screen sm:h-[800px] flex-col gap-0 overflow-hidden rounded-none sm:rounded-[10px] bg-card p-0 max-w-[1140px] max-[1024px]:max-w-[940px]", children: [
|
|
656
|
+
/* @__PURE__ */ jsx6(DialogHeader, { className: "shrink-0 mt-4 pb-0 space-y-0 px-6", children: /* @__PURE__ */ jsx6(DialogTitle, { children: "Preview Details" }) }),
|
|
657
|
+
/* @__PURE__ */ jsx6("div", { className: "flex-1 overflow-y-auto px-6 pt-6 pb-4", children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-[12px]", children: [
|
|
881
658
|
cards,
|
|
882
659
|
notes,
|
|
883
660
|
contractDetailsCard
|
|
884
661
|
] }) }),
|
|
885
|
-
/* @__PURE__ */
|
|
886
|
-
/* @__PURE__ */
|
|
662
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center justify-between bg-card pb-6 pt-3 px-9 shadow-[0px_0px_4px_0px_rgba(0,0,0,0.25)] shrink-0 rounded-bl-[10px] rounded-br-[10px]", children: [
|
|
663
|
+
/* @__PURE__ */ jsx6("div", { className: "flex h-[32px] items-center bg-card px-2", children: documentButton ?? /* @__PURE__ */ jsx6("div", {}) }),
|
|
887
664
|
footerButtons
|
|
888
665
|
] })
|
|
889
666
|
] }) });
|
|
890
667
|
}
|
|
891
|
-
return /* @__PURE__ */
|
|
668
|
+
return /* @__PURE__ */ jsx6(
|
|
892
669
|
MobileModalLayout,
|
|
893
670
|
{
|
|
894
671
|
onCancel: () => onOpenChange(false),
|
|
@@ -898,8 +675,8 @@ function ManualDealPreviewDialog({
|
|
|
898
675
|
cancelButtonName: "Cancel",
|
|
899
676
|
actionBottomContext: false,
|
|
900
677
|
childClassName: "max-h-[calc(100dvh-50px)]",
|
|
901
|
-
children: /* @__PURE__ */
|
|
902
|
-
doc && /* @__PURE__ */
|
|
678
|
+
children: /* @__PURE__ */ jsxs5("div", { className: "flex flex-col gap-4 px-4 pb-4", children: [
|
|
679
|
+
doc && /* @__PURE__ */ jsx6("div", { className: "flex h-[32px] justify-end items-center bg-card py-0 px-2", children: documentButton }),
|
|
903
680
|
cards,
|
|
904
681
|
notes,
|
|
905
682
|
contractDetailsCard
|
|
@@ -910,7 +687,7 @@ function ManualDealPreviewDialog({
|
|
|
910
687
|
|
|
911
688
|
// src/marketing/project-deal-card.tsx
|
|
912
689
|
import { useState as useState3 } from "react";
|
|
913
|
-
import { Button as Button4, cn as
|
|
690
|
+
import { Button as Button4, cn as cn7 } from "@nukleus-sports/ui-web";
|
|
914
691
|
import { ArrowDownFormIcon as ArrowDownFormIcon2, XsViewInvoiceIcon as XsViewInvoiceIcon2 } from "@nukleus-sports/icons";
|
|
915
692
|
import {
|
|
916
693
|
abbreviatePersonName,
|
|
@@ -918,15 +695,15 @@ import {
|
|
|
918
695
|
formatDealDate as formatDealDate3,
|
|
919
696
|
fmtUSD as fmtUSD2
|
|
920
697
|
} from "@nukleus-sports/core";
|
|
921
|
-
import { Fragment as
|
|
698
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
922
699
|
function statusLabel(status) {
|
|
923
700
|
return status === "Complete" ? "Completed" : status;
|
|
924
701
|
}
|
|
925
702
|
function CollabAffordance({ href, onClick, className, children }) {
|
|
926
703
|
if (onClick) {
|
|
927
|
-
return /* @__PURE__ */
|
|
704
|
+
return /* @__PURE__ */ jsx7(Button4, { variant: "unstyled", size: "none", type: "button", onClick, className, children });
|
|
928
705
|
}
|
|
929
|
-
return /* @__PURE__ */
|
|
706
|
+
return /* @__PURE__ */ jsx7("a", { href, className, children });
|
|
930
707
|
}
|
|
931
708
|
function ProjectDealCard({
|
|
932
709
|
deal,
|
|
@@ -949,11 +726,11 @@ function ProjectDealCard({
|
|
|
949
726
|
const outstanding = Math.max(0, deal.total_contracted - deal.total_collected);
|
|
950
727
|
const isFullyPaid = deal.total_contracted > 0 && outstanding === 0;
|
|
951
728
|
const hasPaymentsCount = deal.payments_total !== void 0 && deal.payments_paid !== void 0;
|
|
952
|
-
return /* @__PURE__ */
|
|
953
|
-
/* @__PURE__ */
|
|
954
|
-
/* @__PURE__ */
|
|
955
|
-
/* @__PURE__ */
|
|
956
|
-
/* @__PURE__ */
|
|
729
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn7("w-full", className), children: [
|
|
730
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col sm:hidden overflow-hidden bg-card border border-greys-grey-strokes-tables rounded-[10px]", children: [
|
|
731
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-start justify-between gap-1 p-2", children: [
|
|
732
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 gap-1 items-start", children: [
|
|
733
|
+
/* @__PURE__ */ jsx7(
|
|
957
734
|
Button4,
|
|
958
735
|
{
|
|
959
736
|
variant: "unstyled",
|
|
@@ -962,12 +739,12 @@ function ProjectDealCard({
|
|
|
962
739
|
onClick: () => setIsExpanded((v) => !v),
|
|
963
740
|
className: "flex size-8 shrink-0 items-center justify-center p-1.5 rounded-[5px]",
|
|
964
741
|
"aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
|
|
965
|
-
children: /* @__PURE__ */
|
|
742
|
+
children: /* @__PURE__ */ jsx7(
|
|
966
743
|
ArrowDownFormIcon2,
|
|
967
744
|
{
|
|
968
745
|
width: 12.004,
|
|
969
746
|
height: 5.999,
|
|
970
|
-
className:
|
|
747
|
+
className: cn7(
|
|
971
748
|
"text-greys-icons transition-transform duration-200",
|
|
972
749
|
isExpanded && "rotate-180"
|
|
973
750
|
)
|
|
@@ -975,26 +752,26 @@ function ProjectDealCard({
|
|
|
975
752
|
)
|
|
976
753
|
}
|
|
977
754
|
),
|
|
978
|
-
/* @__PURE__ */
|
|
979
|
-
/* @__PURE__ */
|
|
980
|
-
/* @__PURE__ */
|
|
755
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center items-start", children: [
|
|
756
|
+
/* @__PURE__ */ jsx7("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
|
|
757
|
+
/* @__PURE__ */ jsxs6("span", { className: "label-xs-text text-text-secondary", children: [
|
|
981
758
|
startDate,
|
|
982
759
|
" - ",
|
|
983
760
|
endDate
|
|
984
761
|
] })
|
|
985
762
|
] })
|
|
986
763
|
] }),
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
deal.total_equity_shares > 0 && /* @__PURE__ */
|
|
764
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col shrink-0 justify-center items-end gap-1", children: [
|
|
765
|
+
/* @__PURE__ */ jsx7("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: fmtUSD2(deal.total_contracted) }),
|
|
766
|
+
deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs6("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
990
767
|
"+ ",
|
|
991
768
|
deal.total_equity_shares.toLocaleString(),
|
|
992
769
|
" shares"
|
|
993
770
|
] }),
|
|
994
|
-
/* @__PURE__ */
|
|
771
|
+
/* @__PURE__ */ jsx7(
|
|
995
772
|
"div",
|
|
996
773
|
{
|
|
997
|
-
className:
|
|
774
|
+
className: cn7(
|
|
998
775
|
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center label-xs-medium whitespace-nowrap",
|
|
999
776
|
STATUS_STYLES[status]
|
|
1000
777
|
),
|
|
@@ -1004,20 +781,20 @@ function ProjectDealCard({
|
|
|
1004
781
|
asideFooter
|
|
1005
782
|
] })
|
|
1006
783
|
] }),
|
|
1007
|
-
isExpanded && /* @__PURE__ */
|
|
1008
|
-
/* @__PURE__ */
|
|
1009
|
-
/* @__PURE__ */
|
|
1010
|
-
/* @__PURE__ */
|
|
1011
|
-
/* @__PURE__ */
|
|
1012
|
-
/* @__PURE__ */
|
|
784
|
+
isExpanded && /* @__PURE__ */ jsxs6(Fragment2, { children: [
|
|
785
|
+
/* @__PURE__ */ jsx7("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
786
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-start gap-1 p-2 bg-greys-table-hover", children: [
|
|
787
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
788
|
+
/* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary", children: "Collected" }),
|
|
789
|
+
/* @__PURE__ */ jsx7("span", { className: "body-text-semibold text-primary-color-nuk-text truncate", children: fmtUSD2(deal.total_collected) })
|
|
1013
790
|
] }),
|
|
1014
|
-
/* @__PURE__ */
|
|
1015
|
-
/* @__PURE__ */
|
|
1016
|
-
/* @__PURE__ */
|
|
791
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
792
|
+
/* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary", children: "Outstanding" }),
|
|
793
|
+
/* @__PURE__ */ jsx7("span", { className: "body-text-semibold text-semantic-color-status-priority-priority-2 truncate", children: fmtUSD2(outstanding) })
|
|
1017
794
|
] }),
|
|
1018
|
-
hasPaymentsCount && /* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
/* @__PURE__ */
|
|
795
|
+
hasPaymentsCount && /* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
796
|
+
/* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary", children: "Payments" }),
|
|
797
|
+
/* @__PURE__ */ jsxs6("span", { className: "body-text-semibold text-text-primary truncate", children: [
|
|
1021
798
|
deal.payments_paid,
|
|
1022
799
|
" of ",
|
|
1023
800
|
deal.payments_total,
|
|
@@ -1025,20 +802,20 @@ function ProjectDealCard({
|
|
|
1025
802
|
] })
|
|
1026
803
|
] })
|
|
1027
804
|
] }),
|
|
1028
|
-
/* @__PURE__ */
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
/* @__PURE__ */
|
|
1031
|
-
/* @__PURE__ */
|
|
805
|
+
/* @__PURE__ */ jsx7("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
806
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-2 min-w-0 p-2 bg-greys-table-hover", children: [
|
|
807
|
+
/* @__PURE__ */ jsx7("span", { className: "w-[58px] shrink-0 text-[11px] leading-none text-text-secondary font-normal", children: "Payment" }),
|
|
808
|
+
/* @__PURE__ */ jsx7("div", { className: "relative flex-1 min-w-0 h-1 bg-greys-nav-text rounded-full overflow-hidden", children: /* @__PURE__ */ jsx7(
|
|
1032
809
|
"div",
|
|
1033
810
|
{
|
|
1034
811
|
className: "absolute inset-y-0 left-0 bg-primary-color-nuk-ui-elem rounded-full",
|
|
1035
812
|
style: { width: `${progressPct}%` }
|
|
1036
813
|
}
|
|
1037
814
|
) }),
|
|
1038
|
-
/* @__PURE__ */
|
|
815
|
+
/* @__PURE__ */ jsxs6(
|
|
1039
816
|
"span",
|
|
1040
817
|
{
|
|
1041
|
-
className:
|
|
818
|
+
className: cn7(
|
|
1042
819
|
"w-9 shrink-0 text-right text-[11px] leading-none font-normal",
|
|
1043
820
|
isFullyPaid ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
1044
821
|
),
|
|
@@ -1049,8 +826,8 @@ function ProjectDealCard({
|
|
|
1049
826
|
}
|
|
1050
827
|
)
|
|
1051
828
|
] }),
|
|
1052
|
-
showCollab && /* @__PURE__ */
|
|
1053
|
-
showCollab && /* @__PURE__ */
|
|
829
|
+
showCollab && /* @__PURE__ */ jsx7("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
830
|
+
showCollab && /* @__PURE__ */ jsx7("div", { className: "flex gap-1 p-2 bg-greys-table-hover rounded-[0_0_10px_10px] justify-end", children: /* @__PURE__ */ jsxs6(
|
|
1054
831
|
CollabAffordance,
|
|
1055
832
|
{
|
|
1056
833
|
href: collabHref,
|
|
@@ -1058,15 +835,15 @@ function ProjectDealCard({
|
|
|
1058
835
|
className: "flex gap-2 items-center text-primary-color-nuk-text text-[11px] font-normal shrink-0",
|
|
1059
836
|
children: [
|
|
1060
837
|
"Collab",
|
|
1061
|
-
/* @__PURE__ */
|
|
838
|
+
/* @__PURE__ */ jsx7(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
1062
839
|
]
|
|
1063
840
|
}
|
|
1064
841
|
) })
|
|
1065
842
|
] })
|
|
1066
843
|
] }),
|
|
1067
|
-
/* @__PURE__ */
|
|
1068
|
-
/* @__PURE__ */
|
|
1069
|
-
/* @__PURE__ */
|
|
844
|
+
/* @__PURE__ */ jsxs6("div", { className: "hidden sm:flex flex-col gap-3 p-3 bg-card border-b border-greys-grey-strokes-tables font-ss02", children: [
|
|
845
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex gap-3 items-start w-full", children: [
|
|
846
|
+
/* @__PURE__ */ jsx7(
|
|
1070
847
|
EntityAvatar,
|
|
1071
848
|
{
|
|
1072
849
|
entityType: "company",
|
|
@@ -1077,10 +854,10 @@ function ProjectDealCard({
|
|
|
1077
854
|
className: "shrink-0 rounded-[34px]"
|
|
1078
855
|
}
|
|
1079
856
|
),
|
|
1080
|
-
/* @__PURE__ */
|
|
1081
|
-
/* @__PURE__ */
|
|
1082
|
-
/* @__PURE__ */
|
|
1083
|
-
showCollab && /* @__PURE__ */
|
|
857
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center", children: [
|
|
858
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex gap-2 items-center", children: [
|
|
859
|
+
/* @__PURE__ */ jsx7("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
|
|
860
|
+
showCollab && /* @__PURE__ */ jsxs6(
|
|
1084
861
|
CollabAffordance,
|
|
1085
862
|
{
|
|
1086
863
|
href: collabHref,
|
|
@@ -1088,15 +865,15 @@ function ProjectDealCard({
|
|
|
1088
865
|
className: "flex gap-1.5 items-center text-primary-color-nuk-text label-xs-text shrink-0",
|
|
1089
866
|
children: [
|
|
1090
867
|
"Collab Hub",
|
|
1091
|
-
/* @__PURE__ */
|
|
868
|
+
/* @__PURE__ */ jsx7(XsViewInvoiceIcon2, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
1092
869
|
]
|
|
1093
870
|
}
|
|
1094
871
|
)
|
|
1095
872
|
] }),
|
|
1096
|
-
/* @__PURE__ */
|
|
1097
|
-
/* @__PURE__ */
|
|
1098
|
-
/* @__PURE__ */
|
|
1099
|
-
/* @__PURE__ */
|
|
873
|
+
/* @__PURE__ */ jsx7("div", { className: "label-xs-text text-text-secondary break-words sm:whitespace-nowrap", children: [category, `${startDate} - ${endDate}`].filter(Boolean).join(" \u2022 ") }),
|
|
874
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex gap-3 items-center min-w-0", children: [
|
|
875
|
+
/* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Owner" }),
|
|
876
|
+
/* @__PURE__ */ jsx7(
|
|
1100
877
|
EntityAvatar,
|
|
1101
878
|
{
|
|
1102
879
|
entityType: "initials",
|
|
@@ -1107,61 +884,61 @@ function ProjectDealCard({
|
|
|
1107
884
|
className: "shrink-0"
|
|
1108
885
|
}
|
|
1109
886
|
),
|
|
1110
|
-
/* @__PURE__ */
|
|
887
|
+
/* @__PURE__ */ jsx7("span", { className: "label-xs-text text-text-secondary truncate", children: abbreviatePersonName(deal.owner_name) ?? "\u2014" })
|
|
1111
888
|
] })
|
|
1112
889
|
] }),
|
|
1113
|
-
/* @__PURE__ */
|
|
1114
|
-
/* @__PURE__ */
|
|
1115
|
-
deal.total_equity_shares > 0 && /* @__PURE__ */
|
|
890
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
|
|
891
|
+
/* @__PURE__ */ jsx7("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: fmtUSD2(deal.total_contracted) }),
|
|
892
|
+
deal.total_equity_shares > 0 && /* @__PURE__ */ jsxs6("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
1116
893
|
"+ ",
|
|
1117
894
|
deal.total_equity_shares.toLocaleString(),
|
|
1118
895
|
" shares"
|
|
1119
896
|
] }),
|
|
1120
|
-
/* @__PURE__ */
|
|
897
|
+
/* @__PURE__ */ jsx7(
|
|
1121
898
|
"div",
|
|
1122
899
|
{
|
|
1123
|
-
className:
|
|
900
|
+
className: cn7(
|
|
1124
901
|
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
|
|
1125
902
|
STATUS_STYLES[status]
|
|
1126
903
|
),
|
|
1127
|
-
children: /* @__PURE__ */
|
|
904
|
+
children: /* @__PURE__ */ jsx7("span", { className: "label-xs-medium", children: statusLabel(status) })
|
|
1128
905
|
}
|
|
1129
906
|
),
|
|
1130
907
|
asideFooter
|
|
1131
908
|
] })
|
|
1132
909
|
] }),
|
|
1133
|
-
/* @__PURE__ */
|
|
1134
|
-
/* @__PURE__ */
|
|
910
|
+
/* @__PURE__ */ jsxs6("div", { className: "grid w-full grid-cols-2 items-center gap-x-3 gap-y-2 md:grid-cols-3 lg:flex lg:justify-between lg:gap-0", children: [
|
|
911
|
+
/* @__PURE__ */ jsx7(
|
|
1135
912
|
TrackingItem,
|
|
1136
913
|
{
|
|
1137
914
|
label: `Deliverables met - ${deal.deliverables_met}/${deal.deliverables_total}`,
|
|
1138
915
|
done: deal.deliverables_total > 0 && deal.deliverables_met >= deal.deliverables_total
|
|
1139
916
|
}
|
|
1140
917
|
),
|
|
1141
|
-
/* @__PURE__ */
|
|
1142
|
-
/* @__PURE__ */
|
|
1143
|
-
deal.has_third_party && /* @__PURE__ */
|
|
918
|
+
/* @__PURE__ */ jsx7(TrackingItem, { label: "Client paid", done: deal.client_paid && isFullyPaid }),
|
|
919
|
+
/* @__PURE__ */ jsx7(TrackingItem, { label: "Agency paid", done: deal.agency_paid && isFullyPaid }),
|
|
920
|
+
deal.has_third_party && /* @__PURE__ */ jsx7(TrackingItem, { label: "Third Party paid", done: deal.third_party_paid && isFullyPaid })
|
|
1144
921
|
] }),
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
923
|
+
/* @__PURE__ */ jsx7("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ jsx7(
|
|
1147
924
|
"div",
|
|
1148
925
|
{
|
|
1149
926
|
className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px]",
|
|
1150
927
|
style: { width: `${progressPct}%` }
|
|
1151
928
|
}
|
|
1152
929
|
) }),
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */
|
|
930
|
+
/* @__PURE__ */ jsxs6("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
|
|
931
|
+
/* @__PURE__ */ jsx7(
|
|
1155
932
|
"span",
|
|
1156
933
|
{
|
|
1157
|
-
className:
|
|
934
|
+
className: cn7(
|
|
1158
935
|
"min-w-0 flex-1 label-xs-table",
|
|
1159
936
|
deal.total_collected > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
1160
937
|
),
|
|
1161
938
|
children: `${fmtUSD2(deal.total_collected)}${deal.total_collected > 0 ? " collected" : ""}`
|
|
1162
939
|
}
|
|
1163
940
|
),
|
|
1164
|
-
hasPaymentsCount && /* @__PURE__ */
|
|
941
|
+
hasPaymentsCount && /* @__PURE__ */ jsxs6("span", { className: "flex-1 label-xs-table text-text-secondary", children: [
|
|
1165
942
|
deal.payments_paid,
|
|
1166
943
|
" of ",
|
|
1167
944
|
deal.payments_total,
|
|
@@ -1169,7 +946,7 @@ function ProjectDealCard({
|
|
|
1169
946
|
" ",
|
|
1170
947
|
status === "Active" ? "collected" : "paid"
|
|
1171
948
|
] }),
|
|
1172
|
-
isFullyPaid ? /* @__PURE__ */
|
|
949
|
+
isFullyPaid ? /* @__PURE__ */ jsx7("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" }) : /* @__PURE__ */ jsxs6("span", { className: "shrink-0 text-semantic-color-status-priority-priority-2 label-xs-table whitespace-nowrap", children: [
|
|
1173
950
|
fmtUSD2(outstanding),
|
|
1174
951
|
" outstanding"
|
|
1175
952
|
] })
|
|
@@ -1181,8 +958,6 @@ function ProjectDealCard({
|
|
|
1181
958
|
export {
|
|
1182
959
|
ContractDetailsCard,
|
|
1183
960
|
DealEmptyState,
|
|
1184
|
-
ENTITY_AVATAR_SIZE_PX,
|
|
1185
|
-
EntityAvatar,
|
|
1186
961
|
ManualDealCard,
|
|
1187
962
|
ManualDealPreviewDialog,
|
|
1188
963
|
ProjectDealCard,
|