@wix/himalaya-cli 0.1656.0 → 0.1658.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/_types/stdlib/wix-sdk/pricing-plans/src/index.d.ts +37 -0
  2. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/checkout.mjs +2 -1
  3. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/screens.mjs +2 -1
  4. package/dist/authoring-runtime/node_modules/@wix/himalaya/dist/wix-pricing-plans.mjs +10 -1
  5. package/dist/browser-plane/assets.json +5 -5
  6. package/dist/browser-plane/preview-deferred/{3912fa5f6ddb60106c630fb5e48edbf12ebfd57c616d8b7aee0d32088cd3bbdf.bin → c04dd5fc5ad48e6b19678d4313159302e9a513ada94bfe515d8dfd5a54d46f5d.bin} +1 -1
  7. package/dist/browser-plane/sw.js +5 -5
  8. package/dist/cli.mjs +92 -60
  9. package/dist/preview-assets.generated.bin +0 -0
  10. package/guides/getting-started.md +4 -1
  11. package/guides/himi-skill.md +4 -1
  12. package/guides/index.json +12 -0
  13. package/guides/recipe-auth.md +120 -0
  14. package/guides/recipe-checkout.md +108 -0
  15. package/guides/sdk-reference.json +21 -3
  16. package/guides/skill.md +1 -1
  17. package/package.json +2 -2
  18. package/templates/beauty-salon/dev/index.ts +2151 -2596
  19. package/templates/beauty-salon/l10n/en.json +208 -180
  20. package/templates/beauty-salon/l10n/he.json +300 -138
  21. package/templates/beauty-salon/tier5-src/_shared/pricing-plan-display.ts +64 -0
  22. package/templates/beauty-salon/tier5-src/himi-branded-lite-plans/index.ts +101 -31
  23. package/templates/beauty-salon/tier5-src/wix-spaces-my-subscriptions/index.ts +72 -70
  24. package/templates/beauty-salon/tier5-src/wix-spaces-subscription-detail/index.ts +129 -31
  25. package/templates/beauty-salon/tokens.json +17 -1
  26. package/templates/branded-lite/dev/index.ts +2272 -2685
  27. package/templates/branded-lite/l10n/en.json +225 -52
  28. package/templates/branded-lite/l10n/he.json +305 -39
  29. package/templates/branded-lite/tier5-src/_shared/pricing-plan-display.ts +64 -0
  30. package/templates/branded-lite/tier5-src/himi-branded-lite-plans/index.ts +101 -31
  31. package/templates/branded-lite/tier5-src/wix-spaces-my-subscriptions/index.ts +72 -70
  32. package/templates/branded-lite/tier5-src/wix-spaces-subscription-detail/index.ts +129 -31
  33. package/templates/branded-lite/tokens.json +5 -1
  34. package/templates/community-club/l10n/en.json +6 -1
  35. package/templates/community-club/l10n/he.json +23 -2
  36. package/templates/community-club/tokens.json +17 -1
  37. package/templates/events-meetups/l10n/en.json +6 -1
  38. package/templates/events-meetups/l10n/he.json +23 -2
  39. package/templates/events-meetups/tokens.json +17 -1
  40. package/templates/gym-fitness/dev/index.ts +2149 -2594
  41. package/templates/gym-fitness/l10n/en.json +215 -77
  42. package/templates/gym-fitness/l10n/he.json +300 -59
  43. package/templates/gym-fitness/tier5-src/_shared/pricing-plan-display.ts +64 -0
  44. package/templates/gym-fitness/tier5-src/himi-branded-lite-plans/index.ts +101 -31
  45. package/templates/gym-fitness/tier5-src/wix-spaces-my-subscriptions/index.ts +72 -70
  46. package/templates/gym-fitness/tier5-src/wix-spaces-subscription-detail/index.ts +129 -31
  47. package/templates/gym-fitness/tokens.json +17 -1
  48. package/templates/nonprofit-cause/dev/index.ts +2163 -2608
  49. package/templates/nonprofit-cause/l10n/en.json +216 -38
  50. package/templates/nonprofit-cause/l10n/he.json +300 -30
  51. package/templates/nonprofit-cause/tier5-src/_shared/pricing-plan-display.ts +64 -0
  52. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-plans/index.ts +101 -31
  53. package/templates/nonprofit-cause/tier5-src/wix-spaces-my-subscriptions/index.ts +72 -70
  54. package/templates/nonprofit-cause/tier5-src/wix-spaces-subscription-detail/index.ts +129 -31
  55. package/templates/nonprofit-cause/tokens.json +17 -1
  56. package/templates/podcast-creator/dev/index.ts +2147 -2592
  57. package/templates/podcast-creator/l10n/en.json +216 -38
  58. package/templates/podcast-creator/l10n/he.json +300 -30
  59. package/templates/podcast-creator/tier5-src/_shared/pricing-plan-display.ts +64 -0
  60. package/templates/podcast-creator/tier5-src/himi-branded-lite-plans/index.ts +101 -31
  61. package/templates/podcast-creator/tier5-src/wix-spaces-my-subscriptions/index.ts +72 -70
  62. package/templates/podcast-creator/tier5-src/wix-spaces-subscription-detail/index.ts +129 -31
  63. package/templates/podcast-creator/tokens.json +17 -1
  64. package/templates/portfolio-creative/l10n/en.json +15 -8
  65. package/templates/portfolio-creative/l10n/he.json +28 -6
  66. package/templates/portfolio-creative/tokens.json +17 -1
  67. package/templates/restaurant/l10n/en.json +14 -7
  68. package/templates/restaurant/l10n/he.json +28 -6
  69. package/templates/restaurant/tokens.json +17 -1
  70. package/templates/retail-store/l10n/en.json +15 -8
  71. package/templates/retail-store/l10n/he.json +28 -6
  72. package/templates/retail-store/tokens.json +17 -1
  73. package/templates/yoga-studio/dev/index.ts +2204 -2649
  74. package/templates/yoga-studio/l10n/en.json +216 -43
  75. package/templates/yoga-studio/l10n/he.json +300 -30
  76. package/templates/yoga-studio/tier5-src/_shared/pricing-plan-display.ts +64 -0
  77. package/templates/yoga-studio/tier5-src/himi-branded-lite-plans/index.ts +101 -31
  78. package/templates/yoga-studio/tier5-src/wix-spaces-my-subscriptions/index.ts +72 -70
  79. package/templates/yoga-studio/tier5-src/wix-spaces-subscription-detail/index.ts +129 -31
  80. package/templates/yoga-studio/tokens.json +17 -1
  81. package/templates/beauty-salon/tier5-src/wix-spaces-plan-detail/index.ts +0 -63
  82. package/templates/branded-lite/tier5-src/wix-spaces-plan-detail/index.ts +0 -63
  83. package/templates/gym-fitness/tier5-src/wix-spaces-plan-detail/index.ts +0 -63
  84. package/templates/nonprofit-cause/tier5-src/wix-spaces-plan-detail/index.ts +0 -63
  85. package/templates/podcast-creator/tier5-src/wix-spaces-plan-detail/index.ts +0 -63
  86. package/templates/yoga-studio/tier5-src/wix-spaces-plan-detail/index.ts +0 -63
