@burdenoff/microfe-eventfullymanaged 2026.825.1 → 2026.828.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/eventfullymanaged/hooks/index.d.ts +1 -0
- package/dist/eventfullymanaged/hooks/index.d.ts.map +1 -1
- package/dist/eventfullymanaged/hooks/index.js +3 -0
- package/dist/eventfullymanaged/hooks/useEventDelete.d.ts +19 -0
- package/dist/eventfullymanaged/hooks/useEventDelete.d.ts.map +1 -0
- package/dist/eventfullymanaged/hooks/useEventDelete.js +16 -0
- package/dist/eventfullymanaged/hooks/useEventDelete.js.map +1 -0
- package/dist/eventfullymanaged/lib/format.d.ts +9 -0
- package/dist/eventfullymanaged/lib/format.d.ts.map +1 -1
- package/dist/eventfullymanaged/lib/format.js +11 -3
- package/dist/eventfullymanaged/lib/format.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js +315 -277
- package/dist/eventfullymanaged/pages/events/EventDetailPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/events/SessionFormPage.js +91 -81
- package/dist/eventfullymanaged/pages/events/SessionFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.js +231 -229
- package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +120 -102
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js +128 -120
- package/dist/eventfullymanaged/pages/modules/RegistrationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.d.ts.map +1 -1
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js +68 -75
- package/dist/eventfullymanaged/pages/registration/PromoCodeFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js +41 -41
- package/dist/eventfullymanaged/pages/registration/RegisterAttendeePage.js.map +1 -1
- package/dist/eventfullymanaged/store/eventfullyManagedStore.js +15 -0
- package/dist/eventfullymanaged/store/eventfullyManagedStore.js.map +1 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UseEventDeleteOptions {
|
|
2
|
+
/** Name shown in the success toast (e.g. "Event deleted Annual Meetup"). */
|
|
3
|
+
name?: string;
|
|
4
|
+
/** Called after the server confirms deletion and the success toast fires. */
|
|
5
|
+
onSuccess?: () => void | Promise<void>;
|
|
6
|
+
}
|
|
7
|
+
export interface UseEventDeleteResult {
|
|
8
|
+
/** Delete the event by id, surfacing errors and calling onSuccess when confirmed. */
|
|
9
|
+
onDeleteEvent: (id: string, options?: UseEventDeleteOptions) => Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Shared event-deletion handler for EventfullyManaged list and detail surfaces.
|
|
13
|
+
*
|
|
14
|
+
* Encapsulates the mutation call, server-error handling, success notification
|
|
15
|
+
* and post-delete callback (list refetch or detail navigation) so the behaviour
|
|
16
|
+
* is testable in isolation and identical across EventsPage and EventDetailPage.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useEventDelete(): UseEventDeleteResult;
|
|
19
|
+
//# sourceMappingURL=useEventDelete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEventDelete.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/hooks/useEventDelete.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,qBAAqB;IACpC,4EAA4E;IAC5E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,SAAS,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,MAAM,WAAW,oBAAoB;IACnC,qFAAqF;IACrF,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/E;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAiBrD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { notify as e } from "../lib/toast.js";
|
|
2
|
+
import { useDeleteEventMutation as t } from "../api/eventApi.js";
|
|
3
|
+
import { useCallback as n } from "react";
|
|
4
|
+
//#region src/eventfullymanaged/hooks/useEventDelete.ts
|
|
5
|
+
function r() {
|
|
6
|
+
let [r] = t();
|
|
7
|
+
return { onDeleteEvent: n(async (t, n) => {
|
|
8
|
+
let i = await r({ variables: { id: t } });
|
|
9
|
+
if (i.error || !i.data?.deleteEvent) throw e.error("Could not delete event", i.error?.message ?? "The server did not confirm the change."), i.error ?? /* @__PURE__ */ Error("delete-unconfirmed");
|
|
10
|
+
e.success("Event deleted", n?.name), await n?.onSuccess?.();
|
|
11
|
+
}, [r]) };
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { r as useEventDelete };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=useEventDelete.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEventDelete.js","names":[],"sources":["../../../src/eventfullymanaged/hooks/useEventDelete.ts"],"sourcesContent":["import { useCallback } from 'react';\n\nimport { useDeleteEventMutation } from '../api/eventApi';\nimport { notify } from '../lib/toast';\n\nexport interface UseEventDeleteOptions {\n /** Name shown in the success toast (e.g. \"Event deleted Annual Meetup\"). */\n name?: string;\n /** Called after the server confirms deletion and the success toast fires. */\n onSuccess?: () => void | Promise<void>;\n}\n\nexport interface UseEventDeleteResult {\n /** Delete the event by id, surfacing errors and calling onSuccess when confirmed. */\n onDeleteEvent: (id: string, options?: UseEventDeleteOptions) => Promise<void>;\n}\n\n/**\n * Shared event-deletion handler for EventfullyManaged list and detail surfaces.\n *\n * Encapsulates the mutation call, server-error handling, success notification\n * and post-delete callback (list refetch or detail navigation) so the behaviour\n * is testable in isolation and identical across EventsPage and EventDetailPage.\n */\nexport function useEventDelete(): UseEventDeleteResult {\n const [deleteEvent] = useDeleteEventMutation();\n\n const onDeleteEvent = useCallback(\n async (id: string, options?: UseEventDeleteOptions) => {\n const response = await deleteEvent({ variables: { id } });\n if (response.error || !response.data?.deleteEvent) {\n notify.error('Could not delete event', response.error?.message ?? 'The server did not confirm the change.');\n throw response.error ?? new Error('delete-unconfirmed');\n }\n notify.success('Event deleted', options?.name);\n await options?.onSuccess?.();\n },\n [deleteEvent]\n );\n\n return { onDeleteEvent };\n}\n"],"mappings":";;;;AAwBA,SAAgB,IAAuC;CACrD,IAAM,CAAC,KAAe,GAAwB;AAe9C,QAAO,EAAE,eAba,EACpB,OAAO,GAAY,MAAoC;EACrD,IAAM,IAAW,MAAM,EAAY,EAAE,WAAW,EAAE,OAAI,EAAE,CAAC;AACzD,MAAI,EAAS,SAAS,CAAC,EAAS,MAAM,YAEpC,OADA,EAAO,MAAM,0BAA0B,EAAS,OAAO,WAAW,yCAAyC,EACrG,EAAS,SAAS,gBAAI,MAAM,qBAAqB;AAGzD,EADA,EAAO,QAAQ,iBAAiB,GAAS,KAAK,EAC9C,MAAM,GAAS,aAAa;IAE9B,CAAC,EAAY,CACd,EAEuB"}
|
|
@@ -7,6 +7,15 @@
|
|
|
7
7
|
*/
|
|
8
8
|
/** Format a decimal amount with its ISO currency code, degrading gracefully. */
|
|
9
9
|
export declare function formatMoney(amount: number, currency: string): string;
|
|
10
|
+
/**
|
|
11
|
+
* Human label for an open-ended validity window — a promo code's
|
|
12
|
+
* `startsAt`/`endsAt` or a ticket type's `salesStartAt`/`salesEndAt`.
|
|
13
|
+
*
|
|
14
|
+
* Accepts both ISO timestamps (as returned by the API) and the `datetime-local`
|
|
15
|
+
* field values the forms hold; an empty/absent bound simply drops out of the
|
|
16
|
+
* label, and a window with neither bound is "Ongoing".
|
|
17
|
+
*/
|
|
18
|
+
export declare function describeValidity(startsAt: string, endsAt: string): string;
|
|
10
19
|
export type DiscountType = 'PERCENT' | 'FIXED' | string;
|
|
11
20
|
/**
|
|
12
21
|
* Compute the discount an active promo would take off a subtotal, clamped so it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/lib/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAepE;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAM3G;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMrH"}
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/eventfullymanaged/lib/format.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAepE;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAOzE;AAED,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAExD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,CAM3G;AAED,8EAA8E;AAC9E,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAMrH"}
|
|
@@ -12,16 +12,24 @@ function e(e, t) {
|
|
|
12
12
|
return `${e.toLocaleString()} ${n}`.trim();
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
|
-
function t(e, t
|
|
15
|
+
function t(e, t) {
|
|
16
|
+
let n = (e) => new Date(e).toLocaleDateString(void 0, {
|
|
17
|
+
month: "short",
|
|
18
|
+
day: "numeric",
|
|
19
|
+
year: "numeric"
|
|
20
|
+
});
|
|
21
|
+
return e && t ? `${n(e)} – ${n(t)}` : e ? `From ${n(e)}` : t ? `Until ${n(t)}` : "Ongoing";
|
|
22
|
+
}
|
|
23
|
+
function n(e, t, n) {
|
|
16
24
|
if (!Number.isFinite(e) || e <= 0 || !Number.isFinite(n) || n <= 0) return 0;
|
|
17
25
|
let r = t === "PERCENT" ? e * n / 100 : n;
|
|
18
26
|
return Math.min(Math.max(r, 0), e);
|
|
19
27
|
}
|
|
20
|
-
function
|
|
28
|
+
function r(t, n, r) {
|
|
21
29
|
let i = typeof n == "number" ? n : Number(n);
|
|
22
30
|
return t === "PERCENT" ? `${Number.isFinite(i) ? i : n}% off` : `${Number.isFinite(i) ? e(i, r) : n} off`;
|
|
23
31
|
}
|
|
24
32
|
//#endregion
|
|
25
|
-
export {
|
|
33
|
+
export { n as computeDiscount, r as describeDiscount, t as describeValidity, e as formatMoney };
|
|
26
34
|
|
|
27
35
|
//# sourceMappingURL=format.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","names":[],"sources":["../../../src/eventfullymanaged/lib/format.ts"],"sourcesContent":["/**\n * Presentation helpers shared across the registration & ticketing screens.\n *\n * Pricing is authored by the billing service — these helpers only format the\n * real numbers we already hold (ticket price, promo discount, quantity) for a\n * live order-summary preview. They never invent amounts.\n */\n\n/** Format a decimal amount with its ISO currency code, degrading gracefully. */\nexport function formatMoney(amount: number, currency: string): string {\n if (!Number.isFinite(amount)) {\n return `0 ${currency}`.trim();\n }\n const code = (currency || 'USD').toUpperCase();\n try {\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency: code,\n maximumFractionDigits: Number.isInteger(amount) ? 0 : 2,\n }).format(amount);\n } catch {\n // Unknown/invalid currency code — fall back to a plain, readable amount.\n return `${amount.toLocaleString()} ${code}`.trim();\n }\n}\n\nexport type DiscountType = 'PERCENT' | 'FIXED' | string;\n\n/**\n * Compute the discount an active promo would take off a subtotal, clamped so it\n * never exceeds the subtotal. Returns 0 for unknown types or non-positive input.\n */\nexport function computeDiscount(subtotal: number, discountType: DiscountType, discountValue: number): number {\n if (!Number.isFinite(subtotal) || subtotal <= 0 || !Number.isFinite(discountValue) || discountValue <= 0) {\n return 0;\n }\n const raw = discountType === 'PERCENT' ? (subtotal * discountValue) / 100 : discountValue;\n return Math.min(Math.max(raw, 0), subtotal);\n}\n\n/** Short human label for a promo discount, e.g. \"10% off\" or \"₹1,000 off\". */\nexport function describeDiscount(discountType: DiscountType, discountValue: string | number, currency: string): string {\n const value = typeof discountValue === 'number' ? discountValue : Number(discountValue);\n if (discountType === 'PERCENT') {\n return `${Number.isFinite(value) ? value : discountValue}% off`;\n }\n return `${Number.isFinite(value) ? formatMoney(value, currency) : discountValue} off`;\n}\n"],"mappings":";AASA,SAAgB,EAAY,GAAgB,GAA0B;AACpE,KAAI,CAAC,OAAO,SAAS,EAAO,CAC1B,QAAO,KAAK,IAAW,MAAM;CAE/B,IAAM,KAAQ,KAAY,OAAO,aAAa;AAC9C,KAAI;AACF,SAAO,IAAI,KAAK,aAAa,KAAA,GAAW;GACtC,OAAO;GACP,UAAU;GACV,uBAAuB,OAAO,UAAU,EAAO,GAAG,IAAI;GACvD,CAAC,CAAC,OAAO,EAAO;SACX;AAEN,SAAO,GAAG,EAAO,gBAAgB,CAAC,GAAG,IAAO,MAAM;;;
|
|
1
|
+
{"version":3,"file":"format.js","names":[],"sources":["../../../src/eventfullymanaged/lib/format.ts"],"sourcesContent":["/**\n * Presentation helpers shared across the registration & ticketing screens.\n *\n * Pricing is authored by the billing service — these helpers only format the\n * real numbers we already hold (ticket price, promo discount, quantity) for a\n * live order-summary preview. They never invent amounts.\n */\n\n/** Format a decimal amount with its ISO currency code, degrading gracefully. */\nexport function formatMoney(amount: number, currency: string): string {\n if (!Number.isFinite(amount)) {\n return `0 ${currency}`.trim();\n }\n const code = (currency || 'USD').toUpperCase();\n try {\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency: code,\n maximumFractionDigits: Number.isInteger(amount) ? 0 : 2,\n }).format(amount);\n } catch {\n // Unknown/invalid currency code — fall back to a plain, readable amount.\n return `${amount.toLocaleString()} ${code}`.trim();\n }\n}\n\n/**\n * Human label for an open-ended validity window — a promo code's\n * `startsAt`/`endsAt` or a ticket type's `salesStartAt`/`salesEndAt`.\n *\n * Accepts both ISO timestamps (as returned by the API) and the `datetime-local`\n * field values the forms hold; an empty/absent bound simply drops out of the\n * label, and a window with neither bound is \"Ongoing\".\n */\nexport function describeValidity(startsAt: string, endsAt: string): string {\n const fmt = (value: string) =>\n new Date(value).toLocaleDateString(undefined, { month: 'short', day: 'numeric', year: 'numeric' });\n if (startsAt && endsAt) return `${fmt(startsAt)} – ${fmt(endsAt)}`;\n if (startsAt) return `From ${fmt(startsAt)}`;\n if (endsAt) return `Until ${fmt(endsAt)}`;\n return 'Ongoing';\n}\n\nexport type DiscountType = 'PERCENT' | 'FIXED' | string;\n\n/**\n * Compute the discount an active promo would take off a subtotal, clamped so it\n * never exceeds the subtotal. Returns 0 for unknown types or non-positive input.\n */\nexport function computeDiscount(subtotal: number, discountType: DiscountType, discountValue: number): number {\n if (!Number.isFinite(subtotal) || subtotal <= 0 || !Number.isFinite(discountValue) || discountValue <= 0) {\n return 0;\n }\n const raw = discountType === 'PERCENT' ? (subtotal * discountValue) / 100 : discountValue;\n return Math.min(Math.max(raw, 0), subtotal);\n}\n\n/** Short human label for a promo discount, e.g. \"10% off\" or \"₹1,000 off\". */\nexport function describeDiscount(discountType: DiscountType, discountValue: string | number, currency: string): string {\n const value = typeof discountValue === 'number' ? discountValue : Number(discountValue);\n if (discountType === 'PERCENT') {\n return `${Number.isFinite(value) ? value : discountValue}% off`;\n }\n return `${Number.isFinite(value) ? formatMoney(value, currency) : discountValue} off`;\n}\n"],"mappings":";AASA,SAAgB,EAAY,GAAgB,GAA0B;AACpE,KAAI,CAAC,OAAO,SAAS,EAAO,CAC1B,QAAO,KAAK,IAAW,MAAM;CAE/B,IAAM,KAAQ,KAAY,OAAO,aAAa;AAC9C,KAAI;AACF,SAAO,IAAI,KAAK,aAAa,KAAA,GAAW;GACtC,OAAO;GACP,UAAU;GACV,uBAAuB,OAAO,UAAU,EAAO,GAAG,IAAI;GACvD,CAAC,CAAC,OAAO,EAAO;SACX;AAEN,SAAO,GAAG,EAAO,gBAAgB,CAAC,GAAG,IAAO,MAAM;;;AAYtD,SAAgB,EAAiB,GAAkB,GAAwB;CACzE,IAAM,KAAO,MACX,IAAI,KAAK,EAAM,CAAC,mBAAmB,KAAA,GAAW;EAAE,OAAO;EAAS,KAAK;EAAW,MAAM;EAAW,CAAC;AAIpG,QAHI,KAAY,IAAe,GAAG,EAAI,EAAS,CAAC,KAAK,EAAI,EAAO,KAC5D,IAAiB,QAAQ,EAAI,EAAS,KACtC,IAAe,SAAS,EAAI,EAAO,KAChC;;AAST,SAAgB,EAAgB,GAAkB,GAA4B,GAA+B;AAC3G,KAAI,CAAC,OAAO,SAAS,EAAS,IAAI,KAAY,KAAK,CAAC,OAAO,SAAS,EAAc,IAAI,KAAiB,EACrG,QAAO;CAET,IAAM,IAAM,MAAiB,YAAa,IAAW,IAAiB,MAAM;AAC5E,QAAO,KAAK,IAAI,KAAK,IAAI,GAAK,EAAE,EAAE,EAAS;;AAI7C,SAAgB,EAAiB,GAA4B,GAAgC,GAA0B;CACrH,IAAM,IAAQ,OAAO,KAAkB,WAAW,IAAgB,OAAO,EAAc;AAIvF,QAHI,MAAiB,YACZ,GAAG,OAAO,SAAS,EAAM,GAAG,IAAQ,EAAc,SAEpD,GAAG,OAAO,SAAS,EAAM,GAAG,EAAY,GAAO,EAAS,GAAG,EAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/eventfullymanaged/pages/events/EventDetailPage.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EventDetailPage.d.ts","sourceRoot":"","sources":["../../../../src/eventfullymanaged/pages/events/EventDetailPage.tsx"],"names":[],"mappings":"AAurBA,MAAM,CAAC,OAAO,UAAU,eAAe,4CAsPtC"}
|