@wix/himalaya-cli 0.1787.0 → 0.1788.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 (431) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +36 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +7 -0
  3. package/dist/cli.mjs +19 -3
  4. package/fixtures/wix-canned.json +8 -0
  5. package/guides/sdk-reference.json +24 -1
  6. package/package.json +2 -2
  7. package/templates/beauty-salon/config.ts +29 -1
  8. package/templates/beauty-salon/dev/index.ts +3702 -1505
  9. package/templates/beauty-salon/himalaya.content.json +13 -1
  10. package/templates/beauty-salon/l10n/ar.json +226 -264
  11. package/templates/beauty-salon/l10n/cs.json +226 -264
  12. package/templates/beauty-salon/l10n/da.json +226 -264
  13. package/templates/beauty-salon/l10n/de.json +226 -264
  14. package/templates/beauty-salon/l10n/el.json +226 -264
  15. package/templates/beauty-salon/l10n/en.json +158 -199
  16. package/templates/beauty-salon/l10n/es.json +226 -264
  17. package/templates/beauty-salon/l10n/fi.json +226 -264
  18. package/templates/beauty-salon/l10n/fr.json +227 -265
  19. package/templates/beauty-salon/l10n/he.json +186 -217
  20. package/templates/beauty-salon/l10n/hu.json +226 -264
  21. package/templates/beauty-salon/l10n/id.json +226 -264
  22. package/templates/beauty-salon/l10n/it.json +226 -264
  23. package/templates/beauty-salon/l10n/ja.json +226 -264
  24. package/templates/beauty-salon/l10n/ko.json +226 -264
  25. package/templates/beauty-salon/l10n/lt.json +226 -264
  26. package/templates/beauty-salon/l10n/nl.json +226 -264
  27. package/templates/beauty-salon/l10n/no.json +226 -264
  28. package/templates/beauty-salon/l10n/pl.json +226 -264
  29. package/templates/beauty-salon/l10n/pt.json +226 -264
  30. package/templates/beauty-salon/l10n/ru.json +226 -264
  31. package/templates/beauty-salon/l10n/sv.json +226 -264
  32. package/templates/beauty-salon/l10n/th.json +226 -264
  33. package/templates/beauty-salon/l10n/tr.json +226 -264
  34. package/templates/beauty-salon/l10n/uk.json +226 -264
  35. package/templates/beauty-salon/l10n/vi.json +226 -264
  36. package/templates/beauty-salon/l10n/zh.json +226 -264
  37. package/templates/beauty-salon/tier5-src/_shared/member-account-routes.ts +7 -3
  38. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  39. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  40. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  41. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  42. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  43. package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  44. package/templates/branded-lite/config.ts +29 -1
  45. package/templates/branded-lite/dev/index.ts +3720 -1523
  46. package/templates/branded-lite/himalaya.content.json +13 -1
  47. package/templates/branded-lite/l10n/ar.json +208 -267
  48. package/templates/branded-lite/l10n/cs.json +208 -267
  49. package/templates/branded-lite/l10n/da.json +208 -267
  50. package/templates/branded-lite/l10n/de.json +208 -267
  51. package/templates/branded-lite/l10n/el.json +208 -267
  52. package/templates/branded-lite/l10n/en.json +159 -207
  53. package/templates/branded-lite/l10n/es.json +208 -267
  54. package/templates/branded-lite/l10n/fi.json +208 -267
  55. package/templates/branded-lite/l10n/fr.json +212 -271
  56. package/templates/branded-lite/l10n/he.json +171 -219
  57. package/templates/branded-lite/l10n/hu.json +208 -267
  58. package/templates/branded-lite/l10n/id.json +208 -267
  59. package/templates/branded-lite/l10n/it.json +208 -267
  60. package/templates/branded-lite/l10n/ja.json +208 -267
  61. package/templates/branded-lite/l10n/ko.json +208 -267
  62. package/templates/branded-lite/l10n/lt.json +208 -267
  63. package/templates/branded-lite/l10n/nl.json +208 -267
  64. package/templates/branded-lite/l10n/no.json +208 -267
  65. package/templates/branded-lite/l10n/pl.json +208 -267
  66. package/templates/branded-lite/l10n/pt.json +208 -267
  67. package/templates/branded-lite/l10n/ru.json +208 -267
  68. package/templates/branded-lite/l10n/sv.json +208 -267
  69. package/templates/branded-lite/l10n/th.json +208 -267
  70. package/templates/branded-lite/l10n/tr.json +208 -267
  71. package/templates/branded-lite/l10n/uk.json +208 -267
  72. package/templates/branded-lite/l10n/vi.json +208 -267
  73. package/templates/branded-lite/l10n/zh.json +208 -267
  74. package/templates/branded-lite/tier5-src/_shared/member-account-routes.ts +7 -3
  75. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  76. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  77. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  78. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  79. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  80. package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  81. package/templates/brandy/README.md +4 -2
  82. package/templates/brandy/config.ts +12 -1
  83. package/templates/brandy/tier5-src/_shared/member-account-routes.ts +7 -3
  84. package/templates/community-club/config.ts +29 -1
  85. package/templates/community-club/dev/index.ts +3717 -1520
  86. package/templates/community-club/himalaya.content.json +13 -1
  87. package/templates/community-club/l10n/ar.json +218 -262
  88. package/templates/community-club/l10n/cs.json +218 -262
  89. package/templates/community-club/l10n/da.json +218 -262
  90. package/templates/community-club/l10n/de.json +218 -262
  91. package/templates/community-club/l10n/el.json +218 -262
  92. package/templates/community-club/l10n/en.json +140 -188
  93. package/templates/community-club/l10n/es.json +218 -262
  94. package/templates/community-club/l10n/fi.json +218 -262
  95. package/templates/community-club/l10n/fr.json +218 -262
  96. package/templates/community-club/l10n/he.json +180 -216
  97. package/templates/community-club/l10n/hu.json +218 -262
  98. package/templates/community-club/l10n/id.json +218 -262
  99. package/templates/community-club/l10n/it.json +218 -262
  100. package/templates/community-club/l10n/ja.json +218 -262
  101. package/templates/community-club/l10n/ko.json +218 -262
  102. package/templates/community-club/l10n/lt.json +218 -262
  103. package/templates/community-club/l10n/nl.json +218 -262
  104. package/templates/community-club/l10n/no.json +218 -262
  105. package/templates/community-club/l10n/pl.json +218 -262
  106. package/templates/community-club/l10n/pt.json +218 -262
  107. package/templates/community-club/l10n/ru.json +218 -262
  108. package/templates/community-club/l10n/sv.json +218 -262
  109. package/templates/community-club/l10n/th.json +218 -262
  110. package/templates/community-club/l10n/tr.json +218 -262
  111. package/templates/community-club/l10n/uk.json +218 -262
  112. package/templates/community-club/l10n/vi.json +218 -262
  113. package/templates/community-club/l10n/zh.json +218 -262
  114. package/templates/community-club/tier5-src/_shared/member-account-routes.ts +7 -3
  115. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  116. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  117. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  118. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  119. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  120. package/templates/community-club/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  121. package/templates/conference/tier5-src/_shared/member-account-routes.ts +7 -3
  122. package/templates/events-meetups/config.ts +29 -1
  123. package/templates/events-meetups/dev/index.ts +3703 -1506
  124. package/templates/events-meetups/himalaya.content.json +13 -1
  125. package/templates/events-meetups/l10n/ar.json +218 -262
  126. package/templates/events-meetups/l10n/cs.json +218 -262
  127. package/templates/events-meetups/l10n/da.json +218 -262
  128. package/templates/events-meetups/l10n/de.json +218 -262
  129. package/templates/events-meetups/l10n/el.json +218 -262
  130. package/templates/events-meetups/l10n/en.json +140 -188
  131. package/templates/events-meetups/l10n/es.json +218 -262
  132. package/templates/events-meetups/l10n/fi.json +218 -262
  133. package/templates/events-meetups/l10n/fr.json +218 -262
  134. package/templates/events-meetups/l10n/he.json +180 -216
  135. package/templates/events-meetups/l10n/hu.json +218 -262
  136. package/templates/events-meetups/l10n/id.json +218 -262
  137. package/templates/events-meetups/l10n/it.json +218 -262
  138. package/templates/events-meetups/l10n/ja.json +218 -262
  139. package/templates/events-meetups/l10n/ko.json +218 -262
  140. package/templates/events-meetups/l10n/lt.json +218 -262
  141. package/templates/events-meetups/l10n/nl.json +218 -262
  142. package/templates/events-meetups/l10n/no.json +218 -262
  143. package/templates/events-meetups/l10n/pl.json +218 -262
  144. package/templates/events-meetups/l10n/pt.json +218 -262
  145. package/templates/events-meetups/l10n/ru.json +218 -262
  146. package/templates/events-meetups/l10n/sv.json +218 -262
  147. package/templates/events-meetups/l10n/th.json +218 -262
  148. package/templates/events-meetups/l10n/tr.json +218 -262
  149. package/templates/events-meetups/l10n/uk.json +218 -262
  150. package/templates/events-meetups/l10n/vi.json +218 -262
  151. package/templates/events-meetups/l10n/zh.json +218 -262
  152. package/templates/events-meetups/tier5-src/_shared/member-account-routes.ts +7 -3
  153. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  154. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  155. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  156. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  157. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  158. package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  159. package/templates/fitness-gym/tier5-src/_shared/member-account-routes.ts +7 -3
  160. package/templates/gym-fitness/config.ts +29 -1
  161. package/templates/gym-fitness/dev/index.ts +3711 -1514
  162. package/templates/gym-fitness/himalaya.content.json +13 -1
  163. package/templates/gym-fitness/l10n/ar.json +226 -264
  164. package/templates/gym-fitness/l10n/cs.json +226 -264
  165. package/templates/gym-fitness/l10n/da.json +226 -264
  166. package/templates/gym-fitness/l10n/de.json +226 -264
  167. package/templates/gym-fitness/l10n/el.json +226 -264
  168. package/templates/gym-fitness/l10n/en.json +161 -202
  169. package/templates/gym-fitness/l10n/es.json +226 -264
  170. package/templates/gym-fitness/l10n/fi.json +226 -264
  171. package/templates/gym-fitness/l10n/fr.json +227 -265
  172. package/templates/gym-fitness/l10n/he.json +186 -217
  173. package/templates/gym-fitness/l10n/hu.json +226 -264
  174. package/templates/gym-fitness/l10n/id.json +226 -264
  175. package/templates/gym-fitness/l10n/it.json +226 -264
  176. package/templates/gym-fitness/l10n/ja.json +226 -264
  177. package/templates/gym-fitness/l10n/ko.json +226 -264
  178. package/templates/gym-fitness/l10n/lt.json +226 -264
  179. package/templates/gym-fitness/l10n/nl.json +226 -264
  180. package/templates/gym-fitness/l10n/no.json +226 -264
  181. package/templates/gym-fitness/l10n/pl.json +226 -264
  182. package/templates/gym-fitness/l10n/pt.json +226 -264
  183. package/templates/gym-fitness/l10n/ru.json +226 -264
  184. package/templates/gym-fitness/l10n/sv.json +226 -264
  185. package/templates/gym-fitness/l10n/th.json +226 -264
  186. package/templates/gym-fitness/l10n/tr.json +226 -264
  187. package/templates/gym-fitness/l10n/uk.json +226 -264
  188. package/templates/gym-fitness/l10n/vi.json +226 -264
  189. package/templates/gym-fitness/l10n/zh.json +226 -264
  190. package/templates/gym-fitness/tier5-src/_shared/member-account-routes.ts +7 -3
  191. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  192. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  193. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  194. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  195. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  196. package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  197. package/templates/medical-services/tier5-src/_shared/member-account-routes.ts +7 -3
  198. package/templates/nonprofit-cause/config.ts +29 -1
  199. package/templates/nonprofit-cause/dev/index.ts +3719 -1522
  200. package/templates/nonprofit-cause/himalaya.content.json +13 -1
  201. package/templates/nonprofit-cause/l10n/ar.json +218 -262
  202. package/templates/nonprofit-cause/l10n/cs.json +218 -262
  203. package/templates/nonprofit-cause/l10n/da.json +218 -262
  204. package/templates/nonprofit-cause/l10n/de.json +218 -262
  205. package/templates/nonprofit-cause/l10n/el.json +218 -262
  206. package/templates/nonprofit-cause/l10n/en.json +145 -193
  207. package/templates/nonprofit-cause/l10n/es.json +218 -262
  208. package/templates/nonprofit-cause/l10n/fi.json +218 -262
  209. package/templates/nonprofit-cause/l10n/fr.json +218 -262
  210. package/templates/nonprofit-cause/l10n/he.json +180 -216
  211. package/templates/nonprofit-cause/l10n/hu.json +218 -262
  212. package/templates/nonprofit-cause/l10n/id.json +218 -262
  213. package/templates/nonprofit-cause/l10n/it.json +218 -262
  214. package/templates/nonprofit-cause/l10n/ja.json +218 -262
  215. package/templates/nonprofit-cause/l10n/ko.json +218 -262
  216. package/templates/nonprofit-cause/l10n/lt.json +218 -262
  217. package/templates/nonprofit-cause/l10n/nl.json +218 -262
  218. package/templates/nonprofit-cause/l10n/no.json +218 -262
  219. package/templates/nonprofit-cause/l10n/pl.json +218 -262
  220. package/templates/nonprofit-cause/l10n/pt.json +218 -262
  221. package/templates/nonprofit-cause/l10n/ru.json +218 -262
  222. package/templates/nonprofit-cause/l10n/sv.json +218 -262
  223. package/templates/nonprofit-cause/l10n/th.json +218 -262
  224. package/templates/nonprofit-cause/l10n/tr.json +218 -262
  225. package/templates/nonprofit-cause/l10n/uk.json +218 -262
  226. package/templates/nonprofit-cause/l10n/vi.json +218 -262
  227. package/templates/nonprofit-cause/l10n/zh.json +218 -262
  228. package/templates/nonprofit-cause/tier5-src/_shared/member-account-routes.ts +7 -3
  229. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  230. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  231. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  232. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  233. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  234. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  235. package/templates/personal-fitness-trainer/config.ts +30 -2
  236. package/templates/personal-fitness-trainer/dev/index.ts +3698 -1476
  237. package/templates/personal-fitness-trainer/himalaya.content.json +13 -1
  238. package/templates/personal-fitness-trainer/tier5-src/_shared/member-account-routes.ts +7 -3
  239. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  240. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  241. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  242. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  243. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  244. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  245. package/templates/podcast-creator/config.ts +29 -1
  246. package/templates/podcast-creator/dev/index.ts +3718 -1521
  247. package/templates/podcast-creator/himalaya.content.json +13 -1
  248. package/templates/podcast-creator/l10n/ar.json +224 -262
  249. package/templates/podcast-creator/l10n/cs.json +224 -262
  250. package/templates/podcast-creator/l10n/da.json +224 -262
  251. package/templates/podcast-creator/l10n/de.json +224 -262
  252. package/templates/podcast-creator/l10n/el.json +224 -262
  253. package/templates/podcast-creator/l10n/en.json +152 -193
  254. package/templates/podcast-creator/l10n/es.json +224 -262
  255. package/templates/podcast-creator/l10n/fi.json +224 -262
  256. package/templates/podcast-creator/l10n/fr.json +227 -265
  257. package/templates/podcast-creator/l10n/he.json +185 -216
  258. package/templates/podcast-creator/l10n/hu.json +224 -262
  259. package/templates/podcast-creator/l10n/id.json +224 -262
  260. package/templates/podcast-creator/l10n/it.json +224 -262
  261. package/templates/podcast-creator/l10n/ja.json +224 -262
  262. package/templates/podcast-creator/l10n/ko.json +224 -262
  263. package/templates/podcast-creator/l10n/lt.json +224 -262
  264. package/templates/podcast-creator/l10n/nl.json +224 -262
  265. package/templates/podcast-creator/l10n/no.json +224 -262
  266. package/templates/podcast-creator/l10n/pl.json +224 -262
  267. package/templates/podcast-creator/l10n/pt.json +224 -262
  268. package/templates/podcast-creator/l10n/ru.json +224 -262
  269. package/templates/podcast-creator/l10n/sv.json +224 -262
  270. package/templates/podcast-creator/l10n/th.json +224 -262
  271. package/templates/podcast-creator/l10n/tr.json +224 -262
  272. package/templates/podcast-creator/l10n/uk.json +224 -262
  273. package/templates/podcast-creator/l10n/vi.json +224 -262
  274. package/templates/podcast-creator/l10n/zh.json +224 -262
  275. package/templates/podcast-creator/tier5-src/_shared/member-account-routes.ts +7 -3
  276. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  277. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  278. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  279. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  280. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  281. package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  282. package/templates/portfolio-creative/config.ts +29 -1
  283. package/templates/portfolio-creative/dev/index.ts +3708 -1511
  284. package/templates/portfolio-creative/himalaya.content.json +13 -1
  285. package/templates/portfolio-creative/l10n/ar.json +226 -264
  286. package/templates/portfolio-creative/l10n/cs.json +226 -264
  287. package/templates/portfolio-creative/l10n/da.json +226 -264
  288. package/templates/portfolio-creative/l10n/de.json +226 -264
  289. package/templates/portfolio-creative/l10n/el.json +226 -264
  290. package/templates/portfolio-creative/l10n/en.json +155 -196
  291. package/templates/portfolio-creative/l10n/es.json +226 -264
  292. package/templates/portfolio-creative/l10n/fi.json +226 -264
  293. package/templates/portfolio-creative/l10n/fr.json +226 -264
  294. package/templates/portfolio-creative/l10n/he.json +186 -217
  295. package/templates/portfolio-creative/l10n/hu.json +226 -264
  296. package/templates/portfolio-creative/l10n/id.json +226 -264
  297. package/templates/portfolio-creative/l10n/it.json +226 -264
  298. package/templates/portfolio-creative/l10n/ja.json +226 -264
  299. package/templates/portfolio-creative/l10n/ko.json +226 -264
  300. package/templates/portfolio-creative/l10n/lt.json +226 -264
  301. package/templates/portfolio-creative/l10n/nl.json +226 -264
  302. package/templates/portfolio-creative/l10n/no.json +226 -264
  303. package/templates/portfolio-creative/l10n/pl.json +226 -264
  304. package/templates/portfolio-creative/l10n/pt.json +226 -264
  305. package/templates/portfolio-creative/l10n/ru.json +226 -264
  306. package/templates/portfolio-creative/l10n/sv.json +226 -264
  307. package/templates/portfolio-creative/l10n/th.json +226 -264
  308. package/templates/portfolio-creative/l10n/tr.json +226 -264
  309. package/templates/portfolio-creative/l10n/uk.json +226 -264
  310. package/templates/portfolio-creative/l10n/vi.json +226 -264
  311. package/templates/portfolio-creative/l10n/zh.json +226 -264
  312. package/templates/portfolio-creative/tier5-src/_shared/member-account-routes.ts +7 -3
  313. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  314. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  315. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  316. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  317. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  318. package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  319. package/templates/restaurant/config.ts +29 -1
  320. package/templates/restaurant/dev/index.ts +3706 -1509
  321. package/templates/restaurant/himalaya.content.json +13 -1
  322. package/templates/restaurant/l10n/ar.json +226 -264
  323. package/templates/restaurant/l10n/cs.json +226 -264
  324. package/templates/restaurant/l10n/da.json +226 -264
  325. package/templates/restaurant/l10n/de.json +226 -264
  326. package/templates/restaurant/l10n/el.json +226 -264
  327. package/templates/restaurant/l10n/en.json +152 -193
  328. package/templates/restaurant/l10n/es.json +226 -264
  329. package/templates/restaurant/l10n/fi.json +226 -264
  330. package/templates/restaurant/l10n/fr.json +226 -264
  331. package/templates/restaurant/l10n/he.json +186 -217
  332. package/templates/restaurant/l10n/hu.json +226 -264
  333. package/templates/restaurant/l10n/id.json +226 -264
  334. package/templates/restaurant/l10n/it.json +226 -264
  335. package/templates/restaurant/l10n/ja.json +226 -264
  336. package/templates/restaurant/l10n/ko.json +226 -264
  337. package/templates/restaurant/l10n/lt.json +226 -264
  338. package/templates/restaurant/l10n/nl.json +226 -264
  339. package/templates/restaurant/l10n/no.json +226 -264
  340. package/templates/restaurant/l10n/pl.json +226 -264
  341. package/templates/restaurant/l10n/pt.json +226 -264
  342. package/templates/restaurant/l10n/ru.json +226 -264
  343. package/templates/restaurant/l10n/sv.json +226 -264
  344. package/templates/restaurant/l10n/th.json +226 -264
  345. package/templates/restaurant/l10n/tr.json +226 -264
  346. package/templates/restaurant/l10n/uk.json +226 -264
  347. package/templates/restaurant/l10n/vi.json +226 -264
  348. package/templates/restaurant/l10n/zh.json +226 -264
  349. package/templates/restaurant/tier5-src/_shared/member-account-routes.ts +7 -3
  350. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  351. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  352. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  353. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  354. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  355. package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  356. package/templates/retail-store/config.ts +29 -1
  357. package/templates/retail-store/dev/index.ts +3708 -1511
  358. package/templates/retail-store/himalaya.content.json +13 -1
  359. package/templates/retail-store/l10n/ar.json +226 -270
  360. package/templates/retail-store/l10n/cs.json +226 -270
  361. package/templates/retail-store/l10n/da.json +226 -270
  362. package/templates/retail-store/l10n/de.json +226 -270
  363. package/templates/retail-store/l10n/el.json +226 -270
  364. package/templates/retail-store/l10n/en.json +154 -202
  365. package/templates/retail-store/l10n/es.json +226 -270
  366. package/templates/retail-store/l10n/fi.json +226 -270
  367. package/templates/retail-store/l10n/fr.json +226 -270
  368. package/templates/retail-store/l10n/he.json +186 -222
  369. package/templates/retail-store/l10n/hu.json +226 -270
  370. package/templates/retail-store/l10n/id.json +226 -270
  371. package/templates/retail-store/l10n/it.json +226 -270
  372. package/templates/retail-store/l10n/ja.json +226 -270
  373. package/templates/retail-store/l10n/ko.json +226 -270
  374. package/templates/retail-store/l10n/lt.json +226 -270
  375. package/templates/retail-store/l10n/nl.json +226 -270
  376. package/templates/retail-store/l10n/no.json +226 -270
  377. package/templates/retail-store/l10n/pl.json +226 -270
  378. package/templates/retail-store/l10n/pt.json +226 -270
  379. package/templates/retail-store/l10n/ru.json +226 -270
  380. package/templates/retail-store/l10n/sv.json +226 -270
  381. package/templates/retail-store/l10n/th.json +226 -270
  382. package/templates/retail-store/l10n/tr.json +226 -270
  383. package/templates/retail-store/l10n/uk.json +226 -270
  384. package/templates/retail-store/l10n/vi.json +226 -270
  385. package/templates/retail-store/l10n/zh.json +226 -270
  386. package/templates/retail-store/tier5-src/_shared/member-account-routes.ts +7 -3
  387. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  388. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  389. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  390. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  391. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  392. package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
  393. package/templates/salon-spa/tier5-src/_shared/member-account-routes.ts +7 -3
  394. package/templates/wholesale-store/tier5-src/_shared/member-account-routes.ts +7 -3
  395. package/templates/yoga-studio/config.ts +29 -1
  396. package/templates/yoga-studio/dev/index.ts +3705 -1508
  397. package/templates/yoga-studio/himalaya.content.json +13 -1
  398. package/templates/yoga-studio/l10n/ar.json +224 -262
  399. package/templates/yoga-studio/l10n/cs.json +224 -262
  400. package/templates/yoga-studio/l10n/da.json +224 -262
  401. package/templates/yoga-studio/l10n/de.json +224 -262
  402. package/templates/yoga-studio/l10n/el.json +224 -262
  403. package/templates/yoga-studio/l10n/en.json +159 -200
  404. package/templates/yoga-studio/l10n/es.json +224 -262
  405. package/templates/yoga-studio/l10n/fi.json +224 -262
  406. package/templates/yoga-studio/l10n/fr.json +225 -263
  407. package/templates/yoga-studio/l10n/he.json +185 -216
  408. package/templates/yoga-studio/l10n/hu.json +224 -262
  409. package/templates/yoga-studio/l10n/id.json +224 -262
  410. package/templates/yoga-studio/l10n/it.json +224 -262
  411. package/templates/yoga-studio/l10n/ja.json +224 -262
  412. package/templates/yoga-studio/l10n/ko.json +224 -262
  413. package/templates/yoga-studio/l10n/lt.json +224 -262
  414. package/templates/yoga-studio/l10n/nl.json +224 -262
  415. package/templates/yoga-studio/l10n/no.json +224 -262
  416. package/templates/yoga-studio/l10n/pl.json +224 -262
  417. package/templates/yoga-studio/l10n/pt.json +224 -262
  418. package/templates/yoga-studio/l10n/ru.json +224 -262
  419. package/templates/yoga-studio/l10n/sv.json +224 -262
  420. package/templates/yoga-studio/l10n/th.json +224 -262
  421. package/templates/yoga-studio/l10n/tr.json +224 -262
  422. package/templates/yoga-studio/l10n/uk.json +224 -262
  423. package/templates/yoga-studio/l10n/vi.json +224 -262
  424. package/templates/yoga-studio/l10n/zh.json +224 -262
  425. package/templates/yoga-studio/tier5-src/_shared/member-account-routes.ts +7 -3
  426. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
  427. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
  428. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
  429. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
  430. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
  431. package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