@@ -46,11 +46,6 @@
46
46
  "key": "accountSettings.confirmPrivacyCta",
47
47
  "translation": "אישור"
48
48
  },
49
- "h_075a188de01e": {
50
- "source": "My Subscriptions",
51
- "key": "mySubscriptions.title",
52
- "translation": "המנויים שלי"
53
- },
54
49
  "h_085f317f41a0": {
55
50
  "source": "Update the app to change your password.",
56
51
  "key": "accountSettings.passwordUpgradeRequired",
@@ -76,11 +71,6 @@
76
71
  "translation": "שיתוף",
77
72
  "key": "blogPost.shareCta"
78
73
  },
79
- "h_09cb227b060e": {
80
- "source": "Loading plans...",
81
- "key": "plans.loadingText",
82
- "translation": "טוען תוכניות..."
83
- },
84
74
  "h_0a3c313dce38": {
85
75
  "source": "Sending reset link…",
86
76
  "key": "accountSettings.passwordResetSending",
@@ -181,11 +171,6 @@
181
171
  "key": "planDetail.backCta",
182
172
  "translation": "חזרה לתוכניות"
183
173
  },
184
- "h_20ec7e3ddab7": {
185
- "source": "A–Z",
186
- "translation": "A–Z",
187
- "key": "collection.az"
188
- },
189
174
  "h_214d9d7b4dca": {
190
175
  "source": "Cards you saved at checkout.",
191
176
  "key": "wallet.subtitle",
@@ -371,11 +356,6 @@
371
356
  "key": "accountSettings.updateProfileUrlCta",
372
357
  "translation": "עדכון כתובת הפרופיל"
373
358
  },
