@odla-ai/chapter 0.56.1 → 0.57.0

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.
@@ -1,8 +1,8 @@
1
1
  import * as preact from 'preact';
2
2
  import { ComponentChildren, JSX } from 'preact';
3
3
  import { CrmClient, Crm, CrmRecord, FieldType } from '@odla-ai/crm';
4
- import { a as Chapter, b as ChapterCopy, M as MemberContentDocument, E as EffectiveMemberContent, c as MemberContentTierAuthority } from '../../copy-context-CaUXIxUI.js';
5
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-CaUXIxUI.js';
4
+ import { a as Chapter, b as ChapterCopy, M as MemberContentDocument, E as EffectiveMemberContent, c as MemberContentTierAuthority } from '../../copy-context-DE4YMAbz.js';
5
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-DE4YMAbz.js';
6
6
  import { CrmLifecycleAdapter, CrmWorkspaceMasterContext, CrmWorkspaceRecordContext, RecordPanelTab } from '@odla-ai/crm/ui';
7
7
 
8
8
  /** Normalized public auth configuration consumed by the Clerk gate. */
@@ -290,7 +290,8 @@ interface NamedSeatRecordPanelProps {
290
290
  superAdmin: boolean;
291
291
  onChanged?: () => void;
292
292
  }
293
- /** The purchaser's additional seat beside their billing: who it is for, where it stands, and the one manual refund. */
293
+ /** The purchaser's additional seat beside their billing: who it is for, where it stands, the one manual refund, and, while the
294
+ * seat is not yet active, naming a different recipient on the purchaser's behalf. */
294
295
  declare function NamedSeatRecordPanel(props: NamedSeatRecordPanelProps): preact.JSX.Element | null;
295
296
 
296
297
  /** The membership workflow's own statuses. A person reaches them only through an application, never by hand. */
