@rebasepro/plugin-insights 0.3.0 → 0.4.0

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 (34) hide show
  1. package/dist/common/src/collections/default-collections.d.ts +5 -8
  2. package/dist/common/src/data/query_builder.d.ts +6 -2
  3. package/dist/core/src/components/LoginView/LoginView.d.ts +9 -1
  4. package/dist/core/src/components/common/types.d.ts +3 -3
  5. package/dist/core/src/hooks/data/useCollectionFetch.d.ts +12 -1
  6. package/dist/index.es.js +215 -164
  7. package/dist/index.es.js.map +1 -1
  8. package/dist/index.umd.js +215 -164
  9. package/dist/index.umd.js.map +1 -1
  10. package/dist/plugin-insights/src/components/InsightWidget.d.ts +2 -2
  11. package/dist/plugin-insights/src/components/InsightWidgetSkeleton.d.ts +3 -1
  12. package/dist/plugin-insights/src/components/InsightsScorecardView.d.ts +3 -1
  13. package/dist/types/src/controllers/auth.d.ts +2 -2
  14. package/dist/types/src/controllers/client.d.ts +25 -40
  15. package/dist/types/src/controllers/data.d.ts +21 -3
  16. package/dist/types/src/controllers/data_driver.d.ts +5 -0
  17. package/dist/types/src/controllers/email.d.ts +2 -0
  18. package/dist/types/src/types/auth_adapter.d.ts +3 -56
  19. package/dist/types/src/types/backend.d.ts +2 -2
  20. package/dist/types/src/types/backend_hooks.d.ts +2 -17
  21. package/dist/types/src/types/collections.d.ts +9 -5
  22. package/dist/types/src/types/entity_views.d.ts +19 -28
  23. package/dist/types/src/types/properties.d.ts +9 -7
  24. package/dist/types/src/types/user_management_delegate.d.ts +16 -53
  25. package/dist/types/src/users/index.d.ts +0 -1
  26. package/dist/types/src/users/user.d.ts +0 -1
  27. package/dist/ui/src/components/Card.d.ts +2 -3
  28. package/dist/ui/src/components/FilterChip.d.ts +2 -10
  29. package/dist/ui/src/components/VirtualTable/VirtualTableProps.d.ts +8 -2
  30. package/package.json +4 -4
  31. package/src/components/InsightWidget.tsx +33 -4
  32. package/src/components/InsightWidgetSkeleton.tsx +7 -1
  33. package/src/components/InsightsScorecardView.tsx +4 -1
  34. package/dist/types/src/users/roles.d.ts +0 -14
@@ -39,6 +39,7 @@ export function InsightsScorecardView({
39
39
  title,
40
40
  compact = false,
41
41
  embedded = false,
42
+ fixedHeight,
42
43
  }: {
43
44
  config: ScorecardConfig;
44
45
  data: DataRow;
@@ -46,6 +47,8 @@ export function InsightsScorecardView({
46
47
  compact?: boolean;
47
48
  /** When true, skip own border/bg since the parent card provides them. */
48
49
  embedded?: boolean;
50
+ /** Explicit height to prevent layout shift between skeleton → loaded. */
51
+ fixedHeight?: number;
49
52
  }) {
50
53
  const containerRef = useRef<HTMLDivElement>(null);
51
54
  const [containerWidth, setContainerWidth] = useState<number | null>(null);
@@ -124,7 +127,7 @@ export function InsightsScorecardView({
124
127
  : cls("rounded-lg flex flex-col min-w-0 bg-transparent border", defaultBorderMixin, isSmall ? "px-3.5 py-3" : "px-5 py-4");
125
128
 
126
129
  return (
127
- <div ref={containerRef} className={baseClass} style={embedded ? undefined : { minHeight: isSmall ? 68 : 92 }}>
130
+ <div ref={containerRef} className={baseClass} style={embedded ? undefined : fixedHeight ? { height: fixedHeight } : { minHeight: isSmall ? 68 : 92 }}>
128
131
  {/* Title row */}
129
132
  <div className={`flex items-center justify-between ${isSmall ? "mb-1" : "mb-2"}`}>
130
133
  <div className="flex flex-col min-w-0">
@@ -1,14 +0,0 @@
1
- export type Role = {
2
- /**
3
- * ID of the role
4
- */
5
- id: string;
6
- /**
7
- * Name of the role
8
- */
9
- name: string;
10
- /**
11
- * If this flag is true, the user can perform any action
12
- */
13
- isAdmin?: boolean;
14
- };