@burdenoff/microfe-coolandlovely 2026.1101.8 → 2026.1102.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/README.md +15 -0
  2. package/dist/coolandlovely/CoolAndLovelyRoot.d.ts.map +1 -1
  3. package/dist/coolandlovely/CoolAndLovelyRoot.js +8 -0
  4. package/dist/coolandlovely/CoolAndLovelyRoot.js.map +1 -1
  5. package/dist/coolandlovely/CoolAndLovelyRoutes.d.ts.map +1 -1
  6. package/dist/coolandlovely/CoolAndLovelyRoutes.js +20 -16
  7. package/dist/coolandlovely/CoolAndLovelyRoutes.js.map +1 -1
  8. package/dist/coolandlovely/components/WardrobeItemCard.d.ts +2 -1
  9. package/dist/coolandlovely/components/WardrobeItemCard.d.ts.map +1 -1
  10. package/dist/coolandlovely/components/WardrobeItemCard.js +4 -3
  11. package/dist/coolandlovely/components/WardrobeItemCard.js.map +1 -1
  12. package/dist/coolandlovely/components/prices/BestPriceBadge.d.ts +7 -0
  13. package/dist/coolandlovely/components/prices/BestPriceBadge.d.ts.map +1 -0
  14. package/dist/coolandlovely/components/prices/BestPriceBadge.js +22 -0
  15. package/dist/coolandlovely/components/prices/BestPriceBadge.js.map +1 -0
  16. package/dist/coolandlovely/components/prices/LookbookPriceBoard.d.ts +10 -0
  17. package/dist/coolandlovely/components/prices/LookbookPriceBoard.d.ts.map +1 -0
  18. package/dist/coolandlovely/components/prices/LookbookPriceBoard.js +120 -0
  19. package/dist/coolandlovely/components/prices/LookbookPriceBoard.js.map +1 -0
  20. package/dist/coolandlovely/components/prices/PriceComparison.d.ts +5 -0
  21. package/dist/coolandlovely/components/prices/PriceComparison.d.ts.map +1 -0
  22. package/dist/coolandlovely/components/prices/PriceComparison.js +95 -0
  23. package/dist/coolandlovely/components/prices/PriceComparison.js.map +1 -0
  24. package/dist/coolandlovely/components/prices/PriceCurrencySelect.d.ts +6 -0
  25. package/dist/coolandlovely/components/prices/PriceCurrencySelect.d.ts.map +1 -0
  26. package/dist/coolandlovely/components/prices/PriceCurrencySelect.js +38 -0
  27. package/dist/coolandlovely/components/prices/PriceCurrencySelect.js.map +1 -0
  28. package/dist/coolandlovely/components/prices/PricePanel.d.ts +6 -0
  29. package/dist/coolandlovely/components/prices/PricePanel.d.ts.map +1 -0
  30. package/dist/coolandlovely/components/prices/PricePanel.js +105 -0
  31. package/dist/coolandlovely/components/prices/PricePanel.js.map +1 -0
  32. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.d.ts +2 -0
  33. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.d.ts.map +1 -0
  34. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.js +28 -0
  35. package/dist/coolandlovely/components/prices/PriceWatchDisclosure.js.map +1 -0
  36. package/dist/coolandlovely/components/prices/PriceWatchForm.d.ts +5 -0
  37. package/dist/coolandlovely/components/prices/PriceWatchForm.d.ts.map +1 -0
  38. package/dist/coolandlovely/components/prices/PriceWatchForm.js +89 -0
  39. package/dist/coolandlovely/components/prices/PriceWatchForm.js.map +1 -0
  40. package/dist/coolandlovely/components/prices/PriceWatches.d.ts +3 -0
  41. package/dist/coolandlovely/components/prices/PriceWatches.d.ts.map +1 -0
  42. package/dist/coolandlovely/components/prices/PriceWatches.js +189 -0
  43. package/dist/coolandlovely/components/prices/PriceWatches.js.map +1 -0
  44. package/dist/coolandlovely/components/prices/RetailerOfferLink.d.ts +6 -0
  45. package/dist/coolandlovely/components/prices/RetailerOfferLink.d.ts.map +1 -0
  46. package/dist/coolandlovely/components/prices/RetailerOfferLink.js +28 -0
  47. package/dist/coolandlovely/components/prices/RetailerOfferLink.js.map +1 -0
  48. package/dist/coolandlovely/components/prices/money.d.ts +6 -0
  49. package/dist/coolandlovely/components/prices/money.d.ts.map +1 -0
  50. package/dist/coolandlovely/components/prices/money.js +42 -0
  51. package/dist/coolandlovely/components/prices/money.js.map +1 -0
  52. package/dist/coolandlovely/hooks/useContextNavigation.d.ts +3 -0
  53. package/dist/coolandlovely/hooks/useContextNavigation.d.ts.map +1 -0
  54. package/dist/coolandlovely/hooks/useContextNavigation.js +31 -0
  55. package/dist/coolandlovely/hooks/useContextNavigation.js.map +1 -0
  56. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.d.ts.map +1 -1
  57. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js +1 -1
  58. package/dist/coolandlovely/hooks/useCoolAndLovelyApi.js.map +1 -1
  59. package/dist/coolandlovely/hooks/useCreatorMarketplace.d.ts +118 -0
  60. package/dist/coolandlovely/hooks/useCreatorMarketplace.d.ts.map +1 -0
  61. package/dist/coolandlovely/hooks/useCreatorMarketplace.js +120 -0
  62. package/dist/coolandlovely/hooks/useCreatorMarketplace.js.map +1 -0
  63. package/dist/coolandlovely/hooks/usePriceApi.d.ts +57 -0
  64. package/dist/coolandlovely/hooks/usePriceApi.d.ts.map +1 -0
  65. package/dist/coolandlovely/hooks/usePriceApi.js +111 -0
  66. package/dist/coolandlovely/hooks/usePriceApi.js.map +1 -0
  67. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.d.ts.map +1 -1
  68. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js +139 -121
  69. package/dist/coolandlovely/pages/collaborations/CollaborationDetailPage.js.map +1 -1
  70. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.d.ts.map +1 -1
  71. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js +140 -137
  72. package/dist/coolandlovely/pages/collaborations/CollaborationFormPage.js.map +1 -1
  73. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.d.ts.map +1 -1
  74. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js +104 -95
  75. package/dist/coolandlovely/pages/collaborations/CollaborationsListPage.js.map +1 -1
  76. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.d.ts.map +1 -1
  77. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js +49 -40
  78. package/dist/coolandlovely/pages/commerce/CreatorEarningsPage.js.map +1 -1
  79. package/dist/coolandlovely/pages/items/StoreListedPieceView.d.ts.map +1 -1
  80. package/dist/coolandlovely/pages/items/StoreListedPieceView.js +130 -123
  81. package/dist/coolandlovely/pages/items/StoreListedPieceView.js.map +1 -1
  82. package/dist/coolandlovely/pages/items/StyleItemDetailPage.d.ts.map +1 -1
  83. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js +241 -230
  84. package/dist/coolandlovely/pages/items/StyleItemDetailPage.js.map +1 -1
  85. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.d.ts.map +1 -1
  86. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js +64 -119
  87. package/dist/coolandlovely/pages/lookbooks/LookbookDetailPage.js.map +1 -1
  88. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.d.ts +2 -0
  89. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.d.ts.map +1 -0
  90. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.js +714 -0
  91. package/dist/coolandlovely/pages/marketplace/CreatorMarketplacePage.js.map +1 -0
  92. package/dist/coolandlovely/pages/profile/StyleProfilePage.d.ts.map +1 -1
  93. package/dist/coolandlovely/pages/profile/StyleProfilePage.js +214 -209
  94. package/dist/coolandlovely/pages/profile/StyleProfilePage.js.map +1 -1
  95. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.d.ts.map +1 -1
  96. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js +83 -49
  97. package/dist/coolandlovely/pages/wardrobe/WardrobeListPage.js.map +1 -1
  98. package/dist/coolandlovely/types/index.d.ts +5 -0
  99. package/dist/coolandlovely/types/index.d.ts.map +1 -1
  100. package/dist/generated/wspace-operations.d.ts +931 -2
  101. package/dist/generated/wspace-operations.d.ts.map +1 -1
  102. package/dist/generated/wspace-operations.js +221 -1
  103. package/dist/generated/wspace-operations.js.map +1 -1
  104. package/dist/generated/wspace-types.d.ts +539 -1
  105. package/dist/generated/wspace-types.d.ts.map +1 -1
  106. package/dist/generated/wspace-types.js +14 -0
  107. package/dist/generated/wspace-types.js.map +1 -0
  108. package/package.json +4 -3
