@wix/himalaya-cli 0.1787.0 → 0.1788.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/members-v1/src/index.d.ts +36 -0
- package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-members.mjs +7 -0
- package/dist/cli.mjs +19 -3
- package/fixtures/wix-canned.json +8 -0
- package/guides/sdk-reference.json +24 -1
- package/package.json +2 -2
- package/templates/beauty-salon/config.ts +29 -1
- package/templates/beauty-salon/dev/index.ts +3702 -1505
- package/templates/beauty-salon/himalaya.content.json +13 -1
- package/templates/beauty-salon/l10n/ar.json +226 -264
- package/templates/beauty-salon/l10n/cs.json +226 -264
- package/templates/beauty-salon/l10n/da.json +226 -264
- package/templates/beauty-salon/l10n/de.json +226 -264
- package/templates/beauty-salon/l10n/el.json +226 -264
- package/templates/beauty-salon/l10n/en.json +158 -199
- package/templates/beauty-salon/l10n/es.json +226 -264
- package/templates/beauty-salon/l10n/fi.json +226 -264
- package/templates/beauty-salon/l10n/fr.json +227 -265
- package/templates/beauty-salon/l10n/he.json +186 -217
- package/templates/beauty-salon/l10n/hu.json +226 -264
- package/templates/beauty-salon/l10n/id.json +226 -264
- package/templates/beauty-salon/l10n/it.json +226 -264
- package/templates/beauty-salon/l10n/ja.json +226 -264
- package/templates/beauty-salon/l10n/ko.json +226 -264
- package/templates/beauty-salon/l10n/lt.json +226 -264
- package/templates/beauty-salon/l10n/nl.json +226 -264
- package/templates/beauty-salon/l10n/no.json +226 -264
- package/templates/beauty-salon/l10n/pl.json +226 -264
- package/templates/beauty-salon/l10n/pt.json +226 -264
- package/templates/beauty-salon/l10n/ru.json +226 -264
- package/templates/beauty-salon/l10n/sv.json +226 -264
- package/templates/beauty-salon/l10n/th.json +226 -264
- package/templates/beauty-salon/l10n/tr.json +226 -264
- package/templates/beauty-salon/l10n/uk.json +226 -264
- package/templates/beauty-salon/l10n/vi.json +226 -264
- package/templates/beauty-salon/l10n/zh.json +226 -264
- package/templates/beauty-salon/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/beauty-salon/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/branded-lite/config.ts +29 -1
- package/templates/branded-lite/dev/index.ts +3720 -1523
- package/templates/branded-lite/himalaya.content.json +13 -1
- package/templates/branded-lite/l10n/ar.json +208 -267
- package/templates/branded-lite/l10n/cs.json +208 -267
- package/templates/branded-lite/l10n/da.json +208 -267
- package/templates/branded-lite/l10n/de.json +208 -267
- package/templates/branded-lite/l10n/el.json +208 -267
- package/templates/branded-lite/l10n/en.json +159 -207
- package/templates/branded-lite/l10n/es.json +208 -267
- package/templates/branded-lite/l10n/fi.json +208 -267
- package/templates/branded-lite/l10n/fr.json +212 -271
- package/templates/branded-lite/l10n/he.json +171 -219
- package/templates/branded-lite/l10n/hu.json +208 -267
- package/templates/branded-lite/l10n/id.json +208 -267
- package/templates/branded-lite/l10n/it.json +208 -267
- package/templates/branded-lite/l10n/ja.json +208 -267
- package/templates/branded-lite/l10n/ko.json +208 -267
- package/templates/branded-lite/l10n/lt.json +208 -267
- package/templates/branded-lite/l10n/nl.json +208 -267
- package/templates/branded-lite/l10n/no.json +208 -267
- package/templates/branded-lite/l10n/pl.json +208 -267
- package/templates/branded-lite/l10n/pt.json +208 -267
- package/templates/branded-lite/l10n/ru.json +208 -267
- package/templates/branded-lite/l10n/sv.json +208 -267
- package/templates/branded-lite/l10n/th.json +208 -267
- package/templates/branded-lite/l10n/tr.json +208 -267
- package/templates/branded-lite/l10n/uk.json +208 -267
- package/templates/branded-lite/l10n/vi.json +208 -267
- package/templates/branded-lite/l10n/zh.json +208 -267
- package/templates/branded-lite/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/branded-lite/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/brandy/README.md +4 -2
- package/templates/brandy/config.ts +12 -1
- package/templates/brandy/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/community-club/config.ts +29 -1
- package/templates/community-club/dev/index.ts +3717 -1520
- package/templates/community-club/himalaya.content.json +13 -1
- package/templates/community-club/l10n/ar.json +218 -262
- package/templates/community-club/l10n/cs.json +218 -262
- package/templates/community-club/l10n/da.json +218 -262
- package/templates/community-club/l10n/de.json +218 -262
- package/templates/community-club/l10n/el.json +218 -262
- package/templates/community-club/l10n/en.json +140 -188
- package/templates/community-club/l10n/es.json +218 -262
- package/templates/community-club/l10n/fi.json +218 -262
- package/templates/community-club/l10n/fr.json +218 -262
- package/templates/community-club/l10n/he.json +180 -216
- package/templates/community-club/l10n/hu.json +218 -262
- package/templates/community-club/l10n/id.json +218 -262
- package/templates/community-club/l10n/it.json +218 -262
- package/templates/community-club/l10n/ja.json +218 -262
- package/templates/community-club/l10n/ko.json +218 -262
- package/templates/community-club/l10n/lt.json +218 -262
- package/templates/community-club/l10n/nl.json +218 -262
- package/templates/community-club/l10n/no.json +218 -262
- package/templates/community-club/l10n/pl.json +218 -262
- package/templates/community-club/l10n/pt.json +218 -262
- package/templates/community-club/l10n/ru.json +218 -262
- package/templates/community-club/l10n/sv.json +218 -262
- package/templates/community-club/l10n/th.json +218 -262
- package/templates/community-club/l10n/tr.json +218 -262
- package/templates/community-club/l10n/uk.json +218 -262
- package/templates/community-club/l10n/vi.json +218 -262
- package/templates/community-club/l10n/zh.json +218 -262
- package/templates/community-club/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/community-club/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/conference/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/events-meetups/config.ts +29 -1
- package/templates/events-meetups/dev/index.ts +3703 -1506
- package/templates/events-meetups/himalaya.content.json +13 -1
- package/templates/events-meetups/l10n/ar.json +218 -262
- package/templates/events-meetups/l10n/cs.json +218 -262
- package/templates/events-meetups/l10n/da.json +218 -262
- package/templates/events-meetups/l10n/de.json +218 -262
- package/templates/events-meetups/l10n/el.json +218 -262
- package/templates/events-meetups/l10n/en.json +140 -188
- package/templates/events-meetups/l10n/es.json +218 -262
- package/templates/events-meetups/l10n/fi.json +218 -262
- package/templates/events-meetups/l10n/fr.json +218 -262
- package/templates/events-meetups/l10n/he.json +180 -216
- package/templates/events-meetups/l10n/hu.json +218 -262
- package/templates/events-meetups/l10n/id.json +218 -262
- package/templates/events-meetups/l10n/it.json +218 -262
- package/templates/events-meetups/l10n/ja.json +218 -262
- package/templates/events-meetups/l10n/ko.json +218 -262
- package/templates/events-meetups/l10n/lt.json +218 -262
- package/templates/events-meetups/l10n/nl.json +218 -262
- package/templates/events-meetups/l10n/no.json +218 -262
- package/templates/events-meetups/l10n/pl.json +218 -262
- package/templates/events-meetups/l10n/pt.json +218 -262
- package/templates/events-meetups/l10n/ru.json +218 -262
- package/templates/events-meetups/l10n/sv.json +218 -262
- package/templates/events-meetups/l10n/th.json +218 -262
- package/templates/events-meetups/l10n/tr.json +218 -262
- package/templates/events-meetups/l10n/uk.json +218 -262
- package/templates/events-meetups/l10n/vi.json +218 -262
- package/templates/events-meetups/l10n/zh.json +218 -262
- package/templates/events-meetups/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/events-meetups/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/fitness-gym/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/gym-fitness/config.ts +29 -1
- package/templates/gym-fitness/dev/index.ts +3711 -1514
- package/templates/gym-fitness/himalaya.content.json +13 -1
- package/templates/gym-fitness/l10n/ar.json +226 -264
- package/templates/gym-fitness/l10n/cs.json +226 -264
- package/templates/gym-fitness/l10n/da.json +226 -264
- package/templates/gym-fitness/l10n/de.json +226 -264
- package/templates/gym-fitness/l10n/el.json +226 -264
- package/templates/gym-fitness/l10n/en.json +161 -202
- package/templates/gym-fitness/l10n/es.json +226 -264
- package/templates/gym-fitness/l10n/fi.json +226 -264
- package/templates/gym-fitness/l10n/fr.json +227 -265
- package/templates/gym-fitness/l10n/he.json +186 -217
- package/templates/gym-fitness/l10n/hu.json +226 -264
- package/templates/gym-fitness/l10n/id.json +226 -264
- package/templates/gym-fitness/l10n/it.json +226 -264
- package/templates/gym-fitness/l10n/ja.json +226 -264
- package/templates/gym-fitness/l10n/ko.json +226 -264
- package/templates/gym-fitness/l10n/lt.json +226 -264
- package/templates/gym-fitness/l10n/nl.json +226 -264
- package/templates/gym-fitness/l10n/no.json +226 -264
- package/templates/gym-fitness/l10n/pl.json +226 -264
- package/templates/gym-fitness/l10n/pt.json +226 -264
- package/templates/gym-fitness/l10n/ru.json +226 -264
- package/templates/gym-fitness/l10n/sv.json +226 -264
- package/templates/gym-fitness/l10n/th.json +226 -264
- package/templates/gym-fitness/l10n/tr.json +226 -264
- package/templates/gym-fitness/l10n/uk.json +226 -264
- package/templates/gym-fitness/l10n/vi.json +226 -264
- package/templates/gym-fitness/l10n/zh.json +226 -264
- package/templates/gym-fitness/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/gym-fitness/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/medical-services/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/nonprofit-cause/config.ts +29 -1
- package/templates/nonprofit-cause/dev/index.ts +3719 -1522
- package/templates/nonprofit-cause/himalaya.content.json +13 -1
- package/templates/nonprofit-cause/l10n/ar.json +218 -262
- package/templates/nonprofit-cause/l10n/cs.json +218 -262
- package/templates/nonprofit-cause/l10n/da.json +218 -262
- package/templates/nonprofit-cause/l10n/de.json +218 -262
- package/templates/nonprofit-cause/l10n/el.json +218 -262
- package/templates/nonprofit-cause/l10n/en.json +145 -193
- package/templates/nonprofit-cause/l10n/es.json +218 -262
- package/templates/nonprofit-cause/l10n/fi.json +218 -262
- package/templates/nonprofit-cause/l10n/fr.json +218 -262
- package/templates/nonprofit-cause/l10n/he.json +180 -216
- package/templates/nonprofit-cause/l10n/hu.json +218 -262
- package/templates/nonprofit-cause/l10n/id.json +218 -262
- package/templates/nonprofit-cause/l10n/it.json +218 -262
- package/templates/nonprofit-cause/l10n/ja.json +218 -262
- package/templates/nonprofit-cause/l10n/ko.json +218 -262
- package/templates/nonprofit-cause/l10n/lt.json +218 -262
- package/templates/nonprofit-cause/l10n/nl.json +218 -262
- package/templates/nonprofit-cause/l10n/no.json +218 -262
- package/templates/nonprofit-cause/l10n/pl.json +218 -262
- package/templates/nonprofit-cause/l10n/pt.json +218 -262
- package/templates/nonprofit-cause/l10n/ru.json +218 -262
- package/templates/nonprofit-cause/l10n/sv.json +218 -262
- package/templates/nonprofit-cause/l10n/th.json +218 -262
- package/templates/nonprofit-cause/l10n/tr.json +218 -262
- package/templates/nonprofit-cause/l10n/uk.json +218 -262
- package/templates/nonprofit-cause/l10n/vi.json +218 -262
- package/templates/nonprofit-cause/l10n/zh.json +218 -262
- package/templates/nonprofit-cause/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/nonprofit-cause/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/personal-fitness-trainer/config.ts +30 -2
- package/templates/personal-fitness-trainer/dev/index.ts +3698 -1476
- package/templates/personal-fitness-trainer/himalaya.content.json +13 -1
- package/templates/personal-fitness-trainer/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/podcast-creator/config.ts +29 -1
- package/templates/podcast-creator/dev/index.ts +3718 -1521
- package/templates/podcast-creator/himalaya.content.json +13 -1
- package/templates/podcast-creator/l10n/ar.json +224 -262
- package/templates/podcast-creator/l10n/cs.json +224 -262
- package/templates/podcast-creator/l10n/da.json +224 -262
- package/templates/podcast-creator/l10n/de.json +224 -262
- package/templates/podcast-creator/l10n/el.json +224 -262
- package/templates/podcast-creator/l10n/en.json +152 -193
- package/templates/podcast-creator/l10n/es.json +224 -262
- package/templates/podcast-creator/l10n/fi.json +224 -262
- package/templates/podcast-creator/l10n/fr.json +227 -265
- package/templates/podcast-creator/l10n/he.json +185 -216
- package/templates/podcast-creator/l10n/hu.json +224 -262
- package/templates/podcast-creator/l10n/id.json +224 -262
- package/templates/podcast-creator/l10n/it.json +224 -262
- package/templates/podcast-creator/l10n/ja.json +224 -262
- package/templates/podcast-creator/l10n/ko.json +224 -262
- package/templates/podcast-creator/l10n/lt.json +224 -262
- package/templates/podcast-creator/l10n/nl.json +224 -262
- package/templates/podcast-creator/l10n/no.json +224 -262
- package/templates/podcast-creator/l10n/pl.json +224 -262
- package/templates/podcast-creator/l10n/pt.json +224 -262
- package/templates/podcast-creator/l10n/ru.json +224 -262
- package/templates/podcast-creator/l10n/sv.json +224 -262
- package/templates/podcast-creator/l10n/th.json +224 -262
- package/templates/podcast-creator/l10n/tr.json +224 -262
- package/templates/podcast-creator/l10n/uk.json +224 -262
- package/templates/podcast-creator/l10n/vi.json +224 -262
- package/templates/podcast-creator/l10n/zh.json +224 -262
- package/templates/podcast-creator/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/podcast-creator/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/portfolio-creative/config.ts +29 -1
- package/templates/portfolio-creative/dev/index.ts +3708 -1511
- package/templates/portfolio-creative/himalaya.content.json +13 -1
- package/templates/portfolio-creative/l10n/ar.json +226 -264
- package/templates/portfolio-creative/l10n/cs.json +226 -264
- package/templates/portfolio-creative/l10n/da.json +226 -264
- package/templates/portfolio-creative/l10n/de.json +226 -264
- package/templates/portfolio-creative/l10n/el.json +226 -264
- package/templates/portfolio-creative/l10n/en.json +155 -196
- package/templates/portfolio-creative/l10n/es.json +226 -264
- package/templates/portfolio-creative/l10n/fi.json +226 -264
- package/templates/portfolio-creative/l10n/fr.json +226 -264
- package/templates/portfolio-creative/l10n/he.json +186 -217
- package/templates/portfolio-creative/l10n/hu.json +226 -264
- package/templates/portfolio-creative/l10n/id.json +226 -264
- package/templates/portfolio-creative/l10n/it.json +226 -264
- package/templates/portfolio-creative/l10n/ja.json +226 -264
- package/templates/portfolio-creative/l10n/ko.json +226 -264
- package/templates/portfolio-creative/l10n/lt.json +226 -264
- package/templates/portfolio-creative/l10n/nl.json +226 -264
- package/templates/portfolio-creative/l10n/no.json +226 -264
- package/templates/portfolio-creative/l10n/pl.json +226 -264
- package/templates/portfolio-creative/l10n/pt.json +226 -264
- package/templates/portfolio-creative/l10n/ru.json +226 -264
- package/templates/portfolio-creative/l10n/sv.json +226 -264
- package/templates/portfolio-creative/l10n/th.json +226 -264
- package/templates/portfolio-creative/l10n/tr.json +226 -264
- package/templates/portfolio-creative/l10n/uk.json +226 -264
- package/templates/portfolio-creative/l10n/vi.json +226 -264
- package/templates/portfolio-creative/l10n/zh.json +226 -264
- package/templates/portfolio-creative/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/portfolio-creative/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/restaurant/config.ts +29 -1
- package/templates/restaurant/dev/index.ts +3706 -1509
- package/templates/restaurant/himalaya.content.json +13 -1
- package/templates/restaurant/l10n/ar.json +226 -264
- package/templates/restaurant/l10n/cs.json +226 -264
- package/templates/restaurant/l10n/da.json +226 -264
- package/templates/restaurant/l10n/de.json +226 -264
- package/templates/restaurant/l10n/el.json +226 -264
- package/templates/restaurant/l10n/en.json +152 -193
- package/templates/restaurant/l10n/es.json +226 -264
- package/templates/restaurant/l10n/fi.json +226 -264
- package/templates/restaurant/l10n/fr.json +226 -264
- package/templates/restaurant/l10n/he.json +186 -217
- package/templates/restaurant/l10n/hu.json +226 -264
- package/templates/restaurant/l10n/id.json +226 -264
- package/templates/restaurant/l10n/it.json +226 -264
- package/templates/restaurant/l10n/ja.json +226 -264
- package/templates/restaurant/l10n/ko.json +226 -264
- package/templates/restaurant/l10n/lt.json +226 -264
- package/templates/restaurant/l10n/nl.json +226 -264
- package/templates/restaurant/l10n/no.json +226 -264
- package/templates/restaurant/l10n/pl.json +226 -264
- package/templates/restaurant/l10n/pt.json +226 -264
- package/templates/restaurant/l10n/ru.json +226 -264
- package/templates/restaurant/l10n/sv.json +226 -264
- package/templates/restaurant/l10n/th.json +226 -264
- package/templates/restaurant/l10n/tr.json +226 -264
- package/templates/restaurant/l10n/uk.json +226 -264
- package/templates/restaurant/l10n/vi.json +226 -264
- package/templates/restaurant/l10n/zh.json +226 -264
- package/templates/restaurant/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/restaurant/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/retail-store/config.ts +29 -1
- package/templates/retail-store/dev/index.ts +3708 -1511
- package/templates/retail-store/himalaya.content.json +13 -1
- package/templates/retail-store/l10n/ar.json +226 -270
- package/templates/retail-store/l10n/cs.json +226 -270
- package/templates/retail-store/l10n/da.json +226 -270
- package/templates/retail-store/l10n/de.json +226 -270
- package/templates/retail-store/l10n/el.json +226 -270
- package/templates/retail-store/l10n/en.json +154 -202
- package/templates/retail-store/l10n/es.json +226 -270
- package/templates/retail-store/l10n/fi.json +226 -270
- package/templates/retail-store/l10n/fr.json +226 -270
- package/templates/retail-store/l10n/he.json +186 -222
- package/templates/retail-store/l10n/hu.json +226 -270
- package/templates/retail-store/l10n/id.json +226 -270
- package/templates/retail-store/l10n/it.json +226 -270
- package/templates/retail-store/l10n/ja.json +226 -270
- package/templates/retail-store/l10n/ko.json +226 -270
- package/templates/retail-store/l10n/lt.json +226 -270
- package/templates/retail-store/l10n/nl.json +226 -270
- package/templates/retail-store/l10n/no.json +226 -270
- package/templates/retail-store/l10n/pl.json +226 -270
- package/templates/retail-store/l10n/pt.json +226 -270
- package/templates/retail-store/l10n/ru.json +226 -270
- package/templates/retail-store/l10n/sv.json +226 -270
- package/templates/retail-store/l10n/th.json +226 -270
- package/templates/retail-store/l10n/tr.json +226 -270
- package/templates/retail-store/l10n/uk.json +226 -270
- package/templates/retail-store/l10n/vi.json +226 -270
- package/templates/retail-store/l10n/zh.json +226 -270
- package/templates/retail-store/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/retail-store/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
- package/templates/salon-spa/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/wholesale-store/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/yoga-studio/config.ts +29 -1
- package/templates/yoga-studio/dev/index.ts +3705 -1508
- package/templates/yoga-studio/himalaya.content.json +13 -1
- package/templates/yoga-studio/l10n/ar.json +224 -262
- package/templates/yoga-studio/l10n/cs.json +224 -262
- package/templates/yoga-studio/l10n/da.json +224 -262
- package/templates/yoga-studio/l10n/de.json +224 -262
- package/templates/yoga-studio/l10n/el.json +224 -262
- package/templates/yoga-studio/l10n/en.json +159 -200
- package/templates/yoga-studio/l10n/es.json +224 -262
- package/templates/yoga-studio/l10n/fi.json +224 -262
- package/templates/yoga-studio/l10n/fr.json +225 -263
- package/templates/yoga-studio/l10n/he.json +185 -216
- package/templates/yoga-studio/l10n/hu.json +224 -262
- package/templates/yoga-studio/l10n/id.json +224 -262
- package/templates/yoga-studio/l10n/it.json +224 -262
- package/templates/yoga-studio/l10n/ja.json +224 -262
- package/templates/yoga-studio/l10n/ko.json +224 -262
- package/templates/yoga-studio/l10n/lt.json +224 -262
- package/templates/yoga-studio/l10n/nl.json +224 -262
- package/templates/yoga-studio/l10n/no.json +224 -262
- package/templates/yoga-studio/l10n/pl.json +224 -262
- package/templates/yoga-studio/l10n/pt.json +224 -262
- package/templates/yoga-studio/l10n/ru.json +224 -262
- package/templates/yoga-studio/l10n/sv.json +224 -262
- package/templates/yoga-studio/l10n/th.json +224 -262
- package/templates/yoga-studio/l10n/tr.json +224 -262
- package/templates/yoga-studio/l10n/uk.json +224 -262
- package/templates/yoga-studio/l10n/vi.json +224 -262
- package/templates/yoga-studio/l10n/zh.json +224 -262
- package/templates/yoga-studio/tier5-src/_shared/member-account-routes.ts +7 -3
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/blocked-members.ts +69 -16
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/index.ts +46 -1082
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/login-info.ts +262 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/personal-info.ts +824 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/privacy.ts +139 -0
- package/templates/yoga-studio/tier5-src/himi-branded-lite-account-settings/shared.ts +136 -0
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
// Privacy — the Public profile switch and the blocked members list. The switch saves at once
|
|
2
|
+
// (joinCommunity / leaveCommunity), so this modal has no Save. Turning it off asks first, because
|
|
3
|
+
// the member also leaves the site's community; turning it on does not. A member record with no
|
|
4
|
+
// privacy status shows no switch, only a notice.
|
|
5
|
+
import { defineService } from "@himalaya/state";
|
|
6
|
+
import { alert } from "@himalaya/ui";
|
|
7
|
+
import { getMyMember, joinCommunity, leaveCommunity } from "@himalaya/wix-members";
|
|
8
|
+
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
9
|
+
import { svc as blockedMembers } from "./blocked-members.js";
|
|
10
|
+
import {
|
|
11
|
+
businessNameOf, clean, fetchMember, isSignedOut, loadErrorVariant, sameAccess, signedOutError, type WixMemberResponse,
|
|
12
|
+
} from "./shared.js";
|
|
13
|
+
|
|
14
|
+
interface S {
|
|
15
|
+
phase: "loading" | "ready" | "error" | "signedOut";
|
|
16
|
+
errorVariant: "offline" | "server";
|
|
17
|
+
memberId: string;
|
|
18
|
+
memberEmail: string;
|
|
19
|
+
memberScope: string;
|
|
20
|
+
businessName: string;
|
|
21
|
+
/** "Choose if other members of {business} can see your profile." */
|
|
22
|
+
description: string;
|
|
23
|
+
/** The API returned PUBLIC or PRIVATE. Otherwise the switch is replaced by a notice. */
|
|
24
|
+
privacyKnown: boolean;
|
|
25
|
+
privacyUnknown: boolean;
|
|
26
|
+
isPublic: boolean;
|
|
27
|
+
statusLine: string;
|
|
28
|
+
busy: boolean;
|
|
29
|
+
/** A switch change that did not save. */
|
|
30
|
+
errorText: string;
|
|
31
|
+
noErrorText: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const EMPTY: S = {
|
|
35
|
+
phase: "loading", errorVariant: "server", memberId: "", memberEmail: "", memberScope: "", businessName: "",
|
|
36
|
+
description: "", privacyKnown: false, privacyUnknown: true, isPublic: false, statusLine: "", busy: false,
|
|
37
|
+
errorText: "", noErrorText: true,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
function statusLine(isPublic: boolean): string {
|
|
41
|
+
return isPublic
|
|
42
|
+
? copyParam("accountSettings.publicProfileOn", "Other members can see your profile.")
|
|
43
|
+
: copyParam("accountSettings.publicProfileOff", "Only you can see your profile.");
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function withStatus(s: S, privacyStatus: unknown): S {
|
|
47
|
+
const status = clean(privacyStatus).toUpperCase();
|
|
48
|
+
const known = status === "PUBLIC" || status === "PRIVATE";
|
|
49
|
+
const isPublic = status === "PUBLIC";
|
|
50
|
+
return { ...s, privacyKnown: known, privacyUnknown: !known, isPublic, statusLine: known ? statusLine(isPublic) : "" };
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let loadVersion = 0;
|
|
54
|
+
let mutationInFlight = false;
|
|
55
|
+
/** The member moved the switch again while a change was saving. That move is not saved, so the
|
|
56
|
+
* switch must be drawn again from the result, or it keeps showing the dropped position. */
|
|
57
|
+
let flipDropped = false;
|
|
58
|
+
|
|
59
|
+
const svc = defineService<S, {
|
|
60
|
+
load: (s: S, arg?: unknown) => Promise<S>;
|
|
61
|
+
showLoading: (s: S) => S;
|
|
62
|
+
begin: (s: S, patch: Partial<S>) => S;
|
|
63
|
+
setPublic: (s: S, arg?: unknown) => Promise<S | undefined>;
|
|
64
|
+
}>("himiBrandedAccountPrivacy", {
|
|
65
|
+
state: { ...EMPTY },
|
|
66
|
+
notHydrated: Object.keys(EMPTY) as (keyof S)[],
|
|
67
|
+
notPersisted: Object.keys(EMPTY) as (keyof S)[],
|
|
68
|
+
actions: {
|
|
69
|
+
showLoading: (s) => ({ ...EMPTY, businessName: s.businessName, description: s.description }),
|
|
70
|
+
begin: (s, patch) => ({ ...s, ...patch, noErrorText: !(patch.errorText ?? s.errorText) }),
|
|
71
|
+
load: async (_s, arg): Promise<S> => {
|
|
72
|
+
const version = ++loadVersion;
|
|
73
|
+
stashCopy(arg);
|
|
74
|
+
const businessName = businessNameOf(arg) || svc.getState().businessName;
|
|
75
|
+
const description = copyTemplate("accountSettings.privacyDescription", "Choose if other members of {business} can see your profile.", { business: businessName });
|
|
76
|
+
if (svc.getState().phase !== "loading") await svc.showLoading();
|
|
77
|
+
// The blocked members section loads with the modal; its own onAppear does the same on a device.
|
|
78
|
+
void blockedMembers.load(arg).catch(() => undefined);
|
|
79
|
+
try {
|
|
80
|
+
const { member, email, scope } = await fetchMember();
|
|
81
|
+
if (version !== loadVersion) return svc.getState();
|
|
82
|
+
return withStatus({ ...EMPTY, phase: "ready", memberId: clean(member.id), memberEmail: email, memberScope: scope, businessName, description }, member.privacyStatus);
|
|
83
|
+
} catch (error) {
|
|
84
|
+
if (version !== loadVersion) return svc.getState();
|
|
85
|
+
return { ...EMPTY, businessName, description, phase: isSignedOut(error) ? "signedOut" : "error", errorVariant: loadErrorVariant(error) };
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
setPublic: async (s, arg): Promise<S | undefined> => {
|
|
89
|
+
if (s.phase !== "ready" || !s.privacyKnown || !s.memberId) return undefined;
|
|
90
|
+
if (mutationInFlight) { flipDropped = true; return undefined; }
|
|
91
|
+
const value = (arg as { value?: unknown } | undefined)?.value;
|
|
92
|
+
const wantPublic = value === true || value === "true";
|
|
93
|
+
if (wantPublic === s.isPublic) return undefined;
|
|
94
|
+
flipDropped = false;
|
|
95
|
+
// Draw the switch from `final`; after a dropped move, flip it first so the host redraws it.
|
|
96
|
+
const settle = async (final: S): Promise<S> => {
|
|
97
|
+
if (flipDropped) { flipDropped = false; await svc.begin({ isPublic: !final.isPublic }); }
|
|
98
|
+
return final;
|
|
99
|
+
};
|
|
100
|
+
mutationInFlight = true;
|
|
101
|
+
try {
|
|
102
|
+
// The switch already moved: follow it, so that a Cancel below moves it back.
|
|
103
|
+
await svc.begin({ isPublic: wantPublic, errorText: "" });
|
|
104
|
+
if (!wantPublic) {
|
|
105
|
+
let confirmed = false;
|
|
106
|
+
try {
|
|
107
|
+
const answer = await alert({
|
|
108
|
+
title: copyParam("accountSettings.makePrivateTitle", "Make your profile private?"),
|
|
109
|
+
message: copyTemplate("accountSettings.makePrivateBody", "Other members can't see your profile. You also leave the community of {business}.", { business: s.businessName }),
|
|
110
|
+
confirmLabel: copyParam("accountSettings.makePrivateConfirm", "Make private"),
|
|
111
|
+
cancelLabel: copyParam("common.cancelCta", "Cancel"),
|
|
112
|
+
});
|
|
113
|
+
confirmed = answer.confirmed;
|
|
114
|
+
} catch { /* no presenter: nothing was confirmed */ }
|
|
115
|
+
// Cancel: the switch and its status line go back to public together.
|
|
116
|
+
if (!confirmed) return await settle({ ...svc.getState(), isPublic: true, statusLine: statusLine(true) });
|
|
117
|
+
}
|
|
118
|
+
await svc.begin({ busy: true });
|
|
119
|
+
if (!(await sameAccess(s.memberEmail, s.memberScope))) throw signedOutError();
|
|
120
|
+
const response = wantPublic ? await joinCommunity() : await leaveCommunity();
|
|
121
|
+
if (response.member?.id !== s.memberId || !response.member.privacyStatus) throw new Error("The profile privacy update was not confirmed for this member.");
|
|
122
|
+
const refreshed = await getMyMember({ fieldsets: ["FULL"] }) as WixMemberResponse;
|
|
123
|
+
if (refreshed.member?.id !== s.memberId || !(await sameAccess(s.memberEmail, s.memberScope))) throw signedOutError();
|
|
124
|
+
// A stale read or a rejected write leaves the OLD status in the readback: that is not a save.
|
|
125
|
+
const status = clean(refreshed.member.privacyStatus).toUpperCase();
|
|
126
|
+
if (status !== (wantPublic ? "PUBLIC" : "PRIVATE")) throw new Error("The profile privacy update was not confirmed by the readback.");
|
|
127
|
+
return await settle({ ...withStatus(svc.getState(), status), busy: false, errorText: "", noErrorText: true });
|
|
128
|
+
} catch (error) {
|
|
129
|
+
// The member changed mid-save: show none of the previous member's privacy, only Sign in.
|
|
130
|
+
if (isSignedOut(error)) return { ...EMPTY, businessName: s.businessName, description: s.description, phase: "signedOut" };
|
|
131
|
+
const latest = svc.getState();
|
|
132
|
+
return await settle({ ...latest, isPublic: s.isPublic, statusLine: statusLine(s.isPublic), busy: false,
|
|
133
|
+
errorText: copyParam("accountSettings.privacyError", "Your privacy setting was not updated."), noErrorText: false });
|
|
134
|
+
} finally { mutationInFlight = false; }
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
export { svc as privacy };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// Shared by the Account settings menu and its three modals (Personal info, Login info with its
|
|
2
|
+
// Change password step, Privacy). Each modal is its own screen, so each boots this bundle in its
|
|
3
|
+
// own worker and loads the member itself: nothing here is shared state, only the checks.
|
|
4
|
+
import { dispatch } from "@himalaya/dispatch";
|
|
5
|
+
import { classifyLoadError } from "@himalaya/state";
|
|
6
|
+
import { getMyMember } from "@himalaya/wix-members";
|
|
7
|
+
import { getMyData } from "@himalaya/wix-users";
|
|
8
|
+
import { hostSiteFromInput } from "../_shared/branded-lite-hosted.js";
|
|
9
|
+
import { memberAccess } from "../_shared/member-access.js";
|
|
10
|
+
import type { MemberAccountRoutes } from "../_shared/member-account-routes.js";
|
|
11
|
+
|
|
12
|
+
export type WixMemberRecord = {
|
|
13
|
+
id?: string;
|
|
14
|
+
loginEmail?: string;
|
|
15
|
+
contact?: {
|
|
16
|
+
firstName?: string;
|
|
17
|
+
lastName?: string;
|
|
18
|
+
phones?: string[];
|
|
19
|
+
birthdate?: string;
|
|
20
|
+
company?: string;
|
|
21
|
+
jobTitle?: string;
|
|
22
|
+
customFields?: Record<string, { name?: string; value?: unknown } | undefined>;
|
|
23
|
+
};
|
|
24
|
+
profile?: { nickname?: string; title?: string; slug?: string; photo?: { id?: string; url?: string } };
|
|
25
|
+
privacyStatus?: string;
|
|
26
|
+
};
|
|
27
|
+
export type WixMemberResponse = { member?: WixMemberRecord };
|
|
28
|
+
|
|
29
|
+
export function rawText(value: unknown): string { return typeof value === "string" ? value : ""; }
|
|
30
|
+
export function clean(value: unknown): string { return rawText(value).trim(); }
|
|
31
|
+
|
|
32
|
+
export function signedOutError(): Error {
|
|
33
|
+
return Object.assign(new Error("signed_out"), { code: "signed_out" });
|
|
34
|
+
}
|
|
35
|
+
export function isSignedOut(error: unknown): boolean {
|
|
36
|
+
return (error as { code?: string } | null)?.code === "signed_out";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** The load-error variant the modals' ErrorState draws: `offline` only when the request never left. */
|
|
40
|
+
export function loadErrorVariant(error: unknown): "offline" | "server" {
|
|
41
|
+
return classifyLoadError(error) === "offline" ? "offline" : "server";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** The site a hosted build was opened for (`himalaya.input.__himiHostSite`), or "" when the build
|
|
45
|
+
* is not hosted. A hosted build serves many businesses, so this wins over the build's own name. */
|
|
46
|
+
export const hostedBusinessName = clean(hostSiteFromInput((globalThis as { himalaya?: { input?: unknown } }).himalaya?.input)?.name);
|
|
47
|
+
|
|
48
|
+
/** The business name each modal shows as its subtitle and in its copy: the hosted site's, else the
|
|
49
|
+
* descriptor param (the build's own business). */
|
|
50
|
+
export function businessNameOf(arg: unknown): string {
|
|
51
|
+
return hostedBusinessName || clean((arg as { businessName?: unknown } | undefined)?.businessName);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** The signed-in member's own record, read with the member's token, and the identity it was read for. */
|
|
55
|
+
export async function fetchMember(siteUrlInput?: unknown): Promise<{ email: string; scope: string; siteUrl: string; member: WixMemberRecord & { id: string } }> {
|
|
56
|
+
const access = await memberAccess();
|
|
57
|
+
if (!access.email) throw signedOutError();
|
|
58
|
+
const response = await getMyMember({ fieldsets: ["FULL"] }) as WixMemberResponse;
|
|
59
|
+
if (!response.member?.id) throw new Error("The signed-in member profile is unavailable.");
|
|
60
|
+
const after = await memberAccess();
|
|
61
|
+
if (!after.email || after.email !== access.email || after.scope !== access.scope) throw signedOutError();
|
|
62
|
+
const siteUrl = clean(siteUrlInput).replace(/\/$/, "");
|
|
63
|
+
return { email: access.email, scope: access.scope, siteUrl, member: response.member as WixMemberRecord & { id: string } };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/** The same member is still signed in, by email, scope and member id. */
|
|
67
|
+
export async function currentMemberRecordMatches(email: string, scope: string, memberId: string): Promise<boolean> {
|
|
68
|
+
const before = await memberAccess();
|
|
69
|
+
if (!before.email || before.email !== email || before.scope !== scope) return false;
|
|
70
|
+
const response = await getMyMember({ fieldsets: ["FULL"] }) as WixMemberResponse;
|
|
71
|
+
const after = await memberAccess();
|
|
72
|
+
return response.member?.id === memberId && after.email === email && after.scope === scope;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** Who is signed in: a member, nobody, or `unavailable` when the host could not say at all.
|
|
76
|
+
* `memberAccess()` reads both failures as "nobody"; the menu must not ask a member to sign in
|
|
77
|
+
* because the identity read failed. Older hosts without `memberIdentity` answer through
|
|
78
|
+
* wix-users (the same rung memberAccess uses); a host that fails both ways is unavailable. */
|
|
79
|
+
export async function memberIdentityState(): Promise<"member" | "guest" | "unavailable"> {
|
|
80
|
+
let raw: unknown;
|
|
81
|
+
let unavailable = false;
|
|
82
|
+
try { raw = await dispatch("himi.wix.memberIdentity"); }
|
|
83
|
+
catch { unavailable = true; }
|
|
84
|
+
const value = raw as { email?: unknown; signedIn?: unknown; payload?: { email?: unknown; signedIn?: unknown } } | null;
|
|
85
|
+
// A host can say a member is signed in before it has the email.
|
|
86
|
+
if (clean(value?.email ?? value?.payload?.email) || (value?.signedIn ?? value?.payload?.signedIn) === true) return "member";
|
|
87
|
+
if (!unavailable) return "guest";
|
|
88
|
+
try {
|
|
89
|
+
const profile = await getMyData();
|
|
90
|
+
return clean(profile.email ?? profile.contactEmail) ? "member" : "guest";
|
|
91
|
+
} catch {
|
|
92
|
+
return "unavailable";
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/** Same identity by email and scope alone (no network). */
|
|
97
|
+
export async function sameAccess(email: string, scope: string): Promise<boolean> {
|
|
98
|
+
const current = await memberAccess();
|
|
99
|
+
return !!current.email && current.email === email && current.scope === scope;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
/** An http(s) URL split at its authority (between `//` and the first `/`, `?` or `#`). A worker has
|
|
103
|
+
* no URL global, so the authority is split by hand. */
|
|
104
|
+
const HTTP_URL = /^https?:\/\/([^/?#]*)(?:[/?#]\S*)?$/i;
|
|
105
|
+
/** A website handoff needs a real http(s) site: the documented placeholder (example.com) never counts,
|
|
106
|
+
* and neither does a URL with userinfo (`https://shop.acme.com@evil.example` opens evil.example). */
|
|
107
|
+
export function siteHandoffAvailable(siteUrl: string): boolean {
|
|
108
|
+
const match = HTTP_URL.exec(siteUrl);
|
|
109
|
+
if (!match || siteUrl.includes("\\")) return false;
|
|
110
|
+
const authority = match[1];
|
|
111
|
+
if (authority.includes("@")) return false;
|
|
112
|
+
const host = authority.replace(/:\d+$/, "").toLowerCase();
|
|
113
|
+
if (!host || /[\s:]/.test(host)) return false;
|
|
114
|
+
return host !== "example.com" && !host.endsWith(".example.com");
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function memberInitials(firstName: string, lastName: string, nickname: string): string {
|
|
118
|
+
return ([firstName[0], lastName[0]].filter(Boolean).join("") || nickname.slice(0, 1) || "M").toUpperCase();
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/** Login info's Password section.
|
|
122
|
+
* - `row`: this app changes the password (a native app on HimalayaCore 1.5.0 or later).
|
|
123
|
+
* - `notice-preview`: the web host, a preview of the app.
|
|
124
|
+
* - `notice-here`: inside another Wix app, an older binary, or an unknown platform and version. */
|
|
125
|
+
export type PasswordMode = "row" | "notice-preview" | "notice-here";
|
|
126
|
+
export function passwordMode(routes: Pick<MemberAccountRoutes, "passwordCredentials" | "webPreview">): PasswordMode {
|
|
127
|
+
if (routes.passwordCredentials) return "row";
|
|
128
|
+
return routes.webPreview ? "notice-preview" : "notice-here";
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** The case the Password section draws: the mode, and for a notice whether it links the website. */
|
|
132
|
+
export function passwordCase(mode: PasswordMode, siteLink: boolean): string {
|
|
133
|
+
if (mode === "row") return "row";
|
|
134
|
+
const base = mode === "notice-preview" ? "preview" : "here";
|
|
135
|
+
return siteLink ? `${base}-link` : base;
|
|
136
|
+
}
|