@reblu/site-blocks 0.34.0 → 0.35.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.
- package/CHANGELOG.md +13 -0
- package/README.md +44 -0
- package/dist/index.cjs +569 -491
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +48 -1
- package/dist/index.d.ts +48 -1
- package/dist/index.js +568 -492
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @reblu/site-blocks
|
|
2
2
|
|
|
3
|
+
## 0.35.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 09fc578: New drop-in `CourseSchedule` (REB-1363): the modality, dates and place of an in-person or webinar course, from `AcademyCourseDetail.schedule`, to show before paying. Each date is a `<time>` in the tenant's time zone; the place of an in-person course is an `<address>`; the tenant's attendance notes follow. It renders nothing when the course has no schedule or against an API that predates the field. Server Component, RSC-safe; Spanish copy, replaceable with `labels` and `locale`.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [84423ed]
|
|
12
|
+
- Updated dependencies [3ff3c90]
|
|
13
|
+
- Updated dependencies [af8e1cf]
|
|
14
|
+
- @reblu/site-contracts@1.33.0
|
|
15
|
+
|
|
3
16
|
## 0.34.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1601,6 +1601,50 @@ const course = await client.academy.bySlug(slug)
|
|
|
1601
1601
|
|
|
1602
1602
|
The waiver item keeps `data-slot='course-purchase-terms-withdrawal-waiver'` (as in REB-1199); the express request to start uses `data-slot='course-purchase-terms-service-start-request'`. Both carry `data-kind` with the kind.
|
|
1603
1603
|
|
|
1604
|
+
## Course dates and place — `CourseSchedule` (REB-1363)
|
|
1605
|
+
|
|
1606
|
+
The dates and place of an in-person or webinar course, which a buyer must see
|
|
1607
|
+
before paying, from `client.academy.bySlug()` → `schedule`:
|
|
1608
|
+
|
|
1609
|
+
- **Modality:** «Presencial» or «Webinar, online y en directo».
|
|
1610
|
+
- **Dates** (`sessions`): one `<time>` per date, in the tenant's time zone
|
|
1611
|
+
(`schedule.timeZone`), e.g. «martes, 1 de diciembre de 2026, de 09:00 a 13:00 (WET)».
|
|
1612
|
+
A date without an end shows its start only.
|
|
1613
|
+
- **Place** (`locationName`, `locationAddress`): in-person courses only, in an
|
|
1614
|
+
`<address>`. A webinar never carries a place, and its access link is never
|
|
1615
|
+
part of the API.
|
|
1616
|
+
- **Notes** (`attendanceNotes`): the tenant's text, e.g. how a webinar's
|
|
1617
|
+
access is given.
|
|
1618
|
+
|
|
1619
|
+
`schedule` is `null` for any other modality, and the block then renders
|
|
1620
|
+
nothing, as it does against an API that predates the field. Place it next to
|
|
1621
|
+
the purchase box. It is a Server Component, RSC-safe. The copy is Spanish;
|
|
1622
|
+
replace it with `labels` and set the date language with `locale`.
|
|
1623
|
+
|
|
1624
|
+
```tsx
|
|
1625
|
+
import { CourseSchedule } from '@reblu/site-blocks'
|
|
1626
|
+
|
|
1627
|
+
const course = await client.academy.bySlug(slug)
|
|
1628
|
+
|
|
1629
|
+
<CourseSchedule course={course} heading='Fechas y lugar' />
|
|
1630
|
+
|
|
1631
|
+
// In another language:
|
|
1632
|
+
<CourseSchedule
|
|
1633
|
+
course={course}
|
|
1634
|
+
locale='en-GB'
|
|
1635
|
+
labels={{
|
|
1636
|
+
modality: { IN_PERSON: 'In person', WEBINAR: 'Live online' },
|
|
1637
|
+
dates: 'Dates',
|
|
1638
|
+
place: 'Venue',
|
|
1639
|
+
}}
|
|
1640
|
+
/>
|
|
1641
|
+
```
|
|
1642
|
+
|
|
1643
|
+
Slots: `course-schedule` (with `data-modality`), `course-schedule-modality`,
|
|
1644
|
+
`course-schedule-dates`, `course-schedule-session`, `course-schedule-place`,
|
|
1645
|
+
`course-schedule-notes`. Styling: `className`, `headingClassName`,
|
|
1646
|
+
`bodyClassName`, `headingLevel` (default `2`), `headingId`.
|
|
1647
|
+
|
|
1604
1648
|
## Guest course checkout — `CourseGuestCheckoutForm` (REB-1264)
|
|
1605
1649
|
|
|
1606
1650
|
A course that needs no validation is bought in one step by a visitor without
|