@wix/himalaya-cli 0.1760.0 → 0.1761.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.
Files changed (26) hide show
  1. package/dist/cli.mjs +880 -717
  2. package/guides/one-app-section-mappings.md +6 -7
  3. package/guides/one-app-to-himi-app.md +3 -3
  4. package/package.json +2 -2
  5. package/templates/beauty-salon/recipes/programs-participant-carousel.json +257 -0
  6. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +7 -4
  7. package/templates/branded-lite/recipes/programs-participant-carousel.json +257 -0
  8. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +7 -4
  9. package/templates/community-club/recipes/programs-participant-carousel.json +257 -0
  10. package/templates/community-club/tier5-src/_shared/programs-section.ts +7 -4
  11. package/templates/events-meetups/recipes/programs-participant-carousel.json +257 -0
  12. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +7 -4
  13. package/templates/gym-fitness/recipes/programs-participant-carousel.json +257 -0
  14. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +7 -4
  15. package/templates/nonprofit-cause/recipes/programs-participant-carousel.json +257 -0
  16. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +7 -4
  17. package/templates/podcast-creator/recipes/programs-participant-carousel.json +257 -0
  18. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +7 -4
  19. package/templates/portfolio-creative/recipes/programs-participant-carousel.json +257 -0
  20. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +7 -4
  21. package/templates/restaurant/recipes/programs-participant-carousel.json +257 -0
  22. package/templates/restaurant/tier5-src/_shared/programs-section.ts +7 -4
  23. package/templates/retail-store/recipes/programs-participant-carousel.json +257 -0
  24. package/templates/retail-store/tier5-src/_shared/programs-section.ts +7 -4
  25. package/templates/yoga-studio/recipes/programs-participant-carousel.json +257 -0
  26. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +7 -4
@@ -25,8 +25,8 @@ Source snapshots: Catalyst `617c06d43d2a5608b6876d724553269b1e5346f0`; Himalaya
25
25
  | Module | 14 |
26
26
  | Primitive | 7 |
27
27
  | Composition | 9 |
28
- | Partial | 25 |
29
- | Empty | 22 |
28
+ | Partial | 26 |
29
+ | Empty | 21 |
30
30
  | Total | 77 |
31
31
 
32
32
  ## Mappings by server group
@@ -79,9 +79,9 @@ The **Himalaya implementation** cell is blank for every unassigned row. Notes on
79
79
 
80
80
  | Source sectionDefinitionId | Source viewer component | Himalaya implementation | Placement / reuse | Class | Settings, actions and gaps |
81
81
  | --- | --- | --- | --- | --- | --- |