@@ -6,33 +6,34 @@ import { ErrorView as o, LoadingView as s } from "../../components/StateViews.js
6
6
  import { parseCsv as c, titleCase as l } from "../../utils/formatters.js";
7
7
  import { SelectField as u, TextAreaField as d, TextField as f } from "../../components/Field.js";
8
8
  import { ActorName as p } from "../../components/ActorName.js";
9
- import { useEffect as m, useMemo as h, useState as g } from "react";
10
- import { ArrowLeft as _, Handshake as v, Loader2 as y, Save as b } from "lucide-react";
11
- import { useParams as x } from "react-router";
12
- import { jsx as S, jsxs as C } from "react/jsx-runtime";
13
- import { GlassCard as w } from "@burdenoff/fe-libs/ui";
9
+ import { useContextNavigation as m } from "../../hooks/useContextNavigation.js";
10
+ import { useEffect as h, useMemo as g, useState as _ } from "react";
11
+ import { ArrowLeft as v, Handshake as y, Loader2 as b, Save as x } from "lucide-react";
12
+ import { useParams as S } from "react-router";
13
+ import { jsx as C, jsxs as w } from "react/jsx-runtime";
14
+ import { GlassCard as T } from "@burdenoff/fe-libs/ui";
14
15
  //#region src/coolandlovely/pages/collaborations/CollaborationFormPage.tsx
