@carto/ps-react-ui 4.3.7 → 4.3.9
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/types/widgets/actions/change-column/change-column.d.ts +4 -0
- package/dist/types/widgets/actions/fullscreen/fullscreen.d.ts +1 -1
- package/dist/types/widgets/actions/fullscreen/types.d.ts +2 -1
- package/dist/types/widgets/actions/index.d.ts +3 -3
- package/dist/types/widgets/actions/lock-selection/types.d.ts +13 -0
- package/dist/types/widgets/actions/relative-data/types.d.ts +4 -0
- package/dist/types/widgets/actions/searcher/types.d.ts +2 -0
- package/dist/types/widgets/actions/stack-toggle/types.d.ts +4 -0
- package/dist/types/widgets/table/components/cell.d.ts +4 -2
- package/dist/types/widgets/table/types.d.ts +1 -1
- package/dist/widgets/actions.js +714 -671
- package/dist/widgets/actions.js.map +1 -1
- package/dist/widgets/loader.js +58 -49
- package/dist/widgets/loader.js.map +1 -1
- package/dist/widgets/table.js +241 -240
- package/dist/widgets/table.js.map +1 -1
- package/package.json +3 -3
- package/src/widgets/actions/change-column/change-column.test.tsx +129 -2
- package/src/widgets/actions/change-column/change-column.tsx +79 -2
- package/src/widgets/actions/fullscreen/fullscreen.tsx +3 -0
- package/src/widgets/actions/fullscreen/types.ts +6 -1
- package/src/widgets/actions/index.ts +9 -3
- package/src/widgets/actions/lock-selection/lock-selection.tsx +26 -25
- package/src/widgets/actions/lock-selection/types.ts +17 -0
- package/src/widgets/actions/relative-data/relative-data.tsx +21 -18
- package/src/widgets/actions/relative-data/types.ts +7 -0
- package/src/widgets/actions/searcher/searcher.tsx +22 -40
- package/src/widgets/actions/searcher/types.ts +2 -0
- package/src/widgets/actions/stack-toggle/stack-toggle.tsx +22 -32
- package/src/widgets/actions/stack-toggle/types.ts +8 -0
- package/src/widgets/loader/loader.tsx +25 -24
- package/src/widgets/table/components/cell.tsx +5 -3
- package/src/widgets/table/components/row.tsx +6 -1
- package/src/widgets/table/types.ts +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChangeColumnProps } from './types';
|
|
2
|
+
export declare const CHANGE_COLUMN_TOOL_ID = "change-column";
|
|
2
3
|
/**
|
|
3
4
|
* Widget action to reorder columns in a table widget via drag-and-drop.
|
|
4
5
|
*
|
|
@@ -6,6 +7,9 @@ import { ChangeColumnProps } from './types';
|
|
|
6
7
|
* drag and drop columns to reorder them. All columns are displayed and
|
|
7
8
|
* can be reordered.
|
|
8
9
|
*
|
|
10
|
+
* Registers as a config pipeline tool so that column order is automatically
|
|
11
|
+
* re-applied when the base config is updated (e.g., by WidgetLoader).
|
|
12
|
+
*
|
|
9
13
|
* Returns null if there are fewer than 2 columns.
|
|
10
14
|
*
|
|
11
15
|
* @example
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { FullScreenProps } from './types';
|
|
2
|
-
export declare function FullScreen({ id, labels, children, Icon, IconButtonProps, DialogContentProps: { sx, ...DialogContentProps }, }: FullScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare function FullScreen({ id, labels, children, Icon, IconButtonProps, DialogContentProps: { sx, ...DialogContentProps }, DialogProps, }: FullScreenProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DialogContentProps, IconButtonProps } from '@mui/material';
|
|
1
|
+
import { DialogContentProps, IconButtonProps, DialogProps } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { BaseWidgetState } from '../../../widgets/stores/types';
|
|
4
4
|
export type FullScreenState<T = unknown> = BaseWidgetState<T & FullScreenConfigProps & {
|
|
@@ -15,6 +15,7 @@ export interface FullScreenProps {
|
|
|
15
15
|
};
|
|
16
16
|
children: ReactNode;
|
|
17
17
|
DialogContentProps?: DialogContentProps;
|
|
18
|
+
DialogProps?: DialogProps;
|
|
18
19
|
IconButtonProps?: IconButtonProps;
|
|
19
20
|
Icon?: ReactNode;
|
|
20
21
|
}
|
|
@@ -8,11 +8,11 @@ export type { RelativeDataProps } from './relative-data/types';
|
|
|
8
8
|
export { ZoomToggle, ZOOM_TOGGLE_TOOL_ID } from './zoom-toggle/zoom-toggle';
|
|
9
9
|
export type { ZoomToggleProps, ZoomState, ZoomConfig, } from './zoom-toggle/types';
|
|
10
10
|
export { StackToggle, STACK_TOGGLE_TOOL_ID } from './stack-toggle/stack-toggle';
|
|
11
|
-
export type { StackToggleProps } from './stack-toggle/types';
|
|
11
|
+
export type { StackToggleProps, StackToggleState } from './stack-toggle/types';
|
|
12
12
|
export { Searcher, SEARCHER_TOOL_ID } from './searcher/searcher';
|
|
13
13
|
export { SearcherToggle } from './searcher/searcher-toggle';
|
|
14
14
|
export type { SearcherToggleProps, SearcherProps, SearcherFilterFn, SearcherState, } from './searcher/types';
|
|
15
|
-
export { ChangeColumn } from './change-column/change-column';
|
|
15
|
+
export { ChangeColumn, CHANGE_COLUMN_TOOL_ID, } from './change-column/change-column';
|
|
16
16
|
export type { ChangeColumnProps } from './change-column/types';
|
|
17
17
|
export { LockSelection, LOCK_SELECTION_TOOL_ID, } from './lock-selection/lock-selection';
|
|
18
|
-
export type { LockSelectionProps } from './lock-selection/types';
|
|
18
|
+
export type { LockSelectionProps, LockSelectionState, } from './lock-selection/types';
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { IconButtonProps } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { BaseWidgetState } from '../../stores/types';
|
|
4
|
+
/**
|
|
5
|
+
* Widget state extension for lock selection functionality.
|
|
6
|
+
* Extends the base widget state with lock-specific properties.
|
|
7
|
+
*/
|
|
8
|
+
export type LockSelectionState<T = object> = BaseWidgetState<T & LockSelectionStateProps>;
|
|
3
9
|
export interface LockSelectionProps {
|
|
4
10
|
/** Widget ID to store lock selection state */
|
|
5
11
|
id: string;
|
|
@@ -21,3 +27,10 @@ export interface LockSelectionProps {
|
|
|
21
27
|
/** Custom icon to display */
|
|
22
28
|
Icon?: ReactNode;
|
|
23
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Lock selection specific state properties.
|
|
32
|
+
*/
|
|
33
|
+
export interface LockSelectionStateProps {
|
|
34
|
+
/** Whether the selection is currently locked */
|
|
35
|
+
isLocked?: boolean;
|
|
36
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IconButtonProps } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { BaseWidgetState } from '../../../widgets/stores';
|
|
3
4
|
export interface RelativeDataProps {
|
|
4
5
|
/** Widget ID to update data in the widget store */
|
|
5
6
|
id: string;
|
|
@@ -21,3 +22,6 @@ export interface RelativeDataProps {
|
|
|
21
22
|
/** Custom icon to display */
|
|
22
23
|
Icon?: ReactNode;
|
|
23
24
|
}
|
|
25
|
+
export type RelativeDataState<T = unknown> = BaseWidgetState<T & {
|
|
26
|
+
isRelative?: boolean;
|
|
27
|
+
}>;
|
|
@@ -14,6 +14,8 @@ export type SearcherFilterFn = (data: EchartWidgetData, searchText: string) => P
|
|
|
14
14
|
export interface SearcherStateProps {
|
|
15
15
|
/** Whether search is currently enabled */
|
|
16
16
|
isSearchEnabled?: boolean;
|
|
17
|
+
/** Current search text */
|
|
18
|
+
searchText?: string;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* Widget state extension for searcher functionality.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IconButtonProps } from '@mui/material';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { BaseWidgetState } from '../../stores/types';
|
|
3
4
|
export interface StackToggleProps {
|
|
4
5
|
/** Widget ID to update stack configuration in the widget store */
|
|
5
6
|
id: string;
|
|
@@ -19,3 +20,6 @@ export interface StackToggleProps {
|
|
|
19
20
|
/** Custom icon to display */
|
|
20
21
|
Icon?: ReactNode;
|
|
21
22
|
}
|
|
23
|
+
export type StackToggleState<T = unknown> = BaseWidgetState<T & {
|
|
24
|
+
isStacked?: boolean;
|
|
25
|
+
}>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { TableColumn } from '../types';
|
|
1
|
+
import { TableColumn, TableRow } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* Props for Cell component
|
|
4
4
|
*/
|
|
5
5
|
export interface CellProps {
|
|
6
6
|
/** Column definition */
|
|
7
7
|
column: TableColumn;
|
|
8
|
+
/** Full table row for context */
|
|
9
|
+
row: TableRow;
|
|
8
10
|
/** Cell value */
|
|
9
11
|
value: unknown;
|
|
10
12
|
}
|
|
@@ -13,4 +15,4 @@ export interface CellProps {
|
|
|
13
15
|
* Markdown is rendered when the raw value is a string and no formatter is defined.
|
|
14
16
|
* If a formatter is used, its output is rendered directly without markdown parsing.
|
|
15
17
|
*/
|
|
16
|
-
export declare function Cell({ column, value }: CellProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function Cell({ column, row, value }: CellProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -25,7 +25,7 @@ export interface TableColumn {
|
|
|
25
25
|
/** Enable sorting for this column */
|
|
26
26
|
sortable?: boolean;
|
|
27
27
|
/** Custom cell value formatter */
|
|
28
|
-
formatter?: (value: unknown) => ReactNode;
|
|
28
|
+
formatter?: (value: unknown, row: TableRow) => ReactNode;
|
|
29
29
|
}
|
|
30
30
|
/**
|
|
31
31
|
* Table row data - extends Record for flexible data
|