82
- | `achievements_list_section` | `wix-one-app-achievements.SectionMemberChallengesScreen` | [Programs list/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/apps/himi-branded-lite/dev/index.ts) + [programs worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") | Existing base; member list added | Partial | `himi_member_programs` (worker `himi-branded-lite-member-programs`) is the member list: each card carries the signed-in member's standing from Participants v3 / Join Applications v3 (Joined, Program complete, Program ended, Pending request, Request approved, Invited, Participation suspended), a progress bar once started, the price before joining, the "All programs / Programs I joined" and category filters, cursor paging and pull-to-refresh; an ended program the member never joined is dropped. The migration generator now composes the list inline: the category and "All programs / Programs I joined" filters (hidden when `isFilterVisible` is false), the default 2-card mode (`extraProps.limit`, an authored limit or an infinite list is followed) and "See all" to `himi_programs` only while more programs exist. Still open: join / cancel-request actions on the card itself (the card opens the program, which owns them), and Pricing Plans benefits ("Included in your plan"). |
83
- | `achievements_carousel_section` | `wix-one-app-achievements.MemberChallengesCarousel` | [Programs data/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + [Core Carousel](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/src/builder.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") | Existing base; adaptation needed | Partial | Reuse the Programs feature and compose a carousel; preserve source extraProps.limit=5 and selected programs. No ready-made legacy Challenges carousel adapter is claimed. |
84
- | `achievements_participant_carousel_section` | `wix-one-app-achievements.ParticipantChallengesCarousel` | | | Empty | The public Programs catalog is not a member-participating-programs carousel. No verified consumer participant/progress list implementation was found. |
82
+ | `achievements_list_section` | `wix-one-app-achievements.SectionMemberChallengesScreen` | [Programs list/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/apps/himi-branded-lite/dev/index.ts) + [programs worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (list layout) with the `programs-card`, `programs-filters` and `programs-see-all` recipes | Composed inline; member list and program detail reused | Partial | The migration generator composes the list inline: full-width cards (duration, participants and price follow `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`), the category chips and the "All programs / Programs I joined" control (hidden for a visitor; both hidden when `isFilterVisible` is false, each axis also follows `filterSettings.byCategory` / `byParticipantStatus`), the 2-card mode and "See all" to `himi_programs` only while more programs exist. The card count is the definition's `extraProps.limit` (2, verified in the Catalyst definitions file); an authored `extraProps.limit` or `settings.limit` wins, an infinite flag or a non-count limit shows the whole list, and a limit above 20 shows 20 and reports a gap. A page made only of this section gets a generated screen with the list inline (it is not routed to `himi_programs`). `himi_member_programs` (worker `himi-branded-lite-member-programs`) is the member list: each card carries the signed-in member's standing from Participants v3 / Join Applications v3 (Joined, Program complete, Program ended, Pending request, Request approved, Invited, Participation suspended), a progress bar once started, the price before joining, the same two filters, cursor paging and pull-to-refresh; an ended program the member never joined is dropped. The card opens `himi_program`, which enrols through Join Applications v3 (a free program confirms the participant, a private one sends a request for owner approval, an approved paid application goes to payment), shows the same standing, and offers Cancel request only while a request waits for approval. Still open: join / cancel-request actions on the card itself, a MANUAL order in the inline list (only the carousel reads it; the generator reports no gap for it), and Pricing Plans benefits ("Included in your plan"). |
83
+ | `achievements_carousel_section` | `wix-one-app-achievements.MemberChallengesCarousel` | [Programs data/detail](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-programs/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") + shared programs module (carousel layout) with the `programs-carousel` recipe | Composed inline | Partial | The migration generator composes the carousel inline: the section title (unless `showTitle` is false), one page of snapping cards with page dots, duration, participants and price per `isDurationVisible`, `isParticipantsVisible`, `isPriceVisible`, a MANUAL `sortingSettings.challengesOrder` that puts the selected programs first (it does not exclude the others), a retry when the read fails, and a card that opens `himi_program`. It shows 5 cards, the definition's `extraProps.limit`. Still open: an authored limit other than 5 is not read and no gap is reported for it, and the source CTA to the programs screen is not drawn. |
84
+ | `achievements_participant_carousel_section` | `wix-one-app-achievements.ParticipantChallengesCarousel` | Shared programs module (carousel layout, `participating`) with the `programs-participant-carousel` recipe | Composed inline | Partial | Signed-in only: hidden whole, title included, for a visitor, when the member has no programs, or when the read fails. The cards are the member's own programs with their progress (no price), and each opens `himi_program`. It shows 5 cards, the definition's `extraProps.limit`; an authored `extraProps.limit` or `settings.limit` is respected up to 20 cards (one read page). The "Programs I joined" CTA opens `himi_member_programs` and shows only with the section title, as in the source viewer. A scaffold without `himi_program` reports the section unsupported; one without `himi_member_programs` leaves out the CTA. Still open: a MANUAL selection/order is ignored, and a limit above 20 shows 20; the generator reports no gap for either. |
85
85
 
86
86
  For authored Programs sections, pass the source settings as a JSON string in the
87
87
  `programsSection` parameter to `tier5.himiBrandedPrograms.load`:
@@ -380,7 +380,6 @@ These are the exact definitions whose target cells above remain empty. “Not fo
380
380
  | Server group | Unmapped source definition | Missing implementation / decision |
381
381
  | --- | --- | --- |
382
382
  | `mobile-app-widgets-section-definitions.json` | `mobile_app_widgets.viewer` | Arbitrary mobile-app widget runtime has no verified matching Himalaya implementation. Widget-specific code/content needs a user decision. |
383
- | `achievements-section-definitions.json` | `achievements_participant_carousel_section` | The public Programs catalog is not a member-participating-programs carousel. No verified consumer participant/progress list implementation was found. |
384
383
  | `bookings-section-definitions.json` | `bookings_agenda_section` | No equivalent public Bookings agenda section was verified. Member My Bookings, a service time picker, and the Spaces schedule (which queries Events) are different features. |
385
384
  | `bookings-section-definitions.json` | `performance_tracker_section` | No equivalent Bookings performance-tracker feature or performanceTrackerCTA was found. Weekly session-goal/steps widgets are not a verified substitute. |
386
385
  | `events-section-definitions.json` | `events_schedule_section` | No verified mapping for the source Events ScheduleSection and its settings contract was established. The Spaces schedule queries site Events, but its equivalence to this section is unresolved; do not choose it by name. |
@@ -427,7 +426,7 @@ These rows have reusable code, but their remaining requirements must not disappe
427
426
  - The shared Loyalty worker now includes member status and links to a separate member reward/coupon journey. This does not automatically implement an arbitrary source section placement; keep member credentials and rendered evidence in the migration acceptance record.
428
427
  - [Events detail worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-events-detail/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") documents the owner-scoped, best-effort attendee read; it does not supply a full consumer guest list.
429
428
  - [Groups feed worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-feed/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") chooses its group internally; it does not accept a fixed source group selection.
430
- - [Program detail worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-program/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") explicitly identifies the legacy CHALLENGES app ID, supporting the Online Programs family mapping; it does not provide the missing participating-program carousel.
429
+ - [Program detail worker](https://github.com/wix-private/himalaya/blob/97f1542f2f7d6e8cb7a902b912c87dcaa37e5a67/core/dev-server/tier5-bundles-src/himi-branded-lite-program/index.ts "audience-lint-ok: optional pinned upstream evidence, not a local authoring dependency") explicitly identifies the legacy CHALLENGES app ID, supporting the Online Programs family mapping. The participating-program carousel is now composed from the shared programs module (see its row above), so it is no longer listed with the unmapped definitions.
431
430
 
432
431
  ## GitHub implementation references
433
432
 
@@ -1418,13 +1418,13 @@ source label, and styles, alignment, buttons, images and their tap (`openAsModal
1418
1418
  section and the business description are read from the source. A section it has no mapping for is reported with
1419
1419
  `sections_unmapped` and nothing stands in for it. Data sections use shared modules and recipes
1420
1420
  (`recipes/*.json`) when the scaffold ships them, and show their data inline: the branded-lite starter ships them for the blog list
1421
- and the blog carousel, members, plans, programs (list and carousel), events, the FAQ, groups, and products (rail and grid). The source
1421
+ and the blog carousel, members, plans, programs (list, carousel and the member's participant carousel), events, the FAQ, groups, and products (rail and grid). The source
1422
1422
  settings each honors are in the generator; one it cannot show becomes an `adapted` row (a products section shows its collection's first
1423
1423
  6 or 8 products as square, borderless tiles, with a See All link beside the title, or a button under the row when the section has no title,
1424
1424
  opening the shop on that collection; a blog carousel shows the source's limit of latest posts, at most 10, with the title under the image;
1425
1425
  groups omit the Create button). A scaffold without a section's recipe or module takes the fallback below. A page with such modules gets ONE
1426
- worker, `tier5-src/page-<screen>/index.ts`, that registers the modules its sections use. A page that is only a template vertical (programs list,
1427
- members, loyalty, shop, groups feed, services list) opens the template's screen, and a groups feed passes the source's own title,
1426
+ worker, `tier5-src/page-<screen>/index.ts`, that registers the modules its sections use. A page that is only a template vertical (members,
1427
+ loyalty, shop, groups feed, services list) opens the template's screen, and a groups feed passes the source's own title,
1428
1428
  "Group list" label and post count. A data section never vanishes: when the shared modules cannot honor its settings
1429
1429
  (featured-only lists, another post layout, events or groups limited to a chosen set) or its recipe is missing from the
1430
1430
  scaffold, it keeps its place as the source's title and a "See All" button that opens the page showing that data,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1760.0",
3
+ "version": "0.1761.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -82,5 +82,5 @@
82
82
  "artifactId": "himalaya-cli"
83
83
  }
84
84
  },
85
- "falconPackageHash": "98e3e48a422d54fb55a958fe3c5ac4aea5b2fa15ab2025ea4df8cc0c"
85
+ "falconPackageHash": "f62a4105e74437e9a85d45bc0146df6f74585aeb8beac6cb8a576688"
86
86
  }
@@ -0,0 +1,257 @@
1
+ {
2
+ "_recipe": "The member's participating programs (title, horizontal rail with the member's progress, and a button to all their programs). Service: registerProgramsSection(svc,{layout:'carousel',participating:true,...}). Hidden whole unless the member has programs to show.",
3
+ "_placeholders": {
4
+ "svc": "service name the page worker registered with registerProgramsSection",
5
+ "id": "unique node id prefix",
6
+ "detailScreen": "program detail screen id, himi_program",
7
+ "memberProgramsScreen": "the member's programs screen id, himi_member_programs",
8
+ "heading": "the source section's own title when it shows one, else an empty string",
9
+ "ctaLabel": "the call-to-action button's label"
10
+ },
11
+ "node": {
12
+ "id": "{{id}}.participant",
13
+ "body": {
14
+ "package": "himalaya",
15
+ "type": "VStack",
16
+ "props": {
17
+ "spacing": 12,
18
+ "alignment": "leading",
19
+ "children": [
20
+ {
21
+ "id": "{{id}}.heading",
22
+ "body": {
23
+ "package": "himalaya",
24
+ "type": "Text",
25
+ "props": {
26
+ "text": "{{heading}}",
27
+ "style": "title3",
28
+ "collapseWhenEmpty": true
29
+ }
30
+ }
31
+ },
32
+ {
33
+ "id": "{{id}}.carousel",
34
+ "body": {
35
+ "package": "himalaya",
36
+ "type": "Carousel",
37
+ "props": {
38
+ "itemsPath": "$service:{{svc}}.rows",
39
+ "items": [
40
+ {
41
+ "id": "{{id}}.card",
42
+ "body": {
43
+ "package": "himalaya",
44
+ "type": "VStack",
45
+ "props": {
46
+ "spacing": 8,
47
+ "alignment": "leading",
48
+ "children": [
49
+ {
50
+ "id": "",
51
+ "body": {
52
+ "package": "himalaya",
53
+ "type": "ZStack",
54
+ "props": {
55
+ "alignment": "leading",
56
+ "children": [
57
+ {
58
+ "id": "",
59
+ "body": {
60
+ "package": "himalaya",
61
+ "type": "Image",
62
+ "props": {
63
+ "url": "$item.image",
64
+ "fillWidth": true,
65
+ "height": 180,
66
+ "contentMode": "fill",
67
+ "contentDescription": "$item.name"
68
+ }
69
+ },
70
+ "modifiers": {
71
+ "cornerRadius": 8,
72
+ "fillMaxWidth": true,
73
+ "hiddenPath": "$item.noImage"
74
+ }
75
+ },
76
+ {
77
+ "id": "",
78
+ "body": {
79
+ "package": "himalaya",
80
+ "type": "ZStack",
81
+ "props": {
82
+ "alignment": "center",
83
+ "children": [
84
+ {
85
+ "id": "",
86
+ "body": {
87
+ "package": "himalaya",
88
+ "type": "Text",
89
+ "props": {
90
+ "text": "$item.initial",
91
+ "style": "display",
92
+ "maxLines": 1,
93
+ "color": "textOnAccent"
94
+ }
95
+ }
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ "modifiers": {
101
+ "fillMaxWidth": true,
102
+ "height": 180,
103
+ "background": {
104
+ "token": "accentPrimary"
105
+ },
106
+ "cornerRadius": 8,
107
+ "hiddenPath": "$item.hasImage"
108
+ }
109
+ }
110
+ ]
111
+ }
112
+ }
113
+ },
114
+ {
115
+ "id": "",
116
+ "body": {
117
+ "package": "himalaya",
118
+ "type": "Text",
119
+ "props": {
120
+ "text": "$item.name",
121
+ "style": "bodyEmphasis",
122
+ "maxLines": 2
123
+ }
124
+ }
125
+ },
126
+ {
127
+ "id": "",
128
+ "body": {
129
+ "package": "himalaya",
130
+ "type": "Text",
131
+ "props": {
132
+ "text": "$item.durationLine",
133
+ "style": "footnote",
134
+ "maxLines": 1,
135
+ "color": "textSecondary",
136
+ "collapseWhenEmpty": true
137
+ }
138
+ },
139
+ "modifiers": {
140
+ "hiddenPath": "$item.noDuration"
141
+ }
142
+ },
143
+ {
144
+ "id": "",
145
+ "body": {
146
+ "package": "himalaya",
147
+ "type": "Text",
148
+ "props": {
149
+ "text": "$item.accessLine",
150
+ "style": "footnote",
151
+ "maxLines": 1,
152
+ "color": "textSecondary",
153
+ "collapseWhenEmpty": true
154
+ }
155
+ },
156
+ "modifiers": {
157
+ "hiddenPath": "$item.noAccess"
158
+ }
159
+ },
160
+ {
161
+ "id": "",
162
+ "body": {
163
+ "package": "himalaya",
164
+ "type": "Text",
165
+ "props": {
166
+ "text": "$item.descriptionLine",
167
+ "style": "footnote",
168
+ "maxLines": 2,
169
+ "color": "textSecondary",
170
+ "collapseWhenEmpty": true
171
+ }
172
+ }
173
+ },
174
+ {
175
+ "id": "",
176
+ "body": {
177
+ "package": "himalaya",
178
+ "type": "ProgressBar",
179
+ "props": {
180
+ "progress": 0,
181
+ "progressPath": "$item.progress"
182
+ }
183
+ },
184
+ "modifiers": {
185
+ "hiddenPath": "$item.noProgress"
186
+ }
187
+ }
188
+ ]
189
+ }
190
+ },
191
+ "modifiers": {
192
+ "background": {
193
+ "token": "surfaceElevated"
194
+ },
195
+ "border": {
196
+ "width": 1,
197
+ "color": {
198
+ "token": "border"
199
+ }
200
+ },
201
+ "cornerRadius": 8,
202
+ "padding": {
203
+ "leading": 12,
204
+ "trailing": 12,
205
+ "top": 12,
206
+ "bottom": 8
207
+ },
208
+ "onTap": {
209
+ "actionId": "himi.open",
210
+ "params": {
211
+ "screenId": "{{detailScreen}}",
212
+ "id": "$item.id"
213
+ }
214
+ },
215
+ "pressFeedback": "scale",
216
+ "haptic": "light",
217
+ "accessibilityLabel": "$item.name",
218
+ "width": 280
219
+ }
220
+ }
221
+ ]
222
+ }
223
+ }
224
+ },
225
+ {
226
+ "id": "{{id}}.cta",
227
+ "body": {
228
+ "package": "himalaya",
229
+ "type": "Button",
230
+ "props": {
231
+ "title": "{{ctaLabel}}",
232
+ "style": "secondary",
233
+ "size": "md",
234
+ "fullWidth": true,
235
+ "action": {
236
+ "actionId": "himi.open",
237
+ "params": {
238
+ "screenId": "{{memberProgramsScreen}}"
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ ]
245
+ }
246
+ },
247
+ "modifiers": {
248
+ "padding": {
249
+ "leading": 16,
250
+ "trailing": 16,
251
+ "top": 8,
252
+ "bottom": 8
253
+ },
254
+ "hiddenPath": "$service:{{svc}}.hideList"
255
+ }
256
+ }
257
+ }
@@ -456,6 +456,8 @@ export interface ProgramsSectionOptions {
456
456
  showPrice?: boolean;
457
457
  /** Program ids promoted to the front, in this order (source `sortingSettings.ordering === "MANUAL"`). */
458
458
  order?: string[];
459
+ /** carousel: the member's own participations only (the One App participant carousel). Signed out, empty or failed reads show nothing. */
460
+ participating?: boolean;
459
461
  /** list: hide a filter the source section turns off. */
460
462
  filters?: { status?: boolean; category?: boolean };
461
463
  /** list: the section's inline mode: show this many cards, no paging, and offer See all while more programs exist
@@ -471,10 +473,11 @@ const ORDER_LIMIT = 100;
471
473
  export function registerProgramsSection(serviceName: string, options: ProgramsSectionOptions = { layout: "list" }) {
472
474
  const carousel = options.layout === "carousel";
473
475
  const display: Display = { card: carousel, duration: options.showDuration !== false, participants: options.showParticipants !== false };
474
- const showPrice = options.showPrice !== false;
476
+ const showPrice = options.showPrice !== false && !options.participating;
475
477
  const limit = Math.min(PAGE_SIZE, Math.max(1, Math.floor(options.limit ?? CAROUSEL_LIMIT)));
476
478
  const inlineLimit = !carousel && options.inlineLimit !== undefined && options.inlineLimit > 0 ? Math.min(PAGE_SIZE, Math.floor(options.inlineLimit)) : 0;
477
- const order = (options.order ?? []).filter((id) => typeof id === "string" && id).slice(0, ORDER_LIMIT);
479
+ // A promoted program is read by id, so it would bypass the member's participations: the participant carousel has no manual order.
480
+ const order = (options.participating ? [] : options.order ?? []).filter((id) => typeof id === "string" && id).slice(0, ORDER_LIMIT);
478
481
  /** The promoted programs, in their configured order. A failed read promotes nothing: the default order stands. */
479
482
  async function promotedPrograms(): Promise<WixProgram[]> {
480
483
  if (!order.length) return [];
@@ -505,7 +508,7 @@ export function registerProgramsSection(serviceName: string, options: ProgramsSe
505
508
  return { status: status === "joined" ? "joined" : "all", categoryId: rest.join("|") };
506
509
  }
507
510
 
508
- let statusFilter: "all" | "joined" = "all";
511
+ let statusFilter: "all" | "joined" = options.participating ? "joined" : "all";
509
512
  let categoryId = "";
510
513
  let pageScope: Scope | undefined;
511
514
 
@@ -702,7 +705,7 @@ export function registerProgramsSection(serviceName: string, options: ProgramsSe
702
705
  async retry() { await controller.retry(); return undefined; },
703
706
  setStatus(state, arg) {
704
707
  const value = (arg as { selectedId?: unknown } | undefined)?.selectedId;
705
- const next = value === "joined" ? "joined" : value === "all" ? "all" : undefined;
708
+ const next = value === "joined" ? "joined" : value === "all" && !options.participating ? "all" : undefined;
706
709
  if (!next || next === statusFilter) return state;
707
710
  statusFilter = next;
708
711
  return controller.query(criteria()).then(() => undefined);
@@ -0,0 +1,257 @@
1
+ {
2
+ "_recipe": "The member's participating programs (title, horizontal rail with the member's progress, and a button to all their programs). Service: registerProgramsSection(svc,{layout:'carousel',participating:true,...}). Hidden whole unless the member has programs to show.",
3
+ "_placeholders": {
4
+ "svc": "service name the page worker registered with registerProgramsSection",
5
+ "id": "unique node id prefix",
6
+ "detailScreen": "program detail screen id, himi_program",
7
+ "memberProgramsScreen": "the member's programs screen id, himi_member_programs",
8
+ "heading": "the source section's own title when it shows one, else an empty string",
9
+ "ctaLabel": "the call-to-action button's label"
10
+ },
11
+ "node": {
12
+ "id": "{{id}}.participant",
13
+ "body": {
14
+ "package": "himalaya",
15
+ "type": "VStack",
16
+ "props": {
17
+ "spacing": 12,
18
+ "alignment": "leading",
19
+ "children": [
20
+ {
21
+ "id": "{{id}}.heading",
22
+ "body": {
23
+ "package": "himalaya",
24
+ "type": "Text",
25
+ "props": {
26
+ "text": "{{heading}}",
27
+ "style": "title3",
28
+ "collapseWhenEmpty": true
29
+ }
30
+ }
31
+ },
32
+ {
33
+ "id": "{{id}}.carousel",
34
+ "body": {
35
+ "package": "himalaya",
36
+ "type": "Carousel",
37
+ "props": {
38
+ "itemsPath": "$service:{{svc}}.rows",
39
+ "items": [
40
+ {
41
+ "id": "{{id}}.card",
42
+ "body": {
43
+ "package": "himalaya",
44
+ "type": "VStack",
45
+ "props": {
46
+ "spacing": 8,
47
+ "alignment": "leading",
48
+ "children": [
49
+ {
50
+ "id": "",
51
+ "body": {
52
+ "package": "himalaya",
53
+ "type": "ZStack",
54
+ "props": {
55
+ "alignment": "leading",
56
+ "children": [
57
+ {
58
+ "id": "",
59
+ "body": {
60
+ "package": "himalaya",
61
+ "type": "Image",
62
+ "props": {
63
+ "url": "$item.image",
64
+ "fillWidth": true,
65
+ "height": 180,
66
+ "contentMode": "fill",
67
+ "contentDescription": "$item.name"
68
+ }
69
+ },
70
+ "modifiers": {
71
+ "cornerRadius": 8,
72
+ "fillMaxWidth": true,
73
+ "hiddenPath": "$item.noImage"
74
+ }
75
+ },
76
+ {
77
+ "id": "",
78
+ "body": {
79
+ "package": "himalaya",
80
+ "type": "ZStack",
81
+ "props": {
82
+ "alignment": "center",
83
+ "children": [
84
+ {
85
+ "id": "",
86
+ "body": {
87
+ "package": "himalaya",
88
+ "type": "Text",
89
+ "props": {
90
+ "text": "$item.initial",
91
+ "style": "display",
92
+ "maxLines": 1,
93
+ "color": "textOnAccent"
94
+ }
95
+ }
96
+ }
97
+ ]
98
+ }
99
+ },
100
+ "modifiers": {
101
+ "fillMaxWidth": true,
102
+ "height": 180,
103
+ "background": {
104
+ "token": "accentPrimary"
105
+ },
106
+ "cornerRadius": 8,
107
+ "hiddenPath": "$item.hasImage"
108
+ }
109
+ }
110
+ ]
111
+ }
112
+ }
113
+ },
114
+ {
115
+ "id": "",
116
+ "body": {
117
+ "package": "himalaya",
118
+ "type": "Text",
119
+ "props": {
120
+ "text": "$item.name",
121
+ "style": "bodyEmphasis",
122
+ "maxLines": 2
123
+ }
124
+ }
125
+ },
126
+ {
127
+ "id": "",
128
+ "body": {
129
+ "package": "himalaya",
130
+ "type": "Text",
131
+ "props": {
132
+ "text": "$item.durationLine",
133
+ "style": "footnote",
134
+ "maxLines": 1,
135
+ "color": "textSecondary",
136
+ "collapseWhenEmpty": true
137
+ }
138
+ },
139
+ "modifiers": {
140
+ "hiddenPath": "$item.noDuration"
141
+ }
142
+ },
143
+ {
144
+ "id": "",
145
+ "body": {
146
+ "package": "himalaya",
147
+ "type": "Text",
148
+ "props": {
149
+ "text": "$item.accessLine",
150
+ "style": "footnote",
151
+ "maxLines": 1,
152
+ "color": "textSecondary",
153
+ "collapseWhenEmpty": true
154
+ }
155
+ },
156
+ "modifiers": {
157
+ "hiddenPath": "$item.noAccess"
158
+ }
159
+ },
160
+ {
161
+ "id": "",
162
+ "body": {
163
+ "package": "himalaya",
164
+ "type": "Text",
165
+ "props": {
166
+ "text": "$item.descriptionLine",
167
+ "style": "footnote",
168
+ "maxLines": 2,
169
+ "color": "textSecondary",
170
+ "collapseWhenEmpty": true
171
+ }
172
+ }
173
+ },
174
+ {
175
+ "id": "",
176
+ "body": {
177
+ "package": "himalaya",
178
+ "type": "ProgressBar",
179
+ "props": {
180
+ "progress": 0,
181
+ "progressPath": "$item.progress"
182
+ }
183
+ },
184
+ "modifiers": {
185
+ "hiddenPath": "$item.noProgress"
186
+ }
187
+ }
188
+ ]
189
+ }
190
+ },
191
+ "modifiers": {
192
+ "background": {
193
+ "token": "surfaceElevated"
194
+ },
195
+ "border": {
196
+ "width": 1,
197
+ "color": {
198
+ "token": "border"
199
+ }
200
+ },
201
+ "cornerRadius": 8,
202
+ "padding": {
203
+ "leading": 12,
204
+ "trailing": 12,
205
+ "top": 12,
206
+ "bottom": 8
207
+ },
208
+ "onTap": {
209
+ "actionId": "himi.open",
210
+ "params": {
211
+ "screenId": "{{detailScreen}}",
212
+ "id": "$item.id"
213
+ }
214
+ },
215
+ "pressFeedback": "scale",
216
+ "haptic": "light",
217
+ "accessibilityLabel": "$item.name",
218
+ "width": 280
219
+ }
220
+ }
221
+ ]
222
+ }
223
+ }
224
+ },
225
+ {
226
+ "id": "{{id}}.cta",
227
+ "body": {
228
+ "package": "himalaya",
229
+ "type": "Button",
230
+ "props": {
231
+ "title": "{{ctaLabel}}",
232
+ "style": "secondary",
233
+ "size": "md",
234
+ "fullWidth": true,
235
+ "action": {
236
+ "actionId": "himi.open",
237
+ "params": {
238
+ "screenId": "{{memberProgramsScreen}}"
239
+ }
240
+ }
241
+ }
242
+ }
243
+ }
244
+ ]
245
+ }
246
+ },
247
+ "modifiers": {
248
+ "padding": {
249
+ "leading": 16,
250
+ "trailing": 16,
251
+ "top": 8,
252
+ "bottom": 8
253
+ },
254
+ "hiddenPath": "$service:{{svc}}.hideList"
255
+ }
256
+ }
257
+ }