onekijs-ui 0.19.10 → 0.19.12

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.
Files changed (44) hide show
  1. package/dist/components/dashboard/DashboardService.d.ts +10 -6
  2. package/dist/components/dashboard/typings.d.ts +4 -8
  3. package/dist/components/properties/typings.d.ts +3 -1
  4. package/dist/components/table/typings.d.ts +2 -1
  5. package/dist/components/tree/components/TreeBodyComponent.d.ts +1 -1
  6. package/dist/components/tree/components/VirtualTreeBodyComponent.d.ts +1 -1
  7. package/dist/index.js +77 -39
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.module.js +77 -39
  10. package/dist/index.module.js.map +1 -1
  11. package/dist/styles/border.d.ts +1 -1
  12. package/dist/styles/flex.d.ts +1 -1
  13. package/dist/styles/size.d.ts +6 -6
  14. package/dist/styles/typography.d.ts +2 -2
  15. package/package.json +3 -3
  16. package/src/components/button/components/DropdownButtonComponent.tsx +1 -1
  17. package/src/components/dashboard/DashboardService.ts +39 -26
  18. package/src/components/dashboard/components/DashboardBody.tsx +6 -2
  19. package/src/components/dashboard/components/DashboardComponent.tsx +17 -16
  20. package/src/components/dashboard/components/DashboardContainer.tsx +4 -1
  21. package/src/components/dashboard/hoc/dashboardHorizontalPanel.tsx +6 -2
  22. package/src/components/dashboard/hoc/dashboardVerticalPanel.tsx +6 -2
  23. package/src/components/dashboard/typings.ts +4 -6
  24. package/src/components/list/components/CollectionListComponent.tsx +1 -1
  25. package/src/components/list/components/ListBodyComponent.tsx +1 -1
  26. package/src/components/list/components/VirtualListComponent.tsx +1 -1
  27. package/src/components/properties/components/PropertiesComponent.tsx +2 -1
  28. package/src/components/properties/components/Property.tsx +4 -2
  29. package/src/components/properties/style.ts +1 -1
  30. package/src/components/properties/typings.ts +3 -1
  31. package/src/components/resizer/components/ResizerComponent.tsx +1 -1
  32. package/src/components/select/components/ControlledSelectComponent.tsx +4 -2
  33. package/src/components/select/components/SelectInputComponent.tsx +3 -3
  34. package/src/components/select/components/SelectOptionComponent.tsx +1 -1
  35. package/src/components/table/components/ControllerTableComponent.tsx +2 -2
  36. package/src/components/table/components/TableBodyCellComponent.tsx +5 -3
  37. package/src/components/table/components/TableFooterCellComponent.tsx +1 -1
  38. package/src/components/table/components/TableHeaderFilterComponent.tsx +1 -1
  39. package/src/components/table/components/TableHeaderTitleComponent.tsx +1 -1
  40. package/src/components/table/components/filters/TableFilterOperatorComponent.tsx +2 -2
  41. package/src/components/table/typings.ts +2 -1
  42. package/src/components/tree/components/TreeBodyComponent.tsx +2 -2
  43. package/src/components/tree/components/TreeListComponent.tsx +4 -4
  44. package/src/components/tree/components/VirtualTreeBodyComponent.tsx +2 -2
@@ -1,21 +1,25 @@
1
- import { DefaultService } from 'onekijs-framework';
2
- import React from 'react';
1
+ import { AnonymousObject, DefaultService } from 'onekijs-framework';
2
+ import React, { MutableRefObject } from 'react';
3
3
  import { ResizeStep } from '../resizer/typings';
4
4
  import { DashboardArea, DashboardBodyPanel, DashboardBodyPanelProps, DashboardHorizontalArea, DashboardHorizontalPanel, DashboardHorizontalPanelProps, DashboardSize, DashboardState, DashboardVerticalArea, DashboardVerticalPanel, DashboardVerticalPanelProps } from './typings';
