@wix/himalaya-cli 0.1479.0 → 0.1480.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.
- package/dist/cli.mjs +454 -270
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/component-reference.json +2 -25
- package/guides/component-reference.md +3 -9
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +29 -229
- package/templates/beauty-salon/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/beauty-salon/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/beauty-salon/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/branded-lite/dev/index.ts +58 -364
- package/templates/branded-lite/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/branded-lite/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/branded-lite/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/branded-lite/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/community-club/dev/index.ts +26 -134
- package/templates/community-club/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/community-club/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/events-meetups/dev/index.ts +26 -134
- package/templates/events-meetups/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/events-meetups/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/gym-fitness/dev/index.ts +55 -363
- package/templates/gym-fitness/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/gym-fitness/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/gym-fitness/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/gym-fitness/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/nonprofit-cause/dev/index.ts +29 -136
- package/templates/nonprofit-cause/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/nonprofit-cause/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/nonprofit-cause/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/podcast-creator/dev/index.ts +29 -136
- package/templates/podcast-creator/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/podcast-creator/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/podcast-creator/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
- package/templates/portfolio-creative/dev/index.ts +26 -134
- package/templates/portfolio-creative/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/portfolio-creative/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/restaurant/dev/index.ts +26 -134
- package/templates/restaurant/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/restaurant/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/retail-store/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/yoga-studio/dev/index.ts +55 -363
- package/templates/yoga-studio/tier5-src/himi-booking-time/index.ts +69 -9
- package/templates/yoga-studio/tier5-src/himi-events-rsvp/index.ts +5 -0
- package/templates/yoga-studio/tier5-src/himi-store-account/index.ts +6 -1
- package/templates/yoga-studio/tier5-src/wix-spaces-my-subscriptions/index.ts +2 -2
|
@@ -19504,14 +19504,15 @@ const SCREENS = runtimeSetting({
|
|
|
19504
19504
|
"package": "himalaya",
|
|
19505
19505
|
"type": "Button",
|
|
19506
19506
|
"props": {
|
|
19507
|
-
"title": "
|
|
19507
|
+
"title": "Sign in",
|
|
19508
19508
|
"style": "secondary",
|
|
19509
19509
|
"fullWidth": true,
|
|
19510
19510
|
"leadingIcon": "person",
|
|
19511
19511
|
"action": {
|
|
19512
19512
|
"actionId": "himi.open",
|
|
19513
19513
|
"params": {
|
|
19514
|
-
"screenId": "
|
|
19514
|
+
"screenId": "himi_sign_in",
|
|
19515
|
+
"mode": "signin"
|
|
19515
19516
|
}
|
|
19516
19517
|
}
|
|
19517
19518
|
}
|
|
@@ -27836,233 +27837,6 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
27836
27837
|
"props": {
|
|
27837
27838
|
"spacing": 12,
|
|
27838
27839
|
"children": [
|
|
27839
|
-
{
|
|
27840
|
-
"id": "himi_time.signin_card",
|
|
27841
|
-
"body": {
|
|
27842
|
-
"package": "himalaya",
|
|
27843
|
-
"type": "VStack",
|
|
27844
|
-
"props": {
|
|
27845
|
-
"spacing": 12,
|
|
27846
|
-
"alignment": "leading",
|
|
27847
|
-
"children": [
|
|
27848
|
-
{
|
|
27849
|
-
"id": "",
|
|
27850
|
-
"body": {
|
|
27851
|
-
"package": "himalaya",
|
|
27852
|
-
"type": "HStack",
|
|
27853
|
-
"props": {
|
|
27854
|
-
"spacing": 10,
|
|
27855
|
-
"children": [
|
|
27856
|
-
{
|
|
27857
|
-
"id": "",
|
|
27858
|
-
"body": {
|
|
27859
|
-
"package": "himalaya",
|
|
27860
|
-
"type": "Icon",
|
|
27861
|
-
"props": {
|
|
27862
|
-
"name": "person",
|
|
27863
|
-
"size": 18,
|
|
27864
|
-
"tint": "accentPrimary"
|
|
27865
|
-
}
|
|
27866
|
-
},
|
|
27867
|
-
"modifiers": {
|
|
27868
|
-
"accessibilityRole": "decorative"
|
|
27869
|
-
}
|
|
27870
|
-
},
|
|
27871
|
-
{
|
|
27872
|
-
"id": "",
|
|
27873
|
-
"body": {
|
|
27874
|
-
"package": "himalaya",
|
|
27875
|
-
"type": "Text",
|
|
27876
|
-
"props": {
|
|
27877
|
-
"text": "$service:himiBookingTime.authTitle",
|
|
27878
|
-
"style": "bodyEmphasis",
|
|
27879
|
-
"collapseWhenEmpty": true
|
|
27880
|
-
}
|
|
27881
|
-
}
|
|
27882
|
-
}
|
|
27883
|
-
]
|
|
27884
|
-
}
|
|
27885
|
-
}
|
|
27886
|
-
},
|
|
27887
|
-
{
|
|
27888
|
-
"id": "",
|
|
27889
|
-
"body": {
|
|
27890
|
-
"package": "himalaya",
|
|
27891
|
-
"type": "Text",
|
|
27892
|
-
"props": {
|
|
27893
|
-
"text": "$service:himiBookingTime.authBody",
|
|
27894
|
-
"style": "body",
|
|
27895
|
-
"color": "textSecondary",
|
|
27896
|
-
"collapseWhenEmpty": true
|
|
27897
|
-
}
|
|
27898
|
-
}
|
|
27899
|
-
},
|
|
27900
|
-
{
|
|
27901
|
-
"id": "himi_time.signin.first_name",
|
|
27902
|
-
"body": {
|
|
27903
|
-
"package": "himalaya",
|
|
27904
|
-
"type": "TextField",
|
|
27905
|
-
"props": {
|
|
27906
|
-
"placeholder": "First name",
|
|
27907
|
-
"autoCapitalization": "words",
|
|
27908
|
-
"onChange": {
|
|
27909
|
-
"actionId": "tier5.himiBookingTime.setFirstName"
|
|
27910
|
-
}
|
|
27911
|
-
}
|
|
27912
|
-
},
|
|
27913
|
-
"modifiers": {
|
|
27914
|
-
"hiddenPath": "$service:himiBookingTime.notRegistering"
|
|
27915
|
-
}
|
|
27916
|
-
},
|
|
27917
|
-
{
|
|
27918
|
-
"id": "himi_time.signin.last_name",
|
|
27919
|
-
"body": {
|
|
27920
|
-
"package": "himalaya",
|
|
27921
|
-
"type": "TextField",
|
|
27922
|
-
"props": {
|
|
27923
|
-
"placeholder": "Last name",
|
|
27924
|
-
"autoCapitalization": "words",
|
|
27925
|
-
"onChange": {
|
|
27926
|
-
"actionId": "tier5.himiBookingTime.setLastName"
|
|
27927
|
-
}
|
|
27928
|
-
}
|
|
27929
|
-
},
|
|
27930
|
-
"modifiers": {
|
|
27931
|
-
"hiddenPath": "$service:himiBookingTime.notRegistering"
|
|
27932
|
-
}
|
|
27933
|
-
},
|
|
27934
|
-
{
|
|
27935
|
-
"id": "himi_time.signin.email",
|
|
27936
|
-
"body": {
|
|
27937
|
-
"package": "himalaya",
|
|
27938
|
-
"type": "TextField",
|
|
27939
|
-
"props": {
|
|
27940
|
-
"placeholder": "Email",
|
|
27941
|
-
"keyboard": "email",
|
|
27942
|
-
"autoCapitalization": "none",
|
|
27943
|
-
"onChange": {
|
|
27944
|
-
"actionId": "tier5.himiBookingTime.setEmail"
|
|
27945
|
-
}
|
|
27946
|
-
}
|
|
27947
|
-
}
|
|
27948
|
-
},
|
|
27949
|
-
{
|
|
27950
|
-
"id": "himi_time.signin.password",
|
|
27951
|
-
"body": {
|
|
27952
|
-
"package": "himalaya",
|
|
27953
|
-
"type": "TextField",
|
|
27954
|
-
"props": {
|
|
27955
|
-
"placeholder": "Password",
|
|
27956
|
-
"valuePath": "$service:himiBookingTime.password",
|
|
27957
|
-
"secure": true,
|
|
27958
|
-
"autoCapitalization": "none",
|
|
27959
|
-
"onChange": {
|
|
27960
|
-
"actionId": "tier5.himiBookingTime.setPassword"
|
|
27961
|
-
}
|
|
27962
|
-
}
|
|
27963
|
-
}
|
|
27964
|
-
},
|
|
27965
|
-
{
|
|
27966
|
-
"id": "himi_time.signin",
|
|
27967
|
-
"body": {
|
|
27968
|
-
"package": "himalaya",
|
|
27969
|
-
"type": "Button",
|
|
27970
|
-
"props": {
|
|
27971
|
-
"title": "Sign in",
|
|
27972
|
-
"style": "primary",
|
|
27973
|
-
"fullWidth": true,
|
|
27974
|
-
"action": {
|
|
27975
|
-
"actionId": "tier5.himiBookingTime.signIn"
|
|
27976
|
-
}
|
|
27977
|
-
}
|
|
27978
|
-
},
|
|
27979
|
-
"modifiers": {
|
|
27980
|
-
"cornerRadius": 8,
|
|
27981
|
-
"pressFeedback": "scale",
|
|
27982
|
-
"haptic": "medium",
|
|
27983
|
-
"hiddenPath": "$service:himiBookingTime.isRegistering"
|
|
27984
|
-
}
|
|
27985
|
-
},
|
|
27986
|
-
{
|
|
27987
|
-
"id": "himi_time.show_register",
|
|
27988
|
-
"body": {
|
|
27989
|
-
"package": "himalaya",
|
|
27990
|
-
"type": "Button",
|
|
27991
|
-
"props": {
|
|
27992
|
-
"title": "Create account",
|
|
27993
|
-
"style": "secondary",
|
|
27994
|
-
"fullWidth": true,
|
|
27995
|
-
"action": {
|
|
27996
|
-
"actionId": "tier5.himiBookingTime.showRegister"
|
|
27997
|
-
}
|
|
27998
|
-
}
|
|
27999
|
-
},
|
|
28000
|
-
"modifiers": {
|
|
28001
|
-
"hiddenPath": "$service:himiBookingTime.isRegistering"
|
|
28002
|
-
}
|
|
28003
|
-
},
|
|
28004
|
-
{
|
|
28005
|
-
"id": "himi_time.register",
|
|
28006
|
-
"body": {
|
|
28007
|
-
"package": "himalaya",
|
|
28008
|
-
"type": "Button",
|
|
28009
|
-
"props": {
|
|
28010
|
-
"title": "Create account",
|
|
28011
|
-
"style": "primary",
|
|
28012
|
-
"fullWidth": true,
|
|
28013
|
-
"action": {
|
|
28014
|
-
"actionId": "tier5.himiBookingTime.register"
|
|
28015
|
-
}
|
|
28016
|
-
}
|
|
28017
|
-
},
|
|
28018
|
-
"modifiers": {
|
|
28019
|
-
"cornerRadius": 8,
|
|
28020
|
-
"pressFeedback": "scale",
|
|
28021
|
-
"haptic": "medium",
|
|
28022
|
-
"hiddenPath": "$service:himiBookingTime.notRegistering"
|
|
28023
|
-
}
|
|
28024
|
-
},
|
|
28025
|
-
{
|
|
28026
|
-
"id": "himi_time.show_signin",
|
|
28027
|
-
"body": {
|
|
28028
|
-
"package": "himalaya",
|
|
28029
|
-
"type": "Button",
|
|
28030
|
-
"props": {
|
|
28031
|
-
"title": "I already have an account",
|
|
28032
|
-
"style": "secondary",
|
|
28033
|
-
"fullWidth": true,
|
|
28034
|
-
"action": {
|
|
28035
|
-
"actionId": "tier5.himiBookingTime.showSignIn"
|
|
28036
|
-
}
|
|
28037
|
-
}
|
|
28038
|
-
},
|
|
28039
|
-
"modifiers": {
|
|
28040
|
-
"hiddenPath": "$service:himiBookingTime.notRegistering"
|
|
28041
|
-
}
|
|
28042
|
-
}
|
|
28043
|
-
]
|
|
28044
|
-
}
|
|
28045
|
-
},
|
|
28046
|
-
"modifiers": {
|
|
28047
|
-
"background": {
|
|
28048
|
-
"token": "surfaceElevated"
|
|
28049
|
-
},
|
|
28050
|
-
"border": {
|
|
28051
|
-
"width": 1,
|
|
28052
|
-
"color": {
|
|
28053
|
-
"token": "border"
|
|
28054
|
-
}
|
|
28055
|
-
},
|
|
28056
|
-
"cornerRadius": 8,
|
|
28057
|
-
"padding": {
|
|
28058
|
-
"leading": 14,
|
|
28059
|
-
"trailing": 14,
|
|
28060
|
-
"top": 14,
|
|
28061
|
-
"bottom": 14
|
|
28062
|
-
},
|
|
28063
|
-
"hiddenPath": "$service:himiBookingTime.hideSignIn"
|
|
28064
|
-
}
|
|
28065
|
-
},
|
|
28066
27840
|
{
|
|
28067
27841
|
"id": "himi_time.member_card",
|
|
28068
27842
|
"body": {
|
|
@@ -28211,6 +27985,32 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
28211
27985
|
"hiddenPath": "$service:himiBookingTime.notBooking"
|
|
28212
27986
|
}
|
|
28213
27987
|
},
|
|
27988
|
+
{
|
|
27989
|
+
"id": "himi_time.book_sign_in",
|
|
27990
|
+
"body": {
|
|
27991
|
+
"package": "himalaya",
|
|
27992
|
+
"type": "Button",
|
|
27993
|
+
"props": {
|
|
27994
|
+
"title": "Book selected time",
|
|
27995
|
+
"style": "primary",
|
|
27996
|
+
"fullWidth": true,
|
|
27997
|
+
"action": {
|
|
27998
|
+
"actionId": "himi.open",
|
|
27999
|
+
"params": {
|
|
28000
|
+
"screenId": "himi_sign_in",
|
|
28001
|
+
"mode": "signin",
|
|
28002
|
+
"intent": "book"
|
|
28003
|
+
}
|
|
28004
|
+
}
|
|
28005
|
+
}
|
|
28006
|
+
},
|
|
28007
|
+
"modifiers": {
|
|
28008
|
+
"cornerRadius": 8,
|
|
28009
|
+
"pressFeedback": "scale",
|
|
28010
|
+
"haptic": "medium",
|
|
28011
|
+
"hiddenPath": "$service:himiBookingTime.hideSignIn"
|
|
28012
|
+
}
|
|
28013
|
+
},
|
|
28214
28014
|
{
|
|
28215
28015
|
"id": "himi_time.book",
|
|
28216
28016
|
"body": {
|
|
@@ -30164,140 +29964,6 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
30164
29964
|
}
|
|
30165
29965
|
}
|
|
30166
29966
|
},
|
|
30167
|
-
{
|
|
30168
|
-
"id": "himi_rsvp.signin_card",
|
|
30169
|
-
"body": {
|
|
30170
|
-
"package": "himalaya",
|
|
30171
|
-
"type": "VStack",
|
|
30172
|
-
"props": {
|
|
30173
|
-
"spacing": 12,
|
|
30174
|
-
"alignment": "leading",
|
|
30175
|
-
"children": [
|
|
30176
|
-
{
|
|
30177
|
-
"id": "",
|
|
30178
|
-
"body": {
|
|
30179
|
-
"package": "himalaya",
|
|
30180
|
-
"type": "HStack",
|
|
30181
|
-
"props": {
|
|
30182
|
-
"spacing": 10,
|
|
30183
|
-
"children": [
|
|
30184
|
-
{
|
|
30185
|
-
"id": "",
|
|
30186
|
-
"body": {
|
|
30187
|
-
"package": "himalaya",
|
|
30188
|
-
"type": "Icon",
|
|
30189
|
-
"props": {
|
|
30190
|
-
"name": "person",
|
|
30191
|
-
"size": 18,
|
|
30192
|
-
"tint": "accentPrimary"
|
|
30193
|
-
}
|
|
30194
|
-
},
|
|
30195
|
-
"modifiers": {
|
|
30196
|
-
"accessibilityRole": "decorative"
|
|
30197
|
-
}
|
|
30198
|
-
},
|
|
30199
|
-
{
|
|
30200
|
-
"id": "",
|
|
30201
|
-
"body": {
|
|
30202
|
-
"package": "himalaya",
|
|
30203
|
-
"type": "Text",
|
|
30204
|
-
"props": {
|
|
30205
|
-
"text": "Sign in to RSVP",
|
|
30206
|
-
"style": "bodyEmphasis"
|
|
30207
|
-
}
|
|
30208
|
-
}
|
|
30209
|
-
}
|
|
30210
|
-
]
|
|
30211
|
-
}
|
|
30212
|
-
}
|
|
30213
|
-
},
|
|
30214
|
-
{
|
|
30215
|
-
"id": "",
|
|
30216
|
-
"body": {
|
|
30217
|
-
"package": "himalaya",
|
|
30218
|
-
"type": "Text",
|
|
30219
|
-
"props": {
|
|
30220
|
-
"text": "Events can be browsed as a guest. RSVP is saved to your member identity.",
|
|
30221
|
-
"style": "body",
|
|
30222
|
-
"color": "textSecondary"
|
|
30223
|
-
}
|
|
30224
|
-
}
|
|
30225
|
-
},
|
|
30226
|
-
{
|
|
30227
|
-
"id": "himi_rsvp.email",
|
|
30228
|
-
"body": {
|
|
30229
|
-
"package": "himalaya",
|
|
30230
|
-
"type": "TextField",
|
|
30231
|
-
"props": {
|
|
30232
|
-
"placeholder": "Email",
|
|
30233
|
-
"value": "",
|
|
30234
|
-
"keyboard": "email",
|
|
30235
|
-
"autoCapitalization": "none",
|
|
30236
|
-
"onChange": {
|
|
30237
|
-
"actionId": "tier5.himiEventsRsvp.setEmail"
|
|
30238
|
-
}
|
|
30239
|
-
}
|
|
30240
|
-
}
|
|
30241
|
-
},
|
|
30242
|
-
{
|
|
30243
|
-
"id": "himi_rsvp.password",
|
|
30244
|
-
"body": {
|
|
30245
|
-
"package": "himalaya",
|
|
30246
|
-
"type": "TextField",
|
|
30247
|
-
"props": {
|
|
30248
|
-
"placeholder": "Password",
|
|
30249
|
-
"valuePath": "$service:himiEventsRsvp.password",
|
|
30250
|
-
"secure": true,
|
|
30251
|
-
"autoCapitalization": "none",
|
|
30252
|
-
"onChange": {
|
|
30253
|
-
"actionId": "tier5.himiEventsRsvp.setPassword"
|
|
30254
|
-
}
|
|
30255
|
-
}
|
|
30256
|
-
}
|
|
30257
|
-
},
|
|
30258
|
-
{
|
|
30259
|
-
"id": "himi_rsvp.signin",
|
|
30260
|
-
"body": {
|
|
30261
|
-
"package": "himalaya",
|
|
30262
|
-
"type": "Button",
|
|
30263
|
-
"props": {
|
|
30264
|
-
"title": "Sign in",
|
|
30265
|
-
"style": "primary",
|
|
30266
|
-
"fullWidth": true,
|
|
30267
|
-
"action": {
|
|
30268
|
-
"actionId": "tier5.himiEventsRsvp.signIn"
|
|
30269
|
-
}
|
|
30270
|
-
}
|
|
30271
|
-
},
|
|
30272
|
-
"modifiers": {
|
|
30273
|
-
"cornerRadius": 8,
|
|
30274
|
-
"pressFeedback": "scale",
|
|
30275
|
-
"haptic": "medium"
|
|
30276
|
-
}
|
|
30277
|
-
}
|
|
30278
|
-
]
|
|
30279
|
-
}
|
|
30280
|
-
},
|
|
30281
|
-
"modifiers": {
|
|
30282
|
-
"background": {
|
|
30283
|
-
"token": "surfaceElevated"
|
|
30284
|
-
},
|
|
30285
|
-
"border": {
|
|
30286
|
-
"width": 1,
|
|
30287
|
-
"color": {
|
|
30288
|
-
"token": "border"
|
|
30289
|
-
}
|
|
30290
|
-
},
|
|
30291
|
-
"cornerRadius": 8,
|
|
30292
|
-
"padding": {
|
|
30293
|
-
"leading": 14,
|
|
30294
|
-
"trailing": 14,
|
|
30295
|
-
"top": 14,
|
|
30296
|
-
"bottom": 14
|
|
30297
|
-
},
|
|
30298
|
-
"hiddenPath": "$service:himiEventsRsvp.isMember"
|
|
30299
|
-
}
|
|
30300
|
-
},
|
|
30301
29967
|
{
|
|
30302
29968
|
"id": "himi_rsvp.member_card",
|
|
30303
29969
|
"body": {
|
|
@@ -30413,6 +30079,32 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
30413
30079
|
"hiddenPath": "$service:himiEventsRsvp.noSuccess"
|
|
30414
30080
|
}
|
|
30415
30081
|
},
|
|
30082
|
+
{
|
|
30083
|
+
"id": "himi_rsvp.confirm_sign_in",
|
|
30084
|
+
"body": {
|
|
30085
|
+
"package": "himalaya",
|
|
30086
|
+
"type": "Button",
|
|
30087
|
+
"props": {
|
|
30088
|
+
"title": "Confirm RSVP",
|
|
30089
|
+
"style": "primary",
|
|
30090
|
+
"fullWidth": true,
|
|
30091
|
+
"action": {
|
|
30092
|
+
"actionId": "himi.open",
|
|
30093
|
+
"params": {
|
|
30094
|
+
"screenId": "himi_sign_in",
|
|
30095
|
+
"mode": "signin",
|
|
30096
|
+
"intent": "rsvp"
|
|
30097
|
+
}
|
|
30098
|
+
}
|
|
30099
|
+
}
|
|
30100
|
+
},
|
|
30101
|
+
"modifiers": {
|
|
30102
|
+
"cornerRadius": 8,
|
|
30103
|
+
"pressFeedback": "scale",
|
|
30104
|
+
"haptic": "medium",
|
|
30105
|
+
"hiddenPath": "$service:himiEventsRsvp.hideGuestRsvp"
|
|
30106
|
+
}
|
|
30107
|
+
},
|
|
30416
30108
|
{
|
|
30417
30109
|
"id": "himi_rsvp.confirm",
|
|
30418
30110
|
"body": {
|
|
@@ -160,6 +160,9 @@ function inputId(): string {
|
|
|
160
160
|
/** The time a host opened this screen at (`himalaya.input.start`, ISO 8601), or "". Every load
|
|
161
161
|
* preselects that slot (or opens on its day) until the member picks a day or a time themselves —
|
|
162
162
|
* not just the first, because the boot load and the screen's own `load` can overlap. */
|
|
163
|
+
/** Counts the customer's picks. A load that sees it move ran while they picked a time. */
|
|
164
|
+
let selectionRevision = 0;
|
|
165
|
+
|
|
163
166
|
let pendingStart = (() => {
|
|
164
167
|
const start = (globalThis as { himalaya?: { input?: { start?: unknown } } }).himalaya?.input?.start;
|
|
165
168
|
return typeof start === "string" && Number.isFinite(Date.parse(start)) ? start : "";
|
|
@@ -420,6 +423,48 @@ async function signedInEmail(): Promise<string> {
|
|
|
420
423
|
}
|
|
421
424
|
}
|
|
422
425
|
|
|
426
|
+
// A guest's picked time, kept for the sign-in it needs. Hosts key workers by account, so
|
|
427
|
+
// signing in can start a new worker for this screen, with no selection. `himalaya.storage`
|
|
428
|
+
// is shared by every worker of the app on every host, so a member's load of the same
|
|
429
|
+
// service with nothing selected takes the pick back. Reading never clears it: a new worker's
|
|
430
|
+
// boot load and appear load can run at once, and both must restore the same time. It goes
|
|
431
|
+
// when the member picks a time or books, or after 30 minutes.
|
|
432
|
+
const PENDING_PICK_KEY = "himi.booking.pendingPick.v1";
|
|
433
|
+
const PENDING_PICK_TTL_MS = 30 * 60 * 1000;
|
|
434
|
+
type StorageLike = { getItem(key: string): string | null; setItem(key: string, value: string): void };
|
|
435
|
+
|
|
436
|
+
function appStorage(): StorageLike | undefined {
|
|
437
|
+
return (globalThis as { himalaya?: { storage?: StorageLike } }).himalaya?.storage;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
function writePick(value: string): void {
|
|
441
|
+
try {
|
|
442
|
+
appStorage()?.setItem(PENDING_PICK_KEY, value);
|
|
443
|
+
} catch {
|
|
444
|
+
// No storage on this host: the pick lives only as long as this worker.
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
function rememberPick(serviceId: string, slotId: string): void {
|
|
449
|
+
writePick(JSON.stringify({ serviceId, slotId, at: Date.now() }));
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
function clearPick(): void {
|
|
453
|
+
writePick("");
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
/** The slot a guest picked for `serviceId` in the last 30 minutes, or "". */
|
|
457
|
+
function readPick(serviceId: string): string {
|
|
458
|
+
let pick: { serviceId?: unknown; slotId?: unknown; at?: unknown } | null = null;
|
|
459
|
+
try {
|
|
460
|
+
pick = JSON.parse(appStorage()?.getItem(PENDING_PICK_KEY) || "null");
|
|
461
|
+
} catch {
|
|
462
|
+
// No storage, or a damaged entry: there is no pick to restore.
|
|
463
|
+
}
|
|
464
|
+
const fresh = typeof pick?.at === "number" && Date.now() - pick.at < PENDING_PICK_TTL_MS;
|
|
465
|
+
return fresh && pick?.serviceId === serviceId && typeof pick?.slotId === "string" ? pick.slotId : "";
|
|
466
|
+
}
|
|
467
|
+
|
|
423
468
|
// Wix Bookings appDefId — the catalogReference.appId that wraps a booking as an
|
|
424
469
|
// ecom checkout line item, and the payment appId the native cashier settles under.
|
|
425
470
|
const WIX_BOOKINGS_APP_ID = "13d21c63-b5ec-5912-8397-c3a5ddb27a97";
|
|
@@ -507,7 +552,8 @@ const svc = defineService<S, {
|
|
|
507
552
|
bookingsScreenId: "himi_bookings",
|
|
508
553
|
}),
|
|
509
554
|
actions: {
|
|
510
|
-
load: async (s, arg) => {
|
|
555
|
+
load: async (s, arg): Promise<S> => {
|
|
556
|
+
const revisionAtStart = selectionRevision;
|
|
511
557
|
stashCopy(arg);
|
|
512
558
|
if (!s.id) return derive({ ...s, status: "ready", errored: true });
|
|
513
559
|
let next = derive({ ...s, status: "loading", errored: false, message: "", successMessage: "" });
|
|
@@ -544,22 +590,29 @@ const svc = defineService<S, {
|
|
|
544
590
|
}
|
|
545
591
|
allRows = rows;
|
|
546
592
|
const days = daysOf(rows);
|
|
547
|
-
//
|
|
548
|
-
//
|
|
593
|
+
// A reload runs in the background when the screen shows again. A time the customer
|
|
594
|
+
// picked while it ran wins over the selection this load started from.
|
|
595
|
+
const chosen: S = selectionRevision !== revisionAtStart ? (svc.getState?.() ?? next) : next;
|
|
549
596
|
// A host's `start` (deep entry): that slot preselected, or — taken since — its day.
|
|
550
597
|
const wantedStart = pendingStart;
|
|
551
598
|
const startRow = wantedStart ? rows.find((r) => r.id === slotIdAt(slotsById, wantedStart)) : undefined;
|
|
552
599
|
// The requested day even with no time left on it: "taken since" opens there, nothing selected.
|
|
553
600
|
const startDay = wantedStart ? days.find((d) => d.id === dayKey(wantedStart)) : undefined;
|
|
554
|
-
const
|
|
555
|
-
|
|
556
|
-
const
|
|
601
|
+
const selectionAlive = !!startRow || slotsById.has(chosen.selectedSlotId);
|
|
602
|
+
// A member with no live selection, and no host start, gets back the time they picked as a guest.
|
|
603
|
+
const picked = selectionAlive || wantedStart || !next.isMember ? undefined : rows.find((row) => row.id === readPick(s.id));
|
|
604
|
+
// Keep the customer's day across a reload when it still has times;
|
|
605
|
+
// otherwise open on the first day that has any.
|
|
606
|
+
const keep = days.find((d) => d.id === chosen.selectedDay && d.hasSlots);
|
|
607
|
+
const initialDay = startRow?.dayKey ?? startDay?.id ?? picked?.dayKey ?? keep?.id ?? days.find((d) => d.hasSlots)?.id ?? days[0]?.id ?? "";
|
|
557
608
|
const header = serviceHeaderFields(serviceRes.service);
|
|
558
609
|
return derive(withDay({
|
|
559
610
|
...next,
|
|
560
611
|
days,
|
|
561
|
-
selectedSlotId: startRow ? startRow.id : selectionAlive ?
|
|
562
|
-
selectedLine: startRow ? [startRow.day, startRow.title, startRow.subtitle].filter(Boolean).join(" · ")
|
|
612
|
+
selectedSlotId: startRow ? startRow.id : selectionAlive ? chosen.selectedSlotId : picked?.id ?? "",
|
|
613
|
+
selectedLine: startRow ? [startRow.day, startRow.title, startRow.subtitle].filter(Boolean).join(" · ")
|
|
614
|
+
: selectionAlive ? chosen.selectedLine
|
|
615
|
+
: picked ? [picked.day, picked.title, picked.subtitle].filter(Boolean).join(" · ") : "",
|
|
563
616
|
status: "ready",
|
|
564
617
|
errored: false,
|
|
565
618
|
serviceName: serviceRes.service?.name || copyParam("time.serviceNameFallback", "Choose a time"),
|
|
@@ -593,7 +646,12 @@ const svc = defineService<S, {
|
|
|
593
646
|
? arg
|
|
594
647
|
: ((arg as { id?: string; slotId?: string })?.slotId ?? (arg as { id?: string })?.id ?? "");
|
|
595
648
|
const selected = allRows.find((slot) => slot.id === slotId);
|
|
596
|
-
if (selected)
|
|
649
|
+
if (selected) {
|
|
650
|
+
selectionRevision++;
|
|
651
|
+
pendingStart = "";
|
|
652
|
+
if (s.isMember) clearPick();
|
|
653
|
+
else rememberPick(s.id, slotId);
|
|
654
|
+
}
|
|
597
655
|
return derive({
|
|
598
656
|
...s,
|
|
599
657
|
selectedSlotId: selected ? slotId : s.selectedSlotId,
|
|
@@ -666,6 +724,8 @@ const svc = defineService<S, {
|
|
|
666
724
|
start: hostEventInstant(booking?.startDate) || slot.startDate,
|
|
667
725
|
end: hostEventInstant(booking?.endDate) || slot.endDate,
|
|
668
726
|
});
|
|
727
|
+
// The member acts on the pick now; a later visit must not restore it.
|
|
728
|
+
clearPick();
|
|
669
729
|
// PAID service — FULLY NATIVE in-app payment (mirrors Wix's RN apps): NO
|
|
670
730
|
// hosted-checkout WebView / browser redirect. The chain is
|
|
671
731
|
// createBooking → ecom.createCheckout(booking line item) → ecom.createOrder
|
|
@@ -35,6 +35,9 @@ interface S {
|
|
|
35
35
|
noSuccess: boolean;
|
|
36
36
|
canRsvp: boolean;
|
|
37
37
|
cannotRsvp: boolean;
|
|
38
|
+
/** Hides a guest's RSVP button, which opens a sign-in screen: shown only for a guest with
|
|
39
|
+
* an event to RSVP to, as `cannotRsvp` requires an event for a member's. */
|
|
40
|
+
hideGuestRsvp: boolean;
|
|
38
41
|
errored: boolean;
|
|
39
42
|
notErrored: boolean;
|
|
40
43
|
isLoading: boolean;
|
|
@@ -74,6 +77,7 @@ function derive(s: S): S {
|
|
|
74
77
|
notMember: !s.isMember,
|
|
75
78
|
canRsvp,
|
|
76
79
|
cannotRsvp: !canRsvp,
|
|
80
|
+
hideGuestRsvp: s.isMember || !hasEvent,
|
|
77
81
|
noSuccess: !hasSuccess,
|
|
78
82
|
notErrored: !s.errored,
|
|
79
83
|
noEmpty: s.status === "loading" || s.errored || hasEvent,
|
|
@@ -144,6 +148,7 @@ const svc = defineService<S, {
|
|
|
144
148
|
noSuccess: true,
|
|
145
149
|
canRsvp: false,
|
|
146
150
|
cannotRsvp: true,
|
|
151
|
+
hideGuestRsvp: true,
|
|
147
152
|
errored: false,
|
|
148
153
|
notErrored: true,
|
|
149
154
|
isLoading: true,
|
|
@@ -365,6 +365,11 @@ function authHeadline(s: S, isRegistering: boolean, isRecovering: boolean): { au
|
|
|
365
365
|
authTitle: copyParam("storeAccount.authTitleRsvp", "Sign in to RSVP"),
|
|
366
366
|
authBody: copyParam("storeAccount.authBodyRsvp", "Sign in to RSVP, then we’ll bring you back."),
|
|
367
367
|
};
|
|
368
|
+
case "book":
|
|
369
|
+
return {
|
|
370
|
+
authTitle: copyParam("storeAccount.authTitleBook", "Sign in to book"),
|
|
371
|
+
authBody: copyParam("storeAccount.authBodyBook", "Sign in to book this time, then we’ll bring you back."),
|
|
372
|
+
};
|
|
368
373
|
case "post":
|
|
369
374
|
return {
|
|
370
375
|
authTitle: copyParam("storeAccount.authTitlePost", "Sign in to post"),
|
|
@@ -392,7 +397,7 @@ interface S extends IapRestoreFields {
|
|
|
392
397
|
noMemberImage: boolean;
|
|
393
398
|
authTitle: string;
|
|
394
399
|
authBody: string;
|
|
395
|
-
/** Mid-flow gate intent (`join_group` | `rsvp` | `post` | ""). */
|
|
400
|
+
/** Mid-flow gate intent (`join_group` | `rsvp` | `book` | `post` | ""). */
|
|
396
401
|
authIntent: string;
|
|
397
402
|
authContextName: string;
|
|
398
403
|
returnScreenId: string;
|
|
@@ -9,7 +9,7 @@ interface S {
|
|
|
9
9
|
status: "loading" | "ready";
|
|
10
10
|
orders: Row[];
|
|
11
11
|
emptyText: string;
|
|
12
|
-
/** When true, descriptor hides the guest-only "
|
|
12
|
+
/** When true, descriptor hides the guest-only "Sign in" CTA (hiddenWhen). */
|
|
13
13
|
hideAccountCta: boolean;
|
|
14
14
|
}
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ function norm(o: WixPlanOrder): Row {
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
const EMPTY_MEMBER = "No subscriptions yet";
|
|
22
|
-
const EMPTY_GUEST = "Sign in
|
|
22
|
+
const EMPTY_GUEST = "Sign in to see the subscriptions you’ve joined — we don’t invent sample memberships.";
|
|
23
23
|
const EMPTY_FORBIDDEN = "No subscriptions for this member yet.";
|
|
24
24
|
|
|
25
25
|
/** The signed-in member's email, or "" for anyone else. A visitor's identity is
|