@docsvision/management-console 6.2.0-beta.17 → 6.2.0-beta.19

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/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /// <reference types="react" />
2
2
 
3
3
  import { $ContextMenuOptions } from 'docsvision.web/components/table/plugins/context-menu/$ContextMenuOptions';
4
- import { $MessageWindow } from 'docsvision.web/components/modals/message-box';
5
4
  import { $Router } from 'docsvision.web/core/routing';
6
5
  import { $RoutingService } from 'docsvision.web/core/routing';
6
+ import { BodyContainerProvider } from 'docsvision.web/components/modals/body-container-provider';
7
7
  import { ButtonProps } from '@mui/material';
8
8
  import { CircularProgressProps } from '@mui/material';
9
9
  import { ColumnType } from 'docsvision.web/components/table/interfaces';
@@ -21,7 +21,6 @@ import { IconButtonProps } from '@mui/material';
21
21
  import { ICustomContextMenuOption } from 'docsvision.web/components/table/plugins/context-menu/$ContextMenuOptions';
22
22
  import { IDateFormatPluginData } from 'docsvision.web/components/table/plugins/filter';
23
23
  import { ILogService } from 'docsvision.web/core/system-services/logging/LogService';
24
- import { IMessageWindowService } from 'docsvision.web/components/modals/message-box';
25
24
  import { IRequestService } from 'docsvision.web/core/system-services/networking/RequestService';
26
25
  import { IRouter } from 'docsvision.web/core/routing';
27
26
  import { IRoutingService } from 'docsvision.web/core/routing';
@@ -181,6 +180,10 @@ declare type $LocalStorage_2 = { localStorage: ILocalStorage_2; };
181
180
 
182
181
  declare const $LocalStorage_2 = serviceName((s: $LocalStorage_2) => s.localStorage);
183
182
 
183
+ declare type $MessageWindow = { messageWindow: IMessageWindowService; };
184
+
185
+ declare const $MessageWindow = serviceName((s: $MessageWindow) => s.messageWindow);
186
+
184
187
  declare type $NavigationMenu = { navigationMenu: INavigationMenuService };
185
188
 
186
189
  declare const $NavigationMenu = serviceName<$NavigationMenu, INavigationMenuService>(x => x.navigationMenu);
@@ -394,6 +397,11 @@ declare enum BreadcrumbsLabel_2 {
394
397
  PageOpenSessions = 8
395
398
  }
396
399
 
400
+ declare enum ButtonColorModes {
401
+ Primary = 0,
402
+ Secondary = 1
403
+ }
404
+
397
405
  export declare function ButtonWithLoading(props: IButtonWithLoadingProps): JSX.Element;
398
406
 
399
407
  export declare function CellPreloader(): JSX.Element;
@@ -1085,6 +1093,14 @@ declare interface ICultureSettings_2 {
1085
1093
  twoLetterISOLanguageName: string,
1086
1094
  }
1087
1095
 
1096
+ declare interface ICustomMessageWindowOptions extends IMessageWindowOptions {
1097
+ color?: string;
1098
+ hideByBackdropClick?: boolean;
1099
+ boxDefaultWidth?: boolean;
1100
+ boxMaxWidth?: string | number;
1101
+ className?: string;
1102
+ }
1103
+
1088
1104
  export declare interface IDashboard {
1089
1105
  id: string;
1090
1106
  title: string;
@@ -1680,6 +1696,40 @@ declare interface IMenuItem_2 {
1680
1696
  refElement?: React.RefObject<HTMLDivElement>;
1681
1697
  }
1682
1698
 
1699
+ declare interface IMessageConfirmationWindowOptions extends IMessageWindowOptions {
1700
+ color?: string;
1701
+ modalIcon?: React_2.ReactNode;
1702
+ hideByBackdropClick?: boolean;
1703
+ closeOnEscape?: boolean;
1704
+ }
1705
+
1706
+ declare interface IMessageWindowButton<T> {
1707
+ name?: React_2.ReactNode | string;
1708
+ value?: T;
1709
+ id?: string;
1710
+ isCancel?: boolean;
1711
+ onClick?: () => void;
1712
+ className?: string;
1713
+ colorMode?: ButtonColorModes;
1714
+ }
1715
+
1716
+ declare interface IMessageWindowOptions {
1717
+ customCaptionText?: React_2.ReactNode;
1718
+ contentMaxHeight?: string | number;
1719
+ customButtonOkText?: React_2.ReactNode;
1720
+ withConfirmation?: boolean;
1721
+ customButtonCancelText?: React_2.ReactNode;
1722
+ }
1723
+
1724
+ declare interface IMessageWindowService {
1725
+ showError(content: React.ReactNode, options?: IMessageWindowOptions): Promise<void>;
1726
+ showInfo(content: React.ReactNode, options?: IMessageWindowOptions): Promise<void>;
1727
+ showWarning(content: React.ReactNode, options?: IMessageWindowOptions): Promise<void>;
1728
+ showConfirmation(content: React.ReactNode, options?: IMessageConfirmationWindowOptions): Promise<void>;
1729
+ showCustom<T>(content: React.ReactNode, buttons: IMessageWindowButton<T>[], options?: ICustomMessageWindowOptions): Promise<T | void>;
1730
+ getMessageBoxContainer(): BodyContainerProvider;
1731
+ }
1732
+
1683
1733
  export declare interface IMetaInformation {
1684
1734
  readOnly: boolean;
1685
1735
  acceptMessage: string;
@@ -2531,6 +2581,19 @@ export declare class LocalStorage implements ILocalStorage_2 {
2531
2581
  transformId(id: string): string;
2532
2582
  }
2533
2583
 
2584
+ export declare class MessageWindowService implements IMessageWindowService {
2585
+ private static mMessageBoxContainerProvider;
2586
+ static lastError?: HTMLElement;
2587
+ services: $Resources_2;
2588
+ constructor(services: $Resources_2);
2589
+ showError(content: React_2.ReactNode, options?: IMessageWindowOptions): Promise<void>;
2590
+ showInfo(content: React_2.ReactNode, options?: IMessageWindowOptions): Promise<void>;
2591
+ showWarning(content: React_2.ReactNode, options?: IMessageWindowOptions): Promise<void>;
2592
+ showConfirmation(content: React_2.ReactNode, options?: IMessageConfirmationWindowOptions): Promise<void>;
2593
+ showCustom<T>(content: React_2.ReactNode, buttons: IMessageWindowButton<T>[], options?: ICustomMessageWindowOptions): Promise<T | void>;
2594
+ getMessageBoxContainer(): BodyContainerProvider;
2595
+ }
2596
+
2534
2597
  export declare function NavigationMenu(props: INavigationMenuProps): JSX.Element;
2535
2598
 
2536
2599
  export declare function newGuid(): string;