@ambuj.bhaskar/react-component-library 0.32.0 → 0.32.2

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/index.d.ts CHANGED
@@ -849,6 +849,81 @@ export declare type FormGroupProps = {
849
849
  showErrors?: boolean;
850
850
  };
851
851
 
852
+ declare type GeoServerConfig = {
853
+ /** Base URL of the GeoServer instance (e.g., "http://localhost:8080/geoserver") */
854
+ baseUrl: string;
855
+ /** Workspace name (optional, will be used to construct WMS URL) */
856
+ workspace?: string;
857
+ /**
858
+ * Skip fetching layers from GetCapabilities.
859
+ * Use this when GeoServer doesn't have CORS enabled.
860
+ * When true, you must provide customLayers in geoServerLayerProps.
861
+ * @default false
862
+ */
863
+ skipCapabilitiesFetch?: boolean;
864
+ /**
865
+ * Proxy URL for fetching GetCapabilities (bypasses CORS).
866
+ * Use this in development when GeoServer doesn't have CORS enabled.
867
+ *
868
+ * Example: If your proxy is at `/geoserver-proxy` and it proxies to
869
+ * `http://geoserver:8080/geoserver`, set this to `/geoserver-proxy`
870
+ *
871
+ * Note: WMS tile requests still use the original baseUrl (they don't need CORS)
872
+ */
873
+ proxyUrl?: string;
874
+ };
875
+
876
+ declare type GeoServerLayerConfig = {
877
+ id: string;
878
+ layerName: string;
879
+ title?: string;
880
+ visible: boolean;
881
+ zIndex?: number;
882
+ opacity?: number;
883
+ };
884
+
885
+ declare type GeoServerLayerProps = {
886
+ /**
887
+ * GeoServer configuration
888
+ * Required to enable the GeoServer layer feature
889
+ */
890
+ geoServerConfig: GeoServerConfig;
891
+ /**
892
+ * Custom layers to use instead of fetching from GetCapabilities
893
+ * If provided, layers won't be fetched dynamically
894
+ */
895
+ customLayers?: GeoServerLayerConfig[];
896
+ /**
897
+ * Layer selection mode
898
+ * - "single": Only one layer can be visible at a time
899
+ * - "multiple": Multiple layers can be visible simultaneously
900
+ * @default "multiple"
901
+ */
902
+ selectionMode?: LayerSelectionMode;
903
+ /**
904
+ * Combine all visible layers into a single WMS request per tile
905
+ * Only applicable when selectionMode is "multiple"
906
+ * - true: Fewer HTTP requests, but can't control per-layer opacity
907
+ * - false: More HTTP requests, full control over each layer
908
+ * @default false
909
+ */
910
+ combineLayers?: boolean;
911
+ /**
912
+ * Callback when layers change (visibility toggled)
913
+ */
914
+ onLayersChange?: (layers: GeoServerLayerConfig[]) => void;
915
+ /**
916
+ * Initial layers to show as visible (by layer ID)
917
+ * Only used on first render
918
+ */
919
+ initialVisibleLayers?: string[];
920
+ /**
921
+ * Show layer control panel by default
922
+ * @default true
923
+ */
924
+ showLayerPanel?: boolean;
925
+ };
926
+
852
927
  export declare const Heatmap: React.FC<HeatmapProps>;
853
928
 
854
929
  export declare type HeatmapData = {
@@ -936,6 +1011,8 @@ declare function isEighteenOrOlder(birthDate: any): boolean;
936
1011
 
937
1012
  declare type JustifyContent = "center" | "start" | "end" | "flex-start" | "flex-end" | "left" | "right" | "baseline" | "first baseline" | "last baseline" | "space-between" | "space-around" | "space-evenly" | "stretch";
938
1013
 
1014
+ declare type LayerSelectionMode = "single" | "multiple";
1015
+
939
1016
  declare type LineVariant = "fill" | "line";
940
1017
 
941
1018
  export declare const LiveDot: React.FC<LiveDotProps>;
@@ -1008,6 +1085,7 @@ export declare type MapViewProps = {
1008
1085
  defaultMapProvider: {
1009
1086
  url: string;
1010
1087
  attribution: string;
1088
+ maxZoom?: number;
1011
1089
  };
1012
1090
  };
1013
1091
  items: MapItem_2[];
@@ -1024,6 +1102,17 @@ export declare type MapViewProps = {
1024
1102
  focusedIndex?: number | null;
1025
1103
  onFocusedIndexChange?: (index: number | null) => void;
1026
1104
  onClickAway?: () => void;
1105
+ /**
1106
+ * Enable GeoServer WMS layer support
1107
+ * When enabled, shows a layer control panel for toggling WMS layers
1108
+ * @default false
1109
+ */
1110
+ enableGeoServerLayers?: boolean;
1111
+ /**
1112
+ * GeoServer layer configuration
1113
+ * Required when enableGeoServerLayers is true
1114
+ */
1115
+ geoServerLayerProps?: GeoServerLayerProps;
1027
1116
  };
1028
1117
 
1029
1118
  export declare const Menu: default_2.FC<MenuProps>;