@tenorlab/react-dashboard 1.6.3 → 1.6.4

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/core.d.ts CHANGED
@@ -197,6 +197,7 @@ export declare interface IDashboardConfig {
197
197
  responsiveGrid: boolean;
198
198
  widgets: TDashboardWidgetKey[];
199
199
  childWidgetsConfig: IChildWidgetConfigEntry[];
200
+ savedProps?: IWidgetSavedProps[];
200
201
  cssSettings: IDashboardSettingEntry[];
201
202
  _version?: number;
202
203
  _stateDescription?: string;
@@ -282,7 +283,10 @@ export declare interface IDashboardWidgetPropsBase<TExtraProps = any> {
282
283
  noShadow?: boolean;
283
284
  noBorder?: boolean;
284
285
  noPadding?: boolean;
286
+ noCollapse?: boolean;
285
287
  direction?: TWidgetDirection;
288
+ widgetSavedProps?: IWidgetSavedProps;
289
+ meta?: TWidgetMetaInfoBase;
286
290
  extraProps?: TExtraProps;
287
291
  }
288
292
 
@@ -315,6 +319,12 @@ export declare interface IDynamicWidgetCatalogEntryBase<TFrameworkElementType =
315
319
  loader?: TWidgetFactoryBase<TFrameworkComponentType>;
316
320
  }
317
321
 
322
+ export declare interface IWidgetSavedProps {
323
+ parentWidgetKey?: TDashboardWidgetKey;
324
+ widgetKey: TDashboardWidgetKey;
325
+ isCollapsed?: boolean;
326
+ }
327
+
318
328
  /**
319
329
  * @name localWidgetDiscovery
320
330
  * @description Scans local directories for widgets.
@@ -537,8 +547,10 @@ export declare type TWidgetMetaInfoBase<TFrameworkElementType = any> = {
537
547
  description: string;
538
548
  categories: TWidgetCategory[];
539
549
  noDuplicatedWidgets?: boolean;
540
- icon?: TFrameworkElementType | undefined;
550
+ icon?: TFrameworkElementType | string | undefined;
541
551
  externalDependencies: string[];
552
+ tags?: string[];
553
+ noCollapse?: boolean;
542
554
  };
543
555
 
544
556
  /**
@@ -12,11 +12,11 @@ export declare const AddIcon: typeof PlusCircleIcon;
12
12
 
13
13
  export declare function Button(props: IButtonProps): JSX_2.Element;
14
14
 
15
- export declare function ChevronDownIcon({ className }: TIconProps): JSX_2.Element;
15
+ export declare function ChevronDownIcon({ className, style }: TIconProps): JSX_2.Element;
16
16
 
17
- export declare function CircleQuestionMark({ className }: TIconProps): JSX_2.Element;
17
+ export declare function CircleQuestionMark({ className, style }: TIconProps): JSX_2.Element;
18
18
 
19
- export declare function CrosshairIcon({ className }: TIconProps): JSX_2.Element;
19
+ export declare function CrosshairIcon({ className, style }: TIconProps): JSX_2.Element;
20
20
 
21
21
  export declare const DashboardGrid: ForwardRefExoticComponent<IDashboardGridProps & RefAttributes<HTMLDivElement>>;
22
22
 
@@ -24,7 +24,7 @@ export declare const DashboardWidgetBase: (props: IDashboardWidgetProps & {
24
24
  ref?: React.ForwardedRef<HTMLDivElement>;
25
25
  }) => React.ReactElement | null;
26
26
 
27
- export declare function DeleteIcon({ className }: TIconProps): JSX_2.Element;
27
+ export declare function DeleteIcon({ className, style }: TIconProps): JSX_2.Element;
28
28
 
29
29
  export declare const DraggablePanel: ForwardRefExoticComponent<DraggablePanelProps & RefAttributes<HTMLDivElement>>;
30
30
 
@@ -46,15 +46,15 @@ export declare const Dropdown: default_2.FC<TProps>;
46
46
  * @param {string} props.widgetKey
47
47
  * @param {(key: string) => Promise<void>} props.onRemoveClick
48
48
  */
