@wix/himalaya-cli 0.1747.0 → 0.1749.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 (381) hide show
  1. package/bin/himi +16 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/builder.d.ts +3 -0
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +9 -0
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/site-shell.d.ts +34 -8
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +45 -18
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/l10n.mjs +1 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +36 -14
  8. package/dist/browser-plane/assets.json +7 -7
  9. package/dist/browser-plane/preview-deferred/{63821bbb8f637899037252154a5587f0596e4b537173c7f50551f9e44f7c22c0.bin → b40ea5d0d6251898ff5617139fde8be008dd11e99a70b14c1052093685401700.bin} +1 -1
  10. package/dist/browser-plane/sw.js +6 -6
  11. package/dist/browser-plane/t5-frame.html +1 -1
  12. package/dist/browser-plane/t5-worker-frame.html +1 -1
  13. package/dist/cli.mjs +2616 -1883
  14. package/dist/preview-assets.generated.bin +0 -0
  15. package/guides/component-reference.json +1 -1
  16. package/guides/component-reference.md +9 -0
  17. package/guides/one-app-to-himi-app.md +11 -6
  18. package/guides/wix-business-context.md +25 -1
  19. package/guides/wix-site-to-himi-app.md +2 -1
  20. package/package.json +2 -2
  21. package/template-icons/medical-services.png +0 -0
  22. package/templates/beauty-salon/dev/index.ts +1 -0
  23. package/templates/beauty-salon/l10n/en.json +6 -0
  24. package/templates/beauty-salon/l10n/fr.json +36 -5
  25. package/templates/beauty-salon/l10n/he.json +29 -4
  26. package/templates/beauty-salon/recipes/blog-hero.json +95 -0
  27. package/templates/beauty-salon/recipes/blog-list-thumb-start.json +177 -147
  28. package/templates/beauty-salon/recipes/blog-list.json +172 -142
  29. package/templates/beauty-salon/recipes/events-inline-list.json +30 -5
  30. package/templates/beauty-salon/recipes/events-inline.json +30 -5
  31. package/templates/beauty-salon/recipes/faq-list.json +503 -0
  32. package/templates/beauty-salon/recipes/groups-list.json +196 -0
  33. package/templates/beauty-salon/recipes/products-carousel.json +141 -0
  34. package/templates/beauty-salon/recipes/products-grid.json +143 -0
  35. package/templates/beauty-salon/tier5-src/_shared/blog-list.ts +9 -9
  36. package/templates/beauty-salon/tier5-src/_shared/events-inline.ts +7 -5
  37. package/templates/beauty-salon/tier5-src/_shared/faq-list.ts +405 -0
  38. package/templates/beauty-salon/tier5-src/_shared/groups-section.ts +110 -0
  39. package/templates/beauty-salon/tier5-src/_shared/member-bookings.ts +17 -4
  40. package/templates/beauty-salon/tier5-src/_shared/member-row-extras.ts +10 -2
  41. package/templates/beauty-salon/tier5-src/_shared/members-directory.ts +9 -5
  42. package/templates/beauty-salon/tier5-src/_shared/products-section.ts +76 -0
  43. package/templates/beauty-salon/tier5-src/_shared/programs-section.ts +2 -2
  44. package/templates/beauty-salon/tier5-src/_shared/staff-name.ts +18 -0
  45. package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +6 -2
  46. package/templates/beauty-salon/tier5-src/himi-booking-service/index.ts +7 -2
  47. package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +6 -4
  48. package/templates/beauty-salon-owner/dev/index.ts +54 -0
  49. package/templates/beauty-salon-owner/tier5-src/_shared/aria-chat.ts +30 -4
  50. package/templates/beauty-salon-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  51. package/templates/branded-lite/dev/index.ts +1 -0
  52. package/templates/branded-lite/l10n/fr.json +15 -5
  53. package/templates/branded-lite/l10n/he.json +12 -4
  54. package/templates/branded-lite/recipes/blog-hero.json +95 -0
  55. package/templates/branded-lite/recipes/blog-list-thumb-start.json +177 -147
  56. package/templates/branded-lite/recipes/blog-list.json +172 -142
  57. package/templates/branded-lite/recipes/events-inline-list.json +30 -5
  58. package/templates/branded-lite/recipes/events-inline.json +30 -5
  59. package/templates/branded-lite/recipes/faq-list.json +503 -0
  60. package/templates/branded-lite/recipes/groups-list.json +196 -0
  61. package/templates/branded-lite/recipes/products-carousel.json +141 -0
  62. package/templates/branded-lite/recipes/products-grid.json +143 -0
  63. package/templates/branded-lite/tier5-src/_shared/blog-list.ts +9 -9
  64. package/templates/branded-lite/tier5-src/_shared/events-inline.ts +7 -5
  65. package/templates/branded-lite/tier5-src/_shared/faq-list.ts +405 -0
  66. package/templates/branded-lite/tier5-src/_shared/groups-section.ts +110 -0
  67. package/templates/branded-lite/tier5-src/_shared/member-bookings.ts +17 -4
  68. package/templates/branded-lite/tier5-src/_shared/member-row-extras.ts +10 -2
  69. package/templates/branded-lite/tier5-src/_shared/members-directory.ts +9 -5
  70. package/templates/branded-lite/tier5-src/_shared/products-section.ts +76 -0
  71. package/templates/branded-lite/tier5-src/_shared/programs-section.ts +2 -2
  72. package/templates/branded-lite/tier5-src/_shared/staff-name.ts +18 -0
  73. package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +6 -2
  74. package/templates/branded-lite/tier5-src/himi-booking-service/index.ts +7 -2
  75. package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +6 -4
  76. package/templates/branded-lite/tier5-src/himi-branded-lite-faq/index.ts +5 -369
  77. package/templates/brandy/README.md +46 -5
  78. package/templates/brandy/config.ts +11 -0
  79. package/templates/brandy/himalaya.template.json +1 -1
  80. package/templates/community-club/dev/index.ts +1 -0
  81. package/templates/community-club/l10n/fr.json +25 -5
  82. package/templates/community-club/l10n/he.json +20 -4
  83. package/templates/community-club/recipes/blog-hero.json +95 -0
  84. package/templates/community-club/recipes/blog-list-thumb-start.json +177 -147
  85. package/templates/community-club/recipes/blog-list.json +172 -142
  86. package/templates/community-club/recipes/events-inline-list.json +30 -5
  87. package/templates/community-club/recipes/events-inline.json +30 -5
  88. package/templates/community-club/recipes/faq-list.json +503 -0
  89. package/templates/community-club/recipes/groups-list.json +196 -0
  90. package/templates/community-club/recipes/products-carousel.json +141 -0
  91. package/templates/community-club/recipes/products-grid.json +143 -0
  92. package/templates/community-club/tier5-src/_shared/blog-list.ts +9 -9
  93. package/templates/community-club/tier5-src/_shared/events-inline.ts +7 -5
  94. package/templates/community-club/tier5-src/_shared/faq-list.ts +405 -0
  95. package/templates/community-club/tier5-src/_shared/groups-section.ts +110 -0
  96. package/templates/community-club/tier5-src/_shared/member-bookings.ts +17 -4
  97. package/templates/community-club/tier5-src/_shared/member-row-extras.ts +10 -2
  98. package/templates/community-club/tier5-src/_shared/members-directory.ts +9 -5
  99. package/templates/community-club/tier5-src/_shared/products-section.ts +76 -0
  100. package/templates/community-club/tier5-src/_shared/programs-section.ts +2 -2
  101. package/templates/community-club-owner/dev/index.ts +54 -0
  102. package/templates/community-club-owner/tier5-src/_shared/aria-chat.ts +30 -4
  103. package/templates/community-club-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  104. package/templates/conference/dev/index.ts +1 -0
  105. package/templates/events-meetups/dev/index.ts +1 -0
  106. package/templates/events-meetups/l10n/fr.json +25 -5
  107. package/templates/events-meetups/l10n/he.json +20 -4
  108. package/templates/events-meetups/recipes/blog-hero.json +95 -0
  109. package/templates/events-meetups/recipes/blog-list-thumb-start.json +177 -147
  110. package/templates/events-meetups/recipes/blog-list.json +172 -142
  111. package/templates/events-meetups/recipes/events-inline-list.json +30 -5
  112. package/templates/events-meetups/recipes/events-inline.json +30 -5
  113. package/templates/events-meetups/recipes/faq-list.json +503 -0
  114. package/templates/events-meetups/recipes/groups-list.json +196 -0
  115. package/templates/events-meetups/recipes/products-carousel.json +141 -0
  116. package/templates/events-meetups/recipes/products-grid.json +143 -0
  117. package/templates/events-meetups/tier5-src/_shared/blog-list.ts +9 -9
  118. package/templates/events-meetups/tier5-src/_shared/events-inline.ts +7 -5
  119. package/templates/events-meetups/tier5-src/_shared/faq-list.ts +405 -0
  120. package/templates/events-meetups/tier5-src/_shared/groups-section.ts +110 -0
  121. package/templates/events-meetups/tier5-src/_shared/member-bookings.ts +17 -4
  122. package/templates/events-meetups/tier5-src/_shared/member-row-extras.ts +10 -2
  123. package/templates/events-meetups/tier5-src/_shared/members-directory.ts +9 -5
  124. package/templates/events-meetups/tier5-src/_shared/products-section.ts +76 -0
  125. package/templates/events-meetups/tier5-src/_shared/programs-section.ts +2 -2
  126. package/templates/events-meetups-owner/dev/index.ts +54 -0
  127. package/templates/events-meetups-owner/tier5-src/_shared/aria-chat.ts +30 -4
  128. package/templates/events-meetups-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  129. package/templates/gym-fitness/dev/index.ts +1 -0
  130. package/templates/gym-fitness/l10n/en.json +6 -0
  131. package/templates/gym-fitness/l10n/fr.json +36 -5
  132. package/templates/gym-fitness/l10n/he.json +29 -4
  133. package/templates/gym-fitness/recipes/blog-hero.json +95 -0
  134. package/templates/gym-fitness/recipes/blog-list-thumb-start.json +177 -147
  135. package/templates/gym-fitness/recipes/blog-list.json +172 -142
  136. package/templates/gym-fitness/recipes/events-inline-list.json +30 -5
  137. package/templates/gym-fitness/recipes/events-inline.json +30 -5
  138. package/templates/gym-fitness/recipes/faq-list.json +503 -0
  139. package/templates/gym-fitness/recipes/groups-list.json +196 -0
  140. package/templates/gym-fitness/recipes/products-carousel.json +141 -0
  141. package/templates/gym-fitness/recipes/products-grid.json +143 -0
  142. package/templates/gym-fitness/tier5-src/_shared/blog-list.ts +9 -9
  143. package/templates/gym-fitness/tier5-src/_shared/events-inline.ts +7 -5
  144. package/templates/gym-fitness/tier5-src/_shared/faq-list.ts +405 -0
  145. package/templates/gym-fitness/tier5-src/_shared/groups-section.ts +110 -0
  146. package/templates/gym-fitness/tier5-src/_shared/member-bookings.ts +17 -4
  147. package/templates/gym-fitness/tier5-src/_shared/member-row-extras.ts +10 -2
  148. package/templates/gym-fitness/tier5-src/_shared/members-directory.ts +9 -5
  149. package/templates/gym-fitness/tier5-src/_shared/products-section.ts +76 -0
  150. package/templates/gym-fitness/tier5-src/_shared/programs-section.ts +2 -2
  151. package/templates/gym-fitness/tier5-src/_shared/staff-name.ts +18 -0
  152. package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +6 -2
  153. package/templates/gym-fitness/tier5-src/himi-booking-service/index.ts +7 -2
  154. package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +6 -4
  155. package/templates/gym-fitness-owner/dev/index.ts +54 -0
  156. package/templates/gym-fitness-owner/tier5-src/_shared/aria-chat.ts +30 -4
  157. package/templates/gym-fitness-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  158. package/templates/medical-services/README.md +53 -0
  159. package/templates/medical-services/config.ts +320 -0
  160. package/templates/medical-services/dev/index.ts +17783 -0
  161. package/templates/medical-services/himalaya.content.json +46 -0
  162. package/templates/medical-services/himalaya.template.json +14 -0
  163. package/templates/medical-services/icon.png +0 -0
  164. package/templates/medical-services/platforms.json +1 -0
  165. package/templates/medical-services/tier5-src/_shared/app-locale.ts +61 -0
  166. package/templates/medical-services/tier5-src/_shared/booking-location.ts +147 -0
  167. package/templates/medical-services/tier5-src/_shared/booking-session.ts +222 -0
  168. package/templates/medical-services/tier5-src/_shared/branded-lite-hosted.ts +280 -0
  169. package/templates/medical-services/tier5-src/_shared/branded-load-state.ts +109 -0
  170. package/templates/medical-services/tier5-src/_shared/business-chat-copy.ts +40 -0
  171. package/templates/medical-services/tier5-src/_shared/business-chat-history.ts +51 -0
  172. package/templates/medical-services/tier5-src/_shared/business-chat-message-model.ts +177 -0
  173. package/templates/medical-services/tier5-src/_shared/business-chat-model.ts +56 -0
  174. package/templates/medical-services/tier5-src/_shared/business-chat-presenter.ts +576 -0
  175. package/templates/medical-services/tier5-src/_shared/business-chat-transport.ts +148 -0
  176. package/templates/medical-services/tier5-src/_shared/collection-contract.ts +228 -0
  177. package/templates/medical-services/tier5-src/_shared/collection-query.ts +193 -0
  178. package/templates/medical-services/tier5-src/_shared/collection-service.ts +400 -0
  179. package/templates/medical-services/tier5-src/_shared/engine-intl.ts +523 -0
  180. package/templates/medical-services/tier5-src/_shared/faq-list.ts +405 -0
  181. package/templates/medical-services/tier5-src/_shared/himi-account.ts +194 -0
  182. package/templates/medical-services/tier5-src/_shared/himi-booking-saved.ts +88 -0
  183. package/templates/medical-services/tier5-src/_shared/himi-bookings.ts +318 -0
  184. package/templates/medical-services/tier5-src/_shared/himi-copy.ts +116 -0
  185. package/templates/medical-services/tier5-src/_shared/himi-store.ts +7 -0
  186. package/templates/medical-services/tier5-src/_shared/himi-text.ts +24 -0
  187. package/templates/medical-services/tier5-src/_shared/host-events.ts +66 -0
  188. package/templates/medical-services/tier5-src/_shared/hosted-checkout.ts +70 -0
  189. package/templates/medical-services/tier5-src/_shared/iap-attendance-form.ts +106 -0
  190. package/templates/medical-services/tier5-src/_shared/iap-attendance-purchase.ts +216 -0
  191. package/templates/medical-services/tier5-src/_shared/iap-attendance.ts +38 -0
  192. package/templates/medical-services/tier5-src/_shared/iap-worker.ts +127 -0
  193. package/templates/medical-services/tier5-src/_shared/inbox-rooms.ts +68 -0
  194. package/templates/medical-services/tier5-src/_shared/local-preferences.ts +38 -0
  195. package/templates/medical-services/tier5-src/_shared/member-access.ts +52 -0
  196. package/templates/medical-services/tier5-src/_shared/member-account-routes.ts +52 -0
  197. package/templates/medical-services/tier5-src/_shared/member-bookings.ts +107 -0
  198. package/templates/medical-services/tier5-src/_shared/member-screen.ts +99 -0
  199. package/templates/medical-services/tier5-src/_shared/notification-target.ts +141 -0
  200. package/templates/medical-services/tier5-src/_shared/offset-page.ts +10 -0
  201. package/templates/medical-services/tier5-src/_shared/online-actions.ts +76 -0
  202. package/templates/medical-services/tier5-src/_shared/owner-load-error.ts +348 -0
  203. package/templates/medical-services/tier5-src/_shared/payment-setup.ts +6 -0
  204. package/templates/medical-services/tier5-src/_shared/rich-body.ts +78 -0
  205. package/templates/medical-services/tier5-src/_shared/rich-content-link.ts +34 -0
  206. package/templates/medical-services/tier5-src/_shared/sign-in-sheet.ts +18 -0
  207. package/templates/medical-services/tier5-src/_shared/staff-name.ts +18 -0
  208. package/templates/medical-services/tier5-src/_shared/weekly-goal.ts +107 -0
  209. package/templates/medical-services/tier5-src/_shared/wix-bi.ts +85 -0
  210. package/templates/medical-services/tier5-src/_shared/wix-member-links.ts +114 -0
  211. package/templates/medical-services/tier5-src/_shared/wix-service-price.ts +146 -0
  212. package/templates/medical-services/tier5-src/business-chat/index.ts +732 -0
  213. package/templates/medical-services/tier5-src/himi-booking-account/index.ts +252 -0
  214. package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +468 -0
  215. package/templates/medical-services/tier5-src/himi-booking-service/index.ts +1190 -0
  216. package/templates/medical-services/tier5-src/himi-booking-services/index.ts +791 -0
  217. package/templates/medical-services/tier5-src/himi-booking-time/index.ts +1729 -0
  218. package/templates/medical-services/tier5-src/himi-branded-lite-faq/index.ts +6 -0
  219. package/templates/medical-services/tier5-src/himi-branded-lite-notifications/index.ts +256 -0
  220. package/templates/medical-services/tier5-src/himi-clinic-home/index.ts +389 -0
  221. package/templates/medical-services/tier5-src/himi-store-account/index.ts +998 -0
  222. package/templates/medical-services/tokens.json +418 -0
  223. package/templates/nonprofit-cause/dev/index.ts +1 -0
  224. package/templates/nonprofit-cause/l10n/fr.json +25 -5
  225. package/templates/nonprofit-cause/l10n/he.json +20 -4
  226. package/templates/nonprofit-cause/recipes/blog-hero.json +95 -0
  227. package/templates/nonprofit-cause/recipes/blog-list-thumb-start.json +177 -147
  228. package/templates/nonprofit-cause/recipes/blog-list.json +172 -142
  229. package/templates/nonprofit-cause/recipes/events-inline-list.json +30 -5
  230. package/templates/nonprofit-cause/recipes/events-inline.json +30 -5
  231. package/templates/nonprofit-cause/recipes/faq-list.json +503 -0
  232. package/templates/nonprofit-cause/recipes/groups-list.json +196 -0
  233. package/templates/nonprofit-cause/recipes/products-carousel.json +141 -0
  234. package/templates/nonprofit-cause/recipes/products-grid.json +143 -0
  235. package/templates/nonprofit-cause/tier5-src/_shared/blog-list.ts +9 -9
  236. package/templates/nonprofit-cause/tier5-src/_shared/events-inline.ts +7 -5
  237. package/templates/nonprofit-cause/tier5-src/_shared/faq-list.ts +405 -0
  238. package/templates/nonprofit-cause/tier5-src/_shared/groups-section.ts +110 -0
  239. package/templates/nonprofit-cause/tier5-src/_shared/member-bookings.ts +17 -4
  240. package/templates/nonprofit-cause/tier5-src/_shared/member-row-extras.ts +10 -2
  241. package/templates/nonprofit-cause/tier5-src/_shared/members-directory.ts +9 -5
  242. package/templates/nonprofit-cause/tier5-src/_shared/products-section.ts +76 -0
  243. package/templates/nonprofit-cause/tier5-src/_shared/programs-section.ts +2 -2
  244. package/templates/nonprofit-cause-owner/dev/index.ts +54 -0
  245. package/templates/nonprofit-cause-owner/tier5-src/_shared/aria-chat.ts +30 -4
  246. package/templates/nonprofit-cause-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  247. package/templates/owner-lite/dev/index.ts +54 -0
  248. package/templates/owner-lite/tier5-src/_shared/aria-chat.ts +30 -4
  249. package/templates/owner-lite/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  250. package/templates/podcast-creator/dev/index.ts +1 -0
  251. package/templates/podcast-creator/l10n/fr.json +35 -5
  252. package/templates/podcast-creator/l10n/he.json +28 -4
  253. package/templates/podcast-creator/recipes/blog-hero.json +95 -0
  254. package/templates/podcast-creator/recipes/blog-list-thumb-start.json +177 -147
  255. package/templates/podcast-creator/recipes/blog-list.json +172 -142
  256. package/templates/podcast-creator/recipes/events-inline-list.json +30 -5
  257. package/templates/podcast-creator/recipes/events-inline.json +30 -5
  258. package/templates/podcast-creator/recipes/faq-list.json +503 -0
  259. package/templates/podcast-creator/recipes/groups-list.json +196 -0
  260. package/templates/podcast-creator/recipes/products-carousel.json +141 -0
  261. package/templates/podcast-creator/recipes/products-grid.json +143 -0
  262. package/templates/podcast-creator/tier5-src/_shared/blog-list.ts +9 -9
  263. package/templates/podcast-creator/tier5-src/_shared/events-inline.ts +7 -5
  264. package/templates/podcast-creator/tier5-src/_shared/faq-list.ts +405 -0
  265. package/templates/podcast-creator/tier5-src/_shared/groups-section.ts +110 -0
  266. package/templates/podcast-creator/tier5-src/_shared/member-bookings.ts +17 -4
  267. package/templates/podcast-creator/tier5-src/_shared/member-row-extras.ts +10 -2
  268. package/templates/podcast-creator/tier5-src/_shared/members-directory.ts +9 -5
  269. package/templates/podcast-creator/tier5-src/_shared/products-section.ts +76 -0
  270. package/templates/podcast-creator/tier5-src/_shared/programs-section.ts +2 -2
  271. package/templates/podcast-creator-owner/dev/index.ts +54 -0
  272. package/templates/podcast-creator-owner/tier5-src/_shared/aria-chat.ts +30 -4
  273. package/templates/podcast-creator-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  274. package/templates/portfolio-creative/dev/index.ts +1 -0
  275. package/templates/portfolio-creative/l10n/fr.json +25 -5
  276. package/templates/portfolio-creative/l10n/he.json +20 -4
  277. package/templates/portfolio-creative/recipes/blog-hero.json +95 -0
  278. package/templates/portfolio-creative/recipes/blog-list-thumb-start.json +177 -147
  279. package/templates/portfolio-creative/recipes/blog-list.json +172 -142
  280. package/templates/portfolio-creative/recipes/events-inline-list.json +30 -5
  281. package/templates/portfolio-creative/recipes/events-inline.json +30 -5
  282. package/templates/portfolio-creative/recipes/faq-list.json +503 -0
  283. package/templates/portfolio-creative/recipes/groups-list.json +196 -0
  284. package/templates/portfolio-creative/recipes/products-carousel.json +141 -0
  285. package/templates/portfolio-creative/recipes/products-grid.json +143 -0
  286. package/templates/portfolio-creative/tier5-src/_shared/blog-list.ts +9 -9
  287. package/templates/portfolio-creative/tier5-src/_shared/events-inline.ts +7 -5
  288. package/templates/portfolio-creative/tier5-src/_shared/faq-list.ts +405 -0
  289. package/templates/portfolio-creative/tier5-src/_shared/groups-section.ts +110 -0
  290. package/templates/portfolio-creative/tier5-src/_shared/member-bookings.ts +17 -4
  291. package/templates/portfolio-creative/tier5-src/_shared/member-row-extras.ts +10 -2
  292. package/templates/portfolio-creative/tier5-src/_shared/members-directory.ts +9 -5
  293. package/templates/portfolio-creative/tier5-src/_shared/products-section.ts +76 -0
  294. package/templates/portfolio-creative/tier5-src/_shared/programs-section.ts +2 -2
  295. package/templates/portfolio-creative-owner/dev/index.ts +54 -0
  296. package/templates/portfolio-creative-owner/tier5-src/_shared/aria-chat.ts +30 -4
  297. package/templates/portfolio-creative-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  298. package/templates/restaurant/dev/index.ts +1 -0
  299. package/templates/restaurant/l10n/fr.json +35 -5
  300. package/templates/restaurant/l10n/he.json +28 -4
  301. package/templates/restaurant/recipes/blog-hero.json +95 -0
  302. package/templates/restaurant/recipes/blog-list-thumb-start.json +177 -147
  303. package/templates/restaurant/recipes/blog-list.json +172 -142
  304. package/templates/restaurant/recipes/events-inline-list.json +30 -5
  305. package/templates/restaurant/recipes/events-inline.json +30 -5
  306. package/templates/restaurant/recipes/faq-list.json +503 -0
  307. package/templates/restaurant/recipes/groups-list.json +196 -0
  308. package/templates/restaurant/recipes/products-carousel.json +141 -0
  309. package/templates/restaurant/recipes/products-grid.json +143 -0
  310. package/templates/restaurant/tier5-src/_shared/blog-list.ts +9 -9
  311. package/templates/restaurant/tier5-src/_shared/events-inline.ts +7 -5
  312. package/templates/restaurant/tier5-src/_shared/faq-list.ts +405 -0
  313. package/templates/restaurant/tier5-src/_shared/groups-section.ts +110 -0
  314. package/templates/restaurant/tier5-src/_shared/member-bookings.ts +17 -4
  315. package/templates/restaurant/tier5-src/_shared/member-row-extras.ts +10 -2
  316. package/templates/restaurant/tier5-src/_shared/members-directory.ts +9 -5
  317. package/templates/restaurant/tier5-src/_shared/products-section.ts +76 -0
  318. package/templates/restaurant/tier5-src/_shared/programs-section.ts +2 -2
  319. package/templates/restaurant-owner/dev/index.ts +54 -0
  320. package/templates/restaurant-owner/tier5-src/_shared/aria-chat.ts +30 -4
  321. package/templates/restaurant-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  322. package/templates/retail-store/dev/index.ts +1 -0
  323. package/templates/retail-store/l10n/fr.json +25 -5
  324. package/templates/retail-store/l10n/he.json +20 -4
  325. package/templates/retail-store/recipes/blog-hero.json +95 -0
  326. package/templates/retail-store/recipes/blog-list-thumb-start.json +177 -147
  327. package/templates/retail-store/recipes/blog-list.json +172 -142
  328. package/templates/retail-store/recipes/events-inline-list.json +30 -5
  329. package/templates/retail-store/recipes/events-inline.json +30 -5
  330. package/templates/retail-store/recipes/faq-list.json +503 -0
  331. package/templates/retail-store/recipes/groups-list.json +196 -0
  332. package/templates/retail-store/recipes/products-carousel.json +141 -0
  333. package/templates/retail-store/recipes/products-grid.json +143 -0
  334. package/templates/retail-store/tier5-src/_shared/blog-list.ts +9 -9
  335. package/templates/retail-store/tier5-src/_shared/events-inline.ts +7 -5
  336. package/templates/retail-store/tier5-src/_shared/faq-list.ts +405 -0
  337. package/templates/retail-store/tier5-src/_shared/groups-section.ts +110 -0
  338. package/templates/retail-store/tier5-src/_shared/member-bookings.ts +17 -4
  339. package/templates/retail-store/tier5-src/_shared/member-row-extras.ts +10 -2
  340. package/templates/retail-store/tier5-src/_shared/members-directory.ts +9 -5
  341. package/templates/retail-store/tier5-src/_shared/products-section.ts +76 -0
  342. package/templates/retail-store/tier5-src/_shared/programs-section.ts +2 -2
  343. package/templates/retail-store-owner/dev/index.ts +54 -0
  344. package/templates/retail-store-owner/tier5-src/_shared/aria-chat.ts +30 -4
  345. package/templates/retail-store-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
  346. package/templates/salon-spa/dev/index.ts +1 -0
  347. package/templates/salon-spa/tier5-src/_shared/member-bookings.ts +17 -4
  348. package/templates/salon-spa/tier5-src/_shared/staff-name.ts +18 -0
  349. package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +6 -2
  350. package/templates/salon-spa/tier5-src/himi-booking-service/index.ts +7 -2
  351. package/templates/salon-spa/tier5-src/himi-booking-time/index.ts +6 -4
  352. package/templates/wholesale-store/dev/index.ts +1 -0
  353. package/templates/yoga-studio/dev/index.ts +1 -0
  354. package/templates/yoga-studio/l10n/en.json +6 -0
  355. package/templates/yoga-studio/l10n/fr.json +46 -5
  356. package/templates/yoga-studio/l10n/he.json +37 -4
  357. package/templates/yoga-studio/recipes/blog-hero.json +95 -0
  358. package/templates/yoga-studio/recipes/blog-list-thumb-start.json +177 -147
  359. package/templates/yoga-studio/recipes/blog-list.json +172 -142
  360. package/templates/yoga-studio/recipes/events-inline-list.json +30 -5
  361. package/templates/yoga-studio/recipes/events-inline.json +30 -5
  362. package/templates/yoga-studio/recipes/faq-list.json +503 -0
  363. package/templates/yoga-studio/recipes/groups-list.json +196 -0
  364. package/templates/yoga-studio/recipes/products-carousel.json +141 -0
  365. package/templates/yoga-studio/recipes/products-grid.json +143 -0
  366. package/templates/yoga-studio/tier5-src/_shared/blog-list.ts +9 -9
  367. package/templates/yoga-studio/tier5-src/_shared/events-inline.ts +7 -5
  368. package/templates/yoga-studio/tier5-src/_shared/faq-list.ts +405 -0
  369. package/templates/yoga-studio/tier5-src/_shared/groups-section.ts +110 -0
  370. package/templates/yoga-studio/tier5-src/_shared/member-bookings.ts +17 -4
  371. package/templates/yoga-studio/tier5-src/_shared/member-row-extras.ts +10 -2
  372. package/templates/yoga-studio/tier5-src/_shared/members-directory.ts +9 -5
  373. package/templates/yoga-studio/tier5-src/_shared/products-section.ts +76 -0
  374. package/templates/yoga-studio/tier5-src/_shared/programs-section.ts +2 -2
  375. package/templates/yoga-studio/tier5-src/_shared/staff-name.ts +18 -0
  376. package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +6 -2
  377. package/templates/yoga-studio/tier5-src/himi-booking-service/index.ts +7 -2
  378. package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +6 -4
  379. package/templates/yoga-studio-owner/dev/index.ts +54 -0
  380. package/templates/yoga-studio-owner/tier5-src/_shared/aria-chat.ts +30 -4
  381. package/templates/yoga-studio-owner/tier5-src/himi-owner-lite-aria/index.ts +29 -0