5
5
  export declare class DashboardService extends DefaultService<DashboardState> {
6
6
  protected areas: DashboardArea[][];
7
+ refs: AnonymousObject<MutableRefObject<HTMLDivElement | null> | null | undefined>;
7
8
  collapse(area: DashboardArea | 'all', collapse?: boolean): void;
8
9
  collapseFloating(): void;
10
+ destroyPanel(area: 'left' | 'right' | 'header' | 'footer' | 'body' | 'container'): void;
9
11
  float(area: DashboardArea | 'all', float?: boolean): void;
10
12
  getBodyPanel(): DashboardBodyPanel | undefined;
11
13
  getHorizontalPanel(area: 'footer' | 'header'): DashboardHorizontalPanel | undefined;
14
+ getRef(area: 'left' | 'right' | 'header' | 'footer' | 'body' | 'container'): React.MutableRefObject<HTMLDivElement | null> | null | undefined;
12
15
  getVerticalPanel(area: 'left' | 'right'): DashboardVerticalPanel | undefined;
13
- initBodyPanel(_props: DashboardBodyPanelProps, ref: React.RefObject<HTMLDivElement>): void;
14
- initContainer(ref: React.RefObject<HTMLDivElement>): void;
15
- initHorizontalPanel(area: 'footer' | 'header', props: DashboardHorizontalPanelProps, ref: React.RefObject<HTMLDivElement>): void;
16
- initVerticalPanel(area: 'left' | 'right', props: DashboardVerticalPanelProps, ref: React.RefObject<HTMLDivElement>): void;
16
+ initBodyPanel(_props: DashboardBodyPanelProps): void;
17
+ initContainer(ref: React.MutableRefObject<HTMLDivElement | null>): void;
18
+ initHorizontalPanel(area: 'footer' | 'header', props: DashboardHorizontalPanelProps): void;
19
+ initVerticalPanel(area: 'left' | 'right', props: DashboardVerticalPanelProps): void;
17
20
  resizeHeight(area: DashboardHorizontalArea, nextHeight: number, step: ResizeStep): void;
18
21
  resizeWidth(area: DashboardVerticalArea, nextWidth: number, step: ResizeStep): void;
22
+ setRef(area: 'left' | 'right' | 'header' | 'footer' | 'body' | 'container', ref: React.MutableRefObject<HTMLDivElement | null> | null | undefined): void;
19
23
  showOverlay(): boolean;
20
24
  toggle(area: DashboardArea | 'all'): void;
21
25
  _compileAreas(): void;
@@ -11,14 +11,11 @@ export type DashboardBodyComponentProps = {
11
11
  };
12
12
  export type DashboardBodyPanel = {
13
13
  className?: string;
14
- ref: React.RefObject<HTMLDivElement>;
15
14
  };
16
15
  export type DashboardBodyPanelProps = {
17
16
  className?: string;
18
17
  };
19
- export type DashboardContainer = {
20
- ref: React.RefObject<HTMLDivElement>;
21
- };
18
+ export type DashboardContainer = {};
22
19
  export type DashboardContainerProps = {
23
20
  areas?: DashboardArea[][];
24
21
  className?: string;
@@ -27,7 +24,8 @@ export type DashboardContainerProps = {
27
24
  left?: DashboardVerticalPanel;
28
25
  right?: DashboardVerticalPanel;
29
26
  body?: DashboardBodyPanel;
30
- onInit: (ref: React.RefObject<HTMLDivElement>) => void;
27
+ onInit: (ref: React.MutableRefObject<HTMLDivElement | null>) => void;
28
+ onDestroy: () => void;
31
29
  };
32
30
  export type DashboardHorizontalArea = 'header' | 'footer';
33
31
  export type DashboardHorizontalPanel = DashboardSidePanel & Required<DashboardHorizontalProps> & {
@@ -51,9 +49,7 @@ export type DashboardProps = StylableProps & {
51
49
  export type DashboardOverlayProps = React.InputHTMLAttributes<HTMLDivElement> & {
52
50
  show: boolean;
53
51
  };
54
- export type DashboardSidePanel = Omit<Required<DashboardSidePanelProps>, 'collapse' | 'floating'> & {
55
- ref: React.RefObject<HTMLDivElement>;
56
- };
52
+ export type DashboardSidePanel = Omit<Required<DashboardSidePanelProps>, 'collapse' | 'floating'>;
57
53
  export type DashboardSidePanelProps = {
58
54
  className?: string;
59
55
  collapse?: boolean;
@@ -1,9 +1,10 @@
1
1
  import { AnonymousObject } from 'onekijs-framework';
2
- import React, { ReactNode } from 'react';
2
+ import React, { ComponentType, PropsWithChildren, ReactNode } from 'react';
3
3
  import { GridSize } from '../grid/typings';
4
4
  export type PropertiesProps = {
5
5
  properties: PropertiesList;
6
6
  PropertyComponent?: React.FC<PropertyProps>;
7
+ ErrorBoundaryComponent?: ComponentType<PropsWithChildren<PropertyProps>>;
7
8
  order?: boolean;
8
9
  className?: string;
9
10
  size?: GridSize;
@@ -15,6 +16,7 @@ export type PropertiesProps = {
15
16
  export type PropertyProps = {
16
17
  value: ReactNode;
17
18
  name: string;
19
+ ErrorBoundaryComponent?: ComponentType<PropsWithChildren<PropertyProps>>;
18
20
  };
19
21
  export type PropertiesContext = {
20
22
  size?: GridSize;
@@ -1,5 +1,5 @@
1
1
  import { Collection, CollectionBy, CollectionProxy, FormDisplayerProps, FormFieldProps, Item, ItemAdaptee, Primitive, QueryFilterCriteriaOperator, QueryFilterOrCriteria, QuerySortBy, UseCollectionOptions, ValidationStatus } from 'onekijs-framework';
2
- import React, { FC, ReactNode } from 'react';
2
+ import React, { ComponentType, FC, PropsWithChildren, ReactNode } from 'react';
3
3
  import { StylableProps, TshirtSize } from '../../styles/typings';
4
4
  import { ButtonProps } from '../button/typings';
5
5
  import { CheckboxProps } from '../checkbox/typings';
@@ -164,6 +164,7 @@ export type TableColumnSpec<T, I extends TableItem<T> = TableItem<T>> = {
164
164
  className?: string | ((item: I, column: TableColumn<T, I>, rowIndex: number) => string);
165
165
  CellComponent?: Cell<T, I>;
166
166
  Displayer?: React.FC<TableCellDisplayerProps<T>>;
167
+ ErrorBoundaryComponent?: ComponentType<PropsWithChildren<TableBodyCellProps<T, I>>>;
167
168
  footerClassName?: string | ((column: TableColumn<T, I>) => string);
168
169
  FooterComponent?: React.FC<TableFooterCellProps<T, I>>;
169
170
  filterable?: boolean;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ControllerTreeProps, TreeItem } from '../typings';
3
3
  declare const TreeBodyComponent: {
4
- <T = any, I extends TreeItem<T> = TreeItem<T>>({ className, controller, }: ControllerTreeProps<T, I>): React.JSX.Element;
4
+ <T extends unknown = any, I extends TreeItem<T> = TreeItem<T>>({ className, controller, }: ControllerTreeProps<T, I>): React.JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  export default TreeBodyComponent;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ControllerTreeProps, TreeItem } from '../typings';
3
3
  declare const VirtualTreeBodyComponent: {
4
- <T = any, I extends TreeItem<T> = TreeItem<T>>({ className, controller, height, }: ControllerTreeProps<T, I>): React.JSX.Element;
4
+ <T extends unknown = any, I extends TreeItem<T> = TreeItem<T>>({ className, controller, height, }: ControllerTreeProps<T, I>): React.JSX.Element;
5
5
  displayName: string;
6
6
  };
7
7
  export default VirtualTreeBodyComponent;
package/dist/index.js CHANGED
@@ -2451,6 +2451,9 @@ const DashboardContainerComponent = (props) => {
2451
2451
  React.useEffect(() => {
2452
2452
  props.onInit(ref);
2453
2453
  // eslint-disable-next-line react-hooks/exhaustive-deps
2454
+ return () => {
2455
+ props.onDestroy();
2456
+ };
2454
2457
  }, []);
2455
2458
  return (React.createElement("div", { className: addClassname('o-dashboard', props.className), ref: ref }, props.children));
2456
2459
  };
@@ -2488,7 +2491,7 @@ const DashboardOverlay = styled(DashboardOverlayComponent) `
2488
2491
  const DashboardComponent = ({ ContainerComponent = DashboardContainer, OverlayComponent = DashboardOverlay, children, service, }) => {
2489
2492
  return (React.createElement(DashboardServiceContext.Provider, { value: service },
2490
2493
  React.createElement(DashboardStateContext.Provider, { value: service.state },
2491
- React.createElement(ContainerComponent, { areas: service.state.areas, header: service.state.header, footer: service.state.footer, left: service.state.left, right: service.state.right, body: service.state.body, onInit: (ref) => service.initContainer(ref) },
2494
+ React.createElement(ContainerComponent, { areas: service.state.areas, header: service.state.header, footer: service.state.footer, left: service.state.left, right: service.state.right, body: service.state.body, onInit: () => undefined, onDestroy: () => service.destroyPanel('container') },
2492
2495
  React.createElement(OverlayComponent, { show: service.showOverlay(), onClick: () => service.collapseFloating() }),
2493
2496
  children))));
2494
2497
  };
@@ -2575,6 +2578,7 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2575
2578
  ['none', 'none', 'none'],
2576
2579
  ['none', 'none', 'none'],
2577
2580
  ];
2581
+ refs = {};
2578
2582
  collapse(area, collapse = true) {
2579
2583
  if (area === 'all') {
2580
2584
  ['left', 'right', 'header', 'footer'].forEach((area) => {
@@ -2593,6 +2597,9 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2593
2597
  }
2594
2598
  });
2595
2599
  }
2600
+ destroyPanel(area) {
2601
+ this.refs[area] = null;
2602
+ }
2596
2603
  float(area, float = true) {
2597
2604
  if (area === 'all') {
2598
2605
  ['left', 'right', 'header', 'footer'].forEach((area) => {
@@ -2609,18 +2616,21 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2609
2616
  getHorizontalPanel(area) {
2610
2617
  return this.state[area];
2611
2618
  }
2619
+ getRef(area) {
2620
+ return this.refs[area];
2621
+ }
2612
2622
  getVerticalPanel(area) {
2613
2623
  return this.state[area];
2614
2624
  }
2615
- initBodyPanel(_props, ref) {
2625
+ initBodyPanel(_props) {
2616
2626
  this.areas[1][1] = 'body';
2617
- this.state.body = { ref };
2627
+ this.state.body = {};
2618
2628
  this._compileAreas();
2619
2629
  }
2620
2630
  initContainer(ref) {
2621
2631
  this.state.container = { ref };
2622
2632
  }
2623
- initHorizontalPanel(area, props, ref) {
2633
+ initHorizontalPanel(area, props) {
2624
2634
  const dashboardPanel = {
2625
2635
  area,
2626
2636
  className: props.className || '',
@@ -2634,14 +2644,13 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2634
2644
  minHeight: props.minHeight ?? 0,
2635
2645
  height: props.height ?? '70px',
2636
2646
  maxHeight: props.maxHeight ?? 0,
2637
- ref,
2638
2647
  resizable: props.resizable || false,
2639
2648
  resizerGap: props.resizerGap || 0,
2640
2649
  };
2641
2650
  this.state[area] = dashboardPanel;
2642
2651
  this._fillRow(area === 'header' ? 0 : 2, area);
2643
2652
  }
2644
- initVerticalPanel(area, props, ref) {
2653
+ initVerticalPanel(area, props) {
2645
2654
  const dashboardPanel = {
2646
2655
  area,
2647
2656
  className: props.className || '',
@@ -2655,7 +2664,6 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2655
2664
  minWidth: props.minWidth ?? 0,
2656
2665
  maxWidth: props.maxWidth ?? 0,
2657
2666
  width: props.width ?? '200px',
2658
- ref,
2659
2667
  resizable: props.resizable || false,
2660
2668
  resizerGap: props.resizerGap || 0,
2661
2669
  };
@@ -2664,6 +2672,7 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2664
2672
  }
2665
2673
  resizeHeight(area, nextHeight, step) {
2666
2674
  const panel = this.state[area];
2675
+ const panelRef = this.refs[area];
2667
2676
  if (panel) {
2668
2677
  const maxHeight = parseInt(`${panel.maxHeight}`);
2669
2678
  const minHeight = parseInt(`${panel.minHeight}`);
@@ -2678,20 +2687,20 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2678
2687
  const header = this.state.header;
2679
2688
  const footer = this.state.footer;
2680
2689
  const elements = {};
2681
- elements['panel'] = panel !== undefined && panel.ref.current !== null ? panel.ref.current : undefined;
2682
- elements['body'] = body !== undefined && body.ref.current !== null ? body.ref.current : undefined;
2690
+ elements['panel'] = panel !== undefined && panelRef && panelRef.current !== null ? panelRef.current : undefined;
2691
+ elements['body'] = body !== undefined && this.refs.body && this.refs.body.current !== null ? this.refs.body.current : undefined;
2683
2692
  // only touch the left panel if it's at the footer of the header panel or at the header of the footer panel
2684
2693
  elements['left'] =
2685
- isAreaInColumn('first', area, this.state.areas) && left !== undefined && left.ref.current !== null
2686
- ? left.ref.current
2694
+ isAreaInColumn('first', area, this.state.areas) && left !== undefined && this.refs.left && this.refs.left.current !== null
2695
+ ? this.refs.left.current
2687
2696
  : undefined;
2688
2697
  // only touch the right panel if it's at the footer of the header panel or at the header of the footer panel
2689
2698
  elements['right'] =
2690
- isAreaInColumn('last', area, this.state.areas) && right !== undefined && right.ref.current !== null
2691
- ? right.ref.current
2699
+ isAreaInColumn('last', area, this.state.areas) && right !== undefined && this.refs.right && this.refs.right.current !== null
2700
+ ? this.refs.right.current
2692
2701
  : undefined;
2693
- elements['header'] = header !== undefined && header.ref.current !== null ? header.ref.current : undefined;
2694
- elements['footer'] = footer !== undefined && footer.ref.current !== null ? footer.ref.current : undefined;
2702
+ elements['header'] = header !== undefined && this.refs.header && this.refs.header.current !== null ? this.refs.header.current : undefined;
2703
+ elements['footer'] = footer !== undefined && this.refs.footer && this.refs.footer.current !== null ? this.refs.footer.current : undefined;
2695
2704
  switch (step) {
2696
2705
  case 'start':
2697
2706
  // deactivate transition animation during the resize
@@ -2753,6 +2762,7 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2753
2762
  }
2754
2763
  resizeWidth(area, nextWidth, step) {
2755
2764
  const panel = this.state[area];
2765
+ const panelRef = this.refs[area];
2756
2766
  if (panel) {
2757
2767
  const maxWidth = parseInt(`${panel.maxWidth}`);
2758
2768
  const minWidth = parseInt(`${panel.minWidth}`);
@@ -2767,20 +2777,20 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2767
2777
  const left = this.state.left;
2768
2778
  const right = this.state.right;
2769
2779
  const elements = {};
2770
- elements['panel'] = panel !== undefined && panel.ref.current !== null ? panel.ref.current : undefined;
2771
- elements['body'] = body !== undefined && body.ref.current !== null ? body.ref.current : undefined;
2780
+ elements['panel'] = panel !== undefined && panelRef && panelRef.current !== null ? panelRef.current : undefined;
2781
+ elements['body'] = body !== undefined && this.refs.body && this.refs.body.current !== null ? this.refs.body.current : undefined;
2772
2782
  // only touch the header panel if it's at the right of the left panel or at the left of the right panel
2773
2783
  elements['header'] =
2774
- isAreaInRow('first', area, this.state.areas) && header !== undefined && header.ref.current !== null
2775
- ? header.ref.current
2784
+ isAreaInRow('first', area, this.state.areas) && header !== undefined && this.refs.header && this.refs.header.current !== null
2785
+ ? this.refs.header.current
2776
2786
  : undefined;
2777
2787
  // only touch the footer panel if it's at the right of the left panel or at the left of the right panel
2778
2788
  elements['footer'] =
2779
- isAreaInRow('last', area, this.state.areas) && footer !== undefined && footer.ref.current !== null
2780
- ? footer.ref.current
2789
+ isAreaInRow('last', area, this.state.areas) && footer !== undefined && this.refs.footer && this.refs.footer.current !== null
2790
+ ? this.refs.footer.current
2781
2791
  : undefined;
2782
- elements['left'] = left !== undefined && left.ref.current !== null ? left.ref.current : undefined;
2783
- elements['right'] = right !== undefined && right.ref.current !== null ? right.ref.current : undefined;
2792
+ elements['left'] = left !== undefined && this.refs.left && this.refs.left.current !== null ? this.refs.left.current : undefined;
2793
+ elements['right'] = right !== undefined && this.refs.right && this.refs.right.current !== null ? this.refs.right.current : undefined;
2784
2794
  switch (step) {
2785
2795
  case 'start':
2786
2796
  clearSelection();
@@ -2840,6 +2850,9 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2840
2850
  break;
2841
2851
  }
2842
2852
  }
2853
+ setRef(area, ref) {
2854
+ this.refs[area] = ref;
2855
+ }
2843
2856
  showOverlay() {
2844
2857
  let result = false;
2845
2858
  const areas = ['right', 'left', 'header', 'footer'];
@@ -2896,10 +2909,10 @@ exports.DashboardService = class DashboardService extends onekijsFramework.Defau
2896
2909
  return getFloatingKey(this._getSize());
2897
2910
  }
2898
2911
  _getSize() {
2899
- if (!this.state.container || !this.state.container.ref.current) {
2912
+ if (!this.state.container || !this.refs.container?.current) {
2900
2913
  return onekijsFramework.isMobile() ? 'small' : 'large';
2901
2914
  }
2902
- const dashboardWidth = this.state.container.ref.current.offsetWidth;
2915
+ const dashboardWidth = this.refs.container.current.offsetWidth;
2903
2916
  if (dashboardWidth < 768)
2904
2917
  return 'small';
2905
2918
  if (dashboardWidth < 992)
@@ -2931,6 +2944,12 @@ __decorate([
2931
2944
  __metadata("design:paramtypes", []),
2932
2945
  __metadata("design:returntype", void 0)
2933
2946
  ], exports.DashboardService.prototype, "collapseFloating", null);
2947
+ __decorate([
2948
+ onekijsFramework.reducer,
2949
+ __metadata("design:type", Function),
2950
+ __metadata("design:paramtypes", [String]),
2951
+ __metadata("design:returntype", void 0)
2952
+ ], exports.DashboardService.prototype, "destroyPanel", null);
2934
2953
  __decorate([
2935
2954
  onekijsFramework.reducer,
2936
2955
  __metadata("design:type", Function),
@@ -2940,7 +2959,7 @@ __decorate([
2940
2959
  __decorate([
2941
2960
  onekijsFramework.reducer,
2942
2961
  __metadata("design:type", Function),
2943
- __metadata("design:paramtypes", [Object, Object]),
2962
+ __metadata("design:paramtypes", [Object]),
2944
2963
  __metadata("design:returntype", void 0)
2945
2964
  ], exports.DashboardService.prototype, "initBodyPanel", null);
2946
2965
  __decorate([
@@ -2952,13 +2971,13 @@ __decorate([
2952
2971
  __decorate([
2953
2972
  onekijsFramework.reducer,
2954
2973
  __metadata("design:type", Function),
2955
- __metadata("design:paramtypes", [String, Object, Object]),
2974
+ __metadata("design:paramtypes", [String, Object]),
2956
2975
  __metadata("design:returntype", void 0)
2957
2976
  ], exports.DashboardService.prototype, "initHorizontalPanel", null);
2958
2977
  __decorate([
2959
2978
  onekijsFramework.reducer,
2960
2979
  __metadata("design:type", Function),
2961
- __metadata("design:paramtypes", [String, Object, Object]),
2980
+ __metadata("design:paramtypes", [String, Object]),
2962
2981
  __metadata("design:returntype", void 0)
2963
2982
  ], exports.DashboardService.prototype, "initVerticalPanel", null);
2964
2983
  __decorate([
@@ -3015,14 +3034,18 @@ const DashboardBodyComponent = (props) => {
3015
3034
  style.transition = 'none';
3016
3035
  }
3017
3036
  React.useEffect(() => {
3037
+ service.setRef('body', ref);
3018
3038
  if (stepRef.current === undefined) {
3019
3039
  stepRef.current = 'initializing';
3020
- service.initBodyPanel(props, ref);
3040
+ service.initBodyPanel(props);
3021
3041
  }
3022
3042
  else if (stepRef.current === 'initializing' && ref.current) {
3023
3043
  stepRef.current = 'initialized';
3024
3044
  ref.current.style.transition = '';
3025
3045
  }
3046
+ return () => {
3047
+ service.destroyPanel('body');
3048
+ };
3026
3049
  });
3027
3050
  return (React.createElement("div", { className: props.className, ref: ref, style: style }, stepRef.current && props.children));
3028
3051
  };
@@ -3601,14 +3624,18 @@ const Component$1 = (props) => {
3601
3624
  style.transition = 'none';
3602
3625
  }
3603
3626
  React.useEffect(() => {
3627
+ service.setRef(props.area, ref);
3604
3628
  if (stepRef.current === undefined) {
3605
3629
  stepRef.current = 'initializing';
3606
- service.initHorizontalPanel(props.area, props, ref);
3630
+ service.initHorizontalPanel(props.area, props);
3607
3631
  }
3608
3632
  else if (stepRef.current === 'initializing' && ref.current) {
3609
3633
  stepRef.current = 'initialized';
3610
3634
  ref.current.style.transition = '';
3611
3635
  }
3636
+ return () => {
3637
+ service.destroyPanel(props.area);
3638
+ };
3612
3639
  });
3613
3640
  return (React.createElement("div", { className: addClassname(props.area === 'header' ? 'o-dashboard-header' : 'o-dashboard-footer', props.className), ref: ref, style: style }, stepRef.current && props.children));
3614
3641
  };
@@ -3707,14 +3734,18 @@ const Component = (props) => {
3707
3734
  style.transition = 'none';
3708
3735
  }
3709
3736
  React.useEffect(() => {
3737
+ service.setRef(props.area, ref);
3710
3738
  if (stepRef.current === undefined) {
3711
3739
  stepRef.current = 'initializing';
3712
- service.initVerticalPanel(props.area, props, ref);
3740
+ service.initVerticalPanel(props.area, props);
3713
3741
  }
3714
3742
  else if (stepRef.current === 'initializing' && ref.current) {
3715
3743
  stepRef.current = 'initialized';
3716
3744
  ref.current.style.transition = '';
3717
3745
  }
3746
+ return () => {
3747
+ service.destroyPanel(props.area);
3748
+ };
3718
3749
  });
3719
3750
  return (React.createElement("div", { className: addClassname(props.area === 'left' ? 'o-dashboard-left' : 'o-dashboard-right', props.className), ref: ref, style: style }, stepRef.current && props.children));
3720
3751
  };
@@ -5995,7 +6026,8 @@ const usePropertiesContext = () => {
5995
6026
  return React.useContext(DefaultPropertiesContext);
5996
6027
  };
5997
6028
 
5998
- const Property = React.memo(({ name, value }) => {
6029
+ const Property = React.memo((props) => {
6030
+ const { name, value, ErrorBoundaryComponent } = props;
5999
6031
  const context = usePropertiesContext();
6000
6032
  const nameSize = context.size ?? 3;
6001
6033
  const valueSize = (nameSize === 12 ? 12 : 12 - nameSize);
@@ -6007,11 +6039,13 @@ const Property = React.memo(({ name, value }) => {
6007
6039
  });
6008
6040
  return (React.createElement(Row, { className: "o-property", gapX: "10px", gapY: "0px" },
6009
6041
  React.createElement(Col, { size: nameSize, sm: context.sm, md: context.md, lg: context.lg, xl: context.xl, className: "o-property-name" }, name),
6010
- React.createElement(Col, { size: valueSize, sm: variantValueSize.sm, md: variantValueSize.md, lg: variantValueSize.lg, xl: variantValueSize.xl, className: "o-property-value" }, value)));
6042
+ React.createElement(Col, { size: valueSize, sm: variantValueSize.sm, md: variantValueSize.md, lg: variantValueSize.lg, xl: variantValueSize.xl, className: "o-property-value" },
6043
+ ErrorBoundaryComponent && React.createElement(ErrorBoundaryComponent, { ...props }, value),
6044
+ !ErrorBoundaryComponent && React.createElement(React.Fragment, null, value))));
6011
6045
  });
6012
6046
  Property.displayName = 'Property';
6013
6047
 
6014
- const PropertiesComponent = ({ className, properties, PropertyComponent = Property, order = false, size, sm, md, lg, xl, }) => {
6048
+ const PropertiesComponent = ({ className, properties, PropertyComponent = Property, ErrorBoundaryComponent, order = false, size, sm, md, lg, xl, }) => {
6015
6049
  const classNames = addClassname('o-properties', className);
6016
6050
  const keys = Object.keys(properties);
6017
6051
  if (order) {
@@ -6027,7 +6061,7 @@ const PropertiesComponent = ({ className, properties, PropertyComponent = Proper
6027
6061
  };
6028
6062
  }, [size, sm, md, lg, xl]);
6029
6063
  return (React.createElement(DefaultPropertiesContext.Provider, { value: context },
6030
- React.createElement("div", { className: classNames }, keys.map((key) => (React.createElement(PropertyComponent, { key: key, name: key, value: properties[key] }))))));
6064
+ React.createElement("div", { className: classNames }, keys.map((key) => (React.createElement(PropertyComponent, { key: key, name: key, value: properties[key], ErrorBoundaryComponent: ErrorBoundaryComponent }))))));
6031
6065
  };
6032
6066
 
6033
6067
  const propertiesStyle = ({ theme }) => {
@@ -6035,7 +6069,7 @@ const propertiesStyle = ({ theme }) => {
6035
6069
  return styled.css `
6036
6070
  .o-property {
6037
6071
  ${paddingY(t.paddingY)}
6038
- ${flexWrap('nowrap')}
6072
+ ${flexWrap('wrap')}
6039
6073
  }
6040
6074
  .o-property-name {
6041
6075
  ${fontWeight(t.fontWeight)}
@@ -6546,7 +6580,7 @@ const SelectInputComponent = ({ setOpen, open, placeholder, loading, fetching, I
6546
6580
  multiple && React.createElement(SelectTokensComponent$1, { tokens: tokens, onRemove: onRemove, maxDisplayTokens: maxDisplayTokens }),
6547
6581
  React.createElement("div", { className: "o-select-input-wrapper" },
6548
6582
  React.createElement("span", { ref: autoSizeRef, className: "o-select-input-auto-sizer" }),
6549
- React.createElement("input", { ref: inputRef, placeholder: placeholder, className: "o-select-input", onFocus: onFocus, onBlur: onBlur, onChange: handleChange, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, value: searchable ? proxyValue : '', onClick: onClick, autoCapitalize: "none", autoComplete: "one-time-code", autoCorrect: "off", spellCheck: "false", disabled: disabled }),
6583
+ React.createElement("input", { ref: inputRef, placeholder: placeholder, className: "o-select-input", onFocus: onFocus, onBlur: onBlur, onChange: handleChange, onKeyDown: handleKeyDown, onKeyUp: handleKeyUp, value: searchable ? proxyValue : '', onClick: onClick, autoCapitalize: "none", autoComplete: "off", autoCorrect: "off", spellCheck: "false", disabled: disabled }),
6550
6584
  !searchable && (React.createElement("span", { className: "o-select-input o-select-input-text", onClick: onClick }, multiple ? '' : proxyValue || '')))),
6551
6585
  !multiple && nullable && value && !disabled && (React.createElement("div", { className: "o-select-remover", onClick: onNullify }, "\u2716")),
6552
6586
  React.createElement(IconComponent, { onClick: onIconClick, open: open, loading: loading, fetching: fetching })));
@@ -7079,7 +7113,7 @@ const ControlledSelectComponent = ({ attachDropdownToBody = false, className = '
7079
7113
  React.createElement("div", { className: classNames, ref: containerRef, onMouseDown: () => (stateRef.current.keepFocus = true), onMouseUp: () => (stateRef.current.keepFocus = false) },
7080
7114
  React.createElement(InputComponent, { placeholder: placeholder, setOpen: setOpen, open: open, loading: loading, fetching: fetching, onChange: onInputChange, value: autoCompleteSearch ? (proxyItem ? proxyItem.text : '') : controller.getSearch() || '', focus: focus, onFocus: onFocus, onBlur: onBlur, tokens: tokens, multiple: multiple, onRemove: onRemoveToken, autoFocus: autoFocus, style: style, nullable: nullable, IconComponent: IconComponent, searchable: searchable, clickable: clickable, minChars: minChars, ref: triggerRef, disabled: disabled, autoCompleteSearch: autoCompleteSearch, maxDisplayTokens: maxDisplayTokens }),
7081
7115
  React.createElement(Dropdown, { attachToBody: attachDropdownToBody, open: open, distance: 0, animationTimeout: animationMs, onDropStart: onOpen, onCollapseDone: onClosed, placement: "bottom-start", widthModifier: dropdownWidthModifier, width: service.state.width ? `${service.state.width}px` : undefined, className: className, zIndex: attachDropdownToBody ? 2000 : undefined },
7082
- React.createElement(ListComponent, { className: "o-select-options", height: height, ItemComponent: multiple ? MultiOptionsComponent : OptionComponent, ItemLoadingComponent: OptionLoadingComponent, ItemContentComponent: OptionContentComponent, NotFoundComponent: NotFoundComponent, onItemSelect: onSelect, onItemUnselect: onSelect, controller: controller, keyboardNavigable: true, multiSelect: multiple, onItemActivate: onActivate, optionsRef: optionsRef })))));
7116
+ React.createElement(ListComponent, { className: "o-select-options", height: height, ItemComponent: multiple ? MultiOptionsComponent : OptionComponent, ItemLoadingComponent: OptionLoadingComponent, ItemContentComponent: OptionContentComponent, NotFoundComponent: NotFoundComponent, onItemSelect: onSelect, onItemUnselect: onSelect, controller: controller, keyboardNavigable: true, multiSelect: multiple, onItemActivate: onActivate, optionsRef: optionsRef, preload: preload, increment: increment })))));
7083
7117
  };
7084
7118
 
7085
7119
  const ArraySelectComponent = (props) => {
@@ -9314,12 +9348,16 @@ const TableBodyCellComponent = React.memo((props) => {
9314
9348
  const ref = React.useRef(null);
9315
9349
  const initializedRef = React.useRef(false);
9316
9350
  const Component = column.CellComponent || DefaultCellComponent$1;
9351
+ const ErrorBoundaryComponent = column.ErrorBoundaryComponent;
9317
9352
  React.useEffect(() => {
9318
9353
  if (!initializedRef.current && ref.current !== null) {
9319
9354
  service.initCell(rowIndex, column.id, ref);
9320
9355
  }
9321
9356
  });
9322
- return (React.createElement("div", { ref: ref, className: addClassname('o-table-body-cell', className), style: getCellWidth(column, fit, grow) }, props.item && React.createElement(Component, { ...props, data: props.item.data })));
9357
+ return (React.createElement("div", { ref: ref, className: addClassname('o-table-body-cell', className), style: getCellWidth(column, fit, grow) },
9358
+ props.item && ErrorBoundaryComponent && React.createElement(ErrorBoundaryComponent, { ...props, data: props.item?.data },
9359
+ React.createElement(Component, { ...props, data: props.item.data })),
9360
+ props.item && !ErrorBoundaryComponent && React.createElement(Component, { ...props, data: props.item.data })));
9323
9361
  });
9324
9362
  TableBodyCellComponent.displayName = 'TableCell';
9325
9363