@burdenoff/microfe-store 2026.625.5 → 2026.626.2

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 (189) hide show
  1. package/dist/StoreRoot.js +47 -90
  2. package/dist/StoreRoot.js.map +1 -1
  3. package/dist/StoreRoutes.js +93 -158
  4. package/dist/StoreRoutes.js.map +1 -1
  5. package/dist/components/AccessDenied.js +3 -3
  6. package/dist/components/AccessDenied.js.map +1 -1
  7. package/dist/components/InstallAppModal.js +175 -255
  8. package/dist/components/InstallAppModal.js.map +1 -1
  9. package/dist/components/cart/CartDrawer.js +10 -10
  10. package/dist/components/cart/CartDrawer.js.map +1 -1
  11. package/dist/hooks/useStoreGraphQL.js +107 -177
  12. package/dist/hooks/useStoreGraphQL.js.map +1 -1
  13. package/dist/index.js +3 -3
  14. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/errors/CombinedGraphQLErrors.js +1 -1
  15. package/dist/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +1 -0
  16. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/errors/utils.js +1 -1
  17. package/dist/node_modules/@apollo/client/errors/utils.js.map +1 -0
  18. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/link/core/ApolloLink.js +2 -2
  19. package/dist/node_modules/@apollo/client/link/core/ApolloLink.js.map +1 -0
  20. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/link/subscriptions/index.js +2 -2
  21. package/dist/node_modules/@apollo/client/link/subscriptions/index.js.map +1 -0
  22. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/link/utils/createOperation.js +1 -1
  23. package/dist/node_modules/@apollo/client/link/utils/createOperation.js.map +1 -0
  24. package/dist/node_modules/@apollo/client/utilities/caching/sizes.js.map +1 -0
  25. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/graphql/print.js +1 -1
  26. package/dist/node_modules/@apollo/client/utilities/graphql/print.js.map +1 -0
  27. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/caches.js +2 -2
  28. package/dist/node_modules/@apollo/client/utilities/internal/caches.js.map +1 -0
  29. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/checkDocument.js +1 -1
  30. package/dist/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -0
  31. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/getMainDefinition.js +1 -1
  32. package/dist/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +1 -0
  33. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +9 -0
  34. package/dist/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +1 -0
  35. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/getOperationDefinition.js +1 -1
  36. package/dist/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +1 -0
  37. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js +8 -0
  38. package/dist/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +1 -0
  39. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/globals/global.js +1 -1
  40. package/dist/node_modules/@apollo/client/utilities/internal/globals/global.js.map +1 -0
  41. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js +10 -0
  42. package/dist/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +1 -0
  43. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +8 -0
  44. package/dist/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +1 -0
  45. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/makeUniqueId.js +1 -1
  46. package/dist/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +1 -0
  47. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/memoize.js +2 -2
  48. package/dist/node_modules/@apollo/client/utilities/internal/memoize.js.map +1 -0
  49. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/internal/stringifyForDisplay.js +1 -1
  50. package/dist/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +1 -0
  51. package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/invariant/index.js +1 -1
  52. package/dist/node_modules/@apollo/client/utilities/invariant/index.js.map +1 -0
  53. package/dist/node_modules/@apollo/client/version.js +6 -0
  54. package/dist/node_modules/@apollo/client/version.js.map +1 -0
  55. package/dist/node_modules/{.bun/@wry_caches@1.0.1/node_modules/@wry → @wry}/caches/lib/weak.js +1 -1
  56. package/dist/node_modules/@wry/caches/lib/weak.js.map +1 -0
  57. package/dist/node_modules/{.bun/@wry_trie@0.5.0/node_modules/@wry → @wry}/trie/lib/index.js +1 -1
  58. package/dist/node_modules/@wry/trie/lib/index.js.map +1 -0
  59. package/dist/node_modules/{.bun/graphql-ws@6.0.8_796ebe57c2b0ffe0/node_modules/graphql-ws → graphql-ws}/dist/client.js +1 -1
  60. package/dist/node_modules/graphql-ws/dist/client.js.map +1 -0
  61. package/dist/node_modules/{.bun/graphql-ws@6.0.8_796ebe57c2b0ffe0/node_modules/graphql-ws → graphql-ws}/dist/common-CGW11Fyb.js +1 -1
  62. package/dist/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +1 -0
  63. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/NotificationFactories.js +1 -1
  64. package/dist/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +1 -0
  65. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/Observable.js +1 -1
  66. package/dist/node_modules/rxjs/dist/esm5/internal/Observable.js.map +1 -0
  67. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/Subscriber.js +2 -2
  68. package/dist/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +1 -0
  69. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/Subscription.js +2 -2
  70. package/dist/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -0
  71. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/config.js +1 -1
  72. package/dist/node_modules/rxjs/dist/esm5/internal/config.js.map +1 -0
  73. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/observable/empty.js +1 -1
  74. package/dist/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +1 -0
  75. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/scheduler/timeoutProvider.js +2 -2
  76. package/dist/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +1 -0
  77. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/symbol/observable.js +1 -1
  78. package/dist/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +1 -0
  79. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/util/UnsubscriptionError.js +1 -1
  80. package/dist/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +1 -0
  81. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +11 -0
  82. package/dist/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +1 -0
  83. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/util/createErrorClass.js +1 -1
  84. package/dist/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +1 -0
  85. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/util/errorContext.js +1 -1
  86. package/dist/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +1 -0
  87. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js +8 -0
  88. package/dist/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +1 -0
  89. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +8 -0
  90. package/dist/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +1 -0
  91. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js +6 -0
  92. package/dist/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +1 -0
  93. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/util/pipe.js +1 -1
  94. package/dist/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +1 -0
  95. package/dist/node_modules/{.bun/rxjs@7.8.2/node_modules/rxjs → rxjs}/dist/esm5/internal/util/reportUnhandledError.js +1 -1
  96. package/dist/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +1 -0
  97. package/dist/node_modules/{.bun/tslib@2.8.1 → rxjs}/node_modules/tslib/tslib.es6.js +1 -1
  98. package/dist/node_modules/rxjs/node_modules/tslib/tslib.es6.js.map +1 -0
  99. package/dist/pages/AdminDashboardPage.js +118 -91
  100. package/dist/pages/AdminDashboardPage.js.map +1 -1
  101. package/dist/pages/AdminReviewModerationPage.js +67 -61
  102. package/dist/pages/AdminReviewModerationPage.js.map +1 -1
  103. package/dist/pages/AdminStoresPage.js +424 -371
  104. package/dist/pages/AdminStoresPage.js.map +1 -1
  105. package/dist/pages/AdminSubmissionsQueuePage.js +303 -286
  106. package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
  107. package/dist/pages/AppDetailPage.js +172 -135
  108. package/dist/pages/AppDetailPage.js.map +1 -1
  109. package/dist/pages/AppSettingsPage.js +83 -300
  110. package/dist/pages/AppSettingsPage.js.map +1 -1
  111. package/dist/pages/CartPage.js +71 -79
  112. package/dist/pages/CartPage.js.map +1 -1
  113. package/dist/pages/InstalledAppsPage.js +120 -337
  114. package/dist/pages/InstalledAppsPage.js.map +1 -1
  115. package/dist/pages/MarketplaceHomePage.js +196 -205
  116. package/dist/pages/MarketplaceHomePage.js.map +1 -1
  117. package/dist/pages/MyLicensesPage.js +70 -75
  118. package/dist/pages/MyLicensesPage.js.map +1 -1
  119. package/dist/pages/OrderConfirmationPage.js +70 -37
  120. package/dist/pages/OrderConfirmationPage.js.map +1 -1
  121. package/dist/pages/OrdersPage.js +60 -68
  122. package/dist/pages/OrdersPage.js.map +1 -1
  123. package/dist/pages/ProductDetailPage.js +794 -752
  124. package/dist/pages/ProductDetailPage.js.map +1 -1
  125. package/dist/providers/StoreProvider.js +3 -3
  126. package/package.json +2 -2
  127. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/errors/CombinedGraphQLErrors.js.map +0 -1
  128. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/errors/utils.js.map +0 -1
  129. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/link/core/ApolloLink.js.map +0 -1
  130. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/link/subscriptions/index.js.map +0 -1
  131. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/link/utils/createOperation.js.map +0 -1
  132. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/caching/sizes.js.map +0 -1
  133. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/graphql/print.js.map +0 -1
  134. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/caches.js.map +0 -1
  135. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +0 -1
  136. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/getMainDefinition.js.map +0 -1
  137. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js +0 -9
  138. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/getMemoryInternals.js.map +0 -1
  139. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/getOperationDefinition.js.map +0 -1
  140. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/getOperationName.js +0 -8
  141. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/getOperationName.js.map +0 -1
  142. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/globals/global.js.map +0 -1
  143. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/globals/maybe.js +0 -10
  144. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/globals/maybe.js.map +0 -1
  145. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/isNonNullObject.js +0 -8
  146. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/isNonNullObject.js.map +0 -1
  147. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/makeUniqueId.js.map +0 -1
  148. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/memoize.js.map +0 -1
  149. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/internal/stringifyForDisplay.js.map +0 -1
  150. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/utilities/invariant/index.js.map +0 -1
  151. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/version.js +0 -6
  152. package/dist/node_modules/.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo/client/version.js.map +0 -1
  153. package/dist/node_modules/.bun/@wry_caches@1.0.1/node_modules/@wry/caches/lib/weak.js.map +0 -1
  154. package/dist/node_modules/.bun/@wry_trie@0.5.0/node_modules/@wry/trie/lib/index.js.map +0 -1
  155. package/dist/node_modules/.bun/graphql-ws@6.0.8_796ebe57c2b0ffe0/node_modules/graphql-ws/dist/client.js.map +0 -1
  156. package/dist/node_modules/.bun/graphql-ws@6.0.8_796ebe57c2b0ffe0/node_modules/graphql-ws/dist/common-CGW11Fyb.js.map +0 -1
  157. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/NotificationFactories.js.map +0 -1
  158. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/Observable.js.map +0 -1
  159. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/Subscriber.js.map +0 -1
  160. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +0 -1
  161. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/config.js.map +0 -1
  162. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/observable/empty.js.map +0 -1
  163. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js.map +0 -1
  164. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/symbol/observable.js.map +0 -1
  165. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js.map +0 -1
  166. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js +0 -11
  167. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/arrRemove.js.map +0 -1
  168. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js.map +0 -1
  169. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/errorContext.js.map +0 -1
  170. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/identity.js +0 -8
  171. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/identity.js.map +0 -1
  172. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isFunction.js +0 -8
  173. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/isFunction.js.map +0 -1
  174. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/noop.js +0 -6
  175. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/noop.js.map +0 -1
  176. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/pipe.js.map +0 -1
  177. package/dist/node_modules/.bun/rxjs@7.8.2/node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js.map +0 -1
  178. package/dist/node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.es6.js.map +0 -1
  179. package/dist/pages/ProductReviewsPage.js +0 -87
  180. package/dist/pages/ProductReviewsPage.js.map +0 -1
  181. package/dist/pages/PublisherDashboardPage.js +0 -160
  182. package/dist/pages/PublisherDashboardPage.js.map +0 -1
  183. package/dist/pages/PublisherRevenuePage.js +0 -140
  184. package/dist/pages/PublisherRevenuePage.js.map +0 -1
  185. package/dist/pages/PublisherSubmissionsPage.js +0 -179
  186. package/dist/pages/PublisherSubmissionsPage.js.map +0 -1
  187. package/dist/pages/PublisherSubmitPage.js +0 -230
  188. package/dist/pages/PublisherSubmitPage.js.map +0 -1
  189. /package/dist/node_modules/{.bun/@apollo_client@4.1.9_e571b0b00fd00a97/node_modules/@apollo → @apollo}/client/utilities/caching/sizes.js +0 -0
