@wix/himalaya-cli 0.1900.0 → 0.1901.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/app-config.d.ts +4 -0
- package/dist/cli.mjs +4 -1
- package/guides/ads.md +3 -2
- package/package.json +2 -2
- package/templates/beauty-salon/dev/index.ts +2 -1
- package/templates/beauty-salon/l10n/ar.json +5 -0
- package/templates/beauty-salon/l10n/cs.json +5 -0
- package/templates/beauty-salon/l10n/da.json +5 -0
- package/templates/beauty-salon/l10n/de.json +5 -0
- package/templates/beauty-salon/l10n/el.json +5 -0
- package/templates/beauty-salon/l10n/es.json +5 -0
- package/templates/beauty-salon/l10n/fi.json +5 -0
- package/templates/beauty-salon/l10n/fr.json +5 -0
- package/templates/beauty-salon/l10n/he.json +4 -0
- package/templates/beauty-salon/l10n/hu.json +5 -0
- package/templates/beauty-salon/l10n/id.json +5 -0
- package/templates/beauty-salon/l10n/it.json +5 -0
- package/templates/beauty-salon/l10n/ja.json +5 -0
- package/templates/beauty-salon/l10n/ko.json +5 -0
- package/templates/beauty-salon/l10n/lt.json +5 -0
- package/templates/beauty-salon/l10n/nl.json +5 -0
- package/templates/beauty-salon/l10n/no.json +5 -0
- package/templates/beauty-salon/l10n/pl.json +5 -0
- package/templates/beauty-salon/l10n/pt.json +5 -0
- package/templates/beauty-salon/l10n/ru.json +5 -0
- package/templates/beauty-salon/l10n/sv.json +5 -0
- package/templates/beauty-salon/l10n/th.json +5 -0
- package/templates/beauty-salon/l10n/tr.json +5 -0
- package/templates/beauty-salon/l10n/uk.json +5 -0
- package/templates/beauty-salon/l10n/vi.json +5 -0
- package/templates/beauty-salon/l10n/zh.json +5 -0
- package/templates/beauty-salon/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/beauty-salon/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/beauty-salon/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/branded-lite/dev/index.ts +2 -1
- package/templates/branded-lite/l10n/ar.json +5 -0
- package/templates/branded-lite/l10n/cs.json +5 -0
- package/templates/branded-lite/l10n/da.json +5 -0
- package/templates/branded-lite/l10n/de.json +5 -0
- package/templates/branded-lite/l10n/el.json +5 -0
- package/templates/branded-lite/l10n/es.json +5 -0
- package/templates/branded-lite/l10n/fi.json +5 -0
- package/templates/branded-lite/l10n/fr.json +5 -0
- package/templates/branded-lite/l10n/he.json +4 -0
- package/templates/branded-lite/l10n/hu.json +5 -0
- package/templates/branded-lite/l10n/id.json +5 -0
- package/templates/branded-lite/l10n/it.json +5 -0
- package/templates/branded-lite/l10n/ja.json +5 -0
- package/templates/branded-lite/l10n/ko.json +5 -0
- package/templates/branded-lite/l10n/lt.json +5 -0
- package/templates/branded-lite/l10n/nl.json +5 -0
- package/templates/branded-lite/l10n/no.json +5 -0
- package/templates/branded-lite/l10n/pl.json +5 -0
- package/templates/branded-lite/l10n/pt.json +5 -0
- package/templates/branded-lite/l10n/ru.json +5 -0
- package/templates/branded-lite/l10n/sv.json +5 -0
- package/templates/branded-lite/l10n/th.json +5 -0
- package/templates/branded-lite/l10n/tr.json +5 -0
- package/templates/branded-lite/l10n/uk.json +5 -0
- package/templates/branded-lite/l10n/vi.json +5 -0
- package/templates/branded-lite/l10n/zh.json +5 -0
- package/templates/branded-lite/recipes/events-inline.json +2 -2
- package/templates/branded-lite/recipes/subscriptions-list.json +2 -1
- package/templates/branded-lite/tier5-src/_shared/my-subscriptions-section.ts +6 -8
- package/templates/branded-lite/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/branded-lite/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/branded-lite/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/brandy/dev/member-screens.ts +4 -2
- package/templates/brandy/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/brandy/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/brandy/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/fitness-gym/dev/index.ts +2 -1
- package/templates/fitness-gym/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/fitness-gym/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/fitness-gym/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/gym-fitness/dev/index.ts +2 -1
- package/templates/gym-fitness/l10n/ar.json +5 -0
- package/templates/gym-fitness/l10n/cs.json +5 -0
- package/templates/gym-fitness/l10n/da.json +5 -0
- package/templates/gym-fitness/l10n/de.json +5 -0
- package/templates/gym-fitness/l10n/el.json +5 -0
- package/templates/gym-fitness/l10n/es.json +5 -0
- package/templates/gym-fitness/l10n/fi.json +5 -0
- package/templates/gym-fitness/l10n/fr.json +5 -0
- package/templates/gym-fitness/l10n/he.json +4 -0
- package/templates/gym-fitness/l10n/hu.json +5 -0
- package/templates/gym-fitness/l10n/id.json +5 -0
- package/templates/gym-fitness/l10n/it.json +5 -0
- package/templates/gym-fitness/l10n/ja.json +5 -0
- package/templates/gym-fitness/l10n/ko.json +5 -0
- package/templates/gym-fitness/l10n/lt.json +5 -0
- package/templates/gym-fitness/l10n/nl.json +5 -0
- package/templates/gym-fitness/l10n/no.json +5 -0
- package/templates/gym-fitness/l10n/pl.json +5 -0
- package/templates/gym-fitness/l10n/pt.json +5 -0
- package/templates/gym-fitness/l10n/ru.json +5 -0
- package/templates/gym-fitness/l10n/sv.json +5 -0
- package/templates/gym-fitness/l10n/th.json +5 -0
- package/templates/gym-fitness/l10n/tr.json +5 -0
- package/templates/gym-fitness/l10n/uk.json +5 -0
- package/templates/gym-fitness/l10n/vi.json +5 -0
- package/templates/gym-fitness/l10n/zh.json +5 -0
- package/templates/gym-fitness/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/gym-fitness/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/gym-fitness/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/nonprofit-cause/dev/index.ts +2 -1
- package/templates/nonprofit-cause/l10n/ar.json +5 -0
- package/templates/nonprofit-cause/l10n/cs.json +5 -0
- package/templates/nonprofit-cause/l10n/da.json +5 -0
- package/templates/nonprofit-cause/l10n/de.json +5 -0
- package/templates/nonprofit-cause/l10n/el.json +5 -0
- package/templates/nonprofit-cause/l10n/es.json +5 -0
- package/templates/nonprofit-cause/l10n/fi.json +5 -0
- package/templates/nonprofit-cause/l10n/fr.json +5 -0
- package/templates/nonprofit-cause/l10n/he.json +4 -0
- package/templates/nonprofit-cause/l10n/hu.json +5 -0
- package/templates/nonprofit-cause/l10n/id.json +5 -0
- package/templates/nonprofit-cause/l10n/it.json +5 -0
- package/templates/nonprofit-cause/l10n/ja.json +5 -0
- package/templates/nonprofit-cause/l10n/ko.json +5 -0
- package/templates/nonprofit-cause/l10n/lt.json +5 -0
- package/templates/nonprofit-cause/l10n/nl.json +5 -0
- package/templates/nonprofit-cause/l10n/no.json +5 -0
- package/templates/nonprofit-cause/l10n/pl.json +5 -0
- package/templates/nonprofit-cause/l10n/pt.json +5 -0
- package/templates/nonprofit-cause/l10n/ru.json +5 -0
- package/templates/nonprofit-cause/l10n/sv.json +5 -0
- package/templates/nonprofit-cause/l10n/th.json +5 -0
- package/templates/nonprofit-cause/l10n/tr.json +5 -0
- package/templates/nonprofit-cause/l10n/uk.json +5 -0
- package/templates/nonprofit-cause/l10n/vi.json +5 -0
- package/templates/nonprofit-cause/l10n/zh.json +5 -0
- package/templates/nonprofit-cause/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/nonprofit-cause/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/nonprofit-cause/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/personal-fitness-trainer/dev/index.ts +2 -1
- package/templates/personal-fitness-trainer/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/personal-fitness-trainer/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/podcast-creator/dev/index.ts +2 -1
- package/templates/podcast-creator/l10n/ar.json +5 -0
- package/templates/podcast-creator/l10n/cs.json +5 -0
- package/templates/podcast-creator/l10n/da.json +5 -0
- package/templates/podcast-creator/l10n/de.json +5 -0
- package/templates/podcast-creator/l10n/el.json +5 -0
- package/templates/podcast-creator/l10n/es.json +5 -0
- package/templates/podcast-creator/l10n/fi.json +5 -0
- package/templates/podcast-creator/l10n/fr.json +5 -0
- package/templates/podcast-creator/l10n/he.json +4 -0
- package/templates/podcast-creator/l10n/hu.json +5 -0
- package/templates/podcast-creator/l10n/id.json +5 -0
- package/templates/podcast-creator/l10n/it.json +5 -0
- package/templates/podcast-creator/l10n/ja.json +5 -0
- package/templates/podcast-creator/l10n/ko.json +5 -0
- package/templates/podcast-creator/l10n/lt.json +5 -0
- package/templates/podcast-creator/l10n/nl.json +5 -0
- package/templates/podcast-creator/l10n/no.json +5 -0
- package/templates/podcast-creator/l10n/pl.json +5 -0
- package/templates/podcast-creator/l10n/pt.json +5 -0
- package/templates/podcast-creator/l10n/ru.json +5 -0
- package/templates/podcast-creator/l10n/sv.json +5 -0
- package/templates/podcast-creator/l10n/th.json +5 -0
- package/templates/podcast-creator/l10n/tr.json +5 -0
- package/templates/podcast-creator/l10n/uk.json +5 -0
- package/templates/podcast-creator/l10n/vi.json +5 -0
- package/templates/podcast-creator/l10n/zh.json +5 -0
- package/templates/podcast-creator/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/podcast-creator/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/podcast-creator/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/professional-services/dev/index.ts +2 -1
- package/templates/professional-services/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/professional-services/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/professional-services/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
- package/templates/yoga-studio/dev/index.ts +2 -1
- package/templates/yoga-studio/l10n/ar.json +5 -0
- package/templates/yoga-studio/l10n/cs.json +5 -0
- package/templates/yoga-studio/l10n/da.json +5 -0
- package/templates/yoga-studio/l10n/de.json +5 -0
- package/templates/yoga-studio/l10n/el.json +5 -0
- package/templates/yoga-studio/l10n/es.json +5 -0
- package/templates/yoga-studio/l10n/fi.json +5 -0
- package/templates/yoga-studio/l10n/fr.json +5 -0
- package/templates/yoga-studio/l10n/he.json +4 -0
- package/templates/yoga-studio/l10n/hu.json +5 -0
- package/templates/yoga-studio/l10n/id.json +5 -0
- package/templates/yoga-studio/l10n/it.json +5 -0
- package/templates/yoga-studio/l10n/ja.json +5 -0
- package/templates/yoga-studio/l10n/ko.json +5 -0
- package/templates/yoga-studio/l10n/lt.json +5 -0
- package/templates/yoga-studio/l10n/nl.json +5 -0
- package/templates/yoga-studio/l10n/no.json +5 -0
- package/templates/yoga-studio/l10n/pl.json +5 -0
- package/templates/yoga-studio/l10n/pt.json +5 -0
- package/templates/yoga-studio/l10n/ru.json +5 -0
- package/templates/yoga-studio/l10n/sv.json +5 -0
- package/templates/yoga-studio/l10n/th.json +5 -0
- package/templates/yoga-studio/l10n/tr.json +5 -0
- package/templates/yoga-studio/l10n/uk.json +5 -0
- package/templates/yoga-studio/l10n/vi.json +5 -0
- package/templates/yoga-studio/l10n/zh.json +5 -0
- package/templates/yoga-studio/tier5-src/_shared/pricing-plan-display.ts +39 -0
- package/templates/yoga-studio/tier5-src/wix-spaces-my-subscriptions/index.ts +5 -5
- package/templates/yoga-studio/tier5-src/wix-spaces-subscription-detail/index.ts +3 -2
|
@@ -7412,6 +7412,10 @@
|
|
|
7412
7412
|
"source": "Valid until",
|
|
7413
7413
|
"translation": "בתוקף עד"
|
|
7414
7414
|
},
|
|
7415
|
+
"h_40895070d6bf": {
|
|
7416
|
+
"source": "Valid until canceled",
|
|
7417
|
+
"translation": "בתוקף עד לביטול"
|
|
7418
|
+
},
|
|
7415
7419
|
"h_513a2ae3716f": {
|
|
7416
7420
|
"source": "Subscriptions could not be loaded.",
|
|
7417
7421
|
"translation": "לא ניתן לטעון את המנויים."
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Érvényes eddig",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Lemondásig érvényes",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Az előfizetéseket nem sikerült betölteni.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Berlaku hingga",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Berlaku hingga dibatalkan",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Langganan tidak dapat dimuat.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Valido fino al",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Valido fino alla disdetta",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Impossibile caricare gli abbonamenti.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "有効期限",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "解約まで有効",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "サブスクリプションを読み込めませんでした。",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "유효 기간",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "해지 시까지 유효",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "구독을 불러올 수 없어요.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Galioja iki",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Galioja iki atšaukimo",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Nepavyko įkelti prenumeratų.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Geldig tot",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Geldig tot opzegging",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Abonnementen konden niet worden geladen.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Gyldig til",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Gyldig til oppsigelse",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Abonnementene kunne ikke lastes inn.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Ważne do",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Ważne do czasu anulowania",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Nie udało się wczytać subskrypcji.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Válido até",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Válido até o cancelamento",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Não foi possível carregar as assinaturas.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Действует до",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Действует до отмены",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Не удалось загрузить подписки.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Giltig till",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Giltig tills vidare",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Det gick inte att läsa in prenumerationerna.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "ใช้ได้ถึง",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "ใช้ได้จนกว่าจะยกเลิก",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "โหลดการสมัครใช้งานไม่ได้",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Geçerlilik tarihi",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "İptal edilene kadar geçerli",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Abonelikler yüklenemedi.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Діє до",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Діє до скасування",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Не вдалося завантажити підписки.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "Có hiệu lực đến",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "Có hiệu lực đến khi hủy",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "Không thể tải các gói đăng ký.",
|
|
@@ -9052,6 +9052,11 @@
|
|
|
9052
9052
|
"translation": "有效期限至",
|
|
9053
9053
|
"origin": "machine"
|
|
9054
9054
|
},
|
|
9055
|
+
"h_40895070d6bf": {
|
|
9056
|
+
"source": "Valid until canceled",
|
|
9057
|
+
"translation": "有效期至取消为止",
|
|
9058
|
+
"origin": "machine"
|
|
9059
|
+
},
|
|
9055
9060
|
"h_513a2ae3716f": {
|
|
9056
9061
|
"source": "Subscriptions could not be loaded.",
|
|
9057
9062
|
"translation": "無法載入訂閱。",
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
}
|
|
179
179
|
},
|
|
180
180
|
"modifiers": {
|
|
181
|
-
"
|
|
181
|
+
"weight": 1
|
|
182
182
|
}
|
|
183
183
|
},
|
|
184
184
|
{
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
}
|
|
200
200
|
},
|
|
201
201
|
"modifiers": {
|
|
202
|
-
"
|
|
202
|
+
"weight": 1,
|
|
203
203
|
"hiddenPath": "$item.noAction"
|
|
204
204
|
}
|
|
205
205
|
}
|
|
@@ -12,7 +12,7 @@ import { defineService } from "@himalaya/state";
|
|
|
12
12
|
import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
13
13
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
14
14
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged } from "./member-access.js";
|
|
15
|
-
import {
|
|
15
|
+
import { orderPrice, orderStatus, orderValidity } from "./pricing-plan-display.js";
|
|
16
16
|
import { copyParam, stashCopy } from "./himi-copy.js";
|
|
17
17
|
|
|
18
18
|
/** The most subscriptions one section shows; See All opens the rest. */
|
|
@@ -25,8 +25,10 @@ export interface SubscriptionRow {
|
|
|
25
25
|
/** The order's status as a word ("Active"). */
|
|
26
26
|
status: string;
|
|
27
27
|
price: string; noPrice: boolean;
|
|
28
|
-
/** "Valid until" / "Current period ends", then the date. */
|
|
28
|
+
/** "Valid until" / "Current period ends", then the date; or the whole line "Valid until canceled" with no date. */
|
|
29
29
|
dateLabel: string; endDate: string; noEndDate: boolean;
|
|
30
|
+
/** The order is valid until canceled (a single payment with unlimited validity). */
|
|
31
|
+
openEnded: boolean;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export interface SubscriptionsSectionState {
|
|
@@ -43,16 +45,12 @@ export interface SubscriptionsSectionState {
|
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
function row(order: WixPlanOrder): SubscriptionRow {
|
|
46
|
-
|
|
47
|
-
const periodEnd = !order.earliestEndDate && !order.endDate && order.status === "ACTIVE" && (order.pricing?.subscription ?? order.priceDetails?.subscription)
|
|
48
|
-
? orderDate(order.currentCycle?.endedDate) : "";
|
|
49
|
-
const endDate = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
48
|
+
const validity = orderValidity(order);
|
|
50
49
|
const price = orderPrice(order);
|
|
51
50
|
return {
|
|
52
51
|
id: order.id, name: (order.planName || copyParam("plans.planFallbackName", "Plan")).trim(), status: orderStatus(order),
|
|
53
52
|
price, noPrice: !price,
|
|
54
|
-
dateLabel:
|
|
55
|
-
endDate, noEndDate: !endDate,
|
|
53
|
+
dateLabel: validity.label, endDate: validity.date, noEndDate: validity.hidden, openEnded: validity.openEnded,
|
|
56
54
|
};
|
|
57
55
|
}
|
|
58
56
|
|
|
@@ -20,6 +20,45 @@ export function orderDate(value?: string): string {
|
|
|
20
20
|
return value && Number.isFinite(Date.parse(value)) ? formatDateMedium(new Date(value)) : "";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The order is valid until it is canceled: an ACTIVE single-payment order whose purchased pricing says
|
|
25
|
+
* "unlimited" (`singlePaymentUnlimited`) and that has no end, no scheduled end and no billing cycle.
|
|
26
|
+
* Only the order's own pricing decides it; today's plan is never consulted, because it can have changed.
|
|
27
|
+
*/
|
|
28
|
+
export function orderOpenEnded(order: WixPlanOrder): boolean {
|
|
29
|
+
if (order.status !== "ACTIVE" || order.endDate || order.earliestEndDate || order.autoRenewCanceled || order.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") return false;
|
|
30
|
+
const pricing = order.pricing ?? {};
|
|
31
|
+
const details = order.priceDetails ?? {};
|
|
32
|
+
if (pricing.subscription || details.subscription || pricing.singlePaymentForDuration || details.singlePaymentForDuration) return false;
|
|
33
|
+
return pricing.singlePaymentUnlimited === true || details.singlePaymentUnlimited === true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** One order's validity line on a subscription card: the label, the date after it, and whether the line shows. */
|
|
37
|
+
export interface OrderValidity {
|
|
38
|
+
/** "Valid until" / "Current period ends" / "End date" / "Expired on", or the whole line "Valid until canceled". */
|
|
39
|
+
label: string;
|
|
40
|
+
/** The formatted date; empty for an open-ended order, whose label says it all. */
|
|
41
|
+
date: string;
|
|
42
|
+
/** True when the order says nothing reliable about its validity: the card hides the line. */
|
|
43
|
+
hidden: boolean;
|
|
44
|
+
openEnded: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function orderValidity(order: WixPlanOrder): OrderValidity {
|
|
48
|
+
// A subscription with no end date but a running billing cycle is "valid" until the cycle ends.
|
|
49
|
+
const periodEnd = !order.earliestEndDate && !order.endDate && order.status === "ACTIVE" && (order.pricing?.subscription ?? order.priceDetails?.subscription)
|
|
50
|
+
? orderDate(order.currentCycle?.endedDate) : "";
|
|
51
|
+
const date = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
52
|
+
if (!date && orderOpenEnded(order)) {
|
|
53
|
+
return { label: copyParam("mySubscriptions.validUntilCanceled", "Valid until canceled"), date: "", hidden: false, openEnded: true };
|
|
54
|
+
}
|
|
55
|
+
const label = periodEnd ? copyParam("subscriptionDetail.periodEnd", "Current period ends")
|
|
56
|
+
: order.status === "CANCELED" ? copyParam("subscriptionDetail.endDate", "End date")
|
|
57
|
+
: order.status === "ENDED" ? copyParam("mySubscriptions.expiredOn", "Expired on")
|
|
58
|
+
: copyParam("mySubscriptions.validUntil", "Valid until");
|
|
59
|
+
return { label, date, hidden: !date, openEnded: false };
|
|
60
|
+
}
|
|
61
|
+
|
|
23
62
|
/** The purchased order owns its price; today's plan is never a price fallback. */
|
|
24
63
|
export function orderPrice(order: WixPlanOrder): string {
|
|
25
64
|
const cycle = order.currentCycle?.index ?? 1;
|
|
@@ -2,12 +2,12 @@ import { defineService } from "@himalaya/state";
|
|
|
2
2
|
import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
3
3
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
4
4
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged } from "../_shared/member-access.js";
|
|
5
|
-
import {
|
|
5
|
+
import { orderPrice, orderStatus, orderValidity } from "../_shared/pricing-plan-display.js";
|
|
6
6
|
import { descriptionBody } from "../_shared/rich-body.js";
|
|
7
7
|
import { copyParam, stashCopy } from "../_shared/himi-copy.js";
|
|
8
8
|
import { isHttp401 } from "../_shared/member-read.js";
|
|
9
9
|
|
|
10
|
-
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; expired: boolean; dateLabel: string }
|
|
10
|
+
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; openEnded: boolean; expired: boolean; dateLabel: string }
|
|
11
11
|
interface S {
|
|
12
12
|
status: string; orders: Row[]; rows: Row[]; allOrders: Row[]; selectedTab: string; nextCursor: string;
|
|
13
13
|
emptyText: string; hideAccountCta: boolean; noOrders: boolean;
|
|
@@ -32,10 +32,10 @@ function project(state: S): S {
|
|
|
32
32
|
emptyText: orders.length ? "" : state.selectedTab === "expired" ? copyParam("mySubscriptions.expiredEmpty", "No expired subscriptions") : copyParam("mySubscriptions.activeEmpty", "No active subscriptions") };
|
|
33
33
|
}
|
|
34
34
|
function norm(order: WixPlanOrder): Row {
|
|
35
|
-
const
|
|
36
|
-
const endDate = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
35
|
+
const validity = orderValidity(order);
|
|
37
36
|
return { id: order.id, name: order.planName || copyParam("plans.planFallbackName", "Plan"), subtitle: orderStatus(order),
|
|
38
|
-
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
37
|
+
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
38
|
+
endDate: validity.date, noEndDate: validity.hidden, openEnded: validity.openEnded, dateLabel: validity.label,
|
|
39
39
|
expired: ["ENDED", "CANCELED"].includes(order.status ?? "") };
|
|
40
40
|
}
|
|
41
41
|
async function readPage(state: S, reset: boolean): Promise<S | undefined> {
|
|
@@ -2,7 +2,7 @@ import { defineService } from "@himalaya/state";
|
|
|
2
2
|
import { getMyPlanOrder, requestCancellation, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
3
3
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
4
4
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged, type MemberAccess } from "../_shared/member-access.js";
|
|
5
|
-
import { orderDate, orderPrice, orderStatus, orderFacts } from "../_shared/pricing-plan-display.js";
|
|
5
|
+
import { orderDate, orderPrice, orderStatus, orderFacts, orderOpenEnded } from "../_shared/pricing-plan-display.js";
|
|
6
6
|
import { presence, presenceAfterError, detailInputId, type PresenceFlags } from "../_shared/detail-presence.js";
|
|
7
7
|
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
8
8
|
|
|
@@ -34,7 +34,8 @@ function project(o: WixPlanOrder, message = ""): S {
|
|
|
34
34
|
const scheduled = Boolean((o.pricing?.subscription ?? o.priceDetails?.subscription) && o.currentCycle?.endedDate && Date.parse(o.currentCycle.endedDate) > Date.now());
|
|
35
35
|
const renews = o.status === "ACTIVE" && scheduled ? orderDate(o.currentCycle?.endedDate) : "";
|
|
36
36
|
return { ...initial(), ...presence("found"), status: "ready", notActive: o.status !== "ACTIVE", isActive: o.status === "ACTIVE", name: o.planName || copyParam("subscriptionDetail.fallbackName", "Subscription"), subtitle: orderStatus(o), price: orderPrice(o),
|
|
37
|
-
validity: (o.earliestEndDate || o.autoRenewCanceled || o.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") && end ? copyTemplate("subscriptionDetail.scheduledEndMessage", "Your subscription ends on {date}.", { date: end }) : renews ? copyTemplate("placeSummary.planRenews", "Renews {date}", { date: renews })
|
|
37
|
+
validity: (o.earliestEndDate || o.autoRenewCanceled || o.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") && end ? copyTemplate("subscriptionDetail.scheduledEndMessage", "Your subscription ends on {date}.", { date: end }) : renews ? copyTemplate("placeSummary.planRenews", "Renews {date}", { date: renews })
|
|
38
|
+
: orderOpenEnded(o) ? copyParam("mySubscriptions.validUntilCanceled", "Valid until canceled") : "",
|
|
38
39
|
facts: orderFacts(o), hideCancel: !canCancel(o) || cancellationsSent.has(cancellationKey(o.id)), noScheduledOption: !scheduled,
|
|
39
40
|
effectiveAt: scheduled ? "NEXT_PAYMENT_DATE" : "IMMEDIATELY", actionMessage: message };
|
|
40
41
|
}
|
|
@@ -7774,7 +7774,8 @@ export const MEMBER_SCREENS: Record<string, unknown> = {
|
|
|
7774
7774
|
"type": "Text",
|
|
7775
7775
|
"props": {
|
|
7776
7776
|
"text": "$item.endDate",
|
|
7777
|
-
"style": "footnoteRegular"
|
|
7777
|
+
"style": "footnoteRegular",
|
|
7778
|
+
"collapseWhenEmpty": true
|
|
7778
7779
|
}
|
|
7779
7780
|
}
|
|
7780
7781
|
}
|
|
@@ -18689,7 +18690,8 @@ export const MEMBER_SEED: Record<string, unknown> = {
|
|
|
18689
18690
|
"type": "Text",
|
|
18690
18691
|
"props": {
|
|
18691
18692
|
"text": "$item.endDate",
|
|
18692
|
-
"style": "footnoteRegular"
|
|
18693
|
+
"style": "footnoteRegular",
|
|
18694
|
+
"collapseWhenEmpty": true
|
|
18693
18695
|
}
|
|
18694
18696
|
}
|
|
18695
18697
|
}
|
|
@@ -20,6 +20,45 @@ export function orderDate(value?: string): string {
|
|
|
20
20
|
return value && Number.isFinite(Date.parse(value)) ? formatDateMedium(new Date(value)) : "";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The order is valid until it is canceled: an ACTIVE single-payment order whose purchased pricing says
|
|
25
|
+
* "unlimited" (`singlePaymentUnlimited`) and that has no end, no scheduled end and no billing cycle.
|
|
26
|
+
* Only the order's own pricing decides it; today's plan is never consulted, because it can have changed.
|
|
27
|
+
*/
|
|
28
|
+
export function orderOpenEnded(order: WixPlanOrder): boolean {
|
|
29
|
+
if (order.status !== "ACTIVE" || order.endDate || order.earliestEndDate || order.autoRenewCanceled || order.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") return false;
|
|
30
|
+
const pricing = order.pricing ?? {};
|
|
31
|
+
const details = order.priceDetails ?? {};
|
|
32
|
+
if (pricing.subscription || details.subscription || pricing.singlePaymentForDuration || details.singlePaymentForDuration) return false;
|
|
33
|
+
return pricing.singlePaymentUnlimited === true || details.singlePaymentUnlimited === true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** One order's validity line on a subscription card: the label, the date after it, and whether the line shows. */
|
|
37
|
+
export interface OrderValidity {
|
|
38
|
+
/** "Valid until" / "Current period ends" / "End date" / "Expired on", or the whole line "Valid until canceled". */
|
|
39
|
+
label: string;
|
|
40
|
+
/** The formatted date; empty for an open-ended order, whose label says it all. */
|
|
41
|
+
date: string;
|
|
42
|
+
/** True when the order says nothing reliable about its validity: the card hides the line. */
|
|
43
|
+
hidden: boolean;
|
|
44
|
+
openEnded: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function orderValidity(order: WixPlanOrder): OrderValidity {
|
|
48
|
+
// A subscription with no end date but a running billing cycle is "valid" until the cycle ends.
|
|
49
|
+
const periodEnd = !order.earliestEndDate && !order.endDate && order.status === "ACTIVE" && (order.pricing?.subscription ?? order.priceDetails?.subscription)
|
|
50
|
+
? orderDate(order.currentCycle?.endedDate) : "";
|
|
51
|
+
const date = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
52
|
+
if (!date && orderOpenEnded(order)) {
|
|
53
|
+
return { label: copyParam("mySubscriptions.validUntilCanceled", "Valid until canceled"), date: "", hidden: false, openEnded: true };
|
|
54
|
+
}
|
|
55
|
+
const label = periodEnd ? copyParam("subscriptionDetail.periodEnd", "Current period ends")
|
|
56
|
+
: order.status === "CANCELED" ? copyParam("subscriptionDetail.endDate", "End date")
|
|
57
|
+
: order.status === "ENDED" ? copyParam("mySubscriptions.expiredOn", "Expired on")
|
|
58
|
+
: copyParam("mySubscriptions.validUntil", "Valid until");
|
|
59
|
+
return { label, date, hidden: !date, openEnded: false };
|
|
60
|
+
}
|
|
61
|
+
|
|
23
62
|
/** The purchased order owns its price; today's plan is never a price fallback. */
|
|
24
63
|
export function orderPrice(order: WixPlanOrder): string {
|
|
25
64
|
const cycle = order.currentCycle?.index ?? 1;
|
|
@@ -2,12 +2,12 @@ import { defineService } from "@himalaya/state";
|
|
|
2
2
|
import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
3
3
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
4
4
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged } from "../_shared/member-access.js";
|
|
5
|
-
import {
|
|
5
|
+
import { orderPrice, orderStatus, orderValidity } from "../_shared/pricing-plan-display.js";
|
|
6
6
|
import { descriptionBody } from "../_shared/rich-body.js";
|
|
7
7
|
import { copyParam, stashCopy } from "../_shared/himi-copy.js";
|
|
8
8
|
import { isHttp401 } from "../_shared/member-read.js";
|
|
9
9
|
|
|
10
|
-
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; expired: boolean; dateLabel: string }
|
|
10
|
+
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; openEnded: boolean; expired: boolean; dateLabel: string }
|
|
11
11
|
interface S {
|
|
12
12
|
status: string; orders: Row[]; rows: Row[]; allOrders: Row[]; selectedTab: string; nextCursor: string;
|
|
13
13
|
emptyText: string; hideAccountCta: boolean; noOrders: boolean;
|
|
@@ -32,10 +32,10 @@ function project(state: S): S {
|
|
|
32
32
|
emptyText: orders.length ? "" : state.selectedTab === "expired" ? copyParam("mySubscriptions.expiredEmpty", "No expired subscriptions") : copyParam("mySubscriptions.activeEmpty", "No active subscriptions") };
|
|
33
33
|
}
|
|
34
34
|
function norm(order: WixPlanOrder): Row {
|
|
35
|
-
const
|
|
36
|
-
const endDate = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
35
|
+
const validity = orderValidity(order);
|
|
37
36
|
return { id: order.id, name: order.planName || copyParam("plans.planFallbackName", "Plan"), subtitle: orderStatus(order),
|
|
38
|
-
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
37
|
+
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
38
|
+
endDate: validity.date, noEndDate: validity.hidden, openEnded: validity.openEnded, dateLabel: validity.label,
|
|
39
39
|
expired: ["ENDED", "CANCELED"].includes(order.status ?? "") };
|
|
40
40
|
}
|
|
41
41
|
async function readPage(state: S, reset: boolean): Promise<S | undefined> {
|
|
@@ -2,7 +2,7 @@ import { defineService } from "@himalaya/state";
|
|
|
2
2
|
import { getMyPlanOrder, requestCancellation, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
3
3
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
4
4
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged, type MemberAccess } from "../_shared/member-access.js";
|
|
5
|
-
import { orderDate, orderPrice, orderStatus, orderFacts } from "../_shared/pricing-plan-display.js";
|
|
5
|
+
import { orderDate, orderPrice, orderStatus, orderFacts, orderOpenEnded } from "../_shared/pricing-plan-display.js";
|
|
6
6
|
import { presence, presenceAfterError, detailInputId, type PresenceFlags } from "../_shared/detail-presence.js";
|
|
7
7
|
import { copyParam, copyTemplate, stashCopy } from "../_shared/himi-copy.js";
|
|
8
8
|
|
|
@@ -34,7 +34,8 @@ function project(o: WixPlanOrder, message = ""): S {
|
|
|
34
34
|
const scheduled = Boolean((o.pricing?.subscription ?? o.priceDetails?.subscription) && o.currentCycle?.endedDate && Date.parse(o.currentCycle.endedDate) > Date.now());
|
|
35
35
|
const renews = o.status === "ACTIVE" && scheduled ? orderDate(o.currentCycle?.endedDate) : "";
|
|
36
36
|
return { ...initial(), ...presence("found"), status: "ready", notActive: o.status !== "ACTIVE", isActive: o.status === "ACTIVE", name: o.planName || copyParam("subscriptionDetail.fallbackName", "Subscription"), subtitle: orderStatus(o), price: orderPrice(o),
|
|
37
|
-
validity: (o.earliestEndDate || o.autoRenewCanceled || o.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") && end ? copyTemplate("subscriptionDetail.scheduledEndMessage", "Your subscription ends on {date}.", { date: end }) : renews ? copyTemplate("placeSummary.planRenews", "Renews {date}", { date: renews })
|
|
37
|
+
validity: (o.earliestEndDate || o.autoRenewCanceled || o.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") && end ? copyTemplate("subscriptionDetail.scheduledEndMessage", "Your subscription ends on {date}.", { date: end }) : renews ? copyTemplate("placeSummary.planRenews", "Renews {date}", { date: renews })
|
|
38
|
+
: orderOpenEnded(o) ? copyParam("mySubscriptions.validUntilCanceled", "Valid until canceled") : "",
|
|
38
39
|
facts: orderFacts(o), hideCancel: !canCancel(o) || cancellationsSent.has(cancellationKey(o.id)), noScheduledOption: !scheduled,
|
|
39
40
|
effectiveAt: scheduled ? "NEXT_PAYMENT_DATE" : "IMMEDIATELY", actionMessage: message };
|
|
40
41
|
}
|
|
@@ -14928,7 +14928,8 @@ const SCREENS = runtimeSetting({
|
|
|
14928
14928
|
"type": "Text",
|
|
14929
14929
|
"props": {
|
|
14930
14930
|
"text": "$item.endDate",
|
|
14931
|
-
"style": "footnoteRegular"
|
|
14931
|
+
"style": "footnoteRegular",
|
|
14932
|
+
"collapseWhenEmpty": true
|
|
14932
14933
|
}
|
|
14933
14934
|
}
|
|
14934
14935
|
}
|
|
@@ -20,6 +20,45 @@ export function orderDate(value?: string): string {
|
|
|
20
20
|
return value && Number.isFinite(Date.parse(value)) ? formatDateMedium(new Date(value)) : "";
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/**
|
|
24
|
+
* The order is valid until it is canceled: an ACTIVE single-payment order whose purchased pricing says
|
|
25
|
+
* "unlimited" (`singlePaymentUnlimited`) and that has no end, no scheduled end and no billing cycle.
|
|
26
|
+
* Only the order's own pricing decides it; today's plan is never consulted, because it can have changed.
|
|
27
|
+
*/
|
|
28
|
+
export function orderOpenEnded(order: WixPlanOrder): boolean {
|
|
29
|
+
if (order.status !== "ACTIVE" || order.endDate || order.earliestEndDate || order.autoRenewCanceled || order.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") return false;
|
|
30
|
+
const pricing = order.pricing ?? {};
|
|
31
|
+
const details = order.priceDetails ?? {};
|
|
32
|
+
if (pricing.subscription || details.subscription || pricing.singlePaymentForDuration || details.singlePaymentForDuration) return false;
|
|
33
|
+
return pricing.singlePaymentUnlimited === true || details.singlePaymentUnlimited === true;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/** One order's validity line on a subscription card: the label, the date after it, and whether the line shows. */
|
|
37
|
+
export interface OrderValidity {
|
|
38
|
+
/** "Valid until" / "Current period ends" / "End date" / "Expired on", or the whole line "Valid until canceled". */
|
|
39
|
+
label: string;
|
|
40
|
+
/** The formatted date; empty for an open-ended order, whose label says it all. */
|
|
41
|
+
date: string;
|
|
42
|
+
/** True when the order says nothing reliable about its validity: the card hides the line. */
|
|
43
|
+
hidden: boolean;
|
|
44
|
+
openEnded: boolean;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export function orderValidity(order: WixPlanOrder): OrderValidity {
|
|
48
|
+
// A subscription with no end date but a running billing cycle is "valid" until the cycle ends.
|
|
49
|
+
const periodEnd = !order.earliestEndDate && !order.endDate && order.status === "ACTIVE" && (order.pricing?.subscription ?? order.priceDetails?.subscription)
|
|
50
|
+
? orderDate(order.currentCycle?.endedDate) : "";
|
|
51
|
+
const date = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
52
|
+
if (!date && orderOpenEnded(order)) {
|
|
53
|
+
return { label: copyParam("mySubscriptions.validUntilCanceled", "Valid until canceled"), date: "", hidden: false, openEnded: true };
|
|
54
|
+
}
|
|
55
|
+
const label = periodEnd ? copyParam("subscriptionDetail.periodEnd", "Current period ends")
|
|
56
|
+
: order.status === "CANCELED" ? copyParam("subscriptionDetail.endDate", "End date")
|
|
57
|
+
: order.status === "ENDED" ? copyParam("mySubscriptions.expiredOn", "Expired on")
|
|
58
|
+
: copyParam("mySubscriptions.validUntil", "Valid until");
|
|
59
|
+
return { label, date, hidden: !date, openEnded: false };
|
|
60
|
+
}
|
|
61
|
+
|
|
23
62
|
/** The purchased order owns its price; today's plan is never a price fallback. */
|
|
24
63
|
export function orderPrice(order: WixPlanOrder): string {
|
|
25
64
|
const cycle = order.currentCycle?.index ?? 1;
|
|
@@ -2,12 +2,12 @@ import { defineService } from "@himalaya/state";
|
|
|
2
2
|
import { listMyPlanOrders, type WixPlanOrder } from "@himalaya/wix-pricing-plans";
|
|
3
3
|
import { hostSessionFromGlobal } from "@himalaya/iap";
|
|
4
4
|
import { memberAccess, assertMemberAccess, memberAccessDenied, memberChanged } from "../_shared/member-access.js";
|
|
5
|
-
import {
|
|
5
|
+
import { orderPrice, orderStatus, orderValidity } from "../_shared/pricing-plan-display.js";
|
|
6
6
|
import { descriptionBody } from "../_shared/rich-body.js";
|
|
7
7
|
import { copyParam, stashCopy } from "../_shared/himi-copy.js";
|
|
8
8
|
import { isHttp401 } from "../_shared/member-read.js";
|
|
9
9
|
|
|
10
|
-
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; expired: boolean; dateLabel: string }
|
|
10
|
+
interface Row { id: string; name: string; subtitle: string; description: string; price: string; endDate: string; noEndDate: boolean; openEnded: boolean; expired: boolean; dateLabel: string }
|
|
11
11
|
interface S {
|
|
12
12
|
status: string; orders: Row[]; rows: Row[]; allOrders: Row[]; selectedTab: string; nextCursor: string;
|
|
13
13
|
emptyText: string; hideAccountCta: boolean; noOrders: boolean;
|
|
@@ -32,10 +32,10 @@ function project(state: S): S {
|
|
|
32
32
|
emptyText: orders.length ? "" : state.selectedTab === "expired" ? copyParam("mySubscriptions.expiredEmpty", "No expired subscriptions") : copyParam("mySubscriptions.activeEmpty", "No active subscriptions") };
|
|
33
33
|
}
|
|
34
34
|
function norm(order: WixPlanOrder): Row {
|
|
35
|
-
const
|
|
36
|
-
const endDate = orderDate(order.earliestEndDate ?? order.endDate) || periodEnd;
|
|
35
|
+
const validity = orderValidity(order);
|
|
37
36
|
return { id: order.id, name: order.planName || copyParam("plans.planFallbackName", "Plan"), subtitle: orderStatus(order),
|
|
38
|
-
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
37
|
+
description: descriptionBody(order.planDescription).bodyText, price: orderPrice(order),
|
|
38
|
+
endDate: validity.date, noEndDate: validity.hidden, openEnded: validity.openEnded, dateLabel: validity.label,
|
|
39
39
|
expired: ["ENDED", "CANCELED"].includes(order.status ?? "") };
|
|
40
40
|
}
|
|
41
41
|
async function readPage(state: S, reset: boolean): Promise<S | undefined> {
|