@lokalise/harmony 1.27.3-exp-fixTeamsTypes.2 → 1.27.3-exp-fixTeamsTypes.3

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 (232) hide show
  1. package/dist/harmony.cjs +4 -1
  2. package/dist/harmony.cjs.map +1 -1
  3. package/dist/harmony.mjs +5 -2
  4. package/dist/harmony100.cjs +6 -7
  5. package/dist/harmony100.cjs.map +1 -1
  6. package/dist/harmony100.mjs +5 -6
  7. package/dist/harmony100.mjs.map +1 -1
  8. package/dist/harmony101.cjs +40 -18
  9. package/dist/harmony101.cjs.map +1 -1
  10. package/dist/harmony101.mjs +40 -18
  11. package/dist/harmony101.mjs.map +1 -1
  12. package/dist/harmony102.cjs +59 -13
  13. package/dist/harmony102.cjs.map +1 -1
  14. package/dist/harmony102.mjs +59 -13
  15. package/dist/harmony102.mjs.map +1 -1
  16. package/dist/harmony103.cjs +7 -16
  17. package/dist/harmony103.cjs.map +1 -1
  18. package/dist/harmony103.mjs +7 -16
  19. package/dist/harmony103.mjs.map +1 -1
  20. package/dist/harmony104.cjs +6 -99
  21. package/dist/harmony104.cjs.map +1 -1
  22. package/dist/harmony104.mjs +5 -81
  23. package/dist/harmony104.mjs.map +1 -1
  24. package/dist/harmony105.cjs +6 -63
  25. package/dist/harmony105.cjs.map +1 -1
  26. package/dist/harmony105.mjs +5 -62
  27. package/dist/harmony105.mjs.map +1 -1
  28. package/dist/harmony106.cjs +6 -89
  29. package/dist/harmony106.cjs.map +1 -1
  30. package/dist/harmony106.mjs +5 -88
  31. package/dist/harmony106.mjs.map +1 -1
  32. package/dist/harmony107.cjs +63 -19
  33. package/dist/harmony107.cjs.map +1 -1
  34. package/dist/harmony107.mjs +62 -18
  35. package/dist/harmony107.mjs.map +1 -1
  36. package/dist/harmony108.cjs +89 -6
  37. package/dist/harmony108.cjs.map +1 -1
  38. package/dist/harmony108.mjs +88 -5
  39. package/dist/harmony108.mjs.map +1 -1
  40. package/dist/harmony109.cjs +18 -5
  41. package/dist/harmony109.cjs.map +1 -1
  42. package/dist/harmony109.mjs +18 -5
  43. package/dist/harmony109.mjs.map +1 -1
  44. package/dist/harmony110.cjs +96 -7
  45. package/dist/harmony110.cjs.map +1 -1
  46. package/dist/harmony110.mjs +96 -7
  47. package/dist/harmony110.mjs.map +1 -1
  48. package/dist/harmony111.cjs +13 -57
  49. package/dist/harmony111.cjs.map +1 -1
  50. package/dist/harmony111.mjs +13 -57
  51. package/dist/harmony111.mjs.map +1 -1
  52. package/dist/harmony112.cjs +14 -60
  53. package/dist/harmony112.cjs.map +1 -1
  54. package/dist/harmony112.mjs +14 -60
  55. package/dist/harmony112.mjs.map +1 -1
  56. package/dist/harmony113.cjs +37 -19
  57. package/dist/harmony113.cjs.map +1 -1
  58. package/dist/harmony113.mjs +36 -18
  59. package/dist/harmony113.mjs.map +1 -1
  60. package/dist/harmony114.cjs +19 -87
  61. package/dist/harmony114.cjs.map +1 -1
  62. package/dist/harmony114.mjs +19 -87
  63. package/dist/harmony114.mjs.map +1 -1
  64. package/dist/harmony115.cjs +7 -13
  65. package/dist/harmony115.cjs.map +1 -1
  66. package/dist/harmony115.mjs +7 -13
  67. package/dist/harmony115.mjs.map +1 -1
  68. package/dist/harmony116.cjs +57 -14
  69. package/dist/harmony116.cjs.map +1 -1
  70. package/dist/harmony116.mjs +57 -14
  71. package/dist/harmony116.mjs.map +1 -1
  72. package/dist/harmony117.cjs +57 -33
  73. package/dist/harmony117.cjs.map +1 -1
  74. package/dist/harmony117.mjs +57 -33
  75. package/dist/harmony117.mjs.map +1 -1
  76. package/dist/harmony118.cjs +19 -29
  77. package/dist/harmony118.cjs.map +1 -1
  78. package/dist/harmony118.mjs +18 -28
  79. package/dist/harmony118.mjs.map +1 -1
  80. package/dist/harmony119.cjs +1 -1
  81. package/dist/harmony119.mjs +1 -1
  82. package/dist/harmony120.cjs +1 -1
  83. package/dist/harmony120.mjs +1 -1
  84. package/dist/harmony121.cjs +2 -2
  85. package/dist/harmony121.mjs +2 -2
  86. package/dist/harmony122.cjs +11 -46
  87. package/dist/harmony122.cjs.map +1 -1
  88. package/dist/harmony122.mjs +11 -46
  89. package/dist/harmony122.mjs.map +1 -1
  90. package/dist/harmony123.cjs +17 -13
  91. package/dist/harmony123.cjs.map +1 -1
  92. package/dist/harmony123.mjs +16 -12
  93. package/dist/harmony123.mjs.map +1 -1
  94. package/dist/harmony124.cjs +20 -10
  95. package/dist/harmony124.cjs.map +1 -1
  96. package/dist/harmony124.mjs +20 -10
  97. package/dist/harmony124.mjs.map +1 -1
  98. package/dist/harmony125.cjs +10 -14
  99. package/dist/harmony125.cjs.map +1 -1
  100. package/dist/harmony125.mjs +10 -14
  101. package/dist/harmony125.mjs.map +1 -1
  102. package/dist/harmony126.cjs +46 -21
  103. package/dist/harmony126.cjs.map +1 -1
  104. package/dist/harmony126.mjs +46 -21
  105. package/dist/harmony126.mjs.map +1 -1
  106. package/dist/harmony127.cjs +13 -13
  107. package/dist/harmony127.cjs.map +1 -1
  108. package/dist/harmony127.mjs +12 -12
  109. package/dist/harmony127.mjs.map +1 -1
  110. package/dist/harmony15.cjs +1 -1
  111. package/dist/harmony15.mjs +1 -1
  112. package/dist/harmony22.cjs +1 -1
  113. package/dist/harmony22.mjs +1 -1
  114. package/dist/harmony23.cjs +1 -1
  115. package/dist/harmony23.mjs +1 -1
  116. package/dist/harmony30.cjs +1 -1
  117. package/dist/harmony30.mjs +1 -1
  118. package/dist/harmony59.cjs +53 -41
  119. package/dist/harmony59.cjs.map +1 -1
  120. package/dist/harmony59.mjs +53 -41
  121. package/dist/harmony59.mjs.map +1 -1
  122. package/dist/harmony64.cjs +1 -1
  123. package/dist/harmony64.mjs +1 -1
  124. package/dist/harmony66.cjs +1 -1
  125. package/dist/harmony66.mjs +1 -1
  126. package/dist/harmony67.cjs +1 -1
  127. package/dist/harmony67.mjs +1 -1
  128. package/dist/harmony68.cjs +1 -1
  129. package/dist/harmony68.mjs +1 -1
  130. package/dist/harmony69.cjs +2 -2
  131. package/dist/harmony69.mjs +2 -2
  132. package/dist/harmony70.cjs +2 -2
  133. package/dist/harmony70.mjs +2 -2
  134. package/dist/harmony71.cjs +2 -2
  135. package/dist/harmony71.mjs +2 -2
  136. package/dist/harmony72.cjs +2 -2
  137. package/dist/harmony72.mjs +2 -2
  138. package/dist/harmony73.cjs +3 -3
  139. package/dist/harmony73.mjs +3 -3
  140. package/dist/harmony74.cjs +6 -6
  141. package/dist/harmony74.mjs +6 -6
  142. package/dist/harmony77.cjs +2 -2
  143. package/dist/harmony77.mjs +2 -2
  144. package/dist/harmony79.cjs +12 -7
  145. package/dist/harmony79.cjs.map +1 -1
  146. package/dist/harmony79.mjs +11 -6
  147. package/dist/harmony79.mjs.map +1 -1
  148. package/dist/harmony80.cjs +20 -8
  149. package/dist/harmony80.cjs.map +1 -1
  150. package/dist/harmony80.mjs +20 -8
  151. package/dist/harmony80.mjs.map +1 -1
  152. package/dist/harmony81.cjs +3 -6
  153. package/dist/harmony81.cjs.map +1 -1
  154. package/dist/harmony81.mjs +3 -6
  155. package/dist/harmony81.mjs.map +1 -1
  156. package/dist/harmony82.cjs +9 -57
  157. package/dist/harmony82.cjs.map +1 -1
  158. package/dist/harmony82.mjs +8 -56
  159. package/dist/harmony82.mjs.map +1 -1
  160. package/dist/harmony83.cjs +9 -32
  161. package/dist/harmony83.cjs.map +1 -1
  162. package/dist/harmony83.mjs +8 -31
  163. package/dist/harmony83.mjs.map +1 -1
  164. package/dist/harmony84.cjs +57 -5
  165. package/dist/harmony84.cjs.map +1 -1
  166. package/dist/harmony84.mjs +57 -5
  167. package/dist/harmony84.mjs.map +1 -1
  168. package/dist/harmony85.cjs +32 -9
  169. package/dist/harmony85.cjs.map +1 -1
  170. package/dist/harmony85.mjs +31 -8
  171. package/dist/harmony85.mjs.map +1 -1
  172. package/dist/harmony86.cjs +6 -25
  173. package/dist/harmony86.cjs.map +1 -1
  174. package/dist/harmony86.mjs +5 -24
  175. package/dist/harmony86.mjs.map +1 -1
  176. package/dist/harmony87.cjs +6 -3
  177. package/dist/harmony87.cjs.map +1 -1
  178. package/dist/harmony87.mjs +6 -3
  179. package/dist/harmony87.mjs.map +1 -1
  180. package/dist/harmony88.cjs +24 -21
  181. package/dist/harmony88.cjs.map +1 -1
  182. package/dist/harmony88.mjs +23 -20
  183. package/dist/harmony88.mjs.map +1 -1
  184. package/dist/harmony89.cjs +3 -9
  185. package/dist/harmony89.cjs.map +1 -1
  186. package/dist/harmony89.mjs +3 -9
  187. package/dist/harmony89.mjs.map +1 -1
  188. package/dist/harmony90.cjs +19 -9
  189. package/dist/harmony90.cjs.map +1 -1
  190. package/dist/harmony90.mjs +21 -11
  191. package/dist/harmony90.mjs.map +1 -1
  192. package/dist/harmony91.cjs +11 -20
  193. package/dist/harmony91.cjs.map +1 -1
  194. package/dist/harmony91.mjs +11 -20
  195. package/dist/harmony91.mjs.map +1 -1
  196. package/dist/harmony92.cjs +99 -21
  197. package/dist/harmony92.cjs.map +1 -1
  198. package/dist/harmony92.mjs +81 -20
  199. package/dist/harmony92.mjs.map +1 -1
  200. package/dist/harmony93.cjs +18 -5
  201. package/dist/harmony93.cjs.map +1 -1
  202. package/dist/harmony93.mjs +18 -5
  203. package/dist/harmony93.mjs.map +1 -1
  204. package/dist/harmony94.cjs +12 -130
  205. package/dist/harmony94.cjs.map +1 -1
  206. package/dist/harmony94.mjs +12 -130
  207. package/dist/harmony94.mjs.map +1 -1
  208. package/dist/harmony95.cjs +17 -13
  209. package/dist/harmony95.cjs.map +1 -1
  210. package/dist/harmony95.mjs +16 -12
  211. package/dist/harmony95.mjs.map +1 -1
  212. package/dist/harmony96.cjs +22 -6
  213. package/dist/harmony96.cjs.map +1 -1
  214. package/dist/harmony96.mjs +21 -5
  215. package/dist/harmony96.mjs.map +1 -1
  216. package/dist/harmony97.cjs +4 -39
  217. package/dist/harmony97.cjs.map +1 -1
  218. package/dist/harmony97.mjs +4 -39
  219. package/dist/harmony97.mjs.map +1 -1
  220. package/dist/harmony98.cjs +127 -55
  221. package/dist/harmony98.cjs.map +1 -1
  222. package/dist/harmony98.mjs +127 -55
  223. package/dist/harmony98.mjs.map +1 -1
  224. package/dist/harmony99.cjs +12 -7
  225. package/dist/harmony99.cjs.map +1 -1
  226. package/dist/harmony99.mjs +11 -6
  227. package/dist/harmony99.mjs.map +1 -1
  228. package/dist/types/src/features/publicApi/hooks/useListTeamsQuery.d.ts +4 -8
  229. package/dist/types/src/features/publicApi/hooks/useRetrieveTeamQuery.d.ts +22 -11
  230. package/dist/types/src/features/publicApi/team.d.ts +162 -103
  231. package/dist/types/src/features/publicApi/types/teamTypes.d.ts +247 -118
  232. package/package.json +1 -1
