@wix/himalaya-cli 0.1761.0 → 0.1763.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 (741) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +5 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +10 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +23 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +136 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +112 -0
  6. package/dist/browser-plane/assets.json +5 -5
  7. package/dist/browser-plane/preview-deferred/{7c3c05d452efd3f1e1e81b47dde7d9fa870c1e5217b00b253661a22b571fdbef.bin → a96903bb457796ee606fe986078d9629ba53b5ba4013bdb94e8afba3288284ed.bin} +1 -1
  8. package/dist/browser-plane/sw.js +7 -7
  9. package/dist/cli.mjs +51413 -50002
  10. package/dist/preview-assets.generated.bin +0 -0
  11. package/guides/base44-app-to-himi-app.md +56 -0
  12. package/guides/component-reference.json +1 -1
  13. package/guides/component-reference.md +10 -0
  14. package/guides/himi-json-output.md +35 -0
  15. package/guides/one-app-section-mappings.md +6 -6
  16. package/guides/one-app-to-himi-app.md +33 -4
  17. package/guides/push-cli-onboarding.md +25 -14
  18. package/guides/recipe-dynamic-list.md +4 -2
  19. package/guides/wix-business-context.md +1 -1
  20. package/package.json +2 -2
  21. package/templates/beauty-salon/l10n/ar.json +9 -420
  22. package/templates/beauty-salon/l10n/cs.json +9 -420
  23. package/templates/beauty-salon/l10n/da.json +9 -420
  24. package/templates/beauty-salon/l10n/de.json +9 -420
  25. package/templates/beauty-salon/l10n/el.json +9 -420
  26. package/templates/beauty-salon/l10n/en.json +8 -61
  27. package/templates/beauty-salon/l10n/es.json +9 -420
  28. package/templates/beauty-salon/l10n/fi.json +9 -420
  29. package/templates/beauty-salon/l10n/fr.json +9 -420
  30. package/templates/beauty-salon/l10n/he.json +9 -338
  31. package/templates/beauty-salon/l10n/hu.json +9 -420
  32. package/templates/beauty-salon/l10n/id.json +9 -420
  33. package/templates/beauty-salon/l10n/it.json +9 -420
  34. package/templates/beauty-salon/l10n/ja.json +9 -420
  35. package/templates/beauty-salon/l10n/ko.json +9 -420
  36. package/templates/beauty-salon/l10n/lt.json +9 -420
  37. package/templates/beauty-salon/l10n/nl.json +9 -420
  38. package/templates/beauty-salon/l10n/no.json +9 -420
  39. package/templates/beauty-salon/l10n/pl.json +9 -420
  40. package/templates/beauty-salon/l10n/pt.json +9 -420
  41. package/templates/beauty-salon/l10n/ru.json +9 -420
  42. package/templates/beauty-salon/l10n/sv.json +9 -420
  43. package/templates/beauty-salon/l10n/th.json +9 -420
  44. package/templates/beauty-salon/l10n/tr.json +9 -420
  45. package/templates/beauty-salon/l10n/uk.json +9 -420
  46. package/templates/beauty-salon/l10n/vi.json +9 -420
  47. package/templates/beauty-salon/l10n/zh.json +9 -420
  48. package/templates/branded-lite/l10n/ar.json +31 -5
  49. package/templates/branded-lite/l10n/cs.json +31 -5
  50. package/templates/branded-lite/l10n/da.json +31 -5
  51. package/templates/branded-lite/l10n/de.json +31 -5
  52. package/templates/branded-lite/l10n/el.json +31 -5
  53. package/templates/branded-lite/l10n/en.json +8 -6
  54. package/templates/branded-lite/l10n/es.json +31 -5
  55. package/templates/branded-lite/l10n/fi.json +31 -5
  56. package/templates/branded-lite/l10n/fr.json +31 -5
  57. package/templates/branded-lite/l10n/he.json +27 -4
  58. package/templates/branded-lite/l10n/hu.json +31 -5
  59. package/templates/branded-lite/l10n/id.json +31 -5
  60. package/templates/branded-lite/l10n/it.json +31 -5
  61. package/templates/branded-lite/l10n/ja.json +31 -5
  62. package/templates/branded-lite/l10n/ko.json +31 -5
  63. package/templates/branded-lite/l10n/lt.json +31 -5
  64. package/templates/branded-lite/l10n/nl.json +31 -5
  65. package/templates/branded-lite/l10n/no.json +31 -5
  66. package/templates/branded-lite/l10n/pl.json +31 -5
  67. package/templates/branded-lite/l10n/pt.json +31 -5
  68. package/templates/branded-lite/l10n/ru.json +31 -5
  69. package/templates/branded-lite/l10n/sv.json +31 -5
  70. package/templates/branded-lite/l10n/th.json +31 -5
  71. package/templates/branded-lite/l10n/tr.json +31 -5
  72. package/templates/branded-lite/l10n/uk.json +31 -5
  73. package/templates/branded-lite/l10n/vi.json +31 -5
  74. package/templates/branded-lite/l10n/zh.json +31 -5
  75. package/templates/branded-lite/recipes/blog-search.json +45 -0
  76. package/templates/{events-meetups/recipes/programs-participant-carousel.json → branded-lite/recipes/galleries-carousel.json} +39 -118
  77. package/templates/{gym-fitness/recipes/programs-participant-carousel.json → branded-lite/recipes/galleries-list.json} +43 -121
  78. package/templates/{community-club/recipes/events-inline-list.json → branded-lite/recipes/group-feed.json} +112 -89
  79. package/templates/{beauty-salon/recipes/programs-participant-carousel.json → branded-lite/recipes/groups-cards.json} +71 -93
  80. package/templates/{beauty-salon/recipes/groups-list.json → branded-lite/recipes/services-list.json} +33 -9
  81. package/templates/{community-club/recipes/groups-list.json → branded-lite/recipes/subscriptions-list.json} +124 -60
  82. package/templates/branded-lite/recipes/upcoming-bookings.json +350 -0
  83. package/templates/branded-lite/recipes/videos-carousel.json +248 -0
  84. package/templates/branded-lite/tier5-src/_shared/blog-list.ts +75 -21
  85. package/templates/branded-lite/tier5-src/_shared/galleries-section.ts +115 -0
  86. package/templates/branded-lite/tier5-src/_shared/group-feed-section.ts +137 -0
  87. package/templates/branded-lite/tier5-src/_shared/groups-section.ts +7 -3
  88. package/templates/branded-lite/tier5-src/_shared/my-subscriptions-section.ts +107 -0
  89. package/templates/branded-lite/tier5-src/_shared/plans-section.ts +11 -3
  90. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +2 -0
  91. package/templates/branded-lite/tier5-src/_shared/services-section.ts +122 -0
  92. package/templates/branded-lite/tier5-src/_shared/upcoming-bookings-section.ts +102 -0
  93. package/templates/branded-lite/tier5-src/_shared/videos-section.ts +91 -0
  94. package/templates/brandy/README.md +21 -3
  95. package/templates/brandy/config.ts +131 -14
  96. package/templates/brandy/dev/index.ts +41 -5
  97. package/templates/brandy/dev/member-screens.ts +14412 -0
  98. package/templates/brandy/provisioning.member.example.json +25 -0
  99. package/templates/brandy/tier5-src/_shared/branded-lite-hosted.ts +280 -0
  100. package/templates/brandy/tier5-src/_shared/branded-load-state.ts +109 -0
  101. package/templates/brandy/tier5-src/_shared/chat-live.ts +242 -0
  102. package/templates/brandy/tier5-src/_shared/collection-contract.ts +228 -0
  103. package/templates/brandy/tier5-src/_shared/collection-query-legacy.ts +194 -0
  104. package/templates/brandy/tier5-src/_shared/collection-query.ts +252 -0
  105. package/templates/brandy/tier5-src/_shared/collection-service.ts +423 -0
  106. package/templates/brandy/tier5-src/_shared/engine-intl.ts +523 -0
  107. package/templates/brandy/tier5-src/_shared/himi-account.ts +194 -0
  108. package/templates/brandy/tier5-src/_shared/himi-store.ts +7 -0
  109. package/templates/brandy/tier5-src/_shared/himi-text.ts +24 -0
  110. package/templates/brandy/tier5-src/_shared/hosted-checkout.ts +70 -0
  111. package/templates/brandy/tier5-src/_shared/iap-worker.ts +127 -0
  112. package/templates/brandy/tier5-src/_shared/inbox-rooms.ts +68 -0
  113. package/templates/brandy/tier5-src/_shared/live-session.ts +172 -0
  114. package/templates/brandy/tier5-src/_shared/local-preferences.ts +38 -0
  115. package/templates/brandy/tier5-src/_shared/member-access.ts +63 -0
  116. package/templates/brandy/tier5-src/_shared/member-account-routes.ts +52 -0
  117. package/templates/brandy/tier5-src/_shared/member-orders.ts +8 -0
  118. package/templates/brandy/tier5-src/_shared/member-read.ts +82 -0
  119. package/templates/brandy/tier5-src/_shared/member-screen.ts +99 -0
  120. package/templates/brandy/tier5-src/_shared/notification-target.ts +141 -0
  121. package/templates/brandy/tier5-src/_shared/online-actions.ts +76 -0
  122. package/templates/brandy/tier5-src/_shared/owner-load-error.ts +348 -0
  123. package/templates/brandy/tier5-src/_shared/payment-setup.ts +6 -0
  124. package/templates/brandy/tier5-src/_shared/pricing-plan-display.ts +64 -0
  125. package/templates/brandy/tier5-src/_shared/rich-body.ts +78 -0
  126. package/templates/brandy/tier5-src/_shared/rich-content-link.ts +34 -0
  127. package/templates/brandy/tier5-src/_shared/sign-in-sheet.ts +18 -0
  128. package/templates/brandy/tier5-src/_shared/store-order-presentation.ts +56 -0
  129. package/templates/brandy/tier5-src/_shared/wix-bi.ts +85 -0
  130. package/templates/brandy/tier5-src/_shared/wix-member-links.ts +114 -0
  131. package/templates/brandy/tier5-src/himi-branded-lite-inbox/index.ts +92 -0
  132. package/templates/brandy/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
  133. package/templates/brandy/tier5-src/himi-branded-lite-order/index.ts +477 -0
  134. package/templates/brandy/tier5-src/himi-branded-lite-orders/index.ts +327 -0
  135. package/templates/brandy/tier5-src/himi-store-account/index.ts +1007 -0
  136. package/templates/brandy/tier5-src/wix-spaces-chat-thread/index.ts +350 -0
  137. package/templates/brandy/tier5-src/wix-spaces-delete-account/index.ts +59 -0
  138. package/templates/brandy/tier5-src/wix-spaces-my-subscriptions/index.ts +89 -0
  139. package/templates/brandy/tier5-src/wix-spaces-subscription-detail/index.ts +139 -0
  140. package/templates/brandy/tokens.json +25 -0
  141. package/templates/community-club/l10n/ar.json +0 -412
  142. package/templates/community-club/l10n/cs.json +0 -412
  143. package/templates/community-club/l10n/da.json +0 -412
  144. package/templates/community-club/l10n/de.json +0 -412
  145. package/templates/community-club/l10n/el.json +0 -412
  146. package/templates/community-club/l10n/en.json +1 -46
  147. package/templates/community-club/l10n/es.json +0 -412
  148. package/templates/community-club/l10n/fi.json +0 -412
  149. package/templates/community-club/l10n/fr.json +0 -412
  150. package/templates/community-club/l10n/he.json +0 -331
  151. package/templates/community-club/l10n/hu.json +0 -412
  152. package/templates/community-club/l10n/id.json +0 -412
  153. package/templates/community-club/l10n/it.json +0 -412
  154. package/templates/community-club/l10n/ja.json +0 -412
  155. package/templates/community-club/l10n/ko.json +0 -412
  156. package/templates/community-club/l10n/lt.json +0 -412
  157. package/templates/community-club/l10n/nl.json +0 -412
  158. package/templates/community-club/l10n/no.json +0 -412
  159. package/templates/community-club/l10n/pl.json +0 -412
  160. package/templates/community-club/l10n/pt.json +0 -412
  161. package/templates/community-club/l10n/ru.json +0 -412
  162. package/templates/community-club/l10n/sv.json +0 -412
  163. package/templates/community-club/l10n/th.json +0 -412
  164. package/templates/community-club/l10n/tr.json +0 -412
  165. package/templates/community-club/l10n/uk.json +0 -412
  166. package/templates/community-club/l10n/vi.json +0 -412
  167. package/templates/community-club/l10n/zh.json +0 -412
  168. package/templates/events-meetups/l10n/ar.json +0 -412
  169. package/templates/events-meetups/l10n/cs.json +0 -412
  170. package/templates/events-meetups/l10n/da.json +0 -412
  171. package/templates/events-meetups/l10n/de.json +0 -412
  172. package/templates/events-meetups/l10n/el.json +0 -412
  173. package/templates/events-meetups/l10n/en.json +1 -46
  174. package/templates/events-meetups/l10n/es.json +0 -412
  175. package/templates/events-meetups/l10n/fi.json +0 -412
  176. package/templates/events-meetups/l10n/fr.json +0 -412
  177. package/templates/events-meetups/l10n/he.json +0 -331
  178. package/templates/events-meetups/l10n/hu.json +0 -412
  179. package/templates/events-meetups/l10n/id.json +0 -412
  180. package/templates/events-meetups/l10n/it.json +0 -412
  181. package/templates/events-meetups/l10n/ja.json +0 -412
  182. package/templates/events-meetups/l10n/ko.json +0 -412
  183. package/templates/events-meetups/l10n/lt.json +0 -412
  184. package/templates/events-meetups/l10n/nl.json +0 -412
  185. package/templates/events-meetups/l10n/no.json +0 -412
  186. package/templates/events-meetups/l10n/pl.json +0 -412
  187. package/templates/events-meetups/l10n/pt.json +0 -412
  188. package/templates/events-meetups/l10n/ru.json +0 -412
  189. package/templates/events-meetups/l10n/sv.json +0 -412
  190. package/templates/events-meetups/l10n/th.json +0 -412
  191. package/templates/events-meetups/l10n/tr.json +0 -412
  192. package/templates/events-meetups/l10n/uk.json +0 -412
  193. package/templates/events-meetups/l10n/vi.json +0 -412
  194. package/templates/events-meetups/l10n/zh.json +0 -412
  195. package/templates/gym-fitness/l10n/ar.json +9 -405
  196. package/templates/gym-fitness/l10n/cs.json +9 -405
  197. package/templates/gym-fitness/l10n/da.json +9 -405
  198. package/templates/gym-fitness/l10n/de.json +9 -405
  199. package/templates/gym-fitness/l10n/el.json +9 -405
  200. package/templates/gym-fitness/l10n/en.json +8 -51
  201. package/templates/gym-fitness/l10n/es.json +9 -405
  202. package/templates/gym-fitness/l10n/fi.json +9 -405
  203. package/templates/gym-fitness/l10n/fr.json +9 -405
  204. package/templates/gym-fitness/l10n/he.json +9 -326
  205. package/templates/gym-fitness/l10n/hu.json +9 -405
  206. package/templates/gym-fitness/l10n/id.json +9 -405
  207. package/templates/gym-fitness/l10n/it.json +9 -405
  208. package/templates/gym-fitness/l10n/ja.json +9 -405
  209. package/templates/gym-fitness/l10n/ko.json +9 -405
  210. package/templates/gym-fitness/l10n/lt.json +9 -405
  211. package/templates/gym-fitness/l10n/nl.json +9 -405
  212. package/templates/gym-fitness/l10n/no.json +9 -405
  213. package/templates/gym-fitness/l10n/pl.json +9 -405
  214. package/templates/gym-fitness/l10n/pt.json +9 -405
  215. package/templates/gym-fitness/l10n/ru.json +9 -405
  216. package/templates/gym-fitness/l10n/sv.json +9 -405
  217. package/templates/gym-fitness/l10n/th.json +9 -405
  218. package/templates/gym-fitness/l10n/tr.json +9 -405
  219. package/templates/gym-fitness/l10n/uk.json +9 -405
  220. package/templates/gym-fitness/l10n/vi.json +9 -405
  221. package/templates/gym-fitness/l10n/zh.json +9 -405
  222. package/templates/nonprofit-cause/l10n/ar.json +0 -387
  223. package/templates/nonprofit-cause/l10n/cs.json +0 -387
  224. package/templates/nonprofit-cause/l10n/da.json +0 -387
  225. package/templates/nonprofit-cause/l10n/de.json +0 -387
  226. package/templates/nonprofit-cause/l10n/el.json +0 -387
  227. package/templates/nonprofit-cause/l10n/en.json +1 -46
  228. package/templates/nonprofit-cause/l10n/es.json +0 -387
  229. package/templates/nonprofit-cause/l10n/fi.json +0 -387
  230. package/templates/nonprofit-cause/l10n/fr.json +0 -387
  231. package/templates/nonprofit-cause/l10n/he.json +0 -311
  232. package/templates/nonprofit-cause/l10n/hu.json +0 -387
  233. package/templates/nonprofit-cause/l10n/id.json +0 -387
  234. package/templates/nonprofit-cause/l10n/it.json +0 -387
  235. package/templates/nonprofit-cause/l10n/ja.json +0 -387
  236. package/templates/nonprofit-cause/l10n/ko.json +0 -387
  237. package/templates/nonprofit-cause/l10n/lt.json +0 -387
  238. package/templates/nonprofit-cause/l10n/nl.json +0 -387
  239. package/templates/nonprofit-cause/l10n/no.json +0 -387
  240. package/templates/nonprofit-cause/l10n/pl.json +0 -387
  241. package/templates/nonprofit-cause/l10n/pt.json +0 -387
  242. package/templates/nonprofit-cause/l10n/ru.json +0 -387
  243. package/templates/nonprofit-cause/l10n/sv.json +0 -387
  244. package/templates/nonprofit-cause/l10n/th.json +0 -387
  245. package/templates/nonprofit-cause/l10n/tr.json +0 -387
  246. package/templates/nonprofit-cause/l10n/uk.json +0 -387
  247. package/templates/nonprofit-cause/l10n/vi.json +0 -387
  248. package/templates/nonprofit-cause/l10n/zh.json +0 -387
  249. package/templates/podcast-creator/l10n/ar.json +0 -417
  250. package/templates/podcast-creator/l10n/cs.json +0 -417
  251. package/templates/podcast-creator/l10n/da.json +0 -417
  252. package/templates/podcast-creator/l10n/de.json +0 -417
  253. package/templates/podcast-creator/l10n/el.json +0 -417
  254. package/templates/podcast-creator/l10n/en.json +1 -46
  255. package/templates/podcast-creator/l10n/es.json +0 -417
  256. package/templates/podcast-creator/l10n/fi.json +0 -417
  257. package/templates/podcast-creator/l10n/fr.json +0 -417
  258. package/templates/podcast-creator/l10n/he.json +0 -335
  259. package/templates/podcast-creator/l10n/hu.json +0 -417
  260. package/templates/podcast-creator/l10n/id.json +0 -417
  261. package/templates/podcast-creator/l10n/it.json +0 -417
  262. package/templates/podcast-creator/l10n/ja.json +0 -417
  263. package/templates/podcast-creator/l10n/ko.json +0 -417
  264. package/templates/podcast-creator/l10n/lt.json +0 -417
  265. package/templates/podcast-creator/l10n/nl.json +0 -417
  266. package/templates/podcast-creator/l10n/no.json +0 -417
  267. package/templates/podcast-creator/l10n/pl.json +0 -417
  268. package/templates/podcast-creator/l10n/pt.json +0 -417
  269. package/templates/podcast-creator/l10n/ru.json +0 -417
  270. package/templates/podcast-creator/l10n/sv.json +0 -417
  271. package/templates/podcast-creator/l10n/th.json +0 -417
  272. package/templates/podcast-creator/l10n/tr.json +0 -417
  273. package/templates/podcast-creator/l10n/uk.json +0 -417
  274. package/templates/podcast-creator/l10n/vi.json +0 -417
  275. package/templates/podcast-creator/l10n/zh.json +0 -417
  276. package/templates/portfolio-creative/l10n/ar.json +0 -437
  277. package/templates/portfolio-creative/l10n/cs.json +0 -437
  278. package/templates/portfolio-creative/l10n/da.json +0 -437
  279. package/templates/portfolio-creative/l10n/de.json +0 -437
  280. package/templates/portfolio-creative/l10n/el.json +0 -437
  281. package/templates/portfolio-creative/l10n/en.json +1 -46
  282. package/templates/portfolio-creative/l10n/es.json +0 -437
  283. package/templates/portfolio-creative/l10n/fi.json +0 -437
  284. package/templates/portfolio-creative/l10n/fr.json +0 -437
  285. package/templates/portfolio-creative/l10n/he.json +0 -351
  286. package/templates/portfolio-creative/l10n/hu.json +0 -437
  287. package/templates/portfolio-creative/l10n/id.json +0 -437
  288. package/templates/portfolio-creative/l10n/it.json +0 -437
  289. package/templates/portfolio-creative/l10n/ja.json +0 -437
  290. package/templates/portfolio-creative/l10n/ko.json +0 -437
  291. package/templates/portfolio-creative/l10n/lt.json +0 -437
  292. package/templates/portfolio-creative/l10n/nl.json +0 -437
  293. package/templates/portfolio-creative/l10n/no.json +0 -437
  294. package/templates/portfolio-creative/l10n/pl.json +0 -437
  295. package/templates/portfolio-creative/l10n/pt.json +0 -437
  296. package/templates/portfolio-creative/l10n/ru.json +0 -437
  297. package/templates/portfolio-creative/l10n/sv.json +0 -437
  298. package/templates/portfolio-creative/l10n/th.json +0 -437
  299. package/templates/portfolio-creative/l10n/tr.json +0 -437
  300. package/templates/portfolio-creative/l10n/uk.json +0 -437
  301. package/templates/portfolio-creative/l10n/vi.json +0 -437
  302. package/templates/portfolio-creative/l10n/zh.json +0 -437
  303. package/templates/restaurant/l10n/ar.json +0 -447
  304. package/templates/restaurant/l10n/cs.json +0 -447
  305. package/templates/restaurant/l10n/da.json +0 -447
  306. package/templates/restaurant/l10n/de.json +0 -447
  307. package/templates/restaurant/l10n/el.json +0 -447
  308. package/templates/restaurant/l10n/en.json +1 -46
  309. package/templates/restaurant/l10n/es.json +0 -447
  310. package/templates/restaurant/l10n/fi.json +0 -447
  311. package/templates/restaurant/l10n/fr.json +0 -447
  312. package/templates/restaurant/l10n/he.json +0 -359
  313. package/templates/restaurant/l10n/hu.json +0 -447
  314. package/templates/restaurant/l10n/id.json +0 -447
  315. package/templates/restaurant/l10n/it.json +0 -447
  316. package/templates/restaurant/l10n/ja.json +0 -447
  317. package/templates/restaurant/l10n/ko.json +0 -447
  318. package/templates/restaurant/l10n/lt.json +0 -447
  319. package/templates/restaurant/l10n/nl.json +0 -447
  320. package/templates/restaurant/l10n/no.json +0 -447
  321. package/templates/restaurant/l10n/pl.json +0 -447
  322. package/templates/restaurant/l10n/pt.json +0 -447
  323. package/templates/restaurant/l10n/ru.json +0 -447
  324. package/templates/restaurant/l10n/sv.json +0 -447
  325. package/templates/restaurant/l10n/th.json +0 -447
  326. package/templates/restaurant/l10n/tr.json +0 -447
  327. package/templates/restaurant/l10n/uk.json +0 -447
  328. package/templates/restaurant/l10n/vi.json +0 -447
  329. package/templates/restaurant/l10n/zh.json +0 -447
  330. package/templates/retail-store/l10n/ar.json +0 -462
  331. package/templates/retail-store/l10n/cs.json +0 -462
  332. package/templates/retail-store/l10n/da.json +0 -462
  333. package/templates/retail-store/l10n/de.json +0 -462
  334. package/templates/retail-store/l10n/el.json +0 -462
  335. package/templates/retail-store/l10n/en.json +1 -61
  336. package/templates/retail-store/l10n/es.json +0 -462
  337. package/templates/retail-store/l10n/fi.json +0 -462
  338. package/templates/retail-store/l10n/fr.json +0 -462
  339. package/templates/retail-store/l10n/he.json +0 -371
  340. package/templates/retail-store/l10n/hu.json +0 -462
  341. package/templates/retail-store/l10n/id.json +0 -462
  342. package/templates/retail-store/l10n/it.json +0 -462
  343. package/templates/retail-store/l10n/ja.json +0 -462
  344. package/templates/retail-store/l10n/ko.json +0 -462
  345. package/templates/retail-store/l10n/lt.json +0 -462
  346. package/templates/retail-store/l10n/nl.json +0 -462
  347. package/templates/retail-store/l10n/no.json +0 -462
  348. package/templates/retail-store/l10n/pl.json +0 -462
  349. package/templates/retail-store/l10n/pt.json +0 -462
  350. package/templates/retail-store/l10n/ru.json +0 -462
  351. package/templates/retail-store/l10n/sv.json +0 -462
  352. package/templates/retail-store/l10n/th.json +0 -462
  353. package/templates/retail-store/l10n/tr.json +0 -462
  354. package/templates/retail-store/l10n/uk.json +0 -462
  355. package/templates/retail-store/l10n/vi.json +0 -462
  356. package/templates/retail-store/l10n/zh.json +0 -462
  357. package/templates/yoga-studio/l10n/ar.json +9 -197
  358. package/templates/yoga-studio/l10n/cs.json +9 -197
  359. package/templates/yoga-studio/l10n/da.json +9 -197
  360. package/templates/yoga-studio/l10n/de.json +9 -197
  361. package/templates/yoga-studio/l10n/el.json +9 -197
  362. package/templates/yoga-studio/l10n/en.json +8 -30
  363. package/templates/yoga-studio/l10n/es.json +9 -197
  364. package/templates/yoga-studio/l10n/fi.json +9 -197
  365. package/templates/yoga-studio/l10n/fr.json +9 -197
  366. package/templates/yoga-studio/l10n/he.json +9 -159
  367. package/templates/yoga-studio/l10n/hu.json +9 -197
  368. package/templates/yoga-studio/l10n/id.json +9 -197
  369. package/templates/yoga-studio/l10n/it.json +9 -197
  370. package/templates/yoga-studio/l10n/ja.json +9 -197
  371. package/templates/yoga-studio/l10n/ko.json +9 -197
  372. package/templates/yoga-studio/l10n/lt.json +9 -197
  373. package/templates/yoga-studio/l10n/nl.json +9 -197
  374. package/templates/yoga-studio/l10n/no.json +9 -197
  375. package/templates/yoga-studio/l10n/pl.json +9 -197
  376. package/templates/yoga-studio/l10n/pt.json +9 -197
  377. package/templates/yoga-studio/l10n/ru.json +9 -197
  378. package/templates/yoga-studio/l10n/sv.json +9 -197
  379. package/templates/yoga-studio/l10n/th.json +9 -197
  380. package/templates/yoga-studio/l10n/tr.json +9 -197
  381. package/templates/yoga-studio/l10n/uk.json +9 -197
  382. package/templates/yoga-studio/l10n/vi.json +9 -197
  383. package/templates/yoga-studio/l10n/zh.json +9 -197
  384. package/templates/beauty-salon/recipes/announcement-card.json +0 -72
  385. package/templates/beauty-salon/recipes/blog-hero.json +0 -95
  386. package/templates/beauty-salon/recipes/blog-list-thumb-start.json +0 -394
  387. package/templates/beauty-salon/recipes/blog-list.json +0 -394
  388. package/templates/beauty-salon/recipes/blog-see-all.json +0 -50
  389. package/templates/beauty-salon/recipes/events-inline-list.json +0 -228
  390. package/templates/beauty-salon/recipes/events-inline.json +0 -309
  391. package/templates/beauty-salon/recipes/faq-list.json +0 -503
  392. package/templates/beauty-salon/recipes/members-list.json +0 -445
  393. package/templates/beauty-salon/recipes/plans-card.json +0 -811
  394. package/templates/beauty-salon/recipes/products-carousel.json +0 -141
  395. package/templates/beauty-salon/recipes/products-grid.json +0 -143
  396. package/templates/beauty-salon/recipes/programs-card.json +0 -254
  397. package/templates/beauty-salon/recipes/programs-carousel.json +0 -234
  398. package/templates/beauty-salon/recipes/programs-filters.json +0 -94
  399. package/templates/beauty-salon/recipes/programs-see-all.json +0 -43
  400. package/templates/beauty-salon/recipes/section-error.json +0 -58
  401. package/templates/beauty-salon/tier5-src/_shared/announcement-section.ts +0 -122
  402. package/templates/beauty-salon/tier5-src/_shared/blog-list.ts +0 -207
  403. package/templates/beauty-salon/tier5-src/_shared/event-registration.ts +0 -86
  404. package/templates/beauty-salon/tier5-src/_shared/events-card.ts +0 -33
  405. package/templates/beauty-salon/tier5-src/_shared/events-inline-options.ts +0 -25
  406. package/templates/beauty-salon/tier5-src/_shared/events-inline.ts +0 -84
  407. package/templates/beauty-salon/tier5-src/_shared/faq-list.ts +0 -405
  408. package/templates/beauty-salon/tier5-src/_shared/groups-section.ts +0 -110
  409. package/templates/beauty-salon/tier5-src/_shared/member-activity.ts +0 -34
  410. package/templates/beauty-salon/tier5-src/_shared/member-row-extras.ts +0 -175
  411. package/templates/beauty-salon/tier5-src/_shared/members-directory-view.ts +0 -39
  412. package/templates/beauty-salon/tier5-src/_shared/members-directory.ts +0 -271
  413. package/templates/beauty-salon/tier5-src/_shared/plan-facts.ts +0 -87
  414. package/templates/beauty-salon/tier5-src/_shared/plans-section.ts +0 -106
  415. package/templates/beauty-salon/tier5-src/_shared/products-section.ts +0 -76
  416. package/templates/beauty-salon/tier5-src/_shared/program-fields.ts +0 -16
  417. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +0 -740
  418. package/templates/beauty-salon/tier5-src/_shared/relative-time.ts +0 -21
  419. package/templates/community-club/recipes/announcement-card.json +0 -72
  420. package/templates/community-club/recipes/blog-hero.json +0 -95
  421. package/templates/community-club/recipes/blog-list-thumb-start.json +0 -394
  422. package/templates/community-club/recipes/blog-list.json +0 -394
  423. package/templates/community-club/recipes/blog-see-all.json +0 -50
  424. package/templates/community-club/recipes/events-inline.json +0 -309
  425. package/templates/community-club/recipes/faq-list.json +0 -503
  426. package/templates/community-club/recipes/members-list.json +0 -445
  427. package/templates/community-club/recipes/plans-card.json +0 -811
  428. package/templates/community-club/recipes/products-carousel.json +0 -141
  429. package/templates/community-club/recipes/products-grid.json +0 -143
  430. package/templates/community-club/recipes/programs-card.json +0 -254
  431. package/templates/community-club/recipes/programs-carousel.json +0 -234
  432. package/templates/community-club/recipes/programs-filters.json +0 -94
  433. package/templates/community-club/recipes/programs-participant-carousel.json +0 -257
  434. package/templates/community-club/recipes/programs-see-all.json +0 -43
  435. package/templates/community-club/recipes/section-error.json +0 -58
  436. package/templates/community-club/tier5-src/_shared/announcement-section.ts +0 -122
  437. package/templates/community-club/tier5-src/_shared/blog-list.ts +0 -207
  438. package/templates/community-club/tier5-src/_shared/events-card.ts +0 -33
  439. package/templates/community-club/tier5-src/_shared/events-inline-options.ts +0 -25
  440. package/templates/community-club/tier5-src/_shared/events-inline.ts +0 -84
  441. package/templates/community-club/tier5-src/_shared/faq-list.ts +0 -405
  442. package/templates/community-club/tier5-src/_shared/groups-section.ts +0 -110
  443. package/templates/community-club/tier5-src/_shared/member-activity.ts +0 -34
  444. package/templates/community-club/tier5-src/_shared/member-row-extras.ts +0 -175
  445. package/templates/community-club/tier5-src/_shared/members-directory-view.ts +0 -39
  446. package/templates/community-club/tier5-src/_shared/members-directory.ts +0 -271
  447. package/templates/community-club/tier5-src/_shared/plan-facts.ts +0 -87
  448. package/templates/community-club/tier5-src/_shared/plans-section.ts +0 -106
  449. package/templates/community-club/tier5-src/_shared/products-section.ts +0 -76
  450. package/templates/community-club/tier5-src/_shared/program-fields.ts +0 -16
  451. package/templates/community-club/tier5-src/_shared/programs-section.ts +0 -740
  452. package/templates/community-club/tier5-src/_shared/relative-time.ts +0 -21
  453. package/templates/events-meetups/recipes/announcement-card.json +0 -72
  454. package/templates/events-meetups/recipes/blog-hero.json +0 -95
  455. package/templates/events-meetups/recipes/blog-list-thumb-start.json +0 -394
  456. package/templates/events-meetups/recipes/blog-list.json +0 -394
  457. package/templates/events-meetups/recipes/blog-see-all.json +0 -50
  458. package/templates/events-meetups/recipes/events-inline-list.json +0 -228
  459. package/templates/events-meetups/recipes/events-inline.json +0 -309
  460. package/templates/events-meetups/recipes/faq-list.json +0 -503
  461. package/templates/events-meetups/recipes/groups-list.json +0 -196
  462. package/templates/events-meetups/recipes/members-list.json +0 -445
  463. package/templates/events-meetups/recipes/plans-card.json +0 -811
  464. package/templates/events-meetups/recipes/products-carousel.json +0 -141
  465. package/templates/events-meetups/recipes/products-grid.json +0 -143
  466. package/templates/events-meetups/recipes/programs-card.json +0 -254
  467. package/templates/events-meetups/recipes/programs-carousel.json +0 -234
  468. package/templates/events-meetups/recipes/programs-filters.json +0 -94
  469. package/templates/events-meetups/recipes/programs-see-all.json +0 -43
  470. package/templates/events-meetups/recipes/section-error.json +0 -58
  471. package/templates/events-meetups/tier5-src/_shared/announcement-section.ts +0 -122
  472. package/templates/events-meetups/tier5-src/_shared/blog-list.ts +0 -207
  473. package/templates/events-meetups/tier5-src/_shared/detail-presence.ts +0 -51
  474. package/templates/events-meetups/tier5-src/_shared/events-card.ts +0 -33
  475. package/templates/events-meetups/tier5-src/_shared/events-inline-options.ts +0 -25
  476. package/templates/events-meetups/tier5-src/_shared/events-inline.ts +0 -84
  477. package/templates/events-meetups/tier5-src/_shared/faq-list.ts +0 -405
  478. package/templates/events-meetups/tier5-src/_shared/groups-section.ts +0 -110
  479. package/templates/events-meetups/tier5-src/_shared/member-activity.ts +0 -34
  480. package/templates/events-meetups/tier5-src/_shared/member-row-extras.ts +0 -175
  481. package/templates/events-meetups/tier5-src/_shared/members-directory-view.ts +0 -39
  482. package/templates/events-meetups/tier5-src/_shared/members-directory.ts +0 -271
  483. package/templates/events-meetups/tier5-src/_shared/plan-facts.ts +0 -87
  484. package/templates/events-meetups/tier5-src/_shared/plans-section.ts +0 -106
  485. package/templates/events-meetups/tier5-src/_shared/products-section.ts +0 -76
  486. package/templates/events-meetups/tier5-src/_shared/program-fields.ts +0 -16
  487. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +0 -740
  488. package/templates/events-meetups/tier5-src/_shared/relative-time.ts +0 -21
  489. package/templates/gym-fitness/recipes/announcement-card.json +0 -72
  490. package/templates/gym-fitness/recipes/blog-hero.json +0 -95
  491. package/templates/gym-fitness/recipes/blog-list-thumb-start.json +0 -394
  492. package/templates/gym-fitness/recipes/blog-list.json +0 -394
  493. package/templates/gym-fitness/recipes/blog-see-all.json +0 -50
  494. package/templates/gym-fitness/recipes/events-inline-list.json +0 -228
  495. package/templates/gym-fitness/recipes/events-inline.json +0 -309
  496. package/templates/gym-fitness/recipes/faq-list.json +0 -503
  497. package/templates/gym-fitness/recipes/groups-list.json +0 -196
  498. package/templates/gym-fitness/recipes/members-list.json +0 -445
  499. package/templates/gym-fitness/recipes/plans-card.json +0 -811
  500. package/templates/gym-fitness/recipes/products-carousel.json +0 -141
  501. package/templates/gym-fitness/recipes/products-grid.json +0 -143
  502. package/templates/gym-fitness/recipes/programs-card.json +0 -254
  503. package/templates/gym-fitness/recipes/programs-carousel.json +0 -234
  504. package/templates/gym-fitness/recipes/programs-filters.json +0 -94
  505. package/templates/gym-fitness/recipes/programs-see-all.json +0 -43
  506. package/templates/gym-fitness/recipes/section-error.json +0 -58
  507. package/templates/gym-fitness/tier5-src/_shared/announcement-section.ts +0 -122
  508. package/templates/gym-fitness/tier5-src/_shared/blog-list.ts +0 -207
  509. package/templates/gym-fitness/tier5-src/_shared/events-card.ts +0 -33
  510. package/templates/gym-fitness/tier5-src/_shared/events-inline-options.ts +0 -25
  511. package/templates/gym-fitness/tier5-src/_shared/events-inline.ts +0 -84
  512. package/templates/gym-fitness/tier5-src/_shared/faq-list.ts +0 -405
  513. package/templates/gym-fitness/tier5-src/_shared/groups-section.ts +0 -110
  514. package/templates/gym-fitness/tier5-src/_shared/member-activity.ts +0 -34
  515. package/templates/gym-fitness/tier5-src/_shared/member-row-extras.ts +0 -175
  516. package/templates/gym-fitness/tier5-src/_shared/members-directory-view.ts +0 -39
  517. package/templates/gym-fitness/tier5-src/_shared/members-directory.ts +0 -271
  518. package/templates/gym-fitness/tier5-src/_shared/plan-facts.ts +0 -87
  519. package/templates/gym-fitness/tier5-src/_shared/plans-section.ts +0 -106
  520. package/templates/gym-fitness/tier5-src/_shared/products-section.ts +0 -76
  521. package/templates/gym-fitness/tier5-src/_shared/program-fields.ts +0 -16
  522. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +0 -740
  523. package/templates/gym-fitness/tier5-src/_shared/relative-time.ts +0 -21
  524. package/templates/nonprofit-cause/recipes/announcement-card.json +0 -72
  525. package/templates/nonprofit-cause/recipes/blog-hero.json +0 -95
  526. package/templates/nonprofit-cause/recipes/blog-list-thumb-start.json +0 -394
  527. package/templates/nonprofit-cause/recipes/blog-list.json +0 -394
  528. package/templates/nonprofit-cause/recipes/blog-see-all.json +0 -50
  529. package/templates/nonprofit-cause/recipes/events-inline-list.json +0 -228
  530. package/templates/nonprofit-cause/recipes/events-inline.json +0 -309
  531. package/templates/nonprofit-cause/recipes/faq-list.json +0 -503
  532. package/templates/nonprofit-cause/recipes/groups-list.json +0 -196
  533. package/templates/nonprofit-cause/recipes/members-list.json +0 -445
  534. package/templates/nonprofit-cause/recipes/plans-card.json +0 -811
  535. package/templates/nonprofit-cause/recipes/products-carousel.json +0 -141
  536. package/templates/nonprofit-cause/recipes/products-grid.json +0 -143
  537. package/templates/nonprofit-cause/recipes/programs-card.json +0 -254
  538. package/templates/nonprofit-cause/recipes/programs-carousel.json +0 -234
  539. package/templates/nonprofit-cause/recipes/programs-filters.json +0 -94
  540. package/templates/nonprofit-cause/recipes/programs-participant-carousel.json +0 -257
  541. package/templates/nonprofit-cause/recipes/programs-see-all.json +0 -43
  542. package/templates/nonprofit-cause/recipes/section-error.json +0 -58
  543. package/templates/nonprofit-cause/tier5-src/_shared/announcement-section.ts +0 -122
  544. package/templates/nonprofit-cause/tier5-src/_shared/blog-list.ts +0 -207
  545. package/templates/nonprofit-cause/tier5-src/_shared/events-card.ts +0 -33
  546. package/templates/nonprofit-cause/tier5-src/_shared/events-inline-options.ts +0 -25
  547. package/templates/nonprofit-cause/tier5-src/_shared/events-inline.ts +0 -84
  548. package/templates/nonprofit-cause/tier5-src/_shared/faq-list.ts +0 -405
  549. package/templates/nonprofit-cause/tier5-src/_shared/groups-section.ts +0 -110
  550. package/templates/nonprofit-cause/tier5-src/_shared/member-activity.ts +0 -34
  551. package/templates/nonprofit-cause/tier5-src/_shared/member-row-extras.ts +0 -175
  552. package/templates/nonprofit-cause/tier5-src/_shared/members-directory-view.ts +0 -39
  553. package/templates/nonprofit-cause/tier5-src/_shared/members-directory.ts +0 -271
  554. package/templates/nonprofit-cause/tier5-src/_shared/plan-facts.ts +0 -87
  555. package/templates/nonprofit-cause/tier5-src/_shared/plans-section.ts +0 -106
  556. package/templates/nonprofit-cause/tier5-src/_shared/products-section.ts +0 -76
  557. package/templates/nonprofit-cause/tier5-src/_shared/program-fields.ts +0 -16
  558. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +0 -740
  559. package/templates/nonprofit-cause/tier5-src/_shared/relative-time.ts +0 -21
  560. package/templates/podcast-creator/recipes/announcement-card.json +0 -72
  561. package/templates/podcast-creator/recipes/blog-hero.json +0 -95
  562. package/templates/podcast-creator/recipes/blog-list-thumb-start.json +0 -394
  563. package/templates/podcast-creator/recipes/blog-list.json +0 -394
  564. package/templates/podcast-creator/recipes/blog-see-all.json +0 -50
  565. package/templates/podcast-creator/recipes/events-inline-list.json +0 -228
  566. package/templates/podcast-creator/recipes/events-inline.json +0 -309
  567. package/templates/podcast-creator/recipes/faq-list.json +0 -503
  568. package/templates/podcast-creator/recipes/groups-list.json +0 -196
  569. package/templates/podcast-creator/recipes/members-list.json +0 -445
  570. package/templates/podcast-creator/recipes/plans-card.json +0 -811
  571. package/templates/podcast-creator/recipes/products-carousel.json +0 -141
  572. package/templates/podcast-creator/recipes/products-grid.json +0 -143
  573. package/templates/podcast-creator/recipes/programs-card.json +0 -254
  574. package/templates/podcast-creator/recipes/programs-carousel.json +0 -234
  575. package/templates/podcast-creator/recipes/programs-filters.json +0 -94
  576. package/templates/podcast-creator/recipes/programs-participant-carousel.json +0 -257
  577. package/templates/podcast-creator/recipes/programs-see-all.json +0 -43
  578. package/templates/podcast-creator/recipes/section-error.json +0 -58
  579. package/templates/podcast-creator/tier5-src/_shared/announcement-section.ts +0 -122
  580. package/templates/podcast-creator/tier5-src/_shared/blog-list.ts +0 -207
  581. package/templates/podcast-creator/tier5-src/_shared/events-card.ts +0 -33
  582. package/templates/podcast-creator/tier5-src/_shared/events-inline-options.ts +0 -25
  583. package/templates/podcast-creator/tier5-src/_shared/events-inline.ts +0 -84
  584. package/templates/podcast-creator/tier5-src/_shared/faq-list.ts +0 -405
  585. package/templates/podcast-creator/tier5-src/_shared/groups-section.ts +0 -110
  586. package/templates/podcast-creator/tier5-src/_shared/member-activity.ts +0 -34
  587. package/templates/podcast-creator/tier5-src/_shared/member-row-extras.ts +0 -175
  588. package/templates/podcast-creator/tier5-src/_shared/members-directory-view.ts +0 -39
  589. package/templates/podcast-creator/tier5-src/_shared/members-directory.ts +0 -271
  590. package/templates/podcast-creator/tier5-src/_shared/plan-facts.ts +0 -87
  591. package/templates/podcast-creator/tier5-src/_shared/plans-section.ts +0 -106
  592. package/templates/podcast-creator/tier5-src/_shared/products-section.ts +0 -76
  593. package/templates/podcast-creator/tier5-src/_shared/program-fields.ts +0 -16
  594. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +0 -740
  595. package/templates/podcast-creator/tier5-src/_shared/relative-time.ts +0 -21
  596. package/templates/portfolio-creative/recipes/announcement-card.json +0 -72
  597. package/templates/portfolio-creative/recipes/blog-hero.json +0 -95
  598. package/templates/portfolio-creative/recipes/blog-list-thumb-start.json +0 -394
  599. package/templates/portfolio-creative/recipes/blog-list.json +0 -394
  600. package/templates/portfolio-creative/recipes/blog-see-all.json +0 -50
  601. package/templates/portfolio-creative/recipes/events-inline-list.json +0 -228
  602. package/templates/portfolio-creative/recipes/events-inline.json +0 -309
  603. package/templates/portfolio-creative/recipes/faq-list.json +0 -503
  604. package/templates/portfolio-creative/recipes/groups-list.json +0 -196
  605. package/templates/portfolio-creative/recipes/members-list.json +0 -445
  606. package/templates/portfolio-creative/recipes/plans-card.json +0 -811
  607. package/templates/portfolio-creative/recipes/products-carousel.json +0 -141
  608. package/templates/portfolio-creative/recipes/products-grid.json +0 -143
  609. package/templates/portfolio-creative/recipes/programs-card.json +0 -254
  610. package/templates/portfolio-creative/recipes/programs-carousel.json +0 -234
  611. package/templates/portfolio-creative/recipes/programs-filters.json +0 -94
  612. package/templates/portfolio-creative/recipes/programs-participant-carousel.json +0 -257
  613. package/templates/portfolio-creative/recipes/programs-see-all.json +0 -43
  614. package/templates/portfolio-creative/recipes/section-error.json +0 -58
  615. package/templates/portfolio-creative/tier5-src/_shared/announcement-section.ts +0 -122
  616. package/templates/portfolio-creative/tier5-src/_shared/blog-list.ts +0 -207
  617. package/templates/portfolio-creative/tier5-src/_shared/events-card.ts +0 -33
  618. package/templates/portfolio-creative/tier5-src/_shared/events-inline-options.ts +0 -25
  619. package/templates/portfolio-creative/tier5-src/_shared/events-inline.ts +0 -84
  620. package/templates/portfolio-creative/tier5-src/_shared/faq-list.ts +0 -405
  621. package/templates/portfolio-creative/tier5-src/_shared/groups-section.ts +0 -110
  622. package/templates/portfolio-creative/tier5-src/_shared/member-activity.ts +0 -34
  623. package/templates/portfolio-creative/tier5-src/_shared/member-row-extras.ts +0 -175
  624. package/templates/portfolio-creative/tier5-src/_shared/members-directory-view.ts +0 -39
  625. package/templates/portfolio-creative/tier5-src/_shared/members-directory.ts +0 -271
  626. package/templates/portfolio-creative/tier5-src/_shared/plan-facts.ts +0 -87
  627. package/templates/portfolio-creative/tier5-src/_shared/plans-section.ts +0 -106
  628. package/templates/portfolio-creative/tier5-src/_shared/products-section.ts +0 -76
  629. package/templates/portfolio-creative/tier5-src/_shared/program-fields.ts +0 -16
  630. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +0 -740
  631. package/templates/portfolio-creative/tier5-src/_shared/relative-time.ts +0 -21
  632. package/templates/restaurant/recipes/announcement-card.json +0 -72
  633. package/templates/restaurant/recipes/blog-hero.json +0 -95
  634. package/templates/restaurant/recipes/blog-list-thumb-start.json +0 -394
  635. package/templates/restaurant/recipes/blog-list.json +0 -394
  636. package/templates/restaurant/recipes/blog-see-all.json +0 -50
  637. package/templates/restaurant/recipes/events-inline-list.json +0 -228
  638. package/templates/restaurant/recipes/events-inline.json +0 -309
  639. package/templates/restaurant/recipes/faq-list.json +0 -503
  640. package/templates/restaurant/recipes/groups-list.json +0 -196
  641. package/templates/restaurant/recipes/members-list.json +0 -445
  642. package/templates/restaurant/recipes/plans-card.json +0 -811
  643. package/templates/restaurant/recipes/products-carousel.json +0 -141
  644. package/templates/restaurant/recipes/products-grid.json +0 -143
  645. package/templates/restaurant/recipes/programs-card.json +0 -254
  646. package/templates/restaurant/recipes/programs-carousel.json +0 -234
  647. package/templates/restaurant/recipes/programs-filters.json +0 -94
  648. package/templates/restaurant/recipes/programs-participant-carousel.json +0 -257
  649. package/templates/restaurant/recipes/programs-see-all.json +0 -43
  650. package/templates/restaurant/recipes/section-error.json +0 -58
  651. package/templates/restaurant/tier5-src/_shared/announcement-section.ts +0 -122
  652. package/templates/restaurant/tier5-src/_shared/blog-list.ts +0 -207
  653. package/templates/restaurant/tier5-src/_shared/events-card.ts +0 -33
  654. package/templates/restaurant/tier5-src/_shared/events-inline-options.ts +0 -25
  655. package/templates/restaurant/tier5-src/_shared/events-inline.ts +0 -84
  656. package/templates/restaurant/tier5-src/_shared/faq-list.ts +0 -405
  657. package/templates/restaurant/tier5-src/_shared/groups-section.ts +0 -110
  658. package/templates/restaurant/tier5-src/_shared/member-activity.ts +0 -34
  659. package/templates/restaurant/tier5-src/_shared/member-row-extras.ts +0 -175
  660. package/templates/restaurant/tier5-src/_shared/members-directory-view.ts +0 -39
  661. package/templates/restaurant/tier5-src/_shared/members-directory.ts +0 -271
  662. package/templates/restaurant/tier5-src/_shared/plan-facts.ts +0 -87
  663. package/templates/restaurant/tier5-src/_shared/plans-section.ts +0 -106
  664. package/templates/restaurant/tier5-src/_shared/products-section.ts +0 -76
  665. package/templates/restaurant/tier5-src/_shared/program-fields.ts +0 -16
  666. package/templates/restaurant/tier5-src/_shared/programs-section.ts +0 -740
  667. package/templates/restaurant/tier5-src/_shared/relative-time.ts +0 -21
  668. package/templates/retail-store/recipes/announcement-card.json +0 -72
  669. package/templates/retail-store/recipes/blog-hero.json +0 -95
  670. package/templates/retail-store/recipes/blog-list-thumb-start.json +0 -394
  671. package/templates/retail-store/recipes/blog-list.json +0 -394
  672. package/templates/retail-store/recipes/blog-see-all.json +0 -50
  673. package/templates/retail-store/recipes/events-inline-list.json +0 -228
  674. package/templates/retail-store/recipes/events-inline.json +0 -309
  675. package/templates/retail-store/recipes/faq-list.json +0 -503
  676. package/templates/retail-store/recipes/groups-list.json +0 -196
  677. package/templates/retail-store/recipes/members-list.json +0 -445
  678. package/templates/retail-store/recipes/plans-card.json +0 -811
  679. package/templates/retail-store/recipes/products-carousel.json +0 -141
  680. package/templates/retail-store/recipes/products-grid.json +0 -143
  681. package/templates/retail-store/recipes/programs-card.json +0 -254
  682. package/templates/retail-store/recipes/programs-carousel.json +0 -234
  683. package/templates/retail-store/recipes/programs-filters.json +0 -94
  684. package/templates/retail-store/recipes/programs-participant-carousel.json +0 -257
  685. package/templates/retail-store/recipes/programs-see-all.json +0 -43
  686. package/templates/retail-store/recipes/section-error.json +0 -58
  687. package/templates/retail-store/tier5-src/_shared/announcement-section.ts +0 -122
  688. package/templates/retail-store/tier5-src/_shared/blog-list.ts +0 -207
  689. package/templates/retail-store/tier5-src/_shared/event-registration.ts +0 -86
  690. package/templates/retail-store/tier5-src/_shared/events-card.ts +0 -33
  691. package/templates/retail-store/tier5-src/_shared/events-inline-options.ts +0 -25
  692. package/templates/retail-store/tier5-src/_shared/events-inline.ts +0 -84
  693. package/templates/retail-store/tier5-src/_shared/faq-list.ts +0 -405
  694. package/templates/retail-store/tier5-src/_shared/groups-section.ts +0 -110
  695. package/templates/retail-store/tier5-src/_shared/member-activity.ts +0 -34
  696. package/templates/retail-store/tier5-src/_shared/member-row-extras.ts +0 -175
  697. package/templates/retail-store/tier5-src/_shared/members-directory-view.ts +0 -39
  698. package/templates/retail-store/tier5-src/_shared/members-directory.ts +0 -271
  699. package/templates/retail-store/tier5-src/_shared/plan-facts.ts +0 -87
  700. package/templates/retail-store/tier5-src/_shared/plans-section.ts +0 -106
  701. package/templates/retail-store/tier5-src/_shared/products-section.ts +0 -76
  702. package/templates/retail-store/tier5-src/_shared/program-fields.ts +0 -16
  703. package/templates/retail-store/tier5-src/_shared/programs-section.ts +0 -740
  704. package/templates/retail-store/tier5-src/_shared/relative-time.ts +0 -21
  705. package/templates/yoga-studio/recipes/announcement-card.json +0 -72
  706. package/templates/yoga-studio/recipes/blog-hero.json +0 -95
  707. package/templates/yoga-studio/recipes/blog-list-thumb-start.json +0 -394
  708. package/templates/yoga-studio/recipes/blog-list.json +0 -394
  709. package/templates/yoga-studio/recipes/blog-see-all.json +0 -50
  710. package/templates/yoga-studio/recipes/events-inline-list.json +0 -228
  711. package/templates/yoga-studio/recipes/events-inline.json +0 -309
  712. package/templates/yoga-studio/recipes/faq-list.json +0 -503
  713. package/templates/yoga-studio/recipes/groups-list.json +0 -196
  714. package/templates/yoga-studio/recipes/members-list.json +0 -445
  715. package/templates/yoga-studio/recipes/plans-card.json +0 -811
  716. package/templates/yoga-studio/recipes/products-carousel.json +0 -141
  717. package/templates/yoga-studio/recipes/products-grid.json +0 -143
  718. package/templates/yoga-studio/recipes/programs-card.json +0 -254
  719. package/templates/yoga-studio/recipes/programs-carousel.json +0 -234
  720. package/templates/yoga-studio/recipes/programs-filters.json +0 -94
  721. package/templates/yoga-studio/recipes/programs-participant-carousel.json +0 -257
  722. package/templates/yoga-studio/recipes/programs-see-all.json +0 -43
  723. package/templates/yoga-studio/recipes/section-error.json +0 -58
  724. package/templates/yoga-studio/tier5-src/_shared/announcement-section.ts +0 -122
  725. package/templates/yoga-studio/tier5-src/_shared/blog-list.ts +0 -207
  726. package/templates/yoga-studio/tier5-src/_shared/events-card.ts +0 -33
  727. package/templates/yoga-studio/tier5-src/_shared/events-inline-options.ts +0 -25
  728. package/templates/yoga-studio/tier5-src/_shared/events-inline.ts +0 -84
  729. package/templates/yoga-studio/tier5-src/_shared/faq-list.ts +0 -405
  730. package/templates/yoga-studio/tier5-src/_shared/groups-section.ts +0 -110
  731. package/templates/yoga-studio/tier5-src/_shared/member-activity.ts +0 -34
  732. package/templates/yoga-studio/tier5-src/_shared/member-row-extras.ts +0 -175
  733. package/templates/yoga-studio/tier5-src/_shared/members-directory-view.ts +0 -39
  734. package/templates/yoga-studio/tier5-src/_shared/members-directory.ts +0 -271
  735. package/templates/yoga-studio/tier5-src/_shared/plan-facts.ts +0 -87
  736. package/templates/yoga-studio/tier5-src/_shared/plans-section.ts +0 -106
  737. package/templates/yoga-studio/tier5-src/_shared/products-section.ts +0 -76
  738. package/templates/yoga-studio/tier5-src/_shared/program-fields.ts +0 -16
  739. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +0 -740
  740. package/templates/yoga-studio/tier5-src/_shared/relative-time.ts +0 -21
  741. /package/templates/{community-club → brandy}/tier5-src/_shared/detail-presence.ts +0 -0