@@ -42,11 +42,11 @@ import {
42
42
  networkRecordsWorkspace,
43
43
  peopleSection,
44
44
  useAdminResource
45
- } from "../../chunk-ZAE24YKY.js";
45
+ } from "../../chunk-L2IPS2FQ.js";
46
46
  import {
47
47
  ChapterCopyProvider,
48
48
  useChapterCopy
49
- } from "../../chunk-4M2PN5K3.js";
49
+ } from "../../chunk-FHKZVF5G.js";
50
50
  export {
51
51
  APPLICATION_STAGES,
52
52
  AdminNote,
@@ -1,6 +1,6 @@
1
1
  export { APPLICATION_STAGES, AdminAccountMenuProps, AdminBuilderLibraryData, AdminChrome, AdminMemberContentData, AdminNote, AdminPage, AdminResource, AdminRouteState, AdminRouteTarget, AdminRouting, AdminSection, AdminSectionContext, AdminWorkspace, AdminWorkspaceFrameProps, AdminWorkspaceNavProps, AdmissionGrantsWorkspace, AvailabilitySectionOptions, BillingSectionOptions, BuilderLibraryAdmin, CandidateStagePanel, CandidateStagePanelProps, ChapterAdmin, ChapterAdminAuthAdapter, ChapterAdminAuthConfig, ChapterAdminAuthLoadContext, ChapterAdminProps, ChapterAdminUser, CollectionSectionOptions, DashboardSectionOptions, EmailSectionOptions, LeaderAdmissionAction, LeaderAdmissionActionProps, LeaderNetworkOverview, MeetingsSectionOptions, MemberContentAdmin, MembershipPolicyVersions, MembershipPolicyVersionsProps, NamedSeatRecordPanel, NamedSeatRecordPanelProps, NetworkRecordEditor, NetworkRecordsWorkspace, NetworkSeatBilling, NetworkShareActions, NetworkShareActionsProps, Panel, PaymentRecoveryQueue, PeopleSectionOptions, RecordActions, RecordActionsProps, RecordAdmissionPanel, RecordAdmissionPanelProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, builderLibrarySection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource } from './admin/index.js';
2
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../copy-context-CaUXIxUI.js';
3
- export { ApiFn, BrandStyle, BrandStyleProps, CheckoutSeatEditor, CheckoutSeatEditorContext, GiftCodeRedeemResult, GiftCodeRedeemer, GiftCodeRedeemerCopy, GiftCodeRedeemerProps, GiftOfferCards, GiftOfferCardsMode, GiftOfferCardsProps, GiftPurchases, GiftPurchasesProps, JoinBookingSimulation, JoinConfig, JoinFlowState, JoinIsland, JoinIslandProps, JoinSimulation, JoinStepRenderContext, JoinSubmitRenderContext, JoinTier, JoinTierRenderContext, JourneyFrame, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, MemberContentAreaProps, MemberGifts, MemberProvisionalRenderContext, MemberRestart, MembersArea, MembersAreaProps, MembershipCardTokenName, MembershipCards, MembershipCardsMode, MembershipCardsProps, NAMED_SEAT_RECIPIENT_WORDS, NamedSeatPurchase, NamedSeatRecipientLine, PaymentPriceLines, PaymentStep, PaymentStepProps, PaymentStepSimulation, RescheduleProps, Rescheduler, Slot, SlotPicker, SlotPickerClasses, SlotPickerProps, SubResponse, TierPlaceholder, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, loadJoinResume, membershipApplicationHref, tierNeedsPayment, timeLabel, tzShort, useTierSelection } from './member/index.js';
2
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../copy-context-DE4YMAbz.js';
3
+ export { ADDITIONAL_MEMBER_COPY, AdditionalMemberCopy, AdditionalMemberDraft, AdditionalMemberEditor, AdditionalMemberEditorOptions, AdditionalMemberEditorProps, AdditionalMemberFieldNames, AdditionalMemberFields, AdditionalMemberFieldsProps, AdditionalMemberOffer, AdditionalMemberOptions, ApiFn, BrandStyle, BrandStyleProps, CheckoutSeatEditor, CheckoutSeatEditorContext, GiftCodeRedeemResult, GiftCodeRedeemer, GiftCodeRedeemerCopy, GiftCodeRedeemerProps, GiftOfferCards, GiftOfferCardsMode, GiftOfferCardsProps, GiftPurchases, GiftPurchasesProps, JoinBookingSimulation, JoinConfig, JoinFlowState, JoinIsland, JoinIslandProps, JoinSimulation, JoinStepRenderContext, JoinSubmitButton, JoinSubmitRenderContext, JoinTier, JoinTierRenderContext, JourneyFrame, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, MemberContentAreaProps, MemberGifts, MemberProvisionalRenderContext, MemberRestart, MembersArea, MembersAreaProps, MembershipCardTokenName, MembershipCards, MembershipCardsMode, MembershipCardsProps, NAMED_SEAT_RECIPIENT_WORDS, NamedSeatPurchase, NamedSeatRecipientLine, PaymentPriceLines, PaymentStep, PaymentStepProps, PaymentStepSimulation, RescheduleProps, Rescheduler, Slot, SlotPicker, SlotPickerClasses, SlotPickerProps, SubResponse, TierPlaceholder, additionalMemberSelection, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, loadJoinResume, membershipApplicationHref, tierNeedsPayment, timeLabel, tzShort, useTierSelection } from './member/index.js';
4
4
  import 'preact';
5
5
  import '@odla-ai/crm';
6
6
  import '@odla-ai/crm/ui';
package/dist/ui/index.js CHANGED
@@ -1,8 +1,12 @@
1
1
  import {
2
+ ADDITIONAL_MEMBER_COPY,
3
+ AdditionalMemberEditor,
4
+ AdditionalMemberFields,
2
5
  GiftCodeRedeemer,
3
6
  GiftOfferCards,
4
7
  GiftPurchases,
5
8
  JoinIsland,
9
+ JoinSubmitButton,
6
10
  JourneyFrame,
7
11
  MEMBERSHIP_CARD_TOKEN_DEFAULTS,
8
12
  MemberContentArea,
@@ -17,6 +21,7 @@ import {
17
21
  Rescheduler,
18
22
  SlotPicker,
19
23
  TierPlaceholder,
24
+ additionalMemberSelection,
20
25
  dayKey,
21
26
  dayLabel,
22
27
  fmtDate,
@@ -29,7 +34,7 @@ import {
29
34
  timeLabel,
30
35
  tzShort,
31
36
  useTierSelection
32
- } from "../chunk-NK267YQZ.js";
37
+ } from "../chunk-CKC6X5H2.js";
33
38
  import {
34
39
  APPLICATION_STAGES,
35
40
  AdminNote,
@@ -74,15 +79,18 @@ import {
74
79
  networkRecordsWorkspace,
75
80
  peopleSection,
76
81
  useAdminResource
77
- } from "../chunk-ZAE24YKY.js";
82
+ } from "../chunk-L2IPS2FQ.js";
78
83
  import {
79
84
  BrandStyle,
80
85
  ChapterCopyProvider,
81
86
  useChapterCopy
82
- } from "../chunk-4M2PN5K3.js";
87
+ } from "../chunk-FHKZVF5G.js";
83
88
  import "../chunk-IVXVECKR.js";
84
89
  export {
90
+ ADDITIONAL_MEMBER_COPY,
85
91
  APPLICATION_STAGES,
92
+ AdditionalMemberEditor,
93
+ AdditionalMemberFields,
86
94
  AdminNote,
87
95
  AdminPage,
88
96
  AdmissionGrantsWorkspace,
@@ -95,6 +103,7 @@ export {
95
103
  GiftOfferCards,
96
104
  GiftPurchases,
97
105
  JoinIsland,
106
+ JoinSubmitButton,
98
107
  JourneyFrame,
99
108
  LeaderAdmissionAction,
100
109
  LeaderNetworkOverview,
@@ -123,6 +132,7 @@ export {
123
132
  SlotPicker,
124
133
  ThemeWarning,
125
134
  TierPlaceholder,
135
+ additionalMemberSelection,
126
136
  adminFetch,
127
137
  adminRouteFromUrl,
128
138
  adminRouteHref,
@@ -1,7 +1,7 @@
1
1
  import * as preact from 'preact';
2
2
  import { ComponentChildren, JSX } from 'preact';
3
- import { d as MemberContentProjection, e as MemberContentPageProjection, b as ChapterCopy, f as ChapterBrand } from '../../copy-context-CaUXIxUI.js';
4
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-CaUXIxUI.js';
3
+ import { d as MemberContentProjection, e as MemberContentPageProjection, b as ChapterCopy, f as ChapterBrand } from '../../copy-context-DE4YMAbz.js';
4
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-DE4YMAbz.js';
5
5
  import { FieldType, FieldConditions } from '@odla-ai/crm';
6
6
 
7
7
  /** A bookable slot: a start instant in epoch milliseconds. */
@@ -400,6 +400,82 @@ interface CheckoutSeatEditorContext {
400
400
  /** Host-owned recipient fields reused from the application instead of a second checkout editor. */
401
401
  type CheckoutSeatEditor = (context: CheckoutSeatEditorContext) => ComponentChildren;
402
402
 
403
+ /** Editable additional-member values retained while the selection checkbox is off. */
404
+ interface AdditionalMemberDraft {
405
+ /** Whether the applicant wants to include this recipient. */
406
+ selected: boolean;
407
+ /** Recipient's full name. */
408
+ name: string;
409
+ /** Recipient's email address. */
410
+ email: string;
411
+ }
412
+ /** Price information supplied by the membership authority; zero means included. */
413
+ interface AdditionalMemberOffer {
414
+ /** Additional amount in minor currency units. */
415
+ amountCents: number;
416
+ /** ISO currency code; defaults to USD for display. */
417
+ currency?: string;
418
+ /** Billing interval; defaults to year for display. */
419
+ interval?: string;
420
+ }
421
+ /** Site wording for shared recipient controls; behavior and validation remain in Chapter. */
422
+ interface AdditionalMemberCopy {
423
+ /** Heading above the selection. */
424
+ label: string;
425
+ /** Checkbox label for an included recipient. */
426
+ includedChoice: string;
427
+ /** Checkbox label for a paid recipient. */
428
+ paidChoice: string;
429
+ /** Explanation when the additional membership costs zero. */
430
+ includedHint: string;
431
+ /** Explanation when the authority has not supplied a price yet. */
432
+ pendingHint: string;
433
+ /** Heading when editing a previously selected recipient. */
434
+ editTitle: string;
435
+ }
436
+ /** Form field names must match the host's server-side application field contract. */
437
+ interface AdditionalMemberFieldNames {
438
+ /** Selection checkbox field. */
439
+ selected: string;
440
+ /** Full-name field. */
441
+ name: string;
442
+ /** Email field. */
443
+ email: string;
444
+ }
445
+ /** Presentation options shared by the initial fields and the checkout editor. */
446
+ interface AdditionalMemberOptions {
447
+ /** Overrides for site-specific language. */
448
+ copy?: Partial<AdditionalMemberCopy>;
449
+ /** Application field names; defaults use the additionalMember prefix. */
450
+ names?: Partial<AdditionalMemberFieldNames>;
451
+ }
452
+ /** Controlled field props for application composition. */
453
+ interface AdditionalMemberFieldsProps extends AdditionalMemberOptions {
454
+ /** Current draft, including details retained when unchecked. */
455
+ value: AdditionalMemberDraft;
456
+ /** Receive the next draft after a field changes. */
457
+ onChange: (value: AdditionalMemberDraft) => void;
458
+ /** Authoritative additional-member price, when available. */
459
+ offer?: AdditionalMemberOffer;
460
+ }
461
+ /** Default wording for additional-member controls. */
462
+ declare const ADDITIONAL_MEMBER_COPY: AdditionalMemberCopy;
463
+ /** Convert an editor draft to the selection accepted by checkout; null removes the recipient. */
464
+ declare function additionalMemberSelection(value: AdditionalMemberDraft): CheckoutNamedSeatSelection | null;
465
+ /** One field set for included and paid recipients, reused on Apply and when editing checkout details. */
466
+ declare function AdditionalMemberFields({ value, onChange, offer, ...options }: AdditionalMemberFieldsProps): preact.JSX.Element;
467
+
468
+ /** Optional host notification after Chapter saves the selection successfully. */
469
+ interface AdditionalMemberEditorOptions extends AdditionalMemberOptions {
470
+ /** Sync the application's draft after a successful save or removal. */
471
+ onSaved?: (value: AdditionalMemberDraft) => void;
472
+ }
473
+ /** Shared editor receives the server-saved recipient and authoritative save/cancel actions. */
474
+ interface AdditionalMemberEditorProps extends CheckoutSeatEditorContext, AdditionalMemberEditorOptions {
475
+ }
476
+ /** Own validation, saving, error recovery and action layout for included and paid recipients. */
477
+ declare function AdditionalMemberEditor({ selection, offer, save, cancel, onSaved, ...options }: AdditionalMemberEditorProps): preact.JSX.Element;
478
+
403
479
  /** The public join config (the shape `GET /api/join-config` returns). */
404
480
  interface JoinConfig {
405
481
  id: string;
@@ -460,6 +536,7 @@ interface JoinStepRenderContext {
460
536
  /** Submission state supplied to a site's submit-control render slot. */
461
537
  interface JoinSubmitRenderContext {
462
538
  submitting: boolean;
539
+ /** True while submitting, while a host gate is closed, or while required form/recipient fields are invalid. */
463
540
  disabled: boolean;
464
541
  }
465
542
  /** Props for {@link JoinIsland}. */
@@ -512,6 +589,8 @@ interface JoinIslandProps {
512
589
  recipientName: string;
513
590
  recipientEmail: string;
514
591
  };
592
+ /** Use Chapter's recipient editor and read-only checkout review; configure only copy and field names. */
593
+ additionalMember?: AdditionalMemberEditorOptions;
515
594
  /** Reuse the application's recipient fields for edits. Checkout automatically quotes initialNamedSeat and shows a read-only review. */
516
595
  renderNamedSeatEditor?: CheckoutSeatEditor;
517
596
  /** Heading for the read-only recipient review. Defaults to Additional member. */
@@ -724,11 +803,18 @@ interface NamedSeatOfferSeat {
724
803
  acceptedAt?: number;
725
804
  /** When the recipient's own application was approved; the seat is active from then, once the primary is. */
726
805
  joinedAt?: number;
806
+ /** True while the invitation waits for the buying member's own approval; nothing has been sent to the recipient yet. */
807
+ invitationHeld?: true;
808
+ /** True while the purchaser may still name someone else: the seat is invited or accepted but not yet active. */
809
+ regiftable?: true;
810
+ /** When the purchaser last replaced the recipient. */
811
+ regiftedAt?: number;
727
812
  }
728
813
 
729
814
  /** What the purchaser reads about the person they named, keyed by the offer's `recipientState`. */
730
815
  declare const NAMED_SEAT_RECIPIENT_WORDS: Record<NamedSeatOfferSeat["recipientState"], string>;
731
- /** One line on the named recipient: who they are and whether they accepted or joined. */
816
+ /** One line on the named recipient: who they are and whether they accepted or joined. An invitation the network holds until
817
+ * the purchaser's own approval says so, instead of claiming it was sent. */
732
818
  declare function NamedSeatRecipientLine({ seat }: {
733
819
  seat: NamedSeatOfferSeat;
734
820
  }): preact.JSX.Element;
@@ -743,4 +829,7 @@ declare function JourneyFrame({ children }: {
743
829
  children: ComponentChildren;
744
830
  }): preact.JSX.Element;
745
831
 
746
- export { type ApiFn, BrandStyle, type BrandStyleProps, type CheckoutSeatEditor, type CheckoutSeatEditorContext, type GiftCodeRedeemResult, GiftCodeRedeemer, type GiftCodeRedeemerCopy, type GiftCodeRedeemerProps, GiftOfferCards, type GiftOfferCardsMode, type GiftOfferCardsProps, GiftPurchases, type GiftPurchasesProps, type JoinBookingSimulation, type JoinConfig, type JoinFlowState, JoinIsland, type JoinIslandProps, type JoinSimulation, type JoinStepRenderContext, type JoinSubmitRenderContext, type JoinTier, type JoinTierRenderContext, JourneyFrame, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, type MemberContentAreaProps, MemberGifts, type MemberProvisionalRenderContext, MemberRestart, MembersArea, type MembersAreaProps, type MembershipCardTokenName, MembershipCards, type MembershipCardsMode, type MembershipCardsProps, NAMED_SEAT_RECIPIENT_WORDS, NamedSeatPurchase, NamedSeatRecipientLine, type PaymentPriceLines, PaymentStep, type PaymentStepProps, type PaymentStepSimulation, type RescheduleProps, Rescheduler, type Slot, SlotPicker, type SlotPickerClasses, type SlotPickerProps, type SubResponse, TierPlaceholder, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, loadJoinResume, membershipApplicationHref, tierNeedsPayment, timeLabel, tzShort, useTierSelection };
832
+ /** A themed application submit control. Pass the disabled state supplied by JoinIsland's renderSubmit slot. */
833
+ declare function JoinSubmitButton(props: JSX.ButtonHTMLAttributes<HTMLButtonElement>): JSX.Element;
834
+
835
+ export { ADDITIONAL_MEMBER_COPY, type AdditionalMemberCopy, type AdditionalMemberDraft, AdditionalMemberEditor, type AdditionalMemberEditorOptions, type AdditionalMemberEditorProps, type AdditionalMemberFieldNames, AdditionalMemberFields, type AdditionalMemberFieldsProps, type AdditionalMemberOffer, type AdditionalMemberOptions, type ApiFn, BrandStyle, type BrandStyleProps, type CheckoutSeatEditor, type CheckoutSeatEditorContext, type GiftCodeRedeemResult, GiftCodeRedeemer, type GiftCodeRedeemerCopy, type GiftCodeRedeemerProps, GiftOfferCards, type GiftOfferCardsMode, type GiftOfferCardsProps, GiftPurchases, type GiftPurchasesProps, type JoinBookingSimulation, type JoinConfig, type JoinFlowState, JoinIsland, type JoinIslandProps, type JoinSimulation, type JoinStepRenderContext, JoinSubmitButton, type JoinSubmitRenderContext, type JoinTier, type JoinTierRenderContext, JourneyFrame, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, type MemberContentAreaProps, MemberGifts, type MemberProvisionalRenderContext, MemberRestart, MembersArea, type MembersAreaProps, type MembershipCardTokenName, MembershipCards, type MembershipCardsMode, type MembershipCardsProps, NAMED_SEAT_RECIPIENT_WORDS, NamedSeatPurchase, NamedSeatRecipientLine, type PaymentPriceLines, PaymentStep, type PaymentStepProps, type PaymentStepSimulation, type RescheduleProps, Rescheduler, type Slot, SlotPicker, type SlotPickerClasses, type SlotPickerProps, type SubResponse, TierPlaceholder, additionalMemberSelection, dayKey, dayLabel, fmtDate, fmtMoney, fullLabel, groupSlotsByDay, loadJoinResume, membershipApplicationHref, tierNeedsPayment, timeLabel, tzShort, useTierSelection };
@@ -1,8 +1,12 @@
1
1
  import {
2
+ ADDITIONAL_MEMBER_COPY,
3
+ AdditionalMemberEditor,
4
+ AdditionalMemberFields,
2
5
  GiftCodeRedeemer,
3
6
  GiftOfferCards,
4
7
  GiftPurchases,
5
8
  JoinIsland,
9
+ JoinSubmitButton,
6
10
  JourneyFrame,
7
11
  MEMBERSHIP_CARD_TOKEN_DEFAULTS,
8
12
  MemberContentArea,
@@ -17,6 +21,7 @@ import {
17
21
  Rescheduler,
18
22
  SlotPicker,
19
23
  TierPlaceholder,
24
+ additionalMemberSelection,
20
25
  dayKey,
21
26
  dayLabel,
22
27
  fmtDate,
@@ -29,20 +34,24 @@ import {
29
34
  timeLabel,
30
35
  tzShort,
31
36
  useTierSelection
32
- } from "../../chunk-NK267YQZ.js";
37
+ } from "../../chunk-CKC6X5H2.js";
33
38
  import {
34
39
  BrandStyle,
35
40
  ChapterCopyProvider,
36
41
  useChapterCopy
37
- } from "../../chunk-4M2PN5K3.js";
42
+ } from "../../chunk-FHKZVF5G.js";
38
43
  import "../../chunk-IVXVECKR.js";
39
44
  export {
45
+ ADDITIONAL_MEMBER_COPY,
46
+ AdditionalMemberEditor,
47
+ AdditionalMemberFields,
40
48
  BrandStyle,
41
49
  ChapterCopyProvider,
42
50
  GiftCodeRedeemer,
43
51
  GiftOfferCards,
44
52
  GiftPurchases,
45
53
  JoinIsland,
54
+ JoinSubmitButton,
46
55
  JourneyFrame,
47
56
  MEMBERSHIP_CARD_TOKEN_DEFAULTS,
48
57
  MemberContentArea,
@@ -57,6 +66,7 @@ export {
57
66
  Rescheduler,
58
67
  SlotPicker,
59
68
  TierPlaceholder,
69
+ additionalMemberSelection,
60
70
  dayKey,
61
71
  dayLabel,
62
72
  fmtDate,