@burdenoff/microfe-timecampus 2026.1203.1 → 2026.1204.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/timecampus/components/EmptyState.d.ts +7 -0
  2. package/dist/timecampus/components/EmptyState.js +3 -2
  3. package/dist/timecampus/components/EmptyState.js.map +1 -1
  4. package/dist/timecampus/components/FilterBar.js +1 -0
  5. package/dist/timecampus/components/Toast.js +1 -1
  6. package/dist/timecampus/components/Toast.js.map +1 -1
  7. package/dist/timecampus/components/charts/Heatmap.js +1 -1
  8. package/dist/timecampus/components/charts/Heatmap.js.map +1 -1
  9. package/dist/timecampus/components/maps/LocationGeofenceMap.js +3 -3
  10. package/dist/timecampus/components/maps/LocationGeofenceMap.js.map +1 -1
  11. package/dist/timecampus/pages/HomePage.js +1 -1
  12. package/dist/timecampus/pages/HomePage.js.map +1 -1
  13. package/dist/timecampus/pages/admin/AdminPage.js +283 -283
  14. package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
  15. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +79 -79
  16. package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
  17. package/dist/timecampus/pages/channels/ChannelsPage.js +8 -8
  18. package/dist/timecampus/pages/channels/ChannelsPage.js.map +1 -1
  19. package/dist/timecampus/pages/client-portal/ClientPortalPage.js +2 -2
  20. package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
  21. package/dist/timecampus/pages/dashboard/ServerReportExports.js +34 -34
  22. package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
  23. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +49 -48
  24. package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
  25. package/dist/timecampus/pages/extend/AppletDeveloperPage.js +122 -117
  26. package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
  27. package/dist/timecampus/pages/extend/AppletReviewPage.js +2 -2
  28. package/dist/timecampus/pages/extend/AppletReviewPage.js.map +1 -1
  29. package/dist/timecampus/pages/extend/AppletStorePage.js +2 -2
  30. package/dist/timecampus/pages/extend/AppletStorePage.js.map +1 -1
  31. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js +131 -126
  32. package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js.map +1 -1
  33. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +94 -94
  34. package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
  35. package/dist/timecampus/pages/extend/TimeTriggersPage.js +98 -98
  36. package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
  37. package/dist/timecampus/pages/focus/FocusProtectionPage.js +121 -121
  38. package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
  39. package/dist/timecampus/pages/geofencing/GeofencingPage.js +348 -348
  40. package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
  41. package/dist/timecampus/pages/lifetime/LifeBalancePage.js +3 -3
  42. package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
  43. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +25 -25
  44. package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
  45. package/dist/timecampus/pages/lifetime/RecommendationsPage.js +297 -297
  46. package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
  47. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +189 -189
  48. package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
  49. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +2 -2
  50. package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
  51. package/dist/timecampus/pages/meetings/ActionItemFormModal.js +47 -46
  52. package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
  53. package/dist/timecampus/pages/meetings/MeetingDetailPage.js +207 -207
  54. package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
  55. package/dist/timecampus/pages/meetings/MeetingFormModal.js +73 -72
  56. package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
  57. package/dist/timecampus/pages/meetings/MeetingsPage.js +1 -1
  58. package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
  59. package/dist/timecampus/pages/meetings/ParticipantFormModal.js +32 -31
  60. package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
  61. package/dist/timecampus/pages/mobile/MobileScreen.js +1 -1
  62. package/dist/timecampus/pages/mobile/MobileScreen.js.map +1 -1
  63. package/dist/timecampus/pages/mobile/MobileTimelinePage.js +8 -8
  64. package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -1
  65. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js +1 -1
  66. package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js.map +1 -1
  67. package/dist/timecampus/pages/pomodoro/PomodoroPage.js +34 -34
  68. package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
  69. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js +3 -3
  70. package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js.map +1 -1
  71. package/dist/timecampus/pages/projects/ProjectDetailPage.js +163 -163
  72. package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
  73. package/dist/timecampus/pages/projects/ProjectsPage.js +193 -192
  74. package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
  75. package/dist/timecampus/pages/projects/TasksPage.js +92 -92
  76. package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
  77. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +66 -66
  78. package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
  79. package/dist/timecampus/pages/settings/IdleDetectionCard.js +33 -33
  80. package/dist/timecampus/pages/settings/IdleDetectionCard.js.map +1 -1
  81. package/dist/timecampus/pages/settings/PrivacySettingsPage.js +32 -32
  82. package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -1
  83. package/dist/timecampus/pages/settings/SettingsPage.js +3 -3
  84. package/dist/timecampus/pages/settings/SettingsPage.js.map +1 -1
  85. package/dist/timecampus/pages/team/TeamMembersPage.js +1 -1
  86. package/dist/timecampus/pages/team/TeamMembersPage.js.map +1 -1
  87. package/dist/timecampus/pages/time/TimeEntriesPage.js +169 -169
  88. package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
  89. package/dist/timecampus/pages/time/TimeTrackingPage.js +32 -32
  90. package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
  91. package/dist/timecampus/pages/time/TimerPage.js +85 -85
  92. package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
  93. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +1 -1
  94. package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
  95. package/dist/timecampus/pages/timeline/TimelinePage.js +227 -227
  96. package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
  97. package/dist/timecampus/shared/hooks/useConfirmedAction.d.ts +10 -0
  98. package/dist/timecampus/shared/hooks/useConfirmedAction.js +14 -0
  99. package/dist/timecampus/shared/hooks/useConfirmedAction.js.map +1 -0
  100. package/package.json +6 -4