@@ -1,740 +0,0 @@
1
- // himi_member_programs — the MEMBER'S programs list: every published program decorated with the
2
- // signed-in member's standing (Joined / Completed / Ended / Pending / Approved / Suspended), a
3
- // progress bar once they started, the App Store or Wix price before they join, and two filters —
4
- // "All programs / Programs I joined" and a program category. The counterpart of the One App
5
- // `MemberChallengesList` section (wix-one-app-achievements): same reads, same card rules.
6
- //
7
- // Reads per page (all v3, member identity): queryPrograms (the page) → in parallel
8
- // getParticipationStats (counts), the member's participations (one cursor walk, cached for the
9
- // scope) and, for an unjoined private, secret or priced program, its current join application. The
10
- // "joined" filter walks the participations FIRST and queries programs by id, as the One App does.
11
- //
12
- // Not a `defineBackendCollection`: the shared collection chrome replaces the row with its generic
13
- // card and carries one filter axis, while this card needs a status label over the cover, a
14
- // ProgressBar and two filters. The shared query controller is reused as it is.
15
- import { defineService as register, navigate } from "@himalaya/state";
16
- import {
17
- queryPrograms, getParticipationStats, queryMemberParticipants, getCurrentJoinApplication, listProgramCategories,
18
- type WixProgram, type WixProgramFull, type WixParticipant, type WixJoinApplication, type WixProgramCategory,
19
- } from "@himalaya/wix-online-programs";
20
- import { getMyMember } from "@himalaya/wix-members";
21
- import { iapPriceFields, onlineProgramItem, type IapPollDirective } from "@himalaya/iap";
22
- import { createIapCommerce } from "@himalaya/iap-checkout";
23
- import { createCollectionQuery, type CollectionPage, type CollectionQueryState } from "./collection-query.js";
24
- import { memberAccess, memberAccessChanged, memberAccessDenied, type MemberAccess } from "./member-access.js";
25
- import { initials } from "./himi-text.js";
26
- import { isProgramDraft, isProgramEnded, programName } from "./program-fields.js";
27
- import { programImage } from "./himi-media.js";
28
- import { descriptionBody } from "./rich-body.js";
29
- import { programDescription } from "./program-description.js";
30
- import { isNotFoundError } from "./detail-presence.js";
31
- import { copyParam, copyTemplate, stashCopy } from "./himi-copy.js";
32
- import { formatCurrency, formatDateMedium, formatNumber } from "./engine-intl.js";
33
- import { iapPriceCopy, resetUnhydratedKeysOnOlderRuntime } from "./iap-worker.js";
34
-
35
- const PAGE_SIZE = 20;
36
- const DETAIL_SCREEN = "himi_program";
37
-
38
- // ── Row model ────────────────────────────────────────────────────────────────
39
-
40
- /** The member's standing on one program — the One App participant/application states, folded. */
41
- export type Standing = "none" | "joined" | "completed" | "finished" | "suspended" | "pending" | "approved" | "invited";
42
-
43
- /** A card as loaded, before pricing. */
44
- export interface ProgramContent {
45
- id: string;
46
- name: string;
47
- description: string;
48
- image: string;
49
- initial: string;
50
- hasImage: boolean;
51
- noImage: boolean;
52
- timelineLine: string;
53
- /** The card's duration: "30 days" or "No Time Limit" before joining, the progress line ("Started … · day 3 of 30") after. */
54
- durationLine: string;
55
- hasDuration: boolean;
56
- noDuration: boolean;
57
- /** "Public · 12 participants" — hidden once joined or over, as on the One App card. */
58
- accessLine: string;
59
- hasAccess: boolean;
60
- noAccess: boolean;
61
- standing: Standing;
62
- statusLabel: string;
63
- statusIcon: string;
64
- statusColor: string;
65
- hasStatus: boolean;
66
- noStatus: boolean;
67
- /** The sentence under the lines: "Join request sent", "Finished with 40% progress", … */
68
- descriptionLine: string;
69
- /** 0..1 — shown as a ProgressBar while joined and started. */
70
- progress: number;
71
- progressLabel: string;
72
- hasProgress: boolean;
73
- noProgress: boolean;
74
- /** The row may show a price: not joined, not over. */
75
- pricable: boolean;
76
- /** The commerce (Wix) price as text, for the regular route; "" when free or unknown. */
77
- commercePrice: string;
78
- free: boolean;
79
- actionLabel: string;
80
- actionDisabled: boolean;
81
- detailScreenId: string;
82
- categoryIds: string[];
83
- }
84
- export interface ProgramRow extends ProgramContent {
85
- priceLine: string;
86
- hasPrice: boolean;
87
- noPrice: boolean;
88
- }
89
-
90
- interface Option { id: string; label: string }
91
-
92
- export interface State {
93
- status: "loading" | "ready" | "error";
94
- rows: ProgramRow[];
95
- isLoading: boolean;
96
- notLoading: boolean;
97
- isErrored: boolean;
98
- notErrored: boolean;
99
- noEmpty: boolean;
100
- hideList: boolean;
101
- emptyText: string;
102
- errorText: string;
103
- identityLine: string;
104
- needsSignIn: boolean;
105
- noSignIn: boolean;
106
- nextCursor: string;
107
- noMore: boolean;
108
- noPageError: boolean;
109
- loadingMore: boolean;
110
- statusFilter: "all" | "joined";
111
- statusOptions: Option[];
112
- hideStatusFilter: boolean;
113
- categoryId: string;
114
- categoryChips: Option[];
115
- hideCategoryFilter: boolean;
116
- noSeeAll: boolean;
117
- hidePriceRetry: boolean;
118
- priceRetryText: string;
119
- summary: string;
120
- hasRows: boolean;
121
- noRows: boolean;
122
- _poll?: IapPollDirective;
123
- }
124
-
125
- // ── Program fields (v3 Program DTO; the list and the detail share the shape) ─────
126
-
127
- const full = (p: WixProgram): WixProgramFull => p as WixProgramFull;
128
-
129
- function programTitle(p: WixProgram): string {
130
- return programName(p) || copyParam("memberPrograms.programFallbackName", "Program");
131
- }
132
- function programDetails(p: WixProgram): string {
133
- // The body may be a Ricos document or serialized text: read it the way the catalog and detail do.
134
- const raw = descriptionBody(programDescription(p)).bodyText.replace(/\s+/g, " ").trim();
135
- return raw.length > 140 ? `${raw.slice(0, 139).trimEnd()}…` : raw;
136
- }
137
- const isEnded = isProgramEnded;
138
- const isDraft = isProgramDraft;
139
- function accessType(p: WixProgram): string {
140
- return (full(p).restrictions?.accessType ?? "PUBLIC").toUpperCase();
141
- }
142
- function maxParticipants(p: WixProgram): number {
143
- const value = Number((full(p).restrictions as { maxParticipants?: unknown } | undefined)?.maxParticipants ?? 0);
144
- return Number.isFinite(value) && value > 0 ? value : 0;
145
- }
146
- function stepCount(p: WixProgram): number {
147
- const value = Number(full(p).contentSummary?.stepCount ?? 0);
148
- return Number.isFinite(value) && value > 0 ? value : 0;
149
- }
150
- function categoryIdsOf(p: WixProgram): string[] {
151
- const ids = (p as { categoryIds?: unknown }).categoryIds;
152
- return Array.isArray(ids) ? ids.filter((id): id is string => typeof id === "string") : [];
153
- }
154
- /** The commerce price as text — "" when the program is free or the price is malformed. */
155
- function commercePriceOf(p: WixProgram): string {
156
- const price = full(p).price;
157
- const amount = Number(price?.value);
158
- if (!price?.currency || !Number.isFinite(amount) || amount <= 0) return "";
159
- try { return formatCurrency(amount, price.currency); } catch { return `${price.value} ${price.currency}`; }
160
- }
161
-
162
- function date(value?: string): string {
163
- if (!value) return "";
164
- const at = new Date(value);
165
- return Number.isNaN(at.getTime()) ? "" : formatDateMedium(at);
166
- }
167
- function daysBetween(fromIso: string, now: number): number {
168
- const from = Date.parse(fromIso);
169
- return Number.isFinite(from) ? Math.floor((now - from) / 86_400_000) : NaN;
170
- }
171
-
172
- // ── Member standing ──────────────────────────────────────────────────────────
173
-
174
- function standingOf(p: WixProgram, participant: WixParticipant | undefined, application: WixJoinApplication | undefined): Standing {
175
- if (participant) {
176
- const progress = (participant.progressStatus ?? "").toUpperCase();
177
- const enrollment = (participant.enrollmentStatus ?? "").toUpperCase();
178
- if (progress === "COMPLETED") return "completed";
179
- if (progress === "FAILED" || isEnded(p)) return "finished";
180
- if (enrollment === "SUSPENDED") return "suspended";
181
- return "joined";
182
- }
183
- const status = (application?.status ?? "").toUpperCase();
184
- const payment = (application?.paymentStatus ?? "").toUpperCase();
185
- if (status === "APPROVAL_PENDING") return "pending";
186
- if (status === "APPROVED") {
187
- // The same reading as joinProgram: a free or settled approval is enrolling, and an offline payment
188
- // waits on the owner. Only an approval that still owes money asks the member to pay.
189
- if (payment === "NO_PAYMENT_REQUIRED" || payment === "PAYMENT_SUCCESSFUL") return application?.participantId ? "joined" : "pending";
190
- if (payment === "PENDING_OWNER_APPROVAL") return "pending";
191
- return "approved";
192
- }
193
- if (status === "PAYMENT_PENDING") return "approved";
194
- if (status === "INVITED") return "invited";
195
- return "none";
196
- }
197
-
198
- const STATUS: Record<Exclude<Standing, "none">, { key: string; fallback: string; icon: string; color: string }> = {
199
- joined: { key: "memberPrograms.status.joined", fallback: "Joined", icon: "checkmark", color: "accentPrimary" },
200
- completed: { key: "memberPrograms.status.completed", fallback: "Program complete", icon: "trophy", color: "success" },
201
- finished: { key: "memberPrograms.status.ended", fallback: "Program ended", icon: "flag", color: "textSecondary" },
202
- suspended: { key: "memberPrograms.status.suspended", fallback: "Participation suspended", icon: "close", color: "warning" },
203
- pending: { key: "memberPrograms.status.pending", fallback: "Pending request", icon: "clock", color: "warning" },
204
- approved: { key: "memberPrograms.status.approved", fallback: "Request approved", icon: "checkmark", color: "success" },
205
- invited: { key: "memberPrograms.status.invited", fallback: "Invited", icon: "mail", color: "accentPrimary" },
206
- };
207
-
208
- function timelineLine(p: WixProgram, participant: WixParticipant | undefined, standing: Standing, now: number): string {
209
- const timeline = full(p).timeline;
210
- const duration = Number(timeline?.durationInDays ?? 0);
211
- const days = Number.isFinite(duration) && duration > 0 ? duration : 0;
212
- const started = participant?.enrollmentInfo?.startDate;
213
- if ((standing === "joined" || standing === "suspended") && started && daysBetween(started, now) >= 0) {
214
- const day = daysBetween(started, now) + 1;
215
- return days
216
- ? copyTemplate("memberPrograms.timeline.startedOf", "Started {date} · day {day} of {days}", { date: date(started), day, days })
217
- : copyTemplate("memberPrograms.timeline.started", "Started {date} · day {day}", { date: date(started), day });
218
- }
219
- if (standing === "completed" || standing === "finished") {
220
- // The deadline is the enrollment's scheduled end: it is the end date only once it has passed.
221
- const ended = participant?.enrollmentInfo?.deadline;
222
- return ended && Date.parse(ended) <= now ? copyTemplate("memberPrograms.timeline.ended", "Ended {date}", { date: date(ended) }) : "";
223
- }
224
- if (timeline?.selfPaced) {
225
- return days
226
- ? copyTemplate("memberPrograms.timeline.days", "{days} days · self-paced", { days })
227
- : copyParam("memberPrograms.timeline.selfPaced", "Self-paced");
228
- }
229
- if (timeline?.startDate) {
230
- const start = date(timeline.startDate);
231
- if (!start) return "";
232
- return days
233
- ? copyTemplate("memberPrograms.timeline.scheduled", "Starts {date} · {days} days", { date: start, days })
234
- : copyTemplate("memberPrograms.timeline.starts", "Starts {date}", { date: start });
235
- }
236
- return days ? copyTemplate("memberPrograms.timeline.daysOnly", "{days} days", { days }) : "";
237
- }
238
-
239
- /** The card's duration line. Once the member is in, it is the progress line; before, the program's length, and a
240
- * program with none says so (the One App card's "No Time Limit"). */
241
- function durationLine(p: WixProgram, participant: WixParticipant | undefined, standing: Standing, now: number): string {
242
- if (standing !== "none") return timelineLine(p, participant, standing, now);
243
- const duration = Number(full(p).timeline?.durationInDays ?? 0);
244
- return Number.isFinite(duration) && duration > 0
245
- ? copyTemplate("memberPrograms.timeline.daysOnly", "{days} days", { days: duration })
246
- : copyParam("memberPrograms.noTimeLimit", "No Time Limit");
247
- }
248
-
249
- function accessLine(p: WixProgram, participants: number | undefined): string {
250
- const access = accessType(p);
251
- const label = access === "PRIVATE" ? copyParam("memberPrograms.access.private", "Private")
252
- : access === "SECRET" ? copyParam("memberPrograms.access.secret", "Secret")
253
- : copyParam("memberPrograms.access.public", "Public");
254
- if (participants === undefined) return label;
255
- const count = participants === 1
256
- ? copyParam("memberPrograms.participantsOne", "1 participant")
257
- : copyTemplate("memberPrograms.participantsMany", "{count} participants", { count: formatNumber(participants) });
258
- return `${label} · ${count}`;
259
- }
260
-
261
- function progressOf(p: WixProgram, participant: WixParticipant | undefined): number {
262
- const done = Number(participant?.progress?.totalStepsCompleted ?? 0);
263
- const total = Number(participant?.progress?.totalStepsAvailable ?? 0) || stepCount(p);
264
- const pct = Number(participant?.progress?.completionPercentage);
265
- if (Number.isFinite(pct) && pct > 0) return Math.min(1, pct / 100);
266
- if (!total || !Number.isFinite(done) || done <= 0) return 0;
267
- return Math.min(1, done / total);
268
- }
269
-
270
- /** How a card is drawn. The list keeps its own rules; the carousel and the full-width card follow the source section's settings. */
271
- interface Display { card: boolean; duration: boolean; participants: boolean }
272
- const LIST_DISPLAY: Display = { card: false, duration: true, participants: true };
273
-
274
- function programContent(o: { program: WixProgram; participant?: WixParticipant; application?: WixJoinApplication; applicationUnknown?: boolean; participationsUnknown?: boolean; participants?: number; member: boolean; now: number; display?: Display }): ProgramContent {
275
- const display = o.display ?? LIST_DISPLAY;
276
- const { program: p } = o;
277
- const standing = standingOf(p, o.participant, o.application);
278
- const over = standing === "completed" || standing === "finished";
279
- const joined = standing === "joined" || standing === "suspended";
280
- const status = standing === "none" ? undefined : STATUS[standing];
281
- const progress = joined ? progressOf(p, o.participant) : 0;
282
- const pct = Math.round(progress * 100);
283
- const started = joined && progress > 0;
284
- const image = programImage(p);
285
- const name = programTitle(p);
286
- // An ended program with no known participation (a degraded participations read) offers no join and no price.
287
- const closed = standing === "none" && isEnded(p);
288
- const capped = standing === "none" && !closed && maxParticipants(p) > 0;
289
- const countFull = capped && o.participants !== undefined && o.participants >= maxParticipants(p);
290
- // Not knowing the count of a capped program, or whether an application exists, the card claims neither
291
- // "Join" nor "Program is full": View, and the detail screen decides.
292
- // A failed participations read leaves every unjoined-looking card unknown too: the member may be in it.
293
- const standingUnknown = standing === "none" && o.member
294
- && (!!o.applicationUnknown || !!o.participationsUnknown || (capped && o.participants === undefined));
295
- // "Full" only for a member whose own standing is known: an unknown one may already be in it.
296
- const limitReached = countFull && !standingUnknown;
297
- const commercePrice = commercePriceOf(p);
298
- const descriptionLine = standing === "completed" ? copyParam("memberPrograms.line.completed", "Completed")
299
- : standing === "finished" ? copyTemplate("memberPrograms.line.finished", "Finished with {pct}% progress", { pct: Math.round(progressOf(p, o.participant) * 100) })
300
- : standing === "pending" ? copyParam("memberPrograms.line.pending", "Join request sent")
301
- : standing === "approved" ? copyParam("memberPrograms.line.approved", "Request approved · complete your payment")
302
- : standing === "invited" ? copyParam("memberPrograms.line.invited", "You're invited to join")
303
- : standing === "suspended" ? copyParam("memberPrograms.line.suspended", "Your participation is paused")
304
- : "";
305
- // An invitation is accepted on the website (joinProgram cannot accept one), so an invited card's CTA is View.
306
- // A card section invites a guest to join as well: the tap opens the program, which asks them to sign in.
307
- const actionLabel = !o.member && !display.card ? copyParam("memberPrograms.action.view", "View")
308
- : !o.member && standing !== "none" ? copyParam("memberPrograms.action.view", "View")
309
- : display.card && joined ? copyParam("memberPrograms.action.continue", "Continue")
310
- : limitReached ? copyParam("memberPrograms.action.full", "Program is full")
311
- : joined || over || closed || standing === "pending" || standing === "invited" || standingUnknown ? copyParam("memberPrograms.action.view", "View")
312
- : standing === "approved" ? copyParam("memberPrograms.action.pay", "Complete payment")
313
- : accessType(p) === "PRIVATE" ? copyParam("memberPrograms.action.request", "Request to join")
314
- // Invite-only: with no invitation there is nothing to join from here.
315
- : accessType(p) === "SECRET" ? copyParam("memberPrograms.action.view", "View")
316
- : commercePrice ? copyParam("memberPrograms.action.joinPay", "Join & pay")
317
- : copyParam("memberPrograms.action.join", "Join");
318
- const duration = display.duration ? durationLine(p, o.participant, standing, o.now) : "";
319
- const access = joined || over || closed ? "" : accessLine(p, display.participants ? o.participants : undefined);
320
- return {
321
- id: p.id, name, description: programDetails(p), image, initial: initials(name) || "P", hasImage: !!image, noImage: !image,
322
- timelineLine: timelineLine(p, o.participant, standing, o.now),
323
- durationLine: duration, hasDuration: !!duration, noDuration: !duration,
324
- accessLine: access, hasAccess: !!access, noAccess: !access,
325
- standing,
326
- statusLabel: status ? copyParam(status.key, status.fallback) : "", statusIcon: status?.icon ?? "", statusColor: status?.color ?? "textSecondary",
327
- hasStatus: !!status, noStatus: !status,
328
- descriptionLine,
329
- progress, progressLabel: started ? copyTemplate("memberPrograms.progressLabel", "{pct}% complete", { pct }) : "",
330
- hasProgress: started, noProgress: !started,
331
- pricable: !joined && !over && !closed && !descriptionLine,
332
- commercePrice, free: !commercePrice,
333
- // Only a member's CTA is the join action; a guest's "View" stays a navigation.
334
- actionLabel, actionDisabled: limitReached && o.member,
335
- detailScreenId: DETAIL_SCREEN,
336
- categoryIds: categoryIdsOf(p),
337
- };
338
- }
339
-
340
- // ── Reads ────────────────────────────────────────────────────────────────────
341
-
342
- interface Scope { email: string; memberId: string; scope: string }
343
- interface PageMeta extends Record<string, unknown> { email: string; memberId: string; scope: string; needsSignIn: boolean; joinedFilter: boolean; more?: boolean }
344
-
345
- type Participations = Map<string, WixParticipant>;
346
- /** The member's participations for this scope — walked once per first page, reused by its later pages. */
347
- let participationCache: { key: string; value: Participations } | undefined;
348
- /** Keyed by email AND tenant scope: one email is a different Wix member on every site. */
349
- let memberIdCache: { email: string; scope: string; id: string } | undefined;
350
- /** Whether the last scope read had a signed-in member — survives a failed page, whose metadata the controller drops. */
351
- let memberSeen = false;
352
-
353
- async function resolveScope(): Promise<Scope> {
354
- const access: MemberAccess = await memberAccess();
355
- memberSeen = !!access.email;
356
- if (!access.email) return { email: "", memberId: "", scope: "" };
357
- let cached = memberIdCache;
358
- if (cached?.email !== access.email || cached.scope !== access.scope) {
359
- // A failed lookup is an unknown id, like a record with none: the catalog degrades, the joined filter errors.
360
- const response = await getMyMember().catch(() => undefined);
361
- cached = { email: access.email, scope: access.scope, id: String(response?.member?.id ?? "") };
362
- // A member record with no id yet is not an answer to keep: the next read asks again.
363
- memberIdCache = cached.id ? cached : undefined;
364
- }
365
- return { email: access.email, memberId: cached.id, scope: access.scope };
366
- }
367
- // Email and tenant scope ARE the member; the id is derived from them, and may only now have resolved
368
- // (a lookup that failed once, then succeeded) — the same member, not a changed one.
369
- const sameScope = (a: Scope, b: Scope) => a.email === b.email && a.scope === b.scope;
370
-
371
- async function walkParticipations(memberId: string): Promise<Participations> {
372
- const byProgram: Participations = new Map();
373
- let cursor: string | undefined;
374
- for (let page = 0; page < 50; page++) {
375
- const response = await queryMemberParticipants({ memberId, cursor, limit: 100 });
376
- for (const participant of response.participants ?? []) {
377
- if (!participant.programId || participant.memberId !== memberId) continue;
378
- const current = byProgram.get(participant.programId);
379
- // Duplicate enrollments: the latest createdDate wins (the One App's rule).
380
- if (!current || Date.parse(participant.createdDate ?? "") > Date.parse(current.createdDate ?? "")) byProgram.set(participant.programId, participant);
381
- }
382
- const paging = response.pagingMetadata as { hasNext?: boolean; cursors?: { next?: string | null } } | undefined;
383
- const next = paging?.cursors?.next ?? "";
384
- if (paging?.hasNext === false) break;
385
- // More pages promised but none reachable: the map is incomplete, and an incomplete map is a failed read.
386
- if (!next) { if (paging?.hasNext) throw new Error("Participants response is missing its next-page cursor"); break; }
387
- if (next === cursor) throw new Error("Participants response repeated its cursor");
388
- cursor = next;
389
- // The last page allowed still points at another: what was read is not the whole membership.
390
- if (page === 49) throw new Error("Participants walk truncated");
391
- }
392
- return byProgram;
393
- }
394
- /** `required` (the "Programs I joined" filter) lets a failure through: that list IS the member's
395
- * participations. The catalog degrades instead — every program shows, without the member's standing. */
396
- async function participationsFor(scope: Scope, firstPage: boolean, required: boolean): Promise<{ map: Participations; complete: boolean }> {
397
- // A guest has no participations; a signed-in member whose id is unknown has unknown ones.
398
- if (!scope.memberId) {
399
- if (scope.email && required) throw new Error("Current member unavailable");
400
- return { map: new Map(), complete: !scope.email };
401
- }
402
- const key = `${scope.memberId}\u0000${scope.scope}`;
403
- if (!firstPage && participationCache?.key === key) return { map: participationCache.value, complete: true };
404
- try {
405
- const value = await walkParticipations(scope.memberId);
406
- participationCache = { key, value };
407
- return { map: value, complete: true };
408
- } catch (error) {
409
- if (required) throw error;
410
- participationCache = undefined;
411
- return { map: new Map(), complete: false };
412
- }
413
- }
414
-
415
- /** Only where an application can exist: an unjoined PRIVATE, SECRET (invite-only) or priced program, for a member. */
416
- async function applicationsFor(programs: WixProgram[], participations: Participations, scope: Scope): Promise<{ map: Map<string, WixJoinApplication>; unknown: Set<string> }> {
417
- const result = new Map<string, WixJoinApplication>();
418
- // A failed read is not "no application": those programs make no join claim (see programContent).
419
- const unknown = new Set<string>();
420
- if (!scope.memberId) return { map: result, unknown };
421
- const candidates = programs.filter((p) => !participations.has(p.id) && (accessType(p) === "PRIVATE" || accessType(p) === "SECRET" || !!commercePriceOf(p)));
422
- const settled = await Promise.allSettled(candidates.map((p) => getCurrentJoinApplication(p.id)));
423
- settled.forEach((outcome, i) => {
424
- // 404 / NOT_FOUND is the endpoint's "this member never applied"; any other rejection is unknown.
425
- if (outcome.status === "rejected") { if (!isNotFoundError(outcome.reason)) unknown.add(candidates[i].id); }
426
- else if (outcome.value.joinApplication?.status) result.set(candidates[i].id, outcome.value.joinApplication);
427
- });
428
- return { map: result, unknown };
429
- }
430
-
431
- async function statsFor(programs: WixProgram[]): Promise<Map<string, number>> {
432
- const counts = new Map<string, number>();
433
- // Only a count something reported: an absent one stays unknown, never a fabricated 0.
434
- for (const p of programs) {
435
- const own = Number(p.participantsCount ?? p.participants?.count);
436
- if (Number.isFinite(own)) counts.set(p.id, own);
437
- }
438
- try {
439
- const response = await getParticipationStats(programs.map((p) => p.id));
440
- for (const stat of response.participationStats ?? []) {
441
- if (stat.programId && typeof stat.participantsCount === "number") counts.set(stat.programId, stat.participantsCount);
442
- }
443
- } catch { /* the program's own count stands */ }
444
- return counts;
445
- }
446
-
447
- /** What a section is asked to be. `list` is the whole worker as it has always been (paged, with its filters).
448
- * `carousel` is the source's home/page carousel: the first `limit` visible programs, one page, no filters; it
449
- * reads the same rows, so the full-width card recipe can bind it too. Every flag defaults to the source default. */
450
- export interface ProgramsSectionOptions {
451
- layout: "carousel" | "list";
452
- /** carousel: how many cards (source default 5, at most one page). */
453
- limit?: number;
454
- showDuration?: boolean;
455
- showParticipants?: boolean;
456
- showPrice?: boolean;
457
- /** Program ids promoted to the front, in this order (source `sortingSettings.ordering === "MANUAL"`). */
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;
461
- /** list: hide a filter the source section turns off. */
462
- filters?: { status?: boolean; category?: boolean };
463
- /** list: the section's inline mode: show this many cards, no paging, and offer See all while more programs exist
464
- * (the source's `extraProps.limit`). Absent: the list follows the cursor to the last program. */
465
- inlineLimit?: number;
466
- }
467
-
468
- const CAROUSEL_LIMIT = 5;
469
- const ORDER_LIMIT = 100;
470
-
471
- /** Register one programs service under `serviceName`: the member's programs with their standing. Each call owns its
472
- * own state, so a page worker can host several. The member-scoped caches above are shared: they are keyed by member. */
473
- export function registerProgramsSection(serviceName: string, options: ProgramsSectionOptions = { layout: "list" }) {
474
- const carousel = options.layout === "carousel";
475
- const display: Display = { card: carousel, duration: options.showDuration !== false, participants: options.showParticipants !== false };
476
- const showPrice = options.showPrice !== false && !options.participating;
477
- const limit = Math.min(PAGE_SIZE, Math.max(1, Math.floor(options.limit ?? CAROUSEL_LIMIT)));
478
- const inlineLimit = !carousel && options.inlineLimit !== undefined && options.inlineLimit > 0 ? Math.min(PAGE_SIZE, Math.floor(options.inlineLimit)) : 0;
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);
481
- /** The promoted programs, in their configured order. A failed read promotes nothing: the default order stands. */
482
- async function promotedPrograms(): Promise<WixProgram[]> {
483
- if (!order.length) return [];
484
- try {
485
- const response = await queryPrograms({ filter: { id: { $in: order }, status: { $in: ["PUBLISHED", "ENDED"] } }, cursorPaging: { limit: order.length } });
486
- const rank = new Map(order.map((id, index) => [id, index]));
487
- return (response.programs ?? []).filter((p) => rank.has(p.id)).sort((a, b) => (rank.get(a.id) ?? 0) - (rank.get(b.id) ?? 0));
488
- } catch { return []; }
489
- }
490
- let categories: WixProgramCategory[] | undefined;
491
- let categoriesFailed = false;
492
- async function loadCategories(): Promise<void> {
493
- try {
494
- const response = await listProgramCategories();
495
- categories = (response.categories ?? []).filter((c) => c.id && c.label);
496
- categoriesFailed = false;
497
- // A picked category the site no longer has would keep the query filtered behind a hidden control.
498
- if (categoryId && !categories.some((c) => c.id === categoryId)) categoryId = "";
499
- } catch {
500
- categoriesFailed = categories === undefined;
501
- }
502
- }
503
-
504
- /** The controller's criteria.filter carries both axes: "<status>|<categoryId>". */
505
- const encodeFilter = (status: "all" | "joined", categoryId: string) => `${status}|${categoryId}`;
506
- function decodeFilter(filter: string): { status: "all" | "joined"; categoryId: string } {
507
- const [status, ...rest] = filter.split("|");
508
- return { status: status === "joined" ? "joined" : "all", categoryId: rest.join("|") };
509
- }
510
-
511
- let statusFilter: "all" | "joined" = options.participating ? "joined" : "all";
512
- let categoryId = "";
513
- let pageScope: Scope | undefined;
514
-
515
- async function fetchPage(filter: string, cursor: string): Promise<CollectionPage<ProgramContent>> {
516
- const scope = await resolveScope();
517
- if (cursor && (!pageScope || !sameScope(pageScope, scope))) throw memberAccessChanged();
518
- const { status, categoryId: picked } = decodeFilter(filter);
519
- const metadata: PageMeta = { email: scope.email, memberId: scope.memberId, scope: scope.scope, needsSignIn: !scope.email, joinedFilter: status === "joined" };
520
- const now = Date.now();
521
- if (!cursor && !carousel) await loadCategories();
522
- // Built from the refreshed list: a category the site no longer has (reset by loadCategories) filters nothing.
523
- const category = picked && categories && !categories.some((c) => c.id === picked) ? "" : picked;
524
- const { map: participations, complete: participationsKnown } = await participationsFor(scope, !cursor, status === "joined");
525
- const programFilter: Record<string, unknown> = { status: { $in: ["PUBLISHED", "ENDED"] } };
526
- if (category) programFilter.categoryIds = { $hasSome: [category] };
527
- if (status === "joined") {
528
- if (!participations.size) return { items: [], nextCursor: "", metadata };
529
- programFilter.id = { $in: [...participations.keys()] };
530
- }
531
- // A page whose every program is dropped (ended and never joined) would leave the list hidden with
532
- // nothing on screen to call loadMore, so read on until a page has rows or the catalog ends.
533
- let pageCursor = cursor;
534
- const promoted = carousel && !cursor ? await promotedPrograms() : [];
535
- for (let read = 0; ; read++) {
536
- // A cursor page carries only the cursor — it already encodes the filter and sort — as the
537
- // participants query of the same service does.
538
- const response = await queryPrograms(pageCursor
539
- ? { cursorPaging: { limit: PAGE_SIZE, cursor: pageCursor } }
540
- : { filter: programFilter, sort: [{ fieldName: "createdDate", order: "DESC" }], cursorPaging: { limit: PAGE_SIZE } });
541
- const after = await resolveScope();
542
- if (!sameScope(scope, after)) throw memberAccessChanged();
543
- const promotedIds = new Set(promoted.map((p) => p.id));
544
- const visible = [...promoted, ...(response.programs ?? []).filter((p) => !promotedIds.has(p.id))].filter((p) => p.id && !isDraft(p))
545
- // An ended program the member never joined is not theirs to see (the One App's visibility rule) —
546
- // applied only when the member's participations are known, so a degraded read hides nothing they joined.
547
- .filter((p) => !isEnded(p) || participations.has(p.id) || !participationsKnown);
548
- const programs = carousel ? visible.slice(0, limit) : inlineLimit ? visible.slice(0, inlineLimit) : visible;
549
- const pagingMetadata = response.pagingMetadata as { hasNext?: boolean; cursors?: { next?: string | null } } | undefined;
550
- // A last page may still carry a cursor: `hasNext: false` wins, as in the catalog bundle.
551
- const readCursor = carousel ? "" : pagingMetadata?.hasNext === false ? "" : pagingMetadata?.cursors?.next ?? "";
552
- // An inline list never hands a cursor to the screen, but it still reads on past a page that held nothing to show.
553
- const nextCursor = inlineLimit ? "" : readCursor;
554
- if (!carousel && !inlineLimit && pagingMetadata?.hasNext && !nextCursor) throw new Error("Programs response is missing its next-page cursor");
555
- // An inline list reads one page and says whether programs remain past what it shows: that is the See all.
556
- const pageMore = visible.length > inlineLimit || pagingMetadata?.hasNext === true || !!readCursor;
557
- if (inlineLimit) metadata.more = pageMore;
558
- if (!programs.length && readCursor && readCursor !== pageCursor) {
559
- if (read + 1 < MAX_EMPTY_READS) { pageCursor = readCursor; continue; }
560
- // Past the cap, end the list rather than hand back an empty page with a cursor nothing can load.
561
- return { items: [], nextCursor: "", metadata };
562
- }
563
- const [counts, applications] = await Promise.all([statsFor(programs), applicationsFor(programs, participations, scope)]);
564
- const items = programs.map((p) => programContent({ program: p, participant: participations.get(p.id), application: applications.map.get(p.id), applicationUnknown: applications.unknown.has(p.id), participationsUnknown: !participationsKnown, participants: counts.get(p.id), member: !!scope.memberId, now, display }));
565
- // A revalidating load publishes nothing until it settles, so page 1 records the scope its later pages
566
- // are read under here, not only from the published snapshot.
567
- if (!cursor) pageScope = scope;
568
- return { items, nextCursor, metadata };
569
- }
570
- }
571
- /** How many all-dropped pages one fetch reads, in all, before it ends the list. */
572
- const MAX_EMPTY_READS = 50;
573
-
574
- // ── State ────────────────────────────────────────────────────────────────────
575
-
576
- const commerce = createIapCommerce({ onChange: () => { void svc.pricingPublish(); } });
577
- const pricing = commerce.pricing;
578
- const PRICING_NOT_HYDRATED = ["rows", "hidePriceRetry"] as const;
579
- let scopeIncomplete = false;
580
- let page: CollectionQueryState<ProgramContent> | undefined;
581
-
582
- const INITIAL_STATE: State = {
583
- status: "loading", rows: [], isLoading: true, notLoading: false, isErrored: false, notErrored: true, noEmpty: true, hideList: true,
584
- emptyText: "", errorText: "", identityLine: "", needsSignIn: false, noSignIn: true, nextCursor: "", noMore: true, noPageError: true, loadingMore: false,
585
- statusFilter: "all", statusOptions: [], hideStatusFilter: true, categoryId: "", categoryChips: [], hideCategoryFilter: true,
586
- noSeeAll: true, hidePriceRetry: true, priceRetryText: "", summary: "", hasRows: false, noRows: true,
587
- };
588
-
589
- /** A row shows a price when the section does and the member is not in or past the program. */
590
- const priced = (row: ProgramContent) => showPrice && row.pricable;
591
- function pricedRows(items: ProgramContent[]): ProgramRow[] {
592
- const copy = iapPriceCopy("memberPrograms");
593
- return items.map((row) => {
594
- if (!priced(row)) return { ...row, priceLine: "", hasPrice: false, noPrice: true };
595
- const item = onlineProgramItem({ id: row.id }, row.commercePrice);
596
- const view = item ? pricing.view(item.reference) : undefined;
597
- const fields = view ? iapPriceFields(view, copy) : undefined;
598
- const priceLine = fields?.priceText || (row.free ? copyParam("memberPrograms.free", "Free") : row.commercePrice);
599
- return { ...row, priceLine, hasPrice: !!priceLine, noPrice: !priceLine };
600
- });
601
- }
602
-
603
- function derive(state: State): State {
604
- const current = page;
605
- const meta = (current?.metadata ?? {}) as Partial<PageMeta>;
606
- const status: State["status"] = !current || current.status === "idle" || current.status === "loading" ? "loading" : current.status === "error" ? "error" : "ready";
607
- const member = !!meta.email || memberSeen;
608
- const items = current?.items ?? [];
609
- const rows = pricedRows(items);
610
- const views = items.filter(priced).map((row) => { const item = onlineProgramItem({ id: row.id }, row.commercePrice); return item ? pricing.view(item.reference) : undefined; });
611
- const needsSignIn = status === "ready" && !member && statusFilter === "joined";
612
- const statusOptions: Option[] = [
613
- { id: "all", label: copyParam("memberPrograms.filterAll", "All programs") },
614
- { id: "joined", label: copyParam("memberPrograms.filterJoined", "Programs I joined") },
615
- ];
616
- const categoryChips: Option[] = [{ id: "", label: copyParam("memberPrograms.filterAllCategories", "All categories") },
617
- ...(categories ?? []).map((c) => ({ id: String(c.id), label: String(c.label) }))];
618
- const emptyText = status !== "ready" || rows.length ? ""
619
- : needsSignIn ? copyParam("memberPrograms.signInEmptyText", "Sign in to see the programs you joined.")
620
- : categoryId ? copyParam("memberPrograms.emptyCategoryText", "No programs in this category yet.")
621
- : statusFilter === "joined" ? copyParam("memberPrograms.emptyJoinedText", "You haven't joined a program yet.")
622
- : copyParam("memberPrograms.emptyText", "No programs yet.");
623
- return {
624
- ...state,
625
- status, rows,
626
- isLoading: status === "loading", notLoading: status !== "loading",
627
- isErrored: status === "error", notErrored: status !== "error",
628
- // The sign-in gate is the empty state of a signed-out joined filter: never both cards at once.
629
- noEmpty: status !== "ready" || rows.length > 0 || !!current?.nextCursor || needsSignIn,
630
- hideList: status !== "ready" || rows.length === 0,
631
- hasRows: status === "ready" && rows.length > 0, noRows: status !== "ready" || rows.length === 0,
632
- emptyText,
633
- errorText: status === "error" ? (current?.error || copyParam("memberPrograms.errorText", "Programs could not be loaded.")) : "",
634
- identityLine: meta.email ? copyTemplate("memberPrograms.identityLine", "Signed in as {email}", { email: meta.email ?? "" }) : "",
635
- needsSignIn, noSignIn: !needsSignIn,
636
- nextCursor: current && !current.pageError && !current.loadingMore ? current.nextCursor : "",
637
- noMore: !current?.nextCursor || current.pageError || current.loadingMore,
638
- noPageError: !current?.pageError,
639
- loadingMore: !!current?.loadingMore,
640
- statusFilter, statusOptions,
641
- // A guest sees the catalog, never a "joined" filter they cannot satisfy — unless they are already on
642
- // it (signed out there), when the control is their way back to the catalog. It stays up while a
643
- // filter switch or a refresh reloads, so the control never flickers away under the finger.
644
- hideStatusFilter: options.filters?.status === false || (!member && statusFilter !== "joined"),
645
- categoryId, categoryChips,
646
- hideCategoryFilter: options.filters?.category === false || categoriesFailed || !categories || categories.length === 0,
647
- // See all only for an inline (limited) list that has programs past the cards it shows.
648
- noSeeAll: !(inlineLimit && status === "ready" && meta.more === true),
649
- hidePriceRetry: status !== "ready" || !views.some((view) => view && view.route !== "disabled" && (scopeIncomplete || view.retryable)),
650
- priceRetryText: copyParam("memberPrograms.priceRetryText", "Some prices could not be loaded."),
651
- // The rows loaded so far are not the catalog: a count is only true once the last page is in.
652
- summary: status === "ready" && rows.length && !current?.nextCursor ? (rows.length === 1 ? copyParam("memberPrograms.summaryOne", "1 program") : copyTemplate("memberPrograms.summaryMany", "{count} programs", { count: rows.length })) : "",
653
- };
654
- }
655
-
656
- const controller = createCollectionQuery<ProgramContent>({
657
- id: (row) => row.id,
658
- fetch: (criteria, cursor) => fetchPage(criteria.filter, cursor),
659
- clearOnError: memberAccessDenied,
660
- errorMessage: (error) => memberAccessDenied(error)
661
- ? copyParam("memberPrograms.accessErrorText", "Programs are unavailable for this account. Sign in again.")
662
- : copyParam("memberPrograms.errorText", "Programs could not be loaded."),
663
- }, (snapshot) => {
664
- page = snapshot;
665
- const meta = snapshot.metadata as Partial<PageMeta> | undefined;
666
- if (snapshot.status === "ready" && !snapshot.loadingMore && !snapshot.pageError && meta) pageScope = { email: meta.email ?? "", memberId: meta.memberId ?? "", scope: meta.scope ?? "" };
667
- if (snapshot.status === "loading" || snapshot.status === "error") pageScope = undefined;
668
- void svc.pageChanged();
669
- if (snapshot.status === "ready" && !snapshot.loadingMore) void priceContent();
670
- });
671
-
672
- const criteria = () => ({ filter: encodeFilter(statusFilter, categoryId) });
673
-
674
- /** Prices the programs on screen now. Content never waits on this. */
675
- async function priceContent(): Promise<void> {
676
- const items = (page?.items ?? []).filter(priced).flatMap((row) => onlineProgramItem({ id: row.id }, row.commercePrice) ?? []);
677
- if (!items.length) return;
678
- scopeIncomplete = !(await commerce.loadPrices(items)).scopeComplete;
679
- void svc.pricingPublish();
680
- }
681
-
682
- type Actions = {
683
- load: (state: State, arg?: unknown) => Promise<undefined>;
684
- refresh: (state: State, arg?: unknown) => Promise<undefined>;
685
- loadMore: (state: State) => Promise<undefined>;
686
- retry: (state: State) => Promise<undefined>;
687
- setStatus: (state: State, arg?: unknown) => Promise<undefined> | State;
688
- setCategory: (state: State, arg?: unknown) => Promise<undefined> | State;
689
- open: (state: State, arg?: unknown) => State | undefined;
690
- pageChanged: (state: State) => State;
691
- pricingPublish: (state: State) => State;
692
- pricingStart: (state: State) => State;
693
- pricingRefresh: (state: State) => Promise<undefined>;
694
- };
695
-
696
- const actions: Actions = {
697
- async load(_state, arg) {
698
- stashCopy(arg);
699
- // A load of what the screen already shows is the screen coming back: it revalidates behind its rows.
700
- await controller.query(criteria(), true, true);
701
- return undefined;
702
- },
703
- async refresh(_state, arg) { stashCopy(arg); await controller.query(criteria()); return undefined; },
704
- async loadMore() { await controller.loadMore(); return undefined; },
705
- async retry() { await controller.retry(); return undefined; },
706
- setStatus(state, arg) {
707
- const value = (arg as { selectedId?: unknown } | undefined)?.selectedId;
708
- const next = value === "joined" ? "joined" : value === "all" && !options.participating ? "all" : undefined;
709
- if (!next || next === statusFilter) return state;
710
- statusFilter = next;
711
- return controller.query(criteria()).then(() => undefined);
712
- },
713
- setCategory(state, arg) {
714
- const picked = (arg as { selectedIds?: unknown; selectedId?: unknown } | undefined);
715
- const raw = Array.isArray(picked?.selectedIds) ? picked.selectedIds[0] : picked?.selectedId;
716
- const next = typeof raw === "string" ? raw : "";
717
- if (next && !(categories ?? []).some((c) => c.id === next)) return state;
718
- if (next === categoryId) return state;
719
- categoryId = next;
720
- return controller.query(criteria()).then(() => undefined);
721
- },
722
- // The card's one action: every standing opens the program, which owns joining, paying and leaving.
723
- open(state, arg) {
724
- const id = (arg as { id?: unknown } | undefined)?.id;
725
- if (typeof id !== "string" || !state.rows.some((row) => row.id === id && !row.actionDisabled)) return state;
726
- return navigate(state, { screenId: DETAIL_SCREEN, args: { id } });
727
- },
728
- pageChanged: derive,
729
- pricingPublish: derive,
730
- pricingStart: (state) => ({ ...derive(state), _poll: pricing.pollDirective(`${serviceName}.pricingRefresh`) }),
731
- pricingRefresh: async () => { await priceContent(); return undefined; },
732
- };
733
-
734
- // Prices are this run's: never restored from a cold-boot snapshot.
735
- const svc = register<State, Actions>(serviceName, { state: INITIAL_STATE, actions, notHydrated: [...PRICING_NOT_HYDRATED] } as unknown as Parameters<typeof register<State, Actions>>[1]);
736
- resetUnhydratedKeysOnOlderRuntime(svc, INITIAL_STATE, PRICING_NOT_HYDRATED);
737
- void svc.pricingStart();
738
- // No load at registration: the page's onAppear loads (with the copy pack), so a page-hosted service reads only when its section appears.
739
- return svc;
740
- }