@wix/himalaya-cli 0.1949.0 → 0.1951.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 (252) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/network/src/index.d.ts +22 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/sdk/sdk-types/src/capabilities.generated.d.ts +1 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/message-format.d.ts +1 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/schema.d.ts +10 -0
  5. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/validator.d.ts +37 -0
  6. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/audio-record.mjs +1 -1
  7. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calendar.mjs +1 -1
  8. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/calls.mjs +1 -1
  9. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/contacts.mjs +1 -1
  10. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +38 -1
  11. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/l10n.mjs +1 -8
  12. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/location.mjs +1 -1
  13. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/motion.mjs +1 -1
  14. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/network.mjs +19 -3
  15. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/photos.mjs +1 -1
  16. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +1 -8
  17. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdk-types.mjs +1 -1
  18. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/sdui.mjs +9 -0
  19. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/tasks.mjs +1 -1
  20. package/dist/browser-plane/assets.json +5 -5
  21. package/dist/browser-plane/preview-deferred/{a8cfd0e17359578587e8937e88dedd40b46d533f08b4d2fdac4c47d5bae6f385.bin → 15c152934a97a0d3de15946239a0037a38603f1972d2288b59945bd28a0fd237.bin} +1 -1
  22. package/dist/browser-plane/sw.js +7 -7
  23. package/dist/cli.mjs +206 -123
  24. package/dist/preview-assets.generated.bin +0 -0
  25. package/guides/component-index.md +1 -1
  26. package/guides/component-reference.json +1 -1
  27. package/guides/component-reference.md +4 -0
  28. package/guides/one-app-to-himi-app.md +7 -4
  29. package/guides/release-notes.md +11 -0
  30. package/guides/sdk-reference.json +28 -0
  31. package/guides/web-page-sdk-reference.md +1 -1
  32. package/package.json +2 -2
  33. package/templates/beauty-salon/tier5-src/_shared/member-bookings.ts +48 -1
  34. package/templates/beauty-salon/tier5-src/himi-booking-bookings/index.ts +10 -30
  35. package/templates/branded-lite/recipes/blog-list-thumb-start.json +56 -5
  36. package/templates/branded-lite/recipes/blog-list.json +56 -5
  37. package/templates/branded-lite/recipes/blog-see-all.json +1 -1
  38. package/templates/branded-lite/recipes/upcoming-bookings.json +87 -30
  39. package/templates/branded-lite/tier5-src/_shared/blog-list.ts +34 -10
  40. package/templates/branded-lite/tier5-src/_shared/member-bookings.ts +48 -1
  41. package/templates/branded-lite/tier5-src/_shared/upcoming-bookings-section.ts +27 -5
  42. package/templates/branded-lite/tier5-src/himi-booking-bookings/index.ts +10 -30
  43. package/templates/community-club/l10n/ar.json +44 -0
  44. package/templates/community-club/l10n/cs.json +44 -0
  45. package/templates/community-club/l10n/da.json +44 -0
  46. package/templates/community-club/l10n/de.json +44 -0
  47. package/templates/community-club/l10n/el.json +44 -0
  48. package/templates/community-club/l10n/en.json +27 -0
  49. package/templates/community-club/l10n/es.json +44 -0
  50. package/templates/community-club/l10n/fi.json +44 -0
  51. package/templates/community-club/l10n/fr.json +44 -0
  52. package/templates/community-club/l10n/he.json +36 -0
  53. package/templates/community-club/l10n/hu.json +44 -0
  54. package/templates/community-club/l10n/id.json +44 -0
  55. package/templates/community-club/l10n/it.json +44 -0
  56. package/templates/community-club/l10n/ja.json +44 -0
  57. package/templates/community-club/l10n/ko.json +44 -0
  58. package/templates/community-club/l10n/lt.json +44 -0
  59. package/templates/community-club/l10n/nl.json +44 -0
  60. package/templates/community-club/l10n/no.json +44 -0
  61. package/templates/community-club/l10n/pl.json +44 -0
  62. package/templates/community-club/l10n/pt.json +44 -0
  63. package/templates/community-club/l10n/ru.json +44 -0
  64. package/templates/community-club/l10n/sv.json +44 -0
  65. package/templates/community-club/l10n/th.json +44 -0
  66. package/templates/community-club/l10n/tr.json +44 -0
  67. package/templates/community-club/l10n/uk.json +44 -0
  68. package/templates/community-club/l10n/vi.json +44 -0
  69. package/templates/community-club/l10n/zh.json +44 -0
  70. package/templates/community-club/tier5-src/_shared/member-bookings.ts +48 -1
  71. package/templates/events-meetups/l10n/ar.json +44 -0
  72. package/templates/events-meetups/l10n/cs.json +44 -0
  73. package/templates/events-meetups/l10n/da.json +44 -0
  74. package/templates/events-meetups/l10n/de.json +44 -0
  75. package/templates/events-meetups/l10n/el.json +44 -0
  76. package/templates/events-meetups/l10n/en.json +27 -0
  77. package/templates/events-meetups/l10n/es.json +44 -0
  78. package/templates/events-meetups/l10n/fi.json +44 -0
  79. package/templates/events-meetups/l10n/fr.json +44 -0
  80. package/templates/events-meetups/l10n/he.json +36 -0
  81. package/templates/events-meetups/l10n/hu.json +44 -0
  82. package/templates/events-meetups/l10n/id.json +44 -0
  83. package/templates/events-meetups/l10n/it.json +44 -0
  84. package/templates/events-meetups/l10n/ja.json +44 -0
  85. package/templates/events-meetups/l10n/ko.json +44 -0
  86. package/templates/events-meetups/l10n/lt.json +44 -0
  87. package/templates/events-meetups/l10n/nl.json +44 -0
  88. package/templates/events-meetups/l10n/no.json +44 -0
  89. package/templates/events-meetups/l10n/pl.json +44 -0
  90. package/templates/events-meetups/l10n/pt.json +44 -0
  91. package/templates/events-meetups/l10n/ru.json +44 -0
  92. package/templates/events-meetups/l10n/sv.json +44 -0
  93. package/templates/events-meetups/l10n/th.json +44 -0
  94. package/templates/events-meetups/l10n/tr.json +44 -0
  95. package/templates/events-meetups/l10n/uk.json +44 -0
  96. package/templates/events-meetups/l10n/vi.json +44 -0
  97. package/templates/events-meetups/l10n/zh.json +44 -0
  98. package/templates/events-meetups/tier5-src/_shared/member-bookings.ts +48 -1
  99. package/templates/fitness-gym/tier5-src/_shared/member-bookings.ts +48 -1
  100. package/templates/fitness-gym/tier5-src/himi-booking-bookings/index.ts +10 -30
  101. package/templates/gym-fitness/tier5-src/_shared/member-bookings.ts +48 -1
  102. package/templates/gym-fitness/tier5-src/himi-booking-bookings/index.ts +10 -30
  103. package/templates/medical-services/tier5-src/_shared/member-bookings.ts +48 -1
  104. package/templates/medical-services/tier5-src/himi-booking-bookings/index.ts +10 -30
  105. package/templates/nonprofit-cause/l10n/ar.json +38 -0
  106. package/templates/nonprofit-cause/l10n/cs.json +38 -0
  107. package/templates/nonprofit-cause/l10n/da.json +38 -0
  108. package/templates/nonprofit-cause/l10n/de.json +38 -0
  109. package/templates/nonprofit-cause/l10n/el.json +38 -0
  110. package/templates/nonprofit-cause/l10n/en.json +20 -0
  111. package/templates/nonprofit-cause/l10n/es.json +38 -0
  112. package/templates/nonprofit-cause/l10n/fi.json +38 -0
  113. package/templates/nonprofit-cause/l10n/fr.json +38 -0
  114. package/templates/nonprofit-cause/l10n/he.json +31 -0
  115. package/templates/nonprofit-cause/l10n/hu.json +38 -0
  116. package/templates/nonprofit-cause/l10n/id.json +38 -0
  117. package/templates/nonprofit-cause/l10n/it.json +38 -0
  118. package/templates/nonprofit-cause/l10n/ja.json +38 -0
  119. package/templates/nonprofit-cause/l10n/ko.json +38 -0
  120. package/templates/nonprofit-cause/l10n/lt.json +38 -0
  121. package/templates/nonprofit-cause/l10n/nl.json +38 -0
  122. package/templates/nonprofit-cause/l10n/no.json +38 -0
  123. package/templates/nonprofit-cause/l10n/pl.json +38 -0
  124. package/templates/nonprofit-cause/l10n/pt.json +38 -0
  125. package/templates/nonprofit-cause/l10n/ru.json +38 -0
  126. package/templates/nonprofit-cause/l10n/sv.json +38 -0
  127. package/templates/nonprofit-cause/l10n/th.json +38 -0
  128. package/templates/nonprofit-cause/l10n/tr.json +38 -0
  129. package/templates/nonprofit-cause/l10n/uk.json +38 -0
  130. package/templates/nonprofit-cause/l10n/vi.json +38 -0
  131. package/templates/nonprofit-cause/l10n/zh.json +38 -0
  132. package/templates/nonprofit-cause/tier5-src/_shared/member-bookings.ts +48 -1
  133. package/templates/personal-fitness-trainer/tier5-src/_shared/member-bookings.ts +48 -1
  134. package/templates/personal-fitness-trainer/tier5-src/himi-booking-bookings/index.ts +10 -30
  135. package/templates/podcast-creator/l10n/ar.json +38 -0
  136. package/templates/podcast-creator/l10n/cs.json +38 -0
  137. package/templates/podcast-creator/l10n/da.json +38 -0
  138. package/templates/podcast-creator/l10n/de.json +38 -0
  139. package/templates/podcast-creator/l10n/el.json +38 -0
  140. package/templates/podcast-creator/l10n/en.json +20 -0
  141. package/templates/podcast-creator/l10n/es.json +38 -0
  142. package/templates/podcast-creator/l10n/fi.json +38 -0
  143. package/templates/podcast-creator/l10n/fr.json +38 -0
  144. package/templates/podcast-creator/l10n/he.json +31 -0
  145. package/templates/podcast-creator/l10n/hu.json +38 -0
  146. package/templates/podcast-creator/l10n/id.json +38 -0
  147. package/templates/podcast-creator/l10n/it.json +38 -0
  148. package/templates/podcast-creator/l10n/ja.json +38 -0
  149. package/templates/podcast-creator/l10n/ko.json +38 -0
  150. package/templates/podcast-creator/l10n/lt.json +38 -0
  151. package/templates/podcast-creator/l10n/nl.json +38 -0
  152. package/templates/podcast-creator/l10n/no.json +38 -0
  153. package/templates/podcast-creator/l10n/pl.json +38 -0
  154. package/templates/podcast-creator/l10n/pt.json +38 -0
  155. package/templates/podcast-creator/l10n/ru.json +38 -0
  156. package/templates/podcast-creator/l10n/sv.json +38 -0
  157. package/templates/podcast-creator/l10n/th.json +38 -0
  158. package/templates/podcast-creator/l10n/tr.json +38 -0
  159. package/templates/podcast-creator/l10n/uk.json +38 -0
  160. package/templates/podcast-creator/l10n/vi.json +38 -0
  161. package/templates/podcast-creator/l10n/zh.json +38 -0
  162. package/templates/podcast-creator/tier5-src/_shared/member-bookings.ts +48 -1
  163. package/templates/portfolio-creative/l10n/ar.json +38 -0
  164. package/templates/portfolio-creative/l10n/cs.json +38 -0
  165. package/templates/portfolio-creative/l10n/da.json +38 -0
  166. package/templates/portfolio-creative/l10n/de.json +38 -0
  167. package/templates/portfolio-creative/l10n/el.json +38 -0
  168. package/templates/portfolio-creative/l10n/en.json +20 -0
  169. package/templates/portfolio-creative/l10n/es.json +38 -0
  170. package/templates/portfolio-creative/l10n/fi.json +38 -0
  171. package/templates/portfolio-creative/l10n/fr.json +38 -0
  172. package/templates/portfolio-creative/l10n/he.json +31 -0
  173. package/templates/portfolio-creative/l10n/hu.json +38 -0
  174. package/templates/portfolio-creative/l10n/id.json +38 -0
  175. package/templates/portfolio-creative/l10n/it.json +38 -0
  176. package/templates/portfolio-creative/l10n/ja.json +38 -0
  177. package/templates/portfolio-creative/l10n/ko.json +38 -0
  178. package/templates/portfolio-creative/l10n/lt.json +38 -0
  179. package/templates/portfolio-creative/l10n/nl.json +38 -0
  180. package/templates/portfolio-creative/l10n/no.json +38 -0
  181. package/templates/portfolio-creative/l10n/pl.json +38 -0
  182. package/templates/portfolio-creative/l10n/pt.json +38 -0
  183. package/templates/portfolio-creative/l10n/ru.json +38 -0
  184. package/templates/portfolio-creative/l10n/sv.json +38 -0
  185. package/templates/portfolio-creative/l10n/th.json +38 -0
  186. package/templates/portfolio-creative/l10n/tr.json +38 -0
  187. package/templates/portfolio-creative/l10n/uk.json +38 -0
  188. package/templates/portfolio-creative/l10n/vi.json +38 -0
  189. package/templates/portfolio-creative/l10n/zh.json +38 -0
  190. package/templates/portfolio-creative/tier5-src/_shared/member-bookings.ts +48 -1
  191. package/templates/professional-services/tier5-src/_shared/member-bookings.ts +48 -1
  192. package/templates/professional-services/tier5-src/himi-booking-bookings/index.ts +10 -30
  193. package/templates/restaurant/l10n/ar.json +38 -0
  194. package/templates/restaurant/l10n/cs.json +38 -0
  195. package/templates/restaurant/l10n/da.json +38 -0
  196. package/templates/restaurant/l10n/de.json +38 -0
  197. package/templates/restaurant/l10n/el.json +38 -0
  198. package/templates/restaurant/l10n/en.json +20 -0
  199. package/templates/restaurant/l10n/es.json +38 -0
  200. package/templates/restaurant/l10n/fi.json +38 -0
  201. package/templates/restaurant/l10n/fr.json +38 -0
  202. package/templates/restaurant/l10n/he.json +31 -0
  203. package/templates/restaurant/l10n/hu.json +38 -0
  204. package/templates/restaurant/l10n/id.json +38 -0
  205. package/templates/restaurant/l10n/it.json +38 -0
  206. package/templates/restaurant/l10n/ja.json +38 -0
  207. package/templates/restaurant/l10n/ko.json +38 -0
  208. package/templates/restaurant/l10n/lt.json +38 -0
  209. package/templates/restaurant/l10n/nl.json +38 -0
  210. package/templates/restaurant/l10n/no.json +38 -0
  211. package/templates/restaurant/l10n/pl.json +38 -0
  212. package/templates/restaurant/l10n/pt.json +38 -0
  213. package/templates/restaurant/l10n/ru.json +38 -0
  214. package/templates/restaurant/l10n/sv.json +38 -0
  215. package/templates/restaurant/l10n/th.json +38 -0
  216. package/templates/restaurant/l10n/tr.json +38 -0
  217. package/templates/restaurant/l10n/uk.json +38 -0
  218. package/templates/restaurant/l10n/vi.json +38 -0
  219. package/templates/restaurant/l10n/zh.json +38 -0
  220. package/templates/restaurant/tier5-src/_shared/member-bookings.ts +48 -1
  221. package/templates/retail-store/l10n/ar.json +38 -0
  222. package/templates/retail-store/l10n/cs.json +38 -0
  223. package/templates/retail-store/l10n/da.json +38 -0
  224. package/templates/retail-store/l10n/de.json +38 -0
  225. package/templates/retail-store/l10n/el.json +38 -0
  226. package/templates/retail-store/l10n/en.json +20 -0
  227. package/templates/retail-store/l10n/es.json +38 -0
  228. package/templates/retail-store/l10n/fi.json +38 -0
  229. package/templates/retail-store/l10n/fr.json +38 -0
  230. package/templates/retail-store/l10n/he.json +31 -0
  231. package/templates/retail-store/l10n/hu.json +38 -0
  232. package/templates/retail-store/l10n/id.json +38 -0
  233. package/templates/retail-store/l10n/it.json +38 -0
  234. package/templates/retail-store/l10n/ja.json +38 -0
  235. package/templates/retail-store/l10n/ko.json +38 -0
  236. package/templates/retail-store/l10n/lt.json +38 -0
  237. package/templates/retail-store/l10n/nl.json +38 -0
  238. package/templates/retail-store/l10n/no.json +38 -0
  239. package/templates/retail-store/l10n/pl.json +38 -0
  240. package/templates/retail-store/l10n/pt.json +38 -0
  241. package/templates/retail-store/l10n/ru.json +38 -0
  242. package/templates/retail-store/l10n/sv.json +38 -0
  243. package/templates/retail-store/l10n/th.json +38 -0
  244. package/templates/retail-store/l10n/tr.json +38 -0
  245. package/templates/retail-store/l10n/uk.json +38 -0
  246. package/templates/retail-store/l10n/vi.json +38 -0
  247. package/templates/retail-store/l10n/zh.json +38 -0
  248. package/templates/retail-store/tier5-src/_shared/member-bookings.ts +48 -1
  249. package/templates/salon-spa/tier5-src/_shared/member-bookings.ts +48 -1
  250. package/templates/salon-spa/tier5-src/himi-booking-bookings/index.ts +10 -30
  251. package/templates/yoga-studio/tier5-src/_shared/member-bookings.ts +48 -1
  252. package/templates/yoga-studio/tier5-src/himi-booking-bookings/index.ts +10 -30