@@ -10,13 +10,14 @@ import { useListMarketplaceCertificationQueueQuery as l, useListMarketplaceCerti
10
10
  import { TimeCampusAppletReviewDecision as m, TimeCampusMarketplaceSubmissionStatus as h } from "../../../generated/wspace-types.js";
11
11
  import { scopeLabel as g } from "./appletBridge.js";
12
12
  import { appletStatus as _, developerSharePercent as v, errorText as y, formatAppletPrice as b, formatUsd as x, manifestEntryPoint as S, manifestText as C, manifestWidgets as w, widgetUrl as T } from "./appletPublishingHelpers.js";
13
- import { useState as E } from "react";
14
- import { Ban as D, Check as O, RotateCcw as k, X as A } from "lucide-react";
15
- import { Fragment as j, jsx as M, jsxs as N } from "react/jsx-runtime";
16
- import { GlassCard as P } from "@burdenoff/fe-libs/ui";
17
- import { useSafePermissions as F } from "@burdenoff/fe-libs/shared/providers/shell";
13
+ import { useConfirmedAction as E } from "../../shared/hooks/useConfirmedAction.js";
14
+ import { useState as D } from "react";
15
+ import { Ban as O, Check as k, RotateCcw as A, X as j } from "lucide-react";
16
+ import { Fragment as M, jsx as N, jsxs as P } from "react/jsx-runtime";
17
+ import { GlassCard as F } from "@burdenoff/fe-libs/ui";
18
+ import { useSafePermissions as I } from "@burdenoff/fe-libs/shared/providers/shell";
18
19
  // src/timecampus/pages/extend/MarketplaceCertificationPage.tsx
19
- var I = [
20
+ var L = [
20
21
  {
21
22
  key: "IN_REVIEW",
22
23
  label: "In review"
@@ -29,39 +30,39 @@ var I = [
29
30
  key: "REJECTED",
30
31
  label: "Rejected"
31
32
  }
32
- ], L = [
33
+ ], R = [
33
34
  "ListMarketplaceCertificationQueue",
34
35
  "ListMarketplaceCertifiedListings",
35
36
  "ListMarketplaceApplets"
36
- ], R = "inline-flex items-center justify-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", z = "inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-surface-hover disabled:opacity-50";
37
- function B({ item: e, busy: n, onCertify: r, onReject: i, onSuspend: a, onReinstate: o }) {
37
+ ], z = "inline-flex items-center justify-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-1.5 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 disabled:opacity-50", B = "inline-flex items-center justify-center gap-1.5 rounded-md border border-border-subtle bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary hover:bg-bg-surface-hover disabled:opacity-50";
38
+ function V({ item: e, busy: n, onCertify: r, onReject: i, onSuspend: a, onReinstate: o }) {
38
39
  let { listing: c, submission: l } = e, u = _(l.status === "CERTIFIED" ? c.status : l.status), d = S(l.manifest), f = w(l.manifest);
39
- return /* @__PURE__ */ N(P, {
40
+ return /* @__PURE__ */ P(F, {
40
41
  treatment: "glass",
41
42
  className: "flex flex-col gap-3 p-5",
42
43
  "data-testid": `certification-item-${c.key}-${l.version}`,
43
44
  children: [
44
- /* @__PURE__ */ N("div", {
45
+ /* @__PURE__ */ P("div", {
45
46
  className: "flex flex-wrap items-start justify-between gap-2",
46
- children: [/* @__PURE__ */ N("div", {
47
+ children: [/* @__PURE__ */ P("div", {
47
48
  className: "min-w-0",
48
- children: [/* @__PURE__ */ N("h3", {
49
+ children: [/* @__PURE__ */ P("h3", {
49
50
  className: "text-base font-semibold text-text-primary",
50
51
  children: [
51
52
  c.name,
52
53
  " ",
53
- /* @__PURE__ */ N("span", {
54
+ /* @__PURE__ */ P("span", {
54
55
  className: "text-sm font-normal text-text-tertiary",
55
56
  children: ["v", l.version]
56
57
  })
57
58
  ]
58
- }), /* @__PURE__ */ N("p", {
59
+ }), /* @__PURE__ */ P("p", {
59
60
  className: "break-all text-xs text-text-tertiary",
60
61
  children: [
61
- /* @__PURE__ */ M("code", { children: c.key }),
62
+ /* @__PURE__ */ N("code", { children: c.key }),
62
63
  c.developerName ? ` · by ${c.developerName}` : "",
63
64
  " · workspace ",
64
- /* @__PURE__ */ M("code", { children: c.sourceWorkspaceId }),
65
+ /* @__PURE__ */ N("code", { children: c.sourceWorkspaceId }),
65
66
  " ·",
66
67
  " ",
67
68
  b(c.pricingModel, c.priceUsd),
@@ -71,46 +72,46 @@ function B({ item: e, busy: n, onCertify: r, onReject: i, onSuspend: a, onReinst
71
72
  s(l.submittedAt)
72
73
  ]
73
74
  })]
74
- }), /* @__PURE__ */ M(t, {
75
+ }), /* @__PURE__ */ N(t, {
75
76
  label: u.label,
76
77
  variant: u.variant,
77
78
  dot: !0
78
79
  })]
79
80
  }),
80
- /* @__PURE__ */ M("p", {
81
+ /* @__PURE__ */ N("p", {
81
82
  className: "text-sm text-text-secondary",
82
83
  children: c.description
83
84
  }),
84
- /* @__PURE__ */ N("div", {
85
+ /* @__PURE__ */ P("div", {
85
86
  className: "grid grid-cols-1 gap-3 text-sm md:grid-cols-2",
86
- children: [/* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
87
+ children: [/* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
87
88
  className: "mb-1 font-medium text-text-primary",
88
89
  children: "Data it reads"
89
- }), l.requestedScopes.length === 0 ? /* @__PURE__ */ M("p", {
90
+ }), l.requestedScopes.length === 0 ? /* @__PURE__ */ N("p", {
90
91
  className: "text-text-secondary",
91
92
  children: "No TimeCampus data."
92
- }) : /* @__PURE__ */ M("ul", {
93
- className: "list-disc pl-5 text-text-secondary",
94
- children: l.requestedScopes.map((e) => /* @__PURE__ */ N("li", { children: [
93
+ }) : /* @__PURE__ */ N("ul", {
94
+ className: "list-disc ps-5 text-text-secondary",
95
+ children: l.requestedScopes.map((e) => /* @__PURE__ */ P("li", { children: [
95
96
  g(e),
96
97
  " ",
97
- /* @__PURE__ */ M("code", {
98
+ /* @__PURE__ */ N("code", {
98
99
  className: "text-xs",
99
100
  children: e
100
101
  })
101
102
  ] }, e))
102
- })] }), /* @__PURE__ */ N("div", { children: [/* @__PURE__ */ M("p", {
103
+ })] }), /* @__PURE__ */ P("div", { children: [/* @__PURE__ */ N("p", {
103
104
  className: "mb-1 font-medium text-text-primary",
104
105
  children: "Widgets"
105
- }), /* @__PURE__ */ M("ul", {
106
- className: "list-disc pl-5 text-text-secondary",
107
- children: f.map((e) => /* @__PURE__ */ N("li", {
106
+ }), /* @__PURE__ */ N("ul", {
107
+ className: "list-disc ps-5 text-text-secondary",
108
+ children: f.map((e) => /* @__PURE__ */ P("li", {
108
109
  className: "break-all",
109
110
  children: [
110
111
  e.name,
111
112
  " —",
112
113
  " ",
113
- /* @__PURE__ */ M("code", {
114
+ /* @__PURE__ */ N("code", {
114
115
  className: "text-xs",
115
116
  children: T(e.path, d)
116
117
  })
@@ -118,66 +119,66 @@ function B({ item: e, busy: n, onCertify: r, onReject: i, onSuspend: a, onReinst
118
119
  }, e.key))
119
120
  })] })]
120
121
  }),
121
- l.reviewNotes && /* @__PURE__ */ N("p", {
122
+ l.reviewNotes && /* @__PURE__ */ P("p", {
122
123
  className: "text-xs text-text-secondary",
123
124
  children: ["Review notes: ", l.reviewNotes]
124
125
  }),
125
- c.suspendedReason && /* @__PURE__ */ N("p", {
126
+ c.suspendedReason && /* @__PURE__ */ P("p", {
126
127
  className: "text-xs text-status-warning-text",
127
128
  children: ["Suspended: ", c.suspendedReason]
128
129
  }),
129
- /* @__PURE__ */ N("details", {
130
+ /* @__PURE__ */ P("details", {
130
131
  className: "text-xs text-text-secondary",
131
- children: [/* @__PURE__ */ M("summary", {
132
+ children: [/* @__PURE__ */ N("summary", {
132
133
  className: "cursor-pointer",
133
134
  children: "Full manifest"
134
- }), /* @__PURE__ */ M("pre", {
135
+ }), /* @__PURE__ */ N("pre", {
135
136
  className: "mt-2 max-h-72 overflow-auto rounded-md bg-bg-sunken p-3 text-text-primary",
136
137
  children: C(l.manifest)
137
138
  })]
138
139
  }),
139
- /* @__PURE__ */ N("div", {
140
+ /* @__PURE__ */ P("div", {
140
141
  className: "flex flex-wrap gap-2",
141
142
  children: [
142
- l.status === "IN_REVIEW" && /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ N("button", {
143
+ l.status === "IN_REVIEW" && /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ P("button", {
143
144
  type: "button",
144
- className: R,
145
+ className: z,
145
146
  disabled: n,
146
147
  onClick: r,
147
148
  "aria-label": `Certify ${c.name} v${l.version}`,
148
- children: [/* @__PURE__ */ M(O, {
149
+ children: [/* @__PURE__ */ N(k, {
149
150
  className: "h-4 w-4",
150
151
  "aria-hidden": "true"
151
152
  }), "Certify"]
152
- }), /* @__PURE__ */ N("button", {
153
+ }), /* @__PURE__ */ P("button", {
153
154
  type: "button",
154
- className: z,
155
+ className: B,
155
156
  disabled: n,
156
157
  onClick: i,
157
158
  "aria-label": `Reject ${c.name} v${l.version}`,
158
- children: [/* @__PURE__ */ M(A, {
159
+ children: [/* @__PURE__ */ N(j, {
159
160
  className: "h-4 w-4",
160
161
  "aria-hidden": "true"
161
162
  }), "Reject"]
162
163
  })] }),
163
- l.status === "CERTIFIED" && (c.status === "PUBLISHED" || c.status === "UNLISTED") && /* @__PURE__ */ N("button", {
164
+ l.status === "CERTIFIED" && (c.status === "PUBLISHED" || c.status === "UNLISTED") && /* @__PURE__ */ P("button", {
164
165
  type: "button",
165
- className: z,
166
+ className: B,
166
167
  disabled: n,
167
168
  onClick: a,
168
169
  "aria-label": `Takedown ${c.name} in every workspace`,
169
- children: [/* @__PURE__ */ M(D, {
170
+ children: [/* @__PURE__ */ N(O, {
170
171
  className: "h-4 w-4",
171
172
  "aria-hidden": "true"
172
173
  }), "Suspend / Takedown"]
173
174
  }),
174
- l.status === "CERTIFIED" && c.status === "SUSPENDED" && /* @__PURE__ */ N("button", {
175
+ l.status === "CERTIFIED" && c.status === "SUSPENDED" && /* @__PURE__ */ P("button", {
175
176
  type: "button",
176
- className: z,
177
+ className: B,
177
178
  disabled: n,
178
179
  onClick: o,
179
180
  "aria-label": `Reinstate ${c.name}`,
180
- children: [/* @__PURE__ */ M(k, {
181
+ children: [/* @__PURE__ */ N(A, {
181
182
  className: "h-4 w-4",
182
183
  "aria-hidden": "true"
183
184
  }), "Reinstate"]
@@ -187,177 +188,181 @@ function B({ item: e, busy: n, onCertify: r, onReject: i, onSuspend: a, onReinst
187
188
  ]
188
189
  });
189
190
  }
190
- function V() {
191
- let { workspaceId: t = "" } = c(), s = F()?.isSuperAdmin ?? !1, { toasts: g, addToast: _, dismissToast: v } = o(), [b, S] = E("IN_REVIEW"), [C, w] = E(null), [T, D] = E(""), [O, k] = E(!1), [A, P] = E(null), V = !t || !s, H = l({
192
- variables: { status: b === "REJECTED" ? h.Rejected : h.InReview },
193
- skip: V || b === "LIVE",
191
+ function H() {
192
+ let t = E(), { workspaceId: s = "" } = c(), g = I()?.isSuperAdmin ?? !1, { toasts: _, addToast: v, dismissToast: b } = o(), [S, C] = D("IN_REVIEW"), [w, T] = D(null), [O, k] = D(""), [A, j] = D(!1), [F, H] = D(null), U = !s || !g, W = l({
193
+ variables: { status: S === "REJECTED" ? h.Rejected : h.InReview },
194
+ skip: U || S === "LIVE",
194
195
  fetchPolicy: "cache-and-network"
195
- }), U = u({
196
- skip: V || b !== "LIVE",
196
+ }), G = u({
197
+ skip: U || S !== "LIVE",
197
198
  fetchPolicy: "cache-and-network"
198
- }), [W] = f({ refetchQueries: L }), [G] = p({ refetchQueries: L }), [K] = d({ refetchQueries: L }), q = b === "LIVE" ? U : H, J = b === "LIVE" ? (U.data?.timeCampusMarketplaceCertifiedListings ?? []).flatMap((e) => e.liveSubmission ? [{
199
+ }), [K] = f({ refetchQueries: R }), [q] = p({ refetchQueries: R }), [J] = d({ refetchQueries: R }), Y = S === "LIVE" ? G : W, X = S === "LIVE" ? (G.data?.timeCampusMarketplaceCertifiedListings ?? []).flatMap((e) => e.liveSubmission ? [{
199
200
  listing: e,
200
201
  submission: e.liveSubmission
201
- }] : []) : H.data?.timeCampusMarketplaceCertificationQueue ?? [], Y = async (e, t, n) => {
202
- P(e);
202
+ }] : []) : W.data?.timeCampusMarketplaceCertificationQueue ?? [], Z = async (e, t, n) => {
203
+ H(e);
203
204
  try {
204
- return await t(), _({
205
+ return await t(), v({
205
206
  title: n,
206
207
  variant: "success"
207
208
  }), !0;
208
209
  } catch (e) {
209
- return _({
210
+ return v({
210
211
  title: y(e),
211
212
  variant: "error"
212
213
  }), !1;
213
214
  } finally {
214
- P(null);
215
+ H(null);
215
216
  }
216
- }, X = (e) => {
217
- D(""), k(!1), w(e);
217
+ }, Q = (e) => {
218
+ k(""), j(!1), T(e);
218
219
  };
219
- return /* @__PURE__ */ N(e, {
220
+ return /* @__PURE__ */ P(e, {
220
221
  title: "Marketplace Certification",
221
222
  description: "Certify third-party applets for every TimeCampus workspace",
222
223
  purpose: "Developers offer applets that passed review in their own workspace. Check the data each submission reads and where its widgets load from, then certify it for the public marketplace or reject it with notes. Suspending a live applet stops its widgets in every workspace until you reinstate it.",
223
224
  children: [
224
- /* @__PURE__ */ M(a, {
225
- toasts: g,
226
- onDismiss: v
225
+ /* @__PURE__ */ N(a, {
226
+ toasts: _,
227
+ onDismiss: b
227
228
  }),
228
- s ? t ? /* @__PURE__ */ N(j, { children: [/* @__PURE__ */ M("div", {
229
+ g ? s ? /* @__PURE__ */ P(M, { children: [/* @__PURE__ */ N("div", {
229
230
  className: "mb-4 inline-flex w-fit items-center rounded-lg border border-border-subtle bg-bg-sunken/50 p-0.5",
230
231
  role: "tablist",
231
232
  "aria-label": "Certification state",
232
- children: I.map(({ key: e, label: t }) => {
233
- let n = b === e;
234
- return /* @__PURE__ */ M("button", {
233
+ children: L.map(({ key: e, label: t }) => {
234
+ let n = S === e;
235
+ return /* @__PURE__ */ N("button", {
235
236
  type: "button",
236
237
  role: "tab",
237
238
  "aria-selected": n,
238
- onClick: () => S(e),
239
+ onClick: () => C(e),
239
240
  className: n ? "rounded-md bg-bg-surface px-3 py-1.5 text-sm font-medium text-text-primary shadow-sm" : "rounded-md px-3 py-1.5 text-sm font-medium text-text-secondary transition-colors hover:text-text-primary",
240
241
  children: t
241
242
  }, e);
242
243
  })
243
- }), q.loading && !q.data ? /* @__PURE__ */ M(n, {
244
+ }), Y.loading && !Y.data ? /* @__PURE__ */ N(n, {
244
245
  variant: "card",
245
246
  count: 2
246
- }) : q.error ? /* @__PURE__ */ M(r, {
247
+ }) : Y.error ? /* @__PURE__ */ N(r, {
247
248
  title: "Couldn't load marketplace certification",
248
- description: y(q.error),
249
+ description: y(Y.error),
249
250
  illustration: "error-state"
250
- }) : J.length === 0 ? /* @__PURE__ */ M(r, {
251
- title: b === "IN_REVIEW" ? "Nothing waiting for certification" : b === "LIVE" ? "No applets are live in the marketplace" : "No rejected submissions",
251
+ }) : X.length === 0 ? /* @__PURE__ */ N(r, {
252
+ title: S === "IN_REVIEW" ? "Nothing waiting for certification" : S === "LIVE" ? "No applets are live in the marketplace" : "No rejected submissions",
252
253
  description: "Applets developers offer to every workspace appear here.",
253
254
  illustration: "empty-generic"
254
- }) : /* @__PURE__ */ M("div", {
255
+ }) : /* @__PURE__ */ N("div", {
255
256
  className: "flex flex-col gap-4",
256
- children: J.map((e) => /* @__PURE__ */ M(B, {
257
+ children: X.map((e) => /* @__PURE__ */ N(V, {
257
258
  item: e,
258
- busy: A === e.listing.id,
259
+ busy: F === e.listing.id,
259
260
  onCertify: () => {
260
- window.confirm(`Certify ${e.listing.name} v${e.submission.version} for every TimeCampus workspace?`) && Y(e.listing.id, () => W({ variables: {
261
- submissionId: e.submission.id,
262
- decision: m.Approve
263
- } }), `${e.listing.name} v${e.submission.version} certified`);
261
+ t(`Certify ${e.listing.name} v${e.submission.version} for every TimeCampus workspace?`, () => {
262
+ Z(e.listing.id, () => K({ variables: {
263
+ submissionId: e.submission.id,
264
+ decision: m.Approve
265
+ } }), `${e.listing.name} v${e.submission.version} certified`);
266
+ });
264
267
  },
265
- onReject: () => X({
268
+ onReject: () => Q({
266
269
  kind: "reject",
267
270
  item: e
268
271
  }),
269
- onSuspend: () => X({
272
+ onSuspend: () => Q({
270
273
  kind: "suspend",
271
274
  item: e
272
275
  }),
273
276
  onReinstate: () => {
274
- window.confirm(`Reinstate ${e.listing.name} in every TimeCampus workspace?`) && Y(e.listing.id, () => K({ variables: { id: e.listing.id } }), `${e.listing.name} reinstated`);
277
+ t(`Reinstate ${e.listing.name} in every TimeCampus workspace?`, () => {
278
+ Z(e.listing.id, () => J({ variables: { id: e.listing.id } }), `${e.listing.name} reinstated`);
279
+ });
275
280
  }
276
281
  }, e.submission.id))
277
- })] }) : /* @__PURE__ */ M(r, {
282
+ })] }) : /* @__PURE__ */ N(r, {
278
283
  title: "Select a workspace",
279
284
  description: "Certification requests go through the workspace gateway, which needs a workspace context. Pick any workspace in the context switcher; the queue and live listings are the same for every workspace.",
280
285
  illustration: "empty-generic"
281
- }) : /* @__PURE__ */ M(r, {
286
+ }) : /* @__PURE__ */ N(r, {
282
287
  title: "Platform reviewers only",
283
288
  description: "Marketplace certification is done by the TimeCampus platform team. Workspace reviewers certify workspace applets on the Applet Review page.",
284
289
  illustration: "empty-generic"
285
290
  }),
286
- C && /* @__PURE__ */ M(i, {
291
+ w && /* @__PURE__ */ N(i, {
287
292
  open: !0,
288
- onClose: () => w(null),
289
- title: C.kind === "reject" ? `Reject ${C.item.listing.name} v${C.item.submission.version}` : `Takedown ${C.item.listing.name}`,
290
- description: C.kind === "reject" ? "Tell the developer what to change. They can publish a fixed version in their workspace and offer it again." : "Uninstalls the applet from every workspace with admin notice, revokes licenses, and refunds eligible paid purchases (ONE_TIME <= 90 days full; subscriptions pro-rata).",
291
- footer: /* @__PURE__ */ N("div", {
293
+ onClose: () => T(null),
294
+ title: w.kind === "reject" ? `Reject ${w.item.listing.name} v${w.item.submission.version}` : `Takedown ${w.item.listing.name}`,
295
+ description: w.kind === "reject" ? "Tell the developer what to change. They can publish a fixed version in their workspace and offer it again." : "Uninstalls the applet from every workspace with admin notice, revokes licenses, and refunds eligible paid purchases (ONE_TIME <= 90 days full; subscriptions pro-rata).",
296
+ footer: /* @__PURE__ */ P("div", {
292
297
  className: "flex justify-end gap-2",
293
- children: [/* @__PURE__ */ M("button", {
298
+ children: [/* @__PURE__ */ N("button", {
294
299
  type: "button",
295
- className: z,
296
- onClick: () => w(null),
300
+ className: B,
301
+ onClick: () => T(null),
297
302
  children: "Cancel"
298
- }), /* @__PURE__ */ M("button", {
303
+ }), /* @__PURE__ */ N("button", {
299
304
  type: "button",
300
- className: R,
301
- disabled: A === C.item.listing.id || !T.trim(),
305
+ className: z,
306
+ disabled: F === w.item.listing.id || !O.trim(),
302
307
  onClick: async () => {
303
- if (!C || !T.trim()) return;
304
- let { item: e } = C;
305
- if (C.kind === "reject") await Y(e.listing.id, () => W({ variables: {
308
+ if (!w || !O.trim()) return;
309
+ let { item: e } = w;
310
+ if (w.kind === "reject") await Z(e.listing.id, () => K({ variables: {
306
311
  submissionId: e.submission.id,
307
312
  decision: m.Reject,
308
- notes: T.trim()
309
- } }), `${e.listing.name} v${e.submission.version} rejected`) && (w(null), D(""));
313
+ notes: O.trim()
314
+ } }), `${e.listing.name} v${e.submission.version} rejected`) && (T(null), k(""));
310
315
  else {
311
- P(e.listing.id);
316
+ H(e.listing.id);
312
317
  try {
313
- let t = (await G({ variables: {
318
+ let t = (await q({ variables: {
314
319
  id: e.listing.id,
315
- reason: T.trim(),
316
- permanent: O
320
+ reason: O.trim(),
321
+ permanent: A
317
322
  } })).data?.takedownTimeCampusMarketplaceListing;
318
- _({
319
- title: O ? `${e.listing.name} permanently revoked` : `${e.listing.name} suspended in every workspace`,
323
+ v({
324
+ title: A ? `${e.listing.name} permanently revoked` : `${e.listing.name} suspended in every workspace`,
320
325
  description: t ? `Uninstalled from ${t.uninstalledWorkspaceCount} workspace(s), refunded ${t.refundedPurchaseCount} purchase(s) (${x(t.totalRefundedAmount)}), notified ${t.notifiedAdminCount} admin(s).` : void 0,
321
326
  variant: "success"
322
- }), w(null), D("");
327
+ }), T(null), k("");
323
328
  } catch (e) {
324
- _({
329
+ v({
325
330
  title: y(e),
326
331
  variant: "error"
327
332
  });
328
333
  } finally {
329
- P(null);
334
+ H(null);
330
335
  }
331
336
  }
332
337
  },
333
- children: C.kind === "reject" ? "Reject" : O ? "Permanently revoke" : "Suspend & refund"
338
+ children: w.kind === "reject" ? "Reject" : A ? "Permanently revoke" : "Suspend & refund"
334
339
  })]
335
340
  }),
336
- children: /* @__PURE__ */ N("div", {
341
+ children: /* @__PURE__ */ P("div", {
337
342
  className: "flex flex-col gap-3",
338
- children: [/* @__PURE__ */ N("label", {
343
+ children: [/* @__PURE__ */ P("label", {
339
344
  className: "flex flex-col gap-1 text-sm text-text-secondary",
340
- children: [C.kind === "reject" ? "Review notes" : "Takedown reason", /* @__PURE__ */ M("textarea", {
341
- value: T,
342
- onChange: (e) => D(e.target.value),
345
+ children: [w.kind === "reject" ? "Review notes" : "Takedown reason", /* @__PURE__ */ N("textarea", {
346
+ value: O,
347
+ onChange: (e) => k(e.target.value),
343
348
  rows: 4,
344
349
  maxLength: 1e3,
345
350
  className: "w-full rounded-md border border-border-subtle bg-bg-surface p-2 text-sm text-text-primary"
346
351
  })]
347
- }), C.kind === "suspend" && /* @__PURE__ */ N("label", {
352
+ }), w.kind === "suspend" && /* @__PURE__ */ P("label", {
348
353
  className: "flex items-start gap-2 text-xs text-text-secondary",
349
- children: [/* @__PURE__ */ M("input", {
354
+ children: [/* @__PURE__ */ N("input", {
350
355
  type: "checkbox",
351
- checked: O,
352
- onChange: (e) => k(e.target.checked),
356
+ checked: A,
357
+ onChange: (e) => j(e.target.checked),
353
358
  className: "mt-0.5"
354
- }), /* @__PURE__ */ M("span", { children: "Permanent revocation (cannot be reinstated later; leave unchecked to allow reinstatement after review)." })]
359
+ }), /* @__PURE__ */ N("span", { children: "Permanent revocation (cannot be reinstated later; leave unchecked to allow reinstatement after review)." })]
355
360
  })]
356
361
  })
357
362
  })
358
363
  ]
359
364
  });
360
365
  }
361
- export { V as MarketplaceCertificationPage };
366
+ export { H as MarketplaceCertificationPage };
362
367
 
363
368
  //# sourceMappingURL=MarketplaceCertificationPage.js.map