@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.
@@ -1,3 +1,3 @@
1
- export type EditableModesMapping = {
1
+ export interface EditableModesMapping {
2
2
  icon: ReactNode
3
3
  }
@@ -22,4 +22,5 @@ export {
22
22
  LassoToolsModes,
23
23
  LassoToolOptionsMode,
24
24
  LassoToolsModesMapping,
25
+ CustomLassoToolsMode,
25
26
  } from './lasso-tools'
@@ -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<M extends string = LassoToolsMode> {
11
+ export interface LassoToolsModeOption<
12
+ M extends string = LassoToolsMode,
13
+ T = GeoJSONEditMode,
14
+ > {
14
15
  value: M
15
- mode: Class<GeoJsonEditMode>
16
+ mode: Class<T>
16
17
  }
17
18
 
18
- export type LassoToolsModes<M extends string = LassoToolsMode> = Record<
19
- M,
20
- LassoToolsModeOption<M>
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 type MeasureUnitMapping = {
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';
@@ -0,0 +1,5 @@
1
+ interface ListDataSkeletonProps {
2
+ length?: number;
3
+ }
4
+ export declare function ListDataSkeleton({ length }: ListDataSkeletonProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -1,3 +1,3 @@
1
- import { ListDataProps } from './types';
2
1
  import { JSX } from 'react';
3
- export declare function ListDataUI({ data, itemsToShow, labels, showDivider, selectedItemId, tooltipProps, onExpand, onItemClick, }: ListDataProps): JSX.Element;
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
- firstColumn: {
4
- flex: number;
3
+ label: {
5
4
  '& .MuiListItemText-primary': {
6
- wordBreak: "break-word";
7
- whiteSpace: "normal";
5
+ overflow: string;
6
+ textOverflow: string;
7
+ whiteSpace: string;
8
8
  };
9
9
  };
10
- secondColumn: {
11
- flex: number;
12
- textAlign: "right";
10
+ value: {
13
11
  '& .MuiListItemText-primary': {
14
- wordBreak: "break-word";
15
- whiteSpace: "normal";
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
  };
@@ -9,7 +9,8 @@ export interface DataItem {
9
9
  }
10
10
  export interface ListDataProps {
11
11
  data: DataItem[];
12
- itemsToShow?: number;
12
+ isLoading?: boolean;
13
+ maxItems?: number;
13
14
  labels?: {
14
15
  showMore: string;
15
16
  showLess: string;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carto/ps-react-ui",
3
- "version": "4.0.0",
3
+ "version": "4.0.2-canary.0",
4
4
  "description": "CARTO's Professional Service React Material library",
5
5
  "type": "module",
6
6
  "devDependencies": {