@@ -68,6 +68,12 @@
68
68
  "translation": "選擇此應用程式使用的語言。",
69
69
  "origin": "machine"
70
70
  },
71
+ "h_b9e09ae263fb": {
72
+ "key": "businessChat.unconfirmed",
73
+ "source": "Not confirmed",
74
+ "translation": "未確認",
75
+ "origin": "machine"
76
+ },
71
77
  "h_33ce417454bf": {
72
78
  "key": "common.detailLoadingText",
73
79
  "source": "Loading…",
@@ -152,6 +158,12 @@
152
158
  "translation": "登入資料",
153
159
  "origin": "one-app:wix-owners-app-platform:user-profile.account-settings-screen.login-info.title"
154
160
  },
161
+ "h_13e7a657eca6": {
162
+ "key": "agenda.bookedLabel",
163
+ "source": "Booked",
164
+ "translation": "已預訂",
165
+ "origin": "machine"
166
+ },
155
167
  "h_153d7a58b3a3": {
156
168
  "key": "forum.commentCta",
157
169
  "source": "Comment",
@@ -764,6 +776,12 @@
764
776
  "translation": "註冊",
765
777
  "origin": "machine"
766
778
  },
779
+ "h_d82b56cad900": {
780
+ "key": "agenda.courseTag",
781
+ "source": "Course",
782
+ "translation": "課程",
783
+ "origin": "machine"
784
+ },
767
785
  "h_d850ee188c7c": {
768
786
  "key": "accountSettings.newPasswordLabel",
769
787
  "source": "New password",
@@ -878,6 +896,12 @@
878
896
  "translation": "預訂",
879
897
  "origin": "machine"
880
898
  },