@@ -0,0 +1,139 @@
1
+ // Privacy — the Public profile switch and the blocked members list. The switch saves at once
2
+ // (joinCommunity / leaveCommunity), so this modal has no Save. Turning it off asks first, because
3
+ // the member also leaves the site's community; turning it on does not. A member record with no
4
+ // privacy status shows no switch, only a notice.
5
+ import { defineService } from "@himalaya/state";
6
+ import { alert } from "@himalaya/ui";
7
+ import { getMyMember, joinCommunity, leaveCommunity } from "@himalaya/wix-members";
8
+ import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
9
+ import { svc as blockedMembers } from "./blocked-members.js";
10
+ import {
11
+ businessNameOf, clean, fetchMember, isSignedOut, loadErrorVariant, sameAccess, signedOutError, type WixMemberResponse,
12
+ } from "./shared.js";
13
+
14
+ interface S {
15
+ phase: "loading" | "ready" | "error" | "signedOut";
16
+ errorVariant: "offline" | "server";
17
+ memberId: string;
18
+ memberEmail: string;
19
+ memberScope: string;
20
+ businessName: string;
21
+ /** "Choose if other members of {business} can see your profile." */
22
+ description: string;
23
+ /** The API returned PUBLIC or PRIVATE. Otherwise the switch is replaced by a notice. */
24
+ privacyKnown: boolean;
25
+ privacyUnknown: boolean;
26
+ isPublic: boolean;
27
+ statusLine: string;
28
+ busy: boolean;
29
+ /** A switch change that did not save. */
30
+ errorText: string;
31
+ noErrorText: boolean;
32
+ }
33
+
34
+ const EMPTY: S = {
35
+ phase: "loading", errorVariant: "server", memberId: "", memberEmail: "", memberScope: "", businessName: "",
36
+ description: "", privacyKnown: false, privacyUnknown: true, isPublic: false, statusLine: "", busy: false,
37
+ errorText: "", noErrorText: true,
38
+ };
39
+
40
+ function statusLine(isPublic: boolean): string {
41
+ return isPublic
42
+ ? copyParam("accountSettings.publicProfileOn", "Other members can see your profile.")
43
+ : copyParam("accountSettings.publicProfileOff", "Only you can see your profile.");
44
+ }
45
+
46
+ function withStatus(s: S, privacyStatus: unknown): S {
47
+ const status = clean(privacyStatus).toUpperCase();
48
+ const known = status === "PUBLIC" || status === "PRIVATE";
49
+ const isPublic = status === "PUBLIC";
50
+ return { ...s, privacyKnown: known, privacyUnknown: !known, isPublic, statusLine: known ? statusLine(isPublic) : "" };
51
+ }
52
+
53
+ let loadVersion = 0;
54
+ let mutationInFlight = false;
55
+ /** The member moved the switch again while a change was saving. That move is not saved, so the
56
+ * switch must be drawn again from the result, or it keeps showing the dropped position. */
57
+ let flipDropped = false;
58
+
59
+ const svc = defineService<S, {
60
+ load: (s: S, arg?: unknown) => Promise<S>;
61
+ showLoading: (s: S) => S;
62
+ begin: (s: S, patch: Partial<S>) => S;
63
+ setPublic: (s: S, arg?: unknown) => Promise<S | undefined>;
64
+ }>("himiBrandedAccountPrivacy", {
65
+ state: { ...EMPTY },
66
+ notHydrated: Object.keys(EMPTY) as (keyof S)[],
67
+ notPersisted: Object.keys(EMPTY) as (keyof S)[],
68
+ actions: {
69
+ showLoading: (s) => ({ ...EMPTY, businessName: s.businessName, description: s.description }),
70
+ begin: (s, patch) => ({ ...s, ...patch, noErrorText: !(patch.errorText ?? s.errorText) }),
71
+ load: async (_s, arg): Promise<S> => {
72
+ const version = ++loadVersion;
73
+ stashCopy(arg);
74
+ const businessName = businessNameOf(arg) || svc.getState().businessName;
75
+ const description = copyTemplate("accountSettings.privacyDescription", "Choose if other members of {business} can see your profile.", { business: businessName });
76
+ if (svc.getState().phase !== "loading") await svc.showLoading();
77
+ // The blocked members section loads with the modal; its own onAppear does the same on a device.
78
+ void blockedMembers.load(arg).catch(() => undefined);
79
+ try {
80
+ const { member, email, scope } = await fetchMember();
81
+ if (version !== loadVersion) return svc.getState();
82
+ return withStatus({ ...EMPTY, phase: "ready", memberId: clean(member.id), memberEmail: email, memberScope: scope, businessName, description }, member.privacyStatus);
83
+ } catch (error) {
84
+ if (version !== loadVersion) return svc.getState();
85
+ return { ...EMPTY, businessName, description, phase: isSignedOut(error) ? "signedOut" : "error", errorVariant: loadErrorVariant(error) };
86
+ }
87
+ },
88
+ setPublic: async (s, arg): Promise<S | undefined> => {
89
+ if (s.phase !== "ready" || !s.privacyKnown || !s.memberId) return undefined;
90
+ if (mutationInFlight) { flipDropped = true; return undefined; }
91
+ const value = (arg as { value?: unknown } | undefined)?.value;
92
+ const wantPublic = value === true || value === "true";
93
+ if (wantPublic === s.isPublic) return undefined;
94
+ flipDropped = false;
95
+ // Draw the switch from `final`; after a dropped move, flip it first so the host redraws it.
96
+ const settle = async (final: S): Promise<S> => {
97
+ if (flipDropped) { flipDropped = false; await svc.begin({ isPublic: !final.isPublic }); }
98
+ return final;
99
+ };
100
+ mutationInFlight = true;
101
+ try {
102
+ // The switch already moved: follow it, so that a Cancel below moves it back.
103
+ await svc.begin({ isPublic: wantPublic, errorText: "" });
104
+ if (!wantPublic) {
105
+ let confirmed = false;
106
+ try {
107
+ const answer = await alert({
108
+ title: copyParam("accountSettings.makePrivateTitle", "Make your profile private?"),
109
+ message: copyTemplate("accountSettings.makePrivateBody", "Other members can't see your profile. You also leave the community of {business}.", { business: s.businessName }),
110
+ confirmLabel: copyParam("accountSettings.makePrivateConfirm", "Make private"),
111
+ cancelLabel: copyParam("common.cancelCta", "Cancel"),
112
+ });
113
+ confirmed = answer.confirmed;
114
+ } catch { /* no presenter: nothing was confirmed */ }
115
+ // Cancel: the switch and its status line go back to public together.
116
+ if (!confirmed) return await settle({ ...svc.getState(), isPublic: true, statusLine: statusLine(true) });
117
+ }
118
+ await svc.begin({ busy: true });
119
+ if (!(await sameAccess(s.memberEmail, s.memberScope))) throw signedOutError();
120
+ const response = wantPublic ? await joinCommunity() : await leaveCommunity();
121
+ if (response.member?.id !== s.memberId || !response.member.privacyStatus) throw new Error("The profile privacy update was not confirmed for this member.");
122
+ const refreshed = await getMyMember({ fieldsets: ["FULL"] }) as WixMemberResponse;
123
+ if (refreshed.member?.id !== s.memberId || !(await sameAccess(s.memberEmail, s.memberScope))) throw signedOutError();
124
+ // A stale read or a rejected write leaves the OLD status in the readback: that is not a save.
125
+ const status = clean(refreshed.member.privacyStatus).toUpperCase();
126
+ if (status !== (wantPublic ? "PUBLIC" : "PRIVATE")) throw new Error("The profile privacy update was not confirmed by the readback.");
127
+ return await settle({ ...withStatus(svc.getState(), status), busy: false, errorText: "", noErrorText: true });
128
+ } catch (error) {
129
+ // The member changed mid-save: show none of the previous member's privacy, only Sign in.
130
+ if (isSignedOut(error)) return { ...EMPTY, businessName: s.businessName, description: s.description, phase: "signedOut" };
131
+ const latest = svc.getState();
132
+ return await settle({ ...latest, isPublic: s.isPublic, statusLine: statusLine(s.isPublic), busy: false,
133
+ errorText: copyParam("accountSettings.privacyError", "Your privacy setting was not updated."), noErrorText: false });
134
+ } finally { mutationInFlight = false; }
135
+ },
136
+ },
137
+ });
138
+
139
+ export { svc as privacy };
@@ -0,0 +1,136 @@
1
+ // Shared by the Account settings menu and its three modals (Personal info, Login info with its
2
+ // Change password step, Privacy). Each modal is its own screen, so each boots this bundle in its
3
+ // own worker and loads the member itself: nothing here is shared state, only the checks.
4
+ import { dispatch } from "@himalaya/dispatch";
5
+ import { classifyLoadError } from "@himalaya/state";
6
+ import { getMyMember } from "@himalaya/wix-members";
7
+ import { getMyData } from "@himalaya/wix-users";
8
+ import { hostSiteFromInput } from "../_shared/branded-lite-hosted.js";
9
+ import { memberAccess } from "../_shared/member-access.js";
10
+ import type { MemberAccountRoutes } from "../_shared/member-account-routes.js";
11
+
12
+ export type WixMemberRecord = {
13
+ id?: string;
14
+ loginEmail?: string;
15
+ contact?: {
16
+ firstName?: string;
17
+ lastName?: string;
18
+ phones?: string[];
19
+ birthdate?: string;
20
+ company?: string;
21
+ jobTitle?: string;
22
+ customFields?: Record<string, { name?: string; value?: unknown } | undefined>;
23
+ };
24
+ profile?: { nickname?: string; title?: string; slug?: string; photo?: { id?: string; url?: string } };
25
+ privacyStatus?: string;
26
+ };
27
+ export type WixMemberResponse = { member?: WixMemberRecord };
28
+
29
+ export function rawText(value: unknown): string { return typeof value === "string" ? value : ""; }
30
+ export function clean(value: unknown): string { return rawText(value).trim(); }
31
+
32
+ export function signedOutError(): Error {
33
+ return Object.assign(new Error("signed_out"), { code: "signed_out" });
34
+ }
35
+ export function isSignedOut(error: unknown): boolean {
36
+ return (error as { code?: string } | null)?.code === "signed_out";
37
+ }
38
+
39
+ /** The load-error variant the modals' ErrorState draws: `offline` only when the request never left. */
40
+ export function loadErrorVariant(error: unknown): "offline" | "server" {
41
+ return classifyLoadError(error) === "offline" ? "offline" : "server";
42
+ }
43
+
44
+ /** The site a hosted build was opened for (`himalaya.input.__himiHostSite`), or "" when the build
45
+ * is not hosted. A hosted build serves many businesses, so this wins over the build's own name. */
46
+ export const hostedBusinessName = clean(hostSiteFromInput((globalThis as { himalaya?: { input?: unknown } }).himalaya?.input)?.name);
47
+
48
+ /** The business name each modal shows as its subtitle and in its copy: the hosted site's, else the
49
+ * descriptor param (the build's own business). */
50
+ export function businessNameOf(arg: unknown): string {
51
+ return hostedBusinessName || clean((arg as { businessName?: unknown } | undefined)?.businessName);
52
+ }
53
+
54
+ /** The signed-in member's own record, read with the member's token, and the identity it was read for. */
55
+ export async function fetchMember(siteUrlInput?: unknown): Promise<{ email: string; scope: string; siteUrl: string; member: WixMemberRecord & { id: string } }> {
56
+ const access = await memberAccess();
57
+ if (!access.email) throw signedOutError();
58
+ const response = await getMyMember({ fieldsets: ["FULL"] }) as WixMemberResponse;
59
+ if (!response.member?.id) throw new Error("The signed-in member profile is unavailable.");
60
+ const after = await memberAccess();
61
+ if (!after.email || after.email !== access.email || after.scope !== access.scope) throw signedOutError();
62
+ const siteUrl = clean(siteUrlInput).replace(/\/$/, "");
63
+ return { email: access.email, scope: access.scope, siteUrl, member: response.member as WixMemberRecord & { id: string } };
64
+ }
65
+
66
+ /** The same member is still signed in, by email, scope and member id. */
67
+ export async function currentMemberRecordMatches(email: string, scope: string, memberId: string): Promise<boolean> {
68
+ const before = await memberAccess();
69
+ if (!before.email || before.email !== email || before.scope !== scope) return false;
70
+ const response = await getMyMember({ fieldsets: ["FULL"] }) as WixMemberResponse;
71
+ const after = await memberAccess();
72
+ return response.member?.id === memberId && after.email === email && after.scope === scope;
73
+ }
74
+
75
+ /** Who is signed in: a member, nobody, or `unavailable` when the host could not say at all.
76
+ * `memberAccess()` reads both failures as "nobody"; the menu must not ask a member to sign in
77
+ * because the identity read failed. Older hosts without `memberIdentity` answer through
78
+ * wix-users (the same rung memberAccess uses); a host that fails both ways is unavailable. */
79
+ export async function memberIdentityState(): Promise<"member" | "guest" | "unavailable"> {
80
+ let raw: unknown;
81
+ let unavailable = false;
82
+ try { raw = await dispatch("himi.wix.memberIdentity"); }
83
+ catch { unavailable = true; }
84
+ const value = raw as { email?: unknown; signedIn?: unknown; payload?: { email?: unknown; signedIn?: unknown } } | null;
85
+ // A host can say a member is signed in before it has the email.
86
+ if (clean(value?.email ?? value?.payload?.email) || (value?.signedIn ?? value?.payload?.signedIn) === true) return "member";
87
+ if (!unavailable) return "guest";
88
+ try {
89
+ const profile = await getMyData();
90
+ return clean(profile.email ?? profile.contactEmail) ? "member" : "guest";
91
+ } catch {
92
+ return "unavailable";
93
+ }
94
+ }
95
+
96
+ /** Same identity by email and scope alone (no network). */
97
+ export async function sameAccess(email: string, scope: string): Promise<boolean> {
98
+ const current = await memberAccess();
99
+ return !!current.email && current.email === email && current.scope === scope;
100
+ }
101
+
102
+ /** An http(s) URL split at its authority (between `//` and the first `/`, `?` or `#`). A worker has
103
+ * no URL global, so the authority is split by hand. */
104
+ const HTTP_URL = /^https?:\/\/([^/?#]*)(?:[/?#]\S*)?$/i;
105
+ /** A website handoff needs a real http(s) site: the documented placeholder (example.com) never counts,
106
+ * and neither does a URL with userinfo (`https://shop.acme.com@evil.example` opens evil.example). */
107
+ export function siteHandoffAvailable(siteUrl: string): boolean {
108
+ const match = HTTP_URL.exec(siteUrl);
109
+ if (!match || siteUrl.includes("\\")) return false;
110
+ const authority = match[1];
111
+ if (authority.includes("@")) return false;
112
+ const host = authority.replace(/:\d+$/, "").toLowerCase();
113
+ if (!host || /[\s:]/.test(host)) return false;
114
+ return host !== "example.com" && !host.endsWith(".example.com");
115
+ }
116
+
117
+ export function memberInitials(firstName: string, lastName: string, nickname: string): string {
118
+ return ([firstName[0], lastName[0]].filter(Boolean).join("") || nickname.slice(0, 1) || "M").toUpperCase();
119
+ }
120
+
121
+ /** Login info's Password section.
122
+ * - `row`: this app changes the password (a native app on HimalayaCore 1.5.0 or later).
123
+ * - `notice-preview`: the web host, a preview of the app.
124
+ * - `notice-here`: inside another Wix app, an older binary, or an unknown platform and version. */
125
+ export type PasswordMode = "row" | "notice-preview" | "notice-here";
126
+ export function passwordMode(routes: Pick<MemberAccountRoutes, "passwordCredentials" | "webPreview">): PasswordMode {
127
+ if (routes.passwordCredentials) return "row";
128
+ return routes.webPreview ? "notice-preview" : "notice-here";
129
+ }
130
+
131
+ /** The case the Password section draws: the mode, and for a notice whether it links the website. */
132
+ export function passwordCase(mode: PasswordMode, siteLink: boolean): string {
133
+ if (mode === "row") return "row";
134
+ const base = mode === "notice-preview" ? "preview" : "here";
135
+ return siteLink ? `${base}-link` : base;
136
+ }
@@ -38,15 +38,19 @@ export interface MemberAccountRoutes {
38
38
  mediaField: boolean;
39
39
  /** Password credential actions introduced in HimalayaCore 1.5.0. */
40
40
  passwordCredentials: boolean;
41
+ /** The web host: a preview of the app, never a member's real device. Account settings say
42
+ * "in preview mode" there, and "here" in every other case it cannot change a password. */
43
+ webPreview: boolean;
41
44
  }
42
45
 
43
46
  export async function memberAccountRoutes(): Promise<MemberAccountRoutes> {
44
- if (isHostedWorker()) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false };
45
47
  const info = await getAppInfo().catch(() => undefined);
46
- if (!info) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false };
48
+ // A hosted app reaches none of these routes, but a hosted web build is still a preview.
49
+ if (isHostedWorker()) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false, webPreview: info?.platform === "web" };
50
+ if (!info) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false, webPreview: false };
47
51
  const native = info.platform === "ios" || info.platform === "android" || info.platform === "macos";
