@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.
- package/dist/timecampus/components/EmptyState.d.ts +7 -0
- package/dist/timecampus/components/EmptyState.js +3 -2
- package/dist/timecampus/components/EmptyState.js.map +1 -1
- package/dist/timecampus/components/FilterBar.js +1 -0
- package/dist/timecampus/components/Toast.js +1 -1
- package/dist/timecampus/components/Toast.js.map +1 -1
- package/dist/timecampus/components/charts/Heatmap.js +1 -1
- package/dist/timecampus/components/charts/Heatmap.js.map +1 -1
- package/dist/timecampus/components/maps/LocationGeofenceMap.js +3 -3
- package/dist/timecampus/components/maps/LocationGeofenceMap.js.map +1 -1
- package/dist/timecampus/pages/HomePage.js +1 -1
- package/dist/timecampus/pages/HomePage.js.map +1 -1
- package/dist/timecampus/pages/admin/AdminPage.js +283 -283
- package/dist/timecampus/pages/admin/AdminPage.js.map +1 -1
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js +79 -79
- package/dist/timecampus/pages/application-usage/ApplicationUsagePage.js.map +1 -1
- package/dist/timecampus/pages/channels/ChannelsPage.js +8 -8
- package/dist/timecampus/pages/channels/ChannelsPage.js.map +1 -1
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js +2 -2
- package/dist/timecampus/pages/client-portal/ClientPortalPage.js.map +1 -1
- package/dist/timecampus/pages/dashboard/ServerReportExports.js +34 -34
- package/dist/timecampus/pages/dashboard/ServerReportExports.js.map +1 -1
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js +49 -48
- package/dist/timecampus/pages/expense-tracking/ExpenseTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/extend/AppletDeveloperPage.js +122 -117
- package/dist/timecampus/pages/extend/AppletDeveloperPage.js.map +1 -1
- package/dist/timecampus/pages/extend/AppletReviewPage.js +2 -2
- package/dist/timecampus/pages/extend/AppletReviewPage.js.map +1 -1
- package/dist/timecampus/pages/extend/AppletStorePage.js +2 -2
- package/dist/timecampus/pages/extend/AppletStorePage.js.map +1 -1
- package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js +131 -126
- package/dist/timecampus/pages/extend/MarketplaceCertificationPage.js.map +1 -1
- package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js +94 -94
- package/dist/timecampus/pages/extend/ThirdPartyAppletsSection.js.map +1 -1
- package/dist/timecampus/pages/extend/TimeTriggersPage.js +98 -98
- package/dist/timecampus/pages/extend/TimeTriggersPage.js.map +1 -1
- package/dist/timecampus/pages/focus/FocusProtectionPage.js +121 -121
- package/dist/timecampus/pages/focus/FocusProtectionPage.js.map +1 -1
- package/dist/timecampus/pages/geofencing/GeofencingPage.js +348 -348
- package/dist/timecampus/pages/geofencing/GeofencingPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeBalancePage.js +3 -3
- package/dist/timecampus/pages/lifetime/LifeBalancePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js +25 -25
- package/dist/timecampus/pages/lifetime/LifeTimelinePage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/RecommendationsPage.js +297 -297
- package/dist/timecampus/pages/lifetime/RecommendationsPage.js.map +1 -1
- package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js +189 -189
- package/dist/timecampus/pages/lifetime/ValuesGoalsPage.js.map +1 -1
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js +2 -2
- package/dist/timecampus/pages/location-tracking/LocationTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js +47 -46
- package/dist/timecampus/pages/meetings/ActionItemFormModal.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js +207 -207
- package/dist/timecampus/pages/meetings/MeetingDetailPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingFormModal.js +73 -72
- package/dist/timecampus/pages/meetings/MeetingFormModal.js.map +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.js +1 -1
- package/dist/timecampus/pages/meetings/MeetingsPage.js.map +1 -1
- package/dist/timecampus/pages/meetings/ParticipantFormModal.js +32 -31
- package/dist/timecampus/pages/meetings/ParticipantFormModal.js.map +1 -1
- package/dist/timecampus/pages/mobile/MobileScreen.js +1 -1
- package/dist/timecampus/pages/mobile/MobileScreen.js.map +1 -1
- package/dist/timecampus/pages/mobile/MobileTimelinePage.js +8 -8
- package/dist/timecampus/pages/mobile/MobileTimelinePage.js.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroAnalyticsPage.js.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js +34 -34
- package/dist/timecampus/pages/pomodoro/PomodoroPage.js.map +1 -1
- package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js +3 -3
- package/dist/timecampus/pages/pomodoro/PomodoroSettingsPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectDetailPage.js +163 -163
- package/dist/timecampus/pages/projects/ProjectDetailPage.js.map +1 -1
- package/dist/timecampus/pages/projects/ProjectsPage.js +193 -192
- package/dist/timecampus/pages/projects/ProjectsPage.js.map +1 -1
- package/dist/timecampus/pages/projects/TasksPage.js +92 -92
- package/dist/timecampus/pages/projects/TasksPage.js.map +1 -1
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js +66 -66
- package/dist/timecampus/pages/resource-planning/ResourcePlanningPage.js.map +1 -1
- package/dist/timecampus/pages/settings/IdleDetectionCard.js +33 -33
- package/dist/timecampus/pages/settings/IdleDetectionCard.js.map +1 -1
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js +32 -32
- package/dist/timecampus/pages/settings/PrivacySettingsPage.js.map +1 -1
- package/dist/timecampus/pages/settings/SettingsPage.js +3 -3
- package/dist/timecampus/pages/settings/SettingsPage.js.map +1 -1
- package/dist/timecampus/pages/team/TeamMembersPage.js +1 -1
- package/dist/timecampus/pages/team/TeamMembersPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeEntriesPage.js +169 -169
- package/dist/timecampus/pages/time/TimeEntriesPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimeTrackingPage.js +32 -32
- package/dist/timecampus/pages/time/TimeTrackingPage.js.map +1 -1
- package/dist/timecampus/pages/time/TimerPage.js +85 -85
- package/dist/timecampus/pages/time/TimerPage.js.map +1 -1
- package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js +1 -1
- package/dist/timecampus/pages/time-approval/SubmitTimesheetModal.js.map +1 -1
- package/dist/timecampus/pages/timeline/TimelinePage.js +227 -227
- package/dist/timecampus/pages/timeline/TimelinePage.js.map +1 -1
- package/dist/timecampus/shared/hooks/useConfirmedAction.d.ts +10 -0
- package/dist/timecampus/shared/hooks/useConfirmedAction.js +14 -0
- package/dist/timecampus/shared/hooks/useConfirmedAction.js.map +1 -0
- package/package.json +6 -4
|
@@ -5,24 +5,25 @@ import { EmptyState as r } from "../../components/EmptyState.js";
|
|
|
5
5
|
import { ToastContainer as i, useToast as a } from "../../components/Toast.js";
|
|
6
6
|
import { formatDate as o } from "../../utils/helpers.js";
|
|
7
7
|
import { useTimeCampus as s } from "../../providers/TimeCampusProvider.js";
|
|
8
|
-
import { useAddThirdPartyAppletVersionMutation as c, useArchiveThirdPartyAppletMutation as l, useCreateThirdPartyAppletMutation as u, useDelistAppletFromMarketplaceMutation as d, useGetMarketplaceDeveloperRevenueQuery as f, useListAppletDataScopesQuery as p, useListMyThirdPartyAppletsQuery as m, useRelistMarketplaceListingMutation as h, useSetMarketplacePricingMutation as g, useSubmitAppletToMarketplaceMutation as _, useSubmitThirdPartyAppletVersionMutation as v, useUnlistMarketplaceListingMutation as ee, useUpdateThirdPartyAppletVersionMutation as te, useValidateAppletManifestLazyQuery as
|
|
9
|
-
import { TimeCampusMarketplacePricingModel as
|
|
10
|
-
import { catalogueIcon as
|
|
11
|
-
import { appletStatus as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
8
|
+
import { useAddThirdPartyAppletVersionMutation as c, useArchiveThirdPartyAppletMutation as l, useCreateThirdPartyAppletMutation as u, useDelistAppletFromMarketplaceMutation as d, useGetMarketplaceDeveloperRevenueQuery as f, useListAppletDataScopesQuery as p, useListMyThirdPartyAppletsQuery as m, useRelistMarketplaceListingMutation as h, useSetMarketplacePricingMutation as g, useSubmitAppletToMarketplaceMutation as _, useSubmitThirdPartyAppletVersionMutation as v, useUnlistMarketplaceListingMutation as ee, useUpdateThirdPartyAppletVersionMutation as te, useValidateAppletManifestLazyQuery as ne, useWithdrawAppletFromMarketplaceMutation as re, useWithdrawThirdPartyAppletVersionMutation as ie } from "../../../generated/wspace-operations.js";
|
|
9
|
+
import { TimeCampusMarketplacePricingModel as y } from "../../../generated/wspace-types.js";
|
|
10
|
+
import { catalogueIcon as b } from "./extendHelpers.js";
|
|
11
|
+
import { appletStatus as x, developerSharePercent as S, errorText as C, formatAppletPrice as w, formatUsd as T, manifestForNextVersion as ae, manifestText as oe, marketplaceOffer as E, parseManifestText as se, starterManifest as D } from "./appletPublishingHelpers.js";
|
|
12
|
+
import { useConfirmedAction as ce } from "../../shared/hooks/useConfirmedAction.js";
|
|
13
|
+
import { useMemo as le, useState as O } from "react";
|
|
14
|
+
import { CheckCircle2 as ue, DollarSign as k, ExternalLink as A, EyeOff as j, FilePlus2 as M, Globe as N, Pencil as P, RotateCcw as F, Send as I, Trash2 as L, Undo2 as R } from "lucide-react";
|
|
14
15
|
import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
|
|
15
|
-
import { GlassCard as H } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { GlassCard as H, ThemedSelect as U } from "@burdenoff/fe-libs/ui";
|
|
16
17
|
// src/timecampus/pages/extend/AppletDeveloperPage.tsx
|
|
17
|
-
var
|
|
18
|
-
function
|
|
18
|
+
var W = ["ListMyThirdPartyApplets", "GetMarketplaceDeveloperRevenue"], G = "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", K = "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";
|
|
19
|
+
function de(e) {
|
|
19
20
|
return e.kind === "new" ? "Register a new applet" : e.kind === "version" ? `New version of ${e.appletName}` : `Edit ${e.appletName} v${e.version}`;
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function fe(e) {
|
|
22
23
|
return e.kind === "new" ? "Register applet" : e.kind === "version" ? "Add version" : "Save draft";
|
|
23
24
|
}
|
|
24
25
|
function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, onUnlist: s, onRelist: c, onDelist: l }) {
|
|
25
|
-
let u = e.marketplace, d =
|
|
26
|
+
let u = e.marketplace, d = E(e), f = u?.latestSubmission, p = u ? x(u.status) : null, m = f ? x(f.status) : null, [h, g] = O(u?.pricingModel ?? y.Free), [_, v] = O(u && u.priceUsd > 0 ? u.priceUsd.toFixed(2) : "9.00");
|
|
26
27
|
return /* @__PURE__ */ V("div", {
|
|
27
28
|
className: "flex flex-col gap-2 rounded-md border border-border-subtle bg-bg-sunken/40 p-3",
|
|
28
29
|
"data-testid": `developer-marketplace-${e.key}`,
|
|
@@ -44,8 +45,8 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
44
45
|
dot: !0
|
|
45
46
|
}),
|
|
46
47
|
u && /* @__PURE__ */ B(t, {
|
|
47
|
-
label:
|
|
48
|
-
variant: u.pricingModel ===
|
|
48
|
+
label: w(u.pricingModel, u.priceUsd),
|
|
49
|
+
variant: u.pricingModel === y.Free ? "muted" : "info"
|
|
49
50
|
})
|
|
50
51
|
]
|
|
51
52
|
}),
|
|
@@ -61,10 +62,10 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
61
62
|
u.liveSubmission.certifiedAt ? ` since ${o(u.liveSubmission.certifiedAt)}` : "",
|
|
62
63
|
". Revenue share:",
|
|
63
64
|
" ",
|
|
64
|
-
|
|
65
|
+
S(u.platformFeeRateBps),
|
|
65
66
|
"% developer /",
|
|
66
67
|
" ",
|
|
67
|
-
100 -
|
|
68
|
+
100 - S(u.platformFeeRateBps),
|
|
68
69
|
"% platform."
|
|
69
70
|
]
|
|
70
71
|
}),
|
|
@@ -96,28 +97,28 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
96
97
|
children: [
|
|
97
98
|
/* @__PURE__ */ V("label", {
|
|
98
99
|
className: "flex flex-col gap-1 text-xs text-text-secondary",
|
|
99
|
-
children: ["Pricing model", /* @__PURE__ */ V(
|
|
100
|
+
children: ["Pricing model", /* @__PURE__ */ V(U, {
|
|
100
101
|
value: h,
|
|
101
102
|
onChange: (e) => g(e.target.value),
|
|
102
103
|
"aria-label": `Pricing model for ${e.name}`,
|
|
103
104
|
className: "rounded-md border border-border-subtle bg-bg-surface px-2 py-1 text-xs text-text-primary",
|
|
104
105
|
children: [
|
|
105
106
|
/* @__PURE__ */ B("option", {
|
|
106
|
-
value:
|
|
107
|
+
value: y.Free,
|
|
107
108
|
children: "Free"
|
|
108
109
|
}),
|
|
109
110
|
/* @__PURE__ */ B("option", {
|
|
110
|
-
value:
|
|
111
|
+
value: y.OneTime,
|
|
111
112
|
children: "One-time (USD)"
|
|
112
113
|
}),
|
|
113
114
|
/* @__PURE__ */ B("option", {
|
|
114
|
-
value:
|
|
115
|
+
value: y.PerSeatMonthly,
|
|
115
116
|
children: "Per seat / month (USD)"
|
|
116
117
|
})
|
|
117
118
|
]
|
|
118
119
|
})]
|
|
119
120
|
}),
|
|
120
|
-
h !==
|
|
121
|
+
h !== y.Free && /* @__PURE__ */ V("label", {
|
|
121
122
|
className: "flex flex-col gap-1 text-xs text-text-secondary",
|
|
122
123
|
children: ["Price (USD, min $1.00)", /* @__PURE__ */ B("input", {
|
|
123
124
|
type: "number",
|
|
@@ -132,13 +133,13 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
132
133
|
}),
|
|
133
134
|
/* @__PURE__ */ V("button", {
|
|
134
135
|
type: "button",
|
|
135
|
-
className:
|
|
136
|
+
className: K,
|
|
136
137
|
disabled: n,
|
|
137
138
|
onClick: () => {
|
|
138
|
-
let e = h ===
|
|
139
|
+
let e = h === y.Free ? 0 : Number.parseFloat(_);
|
|
139
140
|
a(h, Number.isFinite(e) ? e : 0);
|
|
140
141
|
},
|
|
141
|
-
children: [/* @__PURE__ */ B(
|
|
142
|
+
children: [/* @__PURE__ */ B(k, {
|
|
142
143
|
className: "h-3.5 w-3.5",
|
|
143
144
|
"aria-hidden": "true"
|
|
144
145
|
}), "Save pricing"]
|
|
@@ -154,7 +155,7 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
154
155
|
children: [
|
|
155
156
|
d.canOffer ? /* @__PURE__ */ V("button", {
|
|
156
157
|
type: "button",
|
|
157
|
-
className:
|
|
158
|
+
className: K,
|
|
158
159
|
disabled: n,
|
|
159
160
|
onClick: r,
|
|
160
161
|
"aria-label": `Offer ${e.name} v${d.version} in the marketplace`,
|
|
@@ -173,7 +174,7 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
173
174
|
}),
|
|
174
175
|
f?.status === "IN_REVIEW" && /* @__PURE__ */ V("button", {
|
|
175
176
|
type: "button",
|
|
176
|
-
className:
|
|
177
|
+
className: K,
|
|
177
178
|
disabled: n,
|
|
178
179
|
onClick: i,
|
|
179
180
|
children: [/* @__PURE__ */ B(R, {
|
|
@@ -183,7 +184,7 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
183
184
|
}),
|
|
184
185
|
u?.status === "PUBLISHED" && /* @__PURE__ */ V("button", {
|
|
185
186
|
type: "button",
|
|
186
|
-
className:
|
|
187
|
+
className: K,
|
|
187
188
|
disabled: n,
|
|
188
189
|
onClick: s,
|
|
189
190
|
children: [/* @__PURE__ */ B(j, {
|
|
@@ -193,7 +194,7 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
193
194
|
}),
|
|
194
195
|
u?.status === "UNLISTED" && /* @__PURE__ */ V("button", {
|
|
195
196
|
type: "button",
|
|
196
|
-
className:
|
|
197
|
+
className: K,
|
|
197
198
|
disabled: n,
|
|
198
199
|
onClick: c,
|
|
199
200
|
children: [/* @__PURE__ */ B(F, {
|
|
@@ -203,7 +204,7 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
203
204
|
}),
|
|
204
205
|
u && /* @__PURE__ */ V("button", {
|
|
205
206
|
type: "button",
|
|
206
|
-
className:
|
|
207
|
+
className: K,
|
|
207
208
|
disabled: n,
|
|
208
209
|
onClick: l,
|
|
209
210
|
"aria-label": `Remove ${e.name} from the marketplace`,
|
|
@@ -217,8 +218,8 @@ function q({ applet: e, busy: n, onOffer: r, onWithdraw: i, onSavePricing: a, on
|
|
|
217
218
|
]
|
|
218
219
|
});
|
|
219
220
|
}
|
|
220
|
-
function
|
|
221
|
-
let u =
|
|
221
|
+
function pe({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a, onWithdraw: s, onArchive: c, marketplace: l }) {
|
|
222
|
+
let u = b(e.icon), d = x(e.status), f = e.versions.some((e) => e.status === "DRAFT" || e.status === "IN_REVIEW");
|
|
222
223
|
return /* @__PURE__ */ V(H, {
|
|
223
224
|
treatment: "glass",
|
|
224
225
|
className: "flex flex-col gap-3 p-5",
|
|
@@ -263,7 +264,7 @@ function de({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a
|
|
|
263
264
|
/* @__PURE__ */ B("ul", {
|
|
264
265
|
className: "divide-y divide-border-subtle rounded-md border border-border-subtle",
|
|
265
266
|
children: e.versions.map((i) => {
|
|
266
|
-
let o =
|
|
267
|
+
let o = x(i.status);
|
|
267
268
|
return /* @__PURE__ */ V("li", {
|
|
268
269
|
className: "flex flex-col gap-2 px-3 py-2 sm:flex-row sm:items-center sm:justify-between",
|
|
269
270
|
"data-testid": `developer-version-${e.key}-${i.version}`,
|
|
@@ -295,7 +296,7 @@ function de({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a
|
|
|
295
296
|
children: [
|
|
296
297
|
(i.status === "DRAFT" || i.status === "REJECTED") && /* @__PURE__ */ V("button", {
|
|
297
298
|
type: "button",
|
|
298
|
-
className:
|
|
299
|
+
className: K,
|
|
299
300
|
disabled: n,
|
|
300
301
|
onClick: () => r(i.id, i.version, i.manifest),
|
|
301
302
|
children: [/* @__PURE__ */ B(P, {
|
|
@@ -305,7 +306,7 @@ function de({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a
|
|
|
305
306
|
}),
|
|
306
307
|
i.status === "DRAFT" && /* @__PURE__ */ V("button", {
|
|
307
308
|
type: "button",
|
|
308
|
-
className:
|
|
309
|
+
className: G,
|
|
309
310
|
disabled: n,
|
|
310
311
|
onClick: () => a(i.id),
|
|
311
312
|
children: [/* @__PURE__ */ B(I, {
|
|
@@ -315,7 +316,7 @@ function de({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a
|
|
|
315
316
|
}),
|
|
316
317
|
i.status === "IN_REVIEW" && /* @__PURE__ */ V("button", {
|
|
317
318
|
type: "button",
|
|
318
|
-
className:
|
|
319
|
+
className: K,
|
|
319
320
|
disabled: n,
|
|
320
321
|
onClick: () => s(i.id),
|
|
321
322
|
children: [/* @__PURE__ */ B(R, {
|
|
@@ -337,7 +338,7 @@ function de({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a
|
|
|
337
338
|
className: "flex flex-wrap gap-2",
|
|
338
339
|
children: [/* @__PURE__ */ V("button", {
|
|
339
340
|
type: "button",
|
|
340
|
-
className:
|
|
341
|
+
className: K,
|
|
341
342
|
disabled: n || f,
|
|
342
343
|
onClick: i,
|
|
343
344
|
title: f ? "Finish or withdraw the open version first" : void 0,
|
|
@@ -347,7 +348,7 @@ function de({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a
|
|
|
347
348
|
}), "New version"]
|
|
348
349
|
}), /* @__PURE__ */ V("button", {
|
|
349
350
|
type: "button",
|
|
350
|
-
className:
|
|
351
|
+
className: K,
|
|
351
352
|
disabled: n,
|
|
352
353
|
onClick: c,
|
|
353
354
|
"aria-label": `Archive ${e.name}`,
|
|
@@ -361,35 +362,35 @@ function de({ applet: e, busy: n, onEditVersion: r, onNewVersion: i, onSubmit: a
|
|
|
361
362
|
});
|
|
362
363
|
}
|
|
363
364
|
function J() {
|
|
364
|
-
let { workspaceId:
|
|
365
|
-
|
|
365
|
+
let t = ce(), { workspaceId: y = "" } = s(), { toasts: b, addToast: x, dismissToast: E } = a(), k = typeof window > "u" ? "" : window.location.origin, [j, M] = O({ kind: "new" }), [N, P] = O(() => D(k)), [F, I] = O([]), [L, R] = O(!1), { data: z, loading: U, error: q } = m({ skip: !y }), { data: J } = p({ skip: !y }), { data: me } = f({ skip: !y }), [he] = ne({ fetchPolicy: "network-only" }), [ge] = u({ refetchQueries: W }), [_e] = c({ refetchQueries: W }), [ve] = te({ refetchQueries: W }), [ye] = v({ refetchQueries: W }), [be] = ie({ refetchQueries: W }), [xe] = l({ refetchQueries: W }), [Se] = _({ refetchQueries: W }), [Ce] = g({ refetchQueries: W }), [we] = re({ refetchQueries: W }), [Te] = ee({ refetchQueries: W }), [Ee] = h({ refetchQueries: W }), [De] = d({ refetchQueries: W }), Y = me?.timeCampusMarketplaceDeveloperRevenue, X = le(() => z?.timeCampusMyThirdPartyApplets ?? [], [z]), Oe = J?.timeCampusAppletDataScopes ?? [], Z = () => {
|
|
366
|
+
M({ kind: "new" }), P(D(k)), I([]);
|
|
366
367
|
}, Q = async () => {
|
|
367
|
-
let e =
|
|
368
|
-
if (!e.ok) return
|
|
369
|
-
let t = await
|
|
370
|
-
return n ? (
|
|
371
|
-
},
|
|
368
|
+
let e = se(N);
|
|
369
|
+
if (!e.ok) return I([e.error]), null;
|
|
370
|
+
let t = await he({ variables: { manifest: e.manifest } }), n = t.data?.validateTimeCampusAppletManifest;
|
|
371
|
+
return n ? (I(n.errors), n.valid ? e.manifest : null) : (I([C(t.error)]), null);
|
|
372
|
+
}, ke = async () => {
|
|
372
373
|
await Q() && x({
|
|
373
374
|
title: "Manifest is valid",
|
|
374
375
|
variant: "success"
|
|
375
376
|
});
|
|
376
|
-
},
|
|
377
|
-
|
|
377
|
+
}, Ae = async () => {
|
|
378
|
+
R(!0);
|
|
378
379
|
try {
|
|
379
380
|
let e = await Q();
|
|
380
381
|
if (!e) return;
|
|
381
|
-
|
|
382
|
+
j.kind === "new" ? (await ge({ variables: { manifest: e } }), x({
|
|
382
383
|
title: "Applet registered as a draft",
|
|
383
384
|
description: "Submit it for review when it is ready.",
|
|
384
385
|
variant: "success"
|
|
385
|
-
})) :
|
|
386
|
-
appletId:
|
|
386
|
+
})) : j.kind === "version" ? (await _e({ variables: {
|
|
387
|
+
appletId: j.appletId,
|
|
387
388
|
manifest: e
|
|
388
389
|
} }), x({
|
|
389
390
|
title: "New draft version added",
|
|
390
391
|
variant: "success"
|
|
391
|
-
})) : (await
|
|
392
|
-
versionId:
|
|
392
|
+
})) : (await ve({ variables: {
|
|
393
|
+
versionId: j.versionId,
|
|
393
394
|
manifest: e
|
|
394
395
|
} }), x({
|
|
395
396
|
title: "Draft saved",
|
|
@@ -397,14 +398,14 @@ function J() {
|
|
|
397
398
|
})), Z();
|
|
398
399
|
} catch (e) {
|
|
399
400
|
x({
|
|
400
|
-
title:
|
|
401
|
+
title: C(e),
|
|
401
402
|
variant: "error"
|
|
402
403
|
});
|
|
403
404
|
} finally {
|
|
404
|
-
|
|
405
|
+
R(!1);
|
|
405
406
|
}
|
|
406
407
|
}, $ = async (e, t) => {
|
|
407
|
-
|
|
408
|
+
R(!0);
|
|
408
409
|
try {
|
|
409
410
|
await e(), x({
|
|
410
411
|
title: t,
|
|
@@ -412,11 +413,11 @@ function J() {
|
|
|
412
413
|
});
|
|
413
414
|
} catch (e) {
|
|
414
415
|
x({
|
|
415
|
-
title:
|
|
416
|
+
title: C(e),
|
|
416
417
|
variant: "error"
|
|
417
418
|
});
|
|
418
419
|
} finally {
|
|
419
|
-
|
|
420
|
+
R(!1);
|
|
420
421
|
}
|
|
421
422
|
};
|
|
422
423
|
return /* @__PURE__ */ V(e, {
|
|
@@ -426,7 +427,7 @@ function J() {
|
|
|
426
427
|
children: [
|
|
427
428
|
/* @__PURE__ */ B(i, {
|
|
428
429
|
toasts: b,
|
|
429
|
-
onDismiss:
|
|
430
|
+
onDismiss: E
|
|
430
431
|
}),
|
|
431
432
|
/* @__PURE__ */ V("div", {
|
|
432
433
|
className: "grid grid-cols-1 gap-6 xl:grid-cols-2",
|
|
@@ -441,10 +442,10 @@ function J() {
|
|
|
441
442
|
children: [/* @__PURE__ */ B("h2", {
|
|
442
443
|
id: "manifest-editor-heading",
|
|
443
444
|
className: "text-base font-semibold text-text-primary",
|
|
444
|
-
children:
|
|
445
|
-
}),
|
|
445
|
+
children: de(j)
|
|
446
|
+
}), j.kind !== "new" && /* @__PURE__ */ B("button", {
|
|
446
447
|
type: "button",
|
|
447
|
-
className:
|
|
448
|
+
className: K,
|
|
448
449
|
onClick: Z,
|
|
449
450
|
children: "Cancel"
|
|
450
451
|
})]
|
|
@@ -452,8 +453,8 @@ function J() {
|
|
|
452
453
|
/* @__PURE__ */ V("label", {
|
|
453
454
|
className: "flex flex-col gap-1 text-sm text-text-secondary",
|
|
454
455
|
children: ["Manifest (JSON)", /* @__PURE__ */ B("textarea", {
|
|
455
|
-
value:
|
|
456
|
-
onChange: (e) =>
|
|
456
|
+
value: N,
|
|
457
|
+
onChange: (e) => P(e.target.value),
|
|
457
458
|
spellCheck: !1,
|
|
458
459
|
rows: 22,
|
|
459
460
|
className: "w-full rounded-md border border-border-subtle bg-bg-surface p-3 font-mono text-xs text-text-primary",
|
|
@@ -461,28 +462,28 @@ function J() {
|
|
|
461
462
|
"data-testid": "applet-manifest-editor"
|
|
462
463
|
})]
|
|
463
464
|
}),
|
|
464
|
-
|
|
465
|
-
className: "list-disc rounded-md bg-status-error-bg py-2
|
|
465
|
+
F.length > 0 && /* @__PURE__ */ B("ul", {
|
|
466
|
+
className: "list-disc rounded-md bg-status-error-bg py-2 ps-6 pe-3 text-xs text-status-error-text",
|
|
466
467
|
"data-testid": "applet-manifest-problems",
|
|
467
|
-
children:
|
|
468
|
+
children: F.map((e) => /* @__PURE__ */ B("li", { children: e }, e))
|
|
468
469
|
}),
|
|
469
470
|
/* @__PURE__ */ V("div", {
|
|
470
471
|
className: "flex flex-wrap gap-2",
|
|
471
472
|
children: [/* @__PURE__ */ V("button", {
|
|
472
473
|
type: "button",
|
|
473
|
-
className:
|
|
474
|
-
onClick:
|
|
475
|
-
disabled:
|
|
476
|
-
children: [/* @__PURE__ */ B(
|
|
474
|
+
className: K,
|
|
475
|
+
onClick: ke,
|
|
476
|
+
disabled: L,
|
|
477
|
+
children: [/* @__PURE__ */ B(ue, {
|
|
477
478
|
className: "h-4 w-4",
|
|
478
479
|
"aria-hidden": "true"
|
|
479
480
|
}), "Validate"]
|
|
480
481
|
}), /* @__PURE__ */ B("button", {
|
|
481
482
|
type: "button",
|
|
482
|
-
className:
|
|
483
|
-
onClick:
|
|
484
|
-
disabled:
|
|
485
|
-
children:
|
|
483
|
+
className: G,
|
|
484
|
+
onClick: Ae,
|
|
485
|
+
disabled: L,
|
|
486
|
+
children: fe(j)
|
|
486
487
|
})]
|
|
487
488
|
}),
|
|
488
489
|
/* @__PURE__ */ V("div", {
|
|
@@ -493,8 +494,8 @@ function J() {
|
|
|
493
494
|
children: "Data scopes a manifest can ask for"
|
|
494
495
|
}),
|
|
495
496
|
/* @__PURE__ */ B("ul", {
|
|
496
|
-
className: "list-disc
|
|
497
|
-
children:
|
|
497
|
+
className: "list-disc ps-5",
|
|
498
|
+
children: Oe.map((e) => /* @__PURE__ */ V("li", { children: [
|
|
498
499
|
/* @__PURE__ */ B("code", { children: e.key }),
|
|
499
500
|
" — ",
|
|
500
501
|
e.description
|
|
@@ -522,12 +523,12 @@ function J() {
|
|
|
522
523
|
id: "my-applets-heading",
|
|
523
524
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
524
525
|
children: "Your applets"
|
|
525
|
-
}),
|
|
526
|
+
}), U && !z ? /* @__PURE__ */ B(n, {
|
|
526
527
|
variant: "card",
|
|
527
528
|
count: 2
|
|
528
529
|
}) : q ? /* @__PURE__ */ B(r, {
|
|
529
530
|
title: "Couldn't load your applets",
|
|
530
|
-
description:
|
|
531
|
+
description: C(q),
|
|
531
532
|
illustration: "error-state"
|
|
532
533
|
}) : X.length === 0 ? /* @__PURE__ */ B(r, {
|
|
533
534
|
title: "No applets yet",
|
|
@@ -535,42 +536,46 @@ function J() {
|
|
|
535
536
|
illustration: "empty-generic"
|
|
536
537
|
}) : /* @__PURE__ */ B("div", {
|
|
537
538
|
className: "flex flex-col gap-4",
|
|
538
|
-
children: X.map((e) => /* @__PURE__ */ B(
|
|
539
|
+
children: X.map((e) => /* @__PURE__ */ B(pe, {
|
|
539
540
|
applet: e,
|
|
540
|
-
busy:
|
|
541
|
+
busy: L,
|
|
541
542
|
onEditVersion: (t, n, r) => {
|
|
542
|
-
|
|
543
|
+
M({
|
|
543
544
|
kind: "edit",
|
|
544
545
|
versionId: t,
|
|
545
546
|
version: n,
|
|
546
547
|
appletName: e.name
|
|
547
|
-
}),
|
|
548
|
+
}), P(oe(r)), I([]);
|
|
548
549
|
},
|
|
549
550
|
onNewVersion: () => {
|
|
550
|
-
|
|
551
|
+
M({
|
|
551
552
|
kind: "version",
|
|
552
553
|
appletId: e.id,
|
|
553
554
|
appletName: e.name
|
|
554
|
-
}),
|
|
555
|
+
}), P(ae(e.latestVersion.manifest)), I([]);
|
|
555
556
|
},
|
|
556
|
-
onSubmit: (e) => $(() =>
|
|
557
|
-
onWithdraw: (e) => $(() =>
|
|
557
|
+
onSubmit: (e) => $(() => ye({ variables: { versionId: e } }), "Submitted for review"),
|
|
558
|
+
onWithdraw: (e) => $(() => be({ variables: { versionId: e } }), "Withdrawn from review"),
|
|
558
559
|
marketplace: {
|
|
559
|
-
onOffer: () => void $(() =>
|
|
560
|
-
onWithdraw: () => void $(() =>
|
|
561
|
-
onSavePricing: (t, n) => void $(() =>
|
|
560
|
+
onOffer: () => void $(() => Se({ variables: { appletId: e.id } }), "Sent for platform certification"),
|
|
561
|
+
onWithdraw: () => void $(() => we({ variables: { appletId: e.id } }), "Withdrawn from platform certification"),
|
|
562
|
+
onSavePricing: (t, n) => void $(() => Ce({ variables: {
|
|
562
563
|
appletId: e.id,
|
|
563
564
|
pricingModel: t,
|
|
564
565
|
priceUsd: n
|
|
565
|
-
} }), `Pricing updated to ${
|
|
566
|
-
onUnlist: () => void $(() =>
|
|
567
|
-
onRelist: () => void $(() =>
|
|
566
|
+
} }), `Pricing updated to ${w(t, n)}`),
|
|
567
|
+
onUnlist: () => void $(() => Te({ variables: { appletId: e.id } }), `${e.name} unlisted (existing installs keep working)`),
|
|
568
|
+
onRelist: () => void $(() => Ee({ variables: { appletId: e.id } }), `${e.name} is listed in the marketplace again`),
|
|
568
569
|
onDelist: () => {
|
|
569
|
-
|
|
570
|
+
t(`Remove ${e.name} from the marketplace? It is removed from every workspace that installed it.`, () => {
|
|
571
|
+
$(() => De({ variables: { appletId: e.id } }), `${e.name} removed from the marketplace`);
|
|
572
|
+
});
|
|
570
573
|
}
|
|
571
574
|
},
|
|
572
575
|
onArchive: () => {
|
|
573
|
-
|
|
576
|
+
t(`Archive ${e.name}? It is removed from every dashboard in this workspace and from the marketplace.`, () => {
|
|
577
|
+
$(() => xe({ variables: { id: e.id } }), `${e.name} archived`);
|
|
578
|
+
});
|
|
574
579
|
}
|
|
575
580
|
}, e.id))
|
|
576
581
|
})]
|
|
@@ -595,7 +600,7 @@ function J() {
|
|
|
595
600
|
children: [
|
|
596
601
|
"Developers keep",
|
|
597
602
|
" ",
|
|
598
|
-
|
|
603
|
+
S(Y.summary.platformFeeRateBps),
|
|
599
604
|
"% of net sales. Earnings clear after a",
|
|
600
605
|
" ",
|
|
601
606
|
Y.summary.holdWindowDays,
|
|
@@ -604,14 +609,14 @@ function J() {
|
|
|
604
609
|
Y.summary.payoutSchedule.toLowerCase(),
|
|
605
610
|
" once payable balance reaches",
|
|
606
611
|
" ",
|
|
607
|
-
|
|
612
|
+
T(Y.summary.minimumPayoutThresholdUsd),
|
|
608
613
|
"."
|
|
609
614
|
]
|
|
610
615
|
})] }), /* @__PURE__ */ V("a", {
|
|
611
616
|
href: Y.summary.payoutsUrl,
|
|
612
|
-
className:
|
|
617
|
+
className: K,
|
|
613
618
|
"data-testid": "developer-payouts-link",
|
|
614
|
-
children: [/* @__PURE__ */ B(
|
|
619
|
+
children: [/* @__PURE__ */ B(A, {
|
|
615
620
|
className: "h-4 w-4",
|
|
616
621
|
"aria-hidden": "true"
|
|
617
622
|
}), "Manage payouts & bank account"]
|
|
@@ -627,7 +632,7 @@ function J() {
|
|
|
627
632
|
children: "Gross sales"
|
|
628
633
|
}), /* @__PURE__ */ B("p", {
|
|
629
634
|
className: "text-lg font-semibold text-text-primary",
|
|
630
|
-
children:
|
|
635
|
+
children: T(Y.summary.totalGrossUsd)
|
|
631
636
|
})]
|
|
632
637
|
}),
|
|
633
638
|
/* @__PURE__ */ V("div", {
|
|
@@ -637,7 +642,7 @@ function J() {
|
|
|
637
642
|
children: "Net developer share"
|
|
638
643
|
}), /* @__PURE__ */ B("p", {
|
|
639
644
|
className: "text-lg font-semibold text-text-primary",
|
|
640
|
-
children:
|
|
645
|
+
children: T(Y.summary.totalDeveloperNetUsd)
|
|
641
646
|
})]
|
|
642
647
|
}),
|
|
643
648
|
/* @__PURE__ */ V("div", {
|
|
@@ -647,7 +652,7 @@ function J() {
|
|
|
647
652
|
children: "30-day hold"
|
|
648
653
|
}), /* @__PURE__ */ B("p", {
|
|
649
654
|
className: "text-lg font-semibold text-text-primary",
|
|
650
|
-
children:
|
|
655
|
+
children: T(Y.summary.pendingHoldUsd)
|
|
651
656
|
})]
|
|
652
657
|
}),
|
|
653
658
|
/* @__PURE__ */ V("div", {
|
|
@@ -657,7 +662,7 @@ function J() {
|
|
|
657
662
|
children: "Payable balance"
|
|
658
663
|
}), /* @__PURE__ */ B("p", {
|
|
659
664
|
className: "text-lg font-semibold text-text-primary",
|
|
660
|
-
children:
|
|
665
|
+
children: T(Y.summary.payableUsd)
|
|
661
666
|
})]
|
|
662
667
|
}),
|
|
663
668
|
/* @__PURE__ */ V("div", {
|
|
@@ -667,7 +672,7 @@ function J() {
|
|
|
667
672
|
children: "Refunded"
|
|
668
673
|
}), /* @__PURE__ */ B("p", {
|
|
669
674
|
className: "text-lg font-semibold text-text-primary",
|
|
670
|
-
children:
|
|
675
|
+
children: T(Y.summary.totalRefundedUsd)
|
|
671
676
|
})]
|
|
672
677
|
})
|
|
673
678
|
]
|
|
@@ -678,32 +683,32 @@ function J() {
|
|
|
678
683
|
}) : /* @__PURE__ */ B("div", {
|
|
679
684
|
className: "overflow-x-auto",
|
|
680
685
|
children: /* @__PURE__ */ V("table", {
|
|
681
|
-
className: "w-full text-
|
|
686
|
+
className: "w-full text-start text-xs",
|
|
682
687
|
children: [/* @__PURE__ */ B("thead", { children: /* @__PURE__ */ V("tr", {
|
|
683
688
|
className: "border-b border-border-subtle text-text-tertiary",
|
|
684
689
|
children: [
|
|
685
690
|
/* @__PURE__ */ B("th", {
|
|
686
|
-
className: "py-2
|
|
691
|
+
className: "py-2 pe-3 font-medium",
|
|
687
692
|
children: "Order"
|
|
688
693
|
}),
|
|
689
694
|
/* @__PURE__ */ B("th", {
|
|
690
|
-
className: "py-2
|
|
695
|
+
className: "py-2 pe-3 font-medium",
|
|
691
696
|
children: "Applet"
|
|
692
697
|
}),
|
|
693
698
|
/* @__PURE__ */ B("th", {
|
|
694
|
-
className: "py-2
|
|
699
|
+
className: "py-2 pe-3 font-medium",
|
|
695
700
|
children: "Model"
|
|
696
701
|
}),
|
|
697
702
|
/* @__PURE__ */ B("th", {
|
|
698
|
-
className: "py-2
|
|
703
|
+
className: "py-2 pe-3 font-medium",
|
|
699
704
|
children: "Gross"
|
|
700
705
|
}),
|
|
701
706
|
/* @__PURE__ */ B("th", {
|
|
702
|
-
className: "py-2
|
|
707
|
+
className: "py-2 pe-3 font-medium",
|
|
703
708
|
children: "Net"
|
|
704
709
|
}),
|
|
705
710
|
/* @__PURE__ */ B("th", {
|
|
706
|
-
className: "py-2
|
|
711
|
+
className: "py-2 pe-3 font-medium",
|
|
707
712
|
children: "Status"
|
|
708
713
|
}),
|
|
709
714
|
/* @__PURE__ */ B("th", {
|
|
@@ -715,28 +720,28 @@ function J() {
|
|
|
715
720
|
className: "divide-y divide-border-subtle",
|
|
716
721
|
children: Y.sales.map((e) => /* @__PURE__ */ V("tr", { children: [
|
|
717
722
|
/* @__PURE__ */ B("td", {
|
|
718
|
-
className: "py-2
|
|
723
|
+
className: "py-2 pe-3 font-mono text-text-primary",
|
|
719
724
|
children: e.orderNumber
|
|
720
725
|
}),
|
|
721
726
|
/* @__PURE__ */ B("td", {
|
|
722
|
-
className: "py-2
|
|
727
|
+
className: "py-2 pe-3 text-text-primary",
|
|
723
728
|
children: e.appletName
|
|
724
729
|
}),
|
|
725
730
|
/* @__PURE__ */ B("td", {
|
|
726
|
-
className: "py-2
|
|
731
|
+
className: "py-2 pe-3 text-text-secondary",
|
|
727
732
|
children: e.pricingModel === "PER_SEAT_MONTHLY" ? `${e.seatCount} seats / mo` : "One-time"
|
|
728
733
|
}),
|
|
729
734
|
/* @__PURE__ */ B("td", {
|
|
730
|
-
className: "py-2
|
|
731
|
-
children:
|
|
735
|
+
className: "py-2 pe-3 text-text-primary",
|
|
736
|
+
children: T(e.grossAmount)
|
|
732
737
|
}),
|
|
733
738
|
/* @__PURE__ */ B("td", {
|
|
734
|
-
className: "py-2
|
|
735
|
-
children:
|
|
739
|
+
className: "py-2 pe-3 text-text-primary",
|
|
740
|
+
children: T(e.developerNetAmount)
|
|
736
741
|
}),
|
|
737
742
|
/* @__PURE__ */ V("td", {
|
|
738
|
-
className: "py-2
|
|
739
|
-
children: [e.status, e.refundAmount ? ` (refund ${
|
|
743
|
+
className: "py-2 pe-3 text-text-secondary",
|
|
744
|
+
children: [e.status, e.refundAmount ? ` (refund ${T(e.refundAmount)})` : ""]
|
|
740
745
|
}),
|
|
741
746
|
/* @__PURE__ */ B("td", {
|
|
742
747
|
className: "py-2 text-text-tertiary",
|