899
+ "h_f840ac65b3e5": {
900
+ "key": "subscriptionDetail.status.CANCELED",
901
+ "source": "Canceled",
902
+ "translation": "已取消",
903
+ "origin": "one-app:wix-one-app-ecom-platform:ORDER_STATUS_CANCELED"
904
+ },
881
905
  "h_f8d7466bcdc7": {
882
906
  "key": "feed.composerPlaceholder",
883
907
  "source": "What's happening?",
@@ -2577,6 +2601,26 @@
2577
2601
  "translation": "待核准",
2578
2602
  "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2579
2603
  },
2604
+ "h_23a1732e27a5": {
2605
+ "source": "Waitlist",
2606
+ "translation": "候補名單",
2607
+ "origin": "machine"
2608
+ },
2609
+ "h_ff59b80fe424": {
2610
+ "source": "Declined",
2611
+ "translation": "已拒絕",
2612
+ "origin": "one-app:wix-one-app-marketing:Marketing_Home_CampaignsStats_EmailMarketing_Status_Declined"
2613
+ },
2614
+ "h_5d1fcddd3adc": {
2615
+ "source": "{n} hr",
2616
+ "translation": "{n} 小時",
2617
+ "origin": "machine"
2618
+ },
2619
+ "h_37e737d92cbb": {
2620
+ "source": "{n} min",
2621
+ "translation": "{n} 分鐘",
2622
+ "origin": "machine"
2623
+ },
2580
2624
  "h_dc9d4584a554": {
2581
2625
  "source": "Paid",
2582
2626
  "translation": "已付款",
@@ -2,7 +2,7 @@ import { queryBookings, type WixBooking } from "@himalaya/wix-bookings";
2
2
  import { memberAccess, assertMemberAccess, type MemberAccess } from "./member-access.js";
3
3
  import { offsetPage } from "./offset-page.js";
4
4
  import type { CollectionQuery } from "./collection-query.js";
5
- import { copyParam } from "./himi-copy.js";
5
+ import { copyParam, copyTemplate } from "./himi-copy.js";
6
6
  import { formatWeekdayDateTime } from "./engine-intl.js";
7
7
  import { dayKey } from "@himalaya/time";
8
8
 
@@ -81,6 +81,53 @@ export function memberBookingRow(booking: WixBooking): MemberBookingRow {
81
81
  courseStart: instant(schedule?.firstSessionStart),
82
82
  courseEnd: instant(schedule?.lastSessionEnd) };
83
83
  }