48
52
  const addresses = native && atLeast(info.binaryVersion ?? "", MEMBER_ACCOUNT_ROUTES_MIN_BINARY);
49
53
  const mediaField = native && atLeast(info.binaryVersion ?? "", MEMBER_MEDIA_FIELD_MIN_BINARY);
50
54
  const passwordCredentials = native && atLeast(info.binaryVersion ?? "", MEMBER_PASSWORD_ACTIONS_MIN_BINARY);
51
- return { addresses, wallet: addresses && info.memberSiteBound === true, mediaField, passwordCredentials };
55
+ return { addresses, wallet: addresses && info.memberSiteBound === true, mediaField, passwordCredentials, webPreview: info.platform === "web" };
52
56
  }
@@ -38,15 +38,19 @@ export interface MemberAccountRoutes {
38
38
  mediaField: boolean;
39
39
  /** Password credential actions introduced in HimalayaCore 1.5.0. */
40
40
  passwordCredentials: boolean;
41
+ /** The web host: a preview of the app, never a member's real device. Account settings say
42
+ * "in preview mode" there, and "here" in every other case it cannot change a password. */
43
+ webPreview: boolean;
41
44
  }
42
45
 
43
46
  export async function memberAccountRoutes(): Promise<MemberAccountRoutes> {
44
- if (isHostedWorker()) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false };
45
47
  const info = await getAppInfo().catch(() => undefined);
