react-semaphor 0.1.510 → 0.1.512

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 (35) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +1 -1
  3. package/dist/chunks/{dashboard-briefing-launcher-CLZFm7_M.js → dashboard-briefing-launcher-CKOSxJJy.js} +103 -103
  4. package/dist/chunks/{dashboard-briefing-launcher-CAHFThZ6.cjs → dashboard-briefing-launcher-Dna1RtyP.cjs} +1 -1
  5. package/dist/chunks/{dashboard-controls-Yxsu_3w-.cjs → dashboard-controls-9H6PxWNh.cjs} +1 -1
  6. package/dist/chunks/{dashboard-controls-Cq0yJp7k.js → dashboard-controls-BqePoOt8.js} +130 -130
  7. package/dist/chunks/{dashboard-json-B2v70qeb.js → dashboard-json-BJJ1cddf.js} +2 -2
  8. package/dist/chunks/{dashboard-json-Czr84uhZ.cjs → dashboard-json-BwwJoZdd.cjs} +1 -1
  9. package/dist/chunks/{edit-dashboard-visual-BLWXCutZ.js → edit-dashboard-visual-Db2mRA_9.js} +5045 -5038
  10. package/dist/chunks/edit-dashboard-visual-cJdvfkou.cjs +172 -0
  11. package/dist/chunks/{editor-action-buttons-DwMSyAJY.cjs → editor-action-buttons-CKS-8x2Y.cjs} +1 -1
  12. package/dist/chunks/{editor-action-buttons-BiUk_CQn.js → editor-action-buttons-ktNQjwNQ.js} +27 -27
  13. package/dist/chunks/index-CdlFHeq9.cjs +1419 -0
  14. package/dist/chunks/{index-CTFwTeBb.js → index-SVO291wS.js} +36882 -37006
  15. package/dist/chunks/{report-preferences-dialog-CEja_Mat.js → report-preferences-dialog-CBZBmpxZ.js} +7 -7
  16. package/dist/chunks/{report-preferences-dialog-C1LOgCAH.cjs → report-preferences-dialog-DserKhuQ.cjs} +1 -1
  17. package/dist/chunks/{switch-BUW-Ky0G.cjs → switch-BkcJCTS7.cjs} +14 -14
  18. package/dist/chunks/{switch-MB0NuLq-.js → switch-CrstROAR.js} +144 -144
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/data-app-builder/index.cjs +1 -1
  22. package/dist/data-app-builder/index.js +50 -50
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +216 -234
  25. package/dist/surfboard/index.cjs +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/components/dashboard/dashboard-visual-error-state.d.ts +7 -1
  28. package/dist/types/components/error-fallbacks/fallback.d.ts +23 -11
  29. package/dist/types/components/error-fallbacks/render-reset-error-boundary.d.ts +33 -0
  30. package/dist/types/components/visual/data-table/hooks/use-data-table-logic.d.ts +5 -0
  31. package/dist/types/lib/dashboard/open-card-in-visual-editor.d.ts +15 -0
  32. package/dist/types/lib/dashboard-pagination/dashboard-card-pagination.d.ts +8 -1
  33. package/package.json +1 -1
  34. package/dist/chunks/edit-dashboard-visual-C8ni6cKY.cjs +0 -172
  35. package/dist/chunks/index-BriWG9wG.cjs +0 -1420