84
+ // ---- Labels and eligible actions -------------------------------------------------
85
+ // One answer for My Bookings (its rows and booking sheet) and a page's upcoming-bookings section, so a
86
+ // booking that is not plainly confirmed carries the same status label and length on both, and the
87
+ // section offers More actions only where the sheet has an action. (A confirmed booking is "Booked" on
88
+ // the section, as the source's card says; My Bookings shows no tag for it, or "Course" for a course.)
89
+
90
+ /** A booking that is not a plain confirmed one, as a short label: "Pending approval", "Waitlist",
91
+ * "Canceled", "Declined" or "Not confirmed". "" for a confirmed booking (and any other status). */
92
+ export function bookingStatusLabel(row: Pick<MemberBookingRow, "statusKey">): string {
93
+ switch (row.statusKey) {
94
+ // Wix answers PENDING_APPROVAL; PENDING is kept for older records.
95
+ case "PENDING": case "PENDING_APPROVAL": return copyParam("bookings.statusPending", "Pending approval");
96
+ case "WAITING_LIST": return copyParam("bookings.statusWaitlist", "Waitlist");
97
+ case "CANCELED": case "CANCELLED": return copyParam("bookings.statusCancelled", "Canceled");
98
+ case "DECLINED": return copyParam("bookings.statusDeclined", "Declined");
99
+ }
100
+ return UNCONFIRMED_STATUSES.includes(row.statusKey) ? copyParam("bookings.statusUnconfirmed", "Not confirmed") : "";
101
+ }
102
+
103
+ /** "40 min", "1 hr", "1 hr 15 min". */
104
+ export function bookingDurationText(minutes: number): string {
105
+ const h = Math.floor(minutes / 60), m = minutes % 60;
106
+ const hours = h ? copyTemplate("bookings.durationHours", "{n} hr", { n: h }) : "";
107
+ const mins = m ? copyTemplate("bookings.durationMinutes", "{n} min", { n: m }) : "";
108
+ return [hours, mins].filter(Boolean).join(" ");
109
+ }
110
+
111
+ /** A session's length in whole minutes; 0 for a course (it books a schedule), or when the record has no
112
+ * usable end after its start. */
113
+ export function bookingMinutes(row: Pick<MemberBookingRow, "isCourse" | "start" | "end">): number {
114
+ if (row.isCourse || !row.start || !row.end) return 0;
115
+ const start = Date.parse(row.start), end = Date.parse(row.end);
116
+ return Number.isFinite(start) && Number.isFinite(end) && end > start ? Math.round((end - start) / 60000) : 0;
117
+ }
118
+
119
+ /** Add to calendar: a session (not a course) that is still to come and not canceled. */
120
+ export const canAddBookingToCalendar = (row: MemberBookingRow, now = Date.now()) =>
121
+ !row.isCourse && !!row.start && Date.parse(row.start) > now && !CANCELLED_STATUSES.includes(row.statusKey);
122
+ /** Directions: a place with an address that is not the client's own. */
123
+ export const hasBookingDirections = (row: MemberBookingRow) => !!row.placeAddress && row.placeType !== "CUSTOMER";
124
+ /** Cancel: Wix lets the member cancel it, and it has not started yet. */
125
+ export const canCancelBooking = (row: MemberBookingRow, now = Date.now()) => row.canCancel && Date.parse(row.start) > now;
126
+ /** The booking sheet on My Bookings offers at least one action for this booking: add to calendar,
127
+ * directions, Book Again or Cancel. */
128
+ export const hasBookingActions = (row: MemberBookingRow, now = Date.now()) =>
129
+ canAddBookingToCalendar(row, now) || hasBookingDirections(row) || !!row.serviceId || canCancelBooking(row, now);
130
+
84
131
  export async function fetchMemberBookings(criteria: CollectionQuery, cursor: string, now: string, expected?: MemberAccess, options: FetchMemberBookingsOptions = {}) {
85
132
  const member = expected ?? await memberAccess();
86
133
  const metadata = { email: member.email, scope: member.scope, needsSignIn: !member.email };
@@ -68,6 +68,12 @@
68
68
  "translation": "اختر اللغة المستخدمة في هذا التطبيق.",
69
69
  "origin": "machine"
70
70
  },
