@wix/himalaya-cli 0.1569.0 → 0.1571.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/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/dev-server/src/l10n-strings.d.ts +3 -2
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/core/ts/src/define-app.d.ts +8 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/auth-providers/wix/src/index.d.ts +7 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/business-contact-service.d.ts +17 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/business-contact.d.ts +73 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/index.d.ts +3 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/invite-target.d.ts +1 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/flows/screens/src/invite.d.ts +148 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/blog-v3/src/extensions.d.ts +6 -3
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/auth.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core/validation.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/core.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +575 -91
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/state.mjs +17 -7
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-auth.mjs +7 -1
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-blog.mjs +1 -0
- package/dist/cli.mjs +1897 -1226
- package/dist/preview-assets.generated.bin +0 -0
- package/guides/base44-app-to-himi-app.md +1 -1
- package/guides/capabilities.md +7 -0
- package/guides/getting-started.md +5 -0
- package/guides/himi-json-output.md +11 -0
- package/guides/himi-skill.md +5 -0
- package/guides/one-app-to-himi-app.md +267 -8
- package/guides/sdk-reference.json +2 -2
- package/guides/skill.md +5 -0
- package/guides/splash-screens.md +10 -1
- package/guides/tier-5-add-a-screen.md +20 -0
- package/guides/trim-a-template.md +5 -0
- package/guides/wix-business-context.md +11 -2
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +8 -1
- package/templates/beauty-salon/dev/index.ts +244 -1
- package/templates/beauty-salon/himalaya.content.json +3 -0
- package/templates/beauty-salon/tier5-src/_shared/member-read.ts +52 -0
- package/templates/beauty-salon/tier5-src/_shared/program-description.ts +11 -0
- package/templates/beauty-salon/tier5-src/business-contact/index.ts +6 -0
- package/templates/beauty-salon/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/beauty-salon/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/beauty-salon/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/beauty-salon-owner/config.ts +1 -1
- package/templates/branded-lite/config.ts +8 -1
- package/templates/branded-lite/dev/index.ts +409 -2
- package/templates/branded-lite/himalaya.content.json +3 -0
- package/templates/branded-lite/tier5-src/_shared/member-read.ts +52 -0
- package/templates/branded-lite/tier5-src/_shared/program-description.ts +11 -0
- package/templates/branded-lite/tier5-src/business-contact/index.ts +6 -0
- package/templates/branded-lite/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/branded-lite/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +39 -11
- package/templates/branded-lite/tier5-src/himi-branded-lite-program/index.ts +16 -14
- package/templates/branded-lite/tier5-src/himi-branded-lite-programs/index.ts +3 -7
- package/templates/branded-lite/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/branded-lite/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/branded-lite/tier5-src/wix-spaces-chat-thread/index.ts +101 -34
- package/templates/branded-lite/tier5-src/wix-spaces-forum-post/index.ts +23 -6
- package/templates/branded-lite/tier5-src/wix-spaces-member-detail/index.ts +26 -11
- package/templates/community-club/config.ts +8 -1
- package/templates/community-club/dev/index.ts +278 -2
- package/templates/community-club/himalaya.content.json +3 -0
- package/templates/community-club/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/community-club/tier5-src/_shared/member-read.ts +52 -0
- package/templates/community-club/tier5-src/_shared/program-description.ts +11 -0
- package/templates/community-club/tier5-src/business-contact/index.ts +6 -0
- package/templates/community-club/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/community-club/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/community-club/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/community-club-owner/config.ts +1 -1
- package/templates/events-meetups/config.ts +8 -1
- package/templates/events-meetups/dev/index.ts +278 -2
- package/templates/events-meetups/himalaya.content.json +3 -0
- package/templates/events-meetups/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/events-meetups/tier5-src/_shared/member-read.ts +52 -0
- package/templates/events-meetups/tier5-src/_shared/program-description.ts +11 -0
- package/templates/events-meetups/tier5-src/business-contact/index.ts +6 -0
- package/templates/events-meetups/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/events-meetups/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/events-meetups/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/events-meetups-owner/config.ts +1 -1
- package/templates/gym-fitness/config.ts +8 -1
- package/templates/gym-fitness/dev/index.ts +278 -2
- package/templates/gym-fitness/himalaya.content.json +3 -0
- package/templates/gym-fitness/tier5-src/_shared/member-read.ts +52 -0
- package/templates/gym-fitness/tier5-src/_shared/program-description.ts +11 -0
- package/templates/gym-fitness/tier5-src/business-contact/index.ts +6 -0
- package/templates/gym-fitness/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/gym-fitness/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/gym-fitness/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/gym-fitness/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/gym-fitness-owner/config.ts +1 -1
- package/templates/nonprofit-cause/config.ts +8 -1
- package/templates/nonprofit-cause/dev/index.ts +278 -2
- package/templates/nonprofit-cause/himalaya.content.json +3 -0
- package/templates/nonprofit-cause/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/nonprofit-cause/tier5-src/_shared/member-read.ts +52 -0
- package/templates/nonprofit-cause/tier5-src/_shared/program-description.ts +11 -0
- package/templates/nonprofit-cause/tier5-src/business-contact/index.ts +6 -0
- package/templates/nonprofit-cause/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/nonprofit-cause/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/nonprofit-cause-owner/config.ts +1 -1
- package/templates/owner-lite/config.ts +1 -1
- package/templates/podcast-creator/config.ts +8 -1
- package/templates/podcast-creator/dev/index.ts +278 -2
- package/templates/podcast-creator/himalaya.content.json +3 -0
- package/templates/podcast-creator/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/podcast-creator/tier5-src/_shared/member-read.ts +52 -0
- package/templates/podcast-creator/tier5-src/_shared/program-description.ts +11 -0
- package/templates/podcast-creator/tier5-src/business-contact/index.ts +6 -0
- package/templates/podcast-creator/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/podcast-creator/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/podcast-creator/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/podcast-creator-owner/config.ts +1 -1
- package/templates/portfolio-creative/config.ts +8 -1
- package/templates/portfolio-creative/dev/index.ts +278 -2
- package/templates/portfolio-creative/himalaya.content.json +3 -0
- package/templates/portfolio-creative/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/portfolio-creative/tier5-src/_shared/member-read.ts +52 -0
- package/templates/portfolio-creative/tier5-src/_shared/program-description.ts +11 -0
- package/templates/portfolio-creative/tier5-src/business-contact/index.ts +6 -0
- package/templates/portfolio-creative/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/portfolio-creative/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/portfolio-creative/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/portfolio-creative-owner/config.ts +1 -1
- package/templates/restaurant/config.ts +8 -1
- package/templates/restaurant/dev/index.ts +278 -2
- package/templates/restaurant/himalaya.content.json +3 -0
- package/templates/restaurant/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/restaurant/tier5-src/_shared/member-read.ts +52 -0
- package/templates/restaurant/tier5-src/_shared/program-description.ts +11 -0
- package/templates/restaurant/tier5-src/business-contact/index.ts +6 -0
- package/templates/restaurant/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/restaurant/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/restaurant/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/restaurant-owner/config.ts +1 -1
- package/templates/retail-store/config.ts +8 -1
- package/templates/retail-store/dev/index.ts +244 -1
- package/templates/retail-store/himalaya.content.json +3 -0
- package/templates/retail-store/tier5-src/_shared/branded-load-state.ts +106 -0
- package/templates/retail-store/tier5-src/_shared/member-read.ts +52 -0
- package/templates/retail-store/tier5-src/_shared/program-description.ts +11 -0
- package/templates/retail-store/tier5-src/business-contact/index.ts +6 -0
- package/templates/retail-store/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/retail-store/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/retail-store/tier5-src/himi-store-product/index.ts +6 -9
- package/templates/retail-store-owner/config.ts +1 -1
- package/templates/yoga-studio/config.ts +8 -1
- package/templates/yoga-studio/dev/index.ts +306 -2
- package/templates/yoga-studio/himalaya.content.json +3 -0
- package/templates/yoga-studio/tier5-src/_shared/member-read.ts +52 -0
- package/templates/yoga-studio/tier5-src/_shared/program-description.ts +11 -0
- package/templates/yoga-studio/tier5-src/business-contact/index.ts +6 -0
- package/templates/yoga-studio/tier5-src/himi-blog-post/index.ts +35 -12
- package/templates/yoga-studio/tier5-src/himi-branded-lite-home/index.ts +3 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-program/index.ts +16 -14
- package/templates/yoga-studio/tier5-src/himi-branded-lite-programs/index.ts +3 -7
- package/templates/yoga-studio/tier5-src/himi-events-my-events/index.ts +76 -42
- package/templates/yoga-studio-owner/config.ts +1 -1
|
@@ -6178,6 +6178,219 @@ const SCREENS = runtimeSetting({
|
|
|
6178
6178
|
"bundleVersion": "0.0.1"
|
|
6179
6179
|
}
|
|
6180
6180
|
},
|
|
6181
|
+
"himi_business_contact": {
|
|
6182
|
+
"screenId": "himi_business_contact",
|
|
6183
|
+
"title": "Business contact",
|
|
6184
|
+
"renderer": "sdui_intent",
|
|
6185
|
+
"schemaVersion": 1,
|
|
6186
|
+
"cacheControl": {
|
|
6187
|
+
"maxAge": 0,
|
|
6188
|
+
"staleWhileRevalidate": 0
|
|
6189
|
+
},
|
|
6190
|
+
"payload": {
|
|
6191
|
+
"id": "himi_business_contact.root",
|
|
6192
|
+
"body": {
|
|
6193
|
+
"package": "himalaya",
|
|
6194
|
+
"type": "VStack",
|
|
6195
|
+
"props": {
|
|
6196
|
+
"spacing": 16,
|
|
6197
|
+
"alignment": "leading",
|
|
6198
|
+
"children": [
|
|
6199
|
+
{
|
|
6200
|
+
"id": "himi_business_contact.section",
|
|
6201
|
+
"body": {
|
|
6202
|
+
"package": "himalaya",
|
|
6203
|
+
"type": "VStack",
|
|
6204
|
+
"props": {
|
|
6205
|
+
"spacing": 12,
|
|
6206
|
+
"alignment": "leading",
|
|
6207
|
+
"children": [
|
|
6208
|
+
{
|
|
6209
|
+
"id": "himi_business_contact.section.directions_copy",
|
|
6210
|
+
"body": {
|
|
6211
|
+
"package": "himalaya",
|
|
6212
|
+
"type": "Text",
|
|
6213
|
+
"props": {
|
|
6214
|
+
"text": "Directions",
|
|
6215
|
+
"style": "body",
|
|
6216
|
+
"collapseWhenEmpty": true
|
|
6217
|
+
}
|
|
6218
|
+
},
|
|
6219
|
+
"modifiers": {
|
|
6220
|
+
"hidden": true
|
|
6221
|
+
}
|
|
6222
|
+
},
|
|
6223
|
+
{
|
|
6224
|
+
"id": "himi_business_contact.section.unavailable",
|
|
6225
|
+
"body": {
|
|
6226
|
+
"package": "himalaya",
|
|
6227
|
+
"type": "Text",
|
|
6228
|
+
"props": {
|
|
6229
|
+
"text": "Contact details unavailable",
|
|
6230
|
+
"style": "body",
|
|
6231
|
+
"collapseWhenEmpty": true
|
|
6232
|
+
}
|
|
6233
|
+
}
|
|
6234
|
+
},
|
|
6235
|
+
{
|
|
6236
|
+
"id": "himi_business_contact.section.member_count",
|
|
6237
|
+
"body": {
|
|
6238
|
+
"package": "himalaya",
|
|
6239
|
+
"type": "FragmentSlot",
|
|
6240
|
+
"props": {
|
|
6241
|
+
"casePath": "$service:businessContact.memberCountCase",
|
|
6242
|
+
"defaultCase": "unavailable",
|
|
6243
|
+
"cases": [
|
|
6244
|
+
{
|
|
6245
|
+
"id": "one",
|
|
6246
|
+
"content": {
|
|
6247
|
+
"id": "himi_business_contact.section.members_one",
|
|
6248
|
+
"body": {
|
|
6249
|
+
"package": "himalaya",
|
|
6250
|
+
"type": "HStack",
|
|
6251
|
+
"props": {
|
|
6252
|
+
"spacing": 4,
|
|
6253
|
+
"alignment": "center",
|
|
6254
|
+
"children": [
|
|
6255
|
+
{
|
|
6256
|
+
"id": "himi_business_contact.section.count_one",
|
|
6257
|
+
"body": {
|
|
6258
|
+
"package": "himalaya",
|
|
6259
|
+
"type": "Text",
|
|
6260
|
+
"props": {
|
|
6261
|
+
"text": "$service:businessContact.memberCount",
|
|
6262
|
+
"style": "footnote",
|
|
6263
|
+
"collapseWhenEmpty": true
|
|
6264
|
+
}
|
|
6265
|
+
}
|
|
6266
|
+
},
|
|
6267
|
+
{
|
|
6268
|
+
"id": "himi_business_contact.section.unit_one",
|
|
6269
|
+
"body": {
|
|
6270
|
+
"package": "himalaya",
|
|
6271
|
+
"type": "Text",
|
|
6272
|
+
"props": {
|
|
6273
|
+
"text": "member",
|
|
6274
|
+
"style": "footnote",
|
|
6275
|
+
"collapseWhenEmpty": true
|
|
6276
|
+
}
|
|
6277
|
+
}
|
|
6278
|
+
}
|
|
6279
|
+
]
|
|
6280
|
+
}
|
|
6281
|
+
}
|
|
6282
|
+
}
|
|
6283
|
+
},
|
|
6284
|
+
{
|
|
6285
|
+
"id": "other",
|
|
6286
|
+
"content": {
|
|
6287
|
+
"id": "himi_business_contact.section.members_other",
|
|
6288
|
+
"body": {
|
|
6289
|
+
"package": "himalaya",
|
|
6290
|
+
"type": "HStack",
|
|
6291
|
+
"props": {
|
|
6292
|
+
"spacing": 4,
|
|
6293
|
+
"alignment": "center",
|
|
6294
|
+
"children": [
|
|
6295
|
+
{
|
|
6296
|
+
"id": "himi_business_contact.section.count_other",
|
|
6297
|
+
"body": {
|
|
6298
|
+
"package": "himalaya",
|
|
6299
|
+
"type": "Text",
|
|
6300
|
+
"props": {
|
|
6301
|
+
"text": "$service:businessContact.memberCount",
|
|
6302
|
+
"style": "footnote",
|
|
6303
|
+
"collapseWhenEmpty": true
|
|
6304
|
+
}
|
|
6305
|
+
}
|
|
6306
|
+
},
|
|
6307
|
+
{
|
|
6308
|
+
"id": "himi_business_contact.section.unit_other",
|
|
6309
|
+
"body": {
|
|
6310
|
+
"package": "himalaya",
|
|
6311
|
+
"type": "Text",
|
|
6312
|
+
"props": {
|
|
6313
|
+
"text": "members",
|
|
6314
|
+
"style": "footnote",
|
|
6315
|
+
"collapseWhenEmpty": true
|
|
6316
|
+
}
|
|
6317
|
+
}
|
|
6318
|
+
}
|
|
6319
|
+
]
|
|
6320
|
+
}
|
|
6321
|
+
}
|
|
6322
|
+
}
|
|
6323
|
+
},
|
|
6324
|
+
{
|
|
6325
|
+
"id": "unavailable",
|
|
6326
|
+
"content": {
|
|
6327
|
+
"id": "himi_business_contact.section.members_unavailable",
|
|
6328
|
+
"body": {
|
|
6329
|
+
"package": "himalaya",
|
|
6330
|
+
"type": "Text",
|
|
6331
|
+
"props": {
|
|
6332
|
+
"text": "Member count unavailable",
|
|
6333
|
+
"style": "footnote",
|
|
6334
|
+
"collapseWhenEmpty": true
|
|
6335
|
+
}
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
}
|
|
6339
|
+
]
|
|
6340
|
+
}
|
|
6341
|
+
},
|
|
6342
|
+
"modifiers": {
|
|
6343
|
+
"hidden": true
|
|
6344
|
+
}
|
|
6345
|
+
},
|
|
6346
|
+
{
|
|
6347
|
+
"id": "himi_business_contact.section.feedback",
|
|
6348
|
+
"body": {
|
|
6349
|
+
"package": "himalaya",
|
|
6350
|
+
"type": "Text",
|
|
6351
|
+
"props": {
|
|
6352
|
+
"text": "$service:businessContact.message",
|
|
6353
|
+
"style": "footnote",
|
|
6354
|
+
"collapseWhenEmpty": true
|
|
6355
|
+
}
|
|
6356
|
+
}
|
|
6357
|
+
}
|
|
6358
|
+
]
|
|
6359
|
+
}
|
|
6360
|
+
}
|
|
6361
|
+
}
|
|
6362
|
+
]
|
|
6363
|
+
}
|
|
6364
|
+
},
|
|
6365
|
+
"modifiers": {
|
|
6366
|
+
"background": {
|
|
6367
|
+
"token": "surfacePrimary"
|
|
6368
|
+
},
|
|
6369
|
+
"padding": {
|
|
6370
|
+
"leading": 20,
|
|
6371
|
+
"trailing": 20,
|
|
6372
|
+
"top": 18,
|
|
6373
|
+
"bottom": 28
|
|
6374
|
+
},
|
|
6375
|
+
"onAppear": {
|
|
6376
|
+
"actionId": "tier5.businessContact.load",
|
|
6377
|
+
"args": {
|
|
6378
|
+
"showMemberCount": false
|
|
6379
|
+
}
|
|
6380
|
+
}
|
|
6381
|
+
}
|
|
6382
|
+
},
|
|
6383
|
+
"logicBundle": {
|
|
6384
|
+
"url": "http://localhost:8190/v1/bundles/business-contact?integrity=",
|
|
6385
|
+
"integrity": "",
|
|
6386
|
+
"contentType": "application/javascript+ts-bundle",
|
|
6387
|
+
"declaredCapabilities": [
|
|
6388
|
+
"open_url"
|
|
6389
|
+
],
|
|
6390
|
+
"minBinaryVersion": "0.1.0",
|
|
6391
|
+
"bundleVersion": "0.0.1"
|
|
6392
|
+
}
|
|
6393
|
+
},
|
|
6181
6394
|
"himi_appearance": {
|
|
6182
6395
|
"screenId": "himi_appearance",
|
|
6183
6396
|
"renderer": "sdui_intent",
|
|
@@ -16110,6 +16323,9 @@ const SCREENS = runtimeSetting({
|
|
|
16110
16323
|
"style": "body",
|
|
16111
16324
|
"color": "textSecondary"
|
|
16112
16325
|
}
|
|
16326
|
+
},
|
|
16327
|
+
"modifiers": {
|
|
16328
|
+
"hiddenPath": "$service:himiMyEvents.signInRequired"
|
|
16113
16329
|
}
|
|
16114
16330
|
},
|
|
16115
16331
|
{
|
|
@@ -16124,6 +16340,32 @@ const SCREENS = runtimeSetting({
|
|
|
16124
16340
|
"actionId": "tier5.himiMyEvents.load"
|
|
16125
16341
|
}
|
|
16126
16342
|
}
|
|
16343
|
+
},
|
|
16344
|
+
"modifiers": {
|
|
16345
|
+
"hiddenPath": "$service:himiMyEvents.signInRequired"
|
|
16346
|
+
}
|
|
16347
|
+
},
|
|
16348
|
+
{
|
|
16349
|
+
"id": "himi_my_events.retry.sign_in",
|
|
16350
|
+
"body": {
|
|
16351
|
+
"package": "himalaya",
|
|
16352
|
+
"type": "Button",
|
|
16353
|
+
"props": {
|
|
16354
|
+
"title": "Sign in",
|
|
16355
|
+
"style": "primary",
|
|
16356
|
+
"action": {
|
|
16357
|
+
"actionId": "himi.open",
|
|
16358
|
+
"params": {
|
|
16359
|
+
"screenId": "himi_sign_in",
|
|
16360
|
+
"mode": "signin",
|
|
16361
|
+
"modal": "1"
|
|
16362
|
+
},
|
|
16363
|
+
"presentation": "sheet"
|
|
16364
|
+
}
|
|
16365
|
+
}
|
|
16366
|
+
},
|
|
16367
|
+
"modifiers": {
|
|
16368
|
+
"hiddenPath": "$service:himiMyEvents.noSignIn"
|
|
16127
16369
|
}
|
|
16128
16370
|
}
|
|
16129
16371
|
]
|
|
@@ -16554,7 +16796,11 @@ const SCREENS = runtimeSetting({
|
|
|
16554
16796
|
"bottom": 24
|
|
16555
16797
|
},
|
|
16556
16798
|
"onAppear": {
|
|
16557
|
-
"actionId": "tier5.himiMyEvents.load"
|
|
16799
|
+
"actionId": "tier5.himiMyEvents.load",
|
|
16800
|
+
"params": {
|
|
16801
|
+
"signInScreenId": "himi_sign_in",
|
|
16802
|
+
"memberOnly": "1"
|
|
16803
|
+
}
|
|
16558
16804
|
}
|
|
16559
16805
|
}
|
|
16560
16806
|
},
|
|
@@ -25753,6 +25999,9 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
25753
25999
|
"style": "body",
|
|
25754
26000
|
"color": "textSecondary"
|
|
25755
26001
|
}
|
|
26002
|
+
},
|
|
26003
|
+
"modifiers": {
|
|
26004
|
+
"hiddenPath": "$service:himiBlogPost.signInRequired"
|
|
25756
26005
|
}
|
|
25757
26006
|
},
|
|
25758
26007
|
{
|
|
@@ -25767,6 +26016,32 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
25767
26016
|
"actionId": "tier5.himiBlogPost.retry"
|
|
25768
26017
|
}
|
|
25769
26018
|
}
|
|
26019
|
+
},
|
|
26020
|
+
"modifiers": {
|
|
26021
|
+
"hiddenPath": "$service:himiBlogPost.signInRequired"
|
|
26022
|
+
}
|
|
26023
|
+
},
|
|
26024
|
+
{
|
|
26025
|
+
"id": "himi_blog_post.retry.sign_in",
|
|
26026
|
+
"body": {
|
|
26027
|
+
"package": "himalaya",
|
|
26028
|
+
"type": "Button",
|
|
26029
|
+
"props": {
|
|
26030
|
+
"title": "Sign in",
|
|
26031
|
+
"style": "primary",
|
|
26032
|
+
"action": {
|
|
26033
|
+
"actionId": "himi.open",
|
|
26034
|
+
"params": {
|
|
26035
|
+
"screenId": "himi_sign_in",
|
|
26036
|
+
"mode": "signin",
|
|
26037
|
+
"modal": "1"
|
|
26038
|
+
},
|
|
26039
|
+
"presentation": "sheet"
|
|
26040
|
+
}
|
|
26041
|
+
}
|
|
26042
|
+
},
|
|
26043
|
+
"modifiers": {
|
|
26044
|
+
"hiddenPath": "$service:himiBlogPost.noSignIn"
|
|
25770
26045
|
}
|
|
25771
26046
|
}
|
|
25772
26047
|
]
|
|
@@ -26471,7 +26746,8 @@ const TEMPLATED: { pattern: string; display: string; liveSeed?: LiveSeed; static
|
|
|
26471
26746
|
"onAppear": {
|
|
26472
26747
|
"actionId": "tier5.himiBlogPost.load",
|
|
26473
26748
|
"params": {
|
|
26474
|
-
"id": "__HIMI_ID__"
|
|
26749
|
+
"id": "__HIMI_ID__",
|
|
26750
|
+
"signInScreenId": "himi_sign_in"
|
|
26475
26751
|
}
|
|
26476
26752
|
}
|
|
26477
26753
|
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
// Load-state honesty for the branded-lite vertical workers.
|
|
2
|
+
//
|
|
3
|
+
// These workers used to answer every failed or empty query with representative SAMPLE
|
|
4
|
+
// rows — discount codes, gift-card balances, invoices, reservations, inbox messages —
|
|
5
|
+
// under a "Sample content" banner. On a customer build that is invented data presented
|
|
6
|
+
// as the customer's own: a code that does not exist, a balance in the wrong currency, an
|
|
7
|
+
// "Overdue" invoice, a booking labelled "tap to cancel". The banner did not make it
|
|
8
|
+
// honest; the rows were still the first thing a visitor read.
|
|
9
|
+
//
|
|
10
|
+
// The rule now:
|
|
11
|
+
// • query FAILED → status "error" with a customer sentence, a Retry, and — when
|
|
12
|
+
// Wix refused an anonymous visitor (401) — a Sign in path instead;
|
|
13
|
+
// • query was EMPTY → status "ready", no rows, the vertical's own empty sentence;
|
|
14
|
+
// • sample rows → ONLY when the host explicitly asked for sample data (the web
|
|
15
|
+
// preview's sample data mode, `__himiOwnerPreview: "sample"`).
|
|
16
|
+
// Never on a device, never as a fallback.
|
|
17
|
+
//
|
|
18
|
+
// Every field here is flat and boolean-gated because descriptors can only
|
|
19
|
+
// `hiddenWhen(<path>)` on a TRUE value: `notErrored` hides the error card, `noSignIn`
|
|
20
|
+
// hides the sign-in CTA, `signInRequired` hides Retry when retrying cannot help.
|
|
21
|
+
import { copyParam } from "./himi-copy.js";
|
|
22
|
+
|
|
23
|
+
export interface LoadFlags {
|
|
24
|
+
status: "loading" | "ready" | "error";
|
|
25
|
+
/** The customer-facing failure sentence; "" unless status is "error". */
|
|
26
|
+
error: string;
|
|
27
|
+
signInRequired: boolean;
|
|
28
|
+
notErrored: boolean;
|
|
29
|
+
/** hiddenWhen gate for a loading skeleton. */
|
|
30
|
+
notLoading: boolean;
|
|
31
|
+
/** Loading or failed — gates content that has nothing to say in either. */
|
|
32
|
+
busy: boolean;
|
|
33
|
+
noSignIn: boolean;
|
|
34
|
+
isMock: boolean;
|
|
35
|
+
notMock: boolean;
|
|
36
|
+
notMockEmpty: boolean;
|
|
37
|
+
notMockUnavailable: boolean;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export const LOADING: LoadFlags = {
|
|
41
|
+
status: "loading", error: "", signInRequired: false, notErrored: true, notLoading: false, busy: true, noSignIn: true,
|
|
42
|
+
isMock: false, notMock: true, notMockEmpty: true, notMockUnavailable: true,
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const READY: LoadFlags = { ...LOADING, status: "ready", notLoading: true, busy: false };
|
|
46
|
+
|
|
47
|
+
/** Did the HOST ask for sample data? Only the web preview's sample mode does; a native
|
|
48
|
+
* build, a visitor preview and a live owner preview never carry it. */
|
|
49
|
+
export function samplesRequested(): boolean {
|
|
50
|
+
const input = (globalThis as { himalaya?: { input?: Record<string, unknown> } }).himalaya?.input;
|
|
51
|
+
return input?.__himiOwnerPreview === "sample";
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** Wix refused an ANONYMOUS visitor: signing in is the fix, not retrying. A 403 is not
|
|
55
|
+
* this — it also answers "feature not installed" and a signed-in member without the
|
|
56
|
+
* permission, where a Sign in button leads nowhere — so it stays a Retry-able failure. */
|
|
57
|
+
export function needsSignIn(err: unknown): boolean {
|
|
58
|
+
const msg = String((err as { message?: unknown })?.message ?? err ?? "");
|
|
59
|
+
return /\b401\b|unauthori[sz]ed|unauthenticated/i.test(msg);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface LoadCopy<T> {
|
|
63
|
+
/** The copy namespace (`giftCards`, `coupons`, …) — keys resolve through copyParam. */
|
|
64
|
+
prefix: string;
|
|
65
|
+
/** Shown when the site genuinely has none. */
|
|
66
|
+
empty: string;
|
|
67
|
+
/** Shown when the query failed. */
|
|
68
|
+
error: string;
|
|
69
|
+
/** Shown when Wix refused the visitor (member-only data). */
|
|
70
|
+
signIn: string;
|
|
71
|
+
/** Sample rows for the explicit sample preview ONLY. */
|
|
72
|
+
sample: () => T[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
type Rows<K extends string, T> = { [P in K]: T[] } & { emptyText: string } & LoadFlags;
|
|
76
|
+
|
|
77
|
+
/** A query answered. Rows win; an empty answer is a real empty state. */
|
|
78
|
+
export function loaded<K extends string, T>(key: K, rows: T[], copy: LoadCopy<T>): Rows<K, T> {
|
|
79
|
+
if (rows.length) return { ...READY, [key]: rows, emptyText: "" } as Rows<K, T>;
|
|
80
|
+
if (samplesRequested()) return sampleRows(key, copy, "empty");
|
|
81
|
+
return { ...READY, [key]: [], emptyText: copyParam(`${copy.prefix}.emptyText`, copy.empty) } as Rows<K, T>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** A query threw. Never rows the customer did not create. */
|
|
85
|
+
export function loadFailed<K extends string, T>(key: K, err: unknown, copy: LoadCopy<T>): Rows<K, T> {
|
|
86
|
+
if (samplesRequested()) return sampleRows(key, copy, "unavailable");
|
|
87
|
+
const signIn = needsSignIn(err);
|
|
88
|
+
return {
|
|
89
|
+
...READY,
|
|
90
|
+
status: "error",
|
|
91
|
+
[key]: [],
|
|
92
|
+
emptyText: "",
|
|
93
|
+
error: signIn ? copyParam(`${copy.prefix}.signInText`, copy.signIn) : copyParam(`${copy.prefix}.errorText`, copy.error),
|
|
94
|
+
signInRequired: signIn,
|
|
95
|
+
notErrored: false,
|
|
96
|
+
busy: true,
|
|
97
|
+
noSignIn: !signIn,
|
|
98
|
+
} as Rows<K, T>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function sampleRows<K extends string, T>(key: K, copy: LoadCopy<T>, reason: "empty" | "unavailable"): Rows<K, T> {
|
|
102
|
+
return {
|
|
103
|
+
...READY, [key]: copy.sample(), emptyText: "",
|
|
104
|
+
isMock: true, notMock: false, notMockEmpty: reason !== "empty", notMockUnavailable: reason !== "unavailable",
|
|
105
|
+
} as Rows<K, T>;
|
|
106
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { memberAccess, memberAccessChanged, memberAccessDenied, type MemberAccess } from "./member-access.js";
|
|
2
|
+
import { needsSignIn } from "./branded-load-state.js";
|
|
3
|
+
|
|
4
|
+
/** Public reads stay public. Capture their reader only to reject a result that
|
|
5
|
+
* belongs to the identity/site which was active before the request. */
|
|
6
|
+
export interface ReadAccess { member: MemberAccess; tenant: string; }
|
|
7
|
+
export async function readAccess(): Promise<ReadAccess> {
|
|
8
|
+
const member = await memberAccess();
|
|
9
|
+
const input = (globalThis as { himalaya?: { input?: Record<string, unknown> } }).himalaya?.input;
|
|
10
|
+
return { member, tenant: JSON.stringify([input?.__himiPreferenceAccount ?? "", input?.__himiPreferenceBusiness ?? ""]) };
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export async function assertReadAccess(access: ReadAccess): Promise<void> {
|
|
14
|
+
const current = await readAccess();
|
|
15
|
+
if (current.member.email !== access.member.email || current.member.scope !== access.member.scope || current.tenant !== access.tenant) throw memberAccessChanged();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/** Bridge errors put the actual status first; codes quoted inside the body are data. */
|
|
19
|
+
function httpStatus(error: unknown): string | undefined {
|
|
20
|
+
return /^HTTP\s*(\d{3})\b/i.exec(String((error as { message?: unknown })?.message ?? error))?.[1];
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const NO_READ_SIGN_IN = { signInRequired: false, noSignIn: true };
|
|
24
|
+
|
|
25
|
+
/** An authorization refusal must not fall back to a previously cached article. */
|
|
26
|
+
export function readAccessDenied(error: unknown): boolean {
|
|
27
|
+
let cause = error;
|
|
28
|
+
for (let depth = 0; cause && depth < 4; depth++) {
|
|
29
|
+
const status = httpStatus(cause);
|
|
30
|
+
if (status ? status === "401" || status === "403" : memberAccessDenied(cause) || needsSignIn(cause)) return true;
|
|
31
|
+
cause = (cause as { cause?: unknown }).cause;
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** A permission failure alone says nothing about whether signing in can help.
|
|
37
|
+
* In particular, a private member profile can be unavailable to members too.
|
|
38
|
+
* Only an authentication refusal for a current visitor offers Sign in. Follow
|
|
39
|
+
* SDK wrapper causes (blog getPost preserves its original read error there). */
|
|
40
|
+
export async function readSignInFlags(error: unknown): Promise<typeof NO_READ_SIGN_IN> {
|
|
41
|
+
let authenticationRequired = false;
|
|
42
|
+
let permissionRefused = false;
|
|
43
|
+
let cause = error;
|
|
44
|
+
for (let depth = 0; cause && depth < 4; depth++) {
|
|
45
|
+
const status = httpStatus(cause);
|
|
46
|
+
permissionRefused ||= status === "403";
|
|
47
|
+
authenticationRequired ||= status ? status === "401" : needsSignIn(cause);
|
|
48
|
+
cause = (cause as { cause?: unknown }).cause;
|
|
49
|
+
}
|
|
50
|
+
const signInRequired = !permissionRefused && authenticationRequired && !(await memberAccess()).email;
|
|
51
|
+
return { signInRequired, noSignIn: !signInRequired };
|
|
52
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { WixProgram } from "@himalaya/wix-online-programs";
|
|
2
|
+
|
|
3
|
+
/** v3 nests the body in description.details; older responses use settings or a
|
|
4
|
+
* flat description. The body itself may be a Ricos document or serialized text. */
|
|
5
|
+
export function programDescription(program: WixProgram): unknown {
|
|
6
|
+
const raw = (program as { description?: unknown }).description;
|
|
7
|
+
const nested = raw && typeof raw === "object" ? raw as { details?: unknown; nodes?: unknown } : undefined;
|
|
8
|
+
return program.settings?.description ?? nested?.details
|
|
9
|
+
?? (typeof raw === "string" || Array.isArray(nested?.nodes) ? raw : undefined)
|
|
10
|
+
?? program.details?.description;
|
|
11
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { createBusinessContactService } from "@himalaya/screens";
|
|
2
|
+
|
|
3
|
+
// Contact values and the optional public total are build-time source evidence.
|
|
4
|
+
// No owner API, device location, or cross-site source URL is read by this worker.
|
|
5
|
+
const svc = createBusinessContactService();
|
|
6
|
+
export { svc };
|
|
@@ -9,6 +9,7 @@ import { stashCopy, copyParam, copyTemplate } from "../_shared/himi-copy.js";
|
|
|
9
9
|
import { formatDateMedium, formatMonthDay } from "../_shared/engine-intl.js";
|
|
10
10
|
import { openRichLink } from "../_shared/rich-content-link.js";
|
|
11
11
|
import { richBody, ROW_IMAGE_WIDTH } from "../_shared/rich-body.js";
|
|
12
|
+
import { readAccess, assertReadAccess, readAccessDenied, readSignInFlags, NO_READ_SIGN_IN } from "../_shared/member-read.js";
|
|
12
13
|
|
|
13
14
|
// Offline-first (data-offline): the post body is a public read-through — when the
|
|
14
15
|
// live fetch fails (offline) fall back to the last-synced row the feed cached under
|
|
@@ -34,6 +35,7 @@ interface CommentRow {
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
interface S {
|
|
38
|
+
signInRequired: boolean; noSignIn: boolean; signInScreenId: string;
|
|
37
39
|
status: "loading" | "ready" | "error";
|
|
38
40
|
id: string;
|
|
39
41
|
title: string;
|
|
@@ -214,6 +216,7 @@ function derive(s: S): S {
|
|
|
214
216
|
}
|
|
215
217
|
|
|
216
218
|
const baseState: S = derive({
|
|
219
|
+
...NO_READ_SIGN_IN, signInScreenId: "himi_account",
|
|
217
220
|
status: "loading",
|
|
218
221
|
id: "",
|
|
219
222
|
title: "",
|
|
@@ -280,23 +283,28 @@ async function cachedPostState(s: S, id: string): Promise<S> {
|
|
|
280
283
|
});
|
|
281
284
|
}
|
|
282
285
|
|
|
283
|
-
|
|
286
|
+
let loadVersion = 0;
|
|
287
|
+
async function loadPostState(s: S): Promise<S | undefined> {
|
|
288
|
+
const version = ++loadVersion;
|
|
289
|
+
await svc.prepare();
|
|
290
|
+
const clean = { ...baseState, signInScreenId: s.signInScreenId };
|
|
284
291
|
const id = inputId();
|
|
285
292
|
if (!id) {
|
|
286
|
-
return derive({ ...
|
|
293
|
+
return derive({ ...clean, status: "ready", emptyText: copyParam("blogPost.notFoundText", "Post not found.") });
|
|
287
294
|
}
|
|
288
295
|
try {
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
296
|
+
const access = await readAccess();
|
|
297
|
+
const [postResult, commentsResult] = await Promise.allSettled([getPost(id, {}, { preserveAccessErrors: true }), listBlogComments(id)]);
|
|
298
|
+
if (postResult.status === "rejected") throw postResult.reason;
|
|
299
|
+
await assertReadAccess(access);
|
|
300
|
+
if (version !== loadVersion) return undefined;
|
|
293
301
|
const post = (((postResult.value as unknown as { post?: WixPost }).post) ?? postResult.value) as PostWithExtras;
|
|
294
302
|
const commentsUnavailable = commentsResult.status === "rejected";
|
|
295
303
|
const comments = commentsResult.status === "fulfilled" ? commentsResult.value.map(toCommentRow) : [];
|
|
296
304
|
const cover = imageUrl(post);
|
|
297
305
|
const title = post.title || "Untitled post";
|
|
298
306
|
return derive({
|
|
299
|
-
...
|
|
307
|
+
...clean,
|
|
300
308
|
status: "ready",
|
|
301
309
|
id,
|
|
302
310
|
title,
|
|
@@ -319,14 +327,23 @@ async function loadPostState(s: S): Promise<S> {
|
|
|
319
327
|
errorText: "",
|
|
320
328
|
emptyText: "",
|
|
321
329
|
});
|
|
322
|
-
} catch {
|
|
323
|
-
|
|
330
|
+
} catch (error) {
|
|
331
|
+
const flags = await readSignInFlags(error);
|
|
332
|
+
const failed = derive({ ...clean, ...flags, status: "error", id, errorText: copyParam("blogPost.errorText", "This post could not load.") });
|
|
333
|
+
if (version !== loadVersion) return undefined;
|
|
334
|
+
if (readAccessDenied(error)) return failed;
|
|
335
|
+
const access = await readAccess();
|
|
336
|
+
const cached = await cachedPostState(clean, id);
|
|
337
|
+
try { await assertReadAccess(access); }
|
|
338
|
+
catch { return version === loadVersion ? failed : undefined; }
|
|
339
|
+
return version === loadVersion ? cached : undefined;
|
|
324
340
|
}
|
|
325
341
|
}
|
|
326
342
|
|
|
327
343
|
const svc = defineService<S, {
|
|
328
|
-
|
|
329
|
-
|
|
344
|
+
prepare: (s: S) => S;
|
|
345
|
+
load: (s: S, arg?: unknown) => Promise<S | undefined>;
|
|
346
|
+
retry: (s: S) => Promise<S | undefined>;
|
|
330
347
|
like: (s: S) => Promise<S>;
|
|
331
348
|
unlike: (s: S) => Promise<S>;
|
|
332
349
|
toggleSave: (s: S) => S;
|
|
@@ -338,7 +355,12 @@ const svc = defineService<S, {
|
|
|
338
355
|
}>("himiBlogPost", {
|
|
339
356
|
state: baseState,
|
|
340
357
|
actions: {
|
|
341
|
-
|
|
358
|
+
prepare: (s) => ({ ...s, ...baseState }),
|
|
359
|
+
load: (s, arg) => {
|
|
360
|
+
stashCopy(arg);
|
|
361
|
+
const target = (arg as { signInScreenId?: unknown })?.signInScreenId;
|
|
362
|
+
return loadPostState({ ...s, signInScreenId: target === "himi_sign_in" ? target : s.signInScreenId });
|
|
363
|
+
},
|
|
342
364
|
retry: (s) => loadPostState({ ...s, status: "loading", errorText: "" }),
|
|
343
365
|
like: async (s) => {
|
|
344
366
|
if (!s.id) return derive({ ...s, actionMessage: copyParam("blogPost.noPostMessage", "No post selected.") });
|
|
@@ -409,5 +431,6 @@ const svc = defineService<S, {
|
|
|
409
431
|
},
|
|
410
432
|
});
|
|
411
433
|
|
|
434
|
+
svc.prepare();
|
|
412
435
|
svc.load();
|
|
413
436
|
export { svc };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { descriptionBody } from "../_shared/rich-body.js";
|
|
2
|
+
import { programDescription } from "../_shared/program-description.js";
|
|
1
3
|
import { fetchMemberBookings, type MemberBookingRow } from "../_shared/member-bookings.js";
|
|
2
4
|
import { hostSiteFromInput, hostedExploreCards, hostedHiddenFlags, type HostedExploreCard } from "../_shared/branded-lite-hosted.js";
|
|
3
5
|
import { memberAccess, assertMemberAccess } from "../_shared/member-access.js";
|
|
@@ -675,11 +677,9 @@ async function fetchHomePrograms(): Promise<ProgramCard[]> {
|
|
|
675
677
|
.map((p: WixProgram) => {
|
|
676
678
|
const desc = (p as { description?: unknown }).description;
|
|
677
679
|
const nestedTitle = desc && typeof desc === "object" ? (desc as { title?: string }).title : undefined;
|
|
678
|
-
const nestedDetails = desc && typeof desc === "object" ? (desc as { details?: string }).details : undefined;
|
|
679
680
|
const name = cleanTitle(p.settings?.title ?? nestedTitle ?? p.title) || copyParam("home.programFallbackName", "Program");
|
|
680
681
|
const image = programImage(p);
|
|
681
|
-
const details = (p.
|
|
682
|
-
.replace(/<[^>]+>/g, " ").replace(/\s+/g, " ").trim();
|
|
682
|
+
const details = descriptionBody(programDescription(p)).bodyText.replace(/\s+/g, " ").trim();
|
|
683
683
|
return {
|
|
684
684
|
id: p.id || name,
|
|
685
685
|
name,
|