@@ -1,17 +1,18 @@
1
1
  import { useStore as e } from "../providers/StoreProvider.js";
2
2
  import { useCallback as t, useEffect as n, useReducer as r, useState as i } from "react";
3
- import { AlertCircle as a, Building2 as o, CheckCircle as s, Info as c, Loader2 as l, ShieldCheck as u, X as d } from "lucide-react";
4
- import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
5
- import { graphqlFetch as h } from "@burdenoff/fe-libs/shared/graphql";
3
+ import { AlertCircle as a, Building2 as o, CheckCircle as s, Info as c, Loader2 as l } from "lucide-react";
4
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
5
+ import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql";
6
+ import { Dialog as m, DialogContent as h, DialogDescription as g, DialogFooter as _, DialogHeader as v, DialogTitle as y } from "@burdenoff/fe-libs/ui";
6
7
  //#region src/components/InstallAppModal.tsx
7
- var g = "query MyWorkspaces { myWorkspaces { items { id name slug type status organizationId } total } }", _ = "mutation InstallWorkspaceApps($workspaceIds: [ID!]!, $input: InstallWorkspaceAppInput!) { installWorkspaceApps(workspaceIds: $workspaceIds, input: $input) { successCount failedCount results { success workspaceId error } } }", v = "mutation RecordAppInstallation($input: RecordAppInstallationInput!) { recordAppInstallation(input: $input) { id status workspaceId version } }", y = "mutation InstallPurchasedApp($orderId: ID, $productId: String!, $workspaceId: String!) { installPurchasedApp(orderId: $orderId, productId: $productId, workspaceId: $workspaceId) { success alreadyInstalled installation { id productId workspaceId status version } error message } }", b = "mutation CreateProductEntitlement($input: CreateProductEntitlementInput!) { createProductEntitlement(input: $input) { id status productId workspaceId } }", x = new Set([
8
+ var b = "query MyWorkspaces { myWorkspaces { items { id name slug type status organizationId } total } }", x = "mutation InstallWorkspaceApps($workspaceIds: [ID!]!, $input: InstallWorkspaceAppInput!) { installWorkspaceApps(workspaceIds: $workspaceIds, input: $input) { successCount failedCount results { success workspaceId error } } }", S = "mutation RecordAppInstallation($input: RecordAppInstallationInput!) { recordAppInstallation(input: $input) { id status workspaceId version } }", C = "mutation InstallPurchasedApp($orderId: ID, $productId: String!, $workspaceId: String!) { installPurchasedApp(orderId: $orderId, productId: $productId, workspaceId: $workspaceId) { success alreadyInstalled installation { id productId workspaceId status version } error message } }", w = "mutation CreateProductEntitlement($input: CreateProductEntitlementInput!) { createProductEntitlement(input: $input) { id status productId workspaceId } }", T = new Set([
8
9
  "VIBEMODULE",
9
10
  "NODE",
10
11
  "CONSOLE",
11
12
  "DASHBOARD",
12
13
  "PARSER",
13
14
  "DATASINK"
14
- ]), S = {
15
+ ]), E = {
15
16
  ALREADY_INSTALLED: "This app is already installed in the selected workspace.",
16
17
  QUOTA_EXCEEDED: "Installation limit reached. Please upgrade your plan or contact support.",
17
18
  PERMISSION_DENIED: "You do not have permission to install apps in this workspace.",
@@ -20,19 +21,19 @@ var g = "query MyWorkspaces { myWorkspaces { items { id name slug type status or
20
21
  ENTITLEMENT_EXPIRED: "Your license for this app has expired.",
21
22
  UNSUPPORTED_TYPE: "This product type cannot be installed in the selected workspace."
22
23
  };
23
- function C(e) {
24
- for (let [t, n] of Object.entries(S)) if (e.toUpperCase().includes(t)) return n;
24
+ function D(e) {
25
+ for (let [t, n] of Object.entries(E)) if (e.toUpperCase().includes(t)) return n;
25
26
  return "Installation failed. Please try again or contact support.";
26
27
  }
27
- var w = {
28
+ var O = {
28
29
  selectedWorkspace: null,
29
30
  installing: !1,
30
31
  installError: null,
31
32
  installInfo: null
32
33
  };
33
- function T(e, t) {
34
+ function k(e, t) {
34
35
  switch (t.type) {
35
- case "reset": return w;
36
+ case "reset": return O;
36
37
  case "selectWorkspace": return {
37
38
  ...e,
38
39
  selectedWorkspace: t.workspaceId
@@ -58,14 +59,14 @@ function T(e, t) {
58
59
  default: return e;
59
60
  }
60
61
  }
61
- function E(r) {
62
+ function A(r) {
62
63
  let { authToken: a } = e(), [o, s] = i([]), [c, l] = i(!1), [u, d] = i(null), f = t(async () => {
63
64
  if (!r) {
64
65
  l(!0), d(null);
65
66
  try {
66
- let e = await h({
67
+ let e = await p({
67
68
  gateway: "global",
68
- query: g,
69
+ query: b,
69
70
  authToken: a || void 0
70
71
  });
71
72
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "GraphQL error");
@@ -86,335 +87,254 @@ function E(r) {
86
87
  refetch: f
87
88
  };
88
89
  }
89
- var D = ({ isOpen: t, onClose: g, app: S, orderId: D, purchaseState: O = "free", onInstallSuccess: k, onInstallError: A }) => {
90
- let { authToken: j, user: M } = e(), [N, P] = r(T, w), { selectedWorkspace: F, installing: I, installError: L, installInfo: R } = N, z = S.requiredPermissions ?? [], [B, V] = i(z.length > 0 ? "permissions" : "workspace");
91
- n(() => {
92
- t && (V(z.length > 0 ? "permissions" : "workspace"), P({ type: "reset" }));
93
- }, [t, z.length]);
94
- let { workspaces: H, loading: U, error: W } = E(!t || B === "permissions"), G = H.filter((e) => e.status === "ACTIVE"), K = async () => {
95
- if (!F) return;
96
- let e = G.find((e) => e.id === F);
90
+ var j = ({ isOpen: t, onClose: n, app: i, orderId: b, purchaseState: E = "free", onInstallSuccess: j, onInstallError: M }) => {
91
+ let { authToken: N, user: P } = e(), [F, I] = r(k, O), { selectedWorkspace: L, installing: R, installError: z, installInfo: B } = F, { workspaces: V, loading: H, error: U } = A(!t), W = V.filter((e) => e.status === "ACTIVE"), G = async () => {
92
+ if (!L) return;
93
+ let e = W.find((e) => e.id === L);
97
94
  if (!e) return;
98
- let t = M?.id;
99
- P({ type: "startInstall" });
95
+ let t = P?.id;
96
+ I({ type: "startInstall" });
100
97
  try {
101
- if (!D && O !== "purchased") {
98
+ if (!b && E !== "purchased") {
102
99
  if (!t) throw Error("Unable to identify the current user for license creation");
103
- await h({
100
+ await p({
104
101
  gateway: "global",
105
- query: b,
102
+ query: w,
106
103
  variables: { input: {
107
- productId: S.id,
104
+ productId: i.id,
108
105
  purchasedBy: t,
109
106
  workspaceId: e.id,
110
107
  metadata: {
111
108
  source: "store-ui",
112
- productType: S.type
109
+ productType: i.type
113
110
  }
114
111
  } },
115
- authToken: j || void 0
112
+ authToken: N || void 0
116
113
  });
117
114
  }
118
- let n = await h({
115
+ let r = await p({
119
116
  gateway: "global",
120
- query: y,
117
+ query: C,
121
118
  variables: {
122
- orderId: D ?? null,
123
- productId: S.id,
119
+ orderId: b ?? null,
120
+ productId: i.id,
124
121
  workspaceId: e.id
125
122
  },
126
- authToken: j || void 0
123
+ authToken: N || void 0
127
124
  });
128
- if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Installation failed");
129
- let r = n.data?.installPurchasedApp;
130
- if (r?.success) r.alreadyInstalled ? P({
125
+ if (r.errors?.length) throw Error(r.errors[0]?.message ?? "Installation failed");
126
+ let a = r.data?.installPurchasedApp;
127
+ if (a?.success) a.alreadyInstalled ? I({
131
128
  type: "setInfo",
132
- info: r.message || "Already installed on this workspace"
133
- }) : (k?.(e.id, e.name), g());
129
+ info: a.message || "Already installed on this workspace"
130
+ }) : (j?.(e.id, e.name), n());
134
131
  else {
135
- let e = r?.error || "Installation failed";
136
- P({
132
+ let e = a?.error || "Installation failed";
133
+ I({
137
134
  type: "setError",
138
- error: C(e)
139
- }), A?.(Error(e));
135
+ error: D(e)
136
+ }), M?.(Error(e));
140
137
  }
141
138
  } catch (e) {
142
139
  let t = e instanceof Error ? e.message : "Installation failed";
143
- P({
140
+ I({
144
141
  type: "setError",
145
- error: C(t)
146
- }), A?.(Error(t));
142
+ error: D(t)
143
+ }), M?.(Error(t));
147
144
  } finally {
148
- P({ type: "finishInstall" });
145
+ I({ type: "finishInstall" });
149
146
  }
150
- }, q = async () => {
151
- if (!F) return;
152
- let e = G.find((e) => e.id === F);
147
+ }, K = async () => {
148
+ if (!L) return;
149
+ let e = W.find((e) => e.id === L);
153
150
  if (e) {
154
- P({ type: "startInstall" });
151
+ I({ type: "startInstall" });
155
152
  try {
156
- let t = await h({
153
+ let t = await p({
157
154
  gateway: "workspace",
158
- query: _,
155
+ query: x,
159
156
  variables: {
160
157
  workspaceIds: [e.id],
161
158
  input: {
162
- appName: S.slug || S.name.toLowerCase().replace(/\s+/g, "-"),
163
- displayName: S.name,
164
- version: S.version || "1.0.0",
165
- type: S.type || "app",
159
+ appName: i.slug || i.name.toLowerCase().replace(/\s+/g, "-"),
160
+ displayName: i.name,
161
+ version: i.version || "1.0.0",
162
+ type: i.type || "app",
166
163
  manifest: {
167
- productId: S.id,
168
- icon: S.icon
164
+ productId: i.id,
165
+ icon: i.icon
169
166
  }
170
167
  }
171
168
  },
172
- authToken: j || void 0,
169
+ authToken: N || void 0,
173
170
  workspaceId: e.id,
174
171
  workspaceToken: !0
175
172
  });
176
173
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Installation failed");
177
- let n = t.data?.installWorkspaceApps;
178
- if (n?.successCount && n.successCount > 0) {
174
+ let r = t.data?.installWorkspaceApps;
175
+ if (r?.successCount && r.successCount > 0) {
179
176
  try {
180
- await h({
177
+ await p({
181
178
  gateway: "global",
182
- query: v,
179
+ query: S,
183
180
  variables: { input: {
184
- productId: S.id,
181
+ productId: i.id,
185
182
  workspaceId: e.id,
186
183
  workspaceName: e.name,
187
184
  workspaceType: e.type,
188
185
  organizationId: e.organizationId,
189
- version: S.version || "1.0.0",
186
+ version: i.version || "1.0.0",
190
187
  manifest: {
191
- productId: S.id,
192
- icon: S.icon,
193
- slug: S.slug,
194
- type: S.type
188
+ productId: i.id,
189
+ icon: i.icon,
190
+ slug: i.slug,
191
+ type: i.type
195
192
  }
196
193
  } },
197
- authToken: j || void 0
194
+ authToken: N || void 0
198
195
  });
199
196
  } catch {}
200
- k?.(e.id, e.name), g();
197
+ j?.(e.id, e.name), n();
201
198
  } else {
202
- let e = n?.results?.[0]?.error || "Installation failed";
203
- P({
199
+ let e = r?.results?.[0]?.error || "Installation failed";
200
+ I({
204
201
  type: "setError",
205
- error: C(e)
206
- }), A?.(Error(e));
202
+ error: D(e)
203
+ }), M?.(Error(e));
207
204
  }
208
205
  } catch (e) {
209
206
  let t = e instanceof Error ? e.message : "Installation failed";
210
- P({
207
+ I({
211
208
  type: "setError",
212
- error: C(t)
213
- }), A?.(Error(t));
209
+ error: D(t)
210
+ }), M?.(Error(t));
214
211
  } finally {
215
- P({ type: "finishInstall" });
212
+ I({ type: "finishInstall" });
216
213
  }
217
214
  }
218
- }, J = async () => {
219
- let e = S.type?.toUpperCase() ?? "";
220
- O === "purchased" || D || x.has(e) ? await K() : await q();
221
215
  };
222
- if (!t) return null;
223
- let Y = B === "permissions" ? "Review Permissions" : "Install App";
224
- return /* @__PURE__ */ m("div", {
225
- className: "fixed inset-0 z-50 flex items-center justify-center",
226
- children: [/* @__PURE__ */ p("button", {
227
- type: "button",
228
- "aria-label": "Close modal",
229
- className: "absolute inset-0 bg-bg-overlay/50 backdrop-blur-sm",
230
- onClick: g
231
- }), /* @__PURE__ */ m("dialog", {
232
- open: !0,
233
- "aria-modal": "true",
234
- "aria-labelledby": "install-app-modal-title",
235
- className: "relative z-10 mx-4 w-full max-w-lg rounded-2xl border border-border-default bg-bg-surface shadow-2xl",
216
+ return /* @__PURE__ */ d(m, {
217
+ open: t,
218
+ onOpenChange: (e) => !e && n(),
219
+ children: /* @__PURE__ */ f(h, {
220
+ className: "mx-4 w-full max-w-lg gap-0 p-0",
236
221
  children: [
237
- /* @__PURE__ */ m("div", {
238
- className: "flex items-center justify-between border-b border-border-default px-6 py-4",
239
- children: [/* @__PURE__ */ m("div", {
222
+ /* @__PURE__ */ d(v, {
223
+ className: "flex flex-row items-center justify-between space-y-0 border-b border-border-default px-6 py-4 text-left",
224
+ children: /* @__PURE__ */ f("div", {
240
225
  className: "flex items-center gap-3",
241
- children: [S.icon ? /* @__PURE__ */ p("img", {
242
- src: S.icon,
243
- alt: S.name,
226
+ children: [i.icon ? /* @__PURE__ */ d("img", {
227
+ src: i.icon,
228
+ alt: i.name,
244
229
  className: "size-10 rounded-lg object-cover"
245
- }) : /* @__PURE__ */ p("div", {
230
+ }) : /* @__PURE__ */ d("div", {
246
231
  className: "flex size-10 items-center justify-center rounded-lg bg-bg-sunken text-lg font-bold text-text-muted",
247
- children: S.name.charAt(0)
248
- }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h2", {
249
- id: "install-app-modal-title",
232
+ children: i.name.charAt(0)
233
+ }), /* @__PURE__ */ f("div", { children: [/* @__PURE__ */ d(y, {
250
234
  className: "text-lg font-semibold text-text-primary",
251
- children: Y
252
- }), /* @__PURE__ */ p("p", {
235
+ children: "Install App"
236
+ }), /* @__PURE__ */ d(g, {
253
237
  className: "text-sm text-text-muted",
254
- children: S.name
238
+ children: i.name
255
239
  })] })]
256
- }), /* @__PURE__ */ p("button", {
257
- type: "button",
258
- onClick: g,
259
- "aria-label": "Close install dialog",
260
- className: "cursor-pointer rounded-lg p-2 text-text-muted transition-colors hover:bg-bg-sunken hover:text-text-primary",
261
- children: /* @__PURE__ */ p(d, { className: "size-5" })
262
- })]
240
+ })
263
241
  }),
264
- B === "permissions" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
265
- className: "px-6 py-4",
266
- children: [
267
- /* @__PURE__ */ m("p", {
268
- className: "mb-1 text-sm text-text-secondary",
269
- children: [/* @__PURE__ */ p("span", {
270
- className: "font-medium text-text-primary",
271
- children: S.name
272
- }), " requests access to the following data in your workspace. You must accept to continue."]
273
- }),
274
- /* @__PURE__ */ p("div", {
275
- className: "mt-4 max-h-72 overflow-y-auto space-y-2",
276
- children: z.map((e) => /* @__PURE__ */ m("div", {
277
- className: "flex items-center gap-3 rounded-lg bg-bg-sunken px-4 py-3",
278
- children: [/* @__PURE__ */ p(u, { className: "size-5 flex-shrink-0 text-status-success-text" }), /* @__PURE__ */ p("span", {
279
- className: "text-sm text-text-primary",
280
- children: e
281
- })]
282
- }, e))
283
- }),
284
- /* @__PURE__ */ p("p", {
285
- className: "mt-3 text-xs text-text-muted",
286
- children: "These permissions will be recorded. You will be notified if they change in a future version."
287
- })
288
- ]
289
- }), /* @__PURE__ */ m("div", {
290
- className: "border-t border-border-default px-6 py-4 flex items-center justify-end gap-3",
291
- children: [/* @__PURE__ */ p("button", {
292
- type: "button",
293
- onClick: g,
294
- className: "cursor-pointer rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken",
295
- children: "Cancel"
296
- }), /* @__PURE__ */ m("button", {
297
- type: "button",
298
- onClick: () => V("workspace"),
299
- className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 inline-flex items-center gap-2",
300
- children: [/* @__PURE__ */ p(s, { className: "size-4" }), "Accept & Continue"]
301
- })]
302
- })] }),
303
- B === "workspace" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
242
+ /* @__PURE__ */ f("div", {
304
243
  className: "px-6 py-4",
305
- children: [
306
- z.length > 0 && /* @__PURE__ */ m("div", {
307
- className: "mb-3 flex items-center gap-2 rounded-lg bg-status-success-bg-subtle px-3 py-2 text-sm text-status-success-text",
308
- children: [/* @__PURE__ */ p(s, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ m("span", { children: [
309
- "Permissions accepted (",
310
- z.length,
311
- " permission",
312
- z.length === 1 ? "" : "s",
313
- ")"
314
- ] })]
315
- }),
316
- /* @__PURE__ */ p("p", {
317
- className: "mb-4 text-text-secondary",
318
- children: "Select the workspace where you want to install this app:"
319
- }),
320
- /* @__PURE__ */ p("div", {
321
- className: "max-h-64 overflow-y-auto rounded-lg border border-border-default",
322
- children: U ? /* @__PURE__ */ p("div", {
323
- className: "flex items-center justify-center py-12",
324
- children: /* @__PURE__ */ p(l, { className: "size-8 animate-spin text-text-muted" })
325
- }) : W ? /* @__PURE__ */ m("div", {
326
- className: "flex flex-col items-center justify-center py-12 text-center",
244
+ children: [/* @__PURE__ */ d("p", {
245
+ className: "mb-4 text-text-secondary",
246
+ children: "Select the workspace where you want to install this app:"
247
+ }), /* @__PURE__ */ d("div", {
248
+ className: "max-h-72 overflow-y-auto rounded-lg border border-border-seam",
249
+ children: H ? /* @__PURE__ */ d("div", {
250
+ className: "flex items-center justify-center py-12",
251
+ children: /* @__PURE__ */ d(l, { className: "size-8 animate-spin text-text-muted" })
252
+ }) : U ? /* @__PURE__ */ f("div", {
253
+ className: "flex flex-col items-center justify-center py-12 text-center",
254
+ children: [
255
+ /* @__PURE__ */ d(a, { className: "mb-2 size-8 text-status-error-text" }),
256
+ /* @__PURE__ */ d("p", {
257
+ className: "text-sm text-status-error-text",
258
+ children: "Failed to load workspaces"
259
+ }),
260
+ /* @__PURE__ */ d("p", {
261
+ className: "text-xs text-text-muted mt-1",
262
+ children: U.message
263
+ })
264
+ ]
265
+ }) : W.length === 0 ? /* @__PURE__ */ f("div", {
266
+ className: "flex flex-col items-center justify-center py-12 text-center",
267
+ children: [/* @__PURE__ */ d(o, { className: "mb-2 size-8 text-text-muted" }), /* @__PURE__ */ d("p", {
268
+ className: "text-sm text-text-muted",
269
+ children: "No workspaces available"
270
+ })]
271
+ }) : /* @__PURE__ */ d("div", {
272
+ className: "divide-y divide-border-default",
273
+ children: W.map((e) => /* @__PURE__ */ f("button", {
274
+ type: "button",
275
+ onClick: () => I({
276
+ type: "selectWorkspace",
277
+ workspaceId: e.id
278
+ }),
279
+ className: `w-full cursor-pointer flex items-center gap-3 px-4 py-3 text-left transition-colors ${L === e.id ? "bg-action-primary-bg/10" : "transition-colors hover:bg-bg-sunken"}`,
327
280
  children: [
328
- /* @__PURE__ */ p(a, { className: "mb-2 size-8 text-status-error-text" }),
329
- /* @__PURE__ */ p("p", {
330
- className: "text-sm text-status-error-text",
331
- children: "Failed to load workspaces"
281
+ /* @__PURE__ */ d("div", {
282
+ className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10 text-text-link",
283
+ children: /* @__PURE__ */ d(o, { className: "size-5" })
332
284
  }),
333
- /* @__PURE__ */ p("p", {
334
- className: "text-xs text-text-muted mt-1",
335
- children: W.message
336
- })
337
- ]
338
- }) : G.length === 0 ? /* @__PURE__ */ m("div", {
339
- className: "flex flex-col items-center justify-center py-12 text-center",
340
- children: [/* @__PURE__ */ p(o, { className: "mb-2 size-8 text-text-muted" }), /* @__PURE__ */ p("p", {
341
- className: "text-sm text-text-muted",
342
- children: "No workspaces available"
343
- })]
344
- }) : /* @__PURE__ */ p("div", {
345
- className: "divide-y divide-border-default",
346
- children: G.map((e) => /* @__PURE__ */ m("button", {
347
- type: "button",
348
- onClick: () => P({
349
- type: "selectWorkspace",
350
- workspaceId: e.id
285
+ /* @__PURE__ */ f("div", {
286
+ className: "flex-1 min-w-0",
287
+ children: [/* @__PURE__ */ d("p", {
288
+ className: "font-medium text-text-primary truncate",
289
+ children: e.name
290
+ }), e.slug ? /* @__PURE__ */ f("p", {
291
+ className: "text-xs text-text-muted truncate",
292
+ children: ["/", e.slug]
293
+ }) : null]
351
294
  }),
352
- className: `w-full cursor-pointer flex items-center gap-3 px-4 py-3 text-left transition-colors ${F === e.id ? "bg-action-primary-bg/10" : "transition-colors hover:bg-bg-sunken"}`,
353
- children: [
354
- /* @__PURE__ */ p("div", {
355
- className: "flex size-10 items-center justify-center rounded-lg bg-action-primary-bg/10 text-text-link",
356
- children: /* @__PURE__ */ p(o, { className: "size-5" })
357
- }),
358
- /* @__PURE__ */ m("div", {
359
- className: "flex-1 min-w-0",
360
- children: [/* @__PURE__ */ p("p", {
361
- className: "font-medium text-text-primary truncate",
362
- children: e.name
363
- }), e.slug ? /* @__PURE__ */ m("p", {
364
- className: "text-xs text-text-muted truncate",
365
- children: ["/", e.slug]
366
- }) : null]
367
- }),
368
- F === e.id && /* @__PURE__ */ p(s, { className: "size-5 flex-shrink-0 text-action-primary-bg" })
369
- ]
370
- }, e.id))
371
- })
295
+ L === e.id && /* @__PURE__ */ d(s, { className: "size-5 flex-shrink-0 text-action-primary-bg" })
296
+ ]
297
+ }, e.id))
372
298
  })
373
- ]
374
- }), /* @__PURE__ */ m("div", {
375
- className: "border-t border-border-default px-6 py-4",
299
+ })]
300
+ }),
301
+ /* @__PURE__ */ f(_, {
302
+ className: "block border-t border-border-default px-6 py-4 sm:flex-col sm:items-stretch sm:space-x-0",
376
303
  children: [
377
- R && /* @__PURE__ */ m("div", {
304
+ B && /* @__PURE__ */ f("div", {
378
305
  className: "mb-3 flex items-center gap-2 rounded-lg bg-status-info-bg-subtle px-3 py-2 text-sm text-status-info-text",
379
- children: [/* @__PURE__ */ p(c, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ p("span", { children: R })]
306
+ children: [/* @__PURE__ */ d(c, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ d("span", { children: B })]
380
307
  }),
381
- L && /* @__PURE__ */ m("div", {
308
+ z && /* @__PURE__ */ f("div", {
382
309
  className: "mb-3 flex items-center gap-2 rounded-lg bg-status-error-bg-subtle/10 px-3 py-2 text-sm text-status-error-text",
383
- children: [/* @__PURE__ */ p(a, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ p("span", { children: L })]
310
+ children: [/* @__PURE__ */ d(a, { className: "size-4 flex-shrink-0" }), /* @__PURE__ */ d("span", { children: z })]
384
311
  }),
385
- /* @__PURE__ */ m("div", {
312
+ /* @__PURE__ */ f("div", {
386
313
  className: "flex items-center justify-end gap-3",
387
- children: [
388
- z.length > 0 && /* @__PURE__ */ p("button", {
389
- type: "button",
390
- onClick: () => V("permissions"),
391
- disabled: I,
392
- className: "cursor-pointer rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
393
- children: "Back"
394
- }),
395
- /* @__PURE__ */ p("button", {
396
- type: "button",
397
- onClick: g,
398
- disabled: I,
399
- className: "cursor-pointer rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
400
- children: "Cancel"
401
- }),
402
- /* @__PURE__ */ p("button", {
403
- type: "button",
404
- onClick: J,
405
- disabled: !F || I,
406
- className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center gap-2",
407
- children: I ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(l, { className: "size-4 animate-spin" }), "Installing…"] }) : "Install App"
408
- })
409
- ]
314
+ children: [/* @__PURE__ */ d("button", {
315
+ type: "button",
316
+ onClick: n,
317
+ disabled: R,
318
+ className: "cursor-pointer rounded-lg border border-border-default px-4 py-2 text-sm font-medium text-text-primary transition-colors hover:bg-bg-sunken disabled:opacity-50",
319
+ children: "Cancel"
320
+ }), /* @__PURE__ */ d("button", {
321
+ type: "button",
322
+ onClick: async () => {
323
+ let e = i.type?.toUpperCase() ?? "";
324
+ E === "purchased" || b || T.has(e) ? await G() : await K();
325
+ },
326
+ disabled: !L || R,
327
+ className: "cursor-pointer rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text transition-opacity hover:opacity-90 disabled:opacity-50 disabled:cursor-not-allowed inline-flex items-center gap-2",
328
+ children: R ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(l, { className: "size-4 animate-spin" }), "Installing…"] }) : "Install App"
329
+ })]
410
330
  })
411
331
  ]
412
- })] })
332
+ })
413
333
  ]
414
- })]
334
+ })
415
335
  });
416
336
  };
417
337
  //#endregion
418
- export { D as InstallAppModal };
338
+ export { j as InstallAppModal };
419
339
 
420
340
  //# sourceMappingURL=InstallAppModal.js.map