374
- "h_3d0a383079cf": {
375
- "source": "Z–A",
376
- "translation": "Z–A",
377
- "key": "collection.za"
378
- },
379
359
  "h_3e8248e32edf": {
380
360
  "source": "Price",
381
361
  "key": "shop.priceFacet",
@@ -781,11 +761,6 @@
781
761
  "key": "agenda.viewCourseCta",
782
762
  "translation": "הצגת הקורס"
783
763
  },
784
- "h_8fde48f31aff": {
785
- "source": "Subscription",
786
- "key": "subscriptionDetail.chromeTitle",
787
- "translation": "מנוי"
788
- },
789
764
  "h_906c19b64116": {
790
765
  "source": "View my orders on the site",
791
766
  "key": "orders.onSiteCta",
@@ -966,11 +941,6 @@
966
941
  "key": "accountSettings.privacy",
967
942
  "translation": "פרטיות הפרופיל"
968
943
  },
969
- "h_adc4e96a478b": {
970
- "source": "Sort",
971
- "translation": "מיון",
972
- "key": "collection.sortShown"
973
- },
974
944
  "h_ae1ef0143294": {
975
945
  "source": "Dark",
976
946
  "key": "appearance.theme.dark",
@@ -1064,7 +1034,8 @@
1064
1034
  "h_badd385121c5": {
1065
1035
  "source": "View details",
1066
1036
  "translation": "צפייה בפרטים",
1067
- "key": "collection.viewDetails"
1037
+ "key": "collection.viewDetails",
1038
+ "keyOrigin": "string-table"
1068
1039
  },
1069
1040
  "h_bbcfc29fd955": {
1070
1041
  "source": "Products did not load.",
@@ -1076,11 +1047,6 @@
1076
1047
  "key": "common.closeCta",
1077
1048
  "translation": "סגירה"
1078
1049
  },
1079
- "h_bce06414177f": {
1080
- "source": "Search",
1081
- "translation": "חיפוש",
1082
- "key": "collection.searchAll"
1083
- },
1084
1050
  "h_be3e1188223d": {
1085
1051
  "source": "Loading your saved cards...",
1086
1052
  "key": "wallet.loadingText",
@@ -1101,11 +1067,6 @@
1101
1067
  "key": "address.saveCta",
1102
1068
  "translation": "שמירת כתובת"
1103
1069
  },
1104
- "h_c0a8060f3b11": {
1105
- "source": "Original",
1106
- "translation": "מקורי",
1107
- "key": "collection.defaultSort"
1108
- },
1109
1070
  "h_c0ae8f6ea841": {
1110
1071
  "source": "Saved",
1111
1072
  "translation": "נשמר",
@@ -1411,11 +1372,6 @@
1411
1372
  "translation": "שמירה",
1412
1373
  "key": "collection.save"
1413
1374
  },
1414
- "h_f014740803c5": {
1415
- "source": "Plan details",
1416
- "key": "planDetail.chromeTitle",
1417
- "translation": "פרטי התוכנית"
1418
- },
1419
1375
  "h_f32d5a3b17e6": {
1420
1376
  "source": "Support",
1421
1377
  "key": "appInfo.supportLink",
@@ -1441,6 +1397,11 @@
1441
1397
  "translation": "הזמנה",
1442
1398
  "key": "tab.book"
1443
1399
  },
1400
+ "h_f840ac65b3e5": {
1401
+ "source": "Canceled",
1402
+ "translation": "בוטל",
1403
+ "key": "subscriptionDetail.status.CANCELED"
1404
+ },
1444
1405
  "h_f8893b912459": {
1445
1406
  "source": "Add to cart",
1446
1407
  "key": "product.addToCart",
@@ -1481,6 +1442,11 @@
1481
1442
  "translation": "קהילה",
1482
1443
  "key": "drawer.section.community"
1483
1444
  },
1445
+ "h_a733b809d2f1": {
1446
+ "source": "Active",
1447
+ "key": "mySubscriptions.active",
1448
+ "translation": "פעיל"
1449
+ },
1484
1450
  "h_d805b1924677": {
1485
1451
  "source": "Daily step goal",
1486
1452
  "key": "steps.gaugeLabel",
@@ -1669,6 +1635,141 @@
1669
1635
  "key": "cart.checkoutNote",
1670
1636
  "translation": "המסים ודמי המשלוח יחושבו בקופה."
1671
1637
  },
1638
+ "h_a689a999a5e6": {
1639
+ "source": "Expired",
1640
+ "key": "mySubscriptions.expired",
1641
+ "translation": "פג תוקף"
1642
+ },
1643
+ "h_0febe76e354b": {
1644
+ "source": "You do not have access to this subscription.",
1645
+ "key": "subscriptionDetail.accessDenied",
1646
+ "translation": "אין לך גישה למנוי הזה."
1647
+ },
1648
+ "h_168ec872ecc7": {
1649
+ "source": "Plan price",
1650
+ "key": "planDetail.planPrice",
1651
+ "translation": "מחיר התוכנית"
1652
+ },
1653
+ "h_3fdb5e335327": {
1654
+ "source": "More Details",
1655
+ "key": "mySubscriptions.moreDetails",
1656
+ "translation": "פרטים נוספים"
1657
+ },
1658
+ "h_5697fd85adbd": {
1659
+ "source": "Subscriptions",
1660
+ "key": "mySubscriptions.title",
1661
+ "translation": "מנויים"
1662
+ },
1663
+ "h_6d7f058cd1f9": {
1664
+ "source": "Cancel subscription",
1665
+ "key": "subscriptionDetail.cancel",
1666
+ "translation": "ביטול המנוי"
1667
+ },
1668
+ "h_8048c6e22689": {
1669
+ "source": "Keep subscription",
1670
+ "key": "subscriptionDetail.keep",
1671
+ "translation": "השארת המנוי"
1672
+ },
1673
+ "h_8cfbc985903e": {
1674
+ "source": "Next payment date",
1675
+ "key": "subscriptionDetail.cancelNextPayment",
1676
+ "translation": "מועד התשלום הבא"
1677
+ },
1678
+ "h_90977a5334eb": {
1679
+ "source": "Confirm cancellation",
1680
+ "key": "subscriptionDetail.confirmCancel",
1681
+ "translation": "אישור הביטול"
1682
+ },
1683
+ "h_92d0286da122": {
1684
+ "source": "Terms and conditions",
1685
+ "key": "planDetail.terms",
1686
+ "translation": "תנאים והגבלות"
1687
+ },
1688
+ "h_9e6d2be10412": {
1689
+ "source": "Pricing Plan",
1690
+ "key": "mySubscriptions.type",
1691
+ "translation": "תוכנית תמחור"
1692
+ },
1693
+ "h_a1ba61405311": {
1694
+ "source": "SUBSCRIPTION DETAILS",
1695
+ "key": "subscriptionDetail.sectionTitle",
1696
+ "translation": "פרטי המנוי"
1697
+ },
1698
+ "h_ac3cff89b598": {
1699
+ "source": "Check back later.",
1700
+ "key": "plans.emptyBody",
1701
+ "translation": "בדקו שוב מאוחר יותר."
1702
+ },
1703
+ "h_b1b85d6dca11": {
1704
+ "source": "Cancel subscription?",
1705
+ "key": "subscriptionDetail.cancelTitle",
1706
+ "translation": "לבטל את המנוי?"
1707
+ },
1708
+ "h_b52174d6f8ee": {
1709
+ "source": "Sign in to see your subscriptions.",
1710
+ "key": "mySubscriptions.guestBody",
1711
+ "translation": "התחברו כדי לראות את המנויים שלכם."
1712
+ },
1713
+ "h_b5cd0764d53b": {
1714
+ "source": "The final price, including taxes, is determined at checkout.",
1715
+ "key": "planDetail.taxNote",
1716
+ "translation": "המחיר הסופי, כולל מיסים, נקבע בעת התשלום."
1717
+ },
1718
+ "h_be063c39a40c": {
1719
+ "source": "View plan benefits",
1720
+ "key": "plans.viewBenefits",
1721
+ "translation": "הצגת הטבות התוכנית"
1722
+ },
1723
+ "h_e3b82040565b": {
1724
+ "source": "Now",
1725
+ "key": "subscriptionDetail.cancelNow",
1726
+ "translation": "עכשיו"
1727
+ },
1728
+ "h_e5a3dc6c4148": {
1729
+ "source": "No plans available",
1730
+ "key": "plans.emptyTitle",
1731
+ "translation": "אין תוכניות זמינות"
1732
+ },
1733
+ "h_e61470df7f9a": {
1734
+ "source": "Browse plans",
1735
+ "key": "mySubscriptions.browsePlans",
1736
+ "translation": "עיון בתוכניות"
1737
+ },
1738
+ "h_26f0f757637b": {
1739
+ "source": "No expired subscriptions",
1740
+ "key": "mySubscriptions.expiredEmpty",
1741
+ "translation": "אין מנויים שפג תוקפם"
1742
+ },
1743
+ "h_2d237a1790e7": {
1744
+ "source": "No active subscriptions",
1745
+ "key": "mySubscriptions.activeEmpty",
1746
+ "translation": "אין מנויים פעילים"
1747
+ },
1748
+ "h_3a59df4808b7": {
1749
+ "source": "Subscriptions are unavailable for this account.",
1750
+ "key": "mySubscriptions.accessDenied",
1751
+ "translation": "המנויים אינם זמינים לחשבון הזה."
1752
+ },
1753
+ "h_87855219fc0e": {
1754
+ "source": "Cancellation requested, but the latest status could not be loaded. Refresh the details.",
1755
+ "key": "subscriptionDetail.cancelRefreshFailed",
1756
+ "translation": "בקשת הביטול נשלחה, אך לא ניתן לטעון את המצב העדכני. רעננו את הפרטים."
1757
+ },
1758
+ "h_c4ec5bbde22f": {
1759
+ "source": "This subscription cannot be canceled from this account. Contact the business for help.",
1760
+ "key": "subscriptionDetail.cancelDenied",
1761
+ "translation": "לא ניתן לבטל את המנוי מהחשבון הזה. פנו לעסק לקבלת עזרה."
1762
+ },
1763
+ "h_f5871873a63a": {
1764
+ "source": "Cancellation failed. Try again.",
1765
+ "key": "subscriptionDetail.cancelFailed",
1766
+ "translation": "ביטול המנוי נכשל. נסו שוב."
1767
+ },
1768
+ "h_c72863dbd9e1": {
1769
+ "source": "Hide plan benefits",
1770
+ "key": "plans.hideBenefits",
1771
+ "translation": "הסתרת הטבות התוכנית"
1772
+ },
1672
1773
  "h_03e89418ffdf": {
1673
1774
  "source": "Your Home",
1674
1775
  "translation": "הבית שלך"
@@ -1835,7 +1936,7 @@
1835
1936
  },
1836
1937
  "h_09fef5d8d9a3": {
1837
1938
  "source": "Failed",
1838
- "translation": "נכשלה"
1939
+ "translation": "נכשל"
1839
1940
  },
1840
1941
  "h_7c08f81c17ab": {
1841
1942
  "source": "Access paused",
@@ -1997,6 +2098,10 @@
1997
2098
  "source": "Booking Closed",
1998
2099
  "translation": "ההרשמה נסגרה"
1999
2100
  },
2101
+ "h_8fde48f31aff": {
2102
+ "source": "Subscription",
2103
+ "translation": "מנוי"
2104
+ },
2000
2105
  "h_93c54b09342d": {
2001
2106
  "source": "This service isn't available for online booking. Contact us to book it.",
2002
2107
  "translation": "לא ניתן לקבוע תור לשירות הזה באינטרנט. לקביעת תור יש ליצור איתנו קשר."
@@ -2190,10 +2295,6 @@
2190
2295
  "source": "New Post",
2191
2296
  "translation": "פוסט חדש"
2192
2297
  },
2193
- "h_f840ac65b3e5": {
2194
- "source": "Canceled",
2195
- "translation": "בוטל"
2196
- },
2197
2298
  "h_f85039fd8e49": {
2198
2299
  "source": "Confirm new password",
2199
2300
  "translation": "אישור הסיסמה החדשה"
@@ -2538,10 +2639,6 @@
2538
2639
  "source": "Sign in to see your bookings",
2539
2640
  "translation": "יש להתחבר כדי לראות את ההרשמות שלך"
2540
2641
  },
2541
- "h_a733b809d2f1": {
2542
- "source": "Active",
2543
- "translation": "פעיל"
2544
- },
2545
2642
  "h_7a7938b5bc22": {
2546
2643
  "source": "+{count} more",
2547
2644
  "translation": "+ עוד {count}"
@@ -2838,10 +2935,6 @@
2838
2935
  "source": "Show all locations",
2839
2936
  "translation": "הצגת כל המיקומים"
2840
2937
  },
2841
- "h_e0d73143de80": {
2842
- "source": "Join",
2843
- "translation": "הצטרפות"
2844
- },
2845
2938
  "h_eee52995478b": {
2846
2939
  "source": "Signed in as {email}",
2847
2940
  "translation": "מחובר/ת בתור {email}"
@@ -4165,6 +4258,154 @@
4165
4258
  "h_cf11de0bfced": {
4166
4259
  "source": "Available time",
4167
4260
  "translation": "זמן פנוי"
4261
+ },
4262
+ "h_c8214d35a16e": {
4263
+ "source": "Valid until",
4264
+ "translation": "בתוקף עד"
4265
+ },
4266
+ "h_513a2ae3716f": {
4267
+ "source": "Subscriptions could not be loaded.",
4268
+ "translation": "לא ניתן לטעון את המנויים."
4269
+ },
4270
+ "h_071cd4f24599": {
4271
+ "source": "Unlimited duration",
4272
+ "translation": "ללא הגבלת זמן"
4273
+ },
4274
+ "h_7527b5f3de8b": {
4275
+ "source": "Until canceled",
4276
+ "translation": "עד לביטול"
4277
+ },
4278
+ "h_3f28deaf6308": {
4279
+ "source": "Valid for {count} {unit}",
4280
+ "translation": "בתוקף למשך {count} {unit}"
4281
+ },
4282
+ "h_d8fdaaf936d1": {
4283
+ "source": "Current period ends",
4284
+ "translation": "סיום התקופה הנוכחית"
4285
+ },
4286
+ "h_89d10cd6c1e1": {
4287
+ "source": "End date",
4288
+ "translation": "תאריך סיום"
4289
+ },
4290
+ "h_b3b67b1ec371": {
4291
+ "source": "Expired on",
4292
+ "translation": "התוקף פג בתאריך"
4293
+ },
4294
+ "h_d00c682cdd14": {
4295
+ "source": "Your subscription ends on {date}.",
4296
+ "translation": "המנוי שלך יסתיים בתאריך {date}."
4297
+ },
4298
+ "h_d19252fd8086": {
4299
+ "source": "Request cancellation at the next payment date, {date}?",
4300
+ "translation": "לבקש ביטול במועד התשלום הבא, {date}?"
4301
+ },
4302
+ "h_cc0e4eda9f22": {
4303
+ "source": "Request cancellation now? Your access can end immediately.",
4304
+ "translation": "לבקש ביטול עכשיו? הגישה שלך עשויה להסתיים מיד."
4305
+ },
4306
+ "h_d60aef23d316": {
4307
+ "source": "Open a subscription from My Subscriptions.",
4308
+ "translation": "פתחו מנוי מתוך המנויים שלי."
4309
+ },
4310
+ "h_ecd7f5c76e70": {
4311
+ "source": "This subscription could not be loaded.",
4312
+ "translation": "לא ניתן לטעון את המנוי."
4313
+ },
4314
+ "h_c8763e04f1f2": {
4315
+ "source": "Your subscription changed. Review the details before canceling.",
4316
+ "translation": "המנוי שלך השתנה. בדקו את הפרטים לפני הביטול."
4317
+ },
4318
+ "h_4fc3530ad6c9": {
4319
+ "source": "Cancellation requested. Refresh to see the latest status.",
4320
+ "translation": "בקשת הביטול נשלחה. רעננו כדי לראות את המצב העדכני."
4321
+ },
4322
+ "h_a2620cbc10f5": {
4323
+ "source": "day",
4324
+ "translation": "יום"
4325
+ },
4326
+ "h_5548ae4f34cb": {
4327
+ "source": "days",
4328
+ "translation": "ימים"
4329
+ },
4330
+ "h_c0ee32d825d6": {
4331
+ "source": "week",
4332
+ "translation": "שבוע"
4333
+ },
4334
+ "h_0af64388b588": {
4335
+ "source": "weeks",
4336
+ "translation": "שבועות"
4337
+ },
4338
+ "h_021710fa7866": {
4339
+ "source": "month",
4340
+ "translation": "חודש"
4341
+ },
4342
+ "h_f1494311e45e": {
4343
+ "source": "months",
4344
+ "translation": "חודשים"
4345
+ },
4346
+ "h_4ff0b1538469": {
4347
+ "source": "year",
4348
+ "translation": "שנה"
4349
+ },
4350
+ "h_e21ee77d5009": {
4351
+ "source": "years",
4352
+ "translation": "שנים"
4353
+ },
4354
+ "h_96f608c16cef": {
4355
+ "source": "Pending",
4356
+ "translation": "ממתין"
4357
+ },
4358
+ "h_c7dfb6f1d9c5": {
4359
+ "source": "Paused",
4360
+ "translation": "מושהה"
4361
+ },
4362
+ "h_3a8de059a4c1": {
4363
+ "source": "Pending payment",
4364
+ "translation": "ממתין לתשלום"
4365
+ },
4366
+ "h_c3e839df6084": {
4367
+ "source": "Online",
4368
+ "translation": "מקוון"
4369
+ },
4370
+ "h_e01fa717bacc": {
4371
+ "source": "Offline",
4372
+ "translation": "לא מקוון"
4373
+ },
4374
+ "h_8d10c693b773": {
4375
+ "source": "External",
4376
+ "translation": "חיצוני"
4377
+ },
4378
+ "h_50cc12f69e8f": {
4379
+ "source": "Unpaid",
4380
+ "translation": "לא שולם"
4381
+ },
4382
+ "h_67c4d0506a44": {
4383
+ "source": "Not applicable",
4384
+ "translation": "לא רלוונטי"
4385
+ },
4386
+ "h_a40d89b298e7": {
4387
+ "source": "Purchase date",
4388
+ "translation": "תאריך רכישה"
4389
+ },
4390
+ "h_ff99f5b5f794": {
4391
+ "source": "Start date",
4392
+ "translation": "תאריך התחלה"
4393
+ },
4394
+ "h_0e55fb3b04e2": {
4395
+ "source": "Payment method",
4396
+ "translation": "אמצעי תשלום"
4397
+ },
4398
+ "h_6c0477b0ed78": {
4399
+ "source": "Last payment status",
4400
+ "translation": "מצב התשלום האחרון"
4401
+ },
4402
+ "h_7939a8affae6": {
4403
+ "source": "Scheduled end",
4404
+ "translation": "מועד סיום מתוכנן"
4405
+ },
4406
+ "h_760205a2fb62": {
4407
+ "source": "One-time payment",
4408
+ "translation": "תשלום חד-פעמי"
4168
4409
  }
4169
4410
  }
4170
4411
  }