71
+ "h_b9e09ae263fb": {
72
+ "key": "businessChat.unconfirmed",
73
+ "source": "Not confirmed",
74
+ "translation": "غير مؤكد",
75
+ "origin": "machine"
76
+ },
71
77
  "h_33ce417454bf": {
72
78
  "key": "common.detailLoadingText",
73
79
  "source": "Loading…",
@@ -146,6 +152,12 @@
146
152
  "translation": "معلومات تسجيل الدخول",
147
153
  "origin": "one-app:wix-owners-app-platform:user-profile.account-settings-screen.login-info.title"
148
154
  },
155
+ "h_13e7a657eca6": {
156
+ "key": "agenda.bookedLabel",
157
+ "source": "Booked",
158
+ "translation": "تم الحجز",
159
+ "origin": "machine"
160
+ },
149
161
  "h_153d7a58b3a3": {
150
162
  "key": "forum.commentCta",
151
163
  "source": "Comment",
@@ -752,6 +764,12 @@
752
764
  "translation": "إنشاء حساب",
753
765
  "origin": "machine"
754
766
  },
767
+ "h_d82b56cad900": {
768
+ "key": "agenda.courseTag",
769
+ "source": "Course",
770
+ "translation": "الدورة",
771
+ "origin": "machine"
772
+ },
755
773
  "h_d850ee188c7c": {
756
774
  "key": "accountSettings.newPasswordLabel",
757
775
  "source": "New password",
@@ -866,6 +884,12 @@
866
884
  "translation": "احجز",
867
885
  "origin": "machine"
868
886
  },
887
+ "h_f840ac65b3e5": {
888
+ "key": "subscriptionDetail.status.CANCELED",
889
+ "source": "Canceled",
890
+ "translation": "ملغى",
891
+ "origin": "machine"
892
+ },
869
893
  "h_f8d7466bcdc7": {
870
894
  "key": "feed.composerPlaceholder",
871
895
  "source": "What's happening?",
@@ -2472,6 +2496,26 @@
2472
2496
  "translation": "قيد الموافقة",
2473
2497
  "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2474
2498
  },
2499
+ "h_23a1732e27a5": {
2500
+ "source": "Waitlist",
2501
+ "translation": "قائمة الانتظار",
2502
+ "origin": "machine"
2503
+ },
2504
+ "h_ff59b80fe424": {
2505
+ "source": "Declined",
2506
+ "translation": "مرفوضة",
2507
+ "origin": "one-app:wix-one-app-marketing:Marketing_Home_CampaignsStats_EmailMarketing_Status_Declined"
2508
+ },
2509
+ "h_5d1fcddd3adc": {
2510
+ "source": "{n} hr",
2511
+ "translation": "{n} ساعة",
2512
+ "origin": "machine"
2513
+ },
2514
+ "h_37e737d92cbb": {
2515
+ "source": "{n} min",
2516
+ "translation": "{n} دقيقة",
2517
+ "origin": "machine"
2518
+ },
2475
2519
  "h_dc9d4584a554": {
2476
2520
  "source": "Paid",
2477
2521
  "translation": "مدفوع",
@@ -68,6 +68,12 @@
68
68
  "translation": "Vyberte jazyk, který se bude v aplikaci používat.",
69
69
  "origin": "machine"
70
70
  },
71
+ "h_b9e09ae263fb": {
72
+ "key": "businessChat.unconfirmed",
73
+ "source": "Not confirmed",
74
+ "translation": "Nepotvrzeno",
75
+ "origin": "machine"
76
+ },
71
77
  "h_33ce417454bf": {
72
78
  "key": "common.detailLoadingText",
73
79
  "source": "Loading…",
@@ -146,6 +152,12 @@
146
152
  "translation": "Přihlašovací údaje",
147
153
  "origin": "one-app:wix-owners-app-platform:user-profile.account-settings-screen.login-info.title"
148
154
  },