46
- if (!info) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false };
48
+ // A hosted app reaches none of these routes, but a hosted web build is still a preview.
49
+ if (isHostedWorker()) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false, webPreview: info?.platform === "web" };
50
+ if (!info) return { addresses: false, wallet: false, mediaField: false, passwordCredentials: false, webPreview: false };
47
51
  const native = info.platform === "ios" || info.platform === "android" || info.platform === "macos";
48
52
  const addresses = native && atLeast(info.binaryVersion ?? "", MEMBER_ACCOUNT_ROUTES_MIN_BINARY);
49
53
  const mediaField = native && atLeast(info.binaryVersion ?? "", MEMBER_MEDIA_FIELD_MIN_BINARY);
50
54
  const passwordCredentials = native && atLeast(info.binaryVersion ?? "", MEMBER_PASSWORD_ACTIONS_MIN_BINARY);
51
- return { addresses, wallet: addresses && info.memberSiteBound === true, mediaField, passwordCredentials };
55
+ return { addresses, wallet: addresses && info.memberSiteBound === true, mediaField, passwordCredentials, webPreview: info.platform === "web" };
52
56
  }
@@ -114,6 +114,34 @@ export default defineApp({
114
114
  "parentScreenId": "himi_account",
115
115
  "tabId": "profile"
116
116
  },
117
+ {
118
+ "screenId": "himi_account_personal_info",
119
+ "isPublic": false,
120
+ "paramKeys": [],
121
+ "parentScreenId": "himi_account_settings",
122
+ "tabId": "profile"
123
+ },
124
+ {
125
+ "screenId": "himi_account_login_info",
126
+ "isPublic": false,
127
+ "paramKeys": [],
128
+ "parentScreenId": "himi_account_settings",
129
+ "tabId": "profile"
130
+ },
131
+ {
132
+ "screenId": "himi_account_change_password",
133
+ "isPublic": false,
134
+ "paramKeys": [],
135
+ "parentScreenId": "himi_account_login_info",
136
+ "tabId": "profile"
137
+ },
138
+ {
139
+ "screenId": "himi_account_privacy",
140
+ "isPublic": false,
141
+ "paramKeys": [],
142
+ "parentScreenId": "himi_account_settings",
143
+ "tabId": "profile"
144
+ },
117
145
  {
118
146
  "screenId": "himi_view_profile",
119
147
  "isPublic": false,
@@ -125,7 +153,7 @@ export default defineApp({
125
153
  "screenId": "himi_delete_account",
126
154
  "isPublic": false,
127
155
  "paramKeys": [],
128
- "parentScreenId": "himi_account",
156
+ "parentScreenId": "himi_account_settings",
129
157
  "tabId": "profile"
130
158
  },
131
159
  {