@@ -0,0 +1,33 @@
1
+ import { Component, ReactNode } from 'react';
2
+ import { FallbackProps } from 'react-error-boundary';
3
+ type RenderResetErrorBoundaryProps = {
4
+ /** The boundary retries its children whenever any of these change. */
5
+ resetKeys: readonly unknown[];
6
+ fallbackRender: (props: FallbackProps) => ReactNode;
7
+ children?: ReactNode;
8
+ };
9
+ type RenderResetErrorBoundaryState = {
10
+ hasError: boolean;
11
+ error: unknown;
12
+ /** `resetKeys` as they were when the error was caught. */
13
+ errorKeys: readonly unknown[] | null;
14
+ };
15
+ /**
16
+ * Error boundary whose `resetKeys` check runs during render.
17
+ *
18
+ * `react-error-boundary` compares `resetKeys` in `componentDidUpdate`. The
19
+ * dashboard stays mounted under `<Activity mode="hidden">` while the visual
20
+ * editor is open, and hidden trees re-render without running update
21
+ * lifecycles; on reveal they run `componentDidMount` instead. A repair made
22
+ * in the editor therefore never reset a failed card, which stayed on its
23
+ * error state after Accept. `getDerivedStateFromProps` runs on every render,
24
+ * hidden or not, so this boundary sees the change.
25
+ */
26
+ export declare class RenderResetErrorBoundary extends Component<RenderResetErrorBoundaryProps, RenderResetErrorBoundaryState> {
27
+ state: RenderResetErrorBoundaryState;
28
+ static getDerivedStateFromError(error: unknown): Partial<RenderResetErrorBoundaryState>;
29
+ static getDerivedStateFromProps(props: RenderResetErrorBoundaryProps, state: RenderResetErrorBoundaryState): Partial<RenderResetErrorBoundaryState> | null;
30
+ private resetErrorBoundary;
31
+ render(): ReactNode;
32
+ }
33
+ export {};
@@ -84,6 +84,11 @@ export declare function useDataTableLogic(props: DataTableLogicProps): {
84
84
  totalRows: number;
85
85
  isTablePrintDisplayMode: boolean;
86
86
  onSortChange: ((sorting: SortingState) => void) | undefined;
87
+ pagination: {
88
+ pageIndex: number;
89
+ pageSize: number;
90
+ };
91
+ handlePaginationChange: (updater: import('@tanstack/table-core').PaginationState | ((old: import('@tanstack/table-core').PaginationState) => import('@tanstack/table-core').PaginationState)) => void;
87
92
  paginationMode: import('../utils/pagination-utils.js').PaginationMode;
88
93
  paginationMetadata: any;
89
94
  contextTimezone: string | undefined;
@@ -0,0 +1,15 @@
1
+ import { useManagementStore } from '../stores/management-store.js';
2
+ import { TCard, TFrame } from '../types/common-types.js';
3
+ type ManagementState = ReturnType<typeof useManagementStore.getState>;
4
+ /** Saved-dashboard edit permission, as the dashboard runtime reads it. */
5
+ export declare function selectCanEditDashboard(state: ManagementState): boolean;
6
+ /**
7
+ * Opens the visual editor on one dashboard card from any dashboard state,
8
+ * including view mode. Store values are read at call time, so callers such as
9
+ * error fallbacks don't subscribe to dashboard or editor state to offer it.
10
+ */
11
+ export declare function openCardInVisualEditor({ frame, card, }: {
12
+ frame: TFrame;
13
+ card: TCard;
14
+ }): void;
15
+ export {};
@@ -1,4 +1,4 @@
1
- import { PaginationConfig } from '../types/explorer-types.js';
1
+ import { PaginationConfig, PaginationMetadata } from '../types/explorer-types.js';
2
2
  export type DashboardCardPaginationState = PaginationConfig & {
3
3
  queryInputIdentity: string;
4
4
  };
@@ -14,4 +14,11 @@ type ResolveDashboardCardPaginationParams = {
14
14
  */
15
15
  export declare function resolveDashboardCardPagination({ current, defaultPageSize, queryInputIdentity, }: ResolveDashboardCardPaginationParams): PaginationConfig;
16
16
  export declare function dashboardCardPaginationMatches(current: DashboardCardPaginationState | undefined, pagination: PaginationConfig, queryInputIdentity: string): boolean;
17
+ /**
18
+ * Keeps pagination chrome aligned with the request being rendered while React
19
+ * Query retains the previous response. Counts and navigation capability remain
20
+ * useful placeholders, but the displayed page must belong to the current query
21
+ * input identity.
22
+ */
23
+ export declare function resolveDashboardPaginationMetadata(metadata: PaginationMetadata | undefined, effectivePagination: PaginationConfig | undefined): PaginationMetadata | undefined;
17
24
  export {};
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "email": "support@semaphor.cloud"
6
6
  },
7
7
  "license": "MIT",
8
- "version": "0.1.510",
8
+ "version": "0.1.512",
9
9
  "description": "Fully interactive and customizable dashboards for your apps.",
10
10
  "keywords": [
11
11
  "react",