@elevasis/ui 1.7.5 → 1.8.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 -3
- package/dist/auth/index.js +3 -4
- package/dist/charts/index.js +6 -8
- package/dist/{chunk-SFF5MJEI.js → chunk-2YBPRE6H.js} +1 -2
- package/dist/{chunk-U34YGJQB.js → chunk-3I2LOKQU.js} +1 -1
- package/dist/{chunk-PVVQTENF.js → chunk-3PURTICE.js} +1 -1
- package/dist/{chunk-2JBWPFHF.js → chunk-6TMW6VQ2.js} +1 -1
- package/dist/{chunk-6HZAMY6T.js → chunk-ARZM3OTI.js} +6 -2
- package/dist/{chunk-OK3XFSJJ.js → chunk-BWZMI4KP.js} +963 -10
- package/dist/{chunk-4KPI7YCY.js → chunk-EHXOR5LA.js} +2 -3
- package/dist/{chunk-Y7UY3HI4.js → chunk-ESOQEOOX.js} +2 -2
- package/dist/{chunk-L2CM2CUA.js → chunk-GZVH423C.js} +26 -3
- package/dist/{chunk-Y6DNK5ZD.js → chunk-JRJW2H57.js} +35 -9
- package/dist/{chunk-LBPALY25.js → chunk-JUPCUF77.js} +2 -2
- package/dist/chunk-QWYJHM3S.js +1068 -0
- package/dist/{chunk-NEK6JKPW.js → chunk-WUQWCUCB.js} +1 -1
- package/dist/chunk-Z4TPHMRD.js +231 -0
- package/dist/components/index.css +65 -0
- package/dist/components/index.d.ts +261 -2
- package/dist/components/index.js +1136 -80
- package/dist/hooks/index.css +452 -0
- package/dist/hooks/index.d.ts +1831 -13
- package/dist/hooks/index.js +15 -6
- package/dist/hooks/published.css +452 -0
- package/dist/hooks/published.d.ts +866 -6
- package/dist/hooks/published.js +15 -370
- package/dist/index.css +3 -0
- package/dist/index.d.ts +1665 -2
- package/dist/index.js +14 -17
- package/dist/initialization/index.js +3 -4
- package/dist/organization/index.js +3 -4
- package/dist/profile/index.js +1 -2
- package/dist/provider/index.css +3 -0
- package/dist/provider/index.js +7 -10
- package/dist/provider/published.js +6 -9
- package/dist/utils/index.d.ts +92 -1
- package/dist/utils/index.js +1 -2
- package/package.json +7 -3
- package/dist/chunk-4VGWQ5AN.js +0 -91
- package/dist/chunk-KA7LO7U5.js +0 -28
- package/dist/chunk-LFYO3MDC.js +0 -58
- package/dist/chunk-TIRMFDM4.js +0 -33
- package/dist/chunk-TYV5NJV2.js +0 -1
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { getTimeRangeLabel, getTimeRangeDates, useErrorTrends, formatBucketTime } from './chunk-
|
|
1
|
+
import { getTimeRangeLabel, getTimeRangeDates, useErrorTrends, formatBucketTime } from './chunk-ARZM3OTI.js';
|
|
2
2
|
import { ResourceStatusColors } from './chunk-YZ6GTZXL.js';
|
|
3
|
-
import { getResourceIcon } from './chunk-
|
|
4
|
-
import { getErrorInfo, getErrorTitle } from './chunk-4VGWQ5AN.js';
|
|
3
|
+
import { getErrorInfo, getErrorTitle, getResourceIcon } from './chunk-Z4TPHMRD.js';
|
|
5
4
|
import { useAuthContext } from './chunk-7PLEQFHO.js';
|
|
6
5
|
import { useRouterContext } from './chunk-Q7DJKLEN.js';
|
|
7
6
|
import { useMemo, useState, useEffect, useCallback } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getPreset, generateShades, mantineThemeOverride, createCssVariablesResolver } from './chunk-KB5NKPTN.js';
|
|
2
|
-
import { ElevasisCoreProvider } from './chunk-
|
|
3
|
-
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-
|
|
2
|
+
import { ElevasisCoreProvider } from './chunk-JRJW2H57.js';
|
|
3
|
+
import { getErrorInfo, formatErrorMessage, getErrorTitle } from './chunk-Z4TPHMRD.js';
|
|
4
4
|
import { useMemo, useEffect } from 'react';
|
|
5
5
|
import { mergeThemeOverrides, MantineProvider } from '@mantine/core';
|
|
6
6
|
import '@mantine/core/styles.css';
|
|
@@ -1,6 +1,29 @@
|
|
|
1
|
-
import { useElevasisServices } from './chunk-KA7LO7U5.js';
|
|
2
1
|
import { useAuthContext } from './chunk-7PLEQFHO.js';
|
|
3
|
-
import { createContext, useState, useEffect,
|
|
2
|
+
import { createContext, useContext, useMemo, useState, useEffect, createElement } from 'react';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
var ElevasisServiceContext = createContext(null);
|
|
6
|
+
function useElevasisServices() {
|
|
7
|
+
const ctx = useContext(ElevasisServiceContext);
|
|
8
|
+
if (!ctx) {
|
|
9
|
+
throw new Error(
|
|
10
|
+
"useElevasisServices must be used within an ElevasisServiceProvider or an ElevasisProvider with apiUrl configured."
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
return ctx;
|
|
14
|
+
}
|
|
15
|
+
function ElevasisServiceProvider({
|
|
16
|
+
apiRequest,
|
|
17
|
+
organizationId,
|
|
18
|
+
isReady,
|
|
19
|
+
children
|
|
20
|
+
}) {
|
|
21
|
+
const value = useMemo(
|
|
22
|
+
() => ({ apiRequest, organizationId, isReady }),
|
|
23
|
+
[apiRequest, organizationId, isReady]
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ jsx(ElevasisServiceContext.Provider, { value, children });
|
|
26
|
+
}
|
|
4
27
|
|
|
5
28
|
// src/profile/services/UserProfileService.ts
|
|
6
29
|
var UserProfileService = class {
|
|
@@ -138,4 +161,4 @@ function ProfileProvider({ children }) {
|
|
|
138
161
|
return createElement(ProfileContext.Provider, { value }, children);
|
|
139
162
|
}
|
|
140
163
|
|
|
141
|
-
export { ProfileProvider, UserProfileService, useProfile, useUserProfile };
|
|
164
|
+
export { ElevasisServiceProvider, ProfileProvider, UserProfileService, useElevasisServices, useProfile, useUserProfile };
|
|
@@ -1,15 +1,41 @@
|
|
|
1
|
-
import { OrganizationProvider } from './chunk-
|
|
2
|
-
import { ApiClientProvider, useApiClient } from './chunk-
|
|
3
|
-
import {
|
|
4
|
-
import { InitializationProvider } from './chunk-
|
|
5
|
-
import { ProfileProvider } from './chunk-
|
|
6
|
-
import { ElevasisServiceProvider, useElevasisServices } from './chunk-KA7LO7U5.js';
|
|
1
|
+
import { OrganizationProvider } from './chunk-2YBPRE6H.js';
|
|
2
|
+
import { ApiClientProvider, useApiClient } from './chunk-JUPCUF77.js';
|
|
3
|
+
import { getErrorInfo, getErrorTitle, formatErrorMessage } from './chunk-Z4TPHMRD.js';
|
|
4
|
+
import { InitializationProvider } from './chunk-WUQWCUCB.js';
|
|
5
|
+
import { ElevasisServiceProvider, ProfileProvider, useElevasisServices } from './chunk-GZVH423C.js';
|
|
7
6
|
import { useOrganization } from './chunk-DD3CCMCZ.js';
|
|
8
7
|
import { useAuthContext } from './chunk-7PLEQFHO.js';
|
|
9
|
-
import { lazy, Suspense, useRef } from 'react';
|
|
10
|
-
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
8
|
+
import { createContext, lazy, useContext, Suspense, useRef } from 'react';
|
|
11
9
|
import { jsx, Fragment } from 'react/jsx-runtime';
|
|
10
|
+
import { QueryClientProvider, QueryClient } from '@tanstack/react-query';
|
|
12
11
|
|
|
12
|
+
var consoleAdapter = {
|
|
13
|
+
success(title, message) {
|
|
14
|
+
console.log(`[Notification][Success] ${title}: ${message}`);
|
|
15
|
+
},
|
|
16
|
+
error(title, message) {
|
|
17
|
+
console.warn(`[Notification][Error] ${title}: ${message}`);
|
|
18
|
+
},
|
|
19
|
+
info(title, message) {
|
|
20
|
+
console.log(`[Notification][Info] ${title}: ${message}`);
|
|
21
|
+
},
|
|
22
|
+
warning(title, message) {
|
|
23
|
+
console.warn(`[Notification][Warning] ${title}: ${message}`);
|
|
24
|
+
},
|
|
25
|
+
apiError(error) {
|
|
26
|
+
const { message, code, requestId, fields, retryAfter } = getErrorInfo(error);
|
|
27
|
+
const title = getErrorTitle(code);
|
|
28
|
+
const formatted = formatErrorMessage(message, requestId, fields, retryAfter);
|
|
29
|
+
console.warn(`[Notification][API Error] ${title}: ${formatted}`);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var NotificationContext = createContext(consoleAdapter);
|
|
33
|
+
function NotificationProvider({ adapter, children }) {
|
|
34
|
+
return /* @__PURE__ */ jsx(NotificationContext.Provider, { value: adapter, children });
|
|
35
|
+
}
|
|
36
|
+
function useNotificationAdapter() {
|
|
37
|
+
return useContext(NotificationContext);
|
|
38
|
+
}
|
|
13
39
|
var LazyCoreAuthKitInner = lazy(() => import('./CoreAuthKitInner-3J4RVQO6.js').then((m) => ({ default: m.CoreAuthKitInner })));
|
|
14
40
|
var defaultQueryClient = null;
|
|
15
41
|
function getDefaultQueryClient() {
|
|
@@ -84,4 +110,4 @@ function CoreNotificationLayer({
|
|
|
84
110
|
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
85
111
|
}
|
|
86
112
|
|
|
87
|
-
export { ElevasisCoreProvider };
|
|
113
|
+
export { ElevasisCoreProvider, NotificationProvider, useNotificationAdapter };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIClientError } from './chunk-
|
|
1
|
+
import { APIClientError } from './chunk-Z4TPHMRD.js';
|
|
2
2
|
import { OrganizationContext } from './chunk-DD3CCMCZ.js';
|
|
3
3
|
import { createContext, useContext, useMemo, useCallback } from 'react';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
@@ -153,4 +153,4 @@ function useApiClient(apiUrl) {
|
|
|
153
153
|
};
|
|
154
154
|
}
|
|
155
155
|
|
|
156
|
-
export { ApiClientProvider, useApiClient, useApiClientContext };
|
|
156
|
+
export { ApiClientProvider, HTTP_HEADERS, useApiClient, useApiClientContext };
|