155
+ "h_13e7a657eca6": {
156
+ "key": "agenda.bookedLabel",
157
+ "source": "Booked",
158
+ "translation": "Rezervováno",
159
+ "origin": "machine"
160
+ },
149
161
  "h_153d7a58b3a3": {
150
162
  "key": "forum.commentCta",
151
163
  "source": "Comment",
@@ -752,6 +764,12 @@
752
764
  "translation": "Registrovat se",
753
765
  "origin": "machine"
754
766
  },
767
+ "h_d82b56cad900": {
768
+ "key": "agenda.courseTag",
769
+ "source": "Course",
770
+ "translation": "Kurz",
771
+ "origin": "machine"
772
+ },
755
773
  "h_d850ee188c7c": {
756
774
  "key": "accountSettings.newPasswordLabel",
757
775
  "source": "New password",
@@ -866,6 +884,12 @@
866
884
  "translation": "Rezervovat",
867
885
  "origin": "machine"
868
886
  },
887
+ "h_f840ac65b3e5": {
888
+ "key": "subscriptionDetail.status.CANCELED",
889
+ "source": "Canceled",
890
+ "translation": "Zrušeno",
891
+ "origin": "one-app:wix-one-app-ecom-platform:ORDER_STATUS_CANCELED"
892
+ },
869
893
  "h_f8d7466bcdc7": {
870
894
  "key": "feed.composerPlaceholder",
871
895
  "source": "What's happening?",
@@ -2472,6 +2496,26 @@
2472
2496
  "translation": "Čeká na schválení",
2473
2497
  "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2474
2498
  },
2499
+ "h_23a1732e27a5": {
2500
+ "source": "Waitlist",
2501
+ "translation": "Čekací listina",
2502
+ "origin": "machine"
2503
+ },
2504
+ "h_ff59b80fe424": {
2505
+ "source": "Declined",
2506
+ "translation": "Zamítnuto",
2507
+ "origin": "one-app:wix-one-app-marketing:Marketing_Home_CampaignsStats_EmailMarketing_Status_Declined"
2508
+ },
2509
+ "h_5d1fcddd3adc": {
2510
+ "source": "{n} hr",
2511
+ "translation": "{n} h",
2512
+ "origin": "machine"
2513
+ },
2514
+ "h_37e737d92cbb": {
2515
+ "source": "{n} min",
2516
+ "translation": "{n} min",
2517
+ "origin": "machine"
2518
+ },
2475
2519
  "h_dc9d4584a554": {
2476
2520
  "source": "Paid",
2477
2521
  "translation": "Zaplaceno",
@@ -68,6 +68,12 @@
68
68
  "translation": "Vælg det sprog, der bruges i denne app.",
69
69
  "origin": "machine"
70
70
  },
71
+ "h_b9e09ae263fb": {
72
+ "key": "businessChat.unconfirmed",
73
+ "source": "Not confirmed",
74
+ "translation": "Ikke bekræftet",
75
+ "origin": "machine"
76
+ },
71
77
  "h_33ce417454bf": {
72
78
  "key": "common.detailLoadingText",
73
79
  "source": "Loading…",
@@ -146,6 +152,12 @@
146
152
  "translation": "Login-info",
147
153
  "origin": "one-app:wix-owners-app-platform:user-profile.account-settings-screen.login-info.title"
148
154
  },
155
+ "h_13e7a657eca6": {
156
+ "key": "agenda.bookedLabel",
157
+ "source": "Booked",
158
+ "translation": "Booket",
159
+ "origin": "machine"
160
+ },
149
161
  "h_153d7a58b3a3": {
150
162
  "key": "forum.commentCta",
151
163
  "source": "Comment",
@@ -752,6 +764,12 @@
752
764
  "translation": "Tilmeld dig",
753
765
  "origin": "machine"
754
766
  },
767
+ "h_d82b56cad900": {
768
+ "key": "agenda.courseTag",
769
+ "source": "Course",
770
+ "translation": "Kursus",
771
+ "origin": "machine"
772
+ },
755
773
  "h_d850ee188c7c": {
756
774
  "key": "accountSettings.newPasswordLabel",
757
775
  "source": "New password",
@@ -866,6 +884,12 @@
866
884
  "translation": "Book",
867
885
  "origin": "machine"
868
886
  },
887
+ "h_f840ac65b3e5": {
888
+ "key": "subscriptionDetail.status.CANCELED",
889
+ "source": "Canceled",
890
+ "translation": "Annulleret",
891
+ "origin": "one-app:wix-one-app-ecom-platform:merchant.order.paymentInfoSection.canceledPayments.title"
892
+ },
869
893
  "h_f8d7466bcdc7": {
870
894
  "key": "feed.composerPlaceholder",
871
895
  "source": "What's happening?",
@@ -2472,6 +2496,26 @@
2472
2496
  "translation": "Venter på godkendelse",
2473
2497
  "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2474
2498
  },
2499
+ "h_23a1732e27a5": {
2500
+ "source": "Waitlist",
2501
+ "translation": "Venteliste",
2502
+ "origin": "machine"
2503
+ },
2504
+ "h_ff59b80fe424": {
2505
+ "source": "Declined",
2506
+ "translation": "Afvist",
2507
+ "origin": "one-app:wix-one-app-marketing:Marketing_Home_CampaignsStats_EmailMarketing_Status_Declined"
2508
+ },
2509
+ "h_5d1fcddd3adc": {
2510
+ "source": "{n} hr",
2511
+ "translation": "{n} t.",
2512
+ "origin": "machine"
2513
+ },
2514
+ "h_37e737d92cbb": {
2515
+ "source": "{n} min",
2516
+ "translation": "{n} min.",
2517
+ "origin": "machine"
2518
+ },
2475
2519
  "h_dc9d4584a554": {
2476
2520
  "source": "Paid",
2477
2521
  "translation": "Betalt",
@@ -68,6 +68,12 @@
68
68
  "translation": "Wähle die Sprache für diese App.",
69
69
  "origin": "machine"
70
70
  },