15
- var T = [
16
+ var E = [
16
17
  "CREATOR",
17
18
  "BRAND",
18
19
  "STYLIST",
19
20
  "PHOTOGRAPHER"
20
- ], E = /* @__PURE__ */ new Set([
21
+ ], D = /* @__PURE__ */ new Set([
21
22
  "PUBLISHED",
22
23
  "DECLINED",
23
24
  "CANCELLED"
24
25
  ]);
25
- function D(e) {
26
+ function O(e) {
26
27
  if (!e) return;
27
28
  let t = new Date(e);
28
29
  return Number.isNaN(t.getTime()) ? void 0 : t.toISOString();
29
30
  }
30
- function O(e) {
31
+ function k(e) {
31
32
  if (!e) return "";
32
33
  let t = new Date(e);
33
34
  return Number.isNaN(t.getTime()) ? "" : t.toISOString().slice(0, 10);
34
35
  }
35
- var k = {
36
+ var A = {
36
37
  brandId: "",
37
38
  creatorId: "",
38
39
  title: "",
@@ -44,249 +45,251 @@ var k = {
44
45
  startDate: "",
45
46
  endDate: ""
46
47
  };
47
- function A() {
48
- let { collaborationId: A } = x(), j = !!A, { navigateTo: M, currentUser: N } = e(), P = i(), F = a(), I = n({ pagination: {
48
+ function j() {
49
+ let { collaborationId: j } = S(), M = !!j, { currentUser: N } = e(), P = m(), F = i(), I = a(), L = n({ pagination: {
49
50
  limit: 100,
50
51
  offset: 0
51
- } }), L = r(j ? A : void 0), [R, z] = g({
52
- ...k,
52
+ } }), R = r(M ? j : void 0), [z, B] = _({
53
+ ...A,
53
54
  creatorId: N?.id ?? ""
54
- }), [B, V] = g({});
55
- m(() => {
56
- if (!j || !L.data) return;
57
- let e = L.data;
58
- z({
55
+ }), [V, H] = _({});
56
+ h(() => {
57
+ if (!M || !R.data) return;
58
+ let e = R.data;
59
+ B({
59
60
  brandId: e.brandId,
60
61
  creatorId: e.creatorId,
61
62
  title: e.title,
62
63
  brief: e.brief ?? "",
63
64
  role: e.role,
64
- compensation: e.compensation ? String(e.compensation) : "",
65
+ compensation: e.rateCardId || e.compensation ? String(e.compensation) : "",
65
66
  currency: e.currency,
66
67
  tags: e.tags.join(", "),
67
- startDate: O(e.startDate),
68
- endDate: O(e.endDate)
68
+ startDate: k(e.startDate),
69
+ endDate: k(e.endDate)
69
70
  });
70
- }, [j, L.data]);
71
- let H = (e, t) => z((n) => ({
71
+ }, [M, R.data]);
72
+ let U = (e, t) => B((n) => ({
72
73
  ...n,
73
74
  [e]: t
74
- })), U = h(() => (I.data?.items ?? []).map((e) => ({
75
+ })), W = g(() => (L.data?.items ?? []).map((e) => ({
75
76
  value: e.id,
76
77
  label: e.name
77
- })), [I.data]), W = T.map((e) => ({
78
+ })), [L.data]), G = E.map((e) => ({
78
79
  value: e,
79
80
  label: l(e)
80
81
  }));
81
- if (j && L.isLoading) return /* @__PURE__ */ S(t, {
82
+ if (M && R.isLoading) return /* @__PURE__ */ C(t, {
82
83
  title: "Edit collaboration",
83
- children: /* @__PURE__ */ S(s, { label: "Loading collaboration…" })
84
+ children: /* @__PURE__ */ C(s, { label: "Loading collaboration…" })
84
85
  });
85
- if (j && (L.isError || !L.data)) return /* @__PURE__ */ S(t, {
86
+ if (M && (R.isError || !R.data)) return /* @__PURE__ */ C(t, {
86
87
  title: "Edit collaboration",
87
- children: /* @__PURE__ */ S(o, {
88
+ children: /* @__PURE__ */ C(o, {
88
89
  title: "Collaboration not found",
89
- onRetry: () => void L.refetch()
90
+ onRetry: () => void R.refetch()
90
91
  })
91
92
  });
92
- let G = j && L.data ? E.has(L.data.status) : !1, K = () => {
93
+ let K = M && R.data ? D.has(R.data.status) : !1, q = !!(M && R.data?.rateCardId), J = () => {
93
94
  let e = {};
94
- return R.title.trim() || (e.title = "Title is required"), j || (R.brandId || (e.brandId = "Brand is required"), R.creatorId.trim() || (e.creatorId = "Creator is required")), R.compensation && Number.isNaN(Number(R.compensation)) && (e.compensation = "Must be a number"), V(e), Object.keys(e).length === 0;
95
- }, q = j ? F : P;
96
- return /* @__PURE__ */ S(t, {
97
- title: j ? "Edit collaboration" : "New collaboration",
98
- description: j ? "Update the brief, terms and dates" : "Propose a brand × creator partnership",
99
- actions: /* @__PURE__ */ C("button", {
95
+ return z.title.trim() || (e.title = "Title is required"), M || (z.brandId || (e.brandId = "Brand is required"), z.creatorId.trim() || (e.creatorId = "Creator is required")), z.compensation && Number.isNaN(Number(z.compensation)) && (e.compensation = "Must be a number"), H(e), Object.keys(e).length === 0;
96
+ }, Y = M ? I : F;
97
+ return /* @__PURE__ */ C(t, {
98
+ title: M ? "Edit collaboration" : "New collaboration",
99
+ description: M ? "Update the brief, terms and dates" : "Propose a brand × creator partnership",
100
+ actions: /* @__PURE__ */ w("button", {
100
101
  type: "button",
101
- onClick: () => M(j && A ? `/collaborations/${A}` : "/collaborations"),
102
+ onClick: () => P(M && j ? `/collaborations/${j}` : "/collaborations"),
102
103
  className: "inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
103
- children: [/* @__PURE__ */ S(_, { className: "h-4 w-4" }), " Cancel"]
104
+ children: [/* @__PURE__ */ C(v, { className: "h-4 w-4" }), " Cancel"]
104
105
  }),
105
- children: /* @__PURE__ */ S("form", {
106
+ children: /* @__PURE__ */ C("form", {
106
107
  onSubmit: (e) => {
107
- if (e.preventDefault(), K()) {
108
- if (j && A) {
109
- F.mutate({
110
- id: A,
108
+ if (e.preventDefault(), J()) {
109
+ if (M && j) {
110
+ I.mutate({
111
+ id: j,
111
112
  input: {
112
- title: R.title.trim(),
113
- brief: R.brief.trim() || void 0,
114
- role: R.role,
115
- compensation: R.compensation ? Number(R.compensation) : void 0,
116
- currency: R.currency.trim() || void 0,
117
- tags: c(R.tags),
118
- startDate: D(R.startDate),
119
- endDate: D(R.endDate)
113
+ title: z.title.trim(),
114
+ brief: z.brief.trim() || void 0,
115
+ ...q ? {} : {
116
+ role: z.role,
117
+ compensation: z.compensation ? Number(z.compensation) : void 0,
118
+ currency: z.currency.trim() || void 0
119
+ },
120
+ tags: c(z.tags),
121
+ startDate: O(z.startDate),
122
+ endDate: O(z.endDate)
120
123
  }
121
- }, { onSuccess: (e) => M(`/collaborations/${e.id}`) });
124
+ }, { onSuccess: (e) => P(`/collaborations/${e.id}`) });
122
125
  return;
123
126
  }
124
- P.mutate({
125
- brandId: R.brandId,
126
- creatorId: R.creatorId.trim(),
127
- title: R.title.trim(),
128
- brief: R.brief.trim() || void 0,
129
- role: R.role,
130
- compensation: R.compensation ? Number(R.compensation) : void 0,
131
- currency: R.currency.trim() || void 0,
132
- tags: c(R.tags),
133
- startDate: D(R.startDate),
134
- endDate: D(R.endDate)
135
- }, { onSuccess: (e) => M(`/collaborations/${e.id}`) });
127
+ F.mutate({
128
+ brandId: z.brandId,
129
+ creatorId: z.creatorId.trim(),
130
+ title: z.title.trim(),
131
+ brief: z.brief.trim() || void 0,
132
+ role: z.role,
133
+ compensation: z.compensation ? Number(z.compensation) : void 0,
134
+ currency: z.currency.trim() || void 0,
135
+ tags: c(z.tags),
136
+ startDate: O(z.startDate),
137
+ endDate: O(z.endDate)
138
+ }, { onSuccess: (e) => P(`/collaborations/${e.id}`) });
136
139
  }
137
140
  },
138
141
  className: "mx-auto max-w-2xl",
139
- children: /* @__PURE__ */ C(w, {
142
+ children: /* @__PURE__ */ w(T, {
140
143
  treatment: "plain",
141
144
  className: "p-6",
142
145
  children: [
143
- /* @__PURE__ */ C("div", {
146
+ /* @__PURE__ */ w("div", {
144
147
  className: "mb-6 flex items-center gap-3",
145
- children: [/* @__PURE__ */ S("div", {
148
+ children: [/* @__PURE__ */ C("div", {
146
149
  className: "flex h-11 w-11 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text",
147
- children: /* @__PURE__ */ S(v, { className: "h-5 w-5" })
148
- }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h2", {
150
+ children: /* @__PURE__ */ C(y, { className: "h-5 w-5" })
151
+ }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("h2", {
149
152
  className: "text-base font-semibold text-text-primary",
150
153
  children: "Collaboration details"
151
- }), /* @__PURE__ */ S("p", {
154
+ }), /* @__PURE__ */ C("p", {
152
155
  className: "text-xs text-text-secondary",
153
- children: j ? "Brand and creator cannot be changed after proposal." : "Created in the Proposed state."
156
+ children: M ? "Brand and creator cannot be changed after proposal." : "Created in the Proposed state."
154
157
  })] })]
155
158
  }),
156
- G && /* @__PURE__ */ C("p", {
159
+ K && /* @__PURE__ */ w("p", {
157
160
  className: "mb-4 rounded-lg bg-status-warning-bg-subtle px-3 py-2 text-sm text-status-warning-text",
158
161
  children: [
159
162
  "This collaboration is ",
160
- L.data?.status.toLowerCase(),
163
+ R.data?.status.toLowerCase(),
161
164
  " and can no longer be edited."
162
165
  ]
163
166
  }),
164
- /* @__PURE__ */ C("div", {
167
+ /* @__PURE__ */ w("div", {
165
168
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
166
- children: [j ? /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("span", {
169
+ children: [M ? /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("span", {
167
170
  className: "mb-1.5 block text-sm font-medium text-text-primary",
168
171
  children: "Brand"
169
- }), /* @__PURE__ */ S("p", {
172
+ }), /* @__PURE__ */ C("p", {
170
173
  className: "rounded-lg border border-border-seam bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
171
- children: L.data?.brand?.name ?? R.brandId
172
- })] }) : /* @__PURE__ */ S(u, {
174
+ children: R.data?.brand?.name ?? z.brandId
175
+ })] }) : /* @__PURE__ */ C(u, {
173
176
  id: "brandId",
174
177
  label: "Brand",
175
- value: R.brandId,
176
- onChange: (e) => H("brandId", e),
177
- options: U,
178
+ value: z.brandId,
179
+ onChange: (e) => U("brandId", e),
180
+ options: W,
178
181
  required: !0,
179
- placeholder: I.isLoading ? "Loading brands…" : "Select a brand",
180
- error: B.brandId
181
- }), /* @__PURE__ */ S(u, {
182
+ placeholder: L.isLoading ? "Loading brands…" : "Select a brand",
183
+ error: V.brandId
184
+ }), /* @__PURE__ */ C(u, {
182
185
  id: "role",
183
186
  label: "Role",
184
- value: R.role,
185
- onChange: (e) => H("role", e),
186
- options: W,
187
- disabled: G
187
+ value: z.role,
188
+ onChange: (e) => U("role", e),
189
+ options: G,
190
+ disabled: K || q
188
191
  })]
189
192
  }),
190
- /* @__PURE__ */ S(f, {
193
+ /* @__PURE__ */ C(f, {
191
194
  id: "title",
192
195
  label: "Title",
193
- value: R.title,
194
- onChange: (e) => H("title", e),
196
+ value: z.title,
197
+ onChange: (e) => U("title", e),
195
198
  placeholder: "Summer capsule edit",
196
199
  required: !0,
197
- error: B.title,
200
+ error: V.title,
198
201
  className: "mt-4",
199
- disabled: G
202
+ disabled: K
200
203
  }),
201
- j ? /* @__PURE__ */ C("div", {
204
+ M ? /* @__PURE__ */ w("div", {
202
205
  className: "mt-4",
203
- children: [/* @__PURE__ */ S("span", {
206
+ children: [/* @__PURE__ */ C("span", {
204
207
  className: "mb-1.5 block text-sm font-medium text-text-primary",
205
208
  children: "Creator"
206
- }), /* @__PURE__ */ S("p", {
209
+ }), /* @__PURE__ */ C("p", {
207
210
  className: "rounded-lg border border-border-seam bg-bg-sunken px-3 py-2 text-sm text-text-secondary",
208
- children: /* @__PURE__ */ S(p, { id: R.creatorId })
211
+ children: /* @__PURE__ */ C(p, { id: z.creatorId })
209
212
  })]
210
- }) : /* @__PURE__ */ S(f, {
213
+ }) : /* @__PURE__ */ C(f, {
211
214
  id: "creatorId",
212
215
  label: "Creator ID",
213
- value: R.creatorId,
214
- onChange: (e) => H("creatorId", e),
216
+ value: z.creatorId,
217
+ onChange: (e) => U("creatorId", e),
215
218
  placeholder: "creator user id",
216
219
  required: !0,
217
220
  hint: "Defaults to you. Paste another user's id to credit a different creator.",
218
- error: B.creatorId,
221
+ error: V.creatorId,
219
222
  className: "mt-4"
220
223
  }),
221
- /* @__PURE__ */ S(d, {
224
+ /* @__PURE__ */ C(d, {
222
225
  id: "brief",
223
226
  label: "Brief",
224
- value: R.brief,
225
- onChange: (e) => H("brief", e),
227
+ value: z.brief,
228
+ onChange: (e) => U("brief", e),
226
229
  placeholder: "What is this collaboration about…",
227
230
  rows: 4,
228
231
  className: "mt-4",
229
- disabled: G
232
+ disabled: K
230
233
  }),
231
- /* @__PURE__ */ C("div", {
234
+ /* @__PURE__ */ w("div", {
232
235
  className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
233
- children: [/* @__PURE__ */ S(f, {
236
+ children: [/* @__PURE__ */ C(f, {
234
237
  id: "compensation",
235
238
  label: "Compensation",
236
239
  type: "number",
237
- value: R.compensation,
238
- onChange: (e) => H("compensation", e),
240
+ value: z.compensation,
241
+ onChange: (e) => U("compensation", e),
239
242
  placeholder: "0.00",
240
- error: B.compensation,
241
- disabled: G
242
- }), /* @__PURE__ */ S(f, {
243
+ error: V.compensation,
244
+ disabled: K || q
245
+ }), /* @__PURE__ */ C(f, {
243
246
  id: "currency",
244
247
  label: "Currency",
245
- value: R.currency,
246
- onChange: (e) => H("currency", e),
248
+ value: z.currency,
249
+ onChange: (e) => U("currency", e),
247
250
  placeholder: "USD",
248
- disabled: G
251
+ disabled: K || q
249
252
  })]
250
253
  }),
251
- /* @__PURE__ */ C("div", {
254
+ /* @__PURE__ */ w("div", {
252
255
  className: "mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2",
253
- children: [/* @__PURE__ */ S(f, {
256
+ children: [/* @__PURE__ */ C(f, {
254
257
  id: "startDate",
255
258
  label: "Start date",
256
259
  type: "date",
257
- value: R.startDate,
258
- onChange: (e) => H("startDate", e),
259
- disabled: G
260
- }), /* @__PURE__ */ S(f, {
260
+ value: z.startDate,
261
+ onChange: (e) => U("startDate", e),
262
+ disabled: K
263
+ }), /* @__PURE__ */ C(f, {
261
264
  id: "endDate",
262
265
  label: "End date",
263
266
  type: "date",
264
- value: R.endDate,
265
- onChange: (e) => H("endDate", e),
266
- disabled: G
267
+ value: z.endDate,
268
+ onChange: (e) => U("endDate", e),
269
+ disabled: K
267
270
  })]
268
271
  }),
269
- /* @__PURE__ */ S(f, {
272
+ /* @__PURE__ */ C(f, {
270
273
  id: "tags",
271
274
  label: "Tags",
272
- value: R.tags,
273
- onChange: (e) => H("tags", e),
275
+ value: z.tags,
276
+ onChange: (e) => U("tags", e),
274
277
  placeholder: "capsule, sustainable",
275
278
  hint: "Comma-separated",
276
279
  className: "mt-4",
277
- disabled: G
280
+ disabled: K
278
281
  }),
279
- q.isError && /* @__PURE__ */ S("p", {
282
+ Y.isError && /* @__PURE__ */ C("p", {
280
283
  className: "mt-4 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text",
281
- children: q.error instanceof Error ? q.error.message : "Something went wrong"
284
+ children: Y.error instanceof Error ? Y.error.message : "Something went wrong"
282
285
  }),
283
- /* @__PURE__ */ S("div", {
286
+ /* @__PURE__ */ C("div", {
284
287
  className: "mt-6 flex justify-end gap-2",
285
- children: /* @__PURE__ */ C("button", {
288
+ children: /* @__PURE__ */ w("button", {
286
289
  type: "submit",
287
- disabled: q.isPending || G,
290
+ disabled: Y.isPending || K,
288
291
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50",
289
- children: [q.isPending ? /* @__PURE__ */ S(y, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ S(b, { className: "h-4 w-4" }), j ? "Save changes" : "Create collaboration"]
292
+ children: [Y.isPending ? /* @__PURE__ */ C(b, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ C(x, { className: "h-4 w-4" }), M ? "Save changes" : "Create collaboration"]
290
293
  })
291
294
  })
292
295
  ]
@@ -295,6 +298,6 @@ function A() {
295
298
  });
296
299
  }
297
300
  //#endregion
298
- export { A as CollaborationFormPage };
301
+ export { j as CollaborationFormPage };
299
302
 
300
303
  //# sourceMappingURL=CollaborationFormPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborationFormPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationFormPage.tsx"],"sourcesContent":["/**\n * Collaboration Create / Edit Page\n * @module coolandlovely/pages/collaborations\n *\n * Create mode drives `cooCreateCollaboration`. Edit mode (route\n * `/collaborations/:collaborationId/edit`) drives `cooUpdateCollaboration` —\n * identity (brand/creator) and status are immutable there, so those fields\n * render read-only and status transitions stay on CollaborationDetailPage.\n */\n\nimport { useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router';\nimport { ArrowLeft, Loader2, Save, Handshake } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { TextField, TextAreaField, SelectField } from '../../components/Field';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { ActorName } from '../../components/ActorName';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport {\n useCreateCollaboration,\n useUpdateCollaboration,\n useCollaboration,\n useBrands,\n} from '../../hooks';\nimport { parseCsv, titleCase } from '../../utils/formatters';\nimport type { CooCollaboratorRole } from '../../types';\n\nconst ROLES: CooCollaboratorRole[] = ['CREATOR', 'BRAND', 'STYLIST', 'PHOTOGRAPHER'];\n\n/** Statuses past which a collaboration's terms may no longer be edited (mirrors the svc's TERMINAL_COLLABORATION_STATUSES). */\nconst TERMINAL_STATUSES = new Set(['PUBLISHED', 'DECLINED', 'CANCELLED']);\n\ninterface FormState {\n brandId: string;\n creatorId: string;\n title: string;\n brief: string;\n role: CooCollaboratorRole;\n compensation: string;\n currency: string;\n tags: string;\n startDate: string;\n endDate: string;\n}\n\nfunction toIso(date: string): string | undefined {\n if (!date) return undefined;\n const d = new Date(date);\n return Number.isNaN(d.getTime()) ? undefined : d.toISOString();\n}\n\n/** yyyy-MM-dd for a <input type=\"date\"> from an ISO string, or '' when unset. */\nfunction toDateInput(iso: string | null | undefined): string {\n if (!iso) return '';\n const d = new Date(iso);\n return Number.isNaN(d.getTime()) ? '' : d.toISOString().slice(0, 10);\n}\n\nconst emptyForm: FormState = {\n brandId: '',\n creatorId: '',\n title: '',\n brief: '',\n role: 'CREATOR',\n compensation: '',\n currency: 'USD',\n tags: '',\n startDate: '',\n endDate: '',\n};\n\nexport function CollaborationFormPage() {\n const { collaborationId } = useParams<{ collaborationId: string }>();\n const isEditMode = Boolean(collaborationId);\n const { navigateTo, currentUser } = useCoolAndLovely();\n const createCollaboration = useCreateCollaboration();\n const updateCollaboration = useUpdateCollaboration();\n const brands = useBrands({ pagination: { limit: 100, offset: 0 } });\n const existing = useCollaboration(isEditMode ? collaborationId : undefined);\n\n const [form, setForm] = useState<FormState>({ ...emptyForm, creatorId: currentUser?.id ?? '' });\n const [errors, setErrors] = useState<Partial<Record<keyof FormState, string>>>({});\n\n // Prefill the form once the existing collaboration loads (edit mode only).\n useEffect(() => {\n if (!isEditMode || !existing.data) return;\n const c = existing.data;\n setForm({\n brandId: c.brandId,\n creatorId: c.creatorId,\n title: c.title,\n brief: c.brief ?? '',\n role: c.role,\n compensation: c.compensation ? String(c.compensation) : '',\n currency: c.currency,\n tags: c.tags.join(', '),\n startDate: toDateInput(c.startDate),\n endDate: toDateInput(c.endDate),\n });\n }, [isEditMode, existing.data]);\n\n const setField = <K extends keyof FormState>(key: K, value: FormState[K]) =>\n setForm((f) => ({ ...f, [key]: value }));\n\n const brandOptions = useMemo(\n () => (brands.data?.items ?? []).map((b) => ({ value: b.id, label: b.name })),\n [brands.data]\n );\n const roleOptions = ROLES.map((r) => ({ value: r, label: titleCase(r) }));\n\n if (isEditMode && existing.isLoading) {\n return (\n <PageLayout title=\"Edit collaboration\">\n <LoadingView label=\"Loading collaboration…\" />\n </PageLayout>\n );\n }\n\n if (isEditMode && (existing.isError || !existing.data)) {\n return (\n <PageLayout title=\"Edit collaboration\">\n <ErrorView title=\"Collaboration not found\" onRetry={() => void existing.refetch()} />\n </PageLayout>\n );\n }\n\n const isTerminal =\n isEditMode && existing.data ? TERMINAL_STATUSES.has(existing.data.status) : false;\n\n const validate = (): boolean => {\n const next: Partial<Record<keyof FormState, string>> = {};\n if (!form.title.trim()) next.title = 'Title is required';\n if (!isEditMode) {\n if (!form.brandId) next.brandId = 'Brand is required';\n if (!form.creatorId.trim()) next.creatorId = 'Creator is required';\n }\n if (form.compensation && Number.isNaN(Number(form.compensation)))\n next.compensation = 'Must be a number';\n setErrors(next);\n return Object.keys(next).length === 0;\n };\n\n const mutation = isEditMode ? updateCollaboration : createCollaboration;\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n if (!validate()) return;\n\n if (isEditMode && collaborationId) {\n updateCollaboration.mutate(\n {\n id: collaborationId,\n input: {\n title: form.title.trim(),\n brief: form.brief.trim() || undefined,\n role: form.role,\n compensation: form.compensation ? Number(form.compensation) : undefined,\n currency: form.currency.trim() || undefined,\n tags: parseCsv(form.tags),\n startDate: toIso(form.startDate),\n endDate: toIso(form.endDate),\n },\n },\n { onSuccess: (c) => navigateTo(`/collaborations/${c.id}`) }\n );\n return;\n }\n\n createCollaboration.mutate(\n {\n brandId: form.brandId,\n creatorId: form.creatorId.trim(),\n title: form.title.trim(),\n brief: form.brief.trim() || undefined,\n role: form.role,\n compensation: form.compensation ? Number(form.compensation) : undefined,\n currency: form.currency.trim() || undefined,\n tags: parseCsv(form.tags),\n startDate: toIso(form.startDate),\n endDate: toIso(form.endDate),\n },\n { onSuccess: (c) => navigateTo(`/collaborations/${c.id}`) }\n );\n };\n\n return (\n <PageLayout\n title={isEditMode ? 'Edit collaboration' : 'New collaboration'}\n description={\n isEditMode ? 'Update the brief, terms and dates' : 'Propose a brand × creator partnership'\n }\n actions={\n <button\n type=\"button\"\n onClick={() =>\n navigateTo(\n isEditMode && collaborationId\n ? `/collaborations/${collaborationId}`\n : '/collaborations'\n )\n }\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> Cancel\n </button>\n }\n >\n <form onSubmit={handleSubmit} className=\"mx-auto max-w-2xl\">\n <GlassCard treatment=\"plain\" className=\"p-6\">\n <div className=\"mb-6 flex items-center gap-3\">\n <div className=\"flex h-11 w-11 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text\">\n <Handshake className=\"h-5 w-5\" />\n </div>\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Collaboration details</h2>\n <p className=\"text-xs text-text-secondary\">\n {isEditMode\n ? 'Brand and creator cannot be changed after proposal.'\n : 'Created in the Proposed state.'}\n </p>\n </div>\n </div>\n\n {isTerminal && (\n <p className=\"mb-4 rounded-lg bg-status-warning-bg-subtle px-3 py-2 text-sm text-status-warning-text\">\n This collaboration is {existing.data?.status.toLowerCase()} and can no longer be\n edited.\n </p>\n )}\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {isEditMode ? (\n <div>\n <span className=\"mb-1.5 block text-sm font-medium text-text-primary\">Brand</span>\n <p className=\"rounded-lg border border-border-seam bg-bg-sunken px-3 py-2 text-sm text-text-secondary\">\n {existing.data?.brand?.name ?? form.brandId}\n </p>\n </div>\n ) : (\n <SelectField\n id=\"brandId\"\n label=\"Brand\"\n value={form.brandId}\n onChange={(v) => setField('brandId', v)}\n options={brandOptions}\n required\n placeholder={brands.isLoading ? 'Loading brands…' : 'Select a brand'}\n error={errors.brandId}\n />\n )}\n <SelectField\n id=\"role\"\n label=\"Role\"\n value={form.role}\n onChange={(v) => setField('role', v as CooCollaboratorRole)}\n options={roleOptions}\n disabled={isTerminal}\n />\n </div>\n\n <TextField\n id=\"title\"\n label=\"Title\"\n value={form.title}\n onChange={(v) => setField('title', v)}\n placeholder=\"Summer capsule edit\"\n required\n error={errors.title}\n className=\"mt-4\"\n disabled={isTerminal}\n />\n\n {isEditMode ? (\n <div className=\"mt-4\">\n <span className=\"mb-1.5 block text-sm font-medium text-text-primary\">Creator</span>\n <p className=\"rounded-lg border border-border-seam bg-bg-sunken px-3 py-2 text-sm text-text-secondary\">\n <ActorName id={form.creatorId} />\n </p>\n </div>\n ) : (\n <TextField\n id=\"creatorId\"\n label=\"Creator ID\"\n value={form.creatorId}\n onChange={(v) => setField('creatorId', v)}\n placeholder=\"creator user id\"\n required\n hint=\"Defaults to you. Paste another user's id to credit a different creator.\"\n error={errors.creatorId}\n className=\"mt-4\"\n />\n )}\n\n <TextAreaField\n id=\"brief\"\n label=\"Brief\"\n value={form.brief}\n onChange={(v) => setField('brief', v)}\n placeholder=\"What is this collaboration about…\"\n rows={4}\n className=\"mt-4\"\n disabled={isTerminal}\n />\n\n <div className=\"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <TextField\n id=\"compensation\"\n label=\"Compensation\"\n type=\"number\"\n value={form.compensation}\n onChange={(v) => setField('compensation', v)}\n placeholder=\"0.00\"\n error={errors.compensation}\n disabled={isTerminal}\n />\n <TextField\n id=\"currency\"\n label=\"Currency\"\n value={form.currency}\n onChange={(v) => setField('currency', v)}\n placeholder=\"USD\"\n disabled={isTerminal}\n />\n </div>\n\n <div className=\"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <TextField\n id=\"startDate\"\n label=\"Start date\"\n type=\"date\"\n value={form.startDate}\n onChange={(v) => setField('startDate', v)}\n disabled={isTerminal}\n />\n <TextField\n id=\"endDate\"\n label=\"End date\"\n type=\"date\"\n value={form.endDate}\n onChange={(v) => setField('endDate', v)}\n disabled={isTerminal}\n />\n </div>\n\n <TextField\n id=\"tags\"\n label=\"Tags\"\n value={form.tags}\n onChange={(v) => setField('tags', v)}\n placeholder=\"capsule, sustainable\"\n hint=\"Comma-separated\"\n className=\"mt-4\"\n disabled={isTerminal}\n />\n\n {mutation.isError && (\n <p className=\"mt-4 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text\">\n {mutation.error instanceof Error ? mutation.error.message : 'Something went wrong'}\n </p>\n )}\n\n <div className=\"mt-6 flex justify-end gap-2\">\n <button\n type=\"submit\"\n disabled={mutation.isPending || isTerminal}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {mutation.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Save className=\"h-4 w-4\" />\n )}\n {isEditMode ? 'Save changes' : 'Create collaboration'}\n </button>\n </div>\n </GlassCard>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AA4BA,IAAM,IAA+B;CAAC;CAAW;CAAS;CAAW;AAAc,GAG7E,oBAAoB,IAAI,IAAI;CAAC;CAAa;CAAY;AAAW,CAAC;AAexE,SAAS,EAAM,GAAkC;CAC/C,IAAI,CAAC,GAAM;CACX,IAAM,IAAI,IAAI,KAAK,CAAI;CACvB,OAAO,OAAO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CAAA;CACI,CAAA;AAEhB"}
1
+ {"version":3,"file":"CollaborationFormPage.js","names":[],"sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationFormPage.tsx"],"sourcesContent":["/**\n * Collaboration Create / Edit Page\n * @module coolandlovely/pages/collaborations\n *\n * Create mode drives `cooCreateCollaboration`. Edit mode (route\n * `/collaborations/:collaborationId/edit`) drives `cooUpdateCollaboration` —\n * identity (brand/creator) and status are immutable there, so those fields\n * render read-only and status transitions stay on CollaborationDetailPage.\n */\n\nimport { useContextNavigation } from '../../hooks/useContextNavigation';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router';\nimport { ArrowLeft, Loader2, Save, Handshake } from 'lucide-react';\nimport { GlassCard } from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../../components/PageLayout';\nimport { TextField, TextAreaField, SelectField } from '../../components/Field';\nimport { LoadingView, ErrorView } from '../../components/StateViews';\nimport { ActorName } from '../../components/ActorName';\nimport { useCoolAndLovely } from '../../context/CoolAndLovelyContext';\nimport {\n useCreateCollaboration,\n useUpdateCollaboration,\n useCollaboration,\n useBrands,\n} from '../../hooks';\nimport { parseCsv, titleCase } from '../../utils/formatters';\nimport type { CooCollaboratorRole } from '../../types';\n\nconst ROLES: CooCollaboratorRole[] = ['CREATOR', 'BRAND', 'STYLIST', 'PHOTOGRAPHER'];\n\n/** Statuses past which a collaboration's terms may no longer be edited (mirrors the svc's TERMINAL_COLLABORATION_STATUSES). */\nconst TERMINAL_STATUSES = new Set(['PUBLISHED', 'DECLINED', 'CANCELLED']);\n\ninterface FormState {\n brandId: string;\n creatorId: string;\n title: string;\n brief: string;\n role: CooCollaboratorRole;\n compensation: string;\n currency: string;\n tags: string;\n startDate: string;\n endDate: string;\n}\n\nfunction toIso(date: string): string | undefined {\n if (!date) return undefined;\n const d = new Date(date);\n return Number.isNaN(d.getTime()) ? undefined : d.toISOString();\n}\n\n/** yyyy-MM-dd for a <input type=\"date\"> from an ISO string, or '' when unset. */\nfunction toDateInput(iso: string | null | undefined): string {\n if (!iso) return '';\n const d = new Date(iso);\n return Number.isNaN(d.getTime()) ? '' : d.toISOString().slice(0, 10);\n}\n\nconst emptyForm: FormState = {\n brandId: '',\n creatorId: '',\n title: '',\n brief: '',\n role: 'CREATOR',\n compensation: '',\n currency: 'USD',\n tags: '',\n startDate: '',\n endDate: '',\n};\n\nexport function CollaborationFormPage() {\n const { collaborationId } = useParams<{ collaborationId: string }>();\n const isEditMode = Boolean(collaborationId);\n const { currentUser } = useCoolAndLovely();\n const navigateTo = useContextNavigation();\n const createCollaboration = useCreateCollaboration();\n const updateCollaboration = useUpdateCollaboration();\n const brands = useBrands({ pagination: { limit: 100, offset: 0 } });\n const existing = useCollaboration(isEditMode ? collaborationId : undefined);\n\n const [form, setForm] = useState<FormState>({ ...emptyForm, creatorId: currentUser?.id ?? '' });\n const [errors, setErrors] = useState<Partial<Record<keyof FormState, string>>>({});\n\n // Prefill the form once the existing collaboration loads (edit mode only).\n useEffect(() => {\n if (!isEditMode || !existing.data) return;\n const c = existing.data;\n setForm({\n brandId: c.brandId,\n creatorId: c.creatorId,\n title: c.title,\n brief: c.brief ?? '',\n role: c.role,\n // A free reviewed quote must retain its explicit zero rather than an empty field.\n compensation: c.rateCardId || c.compensation ? String(c.compensation) : '',\n currency: c.currency,\n tags: c.tags.join(', '),\n startDate: toDateInput(c.startDate),\n endDate: toDateInput(c.endDate),\n });\n }, [isEditMode, existing.data]);\n\n const setField = <K extends keyof FormState>(key: K, value: FormState[K]) =>\n setForm((f) => ({ ...f, [key]: value }));\n\n const brandOptions = useMemo(\n () => (brands.data?.items ?? []).map((b) => ({ value: b.id, label: b.name })),\n [brands.data]\n );\n const roleOptions = ROLES.map((r) => ({ value: r, label: titleCase(r) }));\n\n if (isEditMode && existing.isLoading) {\n return (\n <PageLayout title=\"Edit collaboration\">\n <LoadingView label=\"Loading collaboration…\" />\n </PageLayout>\n );\n }\n\n if (isEditMode && (existing.isError || !existing.data)) {\n return (\n <PageLayout title=\"Edit collaboration\">\n <ErrorView title=\"Collaboration not found\" onRetry={() => void existing.refetch()} />\n </PageLayout>\n );\n }\n\n const isTerminal =\n isEditMode && existing.data ? TERMINAL_STATUSES.has(existing.data.status) : false;\n\n const hasQuotedTerms = Boolean(isEditMode && existing.data?.rateCardId);\n\n const validate = (): boolean => {\n const next: Partial<Record<keyof FormState, string>> = {};\n if (!form.title.trim()) next.title = 'Title is required';\n if (!isEditMode) {\n if (!form.brandId) next.brandId = 'Brand is required';\n if (!form.creatorId.trim()) next.creatorId = 'Creator is required';\n }\n if (form.compensation && Number.isNaN(Number(form.compensation)))\n next.compensation = 'Must be a number';\n setErrors(next);\n return Object.keys(next).length === 0;\n };\n\n const mutation = isEditMode ? updateCollaboration : createCollaboration;\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault();\n if (!validate()) return;\n\n if (isEditMode && collaborationId) {\n updateCollaboration.mutate(\n {\n id: collaborationId,\n input: {\n title: form.title.trim(),\n brief: form.brief.trim() || undefined,\n ...(hasQuotedTerms\n ? {}\n : {\n role: form.role,\n compensation: form.compensation ? Number(form.compensation) : undefined,\n currency: form.currency.trim() || undefined,\n }),\n tags: parseCsv(form.tags),\n startDate: toIso(form.startDate),\n endDate: toIso(form.endDate),\n },\n },\n { onSuccess: (c) => navigateTo(`/collaborations/${c.id}`) }\n );\n return;\n }\n\n createCollaboration.mutate(\n {\n brandId: form.brandId,\n creatorId: form.creatorId.trim(),\n title: form.title.trim(),\n brief: form.brief.trim() || undefined,\n role: form.role,\n compensation: form.compensation ? Number(form.compensation) : undefined,\n currency: form.currency.trim() || undefined,\n tags: parseCsv(form.tags),\n startDate: toIso(form.startDate),\n endDate: toIso(form.endDate),\n },\n { onSuccess: (c) => navigateTo(`/collaborations/${c.id}`) }\n );\n };\n\n return (\n <PageLayout\n title={isEditMode ? 'Edit collaboration' : 'New collaboration'}\n description={\n isEditMode ? 'Update the brief, terms and dates' : 'Propose a brand × creator partnership'\n }\n actions={\n <button\n type=\"button\"\n onClick={() =>\n navigateTo(\n isEditMode && collaborationId\n ? `/collaborations/${collaborationId}`\n : '/collaborations'\n )\n }\n className=\"inline-flex items-center gap-1.5 rounded-lg border border-border-seam px-3 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken\"\n >\n <ArrowLeft className=\"h-4 w-4\" /> Cancel\n </button>\n }\n >\n <form onSubmit={handleSubmit} className=\"mx-auto max-w-2xl\">\n <GlassCard treatment=\"plain\" className=\"p-6\">\n <div className=\"mb-6 flex items-center gap-3\">\n <div className=\"flex h-11 w-11 items-center justify-center rounded-lg bg-status-warning-bg-subtle text-status-warning-text\">\n <Handshake className=\"h-5 w-5\" />\n </div>\n <div>\n <h2 className=\"text-base font-semibold text-text-primary\">Collaboration details</h2>\n <p className=\"text-xs text-text-secondary\">\n {isEditMode\n ? 'Brand and creator cannot be changed after proposal.'\n : 'Created in the Proposed state.'}\n </p>\n </div>\n </div>\n\n {isTerminal && (\n <p className=\"mb-4 rounded-lg bg-status-warning-bg-subtle px-3 py-2 text-sm text-status-warning-text\">\n This collaboration is {existing.data?.status.toLowerCase()} and can no longer be\n edited.\n </p>\n )}\n\n <div className=\"grid grid-cols-1 gap-4 sm:grid-cols-2\">\n {isEditMode ? (\n <div>\n <span className=\"mb-1.5 block text-sm font-medium text-text-primary\">Brand</span>\n <p className=\"rounded-lg border border-border-seam bg-bg-sunken px-3 py-2 text-sm text-text-secondary\">\n {existing.data?.brand?.name ?? form.brandId}\n </p>\n </div>\n ) : (\n <SelectField\n id=\"brandId\"\n label=\"Brand\"\n value={form.brandId}\n onChange={(v) => setField('brandId', v)}\n options={brandOptions}\n required\n placeholder={brands.isLoading ? 'Loading brands…' : 'Select a brand'}\n error={errors.brandId}\n />\n )}\n <SelectField\n id=\"role\"\n label=\"Role\"\n value={form.role}\n onChange={(v) => setField('role', v as CooCollaboratorRole)}\n options={roleOptions}\n disabled={isTerminal || hasQuotedTerms}\n />\n </div>\n\n <TextField\n id=\"title\"\n label=\"Title\"\n value={form.title}\n onChange={(v) => setField('title', v)}\n placeholder=\"Summer capsule edit\"\n required\n error={errors.title}\n className=\"mt-4\"\n disabled={isTerminal}\n />\n\n {isEditMode ? (\n <div className=\"mt-4\">\n <span className=\"mb-1.5 block text-sm font-medium text-text-primary\">Creator</span>\n <p className=\"rounded-lg border border-border-seam bg-bg-sunken px-3 py-2 text-sm text-text-secondary\">\n <ActorName id={form.creatorId} />\n </p>\n </div>\n ) : (\n <TextField\n id=\"creatorId\"\n label=\"Creator ID\"\n value={form.creatorId}\n onChange={(v) => setField('creatorId', v)}\n placeholder=\"creator user id\"\n required\n hint=\"Defaults to you. Paste another user's id to credit a different creator.\"\n error={errors.creatorId}\n className=\"mt-4\"\n />\n )}\n\n <TextAreaField\n id=\"brief\"\n label=\"Brief\"\n value={form.brief}\n onChange={(v) => setField('brief', v)}\n placeholder=\"What is this collaboration about…\"\n rows={4}\n className=\"mt-4\"\n disabled={isTerminal}\n />\n\n <div className=\"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <TextField\n id=\"compensation\"\n label=\"Compensation\"\n type=\"number\"\n value={form.compensation}\n onChange={(v) => setField('compensation', v)}\n placeholder=\"0.00\"\n error={errors.compensation}\n disabled={isTerminal || hasQuotedTerms}\n />\n <TextField\n id=\"currency\"\n label=\"Currency\"\n value={form.currency}\n onChange={(v) => setField('currency', v)}\n placeholder=\"USD\"\n disabled={isTerminal || hasQuotedTerms}\n />\n </div>\n\n <div className=\"mt-4 grid grid-cols-1 gap-4 sm:grid-cols-2\">\n <TextField\n id=\"startDate\"\n label=\"Start date\"\n type=\"date\"\n value={form.startDate}\n onChange={(v) => setField('startDate', v)}\n disabled={isTerminal}\n />\n <TextField\n id=\"endDate\"\n label=\"End date\"\n type=\"date\"\n value={form.endDate}\n onChange={(v) => setField('endDate', v)}\n disabled={isTerminal}\n />\n </div>\n\n <TextField\n id=\"tags\"\n label=\"Tags\"\n value={form.tags}\n onChange={(v) => setField('tags', v)}\n placeholder=\"capsule, sustainable\"\n hint=\"Comma-separated\"\n className=\"mt-4\"\n disabled={isTerminal}\n />\n\n {mutation.isError && (\n <p className=\"mt-4 rounded-lg bg-status-error-bg-subtle px-3 py-2 text-sm text-status-error-text\">\n {mutation.error instanceof Error ? mutation.error.message : 'Something went wrong'}\n </p>\n )}\n\n <div className=\"mt-6 flex justify-end gap-2\">\n <button\n type=\"submit\"\n disabled={mutation.isPending || isTerminal}\n className=\"inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-5 py-2 text-sm font-medium text-action-primary-text transition-colors hover:bg-action-primary-bg/90 disabled:opacity-50\"\n >\n {mutation.isPending ? (\n <Loader2 className=\"h-4 w-4 animate-spin\" />\n ) : (\n <Save className=\"h-4 w-4\" />\n )}\n {isEditMode ? 'Save changes' : 'Create collaboration'}\n </button>\n </div>\n </GlassCard>\n </form>\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AA6BA,IAAM,IAA+B;CAAC;CAAW;CAAS;CAAW;AAAc,GAG7E,oBAAoB,IAAI,IAAI;CAAC;CAAa;CAAY;AAAW,CAAC;AAexE,SAAS,EAAM,GAAkC;CAC/C,IAAI,CAAC,GAAM;CACX,IAAM,IAAI,IAAI,KAAK,CAAI;CACvB,OAAO,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAI,KAAA,IAAY,EAAE,YAAY;AAC/D;AAGA,SAAS,EAAY,GAAwC;CAC3D,IAAI,CAAC,GAAK,OAAO;CACjB,IAAM,IAAI,IAAI,KAAK,CAAG;CACtB,OAAO,OAAO,MAAM,EAAE,QAAQ,CAAC,IAAI,KAAK,EAAE,YAAY,CAAC,CAAC,MAAM,GAAG,EAAE;AACrE;AAEA,IAAM,IAAuB;CAC3B,SAAS;CACT,WAAW;CACX,OAAO;CACP,OAAO;CACP,MAAM;CACN,cAAc;CACd,UAAU;CACV,MAAM;CACN,WAAW;CACX,SAAS;AACX;AAEA,SAAgB,IAAwB;CACtC,IAAM,EA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;OACH,OAAM;OACN,OAAO,EAAK;OACZ,WAAW,MAAM,EAAS,YAAY,CAAC;OACvC,aAAY;OACZ,UAAU,KAAc;MACzB,CAAA,CACE;;KAEL,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,GAAD;OACE,IAAG;OACH,OAAM;OACN,MAAK;OACL,OAAO,EAAK;OACZ,WAAW,MAAM,EAAS,aAAa,CAAC;OACxC,UAAU;MACX,CAAA,GACD,kBAAC,GAAD;OACE,IAAG;OACH,OAAM;OACN,MAAK;OACL,OAAO,EAAK;OACZ,WAAW,MAAM,EAAS,WAAW,CAAC;OACtC,UAAU;MACX,CAAA,CACE;;KAEL,kBAAC,GAAD;MACE,IAAG;MACH,OAAM;MACN,OAAO,EAAK;MACZ,WAAW,MAAM,EAAS,QAAQ,CAAC;MACnC,aAAY;MACZ,MAAK;MACL,WAAU;MACV,UAAU;KACX,CAAA;KAEA,EAAS,WACR,kBAAC,KAAD;MAAG,WAAU;gBACV,EAAS,iBAAiB,QAAQ,EAAS,MAAM,UAAU;KAC3D,CAAA;KAGL,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,UAAD;OACE,MAAK;OACL,UAAU,EAAS,aAAa;OAChC,WAAU;iBAHZ,CAKG,EAAS,YACR,kBAAC,GAAD,EAAS,WAAU,uBAAwB,CAAA,IAE3C,kBAAC,GAAD,EAAM,WAAU,UAAW,CAAA,GAE5B,IAAa,iBAAiB,sBACzB;;KACL,CAAA;IACI;;EACP,CAAA;CACI,CAAA;AAEhB"}
@@ -1 +1 @@
1
- {"version":3,"file":"CollaborationsListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6BH,wBAAgB,sBAAsB,gCAgIrC"}
1
+ {"version":3,"file":"CollaborationsListPage.d.ts","sourceRoot":"","sources":["../../../../src/coolandlovely/pages/collaborations/CollaborationsListPage.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6BH,wBAAgB,sBAAsB,gCAuIrC"}