@wix/himalaya-cli 0.1870.0 → 0.1871.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 (332) hide show
  1. package/dist/cli.mjs +1 -0
  2. package/guides/android-ux.md +3 -2
  3. package/guides/designing-himi-screens.md +10 -4
  4. package/guides/ios-ux.md +3 -2
  5. package/package.json +2 -2
  6. package/templates/bare-fashion/tier5-src/_shared/collection-contract.ts +6 -1
  7. package/templates/beauty-salon/tier5-src/_shared/collection-contract.ts +6 -1
  8. package/templates/beauty-salon/tier5-src/_shared/himi-events.ts +27 -0
  9. package/templates/beauty-salon-owner/tier5-src/_shared/collection-contract.ts +6 -1
  10. package/templates/beauty-salon-owner/tier5-src/_shared/himi-events.ts +27 -0
  11. package/templates/branded-lite/dev/index.ts +20 -0
  12. package/templates/branded-lite/l10n/ar.json +10 -0
  13. package/templates/branded-lite/l10n/cs.json +10 -0
  14. package/templates/branded-lite/l10n/da.json +10 -0
  15. package/templates/branded-lite/l10n/de.json +10 -0
  16. package/templates/branded-lite/l10n/el.json +10 -0
  17. package/templates/branded-lite/l10n/es.json +10 -0
  18. package/templates/branded-lite/l10n/fi.json +10 -0
  19. package/templates/branded-lite/l10n/fr.json +10 -0
  20. package/templates/branded-lite/l10n/he.json +8 -0
  21. package/templates/branded-lite/l10n/hu.json +10 -0
  22. package/templates/branded-lite/l10n/id.json +10 -0
  23. package/templates/branded-lite/l10n/it.json +10 -0
  24. package/templates/branded-lite/l10n/ja.json +10 -0
  25. package/templates/branded-lite/l10n/ko.json +10 -0
  26. package/templates/branded-lite/l10n/lt.json +10 -0
  27. package/templates/branded-lite/l10n/nl.json +10 -0
  28. package/templates/branded-lite/l10n/no.json +10 -0
  29. package/templates/branded-lite/l10n/pl.json +10 -0
  30. package/templates/branded-lite/l10n/pt.json +10 -0
  31. package/templates/branded-lite/l10n/ru.json +10 -0
  32. package/templates/branded-lite/l10n/sv.json +10 -0
  33. package/templates/branded-lite/l10n/th.json +10 -0
  34. package/templates/branded-lite/l10n/tr.json +10 -0
  35. package/templates/branded-lite/l10n/uk.json +10 -0
  36. package/templates/branded-lite/l10n/vi.json +10 -0
  37. package/templates/branded-lite/l10n/zh.json +10 -0
  38. package/templates/branded-lite/tier5-src/_shared/collection-contract.ts +6 -1
  39. package/templates/branded-lite/tier5-src/_shared/himi-events.ts +27 -0
  40. package/templates/branded-lite/tier5-src/himi-events-detail/index.ts +3 -1
  41. package/templates/branded-lite/tier5-src/himi-events-list/index.ts +33 -7
  42. package/templates/branded-lite/tier5-src/himi-events-my-events/index.ts +4 -2
  43. package/templates/brandy/tier5-src/_shared/collection-contract.ts +6 -1
  44. package/templates/community-club/dev/index.ts +20 -0
  45. package/templates/community-club/l10n/ar.json +10 -0
  46. package/templates/community-club/l10n/cs.json +10 -0
  47. package/templates/community-club/l10n/da.json +10 -0
  48. package/templates/community-club/l10n/de.json +10 -0
  49. package/templates/community-club/l10n/el.json +10 -0
  50. package/templates/community-club/l10n/es.json +10 -0
  51. package/templates/community-club/l10n/fi.json +10 -0
  52. package/templates/community-club/l10n/fr.json +10 -0
  53. package/templates/community-club/l10n/he.json +8 -0
  54. package/templates/community-club/l10n/hu.json +10 -0
  55. package/templates/community-club/l10n/id.json +10 -0
  56. package/templates/community-club/l10n/it.json +10 -0
  57. package/templates/community-club/l10n/ja.json +10 -0
  58. package/templates/community-club/l10n/ko.json +10 -0
  59. package/templates/community-club/l10n/lt.json +10 -0
  60. package/templates/community-club/l10n/nl.json +10 -0
  61. package/templates/community-club/l10n/no.json +10 -0
  62. package/templates/community-club/l10n/pl.json +10 -0
  63. package/templates/community-club/l10n/pt.json +10 -0
  64. package/templates/community-club/l10n/ru.json +10 -0
  65. package/templates/community-club/l10n/sv.json +10 -0
  66. package/templates/community-club/l10n/th.json +10 -0
  67. package/templates/community-club/l10n/tr.json +10 -0
  68. package/templates/community-club/l10n/uk.json +10 -0
  69. package/templates/community-club/l10n/vi.json +10 -0
  70. package/templates/community-club/l10n/zh.json +10 -0
  71. package/templates/community-club/tier5-src/_shared/collection-contract.ts +6 -1
  72. package/templates/community-club/tier5-src/_shared/himi-events.ts +27 -0
  73. package/templates/community-club/tier5-src/himi-events-detail/index.ts +3 -1
  74. package/templates/community-club/tier5-src/himi-events-list/index.ts +33 -7
  75. package/templates/community-club/tier5-src/himi-events-my-events/index.ts +4 -2
  76. package/templates/community-club-owner/tier5-src/_shared/collection-contract.ts +6 -1
  77. package/templates/community-club-owner/tier5-src/_shared/himi-events.ts +27 -0
  78. package/templates/conference/dev/index.ts +20 -0
  79. package/templates/conference/tier5-src/_shared/collection-contract.ts +6 -1
  80. package/templates/conference/tier5-src/_shared/himi-events.ts +27 -0
  81. package/templates/conference/tier5-src/himi-events-detail/index.ts +3 -1
  82. package/templates/conference/tier5-src/himi-events-list/index.ts +33 -7
  83. package/templates/conference/tier5-src/himi-events-my-events/index.ts +4 -2
  84. package/templates/events-meetups/dev/index.ts +20 -0
  85. package/templates/events-meetups/l10n/ar.json +10 -0
  86. package/templates/events-meetups/l10n/cs.json +10 -0
  87. package/templates/events-meetups/l10n/da.json +10 -0
  88. package/templates/events-meetups/l10n/de.json +10 -0
  89. package/templates/events-meetups/l10n/el.json +10 -0
  90. package/templates/events-meetups/l10n/es.json +10 -0
  91. package/templates/events-meetups/l10n/fi.json +10 -0
  92. package/templates/events-meetups/l10n/fr.json +10 -0
  93. package/templates/events-meetups/l10n/he.json +8 -0
  94. package/templates/events-meetups/l10n/hu.json +10 -0
  95. package/templates/events-meetups/l10n/id.json +10 -0
  96. package/templates/events-meetups/l10n/it.json +10 -0
  97. package/templates/events-meetups/l10n/ja.json +10 -0
  98. package/templates/events-meetups/l10n/ko.json +10 -0
  99. package/templates/events-meetups/l10n/lt.json +10 -0
  100. package/templates/events-meetups/l10n/nl.json +10 -0
  101. package/templates/events-meetups/l10n/no.json +10 -0
  102. package/templates/events-meetups/l10n/pl.json +10 -0
  103. package/templates/events-meetups/l10n/pt.json +10 -0
  104. package/templates/events-meetups/l10n/ru.json +10 -0
  105. package/templates/events-meetups/l10n/sv.json +10 -0
  106. package/templates/events-meetups/l10n/th.json +10 -0
  107. package/templates/events-meetups/l10n/tr.json +10 -0
  108. package/templates/events-meetups/l10n/uk.json +10 -0
  109. package/templates/events-meetups/l10n/vi.json +10 -0
  110. package/templates/events-meetups/l10n/zh.json +10 -0
  111. package/templates/events-meetups/tier5-src/_shared/collection-contract.ts +6 -1
  112. package/templates/events-meetups/tier5-src/_shared/himi-events.ts +27 -0
  113. package/templates/events-meetups/tier5-src/himi-events-detail/index.ts +3 -1
  114. package/templates/events-meetups/tier5-src/himi-events-list/index.ts +33 -7
  115. package/templates/events-meetups/tier5-src/himi-events-my-events/index.ts +4 -2
  116. package/templates/events-meetups-owner/tier5-src/_shared/collection-contract.ts +6 -1
  117. package/templates/events-meetups-owner/tier5-src/_shared/himi-events.ts +27 -0
  118. package/templates/fitness-gym/tier5-src/_shared/collection-contract.ts +6 -1
  119. package/templates/gym-fitness/dev/index.ts +20 -0
  120. package/templates/gym-fitness/l10n/ar.json +10 -0
  121. package/templates/gym-fitness/l10n/cs.json +10 -0
  122. package/templates/gym-fitness/l10n/da.json +10 -0
  123. package/templates/gym-fitness/l10n/de.json +10 -0
  124. package/templates/gym-fitness/l10n/el.json +10 -0
  125. package/templates/gym-fitness/l10n/es.json +10 -0
  126. package/templates/gym-fitness/l10n/fi.json +10 -0
  127. package/templates/gym-fitness/l10n/fr.json +10 -0
  128. package/templates/gym-fitness/l10n/he.json +8 -0
  129. package/templates/gym-fitness/l10n/hu.json +10 -0
  130. package/templates/gym-fitness/l10n/id.json +10 -0
  131. package/templates/gym-fitness/l10n/it.json +10 -0
  132. package/templates/gym-fitness/l10n/ja.json +10 -0
  133. package/templates/gym-fitness/l10n/ko.json +10 -0
  134. package/templates/gym-fitness/l10n/lt.json +10 -0
  135. package/templates/gym-fitness/l10n/nl.json +10 -0
  136. package/templates/gym-fitness/l10n/no.json +10 -0
  137. package/templates/gym-fitness/l10n/pl.json +10 -0
  138. package/templates/gym-fitness/l10n/pt.json +10 -0
  139. package/templates/gym-fitness/l10n/ru.json +10 -0
  140. package/templates/gym-fitness/l10n/sv.json +10 -0
  141. package/templates/gym-fitness/l10n/th.json +10 -0
  142. package/templates/gym-fitness/l10n/tr.json +10 -0
  143. package/templates/gym-fitness/l10n/uk.json +10 -0
  144. package/templates/gym-fitness/l10n/vi.json +10 -0
  145. package/templates/gym-fitness/l10n/zh.json +10 -0
  146. package/templates/gym-fitness/tier5-src/_shared/collection-contract.ts +6 -1
  147. package/templates/gym-fitness/tier5-src/_shared/himi-events.ts +27 -0
  148. package/templates/gym-fitness/tier5-src/himi-events-detail/index.ts +3 -1
  149. package/templates/gym-fitness/tier5-src/himi-events-list/index.ts +33 -7
  150. package/templates/gym-fitness/tier5-src/himi-events-my-events/index.ts +4 -2
  151. package/templates/gym-fitness-owner/tier5-src/_shared/collection-contract.ts +6 -1
  152. package/templates/gym-fitness-owner/tier5-src/_shared/himi-events.ts +27 -0
  153. package/templates/medical-services/tier5-src/_shared/collection-contract.ts +6 -1
  154. package/templates/nonprofit-cause/dev/index.ts +20 -0
  155. package/templates/nonprofit-cause/l10n/ar.json +10 -0
  156. package/templates/nonprofit-cause/l10n/cs.json +10 -0
  157. package/templates/nonprofit-cause/l10n/da.json +10 -0
  158. package/templates/nonprofit-cause/l10n/de.json +10 -0
  159. package/templates/nonprofit-cause/l10n/el.json +10 -0
  160. package/templates/nonprofit-cause/l10n/es.json +10 -0
  161. package/templates/nonprofit-cause/l10n/fi.json +10 -0
  162. package/templates/nonprofit-cause/l10n/fr.json +10 -0
  163. package/templates/nonprofit-cause/l10n/he.json +8 -0
  164. package/templates/nonprofit-cause/l10n/hu.json +10 -0
  165. package/templates/nonprofit-cause/l10n/id.json +10 -0
  166. package/templates/nonprofit-cause/l10n/it.json +10 -0
  167. package/templates/nonprofit-cause/l10n/ja.json +10 -0
  168. package/templates/nonprofit-cause/l10n/ko.json +10 -0
  169. package/templates/nonprofit-cause/l10n/lt.json +10 -0
  170. package/templates/nonprofit-cause/l10n/nl.json +10 -0
  171. package/templates/nonprofit-cause/l10n/no.json +10 -0
  172. package/templates/nonprofit-cause/l10n/pl.json +10 -0
  173. package/templates/nonprofit-cause/l10n/pt.json +10 -0
  174. package/templates/nonprofit-cause/l10n/ru.json +10 -0
  175. package/templates/nonprofit-cause/l10n/sv.json +10 -0
  176. package/templates/nonprofit-cause/l10n/th.json +10 -0
  177. package/templates/nonprofit-cause/l10n/tr.json +10 -0
  178. package/templates/nonprofit-cause/l10n/uk.json +10 -0
  179. package/templates/nonprofit-cause/l10n/vi.json +10 -0
  180. package/templates/nonprofit-cause/l10n/zh.json +10 -0
  181. package/templates/nonprofit-cause/tier5-src/_shared/collection-contract.ts +6 -1
  182. package/templates/nonprofit-cause/tier5-src/_shared/himi-events.ts +27 -0
  183. package/templates/nonprofit-cause/tier5-src/himi-events-detail/index.ts +3 -1
  184. package/templates/nonprofit-cause/tier5-src/himi-events-list/index.ts +33 -7
  185. package/templates/nonprofit-cause/tier5-src/himi-events-my-events/index.ts +4 -2
  186. package/templates/nonprofit-cause-owner/tier5-src/_shared/collection-contract.ts +6 -1
  187. package/templates/nonprofit-cause-owner/tier5-src/_shared/himi-events.ts +27 -0
  188. package/templates/owner-lite/tier5-src/_shared/collection-contract.ts +6 -1
  189. package/templates/owner-lite/tier5-src/_shared/himi-events.ts +27 -0
  190. package/templates/personal-fitness-trainer/tier5-src/_shared/collection-contract.ts +6 -1
  191. package/templates/podcast-creator/dev/index.ts +20 -0
  192. package/templates/podcast-creator/l10n/ar.json +10 -0
  193. package/templates/podcast-creator/l10n/cs.json +10 -0
  194. package/templates/podcast-creator/l10n/da.json +10 -0
  195. package/templates/podcast-creator/l10n/de.json +10 -0
  196. package/templates/podcast-creator/l10n/el.json +10 -0
  197. package/templates/podcast-creator/l10n/es.json +10 -0
  198. package/templates/podcast-creator/l10n/fi.json +10 -0
  199. package/templates/podcast-creator/l10n/fr.json +10 -0
  200. package/templates/podcast-creator/l10n/he.json +8 -0
  201. package/templates/podcast-creator/l10n/hu.json +10 -0
  202. package/templates/podcast-creator/l10n/id.json +10 -0
  203. package/templates/podcast-creator/l10n/it.json +10 -0
  204. package/templates/podcast-creator/l10n/ja.json +10 -0
  205. package/templates/podcast-creator/l10n/ko.json +10 -0
  206. package/templates/podcast-creator/l10n/lt.json +10 -0
  207. package/templates/podcast-creator/l10n/nl.json +10 -0
  208. package/templates/podcast-creator/l10n/no.json +10 -0
  209. package/templates/podcast-creator/l10n/pl.json +10 -0
  210. package/templates/podcast-creator/l10n/pt.json +10 -0
  211. package/templates/podcast-creator/l10n/ru.json +10 -0
  212. package/templates/podcast-creator/l10n/sv.json +10 -0
  213. package/templates/podcast-creator/l10n/th.json +10 -0
  214. package/templates/podcast-creator/l10n/tr.json +10 -0
  215. package/templates/podcast-creator/l10n/uk.json +10 -0
  216. package/templates/podcast-creator/l10n/vi.json +10 -0
  217. package/templates/podcast-creator/l10n/zh.json +10 -0
  218. package/templates/podcast-creator/tier5-src/_shared/collection-contract.ts +6 -1
  219. package/templates/podcast-creator/tier5-src/_shared/himi-events.ts +27 -0
  220. package/templates/podcast-creator/tier5-src/himi-events-detail/index.ts +3 -1
  221. package/templates/podcast-creator/tier5-src/himi-events-list/index.ts +33 -7
  222. package/templates/podcast-creator/tier5-src/himi-events-my-events/index.ts +4 -2
  223. package/templates/podcast-creator-owner/tier5-src/_shared/collection-contract.ts +6 -1
  224. package/templates/podcast-creator-owner/tier5-src/_shared/himi-events.ts +27 -0
  225. package/templates/portfolio-creative/dev/index.ts +20 -0
  226. package/templates/portfolio-creative/l10n/ar.json +10 -0
  227. package/templates/portfolio-creative/l10n/cs.json +10 -0
  228. package/templates/portfolio-creative/l10n/da.json +10 -0
  229. package/templates/portfolio-creative/l10n/de.json +10 -0
  230. package/templates/portfolio-creative/l10n/el.json +10 -0
  231. package/templates/portfolio-creative/l10n/es.json +10 -0
  232. package/templates/portfolio-creative/l10n/fi.json +10 -0
  233. package/templates/portfolio-creative/l10n/fr.json +10 -0
  234. package/templates/portfolio-creative/l10n/he.json +8 -0
  235. package/templates/portfolio-creative/l10n/hu.json +10 -0
  236. package/templates/portfolio-creative/l10n/id.json +10 -0
  237. package/templates/portfolio-creative/l10n/it.json +10 -0
  238. package/templates/portfolio-creative/l10n/ja.json +10 -0
  239. package/templates/portfolio-creative/l10n/ko.json +10 -0
  240. package/templates/portfolio-creative/l10n/lt.json +10 -0
  241. package/templates/portfolio-creative/l10n/nl.json +10 -0
  242. package/templates/portfolio-creative/l10n/no.json +10 -0
  243. package/templates/portfolio-creative/l10n/pl.json +10 -0
  244. package/templates/portfolio-creative/l10n/pt.json +10 -0
  245. package/templates/portfolio-creative/l10n/ru.json +10 -0
  246. package/templates/portfolio-creative/l10n/sv.json +10 -0
  247. package/templates/portfolio-creative/l10n/th.json +10 -0
  248. package/templates/portfolio-creative/l10n/tr.json +10 -0
  249. package/templates/portfolio-creative/l10n/uk.json +10 -0
  250. package/templates/portfolio-creative/l10n/vi.json +10 -0
  251. package/templates/portfolio-creative/l10n/zh.json +10 -0
  252. package/templates/portfolio-creative/tier5-src/_shared/collection-contract.ts +6 -1
  253. package/templates/portfolio-creative/tier5-src/_shared/himi-events.ts +27 -0
  254. package/templates/portfolio-creative/tier5-src/himi-events-detail/index.ts +3 -1
  255. package/templates/portfolio-creative/tier5-src/himi-events-list/index.ts +33 -7
  256. package/templates/portfolio-creative/tier5-src/himi-events-my-events/index.ts +4 -2
  257. package/templates/portfolio-creative-owner/tier5-src/_shared/collection-contract.ts +6 -1
  258. package/templates/portfolio-creative-owner/tier5-src/_shared/himi-events.ts +27 -0
  259. package/templates/restaurant/dev/index.ts +20 -0
  260. package/templates/restaurant/l10n/ar.json +10 -0
  261. package/templates/restaurant/l10n/cs.json +10 -0
  262. package/templates/restaurant/l10n/da.json +10 -0
  263. package/templates/restaurant/l10n/de.json +10 -0
  264. package/templates/restaurant/l10n/el.json +10 -0
  265. package/templates/restaurant/l10n/es.json +10 -0
  266. package/templates/restaurant/l10n/fi.json +10 -0
  267. package/templates/restaurant/l10n/fr.json +10 -0
  268. package/templates/restaurant/l10n/he.json +8 -0
  269. package/templates/restaurant/l10n/hu.json +10 -0
  270. package/templates/restaurant/l10n/id.json +10 -0
  271. package/templates/restaurant/l10n/it.json +10 -0
  272. package/templates/restaurant/l10n/ja.json +10 -0
  273. package/templates/restaurant/l10n/ko.json +10 -0
  274. package/templates/restaurant/l10n/lt.json +10 -0
  275. package/templates/restaurant/l10n/nl.json +10 -0
  276. package/templates/restaurant/l10n/no.json +10 -0
  277. package/templates/restaurant/l10n/pl.json +10 -0
  278. package/templates/restaurant/l10n/pt.json +10 -0
  279. package/templates/restaurant/l10n/ru.json +10 -0
  280. package/templates/restaurant/l10n/sv.json +10 -0
  281. package/templates/restaurant/l10n/th.json +10 -0
  282. package/templates/restaurant/l10n/tr.json +10 -0
  283. package/templates/restaurant/l10n/uk.json +10 -0
  284. package/templates/restaurant/l10n/vi.json +10 -0
  285. package/templates/restaurant/l10n/zh.json +10 -0
  286. package/templates/restaurant/tier5-src/_shared/collection-contract.ts +6 -1
  287. package/templates/restaurant/tier5-src/_shared/himi-events.ts +27 -0
  288. package/templates/restaurant/tier5-src/himi-events-detail/index.ts +3 -1
  289. package/templates/restaurant/tier5-src/himi-events-list/index.ts +33 -7
  290. package/templates/restaurant/tier5-src/himi-events-my-events/index.ts +4 -2
  291. package/templates/restaurant-owner/tier5-src/_shared/collection-contract.ts +6 -1
  292. package/templates/restaurant-owner/tier5-src/_shared/himi-events.ts +27 -0
  293. package/templates/retail-store/tier5-src/_shared/collection-contract.ts +6 -1
  294. package/templates/retail-store/tier5-src/_shared/himi-events.ts +27 -0
  295. package/templates/retail-store-owner/tier5-src/_shared/collection-contract.ts +6 -1
  296. package/templates/retail-store-owner/tier5-src/_shared/himi-events.ts +27 -0
  297. package/templates/salon-spa/tier5-src/_shared/collection-contract.ts +6 -1
  298. package/templates/wholesale-store/tier5-src/_shared/collection-contract.ts +6 -1
  299. package/templates/yoga-studio/dev/index.ts +20 -0
  300. package/templates/yoga-studio/l10n/ar.json +10 -0
  301. package/templates/yoga-studio/l10n/cs.json +10 -0
  302. package/templates/yoga-studio/l10n/da.json +10 -0
  303. package/templates/yoga-studio/l10n/de.json +10 -0
  304. package/templates/yoga-studio/l10n/el.json +10 -0
  305. package/templates/yoga-studio/l10n/es.json +10 -0
  306. package/templates/yoga-studio/l10n/fi.json +10 -0
  307. package/templates/yoga-studio/l10n/fr.json +10 -0
  308. package/templates/yoga-studio/l10n/he.json +8 -0
  309. package/templates/yoga-studio/l10n/hu.json +10 -0
  310. package/templates/yoga-studio/l10n/id.json +10 -0
  311. package/templates/yoga-studio/l10n/it.json +10 -0
  312. package/templates/yoga-studio/l10n/ja.json +10 -0
  313. package/templates/yoga-studio/l10n/ko.json +10 -0
  314. package/templates/yoga-studio/l10n/lt.json +10 -0
  315. package/templates/yoga-studio/l10n/nl.json +10 -0
  316. package/templates/yoga-studio/l10n/no.json +10 -0
  317. package/templates/yoga-studio/l10n/pl.json +10 -0
  318. package/templates/yoga-studio/l10n/pt.json +10 -0
  319. package/templates/yoga-studio/l10n/ru.json +10 -0
  320. package/templates/yoga-studio/l10n/sv.json +10 -0
  321. package/templates/yoga-studio/l10n/th.json +10 -0
  322. package/templates/yoga-studio/l10n/tr.json +10 -0
  323. package/templates/yoga-studio/l10n/uk.json +10 -0
  324. package/templates/yoga-studio/l10n/vi.json +10 -0
  325. package/templates/yoga-studio/l10n/zh.json +10 -0
  326. package/templates/yoga-studio/tier5-src/_shared/collection-contract.ts +6 -1
  327. package/templates/yoga-studio/tier5-src/_shared/himi-events.ts +27 -0
  328. package/templates/yoga-studio/tier5-src/himi-events-detail/index.ts +3 -1
  329. package/templates/yoga-studio/tier5-src/himi-events-list/index.ts +33 -7
  330. package/templates/yoga-studio/tier5-src/himi-events-my-events/index.ts +4 -2
  331. package/templates/yoga-studio-owner/tier5-src/_shared/collection-contract.ts +6 -1
  332. package/templates/yoga-studio-owner/tier5-src/_shared/himi-events.ts +27 -0
