@carto/ps-react-ui 4.0.0 → 4.0.2-canary.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.
- package/dist/components.js +756 -651
- package/dist/components.js.map +1 -1
- package/dist/types/common/common.d.ts +1 -1
- package/dist/types/common/index.d.ts +1 -0
- package/dist/types/common/lasso-tools.d.ts +11 -8
- package/dist/types/common/measurement-tools.d.ts +1 -2
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/list-data/list-data-skeleton.d.ts +5 -0
- package/dist/types/components/list-data/list-data.d.ts +2 -2
- package/dist/types/components/list-data/styles.d.ts +9 -12
- package/dist/types/components/list-data/types.d.ts +2 -1
- package/dist/types/components/measurement-tools/const.d.ts +2 -1
- package/dist/types/components/no-data-alert/no-data-alert.d.ts +8 -0
- package/dist/types/hooks/use-skeleton.d.ts +1 -0
- package/package.json +1 -1
@@ -1,6 +1,4 @@
|
|
1
|
-
import type { ReactNode } from 'react'
|
2
1
|
import type { Class } from 'type-fest'
|
3
|
-
import type { GeoJsonEditMode } from '@deck.gl-community/editable-layers'
|
4
2
|
import type { EditableModesMapping } from './common'
|
5
3
|
|
6
4
|
export type LassoToolsMode =
|
@@ -10,15 +8,18 @@ export type LassoToolsMode =
|
|
10
8
|
| 'lasso'
|
11
9
|
| 'edit'
|
12
10
|
|
13
|
-
export interface LassoToolsModeOption<
|
11
|
+
export interface LassoToolsModeOption<
|
12
|
+
M extends string = LassoToolsMode,
|
13
|
+
T = GeoJSONEditMode,
|
14
|
+
> {
|
14
15
|
value: M
|
15
|
-
mode: Class<
|
16
|
+
mode: Class<T>
|
16
17
|
}
|
17
18
|
|
18
|
-
export type LassoToolsModes<
|
19
|
-
M,
|
20
|
-
|
21
|
-
>
|
19
|
+
export type LassoToolsModes<
|
20
|
+
M extends string = LassoToolsMode,
|
21
|
+
T = GeoJSONEditMode,
|
22
|
+
> = Record<M, LassoToolsModeOption<M, T>>
|
22
23
|
|
23
24
|
export type LassoToolOptionsMode<M extends string = LassoToolsMode> = Record<
|
24
25
|
M,
|
@@ -31,3 +32,5 @@ export type LassoToolsModesMapping<M extends string> = Record<
|
|
31
32
|
disabled?: boolean
|
32
33
|
}
|
33
34
|
>
|
35
|
+
|
36
|
+
export type CustomLassoToolsMode<T> = InstanceType<Class<T>>
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { Class } from 'type-fest'
|
2
2
|
import type { EditableModesMapping } from './common'
|
3
|
-
import type { GeoJsonEditMode } from '@deck.gl-community/editable-layers'
|
4
3
|
|
5
4
|
export type MeasurementSystem = 'metric' | 'imperial'
|
6
5
|
|
@@ -58,7 +57,7 @@ export type MeasurementModesMapping<T extends string> = Record<
|
|
58
57
|
EditableModesMapping
|
59
58
|
>
|
60
59
|
|
61
|
-
export
|
60
|
+
export interface MeasureUnitMapping {
|
62
61
|
short: string
|
63
62
|
}
|
64
63
|
|
@@ -5,7 +5,7 @@ export { LassoToolsInlineUI } from './lasso-tool/lasso-tool-inline';
|
|
5
5
|
export { DEFAULT_LASSO_TOOLS_MODES_MAPPING, LASSO_TOOLS_LABELS, } from './lasso-tool/const';
|
6
6
|
export { DrawCircleIcon, DrawLassoIcon, DrawPolygonIcon, DrawSquareIcon, SelectToolIcon, } from './lasso-tool/icons';
|
7
7
|
export type { MeasurementToolsComponentProps } from './measurement-tools/types';
|
8
|
-
export { DEFAULT_MEASUREMENT_TOOLS_LABELS, DEFAULT_MEASUREMENT_TOOLS_UNITS_MAPPING, } from './measurement-tools/const';
|
8
|
+
export { DEFAULT_MEASUREMENT_TOOLS_LABELS, DEFAULT_MEASUREMENT_TOOLS_UNITS_MAPPING, DEFAULT_MEASUREMENT_TOOLS_MODES_MAPPING, } from './measurement-tools/const';
|
9
9
|
export { AreaIcon, BufferIcon, RulerIcon } from './measurement-tools/icons';
|
10
10
|
export { MeasurementToolsUI } from './measurement-tools/measurement-tools';
|
11
11
|
export type { GeolocationControlProps } from './geolocation-controls/types';
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { ListDataProps } from './types';
|
2
1
|
import { JSX } from 'react';
|
3
|
-
|
2
|
+
import { ListDataProps } from './types';
|
3
|
+
export declare function ListDataUI({ data, isLoading, maxItems, labels, showDivider, selectedItemId, tooltipProps, onExpand, onItemClick, }: ListDataProps): JSX.Element;
|
@@ -1,18 +1,18 @@
|
|
1
1
|
import { Theme } from '@mui/material';
|
2
2
|
export declare const styles: {
|
3
|
-
|
4
|
-
flex: number;
|
3
|
+
label: {
|
5
4
|
'& .MuiListItemText-primary': {
|
6
|
-
|
7
|
-
|
5
|
+
overflow: string;
|
6
|
+
textOverflow: string;
|
7
|
+
whiteSpace: string;
|
8
8
|
};
|
9
9
|
};
|
10
|
-
|
11
|
-
flex: number;
|
12
|
-
textAlign: "right";
|
10
|
+
value: {
|
13
11
|
'& .MuiListItemText-primary': {
|
14
|
-
|
15
|
-
|
12
|
+
textAlign: "right";
|
13
|
+
overflow: string;
|
14
|
+
textOverflow: string;
|
15
|
+
whiteSpace: string;
|
16
16
|
};
|
17
17
|
};
|
18
18
|
clickable: {
|
@@ -21,9 +21,6 @@ export declare const styles: {
|
|
21
21
|
backgroundColor: ({ palette }: Theme) => string;
|
22
22
|
};
|
23
23
|
};
|
24
|
-
button: {
|
25
|
-
mt: number;
|
26
|
-
};
|
27
24
|
showDivider: {
|
28
25
|
borderBottom: ({ palette }: Theme) => string;
|
29
26
|
};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { RequiredDeep } from 'type-fest';
|
2
|
-
import { MeasurementUnitsMapping } from '../types';
|
2
|
+
import { MeasurementMode, MeasurementModesMapping, MeasurementUnitsMapping } from '../types';
|
3
3
|
import { MeasurementToolsComponentProps } from './types';
|
4
4
|
export declare const DEFAULT_MEASUREMENT_TOOLS_LABELS: RequiredDeep<MeasurementToolsComponentProps['labels']>;
|
5
5
|
export declare const DEFAULT_MEASUREMENT_TOOLS_UNITS_MAPPING: MeasurementUnitsMapping;
|
6
|
+
export declare const DEFAULT_MEASUREMENT_TOOLS_MODES_MAPPING: MeasurementModesMapping<MeasurementMode>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { AlertProps } from '@mui/material';
|
2
|
+
interface NoDataAlertProps {
|
3
|
+
title?: string;
|
4
|
+
body?: string;
|
5
|
+
severity?: AlertProps['severity'];
|
6
|
+
}
|
7
|
+
export declare function NoDataAlert({ title, body, severity, }: NoDataAlertProps): import("react/jsx-runtime").JSX.Element;
|
8
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare function useSkeleton(isLoading: boolean): boolean;
|