@elevasis/ui 2.23.0 → 2.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/dist/app/index.d.ts +2915 -0
  2. package/dist/app/index.js +5 -4
  3. package/dist/{chunk-3HEUGBOT.js → chunk-2WZ635SS.js} +2 -2
  4. package/dist/{chunk-D3KQAABP.js → chunk-4NWNS7TX.js} +1 -1
  5. package/dist/{chunk-7PGEGSUM.js → chunk-FUEXGRFR.js} +2 -2
  6. package/dist/{chunk-6IA2OMAE.js → chunk-HC2KV6BU.js} +9 -0
  7. package/dist/{chunk-YU6MBDVO.js → chunk-KCJ6VATY.js} +4 -68
  8. package/dist/{chunk-FXWETLEB.js → chunk-KLFIJDTD.js} +1 -1
  9. package/dist/{chunk-PXGSJNBH.js → chunk-M2HWJY6O.js} +704 -375
  10. package/dist/{chunk-N6WLOWOD.js → chunk-MTR6AN2C.js} +3 -12
  11. package/dist/chunk-OWHQ65EQ.js +211 -0
  12. package/dist/{chunk-XOTJNW4Q.js → chunk-QIW6OCEI.js} +18 -1
  13. package/dist/{chunk-GUJUK6EH.js → chunk-QULLZ5PE.js} +172 -2
  14. package/dist/{chunk-QZJM3RYI.js → chunk-SNHGSCKH.js} +1 -1
  15. package/dist/{chunk-LVUCBY7X.js → chunk-UDJE54WN.js} +85 -3
  16. package/dist/{chunk-EPV7NU2E.js → chunk-VGNAV3TH.js} +385 -188
  17. package/dist/{chunk-PTUOINQ2.js → chunk-YBZT7MJR.js} +3 -3
  18. package/dist/{chunk-SQ5JGELM.js → chunk-ZDKQNQ4X.js} +19 -1
  19. package/dist/components/index.d.ts +488 -452
  20. package/dist/components/index.js +58 -22
  21. package/dist/components/navigation/index.js +2 -2
  22. package/dist/features/auth/index.d.ts +463 -377
  23. package/dist/features/crm/index.d.ts +459 -379
  24. package/dist/features/crm/index.js +8 -8
  25. package/dist/features/dashboard/index.js +8 -8
  26. package/dist/features/delivery/index.d.ts +457 -371
  27. package/dist/features/delivery/index.js +8 -8
  28. package/dist/features/lead-gen/index.d.ts +213 -65
  29. package/dist/features/lead-gen/index.js +9 -8
  30. package/dist/features/monitoring/index.js +9 -9
  31. package/dist/features/monitoring/requests/index.js +7 -7
  32. package/dist/features/operations/index.js +11 -10
  33. package/dist/features/settings/index.d.ts +463 -377
  34. package/dist/features/settings/index.js +9 -9
  35. package/dist/hooks/delivery/index.d.ts +457 -371
  36. package/dist/hooks/index.d.ts +936 -718
  37. package/dist/hooks/index.js +7 -7
  38. package/dist/hooks/published.d.ts +936 -718
  39. package/dist/hooks/published.js +7 -7
  40. package/dist/index.d.ts +1313 -1027
  41. package/dist/index.js +8 -8
  42. package/dist/initialization/index.d.ts +463 -377
  43. package/dist/organization/index.d.ts +11 -1
  44. package/dist/organization/index.js +2 -2
  45. package/dist/profile/index.d.ts +463 -377
  46. package/dist/provider/index.d.ts +3132 -169
  47. package/dist/provider/index.js +6 -6
  48. package/dist/provider/published.d.ts +3098 -168
  49. package/dist/provider/published.js +3 -3
  50. package/dist/supabase/index.d.ts +559 -389
  51. package/dist/test-utils/index.d.ts +21 -1
  52. package/dist/test-utils/index.js +13 -4
  53. package/dist/theme/index.js +2 -2
  54. package/dist/types/index.d.ts +463 -377
  55. package/package.json +4 -4
  56. package/src/test-utils/README.md +2 -0
  57. /package/dist/{chunk-ZBCTB5CA.js → chunk-EIOJNUPL.js} +0 -0
@@ -1,11 +1,11 @@
1
1
  import { AppShellLoader } from './chunk-M25JL54Z.js';
