@elevasis/ui 2.64.1 → 2.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.js +2 -2
- package/dist/app/index.d.ts +26 -0
- package/dist/app/index.js +8 -8
- package/dist/auth/index.d.ts +12 -5
- package/dist/auth/index.js +8 -8
- package/dist/charts/index.js +8 -8
- package/dist/{chunk-DRQPEMJI.js → chunk-4DV4ECMG.js} +3 -0
- package/dist/{chunk-KRWALB24.js → chunk-6SSQGWK7.js} +1 -1
- package/dist/{chunk-ZTWA5H77.js → chunk-6ZAP3FOA.js} +0 -1
- package/dist/{chunk-PGAA4G3T.js → chunk-ANNM5R7S.js} +275 -382
- package/dist/{chunk-I3CFGE3N.js → chunk-BLXJEIQS.js} +1 -1
- package/dist/chunk-L7BZZ4SI.js +56 -0
- package/dist/chunk-P45GQ3ZW.js +104 -0
- package/dist/{chunk-EIXSQONC.js → chunk-RT4KRGZT.js} +37 -59
- package/dist/{chunk-FVOMKZ7S.js → chunk-Y6I3IC45.js} +3 -6
- package/dist/components/index.d.ts +274 -191
- package/dist/components/index.js +8 -8
- package/dist/components/navigation/index.js +8 -8
- package/dist/execution/index.d.ts +115 -104
- package/dist/execution/index.js +2 -2
- package/dist/features/auth/index.d.ts +125 -9
- package/dist/features/auth/index.js +154 -14
- package/dist/features/clients/index.js +8 -8
- package/dist/features/crm/index.d.ts +20 -0
- package/dist/features/crm/index.js +8 -8
- package/dist/features/dashboard/index.js +8 -8
- package/dist/features/delivery/index.d.ts +20 -0
- package/dist/features/delivery/index.js +8 -8
- package/dist/features/knowledge/index.js +8 -8
- package/dist/features/lead-gen/index.js +8 -8
- package/dist/features/monitoring/index.js +8 -8
- package/dist/features/monitoring/requests/index.js +9 -9
- package/dist/features/notes/index.js +2 -2
- package/dist/features/operations/index.d.ts +177 -106
- package/dist/features/operations/index.js +8 -8
- package/dist/features/public-agent-chat/index.js +1 -1
- package/dist/features/settings/index.d.ts +21 -0
- package/dist/features/settings/index.js +8 -8
- package/dist/hooks/access/index.js +8 -8
- package/dist/hooks/delivery/index.d.ts +20 -0
- package/dist/hooks/delivery/index.js +8 -8
- package/dist/hooks/index.d.ts +319 -145
- package/dist/hooks/index.js +8 -8
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.d.ts +0 -2
- package/dist/hooks/operations/command-view/utils/transformCommandViewData.js +1 -1
- package/dist/hooks/published.d.ts +319 -145
- package/dist/hooks/published.js +8 -8
- package/dist/index.d.ts +409 -219
- package/dist/index.js +8 -8
- package/dist/initialization/index.d.ts +95 -28
- package/dist/initialization/index.js +3 -3
- package/dist/knowledge/index.js +12 -12
- package/dist/{knowledge-search-index-JOPRYZN6.js → knowledge-search-index-6EZNBNSR.js} +4 -4
- package/dist/layout/index.js +8 -8
- package/dist/organization/index.d.ts +63 -4
- package/dist/organization/index.js +8 -8
- package/dist/profile/index.d.ts +43 -2
- package/dist/profile/index.js +1 -1
- package/dist/provider/index.d.ts +20 -0
- package/dist/provider/index.js +8 -8
- package/dist/provider/published.d.ts +20 -0
- package/dist/provider/published.js +8 -8
- package/dist/supabase/index.d.ts +40 -0
- package/dist/test-utils/index.d.ts +5 -0
- package/dist/test-utils/index.js +4 -4
- package/dist/test-utils/setup-integration.js +1 -1
- package/dist/test-utils/setup.js +1 -1
- package/dist/types/index.d.ts +483 -244
- package/dist/utils/index.js +2 -2
- package/package.json +6 -4
- package/dist/chunk-LO7GWG24.js +0 -75
- package/dist/chunk-T4LA4RY2.js +0 -56
package/dist/utils/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { APIClientError, API_URL, DEBOUNCE_FILTER, DEBOUNCE_SLIDER, GC_TIME_LONG, GC_TIME_MEDIUM, GC_TIME_SHORT, LIMIT_ACTIVITY_FEED, OAUTH_FLOW_TIMEOUT, PAGE_SIZE_DEFAULT, STALE_TIME_ADMIN, STALE_TIME_DEFAULT, STALE_TIME_MONITORING, formatChartAxisDate, formatDate, formatDateTime, formatErrorMessage, formatRelativeTime, formatTimeAgo, getErrorInfo, getErrorTitle, getResourceColor, getResourceIcon, isAPIClientError, restoreConsole, setupBrowserMocks, suppressKnownWarnings, validateEmail } from '../chunk-I7BZVVVU.js';
|
|
2
|
-
export { REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, getTimeRangeDates, getTimeRangeLabel } from '../chunk-
|
|
3
|
-
export { ResourceStatusColors } from '../chunk-
|
|
2
|
+
export { REFETCH_INTERVAL_DASHBOARD, REFETCH_INTERVAL_REALTIME, REFETCH_INTERVAL_RUNNING, REFETCH_INTERVAL_RUNNING_FAST, SSE_CLOSE_GRACE_PERIOD, SSE_TOKEN_REFRESH_DELAY, WS_MAX_RETRIES_BEFORE_ERROR, WS_RECONNECT_BASE_DELAY, WS_RECONNECT_MAX_DELAY, debounce, getTimeRangeDates, getTimeRangeLabel } from '../chunk-Y6I3IC45.js';
|
|
3
|
+
export { ResourceStatusColors } from '../chunk-6SSQGWK7.js';
|
|
4
4
|
import '../chunk-TVTSASST.js';
|
|
5
5
|
import '../chunk-I2KLQ2HA.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevasis/ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.66.0",
|
|
4
4
|
"description": "UI components and platform-aware hooks for building custom frontends on the Elevasis platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -224,6 +224,8 @@
|
|
|
224
224
|
"@elevasis/sdk": "^1.16.0",
|
|
225
225
|
"react": "^19.2.0",
|
|
226
226
|
"react-dom": "^19.2.0",
|
|
227
|
+
"@supabase/supabase-js": "^2.49.4",
|
|
228
|
+
"@workos-inc/authkit-react": "^0.11.0",
|
|
227
229
|
"@tanstack/react-query": "^5.76.2",
|
|
228
230
|
"@tanstack/react-router": "^1.131.28",
|
|
229
231
|
"zod": "^4.1.0",
|
|
@@ -274,10 +276,10 @@
|
|
|
274
276
|
"typescript": "5.9.2",
|
|
275
277
|
"vite": "^7.0.0",
|
|
276
278
|
"vitest": "^3.2.4",
|
|
277
|
-
"@
|
|
278
|
-
"@repo/core": "0.56.0",
|
|
279
|
+
"@repo/core": "0.59.0",
|
|
279
280
|
"@repo/elevasis-core": "1.0.0",
|
|
280
281
|
"@repo/typescript-config": "0.0.0",
|
|
282
|
+
"@elevasis/sdk": "1.44.0",
|
|
281
283
|
"@repo/eslint-config": "0.0.0"
|
|
282
284
|
},
|
|
283
285
|
"dependencies": {
|
|
@@ -355,7 +357,7 @@
|
|
|
355
357
|
"lint": "eslint src --max-warnings 0",
|
|
356
358
|
"check-types": "tsc --noEmit",
|
|
357
359
|
"test": "vitest run --passWithNoTests",
|
|
358
|
-
"test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts",
|
|
360
|
+
"test:publish-artifacts": "pnpm build:publish && vitest run src/__tests__/sdk-exports.test.ts src/provider/__tests__/published-surface.test.ts src/__tests__/published-artifact.test.ts src/__tests__/published-peer-dependencies.test.ts",
|
|
359
361
|
"test:watch": "vitest watch"
|
|
360
362
|
}
|
|
361
363
|
}
|
package/dist/chunk-LO7GWG24.js
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
2
|
-
import { useProfile } from './chunk-EIXSQONC.js';
|
|
3
|
-
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
4
|
-
import { createContext, useContext, useMemo, useCallback, createElement } from 'react';
|
|
5
|
-
|
|
6
|
-
var InitializationContext = createContext(null);
|
|
7
|
-
function useInitialization() {
|
|
8
|
-
const ctx = useContext(InitializationContext);
|
|
9
|
-
if (!ctx) {
|
|
10
|
-
throw new Error(
|
|
11
|
-
"useInitialization must be used within an InitializationProvider. Wrap your app (or the relevant subtree) with <InitializationProvider>."
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
return ctx;
|
|
15
|
-
}
|
|
16
|
-
function InitializationProvider({ children }) {
|
|
17
|
-
const { user, isLoading: authLoading } = useAuthContext();
|
|
18
|
-
const { profile, loading: profileLoading, error: profileError, refetch } = useProfile();
|
|
19
|
-
const {
|
|
20
|
-
isInitializing: orgInitializing,
|
|
21
|
-
isOrgRefreshing: orgLoading,
|
|
22
|
-
error: orgErrorMsg,
|
|
23
|
-
currentWorkOSOrganizationId,
|
|
24
|
-
memberships,
|
|
25
|
-
retry: orgRetry
|
|
26
|
-
} = useOrganization();
|
|
27
|
-
const isInitializing = authLoading || profileLoading || orgInitializing || orgLoading;
|
|
28
|
-
const userReady = !authLoading && !profileLoading && !!user && !!profile && !profileError;
|
|
29
|
-
const organizationReady = userReady && !orgInitializing && !orgLoading && !!currentWorkOSOrganizationId && !orgErrorMsg;
|
|
30
|
-
const allReady = organizationReady;
|
|
31
|
-
const error = useMemo(() => {
|
|
32
|
-
if (profileError) {
|
|
33
|
-
return {
|
|
34
|
-
layer: "profile",
|
|
35
|
-
message: "Failed to load user profile",
|
|
36
|
-
originalError: profileError
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
if (orgErrorMsg) {
|
|
40
|
-
return {
|
|
41
|
-
layer: "organization",
|
|
42
|
-
message: orgErrorMsg,
|
|
43
|
-
originalError: new Error(orgErrorMsg)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
if (userReady && !orgInitializing && !orgLoading && !currentWorkOSOrganizationId && memberships.length > 0) {
|
|
47
|
-
return {
|
|
48
|
-
layer: "organization",
|
|
49
|
-
message: "No organization membership found. Please contact your administrator for an invitation."
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}, [profileError, orgErrorMsg, userReady, orgInitializing, orgLoading, currentWorkOSOrganizationId, memberships]);
|
|
54
|
-
const retry = useCallback(async () => {
|
|
55
|
-
if (profileError && refetch) {
|
|
56
|
-
await refetch();
|
|
57
|
-
}
|
|
58
|
-
await orgRetry();
|
|
59
|
-
}, [profileError, refetch, orgRetry]);
|
|
60
|
-
const value = useMemo(
|
|
61
|
-
() => ({
|
|
62
|
-
userReady,
|
|
63
|
-
organizationReady,
|
|
64
|
-
allReady,
|
|
65
|
-
isInitializing,
|
|
66
|
-
error,
|
|
67
|
-
retry,
|
|
68
|
-
profile
|
|
69
|
-
}),
|
|
70
|
-
[userReady, organizationReady, allReady, isInitializing, error, retry, profile]
|
|
71
|
-
);
|
|
72
|
-
return createElement(InitializationContext.Provider, { value }, children);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export { InitializationContext, InitializationProvider, useInitialization };
|
package/dist/chunk-T4LA4RY2.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { useUserProfile } from './chunk-EIXSQONC.js';
|
|
2
|
-
import { useAuthContext } from './chunk-BRJ3QZ4E.js';
|
|
3
|
-
import { useMemo, useCallback } from 'react';
|
|
4
|
-
|
|
5
|
-
function createUseAppInitialization(useOrgInitialization) {
|
|
6
|
-
return function useAppInitialization() {
|
|
7
|
-
const { user, isLoading: authLoading } = useAuthContext();
|
|
8
|
-
const { profile, loading: profileLoading, error: profileError, refetch } = useUserProfile();
|
|
9
|
-
const {
|
|
10
|
-
isInitializing: orgInitializing,
|
|
11
|
-
isLoading: orgLoading,
|
|
12
|
-
error: orgErrorMsg,
|
|
13
|
-
currentOrganization,
|
|
14
|
-
memberships,
|
|
15
|
-
retry: orgRetry
|
|
16
|
-
} = useOrgInitialization();
|
|
17
|
-
const isInitializing = authLoading || profileLoading || orgInitializing || orgLoading;
|
|
18
|
-
const userReady = !authLoading && !profileLoading && !!user && !!profile && !profileError;
|
|
19
|
-
const organizationReady = userReady && !orgInitializing && !orgLoading && !!currentOrganization && !orgErrorMsg;
|
|
20
|
-
const allReady = organizationReady;
|
|
21
|
-
const error = useMemo(() => {
|
|
22
|
-
if (profileError) {
|
|
23
|
-
return {
|
|
24
|
-
layer: "profile",
|
|
25
|
-
message: "Failed to load user profile",
|
|
26
|
-
originalError: profileError
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
if (orgErrorMsg) {
|
|
30
|
-
return {
|
|
31
|
-
layer: "organization",
|
|
32
|
-
message: orgErrorMsg,
|
|
33
|
-
originalError: new Error(orgErrorMsg)
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
if (userReady && !orgInitializing && !orgLoading && !currentOrganization && memberships.length > 0) {
|
|
37
|
-
return {
|
|
38
|
-
layer: "organization",
|
|
39
|
-
message: "No organization membership found. Please contact your administrator for an invitation."
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
return null;
|
|
43
|
-
}, [profileError, orgErrorMsg, userReady, orgInitializing, orgLoading, currentOrganization, memberships]);
|
|
44
|
-
const retry = useCallback(() => {
|
|
45
|
-
if (profileError && refetch) {
|
|
46
|
-
refetch();
|
|
47
|
-
}
|
|
48
|
-
if (orgErrorMsg && orgRetry) {
|
|
49
|
-
orgRetry();
|
|
50
|
-
}
|
|
51
|
-
}, [profileError, refetch, orgErrorMsg, orgRetry]);
|
|
52
|
-
return { userReady, organizationReady, allReady, isInitializing, error, retry, profile };
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export { createUseAppInitialization };
|