@@ -0,0 +1,64 @@
1
+ import type { WixPlanOrder, WixPlanPricing } from "@himalaya/wix-pricing-plans";
2
+ import { copyParam, copyTemplate } from "./himi-copy.js";
3
+ import { formatCurrency, formatDateMedium } from "./engine-intl.js";
4
+
5
+ export function planDuration(pricing?: WixPlanPricing): string {
6
+ if (pricing?.singlePaymentUnlimited) return copyParam("plans.unlimited", "Unlimited duration");
7
+ const cycle = pricing?.subscription;
8
+ if (cycle && !cycle.cycleCount) return copyParam("plans.untilCanceled", "Until canceled");
9
+ const duration = cycle?.cycleDuration ?? pricing?.singlePaymentForDuration;
10
+ const count = (duration?.count ?? 0) * (cycle ? cycle.cycleCount ?? 0 : 1);
11
+ const unit = duration?.unit?.toLowerCase().replace(/s$/, "");
12
+ if (!count || !unit) return "";
13
+ const units: Record<string, [string, string]> = { day: ["day", "days"], week: ["week", "weeks"], month: ["month", "months"], year: ["year", "years"] };
14
+ const pair = units[unit];
15
+ if (!pair) return "";
16
+ return copyTemplate("plans.validFor", "Valid for {count} {unit}", { count, unit: copyParam(`plans.${unit}.${count === 1 ? "one" : "other"}`, pair[count === 1 ? 0 : 1]) });
17
+ }
18
+
19
+ export function orderDate(value?: string): string {
20
+ return value && Number.isFinite(Date.parse(value)) ? formatDateMedium(new Date(value)) : "";
21
+ }
22
+
23
+ /** The purchased order owns its price; today's plan is never a price fallback. */
24
+ export function orderPrice(order: WixPlanOrder): string {
25
+ const cycle = order.currentCycle?.index ?? 1;
26
+ const span = order.pricing?.prices?.find(({ duration }) => {
27
+ const from = duration?.cycleFrom ?? 1;
28
+ return cycle >= from && (!duration?.numberOfCycles || cycle < from + duration.numberOfCycles);
29
+ });
30
+ const currency = order.priceDetails?.currency ?? order.pricing?.currency ?? span?.price?.currency;
31
+ return purchasedMoney(span?.price?.total, span?.price?.currency) || span?.price?.formattedTotal
32
+ || purchasedMoney(order.priceDetails?.total, order.priceDetails?.currency)
33
+ || purchasedMoney(order.pricing?.total, order.pricing?.currency)
34
+ || purchasedMoney(order.priceDetails?.planPrice, currency)
35
+ || purchasedMoney(order.planPrice, currency);
36
+ }
37
+ function purchasedMoney(value?: string, currency?: string): string {
38
+ return value !== undefined && value !== "" && Number.isFinite(Number(value)) && currency
39
+ ? formatCurrency(Number(value), currency) : "";
40
+ }
41
+
42
+ export function orderStatus(order: WixPlanOrder): string {
43
+ const status = order.status ?? "";
44
+ const labels: Record<string, string> = { ACTIVE: "Active", PENDING: "Pending", PAUSED: "Paused", CANCELED: "Canceled", ENDED: "Expired", DRAFT: "Pending payment" };
45
+ return copyParam(`subscriptionDetail.status.${status}`, labels[status] ?? "Status unavailable");
46
+ }
47
+
48
+ export function orderFacts(order: WixPlanOrder): Array<{ id: string; label: string; value: string; positive: boolean; notPositive: boolean }> {
49
+ const payment: Record<string, string> = { ONLINE: "Online", OFFLINE: "Offline", EXTERNAL: "External" };
50
+ const statuses: Record<string, string> = { PAID: "Paid", UNPAID: "Unpaid", FAILED: "Failed", PENDING: "Pending", REFUNDED: "Refunded", NOT_APPLICABLE: "Not applicable" };
51
+ const pairs: Array<[string, string, string]> = [
52
+ ["purchaseDate", "Purchase date", orderDate(order.createdDate)],
53
+ ["startDate", "Start date", orderDate(order.startDate)],
54
+ ["endDate", "End date", orderDate(order.earliestEndDate ?? order.endDate)],
55
+ ["paymentMethod", "Payment method", payment[order.type ?? ""] ? copyParam(`subscriptionDetail.payment.${order.type}`, payment[order.type!]) : ""],
56
+ ["lastPaymentStatus", "Last payment status", statuses[order.lastPaymentStatus ?? ""] ? copyParam(`subscriptionDetail.paymentStatus.${order.lastPaymentStatus}`, statuses[order.lastPaymentStatus!]) : ""],
57
+ ];
58
+ if (order.autoRenewCanceled || order.cancellation?.effectiveAt === "NEXT_PAYMENT_DATE") {
59
+ pairs.push(["scheduledEnd", "Scheduled end", orderDate(order.earliestEndDate ?? order.endDate ?? order.currentCycle?.endedDate)]);
60
+ } else if (order.status === "ACTIVE" && (order.pricing?.subscription ?? order.priceDetails?.subscription) && order.currentCycle?.endedDate) {
61
+ pairs.push(["periodEnd", "Current period ends", orderDate(order.currentCycle.endedDate)]);
62
+ }
63
+ return pairs.filter(([, , value]) => Boolean(value)).map(([id, label, value]) => ({ id, label: copyParam(`subscriptionDetail.${id}`, label), value, positive: id === "lastPaymentStatus" && order.lastPaymentStatus === "PAID", notPositive: id !== "lastPaymentStatus" || order.lastPaymentStatus !== "PAID" }));
64
+ }