elseware-ui 2.36.4 → 2.36.5

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/index.d.mts CHANGED
@@ -2207,15 +2207,31 @@ declare const ShapeSwitch: () => React__default.JSX.Element;
2207
2207
  interface AsyncComponentWrapperProps {
2208
2208
  children: React__default.ReactNode;
2209
2209
  isLoading?: boolean;
2210
+ isFetching?: boolean;
2210
2211
  isSuccess?: boolean;
2211
2212
  isError?: boolean;
2213
+ isUninitialized?: boolean;
2212
2214
  error?: unknown;
2213
- /**
2214
- * Optional custom formatter if you want full control
2215
- */
2215
+ isEmpty?: boolean;
2216
+ loadingText?: string;
2217
+ fetchingText?: string;
2218
+ emptyText?: string;
2219
+ loadingType?: "spinner" | "skeleton";
2220
+ skeletonCount?: number;
2221
+ skeletonClassName?: string;
2222
+ spinnerProps?: Partial<SpinnerProps>;
2223
+ fetchingSpinnerProps?: Partial<SpinnerProps>;
2224
+ loadingFallback?: React__default.ReactNode;
2225
+ emptyFallback?: React__default.ReactNode;
2226
+ errorFallback?: React__default.ReactNode | ((message: string) => React__default.ReactNode);
2227
+ showFetchingIndicator?: boolean;
2228
+ onRetry?: () => void;
2216
2229
  errorFormatter?: (error: unknown) => string;
2230
+ className?: string;
2231
+ contentClassName?: string;
2217
2232
  }
2218
- declare function AsyncComponentWrapper({ children, isLoading, isSuccess, isError, error, errorFormatter, }: AsyncComponentWrapperProps): React__default.JSX.Element;
2233
+ declare function AsyncComponentWrapper({ children, isLoading, isFetching, isSuccess, isError, isUninitialized, error, isEmpty, loadingText, fetchingText, emptyText, loadingType, skeletonCount, skeletonClassName, spinnerProps, fetchingSpinnerProps, loadingFallback, emptyFallback, errorFallback, showFetchingIndicator, onRetry, errorFormatter, className, contentClassName, }: AsyncComponentWrapperProps): React__default.JSX.Element | null;
2234
+ declare const _default: React__default.MemoExoticComponent<typeof AsyncComponentWrapper>;
2219
2235
 
