pxengine 0.1.60 → 0.1.62
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/config/tailwind-preset.js +4 -0
- package/dist/index.cjs +124 -123
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +124 -123
- package/dist/index.mjs.map +1 -1
- package/dist/registry.json +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -34039,19 +34039,19 @@ var EditableField = React85.memo(
|
|
|
34039
34039
|
"div",
|
|
34040
34040
|
{
|
|
34041
34041
|
className: cn(
|
|
34042
|
-
"relative z-10 group flex flex-col gap-
|
|
34042
|
+
"relative z-10 group flex flex-col gap-1.5 p-2.5 bg-black border border-cardBorder rounded-lg mb-4",
|
|
34043
34043
|
className
|
|
34044
34044
|
),
|
|
34045
34045
|
children: [
|
|
34046
|
-
/* @__PURE__ */ jsx94("div", { className: "flex justify-between items-start mb-
|
|
34046
|
+
/* @__PURE__ */ jsx94("div", { className: "flex justify-between items-start mb-1.5", children: /* @__PURE__ */ jsxs54("div", { className: "w-full flex justify-between items-center flex-wrap gap-1.5", children: [
|
|
34047
34047
|
/* @__PURE__ */ jsx94(
|
|
34048
34048
|
"h4",
|
|
34049
34049
|
{
|
|
34050
|
-
className: "px-
|
|
34050
|
+
className: "px-1.5 py-px tracking-widest border border-cardBorder text-gold text-[9px] font-medium uppercase rounded-[3px]",
|
|
34051
34051
|
children: label
|
|
34052
34052
|
}
|
|
34053
34053
|
),
|
|
34054
|
-
isEditingProp ? /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-
|
|
34054
|
+
isEditingProp ? /* @__PURE__ */ jsxs54("div", { className: "flex items-center gap-2", children: [
|
|
34055
34055
|
/* @__PURE__ */ jsx94(
|
|
34056
34056
|
"button",
|
|
34057
34057
|
{
|
|
@@ -34062,7 +34062,7 @@ var EditableField = React85.memo(
|
|
|
34062
34062
|
className: "text-gray-500 hover:text-gray-700 transition-colors",
|
|
34063
34063
|
disabled: isSaving,
|
|
34064
34064
|
title: "Cancel",
|
|
34065
|
-
children: /* @__PURE__ */ jsx94(X, { className: "h-
|
|
34065
|
+
children: /* @__PURE__ */ jsx94(X, { className: "h-4 w-4" })
|
|
34066
34066
|
}
|
|
34067
34067
|
),
|
|
34068
34068
|
/* @__PURE__ */ jsx94(
|
|
@@ -34075,37 +34075,31 @@ var EditableField = React85.memo(
|
|
|
34075
34075
|
className: "text-gray600 hover:text-gray600 transition-colors",
|
|
34076
34076
|
disabled: isSaving,
|
|
34077
34077
|
title: "Save",
|
|
34078
|
-
children: isSaving ? /* @__PURE__ */ jsx94(LoaderCircle, { className: "h-
|
|
34078
|
+
children: isSaving ? /* @__PURE__ */ jsx94(LoaderCircle, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx94(Save, { className: "h-4 w-4" })
|
|
34079
34079
|
}
|
|
34080
34080
|
)
|
|
34081
|
-
] }) : /* @__PURE__ */
|
|
34082
|
-
"
|
|
34083
|
-
|
|
34084
|
-
|
|
34085
|
-
|
|
34086
|
-
|
|
34087
|
-
|
|
34088
|
-
|
|
34089
|
-
|
|
34090
|
-
|
|
34091
|
-
|
|
34092
|
-
|
|
34093
|
-
|
|
34094
|
-
|
|
34095
|
-
},
|
|
34096
|
-
children: /* @__PURE__ */ jsx94(SquarePen, { className: "h-5 w-5" })
|
|
34097
|
-
}
|
|
34098
|
-
)
|
|
34099
|
-
] })
|
|
34081
|
+
] }) : isLatestMessage ? /* @__PURE__ */ jsx94(
|
|
34082
|
+
"button",
|
|
34083
|
+
{
|
|
34084
|
+
className: "p-1 rounded-md text-muted-foreground hover:text-foreground hover:bg-gray300 transition-colors",
|
|
34085
|
+
onClick: (e) => {
|
|
34086
|
+
if (shouldStopPropagation !== false) {
|
|
34087
|
+
e.stopPropagation();
|
|
34088
|
+
}
|
|
34089
|
+
onEdit?.();
|
|
34090
|
+
},
|
|
34091
|
+
title: "Edit",
|
|
34092
|
+
children: /* @__PURE__ */ jsx94(SquarePen, { className: "h-3.5 w-3.5" })
|
|
34093
|
+
}
|
|
34094
|
+
) : null
|
|
34100
34095
|
] }) }),
|
|
34101
34096
|
isEditingProp ? /* @__PURE__ */ jsx94("div", { className: "flex flex-col gap-3", children: renderInput() }) : /* @__PURE__ */ jsx94(
|
|
34102
34097
|
"div",
|
|
34103
34098
|
{
|
|
34104
34099
|
className: cn(
|
|
34105
|
-
"relative flex items-start justify-between rounded-
|
|
34106
|
-
"text-
|
|
34100
|
+
"relative flex items-start justify-between rounded-md px-2 py-1.5",
|
|
34101
|
+
"text-sm text-cardText font-medium leading-relaxed"
|
|
34107
34102
|
),
|
|
34108
|
-
style: { fontFamily: "Noto Sans, sans-serif" },
|
|
34109
34103
|
children: /* @__PURE__ */ jsx94("div", { className: "flex-1", children: formattedValue() })
|
|
34110
34104
|
}
|
|
34111
34105
|
)
|
|
@@ -34316,7 +34310,7 @@ var FormCard = React87.memo(
|
|
|
34316
34310
|
"div",
|
|
34317
34311
|
{
|
|
34318
34312
|
className: cn(
|
|
34319
|
-
"relative w-full rounded-
|
|
34313
|
+
"relative w-full rounded-lg bg-cardSurface border border-gray400 shadow-sm overflow-hidden mb-4",
|
|
34320
34314
|
className
|
|
34321
34315
|
),
|
|
34322
34316
|
children: [
|
|
@@ -34329,18 +34323,18 @@ var FormCard = React87.memo(
|
|
|
34329
34323
|
children: copied ? /* @__PURE__ */ jsx96(Check, { className: "h-4 w-4 text-green-500" }) : /* @__PURE__ */ jsx96(Copy, { className: "h-4 w-4" })
|
|
34330
34324
|
}
|
|
34331
34325
|
),
|
|
34332
|
-
/* @__PURE__ */ jsxs56("div", { className: "p-
|
|
34326
|
+
/* @__PURE__ */ jsxs56("div", { className: "p-4 relative", children: [
|
|
34333
34327
|
!hideTitle && title && /* @__PURE__ */ jsx96(
|
|
34334
34328
|
"h3",
|
|
34335
34329
|
{
|
|
34336
|
-
className: "text-
|
|
34330
|
+
className: "text-cardText mb-6 text-sm font-semibold",
|
|
34337
34331
|
children: title
|
|
34338
34332
|
}
|
|
34339
34333
|
),
|
|
34340
34334
|
showTimeline && /* @__PURE__ */ jsx96(
|
|
34341
34335
|
"div",
|
|
34342
34336
|
{
|
|
34343
|
-
className: "absolute z-0 left-[
|
|
34337
|
+
className: "absolute z-0 left-[48px] top-[70px] bottom-[40px] w-[2px]",
|
|
34344
34338
|
style: {
|
|
34345
34339
|
background: `
|
|
34346
34340
|
radial-gradient(circle closest-side, #3C3D3E 98%, transparent) 50%/2px 5px repeat-y,
|
|
@@ -34373,7 +34367,7 @@ var FormCard = React87.memo(
|
|
|
34373
34367
|
field.key
|
|
34374
34368
|
))
|
|
34375
34369
|
] }),
|
|
34376
|
-
isLatestMessage && onProceed && proceedLabel ? /* @__PURE__ */ jsx96("div", { className: "my-
|
|
34370
|
+
isLatestMessage && onProceed && proceedLabel ? /* @__PURE__ */ jsx96("div", { className: "my-4 flex justify-center", children: /* @__PURE__ */ jsx96(
|
|
34377
34371
|
"button",
|
|
34378
34372
|
{
|
|
34379
34373
|
onClick: () => {
|
|
@@ -34382,14 +34376,10 @@ var FormCard = React87.memo(
|
|
|
34382
34376
|
}
|
|
34383
34377
|
},
|
|
34384
34378
|
className: cn(
|
|
34385
|
-
"px-
|
|
34386
|
-
"bg-
|
|
34387
|
-
"hover:bg-purpleText1 dark:hover:bg-purple100 dark:hover:text-white"
|
|
34379
|
+
"px-4 py-1.5 border rounded-lg transition-colors text-xs font-medium",
|
|
34380
|
+
"bg-cardSurface hover:bg-cardSurface/80 text-gold border-cardBorder"
|
|
34388
34381
|
),
|
|
34389
|
-
children:
|
|
34390
|
-
proceedLabel,
|
|
34391
|
-
/* @__PURE__ */ jsx96(ChevronRight, { className: "w-4 h-4" })
|
|
34392
|
-
]
|
|
34382
|
+
children: proceedLabel
|
|
34393
34383
|
}
|
|
34394
34384
|
) }) : !isLatestMessage && footer ? /* @__PURE__ */ jsx96("div", { className: "flex justify-end items-center pb-4 pr-4 gap-1 text-green-600 text-sm font-medium", children: footer }) : null
|
|
34395
34385
|
]
|
|
@@ -36828,7 +36818,7 @@ var CountrySelectEdit = ({
|
|
|
36828
36818
|
inputValue.length > 0 && /* @__PURE__ */ jsx122("div", { className: "flex flex-wrap gap-1.5", children: inputValue.map((countryCode) => /* @__PURE__ */ jsxs82(
|
|
36829
36819
|
Badge2,
|
|
36830
36820
|
{
|
|
36831
|
-
className: "flex items-center gap-1 px-2 py-
|
|
36821
|
+
className: "flex items-center gap-1 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
|
|
36832
36822
|
children: [
|
|
36833
36823
|
countryCode,
|
|
36834
36824
|
/* @__PURE__ */ jsxs82(
|
|
@@ -36864,7 +36854,7 @@ var CountrySelectDisplay = ({ value }) => {
|
|
|
36864
36854
|
return /* @__PURE__ */ jsx122(
|
|
36865
36855
|
"div",
|
|
36866
36856
|
{
|
|
36867
|
-
className: "flex items-center gap-
|
|
36857
|
+
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
36868
36858
|
children: country ? country.name : item
|
|
36869
36859
|
},
|
|
36870
36860
|
item
|
|
@@ -36913,7 +36903,7 @@ var KeywordBundlesEdit = ({
|
|
|
36913
36903
|
/* @__PURE__ */ jsx122("div", { className: "flex flex-wrap gap-1.5", children: Array.isArray(bundle.keywords) && bundle.keywords.map((keyword, kIndex) => /* @__PURE__ */ jsxs82(
|
|
36914
36904
|
"div",
|
|
36915
36905
|
{
|
|
36916
|
-
className: "flex items-center gap-
|
|
36906
|
+
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium hover:bg-red-900/40 hover:border-red-500 transition-all cursor-pointer group",
|
|
36917
36907
|
onClick: () => {
|
|
36918
36908
|
const updatedBundles = [...bundles];
|
|
36919
36909
|
const currentKeywords = parseKeywords(updatedBundles[bundleIndex].keywords);
|
|
@@ -37012,7 +37002,7 @@ var KeywordBundlesDisplay = ({ value }) => {
|
|
|
37012
37002
|
/* @__PURE__ */ jsx122("div", { className: "flex flex-wrap gap-2 pt-1", children: deduped.map((keyword) => /* @__PURE__ */ jsx122(
|
|
37013
37003
|
"div",
|
|
37014
37004
|
{
|
|
37015
|
-
className: "flex items-center gap-
|
|
37005
|
+
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-white text-xs font-medium",
|
|
37016
37006
|
children: keyword
|
|
37017
37007
|
},
|
|
37018
37008
|
keyword
|
|
@@ -37083,7 +37073,7 @@ var PlatformSelectDisplay = ({ value }) => {
|
|
|
37083
37073
|
return /* @__PURE__ */ jsx122("div", { className: "flex flex-wrap gap-2 pt-1", children: displayValues.map((platform) => /* @__PURE__ */ jsx122(
|
|
37084
37074
|
"div",
|
|
37085
37075
|
{
|
|
37086
|
-
className: "flex items-center gap-
|
|
37076
|
+
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
37087
37077
|
children: platform
|
|
37088
37078
|
},
|
|
37089
37079
|
platform
|
|
@@ -37108,7 +37098,7 @@ var StringArrayDisplay = ({ value }) => {
|
|
|
37108
37098
|
return /* @__PURE__ */ jsx123("div", { className: "flex flex-wrap gap-2 pt-1", children: value.map((item) => /* @__PURE__ */ jsx123(
|
|
37109
37099
|
"div",
|
|
37110
37100
|
{
|
|
37111
|
-
className: "flex items-center gap-
|
|
37101
|
+
className: "flex items-center gap-1.5 px-2 py-0.5 bg-grayPill border border-gray400 rounded-md text-foreground text-xs font-medium",
|
|
37112
37102
|
children: item
|
|
37113
37103
|
},
|
|
37114
37104
|
item
|
|
@@ -37267,9 +37257,9 @@ var CampaignSeedCard = React94.memo(
|
|
|
37267
37257
|
onProceed: handleProceed,
|
|
37268
37258
|
showTimeline: true,
|
|
37269
37259
|
isLatestMessage: effectiveIsLatest,
|
|
37270
|
-
className
|
|
37271
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs83("div", { className: "flex justify-end items-center gap-1
|
|
37272
|
-
/* @__PURE__ */ jsx123(CircleCheck, { className: "h-3
|
|
37260
|
+
className,
|
|
37261
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs83("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
|
|
37262
|
+
/* @__PURE__ */ jsx123(CircleCheck, { className: "h-3 w-3" }),
|
|
37273
37263
|
/* @__PURE__ */ jsx123("span", { children: selectionStatus === "agent" ? "Suggested by Agent" : "Selected by you" })
|
|
37274
37264
|
] }) : formCardProps.footer
|
|
37275
37265
|
}
|
|
@@ -37434,8 +37424,8 @@ var SearchSpecCard = React95.memo(
|
|
|
37434
37424
|
onProceed: handleProceed,
|
|
37435
37425
|
isLatestMessage: effectiveIsLatest,
|
|
37436
37426
|
className,
|
|
37437
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs84("div", { className: "flex justify-end items-center gap-1
|
|
37438
|
-
/* @__PURE__ */ jsx124(CircleCheck, { className: "h-
|
|
37427
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs84("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-1", children: [
|
|
37428
|
+
/* @__PURE__ */ jsx124(CircleCheck, { className: "h-3 w-3" }),
|
|
37439
37429
|
/* @__PURE__ */ jsx124("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by User" })
|
|
37440
37430
|
] }) : formCardProps.footer
|
|
37441
37431
|
}
|
|
@@ -37448,6 +37438,31 @@ SearchSpecCard.displayName = "SearchSpecCard";
|
|
|
37448
37438
|
import React96 from "react";
|
|
37449
37439
|
|
|
37450
37440
|
// src/molecules/creator-discovery/MCQCard/defaultFetchers.ts
|
|
37441
|
+
function getBackendOrigin() {
|
|
37442
|
+
if (typeof window === "undefined") return null;
|
|
37443
|
+
return window.__NEXT_DATA__?.runtimeConfig?.NEXT_PUBLIC_AGENT_BACKEND ?? (typeof process !== "undefined" ? process.env?.NEXT_PUBLIC_AGENT_BACKEND : void 0) ?? null;
|
|
37444
|
+
}
|
|
37445
|
+
function getBaseUrl() {
|
|
37446
|
+
const backend = getBackendOrigin();
|
|
37447
|
+
if (backend) return `${backend}/api/custom-agents`;
|
|
37448
|
+
return "/api/agents-proxy/custom-agents";
|
|
37449
|
+
}
|
|
37450
|
+
function getAuthToken() {
|
|
37451
|
+
if (typeof document === "undefined") return null;
|
|
37452
|
+
for (const name of ["adminTokenBuilder", "adminToken", "token"]) {
|
|
37453
|
+
const match2 = document.cookie.match(new RegExp(`(?:^|;\\s*)${name}=([^;]*)`));
|
|
37454
|
+
if (match2?.[1]) return match2[1];
|
|
37455
|
+
}
|
|
37456
|
+
return null;
|
|
37457
|
+
}
|
|
37458
|
+
function buildHeaders() {
|
|
37459
|
+
const headers = { "Content-Type": "application/json" };
|
|
37460
|
+
if (getBackendOrigin()) {
|
|
37461
|
+
const token = getAuthToken();
|
|
37462
|
+
if (token) headers["Authorization"] = `Bearer ${token}`;
|
|
37463
|
+
}
|
|
37464
|
+
return headers;
|
|
37465
|
+
}
|
|
37451
37466
|
var STORAGE_KEY = (sessionId) => `mcq_selections_${sessionId}`;
|
|
37452
37467
|
function getLocalSelections(sessionId) {
|
|
37453
37468
|
try {
|
|
@@ -37470,10 +37485,10 @@ async function defaultFetchSelections(sessionId) {
|
|
|
37470
37485
|
if (Object.keys(local).length > 0) return local;
|
|
37471
37486
|
try {
|
|
37472
37487
|
const res = await fetch(
|
|
37473
|
-
|
|
37488
|
+
`${getBaseUrl()}/sessions/${sessionId}/mcq-selections/get`,
|
|
37474
37489
|
{
|
|
37475
37490
|
method: "POST",
|
|
37476
|
-
headers:
|
|
37491
|
+
headers: buildHeaders(),
|
|
37477
37492
|
body: "{}"
|
|
37478
37493
|
}
|
|
37479
37494
|
);
|
|
@@ -37495,10 +37510,10 @@ async function defaultPersistSelection(sessionId, questionKey, value) {
|
|
|
37495
37510
|
setLocalSelection(sessionId, questionKey, value);
|
|
37496
37511
|
try {
|
|
37497
37512
|
await fetch(
|
|
37498
|
-
|
|
37513
|
+
`${getBaseUrl()}/sessions/${sessionId}/mcq-selections`,
|
|
37499
37514
|
{
|
|
37500
37515
|
method: "PATCH",
|
|
37501
|
-
headers:
|
|
37516
|
+
headers: buildHeaders(),
|
|
37502
37517
|
body: JSON.stringify({ question_key: questionKey, value })
|
|
37503
37518
|
}
|
|
37504
37519
|
);
|
|
@@ -37593,75 +37608,61 @@ var MCQCard = React96.memo(
|
|
|
37593
37608
|
"div",
|
|
37594
37609
|
{
|
|
37595
37610
|
className: cn(
|
|
37596
|
-
"p-
|
|
37611
|
+
"p-4 rounded-lg border border-gray400 bg-cardSurface w-full",
|
|
37597
37612
|
className
|
|
37598
37613
|
),
|
|
37599
37614
|
children: [
|
|
37600
|
-
/* @__PURE__ */ jsx125("div", { className: "mb-4", children: /* @__PURE__ */ jsx125("
|
|
37601
|
-
/* @__PURE__ */ jsx125("div", { className: "
|
|
37615
|
+
/* @__PURE__ */ jsx125("div", { className: "mb-4", children: /* @__PURE__ */ jsx125("p", { className: "text-sm text-cardText", children: question }) }),
|
|
37616
|
+
/* @__PURE__ */ jsx125("div", { className: "space-y-2.5 mb-4", children: optionsEntries.map(([key, label]) => {
|
|
37602
37617
|
const isSelected = selectedOption === key;
|
|
37603
37618
|
const isRecommended = key === recommended;
|
|
37604
|
-
return /* @__PURE__ */
|
|
37619
|
+
return /* @__PURE__ */ jsx125(
|
|
37605
37620
|
"div",
|
|
37606
37621
|
{
|
|
37607
37622
|
onClick: (e) => handleOptionClick(key, e),
|
|
37608
37623
|
className: cn(
|
|
37609
|
-
"cursor-pointer rounded-
|
|
37610
|
-
"border
|
|
37624
|
+
"cursor-pointer rounded-lg p-3 transition-colors",
|
|
37625
|
+
"border bg-black",
|
|
37626
|
+
isSelected ? "border-cardBorder" : "border-gray400",
|
|
37611
37627
|
!selectedOption && !isOptionsDisabled && "hover:border-gray500",
|
|
37612
37628
|
(isLoading || isOptionsDisabled) && "opacity-50 cursor-not-allowed"
|
|
37613
37629
|
),
|
|
37614
|
-
children: [
|
|
37615
|
-
/* @__PURE__ */ jsx125("div", { className: "
|
|
37630
|
+
children: /* @__PURE__ */ jsxs85("div", { className: "flex items-start gap-3", children: [
|
|
37631
|
+
/* @__PURE__ */ jsx125("div", { className: "mt-0.5 flex-shrink-0", children: /* @__PURE__ */ jsx125(
|
|
37616
37632
|
"div",
|
|
37617
37633
|
{
|
|
37618
37634
|
className: cn(
|
|
37619
|
-
"w-
|
|
37620
|
-
isSelected ? "border-
|
|
37621
|
-
"border-
|
|
37622
|
-
!selectedOption && !isOptionsDisabled && "hover:border-
|
|
37635
|
+
"w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors",
|
|
37636
|
+
isSelected ? "border-gold" : cn(
|
|
37637
|
+
"border-gray500",
|
|
37638
|
+
!selectedOption && !isOptionsDisabled && "hover:border-gold"
|
|
37623
37639
|
)
|
|
37624
37640
|
),
|
|
37625
|
-
children: isSelected && /* @__PURE__ */ jsx125("div", { className: "w-2
|
|
37641
|
+
children: isSelected && /* @__PURE__ */ jsx125("div", { className: "w-2 h-2 rounded-full bg-gold" })
|
|
37626
37642
|
}
|
|
37627
37643
|
) }),
|
|
37628
|
-
/* @__PURE__ */ jsxs85("div", { className: "
|
|
37629
|
-
|
|
37630
|
-
|
|
37631
|
-
isSelected && /* @__PURE__ */ jsx125("div", { className: "flex text-xs font-semibold", children: /* @__PURE__ */ jsx125(
|
|
37632
|
-
"p",
|
|
37633
|
-
{
|
|
37634
|
-
className: cn(
|
|
37635
|
-
"px-2 py-1 rounded-[20px]",
|
|
37636
|
-
selectedOption === recommended ? "bg-purpleLight text-purpleText2 dark:bg-primary/20 dark:text-primary" : "bg-paperBackground text-primaryDark2 dark:bg-primary/20 dark:text-primary"
|
|
37637
|
-
),
|
|
37638
|
-
children: "Selected by you"
|
|
37639
|
-
}
|
|
37640
|
-
) })
|
|
37641
|
-
] }),
|
|
37642
|
-
/* @__PURE__ */ jsx125("div", { className: "text-base font-medium text-txtColor", children: label })
|
|
37644
|
+
/* @__PURE__ */ jsxs85("div", { className: "flex-1 min-w-0", children: [
|
|
37645
|
+
isRecommended && /* @__PURE__ */ jsx125("p", { className: "text-xs font-semibold text-gold mb-1", children: "Recommended" }),
|
|
37646
|
+
/* @__PURE__ */ jsx125("p", { className: "text-sm text-cardText", children: label })
|
|
37643
37647
|
] })
|
|
37644
|
-
]
|
|
37648
|
+
] })
|
|
37645
37649
|
},
|
|
37646
37650
|
key
|
|
37647
37651
|
);
|
|
37648
|
-
}) })
|
|
37649
|
-
/* @__PURE__ */
|
|
37650
|
-
|
|
37651
|
-
|
|
37652
|
-
|
|
37653
|
-
|
|
37654
|
-
|
|
37655
|
-
|
|
37656
|
-
|
|
37657
|
-
|
|
37658
|
-
|
|
37659
|
-
|
|
37660
|
-
|
|
37661
|
-
|
|
37662
|
-
),
|
|
37663
|
-
/* @__PURE__ */ jsx125("div", { className: "flex-1" })
|
|
37664
|
-
] })
|
|
37652
|
+
}) }),
|
|
37653
|
+
/* @__PURE__ */ jsx125("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx125(
|
|
37654
|
+
"button",
|
|
37655
|
+
{
|
|
37656
|
+
onClick: handleProceed,
|
|
37657
|
+
disabled: isContinueDisabled || isLoading || !selectedOption && !recommended,
|
|
37658
|
+
className: cn(
|
|
37659
|
+
"px-4 py-1.5 border rounded-lg text-xs font-medium transition-colors",
|
|
37660
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
37661
|
+
"bg-cardSurface hover:bg-cardSurface/80 text-gold border-cardBorder"
|
|
37662
|
+
),
|
|
37663
|
+
children: isLoading ? "Sending..." : "Continue"
|
|
37664
|
+
}
|
|
37665
|
+
) })
|
|
37665
37666
|
]
|
|
37666
37667
|
}
|
|
37667
37668
|
);
|
|
@@ -38322,9 +38323,9 @@ var CampaignConceptCard = React98.memo(
|
|
|
38322
38323
|
idx + 1,
|
|
38323
38324
|
"."
|
|
38324
38325
|
] }),
|
|
38325
|
-
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-
|
|
38326
|
-
/* @__PURE__ */ jsx137("span", { className: "text-
|
|
38327
|
-
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-
|
|
38326
|
+
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: String(label) }),
|
|
38327
|
+
/* @__PURE__ */ jsx137("span", { className: "text-cardText", children: "=" }),
|
|
38328
|
+
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(value) })
|
|
38328
38329
|
] }, idx);
|
|
38329
38330
|
}) });
|
|
38330
38331
|
}
|
|
@@ -38337,9 +38338,9 @@ var CampaignConceptCard = React98.memo(
|
|
|
38337
38338
|
idx + 1,
|
|
38338
38339
|
"."
|
|
38339
38340
|
] }),
|
|
38340
|
-
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-
|
|
38341
|
-
/* @__PURE__ */ jsx137("span", { className: "text-
|
|
38342
|
-
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-
|
|
38341
|
+
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md", children: formatKey(k) }),
|
|
38342
|
+
/* @__PURE__ */ jsx137("span", { className: "text-cardText", children: "=" }),
|
|
38343
|
+
/* @__PURE__ */ jsx137("span", { className: "inline-flex items-center bg-black border border-cardBorder px-2 py-1 text-cardText text-sm rounded-md font-grotesk font-medium", children: formatVal(v) })
|
|
38343
38344
|
] }, k)) });
|
|
38344
38345
|
}
|
|
38345
38346
|
return /* @__PURE__ */ jsx137("span", { className: "text-muted-foreground text-sm", children: String(val) });
|
|
@@ -38381,7 +38382,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38381
38382
|
if (!val)
|
|
38382
38383
|
return /* @__PURE__ */ jsx137("span", { className: "text-muted-foreground text-sm", children: "-" });
|
|
38383
38384
|
const displayValue = typeof val === "object" && !Array.isArray(val) ? `${val.min ?? 0}-${val.max ?? 0}` : String(val);
|
|
38384
|
-
return /* @__PURE__ */ jsx137("span", { className: "text-
|
|
38385
|
+
return /* @__PURE__ */ jsx137("span", { className: "text-cardText text-sm", children: displayValue });
|
|
38385
38386
|
},
|
|
38386
38387
|
renderEdit: (v, onChange) => /* @__PURE__ */ jsx137(
|
|
38387
38388
|
Input,
|
|
@@ -38406,7 +38407,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38406
38407
|
return {
|
|
38407
38408
|
...field,
|
|
38408
38409
|
label: field.label || "Primary KPI",
|
|
38409
|
-
renderDisplay: (val) => /* @__PURE__ */ jsx137("span", { className: "text-
|
|
38410
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx137("span", { className: "text-cardText text-sm", children: val ? String(val) : "-" }),
|
|
38410
38411
|
renderEdit: (v, onChange) => /* @__PURE__ */ jsx137(
|
|
38411
38412
|
Input,
|
|
38412
38413
|
{
|
|
@@ -38424,7 +38425,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38424
38425
|
label: field.label || "Secondary KPIs",
|
|
38425
38426
|
renderDisplay: (val) => {
|
|
38426
38427
|
const display = Array.isArray(val) ? val.map(String).join(", ") : val ? String(val) : "-";
|
|
38427
|
-
return /* @__PURE__ */ jsx137("span", { className: "text-
|
|
38428
|
+
return /* @__PURE__ */ jsx137("span", { className: "text-cardText text-sm", children: display });
|
|
38428
38429
|
},
|
|
38429
38430
|
renderEdit: (v, onChange) => /* @__PURE__ */ jsx137(
|
|
38430
38431
|
Textarea,
|
|
@@ -38451,7 +38452,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38451
38452
|
return {
|
|
38452
38453
|
...field,
|
|
38453
38454
|
type: "textarea",
|
|
38454
|
-
renderDisplay: (val) => /* @__PURE__ */ jsx137("span", { className: "text-
|
|
38455
|
+
renderDisplay: (val) => /* @__PURE__ */ jsx137("span", { className: "text-cardText text-sm leading-relaxed", children: val ? String(val) : "-" })
|
|
38455
38456
|
};
|
|
38456
38457
|
}
|
|
38457
38458
|
return {
|
|
@@ -38465,7 +38466,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38465
38466
|
return /* @__PURE__ */ jsx137(
|
|
38466
38467
|
"span",
|
|
38467
38468
|
{
|
|
38468
|
-
className: "inline-flex items-center bg-
|
|
38469
|
+
className: "inline-flex items-center bg-black border border-cardBorder px-2 py-0.5 text-cardText text-xs font-medium rounded-md",
|
|
38469
38470
|
children: label
|
|
38470
38471
|
},
|
|
38471
38472
|
idx
|
|
@@ -38475,7 +38476,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38475
38476
|
if (typeof val === "object" && val !== null) {
|
|
38476
38477
|
return /* @__PURE__ */ jsx137("div", { className: "text-muted-foreground text-xs font-mono bg-paperBackground p-2 rounded mt-1 overflow-auto max-h-24", children: Object.entries(val).map(([k, v]) => `${k.replace(/_/g, " ")}: ${v}`).join("\n") });
|
|
38477
38478
|
}
|
|
38478
|
-
return /* @__PURE__ */ jsx137("span", { className: "text-
|
|
38479
|
+
return /* @__PURE__ */ jsx137("span", { className: "text-cardText text-sm", children: val !== void 0 && val !== null ? String(val) : "-" });
|
|
38479
38480
|
}
|
|
38480
38481
|
};
|
|
38481
38482
|
});
|
|
@@ -38484,19 +38485,19 @@ var CampaignConceptCard = React98.memo(
|
|
|
38484
38485
|
"div",
|
|
38485
38486
|
{
|
|
38486
38487
|
className: cn(
|
|
38487
|
-
"w-full rounded-
|
|
38488
|
-
isSelected || isRecommended ? "border-2 border-
|
|
38488
|
+
"w-full rounded-lg border bg-cardSurface relative transition-all duration-300",
|
|
38489
|
+
isSelected || isRecommended ? "border-2 border-cardBorder" : "border-gray400",
|
|
38489
38490
|
className
|
|
38490
38491
|
),
|
|
38491
38492
|
children: [
|
|
38492
38493
|
/* @__PURE__ */ jsxs96(
|
|
38493
38494
|
"div",
|
|
38494
38495
|
{
|
|
38495
|
-
className: "px-
|
|
38496
|
+
className: "px-4 py-2.5 relative flex items-center justify-between cursor-pointer select-none",
|
|
38496
38497
|
onClick: handleToggle,
|
|
38497
38498
|
children: [
|
|
38498
38499
|
/* @__PURE__ */ jsxs96("div", { className: "flex-1", children: [
|
|
38499
|
-
/* @__PURE__ */ jsxs96("h3", { className: "
|
|
38500
|
+
/* @__PURE__ */ jsxs96("h3", { className: "text-cardText font-semibold text-sm", children: [
|
|
38500
38501
|
"Concept ",
|
|
38501
38502
|
index !== void 0 ? index : "",
|
|
38502
38503
|
" :",
|
|
@@ -38504,8 +38505,8 @@ var CampaignConceptCard = React98.memo(
|
|
|
38504
38505
|
typeof cardTitle === "object" ? JSON.stringify(cardTitle) : String(cardTitle)
|
|
38505
38506
|
] }),
|
|
38506
38507
|
/* @__PURE__ */ jsxs96("div", { className: "flex flex-wrap gap-2", children: [
|
|
38507
|
-
isRecommended && /* @__PURE__ */ jsx137("
|
|
38508
|
-
!effectiveIsLatest && selectionStatus && /* @__PURE__ */ jsx137("
|
|
38508
|
+
isRecommended && /* @__PURE__ */ jsx137("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: "Recommended" }),
|
|
38509
|
+
!effectiveIsLatest && selectionStatus && /* @__PURE__ */ jsx137("span", { className: "text-[10px] font-semibold uppercase tracking-widest text-gold", children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
|
|
38509
38510
|
] })
|
|
38510
38511
|
] }),
|
|
38511
38512
|
/* @__PURE__ */ jsx137(
|
|
@@ -38521,7 +38522,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38521
38522
|
e.stopPropagation();
|
|
38522
38523
|
handleToggle();
|
|
38523
38524
|
},
|
|
38524
|
-
className: "p-2 bg-
|
|
38525
|
+
className: "p-2 bg-cardSurface hover:bg-gray200 text-cardText rounded-lg",
|
|
38525
38526
|
"aria-label": isOpen ? "Collapse" : "Expand",
|
|
38526
38527
|
title: isOpen ? "Collapse" : "Expand",
|
|
38527
38528
|
children: /* @__PURE__ */ jsx137(
|
|
@@ -38545,11 +38546,11 @@ var CampaignConceptCard = React98.memo(
|
|
|
38545
38546
|
exit: { height: 0, opacity: 0 },
|
|
38546
38547
|
transition: { duration: 0.2, ease: "easeIn" },
|
|
38547
38548
|
className: "overflow-hidden",
|
|
38548
|
-
children: /* @__PURE__ */ jsxs96("div", { className: "px-
|
|
38549
|
+
children: /* @__PURE__ */ jsxs96("div", { className: "px-3 py-2 w-full relative", children: [
|
|
38549
38550
|
/* @__PURE__ */ jsx137(
|
|
38550
38551
|
"div",
|
|
38551
38552
|
{
|
|
38552
|
-
className: "absolute left-[
|
|
38553
|
+
className: "absolute left-[48px] top-[70px] bottom-[40px] w-[2px]",
|
|
38553
38554
|
style: {
|
|
38554
38555
|
background: `radial-gradient(circle closest-side, #3C3D3E 98%, transparent) 50%/2px 5px repeat-y, linear-gradient(#3C3D3E 50%, transparent 0) 50%/2px 10px repeat-y`
|
|
38555
38556
|
}
|
|
@@ -38569,7 +38570,7 @@ var CampaignConceptCard = React98.memo(
|
|
|
38569
38570
|
hideTitle: true,
|
|
38570
38571
|
hideCopyButton: true,
|
|
38571
38572
|
className: "bg-transparent border-none shadow-none mb-0 p-0",
|
|
38572
|
-
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs96("div", { className: "flex justify-end items-center gap-1
|
|
38573
|
+
footer: !effectiveIsLatest && selectionStatus ? /* @__PURE__ */ jsxs96("div", { className: "flex justify-end items-center gap-1 text-green-600 text-[10px] font-semibold py-2 pr-4", children: [
|
|
38573
38574
|
/* @__PURE__ */ jsx137(CircleCheck, { className: "h-3.5 w-3.5" }),
|
|
38574
38575
|
/* @__PURE__ */ jsx137("span", { children: selectionStatus === "agent" ? "Selected by Agent" : "Selected by You" })
|
|
38575
38576
|
] }) : formCardProps.footer
|