@nukleus-sports/ui-patterns 0.0.0-stage → 0.1.0
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/index.cjs +19 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/marketing.cjs +1036 -0
- package/dist/marketing.cjs.map +1 -0
- package/dist/marketing.d.cts +456 -0
- package/dist/marketing.d.ts +456 -0
- package/dist/marketing.js +1021 -0
- package/dist/marketing.js.map +1 -0
- package/package.json +58 -4
- package/README.md +0 -3
|
@@ -0,0 +1,1036 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/marketing/index.ts
|
|
21
|
+
var marketing_exports = {};
|
|
22
|
+
__export(marketing_exports, {
|
|
23
|
+
DealEmptyState: () => DealEmptyState,
|
|
24
|
+
ENTITY_AVATAR_SIZE_PX: () => ENTITY_AVATAR_SIZE_PX,
|
|
25
|
+
EntityAvatar: () => EntityAvatar,
|
|
26
|
+
ManualDealCard: () => ManualDealCard,
|
|
27
|
+
ManualDealPreviewDialog: () => ManualDealPreviewDialog,
|
|
28
|
+
ProjectDealCard: () => ProjectDealCard,
|
|
29
|
+
RowActionsDropdown: () => RowActionsDropdown,
|
|
30
|
+
resolveDealDocument: () => resolveDealDocument
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(marketing_exports);
|
|
33
|
+
|
|
34
|
+
// src/marketing/entity-avatar.tsx
|
|
35
|
+
var import_ui_web = require("@nukleus-sports/ui-web");
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var ENTITY_AVATAR_SIZE_PX = {
|
|
38
|
+
xs: 16,
|
|
39
|
+
sm: 24,
|
|
40
|
+
md: 32,
|
|
41
|
+
lg: 48,
|
|
42
|
+
xl: 64
|
|
43
|
+
};
|
|
44
|
+
var sizeClasses = {
|
|
45
|
+
xs: "h-4 w-4",
|
|
46
|
+
sm: "h-6 w-6",
|
|
47
|
+
md: "h-8 w-8",
|
|
48
|
+
lg: "h-12 w-12",
|
|
49
|
+
xl: "h-16 w-16"
|
|
50
|
+
};
|
|
51
|
+
var initialSizeClasses = {
|
|
52
|
+
xs: "text-[8px]",
|
|
53
|
+
sm: "text-xs",
|
|
54
|
+
md: "text-sm",
|
|
55
|
+
lg: "text-base",
|
|
56
|
+
xl: "text-lg"
|
|
57
|
+
};
|
|
58
|
+
var contactSizeClasses = {
|
|
59
|
+
xs: "h-4 w-4",
|
|
60
|
+
sm: "h-6 w-6",
|
|
61
|
+
md: "h-8 w-8",
|
|
62
|
+
lg: "h-12 w-12",
|
|
63
|
+
xl: "h-16 w-16"
|
|
64
|
+
};
|
|
65
|
+
var contactInitialSizeClasses = {
|
|
66
|
+
xs: "text-[8px]",
|
|
67
|
+
sm: "text-[10px]",
|
|
68
|
+
md: "text-sm",
|
|
69
|
+
lg: "text-base",
|
|
70
|
+
xl: "text-lg"
|
|
71
|
+
};
|
|
72
|
+
function EntityAvatar({
|
|
73
|
+
entityType = "initials",
|
|
74
|
+
entityData,
|
|
75
|
+
firstName,
|
|
76
|
+
lastName,
|
|
77
|
+
name,
|
|
78
|
+
imageUrl,
|
|
79
|
+
resolveImageUrl,
|
|
80
|
+
size = "md",
|
|
81
|
+
className,
|
|
82
|
+
fallbackClassName,
|
|
83
|
+
showInitials = true,
|
|
84
|
+
cacheBreaker
|
|
85
|
+
}) {
|
|
86
|
+
const extractedFirstName = firstName || entityData?.first_name || "";
|
|
87
|
+
const extractedLastName = lastName || entityData?.last_name || "";
|
|
88
|
+
const extractedName = name || entityData?.name || "";
|
|
89
|
+
const isSquared = entityType === "team" || entityType === "company";
|
|
90
|
+
const usesContactSizes = entityType === "contact" || entityType === "company" || entityType === "initials";
|
|
91
|
+
const avatarSizeClasses = usesContactSizes ? contactSizeClasses : sizeClasses;
|
|
92
|
+
const initialsSizeClasses = usesContactSizes ? contactInitialSizeClasses : initialSizeClasses;
|
|
93
|
+
const defaultSize = usesContactSizes ? "sm" : "md";
|
|
94
|
+
const effectiveSize = size || defaultSize;
|
|
95
|
+
const getRawImageUrl = () => {
|
|
96
|
+
if (imageUrl) return imageUrl;
|
|
97
|
+
switch (entityType) {
|
|
98
|
+
case "player":
|
|
99
|
+
return entityData?.player_image_url ?? null;
|
|
100
|
+
case "coach":
|
|
101
|
+
return entityData?.coach_image_url ?? null;
|
|
102
|
+
case "team":
|
|
103
|
+
return entityData?.team_logo_url ?? null;
|
|
104
|
+
case "initials":
|
|
105
|
+
case "contact":
|
|
106
|
+
case "company":
|
|
107
|
+
return entityData?.avatar_url ?? null;
|
|
108
|
+
case "agency":
|
|
109
|
+
return entityData?.profile_image_url ?? null;
|
|
110
|
+
default:
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const getImageUrl = () => {
|
|
115
|
+
const rawUrl = getRawImageUrl();
|
|
116
|
+
if (!rawUrl) return null;
|
|
117
|
+
if (resolveImageUrl) {
|
|
118
|
+
return resolveImageUrl(rawUrl, { entityType, size: effectiveSize, cacheBreaker });
|
|
119
|
+
}
|
|
120
|
+
if (rawUrl.startsWith("http") || rawUrl.startsWith("data:")) {
|
|
121
|
+
return rawUrl;
|
|
122
|
+
}
|
|
123
|
+
return null;
|
|
124
|
+
};
|
|
125
|
+
const getInitials = () => {
|
|
126
|
+
if (!showInitials) {
|
|
127
|
+
const defaults = {
|
|
128
|
+
player: "P",
|
|
129
|
+
coach: "C",
|
|
130
|
+
team: "T",
|
|
131
|
+
contact: "C",
|
|
132
|
+
company: "C",
|
|
133
|
+
agency: "",
|
|
134
|
+
initials: ""
|
|
135
|
+
};
|
|
136
|
+
return defaults[entityType];
|
|
137
|
+
}
|
|
138
|
+
switch (entityType) {
|
|
139
|
+
case "player":
|
|
140
|
+
case "coach":
|
|
141
|
+
case "agency": {
|
|
142
|
+
const first = extractedFirstName?.[0] || "";
|
|
143
|
+
const last = extractedLastName?.[0] || "";
|
|
144
|
+
const initials2 = (first + last).toUpperCase();
|
|
145
|
+
if (initials2) return initials2;
|
|
146
|
+
if (entityType === "player") return "P";
|
|
147
|
+
if (entityType === "coach") return "C";
|
|
148
|
+
return "?";
|
|
149
|
+
}
|
|
150
|
+
case "team": {
|
|
151
|
+
const teamName = entityData?.team || "";
|
|
152
|
+
const nickname = entityData?.nickname || "";
|
|
153
|
+
const displayName = nickname || teamName || "";
|
|
154
|
+
const words = displayName.trim().split(/\s+/);
|
|
155
|
+
if (words.length >= 2) {
|
|
156
|
+
return (words[0][0] + words[1][0]).toUpperCase();
|
|
157
|
+
} else if (words.length === 1 && words[0].length >= 2) {
|
|
158
|
+
return words[0].substring(0, 2).toUpperCase();
|
|
159
|
+
}
|
|
160
|
+
return "T";
|
|
161
|
+
}
|
|
162
|
+
case "initials": {
|
|
163
|
+
const displayName = extractedName.trim();
|
|
164
|
+
if (!displayName) return "?";
|
|
165
|
+
const nameParts = displayName.trim().split(/\s+/);
|
|
166
|
+
if (nameParts.length >= 2) {
|
|
167
|
+
return (nameParts[0][0] + nameParts[nameParts.length - 1][0]).toUpperCase();
|
|
168
|
+
}
|
|
169
|
+
return displayName.substring(0, 2).toUpperCase();
|
|
170
|
+
}
|
|
171
|
+
case "contact":
|
|
172
|
+
case "company": {
|
|
173
|
+
const displayName = extractedName;
|
|
174
|
+
if (!displayName) return "C";
|
|
175
|
+
const nameParts = displayName.trim().split(/\s+/);
|
|
176
|
+
if (nameParts.length >= 2) {
|
|
177
|
+
if (entityType === "company") {
|
|
178
|
+
return (nameParts[0][0] + nameParts[1][0]).toUpperCase();
|
|
179
|
+
} else {
|
|
180
|
+
return (nameParts[0][0] + nameParts[nameParts.length - 1][0]).toUpperCase();
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return displayName.substring(0, 2).toUpperCase();
|
|
184
|
+
}
|
|
185
|
+
default:
|
|
186
|
+
return "?";
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const getDefaultImageUrl = () => {
|
|
190
|
+
switch (entityType) {
|
|
191
|
+
case "player":
|
|
192
|
+
case "coach":
|
|
193
|
+
return "/images/headshot_default.png";
|
|
194
|
+
case "team":
|
|
195
|
+
return "/images/team_default.png";
|
|
196
|
+
case "contact":
|
|
197
|
+
return "/images/contact_default.png";
|
|
198
|
+
case "company":
|
|
199
|
+
return "/images/company_default.png";
|
|
200
|
+
case "agency":
|
|
201
|
+
return "/images/agency_default.png";
|
|
202
|
+
case "initials":
|
|
203
|
+
return "/images/headshot_default.png";
|
|
204
|
+
default:
|
|
205
|
+
return "/images/headshot_default.png";
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
const getAltText = () => {
|
|
209
|
+
switch (entityType) {
|
|
210
|
+
case "player":
|
|
211
|
+
return `${extractedFirstName} ${extractedLastName}`.trim() || "Player avatar";
|
|
212
|
+
case "coach":
|
|
213
|
+
return `${extractedFirstName} ${extractedLastName}`.trim() || "Coach avatar";
|
|
214
|
+
case "team":
|
|
215
|
+
return `${entityData?.team || entityData?.nickname || "Team"} logo`;
|
|
216
|
+
case "initials":
|
|
217
|
+
return `${extractedName}`.trim() || "User avatar";
|
|
218
|
+
case "contact":
|
|
219
|
+
return extractedName || "Profile Picture";
|
|
220
|
+
case "company":
|
|
221
|
+
return extractedName || "Company avatar";
|
|
222
|
+
case "agency":
|
|
223
|
+
return `${extractedFirstName} ${extractedLastName}`.trim() || "User avatar";
|
|
224
|
+
default:
|
|
225
|
+
return "Avatar";
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
const processedImageUrl = getImageUrl();
|
|
229
|
+
const defaultImageUrl = getDefaultImageUrl();
|
|
230
|
+
const initials = getInitials();
|
|
231
|
+
const altText = getAltText();
|
|
232
|
+
const hasValidImage = Boolean(
|
|
233
|
+
processedImageUrl && processedImageUrl !== "null" && processedImageUrl !== null && processedImageUrl.trim() !== ""
|
|
234
|
+
);
|
|
235
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui_web.Avatar, { className: (0, import_ui_web.cn)(avatarSizeClasses[effectiveSize], isSquared && "rounded-lg", className), children: [
|
|
236
|
+
hasValidImage && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui_web.AvatarImage, { src: processedImageUrl, alt: altText }),
|
|
237
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
238
|
+
import_ui_web.AvatarFallback,
|
|
239
|
+
{
|
|
240
|
+
className: (0, import_ui_web.cn)(
|
|
241
|
+
initialsSizeClasses[effectiveSize],
|
|
242
|
+
isSquared && "rounded-lg bg-greys-grey-table-h",
|
|
243
|
+
fallbackClassName
|
|
244
|
+
),
|
|
245
|
+
children: entityType === "contact" || entityType === "initials" ? initials : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
246
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
247
|
+
"img",
|
|
248
|
+
{
|
|
249
|
+
src: defaultImageUrl,
|
|
250
|
+
alt: altText,
|
|
251
|
+
className: "aspect-square h-full w-full object-cover"
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "sr-only", children: initials })
|
|
255
|
+
] })
|
|
256
|
+
}
|
|
257
|
+
)
|
|
258
|
+
] });
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// src/marketing/row-actions-dropdown.tsx
|
|
262
|
+
var import_ui_web2 = require("@nukleus-sports/ui-web");
|
|
263
|
+
var import_icons = require("@nukleus-sports/icons");
|
|
264
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
265
|
+
function RowActionsDropdown({
|
|
266
|
+
actions,
|
|
267
|
+
trigger,
|
|
268
|
+
triggerClassName,
|
|
269
|
+
contentClassName,
|
|
270
|
+
align = "end",
|
|
271
|
+
ariaLabel,
|
|
272
|
+
modal = true
|
|
273
|
+
}) {
|
|
274
|
+
const visibleActions = actions.filter((a) => a.when !== false);
|
|
275
|
+
if (visibleActions.length === 0) return null;
|
|
276
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui_web2.DropdownMenu, { modal, children: [
|
|
277
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui_web2.DropdownMenuTrigger, { asChild: true, children: trigger ?? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
278
|
+
import_ui_web2.Button,
|
|
279
|
+
{
|
|
280
|
+
variant: "text",
|
|
281
|
+
size: "sm",
|
|
282
|
+
"aria-label": ariaLabel ?? "Row actions",
|
|
283
|
+
onClick: (e) => e.stopPropagation(),
|
|
284
|
+
className: (0, import_ui_web2.cn)("h-8 w-8 p-0 shrink-0", triggerClassName),
|
|
285
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_icons.MoreIcon, { className: "h-14 w-16 text-btn-primary", "aria-hidden": "true" })
|
|
286
|
+
}
|
|
287
|
+
) }),
|
|
288
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
289
|
+
import_ui_web2.DropdownMenuContent,
|
|
290
|
+
{
|
|
291
|
+
align,
|
|
292
|
+
className: (0, import_ui_web2.cn)(
|
|
293
|
+
"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)]",
|
|
294
|
+
contentClassName
|
|
295
|
+
),
|
|
296
|
+
children: visibleActions.map((action, i) => {
|
|
297
|
+
const item = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
298
|
+
import_ui_web2.DropdownMenuItem,
|
|
299
|
+
{
|
|
300
|
+
disabled: action.disabled,
|
|
301
|
+
onClick: (e) => {
|
|
302
|
+
e.stopPropagation();
|
|
303
|
+
if (action.disabled) {
|
|
304
|
+
e.preventDefault();
|
|
305
|
+
return;
|
|
306
|
+
}
|
|
307
|
+
action.onClick(e);
|
|
308
|
+
},
|
|
309
|
+
className: (0, import_ui_web2.cn)(
|
|
310
|
+
action.destructive && "text-semantic-color-status-priority-blocked-hot-copy hover:!text-semantic-color-status-priority-blocked-hot-copy",
|
|
311
|
+
action.className
|
|
312
|
+
),
|
|
313
|
+
children: action.label
|
|
314
|
+
},
|
|
315
|
+
i
|
|
316
|
+
);
|
|
317
|
+
if (action.disabled && action.disabledTooltip) {
|
|
318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui_web2.TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_ui_web2.Tooltip, { children: [
|
|
319
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui_web2.TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { children: item }) }),
|
|
320
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ui_web2.TooltipContent, { children: action.disabledTooltip })
|
|
321
|
+
] }) }, i);
|
|
322
|
+
}
|
|
323
|
+
return item;
|
|
324
|
+
})
|
|
325
|
+
}
|
|
326
|
+
)
|
|
327
|
+
] });
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// src/marketing/deal-empty-state.tsx
|
|
331
|
+
var import_ui_web3 = require("@nukleus-sports/ui-web");
|
|
332
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
333
|
+
function DealEmptyState({ message, className, messageClassName }) {
|
|
334
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: (0, import_ui_web3.cn)("flex items-center justify-center py-10 px-6", className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
335
|
+
"p",
|
|
336
|
+
{
|
|
337
|
+
className: (0, import_ui_web3.cn)("body-text text-text-secondary text-center max-w-[380px]", messageClassName),
|
|
338
|
+
children: message
|
|
339
|
+
}
|
|
340
|
+
) });
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
// src/marketing/manual-deal-card.tsx
|
|
344
|
+
var import_react = require("react");
|
|
345
|
+
var import_ui_web4 = require("@nukleus-sports/ui-web");
|
|
346
|
+
var import_icons2 = require("@nukleus-sports/icons");
|
|
347
|
+
var import_core = require("@nukleus-sports/core");
|
|
348
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
349
|
+
function resolveDealDocument(meta) {
|
|
350
|
+
const url = meta.uploaded_document?.url ?? meta.document_url ?? null;
|
|
351
|
+
if (!url) return null;
|
|
352
|
+
return { url, name: meta.uploaded_document?.name ?? meta.document_name ?? null };
|
|
353
|
+
}
|
|
354
|
+
function ManualDealCard({
|
|
355
|
+
deal,
|
|
356
|
+
onPreview,
|
|
357
|
+
onEdit,
|
|
358
|
+
onDelete,
|
|
359
|
+
onOpenDocument,
|
|
360
|
+
resolveImageUrl,
|
|
361
|
+
className
|
|
362
|
+
}) {
|
|
363
|
+
const [isExpanded, setIsExpanded] = (0, import_react.useState)(false);
|
|
364
|
+
const meta = deal.metadata;
|
|
365
|
+
const brandName = meta.brand_name;
|
|
366
|
+
const startDate = (0, import_core.formatDealDate)(meta.start_date);
|
|
367
|
+
const endDate = (0, import_core.formatDealDate)(meta.end_date);
|
|
368
|
+
const dateRange = [startDate, endDate].filter((d) => Boolean(d) && d !== "\u2014").join(" - ");
|
|
369
|
+
const metaLine = [meta.deal_category, dateRange].filter(Boolean).join(" \u2022 ");
|
|
370
|
+
const doc = resolveDealDocument(meta);
|
|
371
|
+
const previewDocButton = doc && onOpenDocument && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
372
|
+
import_ui_web4.Button,
|
|
373
|
+
{
|
|
374
|
+
variant: "unstyled",
|
|
375
|
+
size: "none",
|
|
376
|
+
type: "button",
|
|
377
|
+
className: "flex gap-2 items-center text-primary-color-nuk-text label-xs-text shrink-0",
|
|
378
|
+
onClick: (e) => {
|
|
379
|
+
e.stopPropagation();
|
|
380
|
+
onOpenDocument(doc);
|
|
381
|
+
},
|
|
382
|
+
children: [
|
|
383
|
+
"Preview Doc",
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_icons2.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
385
|
+
]
|
|
386
|
+
}
|
|
387
|
+
);
|
|
388
|
+
const actions = [
|
|
389
|
+
{ label: "Edit", onClick: () => onEdit?.(deal), when: Boolean(onEdit) },
|
|
390
|
+
{ label: "Preview Deal", onClick: () => onPreview(deal) },
|
|
391
|
+
{
|
|
392
|
+
label: "Delete",
|
|
393
|
+
onClick: () => onDelete?.(deal),
|
|
394
|
+
destructive: true,
|
|
395
|
+
when: Boolean(onDelete)
|
|
396
|
+
}
|
|
397
|
+
];
|
|
398
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
399
|
+
"div",
|
|
400
|
+
{
|
|
401
|
+
className: (0, import_ui_web4.cn)(
|
|
402
|
+
"bg-card border-b last:border-b-0 border-grey-strokes-tables w-full font-ss02",
|
|
403
|
+
className
|
|
404
|
+
),
|
|
405
|
+
children: [
|
|
406
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-col sm:hidden", children: [
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start p-2 justify-between flex-[1_0_0]", children: [
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-1 items-start", children: [
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
410
|
+
import_ui_web4.Button,
|
|
411
|
+
{
|
|
412
|
+
variant: "unstyled",
|
|
413
|
+
size: "none",
|
|
414
|
+
type: "button",
|
|
415
|
+
onClick: () => setIsExpanded((v) => !v),
|
|
416
|
+
className: "flex p-[6px] items-center justify-center gap-[10px]",
|
|
417
|
+
"aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
|
|
418
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
419
|
+
import_icons2.ArrowDownFormIcon,
|
|
420
|
+
{
|
|
421
|
+
width: 12.004,
|
|
422
|
+
height: 5.999,
|
|
423
|
+
className: (0, import_ui_web4.cn)(
|
|
424
|
+
"text-greys-icons transition-transform duration-200",
|
|
425
|
+
isExpanded && "rotate-180"
|
|
426
|
+
)
|
|
427
|
+
}
|
|
428
|
+
)
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName })
|
|
432
|
+
] }),
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: (0, import_core.fmtUSDWhole)(meta.total_deal_amount) })
|
|
434
|
+
] }),
|
|
435
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
436
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
437
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "p-2 flex items-start justify-between gap-1 bg-greys-table-hover rounded-[0_0_10px_10px]", children: [
|
|
438
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
439
|
+
import_ui_web4.Button,
|
|
440
|
+
{
|
|
441
|
+
variant: "unstyled",
|
|
442
|
+
size: "none",
|
|
443
|
+
type: "button",
|
|
444
|
+
className: "text-primary-color-nuk-text font-normal text-[11px]",
|
|
445
|
+
onClick: () => onPreview(deal),
|
|
446
|
+
children: "View Details"
|
|
447
|
+
}
|
|
448
|
+
),
|
|
449
|
+
previewDocButton
|
|
450
|
+
] })
|
|
451
|
+
] })
|
|
452
|
+
] }),
|
|
453
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "group hidden sm:flex gap-3 items-start p-3", children: [
|
|
454
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
455
|
+
EntityAvatar,
|
|
456
|
+
{
|
|
457
|
+
entityType: "company",
|
|
458
|
+
imageUrl: deal.company_avatar_url,
|
|
459
|
+
name: deal.company_name ?? brandName,
|
|
460
|
+
resolveImageUrl,
|
|
461
|
+
size: "sm",
|
|
462
|
+
className: "shrink-0 rounded-[34px]"
|
|
463
|
+
}
|
|
464
|
+
),
|
|
465
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex flex-1 flex-col gap-2 justify-center min-w-0", children: [
|
|
466
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start justify-between gap-2 w-full", children: [
|
|
467
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-2 items-center min-w-0", children: [
|
|
468
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "text-text-primary header-xl-medium-card truncate", children: brandName }),
|
|
469
|
+
previewDocButton
|
|
470
|
+
] }),
|
|
471
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex items-start gap-2 shrink-0", children: [
|
|
472
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: (0, import_core.fmtUSDWhole)(meta.total_deal_amount) }),
|
|
473
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(RowActionsDropdown, { actions, ariaLabel: "Deal options" })
|
|
474
|
+
] })
|
|
475
|
+
] }),
|
|
476
|
+
metaLine && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "label-xs-text text-text-secondary break-words", children: metaLine }),
|
|
477
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex gap-3 items-center min-w-0", children: [
|
|
478
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Lead" }),
|
|
479
|
+
deal.lead_agent_name ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
480
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
481
|
+
EntityAvatar,
|
|
482
|
+
{
|
|
483
|
+
entityType: "initials",
|
|
484
|
+
imageUrl: deal.lead_agent_avatar_url,
|
|
485
|
+
name: deal.lead_agent_name,
|
|
486
|
+
resolveImageUrl,
|
|
487
|
+
size: "sm",
|
|
488
|
+
className: "shrink-0"
|
|
489
|
+
}
|
|
490
|
+
),
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: deal.lead_agent_name })
|
|
492
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: "--" })
|
|
493
|
+
] })
|
|
494
|
+
] })
|
|
495
|
+
] })
|
|
496
|
+
]
|
|
497
|
+
}
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
// src/marketing/manual-deal-preview-dialog.tsx
|
|
502
|
+
var import_react2 = require("react");
|
|
503
|
+
var import_ui_web5 = require("@nukleus-sports/ui-web");
|
|
504
|
+
var import_icons3 = require("@nukleus-sports/icons");
|
|
505
|
+
var import_core2 = require("@nukleus-sports/core");
|
|
506
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
507
|
+
var DESKTOP_BREAKPOINT_QUERY = "(min-width: 640px)";
|
|
508
|
+
function useIsDesktopViewport() {
|
|
509
|
+
const [isDesktop, setIsDesktop] = (0, import_react2.useState)(
|
|
510
|
+
() => typeof window !== "undefined" ? window.matchMedia(DESKTOP_BREAKPOINT_QUERY).matches : true
|
|
511
|
+
);
|
|
512
|
+
(0, import_react2.useEffect)(() => {
|
|
513
|
+
const query = window.matchMedia(DESKTOP_BREAKPOINT_QUERY);
|
|
514
|
+
const update = () => setIsDesktop(query.matches);
|
|
515
|
+
update();
|
|
516
|
+
query.addEventListener("change", update);
|
|
517
|
+
return () => query.removeEventListener("change", update);
|
|
518
|
+
}, []);
|
|
519
|
+
return isDesktop;
|
|
520
|
+
}
|
|
521
|
+
function ReadOnlyField({ label, value }) {
|
|
522
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
523
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "label-xs-medium text-text-secondary", children: label }),
|
|
524
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex items-center px-[0px] py-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "body-text text-text-primary whitespace-nowrap", children: value || "--" }) })
|
|
525
|
+
] });
|
|
526
|
+
}
|
|
527
|
+
function ReadOnlyPartyCard({ title, children, className }) {
|
|
528
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
529
|
+
"div",
|
|
530
|
+
{
|
|
531
|
+
className: (0, import_ui_web5.cn)(
|
|
532
|
+
"flex flex-col gap-4 rounded-[10px] border border-grey-strokes-tables bg-card px-6 py-4",
|
|
533
|
+
className
|
|
534
|
+
),
|
|
535
|
+
children: [
|
|
536
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h3", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: title }),
|
|
537
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-col gap-4", children })
|
|
538
|
+
]
|
|
539
|
+
}
|
|
540
|
+
);
|
|
541
|
+
}
|
|
542
|
+
function ManualDealPreviewDialog({
|
|
543
|
+
deal,
|
|
544
|
+
open,
|
|
545
|
+
onOpenChange,
|
|
546
|
+
onEdit,
|
|
547
|
+
onOpenDocument,
|
|
548
|
+
resolveImageUrl
|
|
549
|
+
}) {
|
|
550
|
+
const isDesktop = useIsDesktopViewport();
|
|
551
|
+
if (!deal) return null;
|
|
552
|
+
const meta = deal.metadata;
|
|
553
|
+
const doc = resolveDealDocument(meta);
|
|
554
|
+
const cardCls = isDesktop ? "flex-1 min-w-0 h-[479px]" : "w-full h-auto";
|
|
555
|
+
const cards = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: (0, import_ui_web5.cn)("flex gap-4 sm:gap-[12px]", !isDesktop && "flex-col"), children: [
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Brand", className: cardCls, children: [
|
|
557
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Brand Name", value: (0, import_core2.fmt)(meta.brand_name) }),
|
|
558
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Deal Category", value: (0, import_core2.fmt)(meta.deal_category) }),
|
|
559
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Total Deal Amount", value: (0, import_core2.fmtCurrency)(meta.total_deal_amount) }),
|
|
560
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Payment Due Date", value: (0, import_core2.fmtDate)(meta.brand_payment_due_date) }),
|
|
561
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Deal Start Date", value: (0, import_core2.fmtDate)(meta.start_date) }),
|
|
562
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Deal End Date", value: (0, import_core2.fmtDate)(meta.end_date) })
|
|
563
|
+
] }),
|
|
564
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Client", className: cardCls, children: [
|
|
565
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Client Name", value: (0, import_core2.fmt)(meta.client_name) }),
|
|
566
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Client's Invoice Name", value: (0, import_core2.fmt)(meta.client_invoice_name) })
|
|
567
|
+
] }),
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Agency", className: cardCls, children: [
|
|
569
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Agency Name", value: (0, import_core2.fmt)(meta.agency_name) }),
|
|
570
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
571
|
+
ReadOnlyField,
|
|
572
|
+
{
|
|
573
|
+
label: "Commission %",
|
|
574
|
+
value: meta.agency_commission ? `${meta.agency_commission}%` : "--"
|
|
575
|
+
}
|
|
576
|
+
),
|
|
577
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Payment Due Date", value: (0, import_core2.fmtDate)(meta.agency_payment_due_date) }),
|
|
578
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-[2px] shrink-0", children: [
|
|
579
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
580
|
+
"span",
|
|
581
|
+
{
|
|
582
|
+
className: "text-[13px] font-medium leading-normal text-text-secondary",
|
|
583
|
+
style: { fontFeatureSettings: "'ss05', 'ss02'" },
|
|
584
|
+
children: "Lead Agent"
|
|
585
|
+
}
|
|
586
|
+
),
|
|
587
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex min-h-[32px] items-center gap-2 py-[6px]", children: [
|
|
588
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
589
|
+
EntityAvatar,
|
|
590
|
+
{
|
|
591
|
+
entityType: "initials",
|
|
592
|
+
imageUrl: deal.lead_agent_avatar_url,
|
|
593
|
+
name: deal.lead_agent_name ?? "",
|
|
594
|
+
resolveImageUrl,
|
|
595
|
+
size: "sm",
|
|
596
|
+
className: "shrink-0"
|
|
597
|
+
}
|
|
598
|
+
),
|
|
599
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
600
|
+
"span",
|
|
601
|
+
{
|
|
602
|
+
className: "overflow-hidden text-ellipsis text-[14px] leading-[15px] text-text-secondary whitespace-nowrap",
|
|
603
|
+
style: { fontFeatureSettings: "'ss02', 'ss05'" },
|
|
604
|
+
children: deal.lead_agent_name ?? "--"
|
|
605
|
+
}
|
|
606
|
+
)
|
|
607
|
+
] })
|
|
608
|
+
] })
|
|
609
|
+
] }),
|
|
610
|
+
meta.has_third_party && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ReadOnlyPartyCard, { title: "Third Party", className: cardCls, children: [
|
|
611
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ReadOnlyField, { label: "Third Party Name", value: (0, import_core2.fmt)(meta.third_party_name) }),
|
|
612
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
613
|
+
ReadOnlyField,
|
|
614
|
+
{
|
|
615
|
+
label: "Third Party Invoice Name",
|
|
616
|
+
value: (0, import_core2.fmt)(meta.third_party_invoice_name)
|
|
617
|
+
}
|
|
618
|
+
),
|
|
619
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
620
|
+
ReadOnlyField,
|
|
621
|
+
{
|
|
622
|
+
label: "Commission %",
|
|
623
|
+
value: meta.third_party_commission ? `${meta.third_party_commission}%` : "--"
|
|
624
|
+
}
|
|
625
|
+
),
|
|
626
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
627
|
+
ReadOnlyField,
|
|
628
|
+
{
|
|
629
|
+
label: "Payment Due Date",
|
|
630
|
+
value: (0, import_core2.fmtDate)(meta.third_party_payment_due_date)
|
|
631
|
+
}
|
|
632
|
+
)
|
|
633
|
+
] })
|
|
634
|
+
] });
|
|
635
|
+
const notes = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("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: [
|
|
636
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
637
|
+
"h3",
|
|
638
|
+
{
|
|
639
|
+
className: "header-xl-medium-card text-text-primary whitespace-nowrap",
|
|
640
|
+
style: { fontFeatureSettings: "'ss02', 'ss05'" },
|
|
641
|
+
children: "Notes"
|
|
642
|
+
}
|
|
643
|
+
),
|
|
644
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-[70px] min-h-[44px] items-start rounded-[5px] bg-greys-background-hover px-[12px] py-[6px]", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
645
|
+
"p",
|
|
646
|
+
{
|
|
647
|
+
className: (0, import_ui_web5.cn)(
|
|
648
|
+
"flex-1 body-text overflow-hidden text-ellipsis whitespace-nowrap",
|
|
649
|
+
meta.notes ? "text-text-primary" : "text-text-secondary"
|
|
650
|
+
),
|
|
651
|
+
style: { fontFeatureSettings: "'ss02', 'ss05'" },
|
|
652
|
+
children: meta.notes || "Enter any additional notes about this marketing deal"
|
|
653
|
+
}
|
|
654
|
+
) })
|
|
655
|
+
] });
|
|
656
|
+
const documentButton = doc && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
657
|
+
import_ui_web5.Button,
|
|
658
|
+
{
|
|
659
|
+
variant: "ghost",
|
|
660
|
+
type: "button",
|
|
661
|
+
className: "flex h-full p-0 bg-transparent hover:bg-transparent items-center gap-[12px] hover:opacity-80 transition-opacity",
|
|
662
|
+
onClick: () => onOpenDocument(doc),
|
|
663
|
+
children: [
|
|
664
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_icons3.DownloadIcon, { className: "size-5 shrink-0 text-primary-color-nuk-ui-elem" }),
|
|
665
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
666
|
+
"span",
|
|
667
|
+
{
|
|
668
|
+
className: "text-[14px] font-normal leading-[15px] text-primary-color-nuk-text overflow-hidden text-ellipsis whitespace-nowrap max-w-[200px]",
|
|
669
|
+
style: { fontFeatureSettings: "'ss02', 'ss05'" },
|
|
670
|
+
children: doc.name ?? "Document"
|
|
671
|
+
}
|
|
672
|
+
)
|
|
673
|
+
]
|
|
674
|
+
}
|
|
675
|
+
);
|
|
676
|
+
const footerButtons = /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex items-center gap-[12px]", children: [
|
|
677
|
+
onEdit && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
678
|
+
import_ui_web5.Button,
|
|
679
|
+
{
|
|
680
|
+
variant: "outline",
|
|
681
|
+
onClick: () => onEdit(deal),
|
|
682
|
+
className: "h-[36px] min-w-[105px] w-[105px] rounded-[50px] border border-primary-color-nuk-text bg-transparent px-3 py-2 text-[15px] font-medium leading-normal text-primary-color-nuk-text hover:bg-transparent hover:text-primary-color-nuk-text",
|
|
683
|
+
children: "Edit Deal"
|
|
684
|
+
}
|
|
685
|
+
),
|
|
686
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
687
|
+
import_ui_web5.Button,
|
|
688
|
+
{
|
|
689
|
+
onClick: () => onOpenChange(false),
|
|
690
|
+
className: "h-[36px] min-w-[105px] w-[105px] rounded-[50px] bg-primary-color-nuk-text px-3 py-2 text-[15px] font-medium leading-normal text-white hover:bg-primary-color-nuk-text",
|
|
691
|
+
children: "Close"
|
|
692
|
+
}
|
|
693
|
+
)
|
|
694
|
+
] });
|
|
695
|
+
if (isDesktop) {
|
|
696
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_web5.Dialog, { open, onOpenChange, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_ui_web5.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: [
|
|
697
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_web5.DialogHeader, { className: "shrink-0 mt-4 pb-0 space-y-0 px-6", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_ui_web5.DialogTitle, { children: "Preview Details" }) }),
|
|
698
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex-1 overflow-y-auto px-6 pt-6 pb-4", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-[12px]", children: [
|
|
699
|
+
cards,
|
|
700
|
+
notes
|
|
701
|
+
] }) }),
|
|
702
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("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: [
|
|
703
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-[32px] items-center bg-card px-2", children: documentButton ?? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", {}) }),
|
|
704
|
+
footerButtons
|
|
705
|
+
] })
|
|
706
|
+
] }) });
|
|
707
|
+
}
|
|
708
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
709
|
+
import_ui_web5.MobileModalLayout,
|
|
710
|
+
{
|
|
711
|
+
onCancel: () => onOpenChange(false),
|
|
712
|
+
isOpen: open,
|
|
713
|
+
isSm: isDesktop,
|
|
714
|
+
title: "View Details",
|
|
715
|
+
cancelButtonName: "Cancel",
|
|
716
|
+
actionBottomContext: false,
|
|
717
|
+
childClassName: "max-h-[calc(100dvh-50px)]",
|
|
718
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "flex flex-col gap-4 px-4 pb-4", children: [
|
|
719
|
+
doc && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex h-[32px] justify-end items-center bg-card py-0 px-2", children: documentButton }),
|
|
720
|
+
cards,
|
|
721
|
+
notes
|
|
722
|
+
] })
|
|
723
|
+
}
|
|
724
|
+
);
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
// src/marketing/project-deal-card.tsx
|
|
728
|
+
var import_react3 = require("react");
|
|
729
|
+
var import_ui_web6 = require("@nukleus-sports/ui-web");
|
|
730
|
+
var import_icons4 = require("@nukleus-sports/icons");
|
|
731
|
+
var import_core3 = require("@nukleus-sports/core");
|
|
732
|
+
var import_jsx_runtime6 = (
|
|
733
|
+
// `min-w-0` lets `truncate` below actually engage instead of overflowing
|
|
734
|
+
// the card; `lg:flex-initial` + `max-lg:whitespace-normal` let a label
|
|
735
|
+
// like "Deliverables met - 0/4" wrap in the grid instead of being
|
|
736
|
+
// squeezed to an equal share. (clientapp's version — see module doc.)
|
|
737
|
+
require("react/jsx-runtime")
|
|
738
|
+
);
|
|
739
|
+
function TrackingItem({ label, done }) {
|
|
740
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex min-w-0 flex-1 gap-2 items-center lg:flex-initial", children: [
|
|
741
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
742
|
+
import_icons4.CheckRingRoundIcon,
|
|
743
|
+
{
|
|
744
|
+
width: 12,
|
|
745
|
+
height: 12,
|
|
746
|
+
className: (0, import_ui_web6.cn)(
|
|
747
|
+
"shrink-0 transition-opacity",
|
|
748
|
+
done ? "text-primary-color-nuk-ui-elem" : "opacity-0"
|
|
749
|
+
)
|
|
750
|
+
}
|
|
751
|
+
),
|
|
752
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
753
|
+
"span",
|
|
754
|
+
{
|
|
755
|
+
className: (0, import_ui_web6.cn)(
|
|
756
|
+
"label-xs-table truncate max-lg:whitespace-normal",
|
|
757
|
+
done ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
758
|
+
),
|
|
759
|
+
children: label
|
|
760
|
+
}
|
|
761
|
+
)
|
|
762
|
+
] });
|
|
763
|
+
}
|
|
764
|
+
var STATUS_STYLES = {
|
|
765
|
+
Active: "bg-semantic-color-status-priority-cold-fill text-semantic-color-status-priority-cold-copy",
|
|
766
|
+
Upcoming: "bg-semantic-color-status-priority-in-progress-warm-fill text-semantic-color-status-priority-in-progress-warm-copy",
|
|
767
|
+
Complete: "bg-semantic-color-status-priority-completed-fill text-semantic-color-status-priority-completed-copy"
|
|
768
|
+
};
|
|
769
|
+
function statusLabel(status) {
|
|
770
|
+
return status === "Complete" ? "Completed" : status;
|
|
771
|
+
}
|
|
772
|
+
function CollabAffordance({ href, onClick, className, children }) {
|
|
773
|
+
if (onClick) {
|
|
774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ui_web6.Button, { variant: "unstyled", size: "none", type: "button", onClick, className, children });
|
|
775
|
+
}
|
|
776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("a", { href, className, children });
|
|
777
|
+
}
|
|
778
|
+
function ProjectDealCard({
|
|
779
|
+
deal,
|
|
780
|
+
isCompleted,
|
|
781
|
+
collabMembership,
|
|
782
|
+
collabHref,
|
|
783
|
+
onCollabClick,
|
|
784
|
+
resolveImageUrl,
|
|
785
|
+
className
|
|
786
|
+
}) {
|
|
787
|
+
const [isExpanded, setIsExpanded] = (0, import_react3.useState)(false);
|
|
788
|
+
const showCollab = collabMembership === "member";
|
|
789
|
+
const status = (0, import_core3.getDealStatus)(deal, isCompleted);
|
|
790
|
+
const brandName = deal.brand_name ?? deal.company_name ?? deal.project_title;
|
|
791
|
+
const category = deal.deal_terms?.category;
|
|
792
|
+
const startDate = (0, import_core3.formatDealDate)(deal.deal_terms?.startDate);
|
|
793
|
+
const endDate = (0, import_core3.formatDealDate)(deal.deal_terms?.endDate);
|
|
794
|
+
const progressPct = deal.total_contracted > 0 ? Math.min(100, deal.total_collected / deal.total_contracted * 100) : 0;
|
|
795
|
+
const outstanding = Math.max(0, deal.total_contracted - deal.total_collected);
|
|
796
|
+
const isFullyPaid = deal.total_contracted > 0 && outstanding === 0;
|
|
797
|
+
const hasPaymentsCount = deal.payments_total !== void 0 && deal.payments_paid !== void 0;
|
|
798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_ui_web6.cn)("w-full", className), children: [
|
|
799
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col sm:hidden overflow-hidden bg-card border border-greys-grey-strokes-tables rounded-[10px]", children: [
|
|
800
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start justify-between gap-1 p-2", children: [
|
|
801
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 gap-1 items-start", children: [
|
|
802
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
803
|
+
import_ui_web6.Button,
|
|
804
|
+
{
|
|
805
|
+
variant: "unstyled",
|
|
806
|
+
size: "none",
|
|
807
|
+
type: "button",
|
|
808
|
+
onClick: () => setIsExpanded((v) => !v),
|
|
809
|
+
className: "flex size-8 shrink-0 items-center justify-center p-1.5 rounded-[5px]",
|
|
810
|
+
"aria-label": isExpanded ? "Collapse deal details" : "Expand deal details",
|
|
811
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
812
|
+
import_icons4.ArrowDownFormIcon,
|
|
813
|
+
{
|
|
814
|
+
width: 12.004,
|
|
815
|
+
height: 5.999,
|
|
816
|
+
className: (0, import_ui_web6.cn)(
|
|
817
|
+
"text-greys-icons transition-transform duration-200",
|
|
818
|
+
isExpanded && "rotate-180"
|
|
819
|
+
)
|
|
820
|
+
}
|
|
821
|
+
)
|
|
822
|
+
}
|
|
823
|
+
),
|
|
824
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center items-start", children: [
|
|
825
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
|
|
826
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "label-xs-text text-text-secondary", children: [
|
|
827
|
+
startDate,
|
|
828
|
+
" - ",
|
|
829
|
+
endDate
|
|
830
|
+
] })
|
|
831
|
+
] })
|
|
832
|
+
] }),
|
|
833
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col shrink-0 justify-center items-end gap-1", children: [
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary whitespace-nowrap", children: (0, import_core3.fmtUSD)(deal.total_contracted) }),
|
|
835
|
+
deal.total_equity_shares > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
836
|
+
"+ ",
|
|
837
|
+
deal.total_equity_shares.toLocaleString(),
|
|
838
|
+
" shares"
|
|
839
|
+
] }),
|
|
840
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
841
|
+
"div",
|
|
842
|
+
{
|
|
843
|
+
className: (0, import_ui_web6.cn)(
|
|
844
|
+
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center label-xs-medium whitespace-nowrap",
|
|
845
|
+
STATUS_STYLES[status]
|
|
846
|
+
),
|
|
847
|
+
children: statusLabel(status)
|
|
848
|
+
}
|
|
849
|
+
)
|
|
850
|
+
] })
|
|
851
|
+
] }),
|
|
852
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
854
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-start gap-1 p-2 bg-greys-table-hover", children: [
|
|
855
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
856
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Collected" }),
|
|
857
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "body-text-semibold text-primary-color-nuk-text truncate", children: (0, import_core3.fmtUSD)(deal.total_collected) })
|
|
858
|
+
] }),
|
|
859
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
860
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Outstanding" }),
|
|
861
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "body-text-semibold text-semantic-color-status-priority-priority-2 truncate", children: (0, import_core3.fmtUSD)(outstanding) })
|
|
862
|
+
] }),
|
|
863
|
+
hasPaymentsCount && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2", children: [
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary", children: "Payments" }),
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "body-text-semibold text-text-primary truncate", children: [
|
|
866
|
+
deal.payments_paid,
|
|
867
|
+
" of ",
|
|
868
|
+
deal.payments_total,
|
|
869
|
+
" paid"
|
|
870
|
+
] })
|
|
871
|
+
] })
|
|
872
|
+
] }),
|
|
873
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex items-center gap-2 min-w-0 p-2 bg-greys-table-hover", children: [
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "w-[58px] shrink-0 text-[11px] leading-none text-text-secondary font-normal", children: "Payment" }),
|
|
876
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative flex-1 min-w-0 h-1 bg-greys-nav-text rounded-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
877
|
+
"div",
|
|
878
|
+
{
|
|
879
|
+
className: "absolute inset-y-0 left-0 bg-primary-color-nuk-ui-elem rounded-full",
|
|
880
|
+
style: { width: `${progressPct}%` }
|
|
881
|
+
}
|
|
882
|
+
) }),
|
|
883
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
884
|
+
"span",
|
|
885
|
+
{
|
|
886
|
+
className: (0, import_ui_web6.cn)(
|
|
887
|
+
"w-9 shrink-0 text-right text-[11px] leading-none font-normal",
|
|
888
|
+
isFullyPaid ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
889
|
+
),
|
|
890
|
+
children: [
|
|
891
|
+
Math.round(progressPct),
|
|
892
|
+
"%"
|
|
893
|
+
]
|
|
894
|
+
}
|
|
895
|
+
)
|
|
896
|
+
] }),
|
|
897
|
+
showCollab && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "w-full h-px bg-greys-grey-strokes-tables" }),
|
|
898
|
+
showCollab && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "flex gap-1 p-2 bg-greys-table-hover rounded-[0_0_10px_10px] justify-end", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
899
|
+
CollabAffordance,
|
|
900
|
+
{
|
|
901
|
+
href: collabHref,
|
|
902
|
+
onClick: onCollabClick,
|
|
903
|
+
className: "flex gap-2 items-center text-primary-color-nuk-text text-[11px] font-normal shrink-0",
|
|
904
|
+
children: [
|
|
905
|
+
"Collab",
|
|
906
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons4.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
907
|
+
]
|
|
908
|
+
}
|
|
909
|
+
) })
|
|
910
|
+
] })
|
|
911
|
+
] }),
|
|
912
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "hidden sm:flex flex-col gap-3 p-3 bg-card border-b border-greys-grey-strokes-tables font-ss02", children: [
|
|
913
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-start w-full", children: [
|
|
914
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
915
|
+
EntityAvatar,
|
|
916
|
+
{
|
|
917
|
+
entityType: "company",
|
|
918
|
+
imageUrl: deal.company_avatar_url ?? null,
|
|
919
|
+
name: deal.company_name ?? brandName ?? "",
|
|
920
|
+
resolveImageUrl,
|
|
921
|
+
size: "sm",
|
|
922
|
+
className: "shrink-0 rounded-[34px]"
|
|
923
|
+
}
|
|
924
|
+
),
|
|
925
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-1 min-w-0 flex-col gap-2 justify-center", children: [
|
|
926
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-2 items-center", children: [
|
|
927
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "header-xl-medium-card text-text-primary", children: brandName }),
|
|
928
|
+
showCollab && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
929
|
+
CollabAffordance,
|
|
930
|
+
{
|
|
931
|
+
href: collabHref,
|
|
932
|
+
onClick: onCollabClick,
|
|
933
|
+
className: "flex gap-1.5 items-center text-primary-color-nuk-text label-xs-text shrink-0",
|
|
934
|
+
children: [
|
|
935
|
+
"Collab Hub",
|
|
936
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons4.XsViewInvoiceIcon, { className: "size-[18px] p-[1px] flex justify-center items-center" })
|
|
937
|
+
]
|
|
938
|
+
}
|
|
939
|
+
)
|
|
940
|
+
] }),
|
|
941
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "label-xs-text text-text-secondary break-words sm:whitespace-nowrap", children: [category, `${startDate} - ${endDate}`].filter(Boolean).join(" \u2022 ") }),
|
|
942
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-center min-w-0", children: [
|
|
943
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary shrink-0", children: "Owner" }),
|
|
944
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
945
|
+
EntityAvatar,
|
|
946
|
+
{
|
|
947
|
+
entityType: "initials",
|
|
948
|
+
imageUrl: deal.owner_avatar_url,
|
|
949
|
+
name: deal.owner_name ?? "",
|
|
950
|
+
resolveImageUrl,
|
|
951
|
+
size: "sm",
|
|
952
|
+
className: "shrink-0"
|
|
953
|
+
}
|
|
954
|
+
),
|
|
955
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-text text-text-secondary truncate", children: deal.owner_name ?? "\u2014" })
|
|
956
|
+
] })
|
|
957
|
+
] }),
|
|
958
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-1 items-end justify-center shrink-0", children: [
|
|
959
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "team-stats-card text-text-primary whitespace-nowrap", children: (0, import_core3.fmtUSD)(deal.total_contracted) }),
|
|
960
|
+
deal.total_equity_shares > 0 && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "label-xs-text text-text-secondary whitespace-nowrap", children: [
|
|
961
|
+
"+ ",
|
|
962
|
+
deal.total_equity_shares.toLocaleString(),
|
|
963
|
+
" shares"
|
|
964
|
+
] }),
|
|
965
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
966
|
+
"div",
|
|
967
|
+
{
|
|
968
|
+
className: (0, import_ui_web6.cn)(
|
|
969
|
+
"h-[27px] px-3 py-1.5 rounded-[50px] flex items-center justify-center whitespace-nowrap",
|
|
970
|
+
STATUS_STYLES[status]
|
|
971
|
+
),
|
|
972
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "label-xs-medium", children: statusLabel(status) })
|
|
973
|
+
}
|
|
974
|
+
)
|
|
975
|
+
] })
|
|
976
|
+
] }),
|
|
977
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("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: [
|
|
978
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
979
|
+
TrackingItem,
|
|
980
|
+
{
|
|
981
|
+
label: `Deliverables met - ${deal.deliverables_met}/${deal.deliverables_total}`,
|
|
982
|
+
done: deal.deliverables_total > 0 && deal.deliverables_met >= deal.deliverables_total
|
|
983
|
+
}
|
|
984
|
+
),
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Client paid", done: deal.client_paid && isFullyPaid }),
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Agency paid", done: deal.agency_paid && isFullyPaid }),
|
|
987
|
+
deal.has_third_party && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TrackingItem, { label: "Third Party paid", done: deal.third_party_paid && isFullyPaid })
|
|
988
|
+
] }),
|
|
989
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "relative w-full h-2 bg-greys-nav-text rounded-[10px] overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
991
|
+
"div",
|
|
992
|
+
{
|
|
993
|
+
className: "absolute left-0 top-0 h-2 bg-primary-color-nuk-ui-elem rounded-[10px]",
|
|
994
|
+
style: { width: `${progressPct}%` }
|
|
995
|
+
}
|
|
996
|
+
) }),
|
|
997
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex gap-3 items-start text-[13px] font-medium w-full", children: [
|
|
998
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
999
|
+
"span",
|
|
1000
|
+
{
|
|
1001
|
+
className: (0, import_ui_web6.cn)(
|
|
1002
|
+
"min-w-0 flex-1 label-xs-table",
|
|
1003
|
+
deal.total_collected > 0 ? "text-primary-color-nuk-text" : "text-text-secondary"
|
|
1004
|
+
),
|
|
1005
|
+
children: `${(0, import_core3.fmtUSD)(deal.total_collected)}${deal.total_collected > 0 ? " collected" : ""}`
|
|
1006
|
+
}
|
|
1007
|
+
),
|
|
1008
|
+
hasPaymentsCount && /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "flex-1 label-xs-table text-text-secondary", children: [
|
|
1009
|
+
deal.payments_paid,
|
|
1010
|
+
" of ",
|
|
1011
|
+
deal.payments_total,
|
|
1012
|
+
" payments",
|
|
1013
|
+
" ",
|
|
1014
|
+
status === "Active" ? "collected" : "paid"
|
|
1015
|
+
] }),
|
|
1016
|
+
isFullyPaid ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "shrink-0 text-primary-color-nuk-text label-xs-table whitespace-nowrap", children: "Fully Paid" }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: "shrink-0 text-semantic-color-status-priority-priority-2 label-xs-table whitespace-nowrap", children: [
|
|
1017
|
+
(0, import_core3.fmtUSD)(outstanding),
|
|
1018
|
+
" outstanding"
|
|
1019
|
+
] })
|
|
1020
|
+
] })
|
|
1021
|
+
] })
|
|
1022
|
+
] })
|
|
1023
|
+
] });
|
|
1024
|
+
}
|
|
1025
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
1026
|
+
0 && (module.exports = {
|
|
1027
|
+
DealEmptyState,
|
|
1028
|
+
ENTITY_AVATAR_SIZE_PX,
|
|
1029
|
+
EntityAvatar,
|
|
1030
|
+
ManualDealCard,
|
|
1031
|
+
ManualDealPreviewDialog,
|
|
1032
|
+
ProjectDealCard,
|
|
1033
|
+
RowActionsDropdown,
|
|
1034
|
+
resolveDealDocument
|
|
1035
|
+
});
|
|
1036
|
+
//# sourceMappingURL=marketing.cjs.map
|