71
+ "h_b9e09ae263fb": {
72
+ "key": "businessChat.unconfirmed",
73
+ "source": "Not confirmed",
74
+ "translation": "Nicht bestätigt",
75
+ "origin": "machine"
76
+ },
71
77
  "h_33ce417454bf": {
72
78
  "key": "common.detailLoadingText",
73
79
  "source": "Loading…",
@@ -146,6 +152,12 @@
146
152
  "translation": "Anmeldeinfo",
147
153
  "origin": "one-app:wix-owners-app-platform:user-profile.account-settings-screen.login-info.title"
148
154
  },
155
+ "h_13e7a657eca6": {
156
+ "key": "agenda.bookedLabel",
157
+ "source": "Booked",
158
+ "translation": "Gebucht",
159
+ "origin": "machine"
160
+ },
149
161
  "h_153d7a58b3a3": {
150
162
  "key": "forum.commentCta",
151
163
  "source": "Comment",
@@ -752,6 +764,12 @@
752
764
  "translation": "Registrieren",
753
765
  "origin": "machine"
754
766
  },
767
+ "h_d82b56cad900": {
768
+ "key": "agenda.courseTag",
769
+ "source": "Course",
770
+ "translation": "Kurs",
771
+ "origin": "machine"
772
+ },
755
773
  "h_d850ee188c7c": {
756
774
  "key": "accountSettings.newPasswordLabel",
757
775
  "source": "New password",
@@ -866,6 +884,12 @@
866
884
  "translation": "Buchen",
867
885
  "origin": "machine"
868
886
  },
887
+ "h_f840ac65b3e5": {
888
+ "key": "subscriptionDetail.status.CANCELED",
889
+ "source": "Canceled",
890
+ "translation": "Storniert",
891
+ "origin": "one-app:wix-one-app-ecom-platform:ORDER_STATUS_CANCELED"
892
+ },
869
893
  "h_f8d7466bcdc7": {
870
894
  "key": "feed.composerPlaceholder",
871
895
  "source": "What's happening?",
@@ -2472,6 +2496,26 @@
2472
2496
  "translation": "Bestätigung ausstehend",
2473
2497
  "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2474
2498
  },
2499
+ "h_23a1732e27a5": {
2500
+ "source": "Waitlist",
2501
+ "translation": "Warteliste",
2502
+ "origin": "machine"
2503
+ },
2504
+ "h_ff59b80fe424": {
2505
+ "source": "Declined",
2506
+ "translation": "Abgelehnt",
2507
+ "origin": "one-app:wix-one-app-marketing:Marketing_Home_CampaignsStats_EmailMarketing_Status_Declined"
2508
+ },
2509
+ "h_5d1fcddd3adc": {
2510
+ "source": "{n} hr",
2511
+ "translation": "{n} Std.",
2512
+ "origin": "machine"
2513
+ },
2514
+ "h_37e737d92cbb": {
2515
+ "source": "{n} min",
2516
+ "translation": "{n} Min.",
2517
+ "origin": "machine"
2518
+ },
2475
2519
  "h_dc9d4584a554": {
2476
2520
  "source": "Paid",
2477
2521
  "translation": "Bezahlt",
@@ -68,6 +68,12 @@
68
68
  "translation": "Επιλέξτε τη γλώσσα που χρησιμοποιείται σε αυτήν την εφαρμογή.",
69
69
  "origin": "machine"
70
70
  },
71
+ "h_b9e09ae263fb": {
72
+ "key": "businessChat.unconfirmed",
73
+ "source": "Not confirmed",
74
+ "translation": "Δεν επιβεβαιώθηκε",
75
+ "origin": "machine"
76
+ },
71
77
  "h_33ce417454bf": {
72
78
  "key": "common.detailLoadingText",
73
79
  "source": "Loading…",
@@ -146,6 +152,12 @@
146
152
  "translation": "Στοιχεία σύνδεσης",
147
153
  "origin": "one-app:wix-owners-app-platform:user-profile.account-settings-screen.login-info.title"
148
154
  },
155
+ "h_13e7a657eca6": {
156
+ "key": "agenda.bookedLabel",
157
+ "source": "Booked",
158
+ "translation": "Κλεισμένο",
159
+ "origin": "machine"
160
+ },
149
161
  "h_153d7a58b3a3": {
150
162
  "key": "forum.commentCta",
151
163
  "source": "Comment",
@@ -752,6 +764,12 @@
752
764
  "translation": "Εγγραφή",
753
765
  "origin": "machine"
754
766
  },
767
+ "h_d82b56cad900": {
768
+ "key": "agenda.courseTag",
769
+ "source": "Course",
770
+ "translation": "Σειρά μαθημάτων",
771
+ "origin": "machine"
772
+ },
755
773
  "h_d850ee188c7c": {
756
774
  "key": "accountSettings.newPasswordLabel",
757
775
  "source": "New password",
@@ -866,6 +884,12 @@
866
884
  "translation": "Κράτηση",
867
885
  "origin": "machine"
868
886
  },
887
+ "h_f840ac65b3e5": {
888
+ "key": "subscriptionDetail.status.CANCELED",
889
+ "source": "Canceled",
890
+ "translation": "Ακυρώθηκε",
891
+ "origin": "one-app:wix-one-app-ecom-platform:ORDER_STATUS_CANCELED"
892
+ },
869
893
  "h_f8d7466bcdc7": {
870
894
  "key": "feed.composerPlaceholder",
871
895
  "source": "What's happening?",
@@ -2472,6 +2496,26 @@
2472
2496
  "translation": "Έγκριση σε εκκρεμότητα",
2473
2497
  "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2474
2498
  },