2
2
  import { FilterBar } from './chunk-PDHTXPSF.js';
3
3
  import { CustomModal } from './chunk-KVJ3LFH2.js';
4
- import { useAvailablePresets } from './chunk-QZJM3RYI.js';
5
- import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useOrgRoles, useAssignRole, useRevokeRole, useHasPermission, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas } from './chunk-GUJUK6EH.js';
4
+ import { useAvailablePresets } from './chunk-SNHGSCKH.js';
5
+ import { useDeleteCredential, useCreateCredential, useCredentials, MEMBERSHIP_STATUS_COLORS, transformMembershipToTableRow, useUserMemberships, useUpdateWebhookEndpoint, useResources, useDeleteWebhookEndpoint, useCreateWebhookEndpoint, useListWebhookEndpoints, useOrgRoles, useAssignRole, useRevokeRole, useHasPermission, useUpdateMemberConfig, useOrganizationMembers, useUpdateCredential, CredentialSchemas } from './chunk-QULLZ5PE.js';
6
6
  import { showApiErrorNotification, showErrorNotification, showSuccessNotification } from './chunk-Z6FAH4XV.js';
7
7
  import { ListSkeleton, EmptyState, PageTitleCaption, CardHeader, APIErrorAlert, StatCard } from './chunk-XUYBOO32.js';
8
- import { RoleBadge } from './chunk-SQ5JGELM.js';
8
+ import { RoleBadge } from './chunk-ZDKQNQ4X.js';
9
9
  import { isAPIClientError, formatDateTime, OAUTH_POPUP_CHECK_INTERVAL, OAUTH_FLOW_TIMEOUT } from './chunk-SGXXJE52.js';
10
10
  import { useInitialization } from './chunk-DK2HVHCY.js';
11
11
  import { useElevasisServices } from './chunk-IRW7JMQ4.js';
@@ -1,9 +1,11 @@
1
+ import { useOrganization } from './chunk-DD3CCMCZ.js';
1
2
  import { useUserProfile } from './chunk-QHSW4WHM.js';
2
3
  import { useAuthContext } from './chunk-BRJ3QZ4E.js';
3
4
  import { useState, useRef, useEffect, useCallback } from 'react';
4
5
  import { Badge, Group, Button, Loader, Menu, Text } from '@mantine/core';
5
6
  import { IconLock, IconChevronDown, IconBuilding, IconCheck } from '@tabler/icons-react';
6
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
+ import { useAuth } from '@workos-inc/authkit-react';
7
9
 
8
10
  function RoleBadge({ name, isSystem }) {
9
11
  return /* @__PURE__ */ jsx(Badge, { color: isSystem ? "gray" : "primary", variant: "light", children: /* @__PURE__ */ jsxs(Group, { gap: 4, wrap: "nowrap", children: [
@@ -124,6 +126,22 @@ function OrganizationSwitcher({
124
126
  )
125
127
  ] });
126
128
  }
129
+ function OrganizationSwitcherConnected() {
130
+ const { switchToOrganization } = useAuth();
131
+ const { currentMembership, memberships, isInitializing, isOrgRefreshing, switchOrganization } = useOrganization();
132
+ return /* @__PURE__ */ jsx(
133
+ OrganizationSwitcher,
134
+ {
135
+ currentOrganization: currentMembership?.organization,
136
+ memberships,
137
+ isLoading: isInitializing || isOrgRefreshing,
138
+ onSwitch: async (workosOrgId) => {
139
+ await switchToOrganization({ organizationId: workosOrgId });
140
+ switchOrganization(workosOrgId);
141
+ }
142
+ }
143
+ );
144
+ }
127
145
 
128
146
  // src/organization/store/organizationsSlice.ts
129
147
  var initialOrganizationsState = {
@@ -366,4 +384,4 @@ function createUseOrgInitialization(useOrganizations, useApiClient) {
366
384
  };
367
385
  }
368
386
 
369
- export { OrganizationSwitcher, RoleBadge, createOrganizationsSlice, createUseOrgInitialization, createUseOrganizations };
387
+ export { OrganizationSwitcher, OrganizationSwitcherConnected, RoleBadge, createOrganizationsSlice, createUseOrgInitialization, createUseOrganizations };