2220
2236
  interface GlowWrapperProps {
2221
2237
  children: ReactNode;
@@ -2886,4 +2902,4 @@ type ConfigBootstrapProps = {
2886
2902
  };
2887
2903
  declare function ConfigBootstrap({ config, loadApp, ErrorComponent, LoadingComponent, loadingFallback, showStack, }: ConfigBootstrapProps): React$1.JSX.Element;
2888
2904
 
2889
- export { Accordion, type AnimationComponentProps, type AnimationVariant, type Appearance, AreaPlot, AsyncComponentWrapper, Avatar, Backdrop, Badge, type BarChartProps, BarPlot, type BaseAnimationConfig, BaseChartDataSource, type BaseChartProps, type BaseComponentProps, type BaseMenuNode, type BaseOverlayConfig, type BaseTopNavNode, type BlobAnimationConfig, Block, BlockGroup, type BootstrapConfigLike, BoxNav, BoxNavItem, Brand, Breadcrumb, BreadcrumbItem, type BrowserRedirectURLOptions, Button, CHART_COLOR_PALETTE, CHART_DARK_THEME, CHART_DATA_MODES, CHART_DEFAULT_ACTIVE_DOT_RADIUS, CHART_DEFAULT_ANIMATION_DURATION, CHART_DEFAULT_BAR_RADIUS, CHART_DEFAULT_DOT_RADIUS, CHART_DEFAULT_HEIGHT, CHART_DEFAULT_MARGIN, CHART_DEFAULT_MAX_REALTIME_POINTS, CHART_DEFAULT_POLLING_INTERVAL, CHART_DEFAULT_STROKE_WIDTH, CHART_EMPTY_MESSAGE, CHART_ERROR_MESSAGE, CHART_LIGHT_THEME, CHART_LOADING_MESSAGE, CHART_STATUSES, CHART_STATUS_COLORS, CHART_VALUE_FORMATS, Caption, Card, CardContent, CardFooter, CardHeader, type CardinalPosition, Chapter, Chart, type ChartAction, type ChartBarConfig, type ChartChartType, type ChartColorName, ChartContainer, type ChartContainerProps, ChartContext, type ChartContextValue, type ChartDataHandler, type ChartDataMode, type ChartDataPoint, type ChartDataSource, ChartEmptyState, type ChartEmptyStateProps, type ChartErrorHandler, ChartErrorState, type ChartErrorStateProps, type ChartGaugeConfig, ChartHeader, type ChartHeaderProps, ChartLegend, type ChartLegendItem, type ChartLegendProps, ChartLoadingState, type ChartLoadingStateProps, ChartPanel, type ChartPanelConfig, type ChartPanelProps, type ChartPieConfig, type ChartPrimitive, type ChartProps, ChartProvider, type ChartProviderProps, type ChartRenderChartProps, type ChartSeries, type ChartSeriesColor, type ChartSeriesType, type ChartStatConfig, type ChartState, type ChartStatus, type ChartTheme, type ChartThemeChart, type ChartThemeMode, type ChartThemePanel, type ChartThemeText, type ChartThemeTooltip, ChartToolbar, type ChartToolbarProps, ChartTooltip, type ChartTooltipFormatterOptions, type ChartTooltipPayload, type ChartTooltipProps, type ChartUnsubscribe, type ChartValueFormat, Checkbox, Chip, type CloudinaryConfig, CloudinaryImage, CloudinaryProvider, type CloudinaryProviderProps, CloudinaryVideo, Code, type CommentActionsProps, type CommentAuthor, type CommentComponents, type CommentComposerProps, type CommentContentProps, type CommentDataSource, type CommentEntity, type CommentHeaderProps, type CommentItemProps, type CommentListProps, type CommentMenuProps, type CommentPageResult, type CommentPermissions, type CommentQueryOptions, type CommentRepliesToggleProps, type CommentReplyCache, CommentThread, type CommentThreadConfig, type CommentThreadProps, ConfigBootstrap, type ConfigBootstrapProps, type ConfigSchema, type ConfigSchemaFailure, type ConfigSchemaResult, type ConfigSchemaSuccess, type ConfigTransform, type ConfigTransformContext, Configurator, ConfiguratorError, type ConfiguratorFailure, type ConfiguratorOptions, type ConfiguratorState, type ConfiguratorSuccess, Content, ContentArea, type CornerPosition, type CreateCommentInput, type CreateURLResolverOptions, type CurrencyCode, DEFAULT_CHART_THEME, DataView, DataViewTable, DateSelector, DefaultLayout, type DefaultMenuElements, Display, DocumentationPanel, Drawer, DrawerToggler, type EUIComponentDefaults, type EUIConfigs, EUIDevLayout, EUIProvider, type EUIRoute, EnvErrorScreen, type EnvErrorScreenProps, Flag, Flex, FlexCol, FlexRow, Footer, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse, type FormatChartValueOptions, type GaugeChartProps, GaugePlot, GenericLayout, type GetAllowedOriginsOptions, GlowWrapper, type GradientAnimationConfig, Graph, type GraphData, GraphEdge, type GraphEdgeType, type GraphLayoutType, GraphNode, type GraphNodeType, type GraphProps, GraphRenderer, Grid, Header, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout, type HorizontalPosition, type HyperRefTarget, Image, ImageInput, InfiniteScrollTrigger, Info, Input, InputFile, InputLabel, InputList, InputListGroup, InputResponse, Label, Layout, type LayoutContext, type LayoutExecutor, Lead, type LimitRealtimePointsOptions, LinePlot, Link, List, type ListAlign, type ListBulletType, type ListDirection, ListItem, type ListItemData, MarkdownEditor, MarkdownProvider, MarkdownTOC, MarkdownViewer, Menu, type MenuElementType, MenuGroup, type MenuGroupNode, MenuItem, type MenuItemNode, MenuItemTitle, type MenuNode, type MenuProps, type MenuTitleNode, type MeshAnimationConfig, Modal, MotionSurface, MultiImageInput, type NavItem, type NormalizeChartDataOptions, type NormalizedChartDataPoint, type NormalizedToastStatus, NumericRating, type OctilePosition, type OverlayVariant, Overline, Paragraph, type PieChartProps, PiePlot, PollingChartDataSource, type PollingChartDataSourceConfig, type PollingChartDataSourceOptions, PriceTag, ProgressBar, type ProgressBarProps, ProgressBarRating, Quote, Radio, type RawChartDataPoint, RealtimeChartDataSource, type RealtimeChartDataSourceConfig, type RealtimeChartDataSourceOptions, type ReplyComposerProps, type ResolveChartColorOptions, type ResolvedChartSeries, type RootAppModule, RouteTab, type RouteTabMode, RouteTabs, type SafeRedirectOptions, ScatterPlot, ScrollToTop, Section, Select, type SendToastOptions, type Shape$1 as Shape, ShapeSwitch, ShowMore, Sidebar, SidebarLayout, SidemenuLayout, type Size$1 as Size, Skeleton, Slider, Spinner, type SpinnerDirection, type SpinnerProps, type SpinnerType, StarRating, StarRatingDistribution, StarRatingInput, type StatChartProps, StatPlot, StaticChartDataSource, type StaticChartDataSourceConfig, type StaticChartDataSourceOptions, Switch, TNDropdown, TNDropdownItem, TNDropdownTitle, TNGroup, Table, Tag, Tags, TextArea, type TextDecoration, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, type TitleBannerLevel, Toast, type ToastItemData, type ToastProps, type ToggleReactionResult, Tooltip, TopNav, type TopNavComponents, type TopNavGroupNode, type TopNavItemNode, type TopNavNode, type TopNavProps, type TopNavTitleNode, Transition, TransitionAccordion, TransitionBase, TransitionDropdown, TransitionFade, TransitionFadeIn, TransitionScale, TransitionSlide, Typography, type URLMap, type URLMapSource, type URLQueryParams, type URLQueryValue, UnderConstructionBanner, type UpdateCommentInput, type UseChartDataOptions, type UseChartDataReturn, type UseChartPollingOptions, type UseChartRealtimeOptions, type UseChartSeriesOptions, type UseChartThemeOptions, ValueBadge, type Variant$1 as Variant, type VerticalPosition, WorldMap, WorldMapCountryTable, YoutubeVideo as YoutubeVideoPlayer, addReplyToCache, applyReactionState, assertAbsoluteURL, buildURL, chartReducer, cn, createConfigurator, createForceLayout, createGridLayout, createInitialChartState, createTreeLayout, createURLResolver, decrementReplyCount, enumValues, euiToast, formatChartValue, formatCommentDate, formatConfigError, getAllowedOrigins, getBrowserHref, getBrowserOrigin, getBrowserRedirectURL, getCurrencySymbol, getLayout, getOptimisticDislikeState, getOptimisticLikeState, getSafeRedirect, incrementReplyCount, isMatch, isRenderFn, limitRealtimePoints, normalize, normalizeChartData, normalizeChartDataPoint, parseJson, parseJsonRecord, parseUrlMap, registerLayout, removeComment, removeCommentTreeFromCache, replaceRealtimePoints, resolveAppearanceStyles, resolveChartColor, resolveChartColors, resolveWithGlobal, sendToast, toConfiguratorError, updateComment, updateReplyCacheComment, useChartContext, useChartData, useChartPolling, useChartRealtime, useChartSeries, useChartTheme, useClickOutside, useCloudinaryConfig, useCurrentTheme, useDrawer, useEUIConfig, useIsMobile, useModal, useTheme };
2905
+ export { Accordion, type AnimationComponentProps, type AnimationVariant, type Appearance, AreaPlot, _default as AsyncComponentWrapper, Avatar, Backdrop, Badge, type BarChartProps, BarPlot, type BaseAnimationConfig, BaseChartDataSource, type BaseChartProps, type BaseComponentProps, type BaseMenuNode, type BaseOverlayConfig, type BaseTopNavNode, type BlobAnimationConfig, Block, BlockGroup, type BootstrapConfigLike, BoxNav, BoxNavItem, Brand, Breadcrumb, BreadcrumbItem, type BrowserRedirectURLOptions, Button, CHART_COLOR_PALETTE, CHART_DARK_THEME, CHART_DATA_MODES, CHART_DEFAULT_ACTIVE_DOT_RADIUS, CHART_DEFAULT_ANIMATION_DURATION, CHART_DEFAULT_BAR_RADIUS, CHART_DEFAULT_DOT_RADIUS, CHART_DEFAULT_HEIGHT, CHART_DEFAULT_MARGIN, CHART_DEFAULT_MAX_REALTIME_POINTS, CHART_DEFAULT_POLLING_INTERVAL, CHART_DEFAULT_STROKE_WIDTH, CHART_EMPTY_MESSAGE, CHART_ERROR_MESSAGE, CHART_LIGHT_THEME, CHART_LOADING_MESSAGE, CHART_STATUSES, CHART_STATUS_COLORS, CHART_VALUE_FORMATS, Caption, Card, CardContent, CardFooter, CardHeader, type CardinalPosition, Chapter, Chart, type ChartAction, type ChartBarConfig, type ChartChartType, type ChartColorName, ChartContainer, type ChartContainerProps, ChartContext, type ChartContextValue, type ChartDataHandler, type ChartDataMode, type ChartDataPoint, type ChartDataSource, ChartEmptyState, type ChartEmptyStateProps, type ChartErrorHandler, ChartErrorState, type ChartErrorStateProps, type ChartGaugeConfig, ChartHeader, type ChartHeaderProps, ChartLegend, type ChartLegendItem, type ChartLegendProps, ChartLoadingState, type ChartLoadingStateProps, ChartPanel, type ChartPanelConfig, type ChartPanelProps, type ChartPieConfig, type ChartPrimitive, type ChartProps, ChartProvider, type ChartProviderProps, type ChartRenderChartProps, type ChartSeries, type ChartSeriesColor, type ChartSeriesType, type ChartStatConfig, type ChartState, type ChartStatus, type ChartTheme, type ChartThemeChart, type ChartThemeMode, type ChartThemePanel, type ChartThemeText, type ChartThemeTooltip, ChartToolbar, type ChartToolbarProps, ChartTooltip, type ChartTooltipFormatterOptions, type ChartTooltipPayload, type ChartTooltipProps, type ChartUnsubscribe, type ChartValueFormat, Checkbox, Chip, type CloudinaryConfig, CloudinaryImage, CloudinaryProvider, type CloudinaryProviderProps, CloudinaryVideo, Code, type CommentActionsProps, type CommentAuthor, type CommentComponents, type CommentComposerProps, type CommentContentProps, type CommentDataSource, type CommentEntity, type CommentHeaderProps, type CommentItemProps, type CommentListProps, type CommentMenuProps, type CommentPageResult, type CommentPermissions, type CommentQueryOptions, type CommentRepliesToggleProps, type CommentReplyCache, CommentThread, type CommentThreadConfig, type CommentThreadProps, ConfigBootstrap, type ConfigBootstrapProps, type ConfigSchema, type ConfigSchemaFailure, type ConfigSchemaResult, type ConfigSchemaSuccess, type ConfigTransform, type ConfigTransformContext, Configurator, ConfiguratorError, type ConfiguratorFailure, type ConfiguratorOptions, type ConfiguratorState, type ConfiguratorSuccess, Content, ContentArea, type CornerPosition, type CreateCommentInput, type CreateURLResolverOptions, type CurrencyCode, DEFAULT_CHART_THEME, DataView, DataViewTable, DateSelector, DefaultLayout, type DefaultMenuElements, Display, DocumentationPanel, Drawer, DrawerToggler, type EUIComponentDefaults, type EUIConfigs, EUIDevLayout, EUIProvider, type EUIRoute, EnvErrorScreen, type EnvErrorScreenProps, Flag, Flex, FlexCol, FlexRow, Footer, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse, type FormatChartValueOptions, type GaugeChartProps, GaugePlot, GenericLayout, type GetAllowedOriginsOptions, GlowWrapper, type GradientAnimationConfig, Graph, type GraphData, GraphEdge, type GraphEdgeType, type GraphLayoutType, GraphNode, type GraphNodeType, type GraphProps, GraphRenderer, Grid, Header, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout, type HorizontalPosition, type HyperRefTarget, Image, ImageInput, InfiniteScrollTrigger, Info, Input, InputFile, InputLabel, InputList, InputListGroup, InputResponse, Label, Layout, type LayoutContext, type LayoutExecutor, Lead, type LimitRealtimePointsOptions, LinePlot, Link, List, type ListAlign, type ListBulletType, type ListDirection, ListItem, type ListItemData, MarkdownEditor, MarkdownProvider, MarkdownTOC, MarkdownViewer, Menu, type MenuElementType, MenuGroup, type MenuGroupNode, MenuItem, type MenuItemNode, MenuItemTitle, type MenuNode, type MenuProps, type MenuTitleNode, type MeshAnimationConfig, Modal, MotionSurface, MultiImageInput, type NavItem, type NormalizeChartDataOptions, type NormalizedChartDataPoint, type NormalizedToastStatus, NumericRating, type OctilePosition, type OverlayVariant, Overline, Paragraph, type PieChartProps, PiePlot, PollingChartDataSource, type PollingChartDataSourceConfig, type PollingChartDataSourceOptions, PriceTag, ProgressBar, type ProgressBarProps, ProgressBarRating, Quote, Radio, type RawChartDataPoint, RealtimeChartDataSource, type RealtimeChartDataSourceConfig, type RealtimeChartDataSourceOptions, type ReplyComposerProps, type ResolveChartColorOptions, type ResolvedChartSeries, type RootAppModule, RouteTab, type RouteTabMode, RouteTabs, type SafeRedirectOptions, ScatterPlot, ScrollToTop, Section, Select, type SendToastOptions, type Shape$1 as Shape, ShapeSwitch, ShowMore, Sidebar, SidebarLayout, SidemenuLayout, type Size$1 as Size, Skeleton, Slider, Spinner, type SpinnerDirection, type SpinnerProps, type SpinnerType, StarRating, StarRatingDistribution, StarRatingInput, type StatChartProps, StatPlot, StaticChartDataSource, type StaticChartDataSourceConfig, type StaticChartDataSourceOptions, Switch, TNDropdown, TNDropdownItem, TNDropdownTitle, TNGroup, Table, Tag, Tags, TextArea, type TextDecoration, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, type TitleBannerLevel, Toast, type ToastItemData, type ToastProps, type ToggleReactionResult, Tooltip, TopNav, type TopNavComponents, type TopNavGroupNode, type TopNavItemNode, type TopNavNode, type TopNavProps, type TopNavTitleNode, Transition, TransitionAccordion, TransitionBase, TransitionDropdown, TransitionFade, TransitionFadeIn, TransitionScale, TransitionSlide, Typography, type URLMap, type URLMapSource, type URLQueryParams, type URLQueryValue, UnderConstructionBanner, type UpdateCommentInput, type UseChartDataOptions, type UseChartDataReturn, type UseChartPollingOptions, type UseChartRealtimeOptions, type UseChartSeriesOptions, type UseChartThemeOptions, ValueBadge, type Variant$1 as Variant, type VerticalPosition, WorldMap, WorldMapCountryTable, YoutubeVideo as YoutubeVideoPlayer, addReplyToCache, applyReactionState, assertAbsoluteURL, buildURL, chartReducer, cn, createConfigurator, createForceLayout, createGridLayout, createInitialChartState, createTreeLayout, createURLResolver, decrementReplyCount, enumValues, euiToast, formatChartValue, formatCommentDate, formatConfigError, getAllowedOrigins, getBrowserHref, getBrowserOrigin, getBrowserRedirectURL, getCurrencySymbol, getLayout, getOptimisticDislikeState, getOptimisticLikeState, getSafeRedirect, incrementReplyCount, isMatch, isRenderFn, limitRealtimePoints, normalize, normalizeChartData, normalizeChartDataPoint, parseJson, parseJsonRecord, parseUrlMap, registerLayout, removeComment, removeCommentTreeFromCache, replaceRealtimePoints, resolveAppearanceStyles, resolveChartColor, resolveChartColors, resolveWithGlobal, sendToast, toConfiguratorError, updateComment, updateReplyCacheComment, useChartContext, useChartData, useChartPolling, useChartRealtime, useChartSeries, useChartTheme, useClickOutside, useCloudinaryConfig, useCurrentTheme, useDrawer, useEUIConfig, useIsMobile, useModal, useTheme };
package/dist/index.d.ts CHANGED
@@ -2207,15 +2207,31 @@ declare const ShapeSwitch: () => React__default.JSX.Element;
2207
2207
  interface AsyncComponentWrapperProps {
2208
2208
  children: React__default.ReactNode;
2209
2209
  isLoading?: boolean;
2210
+ isFetching?: boolean;
2210
2211
  isSuccess?: boolean;
2211
2212
  isError?: boolean;
2213
+ isUninitialized?: boolean;
2212
2214
  error?: unknown;
2213
- /**
2214
- * Optional custom formatter if you want full control
2215
- */
2215
+ isEmpty?: boolean;
2216
+ loadingText?: string;
2217
+ fetchingText?: string;
2218
+ emptyText?: string;
2219
+ loadingType?: "spinner" | "skeleton";
2220
+ skeletonCount?: number;
2221
+ skeletonClassName?: string;
2222
+ spinnerProps?: Partial<SpinnerProps>;
2223
+ fetchingSpinnerProps?: Partial<SpinnerProps>;
2224
+ loadingFallback?: React__default.ReactNode;
2225
+ emptyFallback?: React__default.ReactNode;
2226
+ errorFallback?: React__default.ReactNode | ((message: string) => React__default.ReactNode);
2227
+ showFetchingIndicator?: boolean;
2228
+ onRetry?: () => void;
2216
2229
  errorFormatter?: (error: unknown) => string;
2230
+ className?: string;
2231
+ contentClassName?: string;
2217
2232
  }
2218
- declare function AsyncComponentWrapper({ children, isLoading, isSuccess, isError, error, errorFormatter, }: AsyncComponentWrapperProps): React__default.JSX.Element;
2233
+ declare function AsyncComponentWrapper({ children, isLoading, isFetching, isSuccess, isError, isUninitialized, error, isEmpty, loadingText, fetchingText, emptyText, loadingType, skeletonCount, skeletonClassName, spinnerProps, fetchingSpinnerProps, loadingFallback, emptyFallback, errorFallback, showFetchingIndicator, onRetry, errorFormatter, className, contentClassName, }: AsyncComponentWrapperProps): React__default.JSX.Element | null;
2234
+ declare const _default: React__default.MemoExoticComponent<typeof AsyncComponentWrapper>;
2219
2235
 
2220
2236
  interface GlowWrapperProps {
2221
2237
  children: ReactNode;
@@ -2886,4 +2902,4 @@ type ConfigBootstrapProps = {
2886
2902
  };
2887
2903
  declare function ConfigBootstrap({ config, loadApp, ErrorComponent, LoadingComponent, loadingFallback, showStack, }: ConfigBootstrapProps): React$1.JSX.Element;
2888
2904
 
2889
- export { Accordion, type AnimationComponentProps, type AnimationVariant, type Appearance, AreaPlot, AsyncComponentWrapper, Avatar, Backdrop, Badge, type BarChartProps, BarPlot, type BaseAnimationConfig, BaseChartDataSource, type BaseChartProps, type BaseComponentProps, type BaseMenuNode, type BaseOverlayConfig, type BaseTopNavNode, type BlobAnimationConfig, Block, BlockGroup, type BootstrapConfigLike, BoxNav, BoxNavItem, Brand, Breadcrumb, BreadcrumbItem, type BrowserRedirectURLOptions, Button, CHART_COLOR_PALETTE, CHART_DARK_THEME, CHART_DATA_MODES, CHART_DEFAULT_ACTIVE_DOT_RADIUS, CHART_DEFAULT_ANIMATION_DURATION, CHART_DEFAULT_BAR_RADIUS, CHART_DEFAULT_DOT_RADIUS, CHART_DEFAULT_HEIGHT, CHART_DEFAULT_MARGIN, CHART_DEFAULT_MAX_REALTIME_POINTS, CHART_DEFAULT_POLLING_INTERVAL, CHART_DEFAULT_STROKE_WIDTH, CHART_EMPTY_MESSAGE, CHART_ERROR_MESSAGE, CHART_LIGHT_THEME, CHART_LOADING_MESSAGE, CHART_STATUSES, CHART_STATUS_COLORS, CHART_VALUE_FORMATS, Caption, Card, CardContent, CardFooter, CardHeader, type CardinalPosition, Chapter, Chart, type ChartAction, type ChartBarConfig, type ChartChartType, type ChartColorName, ChartContainer, type ChartContainerProps, ChartContext, type ChartContextValue, type ChartDataHandler, type ChartDataMode, type ChartDataPoint, type ChartDataSource, ChartEmptyState, type ChartEmptyStateProps, type ChartErrorHandler, ChartErrorState, type ChartErrorStateProps, type ChartGaugeConfig, ChartHeader, type ChartHeaderProps, ChartLegend, type ChartLegendItem, type ChartLegendProps, ChartLoadingState, type ChartLoadingStateProps, ChartPanel, type ChartPanelConfig, type ChartPanelProps, type ChartPieConfig, type ChartPrimitive, type ChartProps, ChartProvider, type ChartProviderProps, type ChartRenderChartProps, type ChartSeries, type ChartSeriesColor, type ChartSeriesType, type ChartStatConfig, type ChartState, type ChartStatus, type ChartTheme, type ChartThemeChart, type ChartThemeMode, type ChartThemePanel, type ChartThemeText, type ChartThemeTooltip, ChartToolbar, type ChartToolbarProps, ChartTooltip, type ChartTooltipFormatterOptions, type ChartTooltipPayload, type ChartTooltipProps, type ChartUnsubscribe, type ChartValueFormat, Checkbox, Chip, type CloudinaryConfig, CloudinaryImage, CloudinaryProvider, type CloudinaryProviderProps, CloudinaryVideo, Code, type CommentActionsProps, type CommentAuthor, type CommentComponents, type CommentComposerProps, type CommentContentProps, type CommentDataSource, type CommentEntity, type CommentHeaderProps, type CommentItemProps, type CommentListProps, type CommentMenuProps, type CommentPageResult, type CommentPermissions, type CommentQueryOptions, type CommentRepliesToggleProps, type CommentReplyCache, CommentThread, type CommentThreadConfig, type CommentThreadProps, ConfigBootstrap, type ConfigBootstrapProps, type ConfigSchema, type ConfigSchemaFailure, type ConfigSchemaResult, type ConfigSchemaSuccess, type ConfigTransform, type ConfigTransformContext, Configurator, ConfiguratorError, type ConfiguratorFailure, type ConfiguratorOptions, type ConfiguratorState, type ConfiguratorSuccess, Content, ContentArea, type CornerPosition, type CreateCommentInput, type CreateURLResolverOptions, type CurrencyCode, DEFAULT_CHART_THEME, DataView, DataViewTable, DateSelector, DefaultLayout, type DefaultMenuElements, Display, DocumentationPanel, Drawer, DrawerToggler, type EUIComponentDefaults, type EUIConfigs, EUIDevLayout, EUIProvider, type EUIRoute, EnvErrorScreen, type EnvErrorScreenProps, Flag, Flex, FlexCol, FlexRow, Footer, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse, type FormatChartValueOptions, type GaugeChartProps, GaugePlot, GenericLayout, type GetAllowedOriginsOptions, GlowWrapper, type GradientAnimationConfig, Graph, type GraphData, GraphEdge, type GraphEdgeType, type GraphLayoutType, GraphNode, type GraphNodeType, type GraphProps, GraphRenderer, Grid, Header, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout, type HorizontalPosition, type HyperRefTarget, Image, ImageInput, InfiniteScrollTrigger, Info, Input, InputFile, InputLabel, InputList, InputListGroup, InputResponse, Label, Layout, type LayoutContext, type LayoutExecutor, Lead, type LimitRealtimePointsOptions, LinePlot, Link, List, type ListAlign, type ListBulletType, type ListDirection, ListItem, type ListItemData, MarkdownEditor, MarkdownProvider, MarkdownTOC, MarkdownViewer, Menu, type MenuElementType, MenuGroup, type MenuGroupNode, MenuItem, type MenuItemNode, MenuItemTitle, type MenuNode, type MenuProps, type MenuTitleNode, type MeshAnimationConfig, Modal, MotionSurface, MultiImageInput, type NavItem, type NormalizeChartDataOptions, type NormalizedChartDataPoint, type NormalizedToastStatus, NumericRating, type OctilePosition, type OverlayVariant, Overline, Paragraph, type PieChartProps, PiePlot, PollingChartDataSource, type PollingChartDataSourceConfig, type PollingChartDataSourceOptions, PriceTag, ProgressBar, type ProgressBarProps, ProgressBarRating, Quote, Radio, type RawChartDataPoint, RealtimeChartDataSource, type RealtimeChartDataSourceConfig, type RealtimeChartDataSourceOptions, type ReplyComposerProps, type ResolveChartColorOptions, type ResolvedChartSeries, type RootAppModule, RouteTab, type RouteTabMode, RouteTabs, type SafeRedirectOptions, ScatterPlot, ScrollToTop, Section, Select, type SendToastOptions, type Shape$1 as Shape, ShapeSwitch, ShowMore, Sidebar, SidebarLayout, SidemenuLayout, type Size$1 as Size, Skeleton, Slider, Spinner, type SpinnerDirection, type SpinnerProps, type SpinnerType, StarRating, StarRatingDistribution, StarRatingInput, type StatChartProps, StatPlot, StaticChartDataSource, type StaticChartDataSourceConfig, type StaticChartDataSourceOptions, Switch, TNDropdown, TNDropdownItem, TNDropdownTitle, TNGroup, Table, Tag, Tags, TextArea, type TextDecoration, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, type TitleBannerLevel, Toast, type ToastItemData, type ToastProps, type ToggleReactionResult, Tooltip, TopNav, type TopNavComponents, type TopNavGroupNode, type TopNavItemNode, type TopNavNode, type TopNavProps, type TopNavTitleNode, Transition, TransitionAccordion, TransitionBase, TransitionDropdown, TransitionFade, TransitionFadeIn, TransitionScale, TransitionSlide, Typography, type URLMap, type URLMapSource, type URLQueryParams, type URLQueryValue, UnderConstructionBanner, type UpdateCommentInput, type UseChartDataOptions, type UseChartDataReturn, type UseChartPollingOptions, type UseChartRealtimeOptions, type UseChartSeriesOptions, type UseChartThemeOptions, ValueBadge, type Variant$1 as Variant, type VerticalPosition, WorldMap, WorldMapCountryTable, YoutubeVideo as YoutubeVideoPlayer, addReplyToCache, applyReactionState, assertAbsoluteURL, buildURL, chartReducer, cn, createConfigurator, createForceLayout, createGridLayout, createInitialChartState, createTreeLayout, createURLResolver, decrementReplyCount, enumValues, euiToast, formatChartValue, formatCommentDate, formatConfigError, getAllowedOrigins, getBrowserHref, getBrowserOrigin, getBrowserRedirectURL, getCurrencySymbol, getLayout, getOptimisticDislikeState, getOptimisticLikeState, getSafeRedirect, incrementReplyCount, isMatch, isRenderFn, limitRealtimePoints, normalize, normalizeChartData, normalizeChartDataPoint, parseJson, parseJsonRecord, parseUrlMap, registerLayout, removeComment, removeCommentTreeFromCache, replaceRealtimePoints, resolveAppearanceStyles, resolveChartColor, resolveChartColors, resolveWithGlobal, sendToast, toConfiguratorError, updateComment, updateReplyCacheComment, useChartContext, useChartData, useChartPolling, useChartRealtime, useChartSeries, useChartTheme, useClickOutside, useCloudinaryConfig, useCurrentTheme, useDrawer, useEUIConfig, useIsMobile, useModal, useTheme };
2905
+ export { Accordion, type AnimationComponentProps, type AnimationVariant, type Appearance, AreaPlot, _default as AsyncComponentWrapper, Avatar, Backdrop, Badge, type BarChartProps, BarPlot, type BaseAnimationConfig, BaseChartDataSource, type BaseChartProps, type BaseComponentProps, type BaseMenuNode, type BaseOverlayConfig, type BaseTopNavNode, type BlobAnimationConfig, Block, BlockGroup, type BootstrapConfigLike, BoxNav, BoxNavItem, Brand, Breadcrumb, BreadcrumbItem, type BrowserRedirectURLOptions, Button, CHART_COLOR_PALETTE, CHART_DARK_THEME, CHART_DATA_MODES, CHART_DEFAULT_ACTIVE_DOT_RADIUS, CHART_DEFAULT_ANIMATION_DURATION, CHART_DEFAULT_BAR_RADIUS, CHART_DEFAULT_DOT_RADIUS, CHART_DEFAULT_HEIGHT, CHART_DEFAULT_MARGIN, CHART_DEFAULT_MAX_REALTIME_POINTS, CHART_DEFAULT_POLLING_INTERVAL, CHART_DEFAULT_STROKE_WIDTH, CHART_EMPTY_MESSAGE, CHART_ERROR_MESSAGE, CHART_LIGHT_THEME, CHART_LOADING_MESSAGE, CHART_STATUSES, CHART_STATUS_COLORS, CHART_VALUE_FORMATS, Caption, Card, CardContent, CardFooter, CardHeader, type CardinalPosition, Chapter, Chart, type ChartAction, type ChartBarConfig, type ChartChartType, type ChartColorName, ChartContainer, type ChartContainerProps, ChartContext, type ChartContextValue, type ChartDataHandler, type ChartDataMode, type ChartDataPoint, type ChartDataSource, ChartEmptyState, type ChartEmptyStateProps, type ChartErrorHandler, ChartErrorState, type ChartErrorStateProps, type ChartGaugeConfig, ChartHeader, type ChartHeaderProps, ChartLegend, type ChartLegendItem, type ChartLegendProps, ChartLoadingState, type ChartLoadingStateProps, ChartPanel, type ChartPanelConfig, type ChartPanelProps, type ChartPieConfig, type ChartPrimitive, type ChartProps, ChartProvider, type ChartProviderProps, type ChartRenderChartProps, type ChartSeries, type ChartSeriesColor, type ChartSeriesType, type ChartStatConfig, type ChartState, type ChartStatus, type ChartTheme, type ChartThemeChart, type ChartThemeMode, type ChartThemePanel, type ChartThemeText, type ChartThemeTooltip, ChartToolbar, type ChartToolbarProps, ChartTooltip, type ChartTooltipFormatterOptions, type ChartTooltipPayload, type ChartTooltipProps, type ChartUnsubscribe, type ChartValueFormat, Checkbox, Chip, type CloudinaryConfig, CloudinaryImage, CloudinaryProvider, type CloudinaryProviderProps, CloudinaryVideo, Code, type CommentActionsProps, type CommentAuthor, type CommentComponents, type CommentComposerProps, type CommentContentProps, type CommentDataSource, type CommentEntity, type CommentHeaderProps, type CommentItemProps, type CommentListProps, type CommentMenuProps, type CommentPageResult, type CommentPermissions, type CommentQueryOptions, type CommentRepliesToggleProps, type CommentReplyCache, CommentThread, type CommentThreadConfig, type CommentThreadProps, ConfigBootstrap, type ConfigBootstrapProps, type ConfigSchema, type ConfigSchemaFailure, type ConfigSchemaResult, type ConfigSchemaSuccess, type ConfigTransform, type ConfigTransformContext, Configurator, ConfiguratorError, type ConfiguratorFailure, type ConfiguratorOptions, type ConfiguratorState, type ConfiguratorSuccess, Content, ContentArea, type CornerPosition, type CreateCommentInput, type CreateURLResolverOptions, type CurrencyCode, DEFAULT_CHART_THEME, DataView, DataViewTable, DateSelector, DefaultLayout, type DefaultMenuElements, Display, DocumentationPanel, Drawer, DrawerToggler, type EUIComponentDefaults, type EUIConfigs, EUIDevLayout, EUIProvider, type EUIRoute, EnvErrorScreen, type EnvErrorScreenProps, Flag, Flex, FlexCol, FlexRow, Footer, FooterNav, FooterNavGroup, FooterNavItem, FooterNavItemContext, FooterNavItemTitle, Form, FormResponse, type FormatChartValueOptions, type GaugeChartProps, GaugePlot, GenericLayout, type GetAllowedOriginsOptions, GlowWrapper, type GradientAnimationConfig, Graph, type GraphData, GraphEdge, type GraphEdgeType, type GraphLayoutType, GraphNode, type GraphNodeType, type GraphProps, GraphRenderer, Grid, Header, HeaderNav, HeaderNavGroup, HeaderNavItem, HeaderNavItemContext, HeaderNavItemTitle, HomeLayout, type HorizontalPosition, type HyperRefTarget, Image, ImageInput, InfiniteScrollTrigger, Info, Input, InputFile, InputLabel, InputList, InputListGroup, InputResponse, Label, Layout, type LayoutContext, type LayoutExecutor, Lead, type LimitRealtimePointsOptions, LinePlot, Link, List, type ListAlign, type ListBulletType, type ListDirection, ListItem, type ListItemData, MarkdownEditor, MarkdownProvider, MarkdownTOC, MarkdownViewer, Menu, type MenuElementType, MenuGroup, type MenuGroupNode, MenuItem, type MenuItemNode, MenuItemTitle, type MenuNode, type MenuProps, type MenuTitleNode, type MeshAnimationConfig, Modal, MotionSurface, MultiImageInput, type NavItem, type NormalizeChartDataOptions, type NormalizedChartDataPoint, type NormalizedToastStatus, NumericRating, type OctilePosition, type OverlayVariant, Overline, Paragraph, type PieChartProps, PiePlot, PollingChartDataSource, type PollingChartDataSourceConfig, type PollingChartDataSourceOptions, PriceTag, ProgressBar, type ProgressBarProps, ProgressBarRating, Quote, Radio, type RawChartDataPoint, RealtimeChartDataSource, type RealtimeChartDataSourceConfig, type RealtimeChartDataSourceOptions, type ReplyComposerProps, type ResolveChartColorOptions, type ResolvedChartSeries, type RootAppModule, RouteTab, type RouteTabMode, RouteTabs, type SafeRedirectOptions, ScatterPlot, ScrollToTop, Section, Select, type SendToastOptions, type Shape$1 as Shape, ShapeSwitch, ShowMore, Sidebar, SidebarLayout, SidemenuLayout, type Size$1 as Size, Skeleton, Slider, Spinner, type SpinnerDirection, type SpinnerProps, type SpinnerType, StarRating, StarRatingDistribution, StarRatingInput, type StatChartProps, StatPlot, StaticChartDataSource, type StaticChartDataSourceConfig, type StaticChartDataSourceOptions, Switch, TNDropdown, TNDropdownItem, TNDropdownTitle, TNGroup, Table, Tag, Tags, TextArea, type TextDecoration, ThemeContext, ThemeProvider, ThemeSwitch, TitleBanner, type TitleBannerLevel, Toast, type ToastItemData, type ToastProps, type ToggleReactionResult, Tooltip, TopNav, type TopNavComponents, type TopNavGroupNode, type TopNavItemNode, type TopNavNode, type TopNavProps, type TopNavTitleNode, Transition, TransitionAccordion, TransitionBase, TransitionDropdown, TransitionFade, TransitionFadeIn, TransitionScale, TransitionSlide, Typography, type URLMap, type URLMapSource, type URLQueryParams, type URLQueryValue, UnderConstructionBanner, type UpdateCommentInput, type UseChartDataOptions, type UseChartDataReturn, type UseChartPollingOptions, type UseChartRealtimeOptions, type UseChartSeriesOptions, type UseChartThemeOptions, ValueBadge, type Variant$1 as Variant, type VerticalPosition, WorldMap, WorldMapCountryTable, YoutubeVideo as YoutubeVideoPlayer, addReplyToCache, applyReactionState, assertAbsoluteURL, buildURL, chartReducer, cn, createConfigurator, createForceLayout, createGridLayout, createInitialChartState, createTreeLayout, createURLResolver, decrementReplyCount, enumValues, euiToast, formatChartValue, formatCommentDate, formatConfigError, getAllowedOrigins, getBrowserHref, getBrowserOrigin, getBrowserRedirectURL, getCurrencySymbol, getLayout, getOptimisticDislikeState, getOptimisticLikeState, getSafeRedirect, incrementReplyCount, isMatch, isRenderFn, limitRealtimePoints, normalize, normalizeChartData, normalizeChartDataPoint, parseJson, parseJsonRecord, parseUrlMap, registerLayout, removeComment, removeCommentTreeFromCache, replaceRealtimePoints, resolveAppearanceStyles, resolveChartColor, resolveChartColors, resolveWithGlobal, sendToast, toConfiguratorError, updateComment, updateReplyCacheComment, useChartContext, useChartData, useChartPolling, useChartRealtime, useChartSeries, useChartTheme, useClickOutside, useCloudinaryConfig, useCurrentTheme, useDrawer, useEUIConfig, useIsMobile, useModal, useTheme };
package/dist/index.js CHANGED
@@ -21074,10 +21074,10 @@ var getDefaultErrorMessage = (error) => {
21074
21074
  if (error instanceof Error) return error.message;
21075
21075
  if (typeof error === "object") {
21076
21076
  const anyErr = error;
21077
- if (anyErr?.data?.message && typeof anyErr.data.message === "string") {
21077
+ if (typeof anyErr?.data?.message === "string") {
21078
21078
  return anyErr.data.message;
21079
21079
  }
21080
- if (anyErr?.message && typeof anyErr.message === "string") {
21080
+ if (typeof anyErr?.message === "string") {
21081
21081
  return anyErr.message;
21082
21082
  }
21083
21083
  if (anyErr?.status) {
@@ -21093,20 +21093,107 @@ var getDefaultErrorMessage = (error) => {
21093
21093
  };
21094
21094
  function AsyncComponentWrapper({
21095
21095
  children,
21096
- isLoading,
21097
- isSuccess = true,
21098
- isError,
21096
+ isLoading = false,
21097
+ isFetching = false,
21098
+ isSuccess,
21099
+ isError = false,
21100
+ isUninitialized = false,
21099
21101
  error,
21100
- errorFormatter
21102
+ isEmpty = false,
21103
+ loadingText = "Loading...",
21104
+ fetchingText = "Updating...",
21105
+ emptyText = "No data available.",
21106
+ loadingType = "spinner",
21107
+ skeletonCount = 3,
21108
+ skeletonClassName = "h-24 w-full rounded-md",
21109
+ spinnerProps,
21110
+ fetchingSpinnerProps,
21111
+ loadingFallback,
21112
+ emptyFallback,
21113
+ errorFallback,
21114
+ showFetchingIndicator = true,
21115
+ onRetry,
21116
+ errorFormatter,
21117
+ className,
21118
+ contentClassName
21101
21119
  }) {
21102
- const errorMessage = isError && error ? errorFormatter ? errorFormatter(error) : getDefaultErrorMessage(error) : void 0;
21103
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
21104
- isLoading && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full py-10 items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsx(ai.AiOutlineLoading, { className: "animate-spin" }) }),
21105
- isError && errorMessage && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-5", children: /* @__PURE__ */ jsxRuntime.jsx(FormResponse_default, { text: errorMessage, variant: "danger" }) }),
21106
- !isLoading && !isError && isSuccess && /* @__PURE__ */ jsxRuntime.jsx("div", { children })
21120
+ const errorMessage = React2.useMemo(() => {
21121
+ if (!isError) return "";
21122
+ return errorFormatter ? errorFormatter(error) : getDefaultErrorMessage(error);
21123
+ }, [isError, error, errorFormatter]);
21124
+ const hasSuccess = isSuccess ?? (!isLoading && !isError && !isUninitialized);
21125
+ const renderLoading = () => {
21126
+ if (loadingFallback) return loadingFallback;
21127
+ if (loadingType === "skeleton") {
21128
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex flex-col gap-3 py-4", children: Array.from({ length: skeletonCount }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: skeletonClassName }, index)) });
21129
+ }
21130
+ return /* @__PURE__ */ jsxRuntime.jsx(
21131
+ Spinner_default,
21132
+ {
21133
+ centered: true,
21134
+ label: loadingText,
21135
+ type: "border",
21136
+ size: "md",
21137
+ variant: "primary",
21138
+ ...spinnerProps
21139
+ }
21140
+ );
21141
+ };
21142
+ const renderError = () => {
21143
+ if (typeof errorFallback === "function") {
21144
+ return errorFallback(errorMessage);
21145
+ }
21146
+ if (errorFallback) {
21147
+ return errorFallback;
21148
+ }
21149
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5", children: [
21150
+ /* @__PURE__ */ jsxRuntime.jsx(FormResponse_default, { text: errorMessage, variant: "danger" }),
21151
+ onRetry && /* @__PURE__ */ jsxRuntime.jsx(
21152
+ "button",
21153
+ {
21154
+ type: "button",
21155
+ onClick: onRetry,
21156
+ className: "mt-3 rounded-md border px-4 py-2",
21157
+ children: "Retry"
21158
+ }
21159
+ )
21160
+ ] });
21161
+ };
21162
+ const renderEmpty = () => {
21163
+ if (emptyFallback) return emptyFallback;
21164
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-10 text-center text-gray-500", children: emptyText });
21165
+ };
21166
+ if (isLoading) {
21167
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "aria-live": "polite", children: renderLoading() });
21168
+ }
21169
+ if (isError) {
21170
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "aria-live": "polite", children: renderError() });
21171
+ }
21172
+ if (hasSuccess && isEmpty) {
21173
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, "aria-live": "polite", children: renderEmpty() });
21174
+ }
21175
+ if (!hasSuccess) {
21176
+ return null;
21177
+ }
21178
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className, children: [
21179
+ showFetchingIndicator && isFetching && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-3 flex items-center gap-2 text-sm text-gray-500", children: [
21180
+ /* @__PURE__ */ jsxRuntime.jsx(
21181
+ Spinner_default,
21182
+ {
21183
+ size: "xs",
21184
+ type: "border",
21185
+ variant: "primary",
21186
+ showLabel: false,
21187
+ ariaLabel: fetchingText,
21188
+ ...fetchingSpinnerProps
21189
+ }
21190
+ ),
21191
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: fetchingText })
21192
+ ] }),
21193
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn(contentClassName), children })
21107
21194
  ] });
21108
21195
  }
21109
- var AsyncComponentWrapper_default = AsyncComponentWrapper;
21196
+ var AsyncComponentWrapper_default = React2__default.default.memo(AsyncComponentWrapper);
21110
21197
  function Modal({
21111
21198
  title,
21112
21199
  show = false,