@odla-ai/chapter 0.49.0 → 0.51.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-By4Nq7yB.js';
5
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-By4Nq7yB.js';
4
+ import { a as Chapter, b as ChapterCopy, M as MemberContentDocument, E as EffectiveMemberContent, c as MemberContentTierAuthority } from '../../copy-context-Ddat__H5.js';
5
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Ddat__H5.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. */
@@ -166,8 +166,12 @@ declare function defaultAdminWorkspaces(chapter: Chapter): AdminWorkspace[];
166
166
  /** Legacy default catalog. @deprecated Use defaultAdminWorkspaces. */
167
167
  declare function defaultAdminSections(chapter: Chapter): AdminSection[];
168
168
 
169
- /** Application-authoritative stage transitions used by Chapter collections. */
170
- declare function applicationLifecycleAdapter(ctx: Pick<AdminSectionContext, "getToken">, copy?: ChapterCopy["admin"]["records"]): CrmLifecycleAdapter;
169
+ /** Application-authoritative stage transitions used by Chapter collections. A
170
+ * person with no application may still move between the CRM's own pre-application
171
+ * stages; the server refuses any application status that is not earned. */
172
+ declare function applicationLifecycleAdapter(ctx: Pick<AdminSectionContext, "getToken"> & {
173
+ client?: CrmClient;
174
+ }, copy?: ChapterCopy["admin"]["records"]): CrmLifecycleAdapter;
171
175
 
172
176
  /** Configuration for the person-collection compatibility preset. */