49
- export declare function DynamicWidgetLoader({ index, maxIndex, widgetKey, parentWidgetKey, targetContainerKey, childWidgetsConfig, widgetCatalog, isEditing, extraProps, onRemoveClick, onMoveClick, selectContainer, }: TDynamicWidgetLoaderProps): JSX_2.Element;
49
+ export declare function DynamicWidgetLoader({ index, maxIndex, widgetKey, parentWidgetKey, targetContainerKey, childWidgetsConfig, savedProps, widgetCatalog, isEditing, extraProps, onRemoveClick, onMoveClick, selectContainer, savedPropsChanged, }: TDynamicWidgetLoaderProps): JSX_2.Element;
50
50
 
51
- export declare function EditIcon({ className }: TIconProps): JSX_2.Element;
51
+ export declare function EditIcon({ className, style }: TIconProps): JSX_2.Element;
52
52
 
53
- export declare function GridIcon({ className }: TIconProps): JSX_2.Element;
53
+ export declare function GridIcon({ className, style }: TIconProps): JSX_2.Element;
54
54
 
55
- export declare function HandGrabIcon({ className }: TIconProps): JSX_2.Element;
55
+ export declare function HandGrabIcon({ className, style }: TIconProps): JSX_2.Element;
56
56
 
57
- export declare function HandIcon({ className }: TIconProps): JSX_2.Element;
57
+ export declare function HandIcon({ className, style }: TIconProps): JSX_2.Element;
58
58
 
