@odla-ai/chapter 0.40.0 → 0.40.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.
@@ -1,8 +1,8 @@
1
1
  import * as preact from 'preact';
2
2
  import { ComponentChildren, JSX } from 'preact';
3
3
  import { CrmClient, Crm, CrmRecord } from '@odla-ai/crm';
4
- import { a as Chapter, b as ChapterCopy, M as MemberContentDocument, E as EffectiveMemberContent, c as MemberContentTierAuthority } from '../../copy-context-Dbu9Bbq1.js';
5
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Dbu9Bbq1.js';
4
+ import { a as Chapter, b as ChapterCopy, M as MemberContentDocument, E as EffectiveMemberContent, c as MemberContentTierAuthority } from '../../copy-context-B14OOiYq.js';
5
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-B14OOiYq.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. */
@@ -1,5 +1,5 @@
1
1
  export { AdminAccountMenuProps, AdminBuilderLibraryData, AdminChrome, AdminMemberContentData, AdminNote, AdminPage, AdminResource, AdminRouteState, AdminRouteTarget, AdminRouting, AdminSection, AdminSectionContext, AdminWorkspace, AdminWorkspaceNavProps, AdmissionGrantsWorkspace, AvailabilitySectionOptions, BillingSectionOptions, BuilderLibraryAdmin, ChapterAdmin, ChapterAdminAuthAdapter, ChapterAdminAuthConfig, ChapterAdminAuthLoadContext, ChapterAdminProps, ChapterAdminUser, CollectionSectionOptions, DashboardSectionOptions, EmailSectionOptions, LeaderNetworkOverview, MeetingsSectionOptions, MemberContentAdmin, NetworkRecordsWorkspace, NetworkShareActions, NetworkShareActionsProps, Panel, 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-Dbu9Bbq1.js';
2
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../copy-context-B14OOiYq.js';
3
3
  export { ApiFn, BrandStyle, BrandStyleProps, GiftOfferCards, GiftOfferCardsMode, GiftOfferCardsProps, JoinBookingSimulation, JoinConfig, JoinFlowState, JoinIsland, JoinIslandProps, JoinSimulation, JoinStepRenderContext, JoinSubmitRenderContext, JoinTier, JoinTierRenderContext, MEMBERSHIP_CARD_TOKEN_DEFAULTS, MemberContentArea, MemberContentAreaProps, MemberGifts, MemberProvisionalRenderContext, 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
@@ -22,7 +22,7 @@ import {
22
22
  timeLabel,
23
23
  tzShort,
24
24
  useTierSelection
25
- } from "../chunk-BIYWPPH6.js";
25
+ } from "../chunk-E5OXQ3DC.js";
26
26
  import {
27
27
  AdminNote,
28
28
  AdminPage,
@@ -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-Dbu9Bbq1.js';
4
- export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-Dbu9Bbq1.js';
3
+ import { d as MemberContentProjection, e as MemberContentPageProjection, b as ChapterCopy, f as ChapterBrand } from '../../copy-context-B14OOiYq.js';
4
+ export { C as ChapterCopyProvider, u as useChapterCopy } from '../../copy-context-B14OOiYq.js';
5
5
  import { FieldType, FieldConditions } from '@odla-ai/crm';
6
6
 
7
7
  /** A bookable slot: a start instant in epoch milliseconds. */
@@ -164,6 +164,8 @@ interface PaymentStepProps {
164
164
  applicationId: string;
165
165
  /** Refund-policy copy the applicant must acknowledge to start payment. */
166
166
  refundPolicyText: string;
167
+ /** Plain-language merchant identity shown before the applicant consents. */
168
+ merchantDisclosureText?: string;
167
169
  /** Called once the payment succeeds (or is processing) — advance to booking. */
168
170
  onPaid: (result: {
169
171
  gift: boolean;
@@ -340,6 +342,8 @@ interface JoinConfig {
340
342
  name: string;
341
343
  paymentsReady: boolean;
342
344
  refundPolicyText?: string;
345
+ /** Plain-language merchant identity displayed before payment consent. */
346
+ merchantDisclosureText?: string;
343
347
  /** Offered membership tiers, in display order. Empty on a chapter that
344
348
  * declares none, in which case no tier is posted and nothing renders. */
345
349
  tiers?: readonly JoinTier[];
@@ -22,7 +22,7 @@ import {
22
22
  timeLabel,
23
23
  tzShort,
24
24
  useTierSelection
25
- } from "../../chunk-BIYWPPH6.js";
25
+ } from "../../chunk-E5OXQ3DC.js";
26
26
  import {
27
27
  BrandStyle,
28
28
  ChapterCopyProvider,
@@ -350,6 +350,7 @@ function joinConfig(group, paymentsReady, tiers = [], conditions = {}) {
350
350
  conditions,
351
351
  disclaimerText: group.disclaimerText ?? "",
352
352
  refundPolicyText: group.refundPolicyText ?? "",
353
+ merchantDisclosureText: group.merchantDisclosureText ?? "",
353
354
  trustCopy: group.trustCopy ?? "",
354
355
  commitmentText: group.commitmentText ?? "",
355
356
  normsText: group.normsText ?? "",
@@ -2353,7 +2354,14 @@ function policyOf(value, errors) {
2353
2354
  errors.push("document.policy must be an object");
2354
2355
  return void 0;
2355
2356
  }
2356
- const allowed2 = /* @__PURE__ */ new Set(["disclaimerText", "refundPolicyText", "trustCopy", "commitmentText", "normsText"]);
2357
+ const allowed2 = /* @__PURE__ */ new Set([
2358
+ "disclaimerText",
2359
+ "refundPolicyText",
2360
+ "merchantDisclosureText",
2361
+ "trustCopy",
2362
+ "commitmentText",
2363
+ "normsText"
2364
+ ]);
2357
2365
  unknownKeys(input, allowed2, "document.policy", errors);
2358
2366
  const result = {};
2359
2367
  for (const key of allowed2) {
@@ -4190,7 +4198,8 @@ var handleGifts = async (req, url, env, ctx) => {
4190
4198
  return json({
4191
4199
  offers: publicGiftOffers(control3?.document.giftOffers, Date.now()),
4192
4200
  claims: buyerGiftClaims(rows2(found.giftClaims).sort((a, b) => Number(b.createdAt) - Number(a.createdAt)), Date.now()),
4193
- refundPolicyText: typeof group?.refundPolicyText === "string" ? group.refundPolicyText : ""
4201
+ refundPolicyText: typeof group?.refundPolicyText === "string" ? group.refundPolicyText : "",
4202
+ merchantDisclosureText: typeof group?.merchantDisclosureText === "string" ? group.merchantDisclosureText : ""
4194
4203
  });
4195
4204
  }
4196
4205
  if (req.method === "POST" && url.pathname === "/api/gifts/checkout") {