@@ -0,0 +1,252 @@
1
+ // Tier-5 bundle: himi-booking — visitor/member account state.
2
+ import { defineService, navigate } from "@himalaya/state";
3
+ import { dispatch } from "@himalaya/dispatch";
4
+ import { queryBookings, type WixBooking } from "@himalaya/wix-bookings";
5
+ import { loadMemberProfile, strOf, fmtDateTime, titleCase, type AccountActivityRow } from "../_shared/himi-account";
6
+ import { stashCopy, copyParam } from "../_shared/himi-copy.js";
7
+ import { memberScreenOpener } from "../_shared/member-screen.js";
8
+
9
+ const openMemberScreen = memberScreenOpener();
10
+
11
+ interface S {
12
+ status: "loading" | "ready";
13
+ isMember: boolean;
14
+ notMember: boolean;
15
+ identityLine: string;
16
+ detailLine: string;
17
+ memberName: string;
18
+ memberEmail: string;
19
+ memberImage: string;
20
+ memberInitials: string;
21
+ hasMemberImage: boolean;
22
+ noMemberImage: boolean;
23
+ authTitle: string;
24
+ authBody: string;
25
+ email: string;
26
+ password: string;
27
+ firstName: string;
28
+ lastName: string;
29
+ message: string;
30
+ isLoading: boolean;
31
+ notLoading: boolean;
32
+ isRegistering: boolean;
33
+ notRegistering: boolean;
34
+ activityTitle: string;
35
+ activitySummary: string;
36
+ activityRows: AccountActivityRow[];
37
+ activityEmptyText: string;
38
+ hasActivity: boolean;
39
+ noActivity: boolean;
40
+ servicesScreenId: string;
41
+ bookingsScreenId: string;
42
+ }
43
+
44
+ function derive(s: S): S {
45
+ const isRegistering = !!s.isRegistering;
46
+ const hasActivity = s.activityRows.length > 0;
47
+ return {
48
+ ...s,
49
+ isLoading: s.status === "loading",
50
+ notLoading: s.status !== "loading",
51
+ notMember: !s.isMember,
52
+ isRegistering,
53
+ notRegistering: !isRegistering,
54
+ hasActivity,
55
+ noActivity: !hasActivity,
56
+ authTitle: isRegistering
57
+ ? copyParam("bookingAccount.authTitleRegister", "Create account")
58
+ : copyParam("bookingAccount.authTitle", "Welcome"),
59
+ authBody: isRegistering
60
+ ? copyParam("bookingAccount.authBodyRegister", "Create a member account to book services and see your history.")
61
+ : copyParam("bookingAccount.authBody", "Sign in to book services and see your history."),
62
+ };
63
+ }
64
+
65
+ function bookingEmail(booking: WixBooking): string {
66
+ const contact = booking.contactDetails as { email?: string; contactEmail?: string } | undefined;
67
+ return (contact?.email ?? contact?.contactEmail ?? "").toLowerCase();
68
+ }
69
+
70
+ function bookingTitle(booking: WixBooking): string {
71
+ const entity = booking.bookedEntity as { serviceName?: string; title?: string } | undefined;
72
+ return entity?.serviceName || entity?.title || "Booking";
73
+ }
74
+
75
+ function bookingStart(booking: WixBooking): string | undefined {
76
+ const entity = booking.bookedEntity as { slot?: { startDate?: string } } | undefined;
77
+ return entity?.slot?.startDate || booking.startDate || booking.createdDate;
78
+ }
79
+
80
+ function bookingRow(booking: WixBooking): AccountActivityRow {
81
+ const start = bookingStart(booking);
82
+ return {
83
+ id: booking.id || start || bookingTitle(booking),
84
+ title: bookingTitle(booking),
85
+ subtitle: fmtDateTime(start) || "Booked time",
86
+ meta: titleCase(booking.paymentStatus) || "",
87
+ status: titleCase(booking.status) || "Booked",
88
+ };
89
+ }
90
+
91
+ async function bookingRows(memberEmail: string): Promise<AccountActivityRow[]> {
92
+ if (!memberEmail) return [];
93
+ const res = await queryBookings({ query: { paging: { limit: 50 } } });
94
+ return (res.bookings ?? [])
95
+ .filter((booking) => bookingEmail(booking) === memberEmail.toLowerCase())
96
+ .sort((a, b) => (Date.parse(bookingStart(b) || "") || 0) - (Date.parse(bookingStart(a) || "") || 0))
97
+ .slice(0, 3)
98
+ .map(bookingRow);
99
+ }
100
+
101
+ async function probe(s: S): Promise<S> {
102
+ const profile = await loadMemberProfile(copyParam("bookingAccount.guestDetail", "Sign in to book services and see your booking history."));
103
+ let activityRows: AccountActivityRow[] = [];
104
+ if (profile.isMember) {
105
+ try {
106
+ activityRows = await bookingRows(profile.memberEmail);
107
+ } catch {
108
+ activityRows = [];
109
+ }
110
+ }
111
+ return derive({
112
+ ...s,
113
+ status: "ready",
114
+ isMember: profile.isMember,
115
+ identityLine: profile.identityLine,
116
+ detailLine: profile.detailLine,
117
+ memberName: profile.memberName,
118
+ memberEmail: profile.memberEmail,
119
+ memberImage: profile.memberImage,
120
+ memberInitials: profile.memberInitials,
121
+ hasMemberImage: profile.hasMemberImage,
122
+ noMemberImage: profile.noMemberImage,
123
+ email: profile.memberEmail || s.email,
124
+ message: "",
125
+ activityRows,
126
+ activityTitle: copyParam("bookingAccount.activityTitle", "Recent bookings"),
127
+ activitySummary: activityRows.length
128
+ ? `${activityRows.length} recent ${activityRows.length === 1 ? "booking" : "bookings"}`
129
+ : copyParam("bookingAccount.activityHint", "Bookings are loaded from Wix Bookings."),
130
+ activityEmptyText: profile.isMember
131
+ ? copyParam("bookingAccount.activityEmptyMember", "No bookings for this member yet.")
132
+ : copyParam("bookingAccount.activityEmptyGuest", "Sign in to see bookings."),
133
+ });
134
+ }
135
+
136
+ function optimisticMember(s: S, email: string): S {
137
+ return derive({
138
+ ...s,
139
+ status: "ready",
140
+ isMember: true,
141
+ identityLine: copyParam("bookingAccount.signedIn", "Signed in"),
142
+ detailLine: email,
143
+ memberName: email,
144
+ memberEmail: email,
145
+ memberImage: "",
146
+ memberInitials: "M",
147
+ hasMemberImage: false,
148
+ noMemberImage: true,
149
+ email,
150
+ password: "",
151
+ firstName: "",
152
+ lastName: "",
153
+ isRegistering: false,
154
+ message: "",
155
+ });
156
+ }
157
+
158
+ const svc = defineService<S, {
159
+ load: (s: S, arg?: unknown) => Promise<S>;
160
+ refresh: (s: S, arg?: unknown) => Promise<S>;
161
+ setEmail: (s: S, arg?: unknown) => S;
162
+ setPassword: (s: S, arg?: unknown) => S;
163
+ setFirstName: (s: S, arg?: unknown) => S;
164
+ setLastName: (s: S, arg?: unknown) => S;
165
+ showRegister: (s: S) => S;
166
+ showSignIn: (s: S) => S;
167
+ signIn: (s: S) => Promise<S>;
168
+ register: (s: S) => Promise<S>;
169
+ signOut: (s: S) => Promise<S>;
170
+ openForMember: (s: S, arg?: unknown) => Promise<S>;
171
+ }>("himiBookingAccount", {
172
+ state: derive({
173
+ status: "loading",
174
+ isMember: false,
175
+ notMember: true,
176
+ identityLine: "",
177
+ detailLine: "",
178
+ memberName: "",
179
+ memberEmail: "",
180
+ memberImage: "",
181
+ memberInitials: "M",
182
+ hasMemberImage: false,
183
+ noMemberImage: true,
184
+ authTitle: "Welcome",
185
+ authBody: "Sign in to book services and see your history.",
186
+ email: "",
187
+ password: "",
188
+ firstName: "",
189
+ lastName: "",
190
+ message: "",
191
+ isLoading: true,
192
+ notLoading: false,
193
+ isRegistering: false,
194
+ notRegistering: true,
195
+ activityTitle: "Recent bookings",
196
+ activitySummary: "",
197
+ activityRows: [],
198
+ activityEmptyText: "No bookings for this member yet.",
199
+ hasActivity: false,
200
+ noActivity: true,
201
+ servicesScreenId: "himi_services",
202
+ bookingsScreenId: "himi_bookings",
203
+ }),
204
+ actions: {
205
+ load: (s, arg) => { stashCopy(arg); return probe(s); },
206
+ refresh: (s, arg) => { stashCopy(arg); return probe(s); },
207
+ setEmail: (s, arg) => derive({ ...s, email: strOf(arg), message: "" }),
208
+ setPassword: (s, arg) => derive({ ...s, password: strOf(arg), message: "" }),
209
+ setFirstName: (s, arg) => derive({ ...s, firstName: strOf(arg), message: "" }),
210
+ setLastName: (s, arg) => derive({ ...s, lastName: strOf(arg), message: "" }),
211
+ showRegister: (s) => derive({ ...s, isRegistering: true, message: "" }),
212
+ showSignIn: (s) => derive({ ...s, isRegistering: false, message: "" }),
213
+ signIn: async (s) => {
214
+ if (!s.email || !s.password) return derive({ ...s, message: copyParam("bookingAccount.validationEmailPassword", "Enter your email and password.") });
215
+ try {
216
+ await dispatch("himi.wix.signInDirect", { email: s.email, password: s.password });
217
+ const next = await probe(optimisticMember(s, s.email));
218
+ return derive({ ...next, password: "", message: next.isMember ? "" : copyParam("bookingAccount.signInCheckDetails", "Sign in failed. Check your details.") });
219
+ } catch {
220
+ return derive({ ...s, password: "", message: copyParam("bookingAccount.signInFailed", "Sign in failed. Try again.") });
221
+ }
222
+ },
223
+ register: async (s) => {
224
+ if (!s.email || !s.password) return derive({ ...s, message: copyParam("bookingAccount.validationEmailPassword", "Enter your email and password.") });
225
+ try {
226
+ await dispatch("himi.wix.registerDirect", {
227
+ email: s.email,
228
+ password: s.password,
229
+ firstName: s.firstName,
230
+ lastName: s.lastName,
231
+ });
232
+ const next = await probe(optimisticMember(s, s.email));
233
+ return derive({ ...next, password: "", message: next.isMember ? "" : copyParam("bookingAccount.registerTrySignIn", "Account creation failed. Try signing in.") });
234
+ } catch {
235
+ return derive({ ...s, password: "", message: copyParam("bookingAccount.registerFailed", "Account creation failed. Try another email.") });
236
+ }
237
+ },
238
+ // A member-only screen from Profile (Salon & Spa's Messages row): a guest signs in first, and the
239
+ // screen opens on `returnTab` once signed in (_shared/member-screen.ts).
240
+ openForMember: async (s, arg): Promise<S> => {
241
+ const nav = await openMemberScreen(arg);
242
+ const current: S = svc.getState?.() ?? s;
243
+ return nav ? navigate(current, nav) : current;
244
+ },
245
+ signOut: async (s) => {
246
+ try { await dispatch("himi.wix.signOut"); } catch { /* ignore */ }
247
+ return probe({ ...s, isMember: false, isRegistering: false, message: "" });
248
+ },
249
+ },
250
+ });
251
+ svc.load();
252
+ export { svc };