173
177
  interface PeopleSectionOptions {
@@ -185,6 +189,8 @@ interface CollectionSectionOptions {
185
189
  lifecycle?: boolean;
186
190
  roles?: readonly string[];
187
191
  networkSharing?: boolean;
192
+ /** Stages owned by the application workflow. Defaults to Chapter's standard application statuses. */
193
+ applicationStages?: readonly string[];
188
194
  /** Give the collection list the full workspace width until a record opens. */
189
195
  collapseClosedDetail?: boolean;
190
196
  lifecycleAdapter?: (CrmLifecycleAdapter | ((ctx: AdminSectionContext) => CrmLifecycleAdapter));
@@ -275,6 +281,47 @@ interface RecordActionsProps {
275
281
  * actions the record supports. */
276
282
  declare function RecordActions({ getToken, record, roles, onChanged }: RecordActionsProps): preact.JSX.Element | null;
277
283
 
284
+ /** Props for {@link NamedSeatRecordPanel}. */
285
+ interface NamedSeatRecordPanelProps {
286
+ getToken: () => Promise<string | null>;
287
+ /** The purchaser's application; a recipient's own application has no seat panel. */
288
+ applicationId: string;
289
+ /** Only a super admin may see or refund a gifted seat; others see nothing. */
290
+ superAdmin: boolean;
291
+ onChanged?: () => void;
292
+ }
293
+ /** The purchaser's additional seat beside their billing: who it is for, where it stands, and the one manual refund. */
294
+ declare function NamedSeatRecordPanel(props: NamedSeatRecordPanelProps): preact.JSX.Element | null;
295
+
296
+ /** The membership workflow's own statuses. A person reaches them only through an application, never by hand. */
297
+ declare const APPLICATION_STAGES: readonly string[];
298
+ /** Props for {@link CandidateStagePanel}. */
299
+ interface CandidateStagePanelProps {
300
+ /** The CRM person pipeline as configured by the host. */
301
+ stages: readonly {
302
+ id: string;
303
+ label?: string;
304
+ }[];
305
+ current: string | null;
306
+ /** Stages owned by the application workflow; everything else is a pre-application stage an admin may set. */
307
+ applicationStages: readonly string[];
308
+ onMove: (to: string) => Promise<unknown>;
309
+ }
310
+ /** Stage control for a person with no linked application: invited people and candidates move only through the
311
+ * CRM's pre-application stages, on a chapter exactly as on the network owner. */
312
+ declare function CandidateStagePanel(props: CandidateStagePanelProps): preact.JSX.Element;
313
+
314
+ /** Props for {@link RecordAdmissionPanel}. */
315
+ interface RecordAdmissionPanelProps {
316
+ getToken: () => Promise<string | null>;
317
+ /** The record's email; the admission ledger is keyed by exact email. */
318
+ email: string | null;
319
+ onChanged?: () => void;
320
+ }
321
+ /** The invitation setting for one person, on the chapter itself: what their next signup will require, who set it,
322
+ * and a way for any admin to set or revoke it without leaving the record. Mirrors the leader's "Next invitation". */
323
+ declare function RecordAdmissionPanel(props: RecordAdmissionPanelProps): preact.JSX.Element;
324
+
278
325
  /** Privacy-bounded CRM record returned by a follower to one configured,
279
326
  * authenticated reader. */
280
327
  interface NetworkRecord {
@@ -543,9 +590,10 @@ declare function PaymentRecoveryQueue(props: {
543
590
  scope?: "chapter" | "network";
544
591
  }): preact.JSX.Element;
545
592
 
546
- /** Read-only named-seat commercial objects, already included once in network financial totals. */
593
+ /** Named-seat commercial objects, already included once in network financial totals, with the super admin's manual refund.
594
+ * Seats are never refunded automatically; the button asks the membership authority to return one seat's payment. */
547
595
  declare function NetworkSeatBilling(props: {
548
596
  getToken: () => Promise<string | null>;
549
597
  }): preact.JSX.Element;
550
598
 
551
- export { type AdminAccountMenuProps, type AdminBuilderLibraryData, type AdminChrome, type AdminMemberContentData, AdminNote, AdminPage, type AdminResource, type AdminRouteState, type AdminRouteTarget, type AdminRouting, type AdminSection, type AdminSectionContext, type AdminWorkspace, type AdminWorkspaceFrameProps, type AdminWorkspaceNavProps, AdmissionGrantsWorkspace, type AvailabilitySectionOptions, type BillingSectionOptions, BuilderLibraryAdmin, ChapterAdmin, type ChapterAdminAuthAdapter, type ChapterAdminAuthConfig, type ChapterAdminAuthLoadContext, type ChapterAdminProps, type ChapterAdminUser, type CollectionSectionOptions, type DashboardSectionOptions, type EmailSectionOptions, LeaderAdmissionAction, type LeaderAdmissionActionProps, LeaderNetworkOverview, type MeetingsSectionOptions, MemberContentAdmin, NetworkRecordEditor, NetworkRecordsWorkspace, NetworkSeatBilling, NetworkShareActions, type NetworkShareActionsProps, Panel, PaymentRecoveryQueue, type PeopleSectionOptions, RecordActions, type RecordActionsProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, builderLibrarySection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource };
599
+ export { APPLICATION_STAGES, type AdminAccountMenuProps, type AdminBuilderLibraryData, type AdminChrome, type AdminMemberContentData, AdminNote, AdminPage, type AdminResource, type AdminRouteState, type AdminRouteTarget, type AdminRouting, type AdminSection, type AdminSectionContext, type AdminWorkspace, type AdminWorkspaceFrameProps, type AdminWorkspaceNavProps, AdmissionGrantsWorkspace, type AvailabilitySectionOptions, type BillingSectionOptions, BuilderLibraryAdmin, CandidateStagePanel, type CandidateStagePanelProps, ChapterAdmin, type ChapterAdminAuthAdapter, type ChapterAdminAuthConfig, type ChapterAdminAuthLoadContext, type ChapterAdminProps, type ChapterAdminUser, type CollectionSectionOptions, type DashboardSectionOptions, type EmailSectionOptions, LeaderAdmissionAction, type LeaderAdmissionActionProps, LeaderNetworkOverview, type MeetingsSectionOptions, MemberContentAdmin, NamedSeatRecordPanel, type NamedSeatRecordPanelProps, NetworkRecordEditor, NetworkRecordsWorkspace, NetworkSeatBilling, NetworkShareActions, type NetworkShareActionsProps, Panel, PaymentRecoveryQueue, type PeopleSectionOptions, RecordActions, type RecordActionsProps, RecordAdmissionPanel, type RecordAdmissionPanelProps, ThemeWarning, adminFetch, adminRouteFromUrl, adminRouteHref, adminSectionFromUrl, adminSectionHref, admissionGrantsWorkspace, applicationLifecycleAdapter, availabilitySection, billingSection, builderLibrarySection, collectionSection, dashboardSection, defaultAdminSections, defaultAdminWorkspaces, emailSection, loadChapterAdminConfig, loadChapterAdminUser, meetingsSection, memberContentSection, networkRecordsWorkspace, peopleSection, useAdminResource };
@@ -1,12 +1,15 @@
1
1
  import {
2
+ APPLICATION_STAGES,
2
3
  AdminNote,
3
4
  AdminPage,
4
5
  AdmissionGrantsWorkspace,
5
6
  BuilderLibraryAdmin,
7
+ CandidateStagePanel,
6
8
  ChapterAdmin,
7
9
  LeaderAdmissionAction,
8
10
  LeaderNetworkOverview,
9
11
  MemberContentAdmin,
12
+ NamedSeatRecordPanel,
10
13
  NetworkRecordEditor,
11
14
  NetworkRecordsWorkspace,
12
15
  NetworkSeatBilling,
@@ -14,6 +17,7 @@ import {
14
17
  Panel,
15
18
  PaymentRecoveryQueue,
16
19
  RecordActions,
20
+ RecordAdmissionPanel,
17
21
  ThemeWarning,
18
22
  adminFetch,
19
23
  adminRouteFromUrl,
@@ -37,21 +41,24 @@ import {
37
41
  networkRecordsWorkspace,
38
42
  peopleSection,
39
43
  useAdminResource
40
- } from "../../chunk-KXIGZWG5.js";
44
+ } from "../../chunk-4EA5V4JE.js";
41
45
  import {
42
46
  ChapterCopyProvider,
43
47
  useChapterCopy
44
- } from "../../chunk-N2JIKINY.js";
48
+ } from "../../chunk-JXX4BFDP.js";
45
49
  export {
50
+ APPLICATION_STAGES,
46
51
  AdminNote,
47
52
  AdminPage,
48
53
  AdmissionGrantsWorkspace,
49
54
  BuilderLibraryAdmin,
55
+ CandidateStagePanel,
50
56
  ChapterAdmin,
51
57
  ChapterCopyProvider,
52
58
  LeaderAdmissionAction,
53
59
  LeaderNetworkOverview,
54
60
  MemberContentAdmin,
61
+ NamedSeatRecordPanel,
55
62
  NetworkRecordEditor,
56
63
  NetworkRecordsWorkspace,
57
64
  NetworkSeatBilling,
@@ -59,6 +66,7 @@ export {
59
66
  Panel,
60
67
  PaymentRecoveryQueue,
61
68
  RecordActions,
69
+ RecordAdmissionPanel,
62
70
  ThemeWarning,
63
71
  adminFetch,
64
72
  adminRouteFromUrl,
@@ -1,5 +1,5 @@
1
- export { AdminAccountMenuProps, AdminBuilderLibraryData, AdminChrome, AdminMemberContentData, AdminNote, AdminPage, AdminResource, AdminRouteState, AdminRouteTarget, AdminRouting, AdminSection, AdminSectionContext, AdminWorkspace, AdminWorkspaceFrameProps, AdminWorkspaceNavProps, AdmissionGrantsWorkspace, AvailabilitySectionOptions, BillingSectionOptions, BuilderLibraryAdmin, ChapterAdmin, ChapterAdminAuthAdapter, ChapterAdminAuthConfig, ChapterAdminAuthLoadContext, ChapterAdminProps, ChapterAdminUser, CollectionSectionOptions, DashboardSectionOptions, EmailSectionOptions, LeaderAdmissionAction, LeaderAdmissionActionProps, LeaderNetworkOverview, MeetingsSectionOptions, MemberContentAdmin, NetworkRecordEditor, NetworkRecordsWorkspace, NetworkSeatBilling, NetworkShareActions, NetworkShareActionsProps, Panel, PaymentRecoveryQueue, PeopleSectionOptions, RecordActions, RecordActionsProps, 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-By4Nq7yB.js';
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, 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-Ddat__H5.js';
3
3
  export { ApiFn, BrandStyle, BrandStyleProps, 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, 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';
4
4
  import 'preact';
5
5
  import '@odla-ai/crm';
package/dist/ui/index.js CHANGED
@@ -26,16 +26,19 @@ import {
26
26
  timeLabel,
27
27
  tzShort,
28
28
  useTierSelection
29
- } from "../chunk-KHDO2QFA.js";
29
+ } from "../chunk-UAXWA5BL.js";
30
30
  import {
31
+ APPLICATION_STAGES,
31
32
  AdminNote,
32
33
  AdminPage,
33
34
  AdmissionGrantsWorkspace,
34
35
  BuilderLibraryAdmin,
36
+ CandidateStagePanel,
35
37
  ChapterAdmin,
36
38
  LeaderAdmissionAction,
37
39
  LeaderNetworkOverview,
38
40
  MemberContentAdmin,
41
+ NamedSeatRecordPanel,
39
42
  NetworkRecordEditor,
40
43
  NetworkRecordsWorkspace,
41
44
  NetworkSeatBilling,
@@ -43,6 +46,7 @@ import {
43
46
  Panel,
44
47
  PaymentRecoveryQueue,
45
48
  RecordActions,
49
+ RecordAdmissionPanel,
46
50
  ThemeWarning,
47
51
  adminFetch,
48
52
  adminRouteFromUrl,
@@ -66,19 +70,21 @@ import {
66
70
  networkRecordsWorkspace,
67
71
  peopleSection,
68
72
  useAdminResource
69
- } from "../chunk-KXIGZWG5.js";
73
+ } from "../chunk-4EA5V4JE.js";
70
74
  import {
71
75
  BrandStyle,
72
76
  ChapterCopyProvider,
73
77
  useChapterCopy
74
- } from "../chunk-N2JIKINY.js";
78
+ } from "../chunk-JXX4BFDP.js";
75
79
  import "../chunk-IVXVECKR.js";
76
80
  export {
81
+ APPLICATION_STAGES,
77
82
  AdminNote,
78
83
  AdminPage,
79
84
  AdmissionGrantsWorkspace,
80
85
  BrandStyle,
81
86
  BuilderLibraryAdmin,
87
+ CandidateStagePanel,
82
88
  ChapterAdmin,
83
89
  ChapterCopyProvider,
84
90
  GiftCodeRedeemer,
@@ -95,6 +101,7 @@ export {
95
101
  MemberRestart,
96
102
  MembersArea,
97
103
  MembershipCards,
104
+ NamedSeatRecordPanel,
98
105
  NetworkRecordEditor,
99
106
  NetworkRecordsWorkspace,
100
107
  NetworkSeatBilling,
@@ -103,6 +110,7 @@ export {
103
110
  PaymentRecoveryQueue,
104
111
  PaymentStep,
105
112
  RecordActions,
113
+ RecordAdmissionPanel,
106
114
  Rescheduler,
107
115
  SlotPicker,
108
116
  ThemeWarning,
@@ -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-By4Nq7yB.js';
4
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-By4Nq7yB.js';
3
+ import { d as MemberContentProjection, e as MemberContentPageProjection, b as ChapterCopy, f as ChapterBrand } from '../../copy-context-Ddat__H5.js';
4
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Ddat__H5.js';
5
5
  import { FieldType, FieldConditions } from '@odla-ai/crm';
6
6
 
7
7
  /** A bookable slot: a start instant in epoch milliseconds. */
@@ -252,6 +252,14 @@ interface JoinTier {
252
252
  blurb: string;
253
253
  /** True when the tier costs nothing, so the flow skips the payment step. */
254
254
  free: boolean;
255
+ /** Present when the network authority currently qualifies applicants as founding members at a reduced rate. */
256
+ founding?: {
257
+ cohortLabel: string;
258
+ dueTodayCents: number;
259
+ discountCents: number;
260
+ renewalCents: number;
261
+ discountDuration?: "first_term" | "while_active";
262
+ };
255
263
  }
256
264
  /**
257
265
  * What a site needs to render its own tier chooser.
@@ -26,12 +26,12 @@ import {
26
26
  timeLabel,
27
27
  tzShort,
28
28
  useTierSelection
29
- } from "../../chunk-KHDO2QFA.js";
29
+ } from "../../chunk-UAXWA5BL.js";
30
30
  import {
31
31
  BrandStyle,
32
32
  ChapterCopyProvider,
33
33
  useChapterCopy
34
- } from "../../chunk-N2JIKINY.js";
34
+ } from "../../chunk-JXX4BFDP.js";
35
35
  import "../../chunk-IVXVECKR.js";
36
36
  export {
37
37
  BrandStyle,