@@ -1,9 +1,14 @@
1
- const logoLink = "_logoLink_1baxb_1";
2
- const styles = {
3
- logoLink
4
- };
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { Tag } from "@lokalise/louis";
3
+ import classes from "./harmony80.mjs";
4
+ const NavItemContents = ({ label, badge, novel }) => /* @__PURE__ */ jsxs("div", { className: "flex gap-1", children: [
5
+ /* @__PURE__ */ jsxs("div", { children: [
6
+ /* @__PURE__ */ jsx("span", { children: label }),
7
+ !!badge && /* @__PURE__ */ jsx("div", { className: classes.badge, "aria-label": `${badge} items requiring attention`, children: badge > 9 ? "9+" : badge })
8
+ ] }),
9
+ !!novel && /* @__PURE__ */ jsx(Tag, { className: classes.tag, children: novel })
10
+ ] });
5
11
  export {
6
- styles as default,
7
- logoLink
12
+ NavItemContents
8
13
  };
9
14
  //# sourceMappingURL=harmony79.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony79.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
1
+ {"version":3,"file":"harmony79.mjs","sources":["../src/components/NavigationPanel/components/NavigationTabs/NavigationTabsItem/NavItemContents.tsx"],"sourcesContent":["import { Tag } from '@lokalise/louis'\n\nimport classes from './styles.module.css'\n\ninterface NavItemContentProps {\n\tlabel: string\n\tbadge?: number\n\tnovel?: string\n}\nexport const NavItemContents = ({ label, badge, novel }: NavItemContentProps) => (\n\t<div className=\"flex gap-1\">\n\t\t<div>\n\t\t\t<span>{label}</span>\n\t\t\t{!!badge && (\n\t\t\t\t<div className={classes.badge} aria-label={`${badge} items requiring attention`}>\n\t\t\t\t\t{badge > 9 ? '9+' : badge}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t\t{!!novel && <Tag className={classes.tag}>{novel}</Tag>}\n\t</div>\n)\n"],"names":[],"mappings":";;;AASa,MAAA,kBAAkB,CAAC,EAAE,OAAO,OAAO,YAC/C,qBAAC,OAAI,EAAA,WAAU,cACd,UAAA;AAAA,EAAA,qBAAC,OACA,EAAA,UAAA;AAAA,IAAA,oBAAC,UAAM,UAAM,MAAA,CAAA;AAAA,IACZ,CAAC,CAAC,SACF,oBAAC,SAAI,WAAW,QAAQ,OAAO,cAAY,GAAG,KAAK,8BACjD,UAAQ,QAAA,IAAI,OAAO,MACrB,CAAA;AAAA,EAAA,GAEF;AAAA,EACC,CAAC,CAAC,SAAS,oBAAC,OAAI,WAAW,QAAQ,KAAM,UAAM,MAAA,CAAA;AAAA,EACjD,CAAA;"}
@@ -1,12 +1,24 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const link = "_link_18vhx_1";
4
- const active = "_active_18vhx_18";
5
- const styles = {
6
- link,
7
- active
3
+ const badge = "_badge_1pc1v_1";
4
+ const tag = "_tag_1pc1v_15";
5
+ const withNavLinkStyle = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21";
6
+ const disabled = "_disabled_1pc1v_57";
7
+ const projectNavigationItem = "_projectNavigationItem_1pc1v_61";
8
+ const projectNavigationItemDisabled = "_projectNavigationItemDisabled_1pc1v_67";
9
+ const classes = {
10
+ badge,
11
+ tag,
12
+ withNavLinkStyle,
13
+ disabled,
14
+ projectNavigationItem,
15
+ projectNavigationItemDisabled
8
16
  };
9
- exports.active = active;
10
- exports.default = styles;
11
- exports.link = link;
17
+ exports.badge = badge;
18
+ exports.default = classes;
19
+ exports.disabled = disabled;
20
+ exports.projectNavigationItem = projectNavigationItem;
21
+ exports.projectNavigationItemDisabled = projectNavigationItemDisabled;
22
+ exports.tag = tag;
23
+ exports.withNavLinkStyle = withNavLinkStyle;
12
24
  //# sourceMappingURL=harmony80.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony80.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony80.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,12 +1,24 @@
1
- const link = "_link_18vhx_1";
2
- const active = "_active_18vhx_18";
3
- const styles = {
4
- link,
5
- active
1
+ const badge = "_badge_1pc1v_1";
2
+ const tag = "_tag_1pc1v_15";
3
+ const withNavLinkStyle = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21";
4
+ const disabled = "_disabled_1pc1v_57";
5
+ const projectNavigationItem = "_projectNavigationItem_1pc1v_61";
6
+ const projectNavigationItemDisabled = "_projectNavigationItemDisabled_1pc1v_67";
7
+ const classes = {
8
+ badge,
9
+ tag,
10
+ withNavLinkStyle,
11
+ disabled,
12
+ projectNavigationItem,
13
+ projectNavigationItemDisabled
6
14
  };
7
15
  export {
8
- active,
9
- styles as default,
10
- link
16
+ badge,
17
+ classes as default,
18
+ disabled,
19
+ projectNavigationItem,
20
+ projectNavigationItemDisabled,
21
+ tag,
22
+ withNavLinkStyle
11
23
  };
12
24
  //# sourceMappingURL=harmony80.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony80.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"harmony80.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
@@ -1,12 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const dropdownButton = "_dropdownButton_13l5r_1";
4
- const dropdownButtonActive = "_dropdownButtonActive_13l5r_18";
3
+ const logoLink = "_logoLink_1baxb_1";
5
4
  const styles = {
6
- dropdownButton,
7
- dropdownButtonActive
5
+ logoLink
8
6
  };
9
7
  exports.default = styles;
10
- exports.dropdownButton = dropdownButton;
11
- exports.dropdownButtonActive = dropdownButtonActive;
8
+ exports.logoLink = logoLink;
12
9
  //# sourceMappingURL=harmony81.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony81.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony81.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
@@ -1,12 +1,9 @@
1
- const dropdownButton = "_dropdownButton_13l5r_1";
2
- const dropdownButtonActive = "_dropdownButtonActive_13l5r_18";
1
+ const logoLink = "_logoLink_1baxb_1";
3
2
  const styles = {
4
- dropdownButton,
5
- dropdownButtonActive
3
+ logoLink
6
4
  };
7
5
  export {
8
6
  styles as default,
9
- dropdownButton,
10
- dropdownButtonActive
7
+ logoLink
11
8
  };
12
9
  //# sourceMappingURL=harmony81.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony81.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
1
+ {"version":3,"file":"harmony81.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,60 +1,12 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const louis = require("@lokalise/louis");
5
- const clsx = require("./harmony62.cjs");
6
- const UpgradeIcon = require("./harmony88.cjs");
7
- const ProfileMenuContent_module = require("./harmony92.cjs");
8
- const ProfileMenuContext = require("./harmony84.cjs");
9
- const ProfileMenuContent = ({ children }) => {
10
- const {
11
- currentTeam,
12
- otherTeams,
13
- showUpgradeCta,
14
- showBillingButton,
15
- allowTeamCreation,
16
- isProviderAlpha,
17
- canAccessTeamSettings,
18
- isEndOfTrialActive,
19
- isTeamSuspended,
20
- isFullyAuthenticated
21
- } = ProfileMenuContext.useProfileMenu();
22
- return /* @__PURE__ */ jsxRuntime.jsx(
23
- louis.Menu,
24
- {
25
- menuButton: () => /* @__PURE__ */ jsxRuntime.jsxs("button", { className: ProfileMenuContent_module.default.profileButton, "aria-label": "Profile menu", type: "button", children: [
26
- (currentTeam == null ? void 0 : currentTeam.logoUrl) ? /* @__PURE__ */ jsxRuntime.jsx(
27
- "img",
28
- {
29
- src: currentTeam.logoUrl,
30
- className: clsx.clsx(ProfileMenuContent_module.default.profileImage, {
31
- [ProfileMenuContent_module.default.profileImageHighlight]: showUpgradeCta
32
- }),
33
- alt: "Team Logo"
34
- }
35
- ) : /* @__PURE__ */ jsxRuntime.jsx(
36
- "div",
37
- {
38
- className: clsx.clsx(ProfileMenuContent_module.default.userIconWrapper, "flex-row", "align-center", "items-center", {
39
- [ProfileMenuContent_module.default.profileImageHighlight]: showUpgradeCta
40
- }),
41
- children: /* @__PURE__ */ jsxRuntime.jsx(louis.UserIcon, { size: "25px" })
42
- }
43
- ),
44
- showUpgradeCta && /* @__PURE__ */ jsxRuntime.jsx(UpgradeIcon.UpgradeIcon, { className: ProfileMenuContent_module.default.profileImageUpgradeIcon })
45
- ] }),
46
- children: /* @__PURE__ */ jsxRuntime.jsx(louis.MenuList, { placement: "right-end", className: ProfileMenuContent_module.default.menuContainer, children: children({
47
- allowTeamCreation,
48
- otherTeams,
49
- canAccessTeamSettings,
50
- isEndOfTrialActive,
51
- isTeamSuspended,
52
- showBillingButton,
53
- isProviderAlpha,
54
- isFullyAuthenticated
55
- }) })
56
- }
57
- );
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const link = "_link_18vhx_1";
4
+ const active = "_active_18vhx_18";
5
+ const styles = {
6
+ link,
7
+ active
58
8
  };
59
- exports.ProfileMenuContent = ProfileMenuContent;
9
+ exports.active = active;
10
+ exports.default = styles;
11
+ exports.link = link;
60
12
  //# sourceMappingURL=harmony82.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony82.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.tsx"],"sourcesContent":["import { Menu, MenuList, UserIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { ReactNode } from 'react'\nimport { UpgradeIcon } from '../../UpgradeIcon/UpgradeIcon'\nimport styles from './ProfileMenuContent.module.css'\nimport { useProfileMenu } from './ProfileMenuContext'\nimport type { SidebarProfileMenuRenderProps } from './types'\n\nexport type ProfileMenuContentProps = {\n\tchildren: (props: SidebarProfileMenuRenderProps) => ReactNode\n}\n\nexport const ProfileMenuContent = ({ children }: ProfileMenuContentProps) => {\n\tconst {\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t\tisProviderAlpha,\n\t\tcanAccessTeamSettings,\n\t\tisEndOfTrialActive,\n\t\tisTeamSuspended,\n\t\tisFullyAuthenticated,\n\t} = useProfileMenu()\n\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={() => (\n\t\t\t\t<button className={styles.profileButton} aria-label=\"Profile menu\" type=\"button\">\n\t\t\t\t\t{currentTeam?.logoUrl ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={currentTeam.logoUrl}\n\t\t\t\t\t\t\tclassName={clsx(styles.profileImage, {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\talt=\"Team Logo\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={clsx(styles.userIconWrapper, 'flex-row', 'align-center', 'items-center', {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<UserIcon size={'25px'} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{showUpgradeCta && <UpgradeIcon className={styles.profileImageUpgradeIcon} />}\n\t\t\t\t</button>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-end\" className={styles.menuContainer}>\n\t\t\t\t{children({\n\t\t\t\t\tallowTeamCreation,\n\t\t\t\t\totherTeams,\n\t\t\t\t\tcanAccessTeamSettings,\n\t\t\t\t\tisEndOfTrialActive,\n\t\t\t\t\tisTeamSuspended,\n\t\t\t\t\tshowBillingButton,\n\t\t\t\t\tisProviderAlpha,\n\t\t\t\t\tisFullyAuthenticated,\n\t\t\t\t})}\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":["useProfileMenu","jsx","Menu","jsxs","styles","clsx","UserIcon","UpgradeIcon","MenuList"],"mappings":";;;;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,eAAwC;AACtE,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACGA,kCAAe;AAGlB,SAAAC,2BAAA;AAAA,IAACC,MAAA;AAAA,IAAA;AAAA,MACA,YAAY,MACXC,2BAAAA,KAAC,UAAO,EAAA,WAAWC,0BAAAA,QAAO,eAAe,cAAW,gBAAe,MAAK,UACtE,UAAA;AAAA,SAAA,2CAAa,WACbH,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,KAAK,YAAY;AAAA,YACjB,WAAWI,KAAAA,KAAKD,0BAAA,QAAO,cAAc;AAAA,cACpC,CAACA,0BAAAA,QAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YACD,KAAI;AAAA,UAAA;AAAA,QAAA,IAGLH,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAWI,KAAK,KAAAD,0BAAA,QAAO,iBAAiB,YAAY,gBAAgB,gBAAgB;AAAA,cACnF,CAACA,0BAAAA,QAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YAED,UAAAH,2BAAAA,IAACK,MAAAA,UAAS,EAAA,MAAM,OAAQ,CAAA;AAAA,UAAA;AAAA,QACzB;AAAA,QAEA,kBAAkBL,2BAAA,IAACM,YAAY,aAAA,EAAA,WAAWH,0BAAAA,QAAO,wBAAyB,CAAA;AAAA,MAAA,GAC5E;AAAA,MAGD,yCAACI,gBAAS,EAAA,WAAU,aAAY,WAAWJ,kCAAO,eAChD,UAAS,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACA,EACF,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
1
+ {"version":3,"file":"harmony82.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -1,60 +1,12 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { Menu, MenuList, UserIcon } from "@lokalise/louis";
3
- import { clsx } from "./harmony62.mjs";
4
- import { UpgradeIcon } from "./harmony88.mjs";
5
- import styles from "./harmony92.mjs";
6
- import { useProfileMenu } from "./harmony84.mjs";
7
- const ProfileMenuContent = ({ children }) => {
8
- const {
9
- currentTeam,
10
- otherTeams,
11
- showUpgradeCta,
12
- showBillingButton,
13
- allowTeamCreation,
14
- isProviderAlpha,
15
- canAccessTeamSettings,
16
- isEndOfTrialActive,
17
- isTeamSuspended,
18
- isFullyAuthenticated
19
- } = useProfileMenu();
20
- return /* @__PURE__ */ jsx(
21
- Menu,
22
- {
23
- menuButton: () => /* @__PURE__ */ jsxs("button", { className: styles.profileButton, "aria-label": "Profile menu", type: "button", children: [
24
- (currentTeam == null ? void 0 : currentTeam.logoUrl) ? /* @__PURE__ */ jsx(
25
- "img",
26
- {
27
- src: currentTeam.logoUrl,
28
- className: clsx(styles.profileImage, {
29
- [styles.profileImageHighlight]: showUpgradeCta
30
- }),
31
- alt: "Team Logo"
32
- }
33
- ) : /* @__PURE__ */ jsx(
34
- "div",
35
- {
36
- className: clsx(styles.userIconWrapper, "flex-row", "align-center", "items-center", {
37
- [styles.profileImageHighlight]: showUpgradeCta
38
- }),
39
- children: /* @__PURE__ */ jsx(UserIcon, { size: "25px" })
40
- }
41
- ),
42
- showUpgradeCta && /* @__PURE__ */ jsx(UpgradeIcon, { className: styles.profileImageUpgradeIcon })
43
- ] }),
44
- children: /* @__PURE__ */ jsx(MenuList, { placement: "right-end", className: styles.menuContainer, children: children({
45
- allowTeamCreation,
46
- otherTeams,
47
- canAccessTeamSettings,
48
- isEndOfTrialActive,
49
- isTeamSuspended,
50
- showBillingButton,
51
- isProviderAlpha,
52
- isFullyAuthenticated
53
- }) })
54
- }
55
- );
1
+ const link = "_link_18vhx_1";
2
+ const active = "_active_18vhx_18";
3
+ const styles = {
4
+ link,
5
+ active
56
6
  };
57
7
  export {
58
- ProfileMenuContent
8
+ active,
9
+ styles as default,
10
+ link
59
11
  };
60
12
  //# sourceMappingURL=harmony82.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony82.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.tsx"],"sourcesContent":["import { Menu, MenuList, UserIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { ReactNode } from 'react'\nimport { UpgradeIcon } from '../../UpgradeIcon/UpgradeIcon'\nimport styles from './ProfileMenuContent.module.css'\nimport { useProfileMenu } from './ProfileMenuContext'\nimport type { SidebarProfileMenuRenderProps } from './types'\n\nexport type ProfileMenuContentProps = {\n\tchildren: (props: SidebarProfileMenuRenderProps) => ReactNode\n}\n\nexport const ProfileMenuContent = ({ children }: ProfileMenuContentProps) => {\n\tconst {\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t\tisProviderAlpha,\n\t\tcanAccessTeamSettings,\n\t\tisEndOfTrialActive,\n\t\tisTeamSuspended,\n\t\tisFullyAuthenticated,\n\t} = useProfileMenu()\n\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={() => (\n\t\t\t\t<button className={styles.profileButton} aria-label=\"Profile menu\" type=\"button\">\n\t\t\t\t\t{currentTeam?.logoUrl ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={currentTeam.logoUrl}\n\t\t\t\t\t\t\tclassName={clsx(styles.profileImage, {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\talt=\"Team Logo\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={clsx(styles.userIconWrapper, 'flex-row', 'align-center', 'items-center', {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<UserIcon size={'25px'} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{showUpgradeCta && <UpgradeIcon className={styles.profileImageUpgradeIcon} />}\n\t\t\t\t</button>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-end\" className={styles.menuContainer}>\n\t\t\t\t{children({\n\t\t\t\t\tallowTeamCreation,\n\t\t\t\t\totherTeams,\n\t\t\t\t\tcanAccessTeamSettings,\n\t\t\t\t\tisEndOfTrialActive,\n\t\t\t\t\tisTeamSuspended,\n\t\t\t\t\tshowBillingButton,\n\t\t\t\t\tisProviderAlpha,\n\t\t\t\t\tisFullyAuthenticated,\n\t\t\t\t})}\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":[],"mappings":";;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,eAAwC;AACtE,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACG,eAAe;AAGlB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,YAAY,MACX,qBAAC,UAAO,EAAA,WAAW,OAAO,eAAe,cAAW,gBAAe,MAAK,UACtE,UAAA;AAAA,SAAA,2CAAa,WACb;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,KAAK,YAAY;AAAA,YACjB,WAAW,KAAK,OAAO,cAAc;AAAA,cACpC,CAAC,OAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YACD,KAAI;AAAA,UAAA;AAAA,QAAA,IAGL;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAW,KAAK,OAAO,iBAAiB,YAAY,gBAAgB,gBAAgB;AAAA,cACnF,CAAC,OAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YAED,UAAA,oBAAC,UAAS,EAAA,MAAM,OAAQ,CAAA;AAAA,UAAA;AAAA,QACzB;AAAA,QAEA,kBAAkB,oBAAC,aAAY,EAAA,WAAW,OAAO,wBAAyB,CAAA;AAAA,MAAA,GAC5E;AAAA,MAGD,8BAAC,UAAS,EAAA,WAAU,aAAY,WAAW,OAAO,eAChD,UAAS,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACA,EACF,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
1
+ {"version":3,"file":"harmony82.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,35 +1,12 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const jsxRuntime = require("react/jsx-runtime");
4
- const plan = require("./harmony7.cjs");
5
- const types = require("./harmony93.cjs");
6
- const ProfileMenuContext = require("./harmony84.cjs");
7
- const billingRoles = [
8
- types.SidebarTeamRoles.biller,
9
- types.SidebarTeamRoles.owner
10
- ];
11
- const ProfileMenuProvider = ({ children, config }) => {
12
- const { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } = config;
13
- const currentTeam = teams.find((t) => t.id === currentTeamId);
14
- const otherTeams = teams.filter((t) => t.id !== currentTeamId);
15
- const canChangeBilling = billingRoles.includes(userTeamRole);
16
- const canAccessTeamSettings = billingRoles.includes(userTeamRole);
17
- const isOnFreeOrTrialPlan = plan.isFreePlan(planId) || plan.isTrialPlan(planId);
18
- const showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && canChangeBilling;
19
- const showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling;
20
- const allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive;
21
- const providerValue = {
22
- ...config,
23
- currentTeam,
24
- otherTeams,
25
- canChangeBilling,
26
- canAccessTeamSettings,
27
- isOnFreeOrTrialPlan,
28
- showUpgradeCta,
29
- showBillingButton,
30
- allowTeamCreation
31
- };
32
- return /* @__PURE__ */ jsxRuntime.jsx(ProfileMenuContext.ProfileMenuContext.Provider, { value: providerValue, children });
2
+ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
+ const dropdownButton = "_dropdownButton_13l5r_1";
4
+ const dropdownButtonActive = "_dropdownButtonActive_13l5r_18";
5
+ const styles = {
6
+ dropdownButton,
7
+ dropdownButtonActive
33
8
  };
34
- exports.ProfileMenuProvider = ProfileMenuProvider;
9
+ exports.default = styles;
10
+ exports.dropdownButton = dropdownButton;
11
+ exports.dropdownButtonActive = dropdownButtonActive;
35
12
  //# sourceMappingURL=harmony83.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony83.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.tsx"],"sourcesContent":["import { isFreePlan, isTrialPlan } from '@utils'\nimport type { PropsWithChildren } from 'react'\nimport { type SidebarTeamRole, SidebarTeamRoles } from '../../types'\nimport { ProfileMenuContext } from './ProfileMenuContext'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProviderProps = PropsWithChildren<{\n\tconfig: SidebarProfileMenuConfig\n}>\n\nconst billingRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n]\n\nexport const ProfileMenuProvider = ({ children, config }: ProfileMenuProviderProps) => {\n\tconst { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } =\n\t\tconfig\n\n\tconst currentTeam = teams.find((t) => t.id === currentTeamId)\n\n\tconst otherTeams = teams.filter((t) => t.id !== currentTeamId)\n\n\tconst canChangeBilling = billingRoles.includes(userTeamRole)\n\n\tconst canAccessTeamSettings = billingRoles.includes(userTeamRole)\n\n\tconst isOnFreeOrTrialPlan = isFreePlan(planId) || isTrialPlan(planId)\n\n\tconst showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && canChangeBilling\n\n\tconst showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling\n\n\tconst allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive\n\n\tconst providerValue = {\n\t\t...config,\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tcanChangeBilling,\n\t\tcanAccessTeamSettings,\n\t\tisOnFreeOrTrialPlan,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t}\n\n\treturn <ProfileMenuContext.Provider value={providerValue}>{children}</ProfileMenuContext.Provider>\n}\n"],"names":["SidebarTeamRoles","isFreePlan","isTrialPlan","ProfileMenuContext"],"mappings":";;;;;;AAUA,MAAM,eAA+C;AAAA,EACpDA,MAAAA,iBAAiB;AAAA,EACjBA,uBAAiB;AAClB;AAEO,MAAM,sBAAsB,CAAC,EAAE,UAAU,aAAuC;AACtF,QAAM,EAAE,OAAO,eAAe,QAAQ,oBAAoB,sBAAsB,iBAC/E;AAED,QAAM,cAAc,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,aAAa;AAE5D,QAAM,aAAa,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,aAAa;AAEvD,QAAA,mBAAmB,aAAa,SAAS,YAAY;AAErD,QAAA,wBAAwB,aAAa,SAAS,YAAY;AAEhE,QAAM,sBAAsBC,KAAA,WAAW,MAAM,KAAKC,KAAAA,YAAY,MAAM;AAE9D,QAAA,iBAAiB,wBAAwB,uBAAuB;AAEhE,QAAA,oBAAoB,wBAAwB,yBAAyB;AAErE,QAAA,oBAAoB,wBAAwB,CAAC;AAEnD,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,wCAAQC,mBAAAA,mBAAmB,UAAnB,EAA4B,OAAO,eAAgB,UAAS;AACrE;;"}
1
+ {"version":3,"file":"harmony83.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -1,35 +1,12 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { isFreePlan, isTrialPlan } from "./harmony7.mjs";
3
- import { SidebarTeamRoles } from "./harmony93.mjs";
4
- import { ProfileMenuContext } from "./harmony84.mjs";
5
- const billingRoles = [
6
- SidebarTeamRoles.biller,
7
- SidebarTeamRoles.owner
8
- ];
9
- const ProfileMenuProvider = ({ children, config }) => {
10
- const { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } = config;
11
- const currentTeam = teams.find((t) => t.id === currentTeamId);
12
- const otherTeams = teams.filter((t) => t.id !== currentTeamId);
13
- const canChangeBilling = billingRoles.includes(userTeamRole);
14
- const canAccessTeamSettings = billingRoles.includes(userTeamRole);
15
- const isOnFreeOrTrialPlan = isFreePlan(planId) || isTrialPlan(planId);
16
- const showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && canChangeBilling;
17
- const showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling;
18
- const allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive;
19
- const providerValue = {
20
- ...config,
21
- currentTeam,
22
- otherTeams,
23
- canChangeBilling,
24
- canAccessTeamSettings,
25
- isOnFreeOrTrialPlan,
26
- showUpgradeCta,
27
- showBillingButton,
28
- allowTeamCreation
29
- };
30
- return /* @__PURE__ */ jsx(ProfileMenuContext.Provider, { value: providerValue, children });
1
+ const dropdownButton = "_dropdownButton_13l5r_1";
2
+ const dropdownButtonActive = "_dropdownButtonActive_13l5r_18";
3
+ const styles = {
4
+ dropdownButton,
5
+ dropdownButtonActive
31
6
  };
32
7
  export {
33
- ProfileMenuProvider
8
+ styles as default,
9
+ dropdownButton,
10
+ dropdownButtonActive
34
11
  };
35
12
  //# sourceMappingURL=harmony83.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony83.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.tsx"],"sourcesContent":["import { isFreePlan, isTrialPlan } from '@utils'\nimport type { PropsWithChildren } from 'react'\nimport { type SidebarTeamRole, SidebarTeamRoles } from '../../types'\nimport { ProfileMenuContext } from './ProfileMenuContext'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProviderProps = PropsWithChildren<{\n\tconfig: SidebarProfileMenuConfig\n}>\n\nconst billingRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n]\n\nexport const ProfileMenuProvider = ({ children, config }: ProfileMenuProviderProps) => {\n\tconst { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } =\n\t\tconfig\n\n\tconst currentTeam = teams.find((t) => t.id === currentTeamId)\n\n\tconst otherTeams = teams.filter((t) => t.id !== currentTeamId)\n\n\tconst canChangeBilling = billingRoles.includes(userTeamRole)\n\n\tconst canAccessTeamSettings = billingRoles.includes(userTeamRole)\n\n\tconst isOnFreeOrTrialPlan = isFreePlan(planId) || isTrialPlan(planId)\n\n\tconst showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && canChangeBilling\n\n\tconst showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling\n\n\tconst allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive\n\n\tconst providerValue = {\n\t\t...config,\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tcanChangeBilling,\n\t\tcanAccessTeamSettings,\n\t\tisOnFreeOrTrialPlan,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t}\n\n\treturn <ProfileMenuContext.Provider value={providerValue}>{children}</ProfileMenuContext.Provider>\n}\n"],"names":[],"mappings":";;;;AAUA,MAAM,eAA+C;AAAA,EACpD,iBAAiB;AAAA,EACjB,iBAAiB;AAClB;AAEO,MAAM,sBAAsB,CAAC,EAAE,UAAU,aAAuC;AACtF,QAAM,EAAE,OAAO,eAAe,QAAQ,oBAAoB,sBAAsB,iBAC/E;AAED,QAAM,cAAc,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,aAAa;AAE5D,QAAM,aAAa,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,aAAa;AAEvD,QAAA,mBAAmB,aAAa,SAAS,YAAY;AAErD,QAAA,wBAAwB,aAAa,SAAS,YAAY;AAEhE,QAAM,sBAAsB,WAAW,MAAM,KAAK,YAAY,MAAM;AAE9D,QAAA,iBAAiB,wBAAwB,uBAAuB;AAEhE,QAAA,oBAAoB,wBAAwB,yBAAyB;AAErE,QAAA,oBAAoB,wBAAwB,CAAC;AAEnD,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,6BAAQ,mBAAmB,UAAnB,EAA4B,OAAO,eAAgB,UAAS;AACrE;"}
1
+ {"version":3,"file":"harmony83.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
@@ -1,8 +1,60 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const React = require("react");
4
- const ProfileMenuContext = React.createContext({});
5
- const useProfileMenu = () => React.useContext(ProfileMenuContext);
6
- exports.ProfileMenuContext = ProfileMenuContext;
7
- exports.useProfileMenu = useProfileMenu;
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const louis = require("@lokalise/louis");
5
+ const clsx = require("./harmony62.cjs");
6
+ const UpgradeIcon = require("./harmony90.cjs");
7
+ const ProfileMenuContent_module = require("./harmony96.cjs");
8
+ const ProfileMenuContext = require("./harmony86.cjs");
9
+ const ProfileMenuContent = ({ children }) => {
10
+ const {
11
+ currentTeam,
12
+ otherTeams,
13
+ showUpgradeCta,
14
+ showBillingButton,
15
+ allowTeamCreation,
16
+ isProviderAlpha,
17
+ canAccessTeamSettings,
18
+ isEndOfTrialActive,
19
+ isTeamSuspended,
20
+ isFullyAuthenticated
21
+ } = ProfileMenuContext.useProfileMenu();
22
+ return /* @__PURE__ */ jsxRuntime.jsx(
23
+ louis.Menu,
24
+ {
25
+ menuButton: () => /* @__PURE__ */ jsxRuntime.jsxs("button", { className: ProfileMenuContent_module.default.profileButton, "aria-label": "Profile menu", type: "button", children: [
26
+ (currentTeam == null ? void 0 : currentTeam.logoUrl) ? /* @__PURE__ */ jsxRuntime.jsx(
27
+ "img",
28
+ {
29
+ src: currentTeam.logoUrl,
30
+ className: clsx.clsx(ProfileMenuContent_module.default.profileImage, {
31
+ [ProfileMenuContent_module.default.profileImageHighlight]: showUpgradeCta
32
+ }),
33
+ alt: "Team Logo"
34
+ }
35
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
36
+ "div",
37
+ {
38
+ className: clsx.clsx(ProfileMenuContent_module.default.userIconWrapper, "flex-row", "align-center", "items-center", {
39
+ [ProfileMenuContent_module.default.profileImageHighlight]: showUpgradeCta
40
+ }),
41
+ children: /* @__PURE__ */ jsxRuntime.jsx(louis.UserIcon, { size: "25px" })
42
+ }
43
+ ),
44
+ showUpgradeCta && /* @__PURE__ */ jsxRuntime.jsx(UpgradeIcon.UpgradeIcon, { className: ProfileMenuContent_module.default.profileImageUpgradeIcon })
45
+ ] }),
46
+ children: /* @__PURE__ */ jsxRuntime.jsx(louis.MenuList, { placement: "right-end", className: ProfileMenuContent_module.default.menuContainer, children: children({
47
+ allowTeamCreation,
48
+ otherTeams,
49
+ canAccessTeamSettings,
50
+ isEndOfTrialActive,
51
+ isTeamSuspended,
52
+ showBillingButton,
53
+ isProviderAlpha,
54
+ isFullyAuthenticated
55
+ }) })
56
+ }
57
+ );
58
+ };
59
+ exports.ProfileMenuContent = ProfileMenuContent;
8
60
  //# sourceMappingURL=harmony84.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony84.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { SidebarProfileMenuContextProps } from './types'\n\nexport const ProfileMenuContext = createContext({} as SidebarProfileMenuContextProps)\n\nexport const useProfileMenu = () => useContext(ProfileMenuContext)\n"],"names":["createContext","useContext"],"mappings":";;;AAGa,MAAA,qBAAqBA,MAAc,cAAA,CAAoC,CAAA;AAEvE,MAAA,iBAAiB,MAAMC,MAAAA,WAAW,kBAAkB;;;"}
1
+ {"version":3,"file":"harmony84.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.tsx"],"sourcesContent":["import { Menu, MenuList, UserIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { ReactNode } from 'react'\nimport { UpgradeIcon } from '../../UpgradeIcon/UpgradeIcon'\nimport styles from './ProfileMenuContent.module.css'\nimport { useProfileMenu } from './ProfileMenuContext'\nimport type { SidebarProfileMenuRenderProps } from './types'\n\nexport type ProfileMenuContentProps = {\n\tchildren: (props: SidebarProfileMenuRenderProps) => ReactNode\n}\n\nexport const ProfileMenuContent = ({ children }: ProfileMenuContentProps) => {\n\tconst {\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t\tisProviderAlpha,\n\t\tcanAccessTeamSettings,\n\t\tisEndOfTrialActive,\n\t\tisTeamSuspended,\n\t\tisFullyAuthenticated,\n\t} = useProfileMenu()\n\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={() => (\n\t\t\t\t<button className={styles.profileButton} aria-label=\"Profile menu\" type=\"button\">\n\t\t\t\t\t{currentTeam?.logoUrl ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={currentTeam.logoUrl}\n\t\t\t\t\t\t\tclassName={clsx(styles.profileImage, {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\talt=\"Team Logo\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={clsx(styles.userIconWrapper, 'flex-row', 'align-center', 'items-center', {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<UserIcon size={'25px'} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{showUpgradeCta && <UpgradeIcon className={styles.profileImageUpgradeIcon} />}\n\t\t\t\t</button>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-end\" className={styles.menuContainer}>\n\t\t\t\t{children({\n\t\t\t\t\tallowTeamCreation,\n\t\t\t\t\totherTeams,\n\t\t\t\t\tcanAccessTeamSettings,\n\t\t\t\t\tisEndOfTrialActive,\n\t\t\t\t\tisTeamSuspended,\n\t\t\t\t\tshowBillingButton,\n\t\t\t\t\tisProviderAlpha,\n\t\t\t\t\tisFullyAuthenticated,\n\t\t\t\t})}\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":["useProfileMenu","jsx","Menu","jsxs","styles","clsx","UserIcon","UpgradeIcon","MenuList"],"mappings":";;;;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,eAAwC;AACtE,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACGA,kCAAe;AAGlB,SAAAC,2BAAA;AAAA,IAACC,MAAA;AAAA,IAAA;AAAA,MACA,YAAY,MACXC,2BAAAA,KAAC,UAAO,EAAA,WAAWC,0BAAAA,QAAO,eAAe,cAAW,gBAAe,MAAK,UACtE,UAAA;AAAA,SAAA,2CAAa,WACbH,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,KAAK,YAAY;AAAA,YACjB,WAAWI,KAAAA,KAAKD,0BAAA,QAAO,cAAc;AAAA,cACpC,CAACA,0BAAAA,QAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YACD,KAAI;AAAA,UAAA;AAAA,QAAA,IAGLH,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAWI,KAAK,KAAAD,0BAAA,QAAO,iBAAiB,YAAY,gBAAgB,gBAAgB;AAAA,cACnF,CAACA,0BAAAA,QAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YAED,UAAAH,2BAAAA,IAACK,MAAAA,UAAS,EAAA,MAAM,OAAQ,CAAA;AAAA,UAAA;AAAA,QACzB;AAAA,QAEA,kBAAkBL,2BAAA,IAACM,YAAY,aAAA,EAAA,WAAWH,0BAAAA,QAAO,wBAAyB,CAAA;AAAA,MAAA,GAC5E;AAAA,MAGD,yCAACI,gBAAS,EAAA,WAAU,aAAY,WAAWJ,kCAAO,eAChD,UAAS,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACA,EACF,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
@@ -1,8 +1,60 @@
1
- import { useContext, createContext } from "react";
2
- const ProfileMenuContext = createContext({});
3
- const useProfileMenu = () => useContext(ProfileMenuContext);
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
+ import { Menu, MenuList, UserIcon } from "@lokalise/louis";
3
+ import { clsx } from "./harmony62.mjs";
4
+ import { UpgradeIcon } from "./harmony90.mjs";
5
+ import styles from "./harmony96.mjs";
6
+ import { useProfileMenu } from "./harmony86.mjs";
7
+ const ProfileMenuContent = ({ children }) => {
8
+ const {
9
+ currentTeam,
10
+ otherTeams,
11
+ showUpgradeCta,
12
+ showBillingButton,
13
+ allowTeamCreation,
14
+ isProviderAlpha,
15
+ canAccessTeamSettings,
16
+ isEndOfTrialActive,
17
+ isTeamSuspended,
18
+ isFullyAuthenticated
19
+ } = useProfileMenu();
20
+ return /* @__PURE__ */ jsx(
21
+ Menu,
22
+ {
23
+ menuButton: () => /* @__PURE__ */ jsxs("button", { className: styles.profileButton, "aria-label": "Profile menu", type: "button", children: [
24
+ (currentTeam == null ? void 0 : currentTeam.logoUrl) ? /* @__PURE__ */ jsx(
25
+ "img",
26
+ {
27
+ src: currentTeam.logoUrl,
28
+ className: clsx(styles.profileImage, {
29
+ [styles.profileImageHighlight]: showUpgradeCta
30
+ }),
31
+ alt: "Team Logo"
32
+ }
33
+ ) : /* @__PURE__ */ jsx(
34
+ "div",
35
+ {
36
+ className: clsx(styles.userIconWrapper, "flex-row", "align-center", "items-center", {
37
+ [styles.profileImageHighlight]: showUpgradeCta
38
+ }),
39
+ children: /* @__PURE__ */ jsx(UserIcon, { size: "25px" })
40
+ }
41
+ ),
42
+ showUpgradeCta && /* @__PURE__ */ jsx(UpgradeIcon, { className: styles.profileImageUpgradeIcon })
43
+ ] }),
44
+ children: /* @__PURE__ */ jsx(MenuList, { placement: "right-end", className: styles.menuContainer, children: children({
45
+ allowTeamCreation,
46
+ otherTeams,
47
+ canAccessTeamSettings,
48
+ isEndOfTrialActive,
49
+ isTeamSuspended,
50
+ showBillingButton,
51
+ isProviderAlpha,
52
+ isFullyAuthenticated
53
+ }) })
54
+ }
55
+ );
56
+ };
4
57
  export {
5
- ProfileMenuContext,
6
- useProfileMenu
58
+ ProfileMenuContent
7
59
  };
8
60
  //# sourceMappingURL=harmony84.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony84.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContext.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\nimport type { SidebarProfileMenuContextProps } from './types'\n\nexport const ProfileMenuContext = createContext({} as SidebarProfileMenuContextProps)\n\nexport const useProfileMenu = () => useContext(ProfileMenuContext)\n"],"names":[],"mappings":";AAGa,MAAA,qBAAqB,cAAc,CAAoC,CAAA;AAEvE,MAAA,iBAAiB,MAAM,WAAW,kBAAkB;"}
1
+ {"version":3,"file":"harmony84.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuContent.tsx"],"sourcesContent":["import { Menu, MenuList, UserIcon } from '@lokalise/louis'\nimport clsx from 'clsx'\nimport type { ReactNode } from 'react'\nimport { UpgradeIcon } from '../../UpgradeIcon/UpgradeIcon'\nimport styles from './ProfileMenuContent.module.css'\nimport { useProfileMenu } from './ProfileMenuContext'\nimport type { SidebarProfileMenuRenderProps } from './types'\n\nexport type ProfileMenuContentProps = {\n\tchildren: (props: SidebarProfileMenuRenderProps) => ReactNode\n}\n\nexport const ProfileMenuContent = ({ children }: ProfileMenuContentProps) => {\n\tconst {\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t\tisProviderAlpha,\n\t\tcanAccessTeamSettings,\n\t\tisEndOfTrialActive,\n\t\tisTeamSuspended,\n\t\tisFullyAuthenticated,\n\t} = useProfileMenu()\n\n\treturn (\n\t\t<Menu\n\t\t\tmenuButton={() => (\n\t\t\t\t<button className={styles.profileButton} aria-label=\"Profile menu\" type=\"button\">\n\t\t\t\t\t{currentTeam?.logoUrl ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={currentTeam.logoUrl}\n\t\t\t\t\t\t\tclassName={clsx(styles.profileImage, {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\talt=\"Team Logo\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={clsx(styles.userIconWrapper, 'flex-row', 'align-center', 'items-center', {\n\t\t\t\t\t\t\t\t[styles.profileImageHighlight]: showUpgradeCta,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<UserIcon size={'25px'} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{showUpgradeCta && <UpgradeIcon className={styles.profileImageUpgradeIcon} />}\n\t\t\t\t</button>\n\t\t\t)}\n\t\t>\n\t\t\t<MenuList placement=\"right-end\" className={styles.menuContainer}>\n\t\t\t\t{children({\n\t\t\t\t\tallowTeamCreation,\n\t\t\t\t\totherTeams,\n\t\t\t\t\tcanAccessTeamSettings,\n\t\t\t\t\tisEndOfTrialActive,\n\t\t\t\t\tisTeamSuspended,\n\t\t\t\t\tshowBillingButton,\n\t\t\t\t\tisProviderAlpha,\n\t\t\t\t\tisFullyAuthenticated,\n\t\t\t\t})}\n\t\t\t</MenuList>\n\t\t</Menu>\n\t)\n}\n"],"names":[],"mappings":";;;;;;AAYO,MAAM,qBAAqB,CAAC,EAAE,eAAwC;AACtE,QAAA;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACG,eAAe;AAGlB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,YAAY,MACX,qBAAC,UAAO,EAAA,WAAW,OAAO,eAAe,cAAW,gBAAe,MAAK,UACtE,UAAA;AAAA,SAAA,2CAAa,WACb;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,KAAK,YAAY;AAAA,YACjB,WAAW,KAAK,OAAO,cAAc;AAAA,cACpC,CAAC,OAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YACD,KAAI;AAAA,UAAA;AAAA,QAAA,IAGL;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAW,KAAK,OAAO,iBAAiB,YAAY,gBAAgB,gBAAgB;AAAA,cACnF,CAAC,OAAO,qBAAqB,GAAG;AAAA,YAAA,CAChC;AAAA,YAED,UAAA,oBAAC,UAAS,EAAA,MAAM,OAAQ,CAAA;AAAA,UAAA;AAAA,QACzB;AAAA,QAEA,kBAAkB,oBAAC,aAAY,EAAA,WAAW,OAAO,wBAAyB,CAAA;AAAA,MAAA,GAC5E;AAAA,MAGD,8BAAC,UAAS,EAAA,WAAU,aAAY,WAAW,OAAO,eAChD,UAAS,SAAA;AAAA,QACT;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,MAAA,CACA,EACF,CAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
@@ -1,12 +1,35 @@
1
1
  "use strict";
2
- Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const container = "_container_q5pot_1";
4
- const profileEmail = "_profileEmail_q5pot_5";
5
- const styles = {
6
- container,
7
- profileEmail
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const plan = require("./harmony7.cjs");
5
+ const types = require("./harmony97.cjs");
6
+ const ProfileMenuContext = require("./harmony86.cjs");
7
+ const billingRoles = [
8
+ types.SidebarTeamRoles.biller,
9
+ types.SidebarTeamRoles.owner
10
+ ];
11
+ const ProfileMenuProvider = ({ children, config }) => {
12
+ const { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } = config;
13
+ const currentTeam = teams.find((t) => t.id === currentTeamId);
14
+ const otherTeams = teams.filter((t) => t.id !== currentTeamId);
15
+ const canChangeBilling = billingRoles.includes(userTeamRole);
16
+ const canAccessTeamSettings = billingRoles.includes(userTeamRole);
17
+ const isOnFreeOrTrialPlan = plan.isFreePlan(planId) || plan.isTrialPlan(planId);
18
+ const showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && canChangeBilling;
19
+ const showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling;
20
+ const allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive;
21
+ const providerValue = {
22
+ ...config,
23
+ currentTeam,
24
+ otherTeams,
25
+ canChangeBilling,
26
+ canAccessTeamSettings,
27
+ isOnFreeOrTrialPlan,
28
+ showUpgradeCta,
29
+ showBillingButton,
30
+ allowTeamCreation
31
+ };
32
+ return /* @__PURE__ */ jsxRuntime.jsx(ProfileMenuContext.ProfileMenuContext.Provider, { value: providerValue, children });
8
33
  };
9
- exports.container = container;
10
- exports.default = styles;
11
- exports.profileEmail = profileEmail;
34
+ exports.ProfileMenuProvider = ProfileMenuProvider;
12
35
  //# sourceMappingURL=harmony85.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"harmony85.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
1
+ {"version":3,"file":"harmony85.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/ProfileMenuProvider.tsx"],"sourcesContent":["import { isFreePlan, isTrialPlan } from '@utils'\nimport type { PropsWithChildren } from 'react'\nimport { type SidebarTeamRole, SidebarTeamRoles } from '../../types'\nimport { ProfileMenuContext } from './ProfileMenuContext'\nimport type { SidebarProfileMenuConfig } from './types'\n\ntype ProfileMenuProviderProps = PropsWithChildren<{\n\tconfig: SidebarProfileMenuConfig\n}>\n\nconst billingRoles: ReadonlyArray<SidebarTeamRole> = [\n\tSidebarTeamRoles.biller,\n\tSidebarTeamRoles.owner,\n]\n\nexport const ProfileMenuProvider = ({ children, config }: ProfileMenuProviderProps) => {\n\tconst { teams, currentTeamId, planId, isEndOfTrialActive, isFullyAuthenticated, userTeamRole } =\n\t\tconfig\n\n\tconst currentTeam = teams.find((t) => t.id === currentTeamId)\n\n\tconst otherTeams = teams.filter((t) => t.id !== currentTeamId)\n\n\tconst canChangeBilling = billingRoles.includes(userTeamRole)\n\n\tconst canAccessTeamSettings = billingRoles.includes(userTeamRole)\n\n\tconst isOnFreeOrTrialPlan = isFreePlan(planId) || isTrialPlan(planId)\n\n\tconst showUpgradeCta = isFullyAuthenticated && isOnFreeOrTrialPlan && canChangeBilling\n\n\tconst showBillingButton = isFullyAuthenticated && canAccessTeamSettings && canChangeBilling\n\n\tconst allowTeamCreation = isFullyAuthenticated && !isEndOfTrialActive\n\n\tconst providerValue = {\n\t\t...config,\n\t\tcurrentTeam,\n\t\totherTeams,\n\t\tcanChangeBilling,\n\t\tcanAccessTeamSettings,\n\t\tisOnFreeOrTrialPlan,\n\t\tshowUpgradeCta,\n\t\tshowBillingButton,\n\t\tallowTeamCreation,\n\t}\n\n\treturn <ProfileMenuContext.Provider value={providerValue}>{children}</ProfileMenuContext.Provider>\n}\n"],"names":["SidebarTeamRoles","isFreePlan","isTrialPlan","ProfileMenuContext"],"mappings":";;;;;;AAUA,MAAM,eAA+C;AAAA,EACpDA,MAAAA,iBAAiB;AAAA,EACjBA,uBAAiB;AAClB;AAEO,MAAM,sBAAsB,CAAC,EAAE,UAAU,aAAuC;AACtF,QAAM,EAAE,OAAO,eAAe,QAAQ,oBAAoB,sBAAsB,iBAC/E;AAED,QAAM,cAAc,MAAM,KAAK,CAAC,MAAM,EAAE,OAAO,aAAa;AAE5D,QAAM,aAAa,MAAM,OAAO,CAAC,MAAM,EAAE,OAAO,aAAa;AAEvD,QAAA,mBAAmB,aAAa,SAAS,YAAY;AAErD,QAAA,wBAAwB,aAAa,SAAS,YAAY;AAEhE,QAAM,sBAAsBC,KAAA,WAAW,MAAM,KAAKC,KAAAA,YAAY,MAAM;AAE9D,QAAA,iBAAiB,wBAAwB,uBAAuB;AAEhE,QAAA,oBAAoB,wBAAwB,yBAAyB;AAErE,QAAA,oBAAoB,wBAAwB,CAAC;AAEnD,QAAM,gBAAgB;AAAA,IACrB,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACD;AAEA,wCAAQC,mBAAAA,mBAAmB,UAAnB,EAA4B,OAAO,eAAgB,UAAS;AACrE;;"}