2499
+ "h_23a1732e27a5": {
2500
+ "source": "Waitlist",
2501
+ "translation": "Λίστα αναμονής",
2502
+ "origin": "machine"
2503
+ },
2504
+ "h_ff59b80fe424": {
2505
+ "source": "Declined",
2506
+ "translation": "Απορρίφθηκε",
2507
+ "origin": "one-app:wix-one-app-marketing:Marketing_Home_CampaignsStats_EmailMarketing_Status_Declined"
2508
+ },
2509
+ "h_5d1fcddd3adc": {
2510
+ "source": "{n} hr",
2511
+ "translation": "{n} ώρ.",
2512
+ "origin": "machine"
2513
+ },
2514
+ "h_37e737d92cbb": {
2515
+ "source": "{n} min",
2516
+ "translation": "{n} λ.",
2517
+ "origin": "machine"
2518
+ },
2475
2519
  "h_dc9d4584a554": {
2476
2520
  "source": "Paid",
2477
2521
  "translation": "Πληρώθηκε",
@@ -139,6 +139,13 @@
139
139
  "key": "accountSettings.loginInfo",
140
140
  "keyOrigin": "string-table"
141
141
  },
142
+ "h_13e7a657eca6": {
143
+ "source": "Booked",
144
+ "kind": "Text.text",
145
+ "translation": "",
146
+ "key": "agenda.bookedLabel",
147
+ "keyOrigin": "string-table"
148
+ },
142
149
  "h_153d7a58b3a3": {
143
150
  "source": "Comment",
144
151
  "kind": "Button.title",
@@ -1062,6 +1069,12 @@
1062
1069
  "key": "account.viewProfileLink",
1063
1070
  "keyOrigin": "string-table"
1064
1071
  },
1072
+ "h_b9e09ae263fb": {
1073
+ "source": "Not confirmed",
1074
+ "kind": "Worker.copy",
1075
+ "translation": "",
1076
+ "key": "businessChat.unconfirmed"
1077
+ },
1065
1078
  "h_badd385121c5": {
1066
1079
  "source": "View details",
1067
1080
  "kind": "Button.title",
@@ -1258,6 +1271,13 @@
1258
1271
  "key": "account.registerCta",
1259
1272
  "keyOrigin": "string-table"
1260
1273
  },
1274
+ "h_d82b56cad900": {
1275
+ "source": "Course",
1276
+ "kind": "Text.text",
1277
+ "translation": "",
1278
+ "key": "agenda.courseTag",
1279
+ "keyOrigin": "string-table"
1280
+ },
1261
1281
  "h_d850ee188c7c": {
1262
1282
  "source": "New password",
1263
1283
  "kind": "Text.text",
@@ -1486,6 +1506,13 @@
1486
1506
  "key": "businessContact.directions",
1487
1507
  "keyOrigin": "string-table"
1488
1508
  },
1509
+ "h_f840ac65b3e5": {
1510
+ "source": "Canceled",
1511
+ "kind": "atom.label",
1512
+ "translation": "",
1513
+ "key": "subscriptionDetail.status.CANCELED",
1514
+ "keyOrigin": "string-table"
1515
+ },
1489
1516
  "h_f8748247166d": {
1490
1517
  "source": "Loading group details...",
1491
1518
  "kind": "Text.text",
@@ -68,6 +68,12 @@
68
68
  "translation": "Elige el idioma que se usa en esta app.",
69
69
  "origin": "machine"
70
70
  },
71
+ "h_b9e09ae263fb": {
72
+ "key": "businessChat.unconfirmed",
73
+ "source": "Not confirmed",
74
+ "translation": "Sin confirmar",
75
+ "origin": "machine"
76
+ },
71
77
  "h_33ce417454bf": {
72
78
  "key": "common.detailLoadingText",
73
79
  "source": "Loading…",
@@ -146,6 +152,12 @@
146
152
  "translation": "Información de inicio de sesión",
147
153
  "origin": "one-app:wix-owners-app-platform:user-profile.account-settings-screen.login-info.title"
148
154
  },
155
+ "h_13e7a657eca6": {
156
+ "key": "agenda.bookedLabel",
157
+ "source": "Booked",
158
+ "translation": "Reservado",
159
+ "origin": "machine"
160
+ },
149
161
  "h_153d7a58b3a3": {
150
162
  "key": "forum.commentCta",
151
163
  "source": "Comment",
@@ -752,6 +764,12 @@
752
764
  "translation": "Registrarse",
753
765
  "origin": "machine"
754
766
  },
767
+ "h_d82b56cad900": {
768
+ "key": "agenda.courseTag",
769
+ "source": "Course",
770
+ "translation": "Curso",
771
+ "origin": "machine"
772
+ },
755
773
  "h_d850ee188c7c": {
756
774
  "key": "accountSettings.newPasswordLabel",
757
775
  "source": "New password",
@@ -866,6 +884,12 @@
866
884
  "translation": "Reservar",
867
885
  "origin": "machine"
868
886
  },
887
+ "h_f840ac65b3e5": {
888
+ "key": "subscriptionDetail.status.CANCELED",
889
+ "source": "Canceled",
890
+ "translation": "Cancelado",
891
+ "origin": "one-app:wix-one-app-ecom-platform:ORDER_STATUS_CANCELED"
892
+ },
869
893
  "h_f8d7466bcdc7": {
870
894
  "key": "feed.composerPlaceholder",
871
895
  "source": "What's happening?",
@@ -2472,6 +2496,26 @@
2472
2496
  "translation": "Aprobación pendiente",
2473
2497
  "origin": "one-app:wix-one-groups:GROUPS_MEMBERS_DESCRIPTION_PENDING"
2474
2498
  },
2499
+ "h_23a1732e27a5": {
2500
+ "source": "Waitlist",
2501
+ "translation": "Lista de espera",
2502
+ "origin": "machine"
2503
+ },
2504
+ "h_ff59b80fe424": {
2505
+ "source": "Declined",
2506
+ "translation": "Rechazado",
2507
+ "origin": "one-app:wix-one-app-ecom-platform:merchant.order.paymentInfoSection.declinedPayments.title"
2508
+ },
2509
+ "h_5d1fcddd3adc": {
2510
+ "source": "{n} hr",
2511
+ "translation": "{n} h",
2512
+ "origin": "machine"
2513
+ },
2514
+ "h_37e737d92cbb": {
2515
+ "source": "{n} min",
2516
+ "translation": "{n} min",
2517
+ "origin": "machine"
2518
+ },
2475
2519
  "h_dc9d4584a554": {
2476
2520
  "source": "Paid",
2477
2521
  "translation": "Pagado",