59
59
  export declare interface IButtonProps {
60
60
  disabled?: boolean;
@@ -110,6 +110,7 @@ export declare interface IDashboardConfig {
110
110
  responsiveGrid: boolean;
111
111
  widgets: TDashboardWidgetKey[];
112
112
  childWidgetsConfig: IChildWidgetConfigEntry[];
113
+ savedProps?: IWidgetSavedProps[];
113
114
  cssSettings: IDashboardSettingEntry[];
114
115
  _version?: number;
115
116
  _stateDescription?: string;
@@ -185,9 +186,12 @@ export declare interface IDashboardWidget extends JSX.Element {
185
186
  */
186
187
  export declare interface IDashboardWidgetProps<TExtraProps = any> extends IDashboardWidgetPropsBase<TExtraProps> {
187
188
  children?: ReactNode;
189
+ titleNode?: ReactNode;
190
+ titleRightNode?: ReactNode;
188
191
  onRemoveClick?: (widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
189
192
  onMoveClick?: (direction: -1 | 1, widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
190
193
  selectContainer?: (containerKey?: TDashboardWidgetKey) => void;
194
+ savedPropsChanged?: (value: IWidgetSavedProps) => any;
191
195
  }
192
196
 
193
197
  /**
@@ -225,7 +229,10 @@ export declare interface IDashboardWidgetPropsBase<TExtraProps = any> {
225
229
  noShadow?: boolean;
226
230
  noBorder?: boolean;
227
231
  noPadding?: boolean;
232
+ noCollapse?: boolean;
228
233
  direction?: TWidgetDirection;
234
+ widgetSavedProps?: IWidgetSavedProps;
235
+ meta?: TWidgetMetaInfoBase;
229
236
  extraProps?: TExtraProps;
230
237
  }
231
238
 
@@ -295,6 +302,12 @@ export declare interface ITooltipProps {
295
302
  title: string;
296
303
  }
297
304
 
305
+ declare interface IWidgetSavedProps {
306
+ parentWidgetKey?: TDashboardWidgetKey;
307
+ widgetKey: TDashboardWidgetKey;
308
+ isCollapsed?: boolean;
309
+ }
310
+
298
311
  export declare const ListItem: ForwardRefExoticComponent<TStackProps & {
299
312
  innerClass?: string;
300
313
  } & RefAttributes<HTMLDivElement>>;
@@ -305,34 +318,35 @@ export declare const ListItemMiddleChild: ForwardRefExoticComponent<TListItemChi
305
318
 
306
319
  export declare const ListItemRightChild: ForwardRefExoticComponent<TListItemChildProps & RefAttributes<HTMLDivElement>>;
307
320
 
308
- export declare function MinusCircleIcon({ className }: TIconProps): JSX_2.Element;
321
+ export declare function MinusCircleIcon({ className, style }: TIconProps): JSX_2.Element;
309
322
 
310
- export declare function MonitorIcon({ className }: TIconProps): JSX_2.Element;
323
+ export declare function MonitorIcon({ className, style }: TIconProps): JSX_2.Element;
311
324
 
312
- export declare function MonitorSmartphoneIcon({ className }: TIconProps): JSX_2.Element;
325
+ export declare function MonitorSmartphoneIcon({ className, style }: TIconProps): JSX_2.Element;
313
326
 
314
- export declare function MoveLeftIcon({ className }: TIconProps): JSX_2.Element;
327
+ export declare function MoveLeftIcon({ className, style }: TIconProps): JSX_2.Element;
315
328
 
316
- export declare function MoveRightIcon({ className }: TIconProps): JSX_2.Element;
329
+ export declare function MoveRightIcon({ className, style }: TIconProps): JSX_2.Element;
317
330
 
318
- export declare function PlusCircleIcon({ className }: TIconProps): JSX_2.Element;
331
+ export declare function PlusCircleIcon({ className, style }: TIconProps): JSX_2.Element;
319
332
 
320
- export declare function RedoIcon({ className }: TIconProps): JSX_2.Element;
333
+ export declare function RedoIcon({ className, style }: TIconProps): JSX_2.Element;
321
334
 
322
- export declare function RenameIcon({ className }: TIconProps): JSX_2.Element;
335
+ export declare function RenameIcon({ className, style }: TIconProps): JSX_2.Element;
323
336
 
324
- export declare function SettingsIcon({ className }: TIconProps): JSX_2.Element;
337
+ export declare function SettingsIcon({ className, style }: TIconProps): JSX_2.Element;
325
338
 
326
339
  export declare const showToast: (options: any) => void;
327
340
 
328
341
  export declare function Stack(props: TStackProps): JSX_2.Element;
329
342
 
330
- export declare function SvgBaseWrapper({ children, className, }: {
343
+ export declare function SvgBaseWrapper({ children, className, style, }: {
331
344
  children: React.ReactNode;
332
345
  className?: string;
346
+ style?: React.CSSProperties;
333
347
  }): JSX_2.Element;
334
348
 
335
- export declare function TabletSmartphoneIcon({ className }: TIconProps): JSX_2.Element;
349
+ export declare function TabletSmartphoneIcon({ className, style }: TIconProps): JSX_2.Element;
336
350
 
337
351
  /**
338
352
  * @name TAddWidgetResponse
@@ -349,7 +363,7 @@ declare type TAddWidgetResponse = {
349
363
  allUpdatedDashboardConfigs: IDashboardConfig[];
350
364
  };
351
365
 
352
- export declare function TargetIcon({ className }: TIconProps): JSX_2.Element;
366
+ export declare function TargetIcon({ className, style }: TIconProps): JSX_2.Element;
353
367
 
354
368
  export declare type TButtonJustifyCss = 'justify-start' | 'justify-center' | 'justify-end';
355
369
 
@@ -362,6 +376,10 @@ declare type TDashboardSlice = {
362
376
  currentDashboardConfig: IDashboardConfig;
363
377
  targetContainerKey?: TDashboardWidgetKey | undefined;
364
378
  getNextContainerKey: (containerWidgetKey: TDashboardWidgetKey) => TDashboardWidgetKey;
379
+ getCurrentDashboardConfig: () => IDashboardConfig;
380
+ getCurrentDashboardId: () => string;
381
+ getIsResponsive: () => boolean;
382
+ getTargetContainerKey: () => TDashboardWidgetKey | undefined;
365
383
  setIsLoading: (value: boolean) => boolean;
366
384
  setIsEditing: (value: boolean) => boolean;
367
385
  setTargetContainerKey: (value: TDashboardWidgetKey | undefined) => TDashboardWidgetKey | undefined;
@@ -430,12 +448,14 @@ declare type TDynamicWidgetLoaderProps<TExtraProps = any> = {
430
448
  parentWidgetKey?: TDashboardWidgetKey;
431
449
  targetContainerKey?: TDashboardWidgetKey;
432
450
  childWidgetsConfig?: IChildWidgetConfigEntry[];
451
+ savedProps?: IWidgetSavedProps[];
433
452
  widgetCatalog: TDashboardWidgetCatalog;
434
453
  isEditing: boolean;
435
454
  extraProps?: TExtraProps;
436
455
  onRemoveClick?: (widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
437
456
  onMoveClick?: (direction: -1 | 1, widgetKey: TDashboardWidgetKey, parentWidgetKey?: TDashboardWidgetKey) => void;
438
457
  selectContainer?: (containerKey: TDashboardWidgetKey) => void;
458
+ savedPropsChanged: (value: IWidgetSavedProps) => any;
439
459
  };
440
460
 
441
461
  /**
@@ -467,9 +487,10 @@ declare type TGetSavedDashboards = (userID: number | string, clientAppKey: strin
467
487
 
468
488
  declare type TIconProps = {
469
489
  className?: string;
490
+ style?: React.CSSProperties;
470
491
  };
471
492
 
472
- export declare function TimerResetIcon({ className }: TIconProps): JSX_2.Element;
493
+ export declare function TimerResetIcon({ className, style }: TIconProps): JSX_2.Element;
473
494
 
474
495
  declare type TListItemChildProps = {
475
496
  testId?: string;
@@ -625,8 +646,10 @@ export declare type TWidgetMetaInfoBase<TFrameworkElementType = any> = {
625
646
  description: string;
626
647
  categories: TWidgetCategory[];
627
648
  noDuplicatedWidgets?: boolean;
628
- icon?: TFrameworkElementType | undefined;
649
+ icon?: TFrameworkElementType | string | undefined;
629
650
  externalDependencies: string[];
651
+ tags?: string[];
652
+ noCollapse?: boolean;
630
653
  };
631
654
 
632
655
  export declare type TWidgetsCatalogFlyoutProps = {
@@ -651,7 +674,7 @@ export declare type TWidgetsCatalogFlyoutProps = {
651
674
  */
652
675
  export declare type TWidgetSize = 'default' | 'large' | 'xlarge';
653
676
 
654
- export declare function UndoIcon({ className }: TIconProps): JSX_2.Element;
677
+ export declare function UndoIcon({ className, style }: TIconProps): JSX_2.Element;
655
678
 
656
679
  export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<TDashboardSlice>, "subscribe"> & {
657
680
  subscribe: {
@@ -687,10 +710,10 @@ export declare function WrapperColumnContent({ children, addCssClasses }: TProps
687
710
 
688
711
  export declare function WrapperColumnContentListItem({ children, addCssClasses }: TProps_2): JSX_2.Element;
689
712
 
690
- export declare function XCircleIcon({ className }: TIconProps): JSX_2.Element;
713
+ export declare function XCircleIcon({ className, style }: TIconProps): JSX_2.Element;
691
714
 
692
- export declare function ZoomInIcon({ className }: TIconProps): JSX_2.Element;
715
+ export declare function ZoomInIcon({ className, style }: TIconProps): JSX_2.Element;
693
716
 
694
- export declare function ZoomOutIcon({ className }: TIconProps): JSX_2.Element;
717
+ export declare function ZoomOutIcon({ className, style }: TIconProps): JSX_2.Element;
695
718
 
696
719
  export { }