devexpress-dashboard-react 23.2.6 → 24.1.2-beta

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/README.md CHANGED
@@ -1,19 +1,19 @@
1
- ## About
2
- [DevExpress Dashboard](https://www.devexpress.com/products/net/dashboard/) for React helps you create dashboards and view them on the web and mobile devices. With the Dashboard React component, you can easily add DevExpress Dashboard to your React application and bind it to the ASP.NET Core or ASP.NET MVC dashboard backend.
3
-
4
- - [Get Started - Build Web Dashboard Applications](https://docs.devexpress.com/Dashboard/400423#create-client-and-server-applications)
5
- - [Web Dashboard Technical Overview](https://docs.devexpress.com/Dashboard/119283/)
6
- - [Web Dashboard for React](https://docs.devexpress.com/Dashboard/400683/)
7
-
8
- ## Demos
9
-
10
- - [HTML Javascript Dashboard demo](https://devexpress.github.io/web-dashboard-demo/)
11
- - [Web Dashboard demos](https://demos.devexpress.com/Dashboard/)
12
-
13
- ## License
14
- A valid, commercial license for the DevExpress Universal subscription is required to use this package. Use of this package is governed by the terms and conditions set forth in the applicable Developer Express Inc. End-User License Agreement (EULA) found at https://www.devexpress.com/support/eulas/.
15
-
16
- Please visit https://www.devexpress.com for more information on acquiring and a subscription license.
17
-
18
- ## Support
1
+ ## About
2
+ [DevExpress Dashboard](https://www.devexpress.com/products/net/dashboard/) for React helps you create dashboards and view them on the web and mobile devices. With the Dashboard React component, you can easily add DevExpress Dashboard to your React application and bind it to the ASP.NET Core or ASP.NET MVC dashboard backend.
3
+
4
+ - [Get Started - Build Web Dashboard Applications](https://docs.devexpress.com/Dashboard/400423#create-client-and-server-applications)
5
+ - [Web Dashboard Technical Overview](https://docs.devexpress.com/Dashboard/119283/)
6
+ - [Web Dashboard for React](https://docs.devexpress.com/Dashboard/400683/)
7
+
8
+ ## Demos
9
+
10
+ - [HTML Javascript Dashboard demo](https://devexpress.github.io/web-dashboard-demo/)
11
+ - [Web Dashboard demos](https://demos.devexpress.com/Dashboard/)
12
+
13
+ ## License
14
+ A valid, commercial license for the DevExpress Universal subscription is required to use this package. Use of this package is governed by the terms and conditions set forth in the applicable Developer Express Inc. End-User License Agreement (EULA) found at https://www.devexpress.com/support/eulas/.
15
+
16
+ Please visit https://www.devexpress.com for more information on acquiring and a subscription license.
17
+
18
+ ## Support
19
19
  For any questions regarding reporting controls, please refer to our [DevExpress Support Center](https://www.devexpress.com/Support/Center).
@@ -1,56 +1,38 @@
1
- /// <reference types="react" />
1
+ import * as React from "react";
2
+ import { Ref, ReactElement } from "react";
2
3
  import dxDashboardControl, { Properties } from "devexpress-dashboard/integration/index";
3
- import { Component as BaseComponent, IHtmlOptions } from "devextreme-react/core/component";
4
- import NestedOption from "devextreme-react/core/nested-option";
5
- declare type IDashboardControlOptions = React.PropsWithChildren<Properties & IHtmlOptions & {
4
+ import { IHtmlOptions, IElementDescriptor } from "devextreme-react/core/component";
5
+ type IDashboardControlOptions = React.PropsWithChildren<Properties & IHtmlOptions & {
6
6
  defaultDashboardId?: string;
7
7
  defaultWorkingMode?: string;
8
8
  onDashboardIdChange?: (value: string) => void;
9
9
  onWorkingModeChange?: (value: string) => void;
10
10
  }>;
11
- declare class DashboardControl extends BaseComponent<React.PropsWithChildren<IDashboardControlOptions>> {
12
- get instance(): dxDashboardControl;
13
- protected _WidgetClass: typeof dxDashboardControl;
14
- protected subscribableOptions: string[];
15
- protected independentEvents: string[];
16
- protected _defaults: {
17
- defaultDashboardId: string;
18
- defaultWorkingMode: string;
19
- };
20
- protected _expectedChildren: {
21
- ajaxRemoteService: {
22
- optionName: string;
23
- isCollectionItem: boolean;
24
- };
25
- dataRequestOptions: {
26
- optionName: string;
27
- isCollectionItem: boolean;
28
- };
29
- extensions: {
30
- optionName: string;
31
- isCollectionItem: boolean;
32
- };
33
- fetchRemoteService: {
34
- optionName: string;
35
- isCollectionItem: boolean;
36
- };
37
- };
11
+ interface DashboardControlRef {
12
+ instance: () => dxDashboardControl;
38
13
  }
39
- declare type IAjaxRemoteServiceProps = React.PropsWithChildren<{
14
+ declare const DashboardControl: (props: React.PropsWithChildren<IDashboardControlOptions> & {
15
+ ref?: Ref<DashboardControlRef>;
16
+ }) => ReactElement | null;
17
+ type IAjaxRemoteServiceProps = React.PropsWithChildren<{
40
18
  beforeSend?: ((jqXHR: any, settings: any) => any);
41
19
  complete?: ((jqXHR: any, textStatus: string) => any);
42
20
  headers?: Record<string, any>;
43
21
  }>;
44
- declare class AjaxRemoteService extends NestedOption<IAjaxRemoteServiceProps> {
45
- static OptionName: string;
46
- }
47
- declare type IChartIndicatorsProps = React.PropsWithChildren<{
22
+ declare const _componentAjaxRemoteService: React.MemoExoticComponent<(props: IAjaxRemoteServiceProps) => React.FunctionComponentElement<{
23
+ beforeSend?: (jqXHR: any, settings: any) => any;
24
+ complete?: (jqXHR: any, textStatus: string) => any;
25
+ headers?: Record<string, any>;
26
+ }>>;
27
+ declare const AjaxRemoteService: typeof _componentAjaxRemoteService & IElementDescriptor;
28
+ type IChartIndicatorsProps = React.PropsWithChildren<{
48
29
  customIndicatorTypes?: Record<string, any>;
49
30
  }>;
50
- declare class ChartIndicators extends NestedOption<IChartIndicatorsProps> {
51
- static OptionName: string;
52
- }
53
- declare type IDashboardExportProps = React.PropsWithChildren<{
31
+ declare const _componentChartIndicators: React.MemoExoticComponent<(props: IChartIndicatorsProps) => React.FunctionComponentElement<{
32
+ customIndicatorTypes?: Record<string, any>;
33
+ }>>;
34
+ declare const ChartIndicators: typeof _componentChartIndicators & IElementDescriptor;
35
+ type IDashboardExportProps = React.PropsWithChildren<{
54
36
  allowExportDashboard?: boolean;
55
37
  allowExportDashboardItems?: boolean;
56
38
  onExportDialogHidden?: ((args: {
@@ -66,10 +48,24 @@ declare type IDashboardExportProps = React.PropsWithChildren<{
66
48
  element: any;
67
49
  }) => void);
68
50
  }>;
69
- declare class DashboardExport extends NestedOption<IDashboardExportProps> {
70
- static OptionName: string;
71
- }
72
- declare type IDashboardParameterDialogProps = React.PropsWithChildren<{
51
+ declare const _componentDashboardExport: React.MemoExoticComponent<(props: IDashboardExportProps) => React.FunctionComponentElement<{
52
+ allowExportDashboard?: boolean;
53
+ allowExportDashboardItems?: boolean;
54
+ onExportDialogHidden?: (args: {
55
+ component: any;
56
+ element: any;
57
+ }) => void;
58
+ onExportDialogShowing?: (args: {
59
+ component: any;
60
+ element: any;
61
+ }) => void;
62
+ onExportDialogShown?: (args: {
63
+ component: any;
64
+ element: any;
65
+ }) => void;
66
+ }>>;
67
+ declare const DashboardExport: typeof _componentDashboardExport & IElementDescriptor;
68
+ type IDashboardParameterDialogProps = React.PropsWithChildren<{
73
69
  onDynamicLookUpValuesLoaded?: ((args: {
74
70
  parameterName: string;
75
71
  }) => void);
@@ -89,10 +85,28 @@ declare type IDashboardParameterDialogProps = React.PropsWithChildren<{
89
85
  model: any;
90
86
  }) => any);
91
87
  }>;
92
- declare class DashboardParameterDialog extends NestedOption<IDashboardParameterDialogProps> {
93
- static OptionName: string;
94
- }
95
- declare type IDataInspectorProps = React.PropsWithChildren<{
88
+ declare const _componentDashboardParameterDialog: React.MemoExoticComponent<(props: IDashboardParameterDialogProps) => React.FunctionComponentElement<{
89
+ onDynamicLookUpValuesLoaded?: (args: {
90
+ parameterName: string;
91
+ }) => void;
92
+ onHidden?: (args: {
93
+ component: any;
94
+ element: any;
95
+ model: any;
96
+ }) => any;
97
+ onShowing?: (args: {
98
+ component: any;
99
+ element: any;
100
+ model: any;
101
+ }) => any;
102
+ onShown?: (args: {
103
+ component: any;
104
+ element: any;
105
+ model: any;
106
+ }) => any;
107
+ }>>;
108
+ declare const DashboardParameterDialog: typeof _componentDashboardParameterDialog & IElementDescriptor;
109
+ type IDataInspectorProps = React.PropsWithChildren<{
96
110
  allowInspectAggregatedData?: boolean;
97
111
  allowInspectRawData?: boolean;
98
112
  onDialogHidden?: ((args: {
@@ -116,17 +130,41 @@ declare type IDataInspectorProps = React.PropsWithChildren<{
116
130
  element: any;
117
131
  }) => void);
118
132
  }>;
119
- declare class DataInspector extends NestedOption<IDataInspectorProps> {
120
- static OptionName: string;
121
- }
122
- declare type IDataRequestOptionsProps = React.PropsWithChildren<{
133
+ declare const _componentDataInspector: React.MemoExoticComponent<(props: IDataInspectorProps) => React.FunctionComponentElement<{
134
+ allowInspectAggregatedData?: boolean;
135
+ allowInspectRawData?: boolean;
136
+ onDialogHidden?: (args: {
137
+ component: any;
138
+ element: any;
139
+ }) => void;
140
+ onDialogShowing?: (args: {
141
+ component: any;
142
+ element: any;
143
+ }) => void;
144
+ onDialogShown?: (args: {
145
+ component: any;
146
+ element: any;
147
+ }) => void;
148
+ onGridContentReady?: (args: {
149
+ component: any;
150
+ element: any;
151
+ }) => void;
152
+ onGridInitialized?: (args: {
153
+ component: any;
154
+ element: any;
155
+ }) => void;
156
+ }>>;
157
+ declare const DataInspector: typeof _componentDataInspector & IElementDescriptor;
158
+ type IDataRequestOptionsProps = React.PropsWithChildren<{
123
159
  itemDataLoadingMode?: string;
124
160
  itemDataRequestMode?: string;
125
161
  }>;
126
- declare class DataRequestOptions extends NestedOption<IDataRequestOptionsProps> {
127
- static OptionName: string;
128
- }
129
- declare type IDataSourceWizardProps = React.PropsWithChildren<{
162
+ declare const _componentDataRequestOptions: React.MemoExoticComponent<(props: IDataRequestOptionsProps) => React.FunctionComponentElement<{
163
+ itemDataLoadingMode?: string;
164
+ itemDataRequestMode?: string;
165
+ }>>;
166
+ declare const DataRequestOptions: typeof _componentDataRequestOptions & IElementDescriptor;
167
+ type IDataSourceWizardProps = React.PropsWithChildren<{
130
168
  allowCreateNewJsonConnection?: boolean;
131
169
  enableCustomSql?: boolean;
132
170
  onCustomizeDataSourceWizard?: ((args: {
@@ -134,26 +172,31 @@ declare type IDataSourceWizardProps = React.PropsWithChildren<{
134
172
  }) => void);
135
173
  wizardSettings?: any;
136
174
  }>;
137
- declare class DataSourceWizard extends NestedOption<IDataSourceWizardProps> {
138
- static OptionName: string;
139
- static ExpectedChildren: {
140
- wizardSettings: {
141
- optionName: string;
142
- isCollectionItem: boolean;
143
- };
144
- };
145
- }
146
- declare type IDesignerToolbarProps = React.PropsWithChildren<{
175
+ declare const _componentDataSourceWizard: React.MemoExoticComponent<(props: IDataSourceWizardProps) => React.FunctionComponentElement<{
176
+ allowCreateNewJsonConnection?: boolean;
177
+ enableCustomSql?: boolean;
178
+ onCustomizeDataSourceWizard?: (args: {
179
+ type: any;
180
+ }) => void;
181
+ wizardSettings?: any;
182
+ }>>;
183
+ declare const DataSourceWizard: typeof _componentDataSourceWizard & IElementDescriptor;
184
+ type IDesignerToolbarProps = React.PropsWithChildren<{
147
185
  onPreparing?: ((args: {
148
186
  component: any;
149
187
  dashboard: any;
150
188
  items: Array<any | string>;
151
189
  }) => void);
152
190
  }>;
153
- declare class DesignerToolbar extends NestedOption<IDesignerToolbarProps> {
154
- static OptionName: string;
155
- }
156
- declare type IExtensionsProps = React.PropsWithChildren<{
191
+ declare const _componentDesignerToolbar: React.MemoExoticComponent<(props: IDesignerToolbarProps) => React.FunctionComponentElement<{
192
+ onPreparing?: (args: {
193
+ component: any;
194
+ dashboard: any;
195
+ items: Array<any | string>;
196
+ }) => void;
197
+ }>>;
198
+ declare const DesignerToolbar: typeof _componentDesignerToolbar & IElementDescriptor;
199
+ type IExtensionsProps = React.PropsWithChildren<{
157
200
  chartIndicators?: Record<string, any> | {
158
201
  customIndicatorTypes?: Record<string, any>;
159
202
  };
@@ -351,84 +394,250 @@ declare type IExtensionsProps = React.PropsWithChildren<{
351
394
  }) => void);
352
395
  };
353
396
  }>;
354
- declare class Extensions extends NestedOption<IExtensionsProps> {
355
- static OptionName: string;
356
- static ExpectedChildren: {
357
- chartIndicators: {
358
- optionName: string;
359
- isCollectionItem: boolean;
360
- };
361
- dashboardExport: {
362
- optionName: string;
363
- isCollectionItem: boolean;
364
- };
365
- dashboardParameterDialog: {
366
- optionName: string;
367
- isCollectionItem: boolean;
368
- };
369
- dataInspector: {
370
- optionName: string;
371
- isCollectionItem: boolean;
372
- };
373
- dataSourceWizard: {
374
- optionName: string;
375
- isCollectionItem: boolean;
376
- };
377
- designerToolbar: {
378
- optionName: string;
379
- isCollectionItem: boolean;
380
- };
381
- itemBindingPanel: {
382
- optionName: string;
383
- isCollectionItem: boolean;
384
- };
385
- itemOptionsPanel: {
386
- optionName: string;
387
- isCollectionItem: boolean;
388
- };
389
- mobileLayout: {
390
- optionName: string;
391
- isCollectionItem: boolean;
392
- };
393
- viewerApi: {
394
- optionName: string;
395
- isCollectionItem: boolean;
396
- };
397
+ declare const _componentExtensions: React.MemoExoticComponent<(props: IExtensionsProps) => React.FunctionComponentElement<{
398
+ chartIndicators?: Record<string, any> | {
399
+ customIndicatorTypes?: Record<string, any>;
397
400
  };
398
- }
399
- declare type IFetchRemoteServiceProps = React.PropsWithChildren<{
401
+ dashboardExport?: Record<string, any> | {
402
+ allowExportDashboard?: boolean;
403
+ allowExportDashboardItems?: boolean;
404
+ onExportDialogHidden?: (args: {
405
+ component: any;
406
+ element: any;
407
+ }) => void;
408
+ onExportDialogShowing?: (args: {
409
+ component: any;
410
+ element: any;
411
+ }) => void;
412
+ onExportDialogShown?: (args: {
413
+ component: any;
414
+ element: any;
415
+ }) => void;
416
+ };
417
+ dashboardParameterDialog?: Record<string, any> | {
418
+ onDynamicLookUpValuesLoaded?: (args: {
419
+ parameterName: string;
420
+ }) => void;
421
+ onHidden?: (args: {
422
+ component: any;
423
+ element: any;
424
+ model: any;
425
+ }) => any;
426
+ onShowing?: (args: {
427
+ component: any;
428
+ element: any;
429
+ model: any;
430
+ }) => any;
431
+ onShown?: (args: {
432
+ component: any;
433
+ element: any;
434
+ model: any;
435
+ }) => any;
436
+ };
437
+ dataInspector?: Record<string, any> | {
438
+ allowInspectAggregatedData?: boolean;
439
+ allowInspectRawData?: boolean;
440
+ onDialogHidden?: (args: {
441
+ component: any;
442
+ element: any;
443
+ }) => void;
444
+ onDialogShowing?: (args: {
445
+ component: any;
446
+ element: any;
447
+ }) => void;
448
+ onDialogShown?: (args: {
449
+ component: any;
450
+ element: any;
451
+ }) => void;
452
+ onGridContentReady?: (args: {
453
+ component: any;
454
+ element: any;
455
+ }) => void;
456
+ onGridInitialized?: (args: {
457
+ component: any;
458
+ element: any;
459
+ }) => void;
460
+ };
461
+ dataSourceWizard?: Record<string, any> | {
462
+ allowCreateNewJsonConnection?: boolean;
463
+ enableCustomSql?: boolean;
464
+ onCustomizeDataSourceWizard?: (args: {
465
+ type: any;
466
+ }) => void;
467
+ wizardSettings?: any;
468
+ };
469
+ designerToolbar?: Record<string, any> | {
470
+ onPreparing?: (args: {
471
+ component: any;
472
+ dashboard: any;
473
+ items: Array<any | string>;
474
+ }) => void;
475
+ };
476
+ itemBindingPanel?: Record<string, any> | {
477
+ onCustomizeDataItemContainerSections?: (args: {
478
+ addSection: (() => void);
479
+ dashboardItem: any;
480
+ dataItemContainer: any;
481
+ }) => void;
482
+ };
483
+ itemOptionsPanel?: Record<string, any> | {
484
+ onCustomizeSections?: (args: {
485
+ addSection: (() => void);
486
+ dashboardItem: any;
487
+ }) => void;
488
+ };
489
+ mobileLayout?: Record<string, any> | {
490
+ mobileLayoutEnabled?: string;
491
+ };
492
+ viewerApi?: Record<string, any> | {
493
+ onDashboardTitleToolbarUpdated?: (args: {
494
+ dashboard: any;
495
+ options: any;
496
+ }) => void;
497
+ onItemActionAvailabilityChanged?: (args: {
498
+ dashboardItem: any;
499
+ itemName: string;
500
+ }) => void;
501
+ onItemCaptionToolbarUpdated?: (args: {
502
+ dashboardItem: any;
503
+ itemName: string;
504
+ options: any;
505
+ }) => void;
506
+ onItemClick?: (args: {
507
+ dashboardItem: any;
508
+ getAxisPoint: (() => void);
509
+ getData: (() => void);
510
+ getDeltas: (() => void);
511
+ getDimensions: (() => void);
512
+ getMeasures: (() => void);
513
+ itemName: string;
514
+ requestUnderlyingData: (() => void);
515
+ }) => void;
516
+ onItemDrillDownStateChanged?: (args: {
517
+ action: any | any;
518
+ dashboardItem: any;
519
+ itemName: string;
520
+ values: Array<any>;
521
+ }) => void;
522
+ onItemElementCustomColor?: (args: {
523
+ dashboardItem: any;
524
+ getColor: (() => void);
525
+ getMeasures: (() => void);
526
+ getTargetElement: (() => void);
527
+ itemName: string;
528
+ setColor: (() => void);
529
+ }) => void;
530
+ onItemMasterFilterStateChanged?: (args: {
531
+ dashboardItem: any;
532
+ itemName: string;
533
+ values: Array<any>;
534
+ }) => void;
535
+ onItemSelectionChanged?: (args: {
536
+ dashboardItem: any;
537
+ getCurrentSelection: (() => void);
538
+ itemName: string;
539
+ }) => void;
540
+ onItemVisualInteractivity?: (args: {
541
+ dashboardItem: any;
542
+ enableHighlighting: (() => void);
543
+ getDefaultSelection: (() => void);
544
+ getSelectionMode: (() => void);
545
+ getTargetAxes: (() => void);
546
+ isHighlightingEnabled: (() => void);
547
+ itemName: string;
548
+ setDefaultSelection: (() => void);
549
+ setSelectionMode: (() => void);
550
+ setTargetAxes: (() => void);
551
+ }) => void;
552
+ onItemWidgetCreated?: (args: {
553
+ chartContext: any;
554
+ dashboardItem: any;
555
+ gaugeContext: any;
556
+ getWidget: (() => void);
557
+ gridContext: any;
558
+ itemData: any;
559
+ itemName: string;
560
+ }) => void;
561
+ onItemWidgetOptionsPrepared?: (args: {
562
+ chartContext: any;
563
+ dashboardItem: any;
564
+ gaugeContext: any;
565
+ gridContext: any;
566
+ itemData: any;
567
+ itemName: string;
568
+ options: Record<string, any>;
569
+ }) => void;
570
+ onItemWidgetUpdated?: (args: {
571
+ chartContext: any;
572
+ dashboardItem: any;
573
+ gaugeContext: any;
574
+ getWidget: (() => void);
575
+ gridContext: any;
576
+ itemData: any;
577
+ itemName: string;
578
+ }) => void;
579
+ onItemWidgetUpdating?: (args: {
580
+ chartContext: any;
581
+ dashboardItem: any;
582
+ gaugeContext: any;
583
+ getWidget: (() => void);
584
+ gridContext: any;
585
+ itemData: any;
586
+ itemName: string;
587
+ }) => void;
588
+ onSelectedTabPageChanged?: (args: {
589
+ previousPage: string;
590
+ selectedPage: string;
591
+ tabContainerName: string;
592
+ }) => void;
593
+ };
594
+ }>>;
595
+ declare const Extensions: typeof _componentExtensions & IElementDescriptor;
596
+ type IFetchRemoteServiceProps = React.PropsWithChildren<{
400
597
  beforeSend?: ((settings: any) => void);
401
598
  headers?: Record<string, any>;
402
599
  }>;
403
- declare class FetchRemoteService extends NestedOption<IFetchRemoteServiceProps> {
404
- static OptionName: string;
405
- }
406
- declare type IItemBindingPanelProps = React.PropsWithChildren<{
600
+ declare const _componentFetchRemoteService: React.MemoExoticComponent<(props: IFetchRemoteServiceProps) => React.FunctionComponentElement<{
601
+ beforeSend?: (settings: any) => void;
602
+ headers?: Record<string, any>;
603
+ }>>;
604
+ declare const FetchRemoteService: typeof _componentFetchRemoteService & IElementDescriptor;
605
+ type IItemBindingPanelProps = React.PropsWithChildren<{
407
606
  onCustomizeDataItemContainerSections?: ((args: {
408
607
  addSection: (() => void);
409
608
  dashboardItem: any;
410
609
  dataItemContainer: any;
411
610
  }) => void);
412
611
  }>;
413
- declare class ItemBindingPanel extends NestedOption<IItemBindingPanelProps> {
414
- static OptionName: string;
415
- }
416
- declare type IItemOptionsPanelProps = React.PropsWithChildren<{
612
+ declare const _componentItemBindingPanel: React.MemoExoticComponent<(props: IItemBindingPanelProps) => React.FunctionComponentElement<{
613
+ onCustomizeDataItemContainerSections?: (args: {
614
+ addSection: (() => void);
615
+ dashboardItem: any;
616
+ dataItemContainer: any;
617
+ }) => void;
618
+ }>>;
619
+ declare const ItemBindingPanel: typeof _componentItemBindingPanel & IElementDescriptor;
620
+ type IItemOptionsPanelProps = React.PropsWithChildren<{
417
621
  onCustomizeSections?: ((args: {
418
622
  addSection: (() => void);
419
623
  dashboardItem: any;
420
624
  }) => void);
421
625
  }>;
422
- declare class ItemOptionsPanel extends NestedOption<IItemOptionsPanelProps> {
423
- static OptionName: string;
424
- }
425
- declare type IMobileLayoutProps = React.PropsWithChildren<{
626
+ declare const _componentItemOptionsPanel: React.MemoExoticComponent<(props: IItemOptionsPanelProps) => React.FunctionComponentElement<{
627
+ onCustomizeSections?: (args: {
628
+ addSection: (() => void);
629
+ dashboardItem: any;
630
+ }) => void;
631
+ }>>;
632
+ declare const ItemOptionsPanel: typeof _componentItemOptionsPanel & IElementDescriptor;
633
+ type IMobileLayoutProps = React.PropsWithChildren<{
426
634
  mobileLayoutEnabled?: string;
427
635
  }>;
428
- declare class MobileLayout extends NestedOption<IMobileLayoutProps> {
429
- static OptionName: string;
430
- }
431
- declare type IViewerApiProps = React.PropsWithChildren<{
636
+ declare const _componentMobileLayout: React.MemoExoticComponent<(props: IMobileLayoutProps) => React.FunctionComponentElement<{
637
+ mobileLayoutEnabled?: string;
638
+ }>>;
639
+ declare const MobileLayout: typeof _componentMobileLayout & IElementDescriptor;
640
+ type IViewerApiProps = React.PropsWithChildren<{
432
641
  onDashboardTitleToolbarUpdated?: ((args: {
433
642
  dashboard: any;
434
643
  options: any;
@@ -530,17 +739,121 @@ declare type IViewerApiProps = React.PropsWithChildren<{
530
739
  tabContainerName: string;
531
740
  }) => void);
532
741
  }>;
533
- declare class ViewerApi extends NestedOption<IViewerApiProps> {
534
- static OptionName: string;
535
- }
536
- declare type IWizardSettingsProps = React.PropsWithChildren<{
742
+ declare const _componentViewerApi: React.MemoExoticComponent<(props: IViewerApiProps) => React.FunctionComponentElement<{
743
+ onDashboardTitleToolbarUpdated?: (args: {
744
+ dashboard: any;
745
+ options: any;
746
+ }) => void;
747
+ onItemActionAvailabilityChanged?: (args: {
748
+ dashboardItem: any;
749
+ itemName: string;
750
+ }) => void;
751
+ onItemCaptionToolbarUpdated?: (args: {
752
+ dashboardItem: any;
753
+ itemName: string;
754
+ options: any;
755
+ }) => void;
756
+ onItemClick?: (args: {
757
+ dashboardItem: any;
758
+ getAxisPoint: (() => void);
759
+ getData: (() => void);
760
+ getDeltas: (() => void);
761
+ getDimensions: (() => void);
762
+ getMeasures: (() => void);
763
+ itemName: string;
764
+ requestUnderlyingData: (() => void);
765
+ }) => void;
766
+ onItemDrillDownStateChanged?: (args: {
767
+ action: any | any;
768
+ dashboardItem: any;
769
+ itemName: string;
770
+ values: Array<any>;
771
+ }) => void;
772
+ onItemElementCustomColor?: (args: {
773
+ dashboardItem: any;
774
+ getColor: (() => void);
775
+ getMeasures: (() => void);
776
+ getTargetElement: (() => void);
777
+ itemName: string;
778
+ setColor: (() => void);
779
+ }) => void;
780
+ onItemMasterFilterStateChanged?: (args: {
781
+ dashboardItem: any;
782
+ itemName: string;
783
+ values: Array<any>;
784
+ }) => void;
785
+ onItemSelectionChanged?: (args: {
786
+ dashboardItem: any;
787
+ getCurrentSelection: (() => void);
788
+ itemName: string;
789
+ }) => void;
790
+ onItemVisualInteractivity?: (args: {
791
+ dashboardItem: any;
792
+ enableHighlighting: (() => void);
793
+ getDefaultSelection: (() => void);
794
+ getSelectionMode: (() => void);
795
+ getTargetAxes: (() => void);
796
+ isHighlightingEnabled: (() => void);
797
+ itemName: string;
798
+ setDefaultSelection: (() => void);
799
+ setSelectionMode: (() => void);
800
+ setTargetAxes: (() => void);
801
+ }) => void;
802
+ onItemWidgetCreated?: (args: {
803
+ chartContext: any;
804
+ dashboardItem: any;
805
+ gaugeContext: any;
806
+ getWidget: (() => void);
807
+ gridContext: any;
808
+ itemData: any;
809
+ itemName: string;
810
+ }) => void;
811
+ onItemWidgetOptionsPrepared?: (args: {
812
+ chartContext: any;
813
+ dashboardItem: any;
814
+ gaugeContext: any;
815
+ gridContext: any;
816
+ itemData: any;
817
+ itemName: string;
818
+ options: Record<string, any>;
819
+ }) => void;
820
+ onItemWidgetUpdated?: (args: {
821
+ chartContext: any;
822
+ dashboardItem: any;
823
+ gaugeContext: any;
824
+ getWidget: (() => void);
825
+ gridContext: any;
826
+ itemData: any;
827
+ itemName: string;
828
+ }) => void;
829
+ onItemWidgetUpdating?: (args: {
830
+ chartContext: any;
831
+ dashboardItem: any;
832
+ gaugeContext: any;
833
+ getWidget: (() => void);
834
+ gridContext: any;
835
+ itemData: any;
836
+ itemName: string;
837
+ }) => void;
838
+ onSelectedTabPageChanged?: (args: {
839
+ previousPage: string;
840
+ selectedPage: string;
841
+ tabContainerName: string;
842
+ }) => void;
843
+ }>>;
844
+ declare const ViewerApi: typeof _componentViewerApi & IElementDescriptor;
845
+ type IWizardSettingsProps = React.PropsWithChildren<{
537
846
  enableFederationDataSource?: boolean;
538
847
  enableJsonDataSource?: boolean;
539
848
  enableOlapDataSource?: boolean;
540
849
  enableSqlDataSource?: boolean;
541
850
  }>;
542
- declare class WizardSettings extends NestedOption<IWizardSettingsProps> {
543
- static OptionName: string;
544
- }
851
+ declare const _componentWizardSettings: React.MemoExoticComponent<(props: IWizardSettingsProps) => React.FunctionComponentElement<{
852
+ enableFederationDataSource?: boolean;
853
+ enableJsonDataSource?: boolean;
854
+ enableOlapDataSource?: boolean;
855
+ enableSqlDataSource?: boolean;
856
+ }>>;
857
+ declare const WizardSettings: typeof _componentWizardSettings & IElementDescriptor;
545
858
  export default DashboardControl;
546
- export { DashboardControl, IDashboardControlOptions, AjaxRemoteService, IAjaxRemoteServiceProps, ChartIndicators, IChartIndicatorsProps, DashboardExport, IDashboardExportProps, DashboardParameterDialog, IDashboardParameterDialogProps, DataInspector, IDataInspectorProps, DataRequestOptions, IDataRequestOptionsProps, DataSourceWizard, IDataSourceWizardProps, DesignerToolbar, IDesignerToolbarProps, Extensions, IExtensionsProps, FetchRemoteService, IFetchRemoteServiceProps, ItemBindingPanel, IItemBindingPanelProps, ItemOptionsPanel, IItemOptionsPanelProps, MobileLayout, IMobileLayoutProps, ViewerApi, IViewerApiProps, WizardSettings, IWizardSettingsProps };
859
+ export { DashboardControl, IDashboardControlOptions, DashboardControlRef, AjaxRemoteService, IAjaxRemoteServiceProps, ChartIndicators, IChartIndicatorsProps, DashboardExport, IDashboardExportProps, DashboardParameterDialog, IDashboardParameterDialogProps, DataInspector, IDataInspectorProps, DataRequestOptions, IDataRequestOptionsProps, DataSourceWizard, IDataSourceWizardProps, DesignerToolbar, IDesignerToolbarProps, Extensions, IExtensionsProps, FetchRemoteService, IFetchRemoteServiceProps, ItemBindingPanel, IItemBindingPanelProps, ItemOptionsPanel, IItemOptionsPanelProps, MobileLayout, IMobileLayoutProps, ViewerApi, IViewerApiProps, WizardSettings, IWizardSettingsProps };
@@ -1,134 +1,156 @@
1
+ "use client";
1
2
  "use strict";
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  exports.WizardSettings = exports.ViewerApi = exports.MobileLayout = exports.ItemOptionsPanel = exports.ItemBindingPanel = exports.FetchRemoteService = exports.Extensions = exports.DesignerToolbar = exports.DataSourceWizard = exports.DataRequestOptions = exports.DataInspector = exports.DashboardParameterDialog = exports.DashboardExport = exports.ChartIndicators = exports.AjaxRemoteService = exports.DashboardControl = void 0;
5
+ const React = require("react");
6
+ const react_1 = require("react");
4
7
  const index_1 = require("devexpress-dashboard/integration/index");
5
- const PropTypes = require("prop-types");
6
8
  const component_1 = require("devextreme-react/core/component");
7
9
  const nested_option_1 = require("devextreme-react/core/nested-option");
8
- class DashboardControl extends component_1.Component {
9
- constructor() {
10
- super(...arguments);
11
- this._WidgetClass = index_1.default;
12
- this.subscribableOptions = ["dashboardId", "workingMode"];
13
- this.independentEvents = ["onBeforeRender", "onDashboardBeginUpdate", "onDashboardEndUpdate", "onDashboardInitialized", "onDashboardInitializing", "onInitializing", "onItemBeginUpdate", "onItemEndUpdate"];
14
- this._defaults = {
15
- defaultDashboardId: "dashboardId",
16
- defaultWorkingMode: "workingMode"
17
- };
18
- this._expectedChildren = {
19
- ajaxRemoteService: { optionName: "ajaxRemoteService", isCollectionItem: false },
20
- dataRequestOptions: { optionName: "dataRequestOptions", isCollectionItem: false },
21
- extensions: { optionName: "extensions", isCollectionItem: false },
22
- fetchRemoteService: { optionName: "fetchRemoteService", isCollectionItem: false }
23
- };
24
- }
25
- get instance() {
26
- return this._instance;
27
- }
28
- }
10
+ const DashboardControl = (0, react_1.memo)((0, react_1.forwardRef)((props, ref) => {
11
+ const baseRef = (0, react_1.useRef)(null);
12
+ (0, react_1.useImperativeHandle)(ref, () => ({
13
+ instance() {
14
+ var _a;
15
+ return (_a = baseRef.current) === null || _a === void 0 ? void 0 : _a.getInstance();
16
+ }
17
+ }), [baseRef.current]);
18
+ const subscribableOptions = (0, react_1.useMemo)(() => (["dashboardId", "workingMode"]), []);
19
+ const independentEvents = (0, react_1.useMemo)(() => (["onBeforeRender", "onDashboardBeginUpdate", "onDashboardEndUpdate", "onDashboardInitialized", "onDashboardInitializing", "onInitializing", "onItemBeginUpdate", "onItemEndUpdate"]), []);
20
+ const defaults = (0, react_1.useMemo)(() => ({
21
+ defaultDashboardId: "dashboardId",
22
+ defaultWorkingMode: "workingMode",
23
+ }), []);
24
+ const expectedChildren = (0, react_1.useMemo)(() => ({
25
+ ajaxRemoteService: { optionName: "ajaxRemoteService", isCollectionItem: false },
26
+ dataRequestOptions: { optionName: "dataRequestOptions", isCollectionItem: false },
27
+ extensions: { optionName: "extensions", isCollectionItem: false },
28
+ fetchRemoteService: { optionName: "fetchRemoteService", isCollectionItem: false }
29
+ }), []);
30
+ return (React.createElement((component_1.Component), Object.assign({ WidgetClass: index_1.default, ref: baseRef, subscribableOptions,
31
+ independentEvents,
32
+ defaults,
33
+ expectedChildren }, props)));
34
+ }));
29
35
  exports.DashboardControl = DashboardControl;
30
- DashboardControl.propTypes = {
31
- ajaxRemoteService: PropTypes.object,
32
- allowMaximizeItems: PropTypes.bool,
33
- dashboardId: PropTypes.string,
34
- dataRequestOptions: PropTypes.object,
35
- encodeHtml: PropTypes.bool,
36
- endpoint: PropTypes.string,
37
- extensions: PropTypes.object,
38
- fetchRemoteService: PropTypes.object,
39
- initialDashboardId: PropTypes.string,
40
- initialDashboardState: PropTypes.string,
41
- limitVisibleDataMode: PropTypes.string,
42
- loadDefaultDashboard: PropTypes.bool,
43
- nonce: PropTypes.string,
44
- onBeforeRender: PropTypes.func,
45
- onDashboardBeginUpdate: PropTypes.func,
46
- onDashboardEndUpdate: PropTypes.func,
47
- onDashboardInitialized: PropTypes.func,
48
- onDashboardInitializing: PropTypes.func,
49
- onDashboardStateChanged: PropTypes.func,
50
- onInitializing: PropTypes.func,
51
- onItemBeginUpdate: PropTypes.func,
52
- onItemEndUpdate: PropTypes.func,
53
- onOptionChanged: PropTypes.func,
54
- resizeByTimer: PropTypes.bool,
55
- showConfirmationOnBrowserClosing: PropTypes.bool,
56
- useNeutralFilterMode: PropTypes.bool,
57
- workingMode: PropTypes.string
58
- };
59
- class AjaxRemoteService extends nested_option_1.default {
60
- }
36
+ const _componentAjaxRemoteService = (0, react_1.memo)((props) => {
37
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
38
+ });
39
+ const AjaxRemoteService = Object.assign(_componentAjaxRemoteService, {
40
+ OptionName: "ajaxRemoteService",
41
+ });
61
42
  exports.AjaxRemoteService = AjaxRemoteService;
62
- AjaxRemoteService.OptionName = "ajaxRemoteService";
63
- class ChartIndicators extends nested_option_1.default {
64
- }
43
+ const _componentChartIndicators = (0, react_1.memo)((props) => {
44
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
45
+ });
46
+ const ChartIndicators = Object.assign(_componentChartIndicators, {
47
+ OptionName: "chartIndicators",
48
+ });
65
49
  exports.ChartIndicators = ChartIndicators;
66
- ChartIndicators.OptionName = "chartIndicators";
67
- class DashboardExport extends nested_option_1.default {
68
- }
50
+ const _componentDashboardExport = (0, react_1.memo)((props) => {
51
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
52
+ });
53
+ const DashboardExport = Object.assign(_componentDashboardExport, {
54
+ OptionName: "dashboardExport",
55
+ });
69
56
  exports.DashboardExport = DashboardExport;
70
- DashboardExport.OptionName = "dashboardExport";
71
- class DashboardParameterDialog extends nested_option_1.default {
72
- }
57
+ const _componentDashboardParameterDialog = (0, react_1.memo)((props) => {
58
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
59
+ });
60
+ const DashboardParameterDialog = Object.assign(_componentDashboardParameterDialog, {
61
+ OptionName: "dashboardParameterDialog",
62
+ });
73
63
  exports.DashboardParameterDialog = DashboardParameterDialog;
74
- DashboardParameterDialog.OptionName = "dashboardParameterDialog";
75
- class DataInspector extends nested_option_1.default {
76
- }
64
+ const _componentDataInspector = (0, react_1.memo)((props) => {
65
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
66
+ });
67
+ const DataInspector = Object.assign(_componentDataInspector, {
68
+ OptionName: "dataInspector",
69
+ });
77
70
  exports.DataInspector = DataInspector;
78
- DataInspector.OptionName = "dataInspector";
79
- class DataRequestOptions extends nested_option_1.default {
80
- }
71
+ const _componentDataRequestOptions = (0, react_1.memo)((props) => {
72
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
73
+ });
74
+ const DataRequestOptions = Object.assign(_componentDataRequestOptions, {
75
+ OptionName: "dataRequestOptions",
76
+ });
81
77
  exports.DataRequestOptions = DataRequestOptions;
82
- DataRequestOptions.OptionName = "dataRequestOptions";
83
- class DataSourceWizard extends nested_option_1.default {
84
- }
78
+ const _componentDataSourceWizard = (0, react_1.memo)((props) => {
79
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
80
+ });
81
+ const DataSourceWizard = Object.assign(_componentDataSourceWizard, {
82
+ OptionName: "dataSourceWizard",
83
+ ExpectedChildren: {
84
+ wizardSettings: { optionName: "wizardSettings", isCollectionItem: false }
85
+ },
86
+ });
85
87
  exports.DataSourceWizard = DataSourceWizard;
86
- DataSourceWizard.OptionName = "dataSourceWizard";
87
- DataSourceWizard.ExpectedChildren = {
88
- wizardSettings: { optionName: "wizardSettings", isCollectionItem: false }
89
- };
90
- class DesignerToolbar extends nested_option_1.default {
91
- }
88
+ const _componentDesignerToolbar = (0, react_1.memo)((props) => {
89
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
90
+ });
91
+ const DesignerToolbar = Object.assign(_componentDesignerToolbar, {
92
+ OptionName: "designerToolbar",
93
+ });
92
94
  exports.DesignerToolbar = DesignerToolbar;
93
- DesignerToolbar.OptionName = "designerToolbar";
94
- class Extensions extends nested_option_1.default {
95
- }
95
+ const _componentExtensions = (0, react_1.memo)((props) => {
96
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
97
+ });
98
+ const Extensions = Object.assign(_componentExtensions, {
99
+ OptionName: "extensions",
100
+ ExpectedChildren: {
101
+ chartIndicators: { optionName: "chartIndicators", isCollectionItem: false },
102
+ dashboardExport: { optionName: "dashboardExport", isCollectionItem: false },
103
+ dashboardParameterDialog: { optionName: "dashboardParameterDialog", isCollectionItem: false },
104
+ dataInspector: { optionName: "dataInspector", isCollectionItem: false },
105
+ dataSourceWizard: { optionName: "dataSourceWizard", isCollectionItem: false },
106
+ designerToolbar: { optionName: "designerToolbar", isCollectionItem: false },
107
+ itemBindingPanel: { optionName: "itemBindingPanel", isCollectionItem: false },
108
+ itemOptionsPanel: { optionName: "itemOptionsPanel", isCollectionItem: false },
109
+ mobileLayout: { optionName: "mobileLayout", isCollectionItem: false },
110
+ viewerApi: { optionName: "viewerApi", isCollectionItem: false }
111
+ },
112
+ });
96
113
  exports.Extensions = Extensions;
97
- Extensions.OptionName = "extensions";
98
- Extensions.ExpectedChildren = {
99
- chartIndicators: { optionName: "chartIndicators", isCollectionItem: false },
100
- dashboardExport: { optionName: "dashboardExport", isCollectionItem: false },
101
- dashboardParameterDialog: { optionName: "dashboardParameterDialog", isCollectionItem: false },
102
- dataInspector: { optionName: "dataInspector", isCollectionItem: false },
103
- dataSourceWizard: { optionName: "dataSourceWizard", isCollectionItem: false },
104
- designerToolbar: { optionName: "designerToolbar", isCollectionItem: false },
105
- itemBindingPanel: { optionName: "itemBindingPanel", isCollectionItem: false },
106
- itemOptionsPanel: { optionName: "itemOptionsPanel", isCollectionItem: false },
107
- mobileLayout: { optionName: "mobileLayout", isCollectionItem: false },
108
- viewerApi: { optionName: "viewerApi", isCollectionItem: false }
109
- };
110
- class FetchRemoteService extends nested_option_1.default {
111
- }
114
+ const _componentFetchRemoteService = (0, react_1.memo)((props) => {
115
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
116
+ });
117
+ const FetchRemoteService = Object.assign(_componentFetchRemoteService, {
118
+ OptionName: "fetchRemoteService",
119
+ });
112
120
  exports.FetchRemoteService = FetchRemoteService;
113
- FetchRemoteService.OptionName = "fetchRemoteService";
114
- class ItemBindingPanel extends nested_option_1.default {
115
- }
121
+ const _componentItemBindingPanel = (0, react_1.memo)((props) => {
122
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
123
+ });
124
+ const ItemBindingPanel = Object.assign(_componentItemBindingPanel, {
125
+ OptionName: "itemBindingPanel",
126
+ });
116
127
  exports.ItemBindingPanel = ItemBindingPanel;
117
- ItemBindingPanel.OptionName = "itemBindingPanel";
118
- class ItemOptionsPanel extends nested_option_1.default {
119
- }
128
+ const _componentItemOptionsPanel = (0, react_1.memo)((props) => {
129
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
130
+ });
131
+ const ItemOptionsPanel = Object.assign(_componentItemOptionsPanel, {
132
+ OptionName: "itemOptionsPanel",
133
+ });
120
134
  exports.ItemOptionsPanel = ItemOptionsPanel;
121
- ItemOptionsPanel.OptionName = "itemOptionsPanel";
122
- class MobileLayout extends nested_option_1.default {
123
- }
135
+ const _componentMobileLayout = (0, react_1.memo)((props) => {
136
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
137
+ });
138
+ const MobileLayout = Object.assign(_componentMobileLayout, {
139
+ OptionName: "mobileLayout",
140
+ });
124
141
  exports.MobileLayout = MobileLayout;
125
- MobileLayout.OptionName = "mobileLayout";
126
- class ViewerApi extends nested_option_1.default {
127
- }
142
+ const _componentViewerApi = (0, react_1.memo)((props) => {
143
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
144
+ });
145
+ const ViewerApi = Object.assign(_componentViewerApi, {
146
+ OptionName: "viewerApi",
147
+ });
128
148
  exports.ViewerApi = ViewerApi;
129
- ViewerApi.OptionName = "viewerApi";
130
- class WizardSettings extends nested_option_1.default {
131
- }
149
+ const _componentWizardSettings = (0, react_1.memo)((props) => {
150
+ return React.createElement((nested_option_1.default), Object.assign({}, props));
151
+ });
152
+ const WizardSettings = Object.assign(_componentWizardSettings, {
153
+ OptionName: "wizardSettings",
154
+ });
132
155
  exports.WizardSettings = WizardSettings;
133
- WizardSettings.OptionName = "wizardSettings";
134
156
  exports.default = DashboardControl;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "devexpress-dashboard-react",
3
3
  "author": "Developer Express Inc.",
4
- "version": "23.2.6",
4
+ "version": "24.1.2-beta",
5
5
  "description": "A component that integrates DevExpress Web Dashboard in a React application",
6
6
  "homepage": "https://www.devexpress.com/products/net/dashboard/",
7
7
  "bugs": "https://www.devexpress.com/support/",
@@ -17,9 +17,9 @@
17
17
  "prop-types": "^15.6.1"
18
18
  },
19
19
  "peerDependencies": {
20
- "devexpress-dashboard": "23.2.6",
21
- "devextreme": "23.2.6",
22
- "devextreme-react": "23.2.6",
23
- "@devexpress/analytics-core": "23.2.6"
20
+ "devexpress-dashboard": "24.1.2-beta",
21
+ "devextreme": "24.1.2-beta",
22
+ "devextreme-react": "24.1.2-beta",
23
+ "@devexpress/analytics-core": "24.1.2-beta"
24
24
  }
25
25
  }