@@ -3,7 +3,7 @@ import { defineService } from "@himalaya/state";
3
3
  import { dispatch } from "@himalaya/dispatch";
4
4
  import { queryEvents, type WixEvent } from "@himalaya/wix-events";
5
5
  import { getAll, upsert, type DbEntity } from "@himalaya/local-db";
6
- import { confirmedRsvpIds, eventStartMillis, normalizeEvent, type EventRow } from "../_shared/himi-events";
6
+ import { confirmedRsvpIds, eventCacheTimes, eventStartMillis, normalizeEvent, type EventRow } from "../_shared/himi-events";
7
7
  import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
8
8
  import { memberAccess } from "../_shared/member-access.js";
9
9
  import { readAccess, assertReadAccess, readAccessDenied, readSignInFlags, NO_READ_SIGN_IN } from "../_shared/member-read.js";
@@ -86,7 +86,9 @@ function imminentLabel(start: number | undefined): string {
86
86
 
87
87
  function cachedEventRow(event: WixEvent): CachedEventRow {
88
88
  const row = normalizeEvent(event);
89
- return { ...row, startMillis: eventStartMillis(event), canonicalStatus: row.status };
89
+ // The `events` store is shared with the Events list, which paints a row in Upcoming only when its stored times
90
+ // (`eventCacheTimes`) prove the event has not ended: an upsert without them would hide the row there.
91
+ return { ...row, ...eventCacheTimes(event), startMillis: eventStartMillis(event), canonicalStatus: row.status };
90
92
  }
91
93
 
92
94
  function displayEventRow(event: CachedEventRow): CachedEventRow {
@@ -61,6 +61,11 @@ export interface CollectionConfig {
61
61
  * card the overflow's items were unreachable AND the wrong pattern: shoppers
62
62
  * expect a heart, not a 3-item menu two taps deep. */
63
63
  favoriteToggle?: boolean;
64
+ /** A button in the EMPTY-SOURCE state that moves the list to another view of the same source (Events: "See past
65
+ * events" when Upcoming is empty and Past is not). `labelPath` and `hiddenPath` are top-level STATE fields the domain
66
+ * sets (the label through its copy, hidden until the domain knows the other view has rows); the tap sets the list's
67
+ * filter to `filter` (`collectionCriteria`), which must be one of `filterValues`. */
68
+ emptySourceAction?: { labelPath: string; hiddenPath: string; filter: string };
64
69
  /** A state field the DOMAIN narrows `rows` by (e.g. a category picker). While it is set,
65
70
  * zero rows is a filtered result, not an empty source. */
66
71
  narrowedBy?: string;
@@ -81,7 +86,7 @@ export const COLLECTIONS: Record<string, CollectionConfig> = {
81
86
  himiBookingBookings: { rows: 'rows', title: 'title', subtitle: 'subtitle', metadata: ['status'], view: 'list', backendQuery: true,
82
87
  defaultFilter: 'value:Upcoming', searchPlaceholder: 'Search by booking ID', countNoun: ['booking', 'bookings'], filterValues: ['Upcoming', 'Past', 'Cancelled'],
83
88
  sortLabels: { default: 'Soonest', az: 'Oldest', za: 'Latest' } },
84
- himiEvents: { rows: 'results', title: 'title', subtitle: 'dateLine', image: 'image', dateBadge: { text: 'dateBadge', hidden: 'noDateBadge' }, gridColumns: 1, view: 'grid', backendQuery: true, defaultFilter: 'value:Upcoming', searchPlaceholder: 'Search events', countNoun: ['event', 'events'], filterValues: ['Upcoming', 'Past'], sortLabels: { default: 'Date', az: 'Title A–Z', za: 'Title Z–A' }, primaryVerb: { label: 'Register', labelPath: 'actionLabel', hiddenPath: 'noAction' }, shareAction: 'share', endedWhen: 'isPast' },
89
+ himiEvents: { rows: 'results', title: 'title', subtitle: 'dateLine', image: 'image', dateBadge: { text: 'dateBadge', hidden: 'noDateBadge' }, gridColumns: 1, view: 'grid', backendQuery: true, defaultFilter: 'value:Upcoming', searchPlaceholder: 'Search events', countNoun: ['event', 'events'], filterValues: ['Upcoming', 'Past'], sortLabels: { default: 'Date', az: 'Title A–Z', za: 'Title Z–A' }, primaryVerb: { label: 'Register', labelPath: 'actionLabel', hiddenPath: 'noAction' }, shareAction: 'share', endedWhen: 'isPast', emptySourceAction: { labelPath: 'pastEventsLabel', hiddenPath: 'noPastEvents', filter: 'value:Past' } },
85
90
  himiOwnerLiteProducts: { rows: 'products', title: 'name', subtitle: 'price', image: 'image', view: 'grid', backendQuery: true, countNoun: ['product', 'products'] },
86
91
  himiOwnerModules: { instanceInput: 'module', rows: 'rows', title: 'title', subtitle: 'subtitle', image: 'image', filter: 'statusLabel', view: 'list', paged: true, reviewAction: 'prepareRecord', reviewSelectedAction: 'prepareSelected' },
87
92
  himiOwnerLiteServices: { rows: 'services', title: 'name', subtitle: 'subtitle', view: 'list', backendQuery: true, searchPlaceholder: 'Service name starts with…' },
@@ -11,6 +11,33 @@ export * from "@himalaya/wix-events";
11
11
  // (`globalThis.himalaya.storage` / `.input`), which a published, brand-scrubbed SDK
12
12
  // package must not reference. The himi-events-* bundles import these from this module.
13
13
 
14
+ import { eventEndMillis, eventStartMillis, type WixEvent } from "@himalaya/wix-events";
15
+
16
+ /** The event's own times, kept on the row the `events` local-db store holds (written by the list AND the detail), so a
17
+ * reader can tell at READ time whether the event has finished. The row's `statusLabel` / `isPast` were decided when the
18
+ * row was written, and the label is localized copy (`events.past`): a row stored the day before its event ended still
19
+ * says "not past" today. ISO strings, "" when the event has no such time. */
20
+ export interface EventCacheTimes { startsAt: string; endsAt: string }
21
+
22
+ export function eventCacheTimes(e: WixEvent): EventCacheTimes {
23
+ const iso = (ms: number | undefined) => (ms === undefined ? "" : new Date(ms).toISOString());
24
+ return { startsAt: iso(eventStartMillis(e)), endsAt: iso(eventEndMillis(e)) };
25
+ }
26
+
27
+ /** Would the live Upcoming read return the event of this CACHED row, at `now`? That read asks for a start or an end at
28
+ * or after now, so: its end when it has one, else its start, not before `now` (the `eventIsPast` rule, inverted), read from
29
+ * the row's own stored times. Everything the live read cannot return is `false`, so a cached paint never shows a row that
30
+ * the live answer then removes: a row written before the times were stored (no `startsAt` / `endsAt`), an undated event
31
+ * (to be announced: no time matches the query), and a time that does not parse. */
32
+ export function cachedEventUpcoming(row: unknown, now: number = Date.now()): boolean {
33
+ const r = (row && typeof row === "object" ? row : {}) as Partial<EventCacheTimes>;
34
+ if (typeof r.startsAt !== "string" || typeof r.endsAt !== "string") return false;
35
+ const at = r.endsAt || r.startsAt;
36
+ if (!at) return false;
37
+ const ms = new Date(at).getTime();
38
+ return !Number.isNaN(ms) && ms >= now;
39
+ }
40
+
14
41
  interface StorageLike {
15
42
  getItem(key: string): string | null;
16
43
  setItem(key: string, value: string): void;