@feltmaps/js-sdk 1.5.0-next.6 → 1.5.0-next.8
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/client.cjs +1 -1
- package/dist/client.d.cts +138 -11
- package/dist/client.d.ts +138 -11
- package/dist/client.js +1 -1
- package/dist/handler.cjs +1 -1
- package/dist/handler.d.cts +120 -31
- package/dist/handler.d.ts +120 -31
- package/dist/handler.js +1 -1
- package/dist/{types-CQwkpLq-.d.cts → types-BXCTpxot.d.cts} +177 -14
- package/dist/{types-CQwkpLq-.d.ts → types-BXCTpxot.d.ts} +177 -14
- package/handler.d.ts +120 -31
- package/handler.js +1 -1
- package/package.json +1 -1
- package/{types-CQwkpLq-.d.ts → types-BXCTpxot.d.ts} +177 -14
|
@@ -378,7 +378,7 @@ declare const ImageCreateSchema: z.ZodObject<Omit<{
|
|
|
378
378
|
attributes?: Record<string, unknown> | undefined;
|
|
379
379
|
opacity?: number | undefined;
|
|
380
380
|
}>;
|
|
381
|
-
declare const PlaceReadSchema: z.ZodObject<
|
|
381
|
+
declare const PlaceReadSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
382
382
|
id: z.ZodString;
|
|
383
383
|
groupId: z.ZodNullable<z.ZodString>;
|
|
384
384
|
color: z.ZodString;
|
|
@@ -393,9 +393,10 @@ declare const PlaceReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.objec
|
|
|
393
393
|
symbol: z.ZodString;
|
|
394
394
|
frame: z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>;
|
|
395
395
|
hideLabel: z.ZodBoolean;
|
|
396
|
-
}>, "
|
|
396
|
+
}>, "strip", z.ZodTypeAny, {
|
|
397
397
|
symbol: string;
|
|
398
398
|
type: "Place";
|
|
399
|
+
coordinates: [number, number];
|
|
399
400
|
id: string;
|
|
400
401
|
groupId: string | null;
|
|
401
402
|
color: string;
|
|
@@ -408,6 +409,7 @@ declare const PlaceReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.objec
|
|
|
408
409
|
}, {
|
|
409
410
|
symbol: string;
|
|
410
411
|
type: "Place";
|
|
412
|
+
coordinates: [number, number];
|
|
411
413
|
id: string;
|
|
412
414
|
groupId: string | null;
|
|
413
415
|
color: string;
|
|
@@ -515,7 +517,7 @@ declare const PolygonReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.obj
|
|
|
515
517
|
fillOpacity: number;
|
|
516
518
|
areaMarker: boolean;
|
|
517
519
|
}>;
|
|
518
|
-
declare const CircleReadSchema: z.ZodObject<
|
|
520
|
+
declare const CircleReadSchema: z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<z.objectUtil.extendShape<{
|
|
519
521
|
id: z.ZodString;
|
|
520
522
|
groupId: z.ZodNullable<z.ZodString>;
|
|
521
523
|
color: z.ZodString;
|
|
@@ -536,8 +538,9 @@ declare const CircleReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.obje
|
|
|
536
538
|
radiusDisplayUnit: z.ZodNullable<z.ZodEnum<["meter", "kilometer", "foot", "mile"]>>;
|
|
537
539
|
fillOpacity: z.ZodNumber;
|
|
538
540
|
radiusMarker: z.ZodBoolean;
|
|
539
|
-
}>, "
|
|
541
|
+
}>, "strip", z.ZodTypeAny, {
|
|
540
542
|
type: "Circle";
|
|
543
|
+
coordinates: [number, number];
|
|
541
544
|
id: string;
|
|
542
545
|
groupId: string | null;
|
|
543
546
|
color: string;
|
|
@@ -555,6 +558,7 @@ declare const CircleReadSchema: z.ZodObject<Omit<z.objectUtil.extendShape<z.obje
|
|
|
555
558
|
radiusMarker: boolean;
|
|
556
559
|
}, {
|
|
557
560
|
type: "Circle";
|
|
561
|
+
coordinates: [number, number];
|
|
558
562
|
id: string;
|
|
559
563
|
groupId: string | null;
|
|
560
564
|
color: string;
|
|
@@ -1317,7 +1321,7 @@ declare const GetElementGroupsConstraintSchema: z.ZodObject<{
|
|
|
1317
1321
|
ids?: string[] | undefined;
|
|
1318
1322
|
}>;
|
|
1319
1323
|
/**
|
|
1320
|
-
* The parameters for the `onElementChange`
|
|
1324
|
+
* The parameters for the `onElementChange` and the `onElementCreate` listeners.
|
|
1321
1325
|
*
|
|
1322
1326
|
* @group Elements
|
|
1323
1327
|
*/
|
|
@@ -1326,6 +1330,22 @@ interface ElementChangeCallbackParams {
|
|
|
1326
1330
|
* The new data for the element or null if the element was removed.
|
|
1327
1331
|
*/
|
|
1328
1332
|
element: Element | null;
|
|
1333
|
+
/**
|
|
1334
|
+
* Whether or not this element is still being created by a drawing tool.
|
|
1335
|
+
*
|
|
1336
|
+
* For example, if the user begins drawing a polygon, they need to place
|
|
1337
|
+
* multiple points until they've ultimately completed the polygon. All
|
|
1338
|
+
* the time they are still placing points, this will be true.
|
|
1339
|
+
*
|
|
1340
|
+
* For elements that require text entry (such as Places, Text and Notes)
|
|
1341
|
+
* this will be true all the time the user is typing text until the point
|
|
1342
|
+
* at which the user finishes, by pressing Escape for example.
|
|
1343
|
+
*
|
|
1344
|
+
* If the user is editing an existing element, this will be false.
|
|
1345
|
+
*
|
|
1346
|
+
* For elements that are created programatically, this will be false.
|
|
1347
|
+
*/
|
|
1348
|
+
isBeingCreated: boolean;
|
|
1329
1349
|
}
|
|
1330
1350
|
/**
|
|
1331
1351
|
* The parameters for the `onElementGroupChange` listener.
|
|
@@ -1464,6 +1484,40 @@ declare const SetVisibilityRequestSchema: z.ZodObject<{
|
|
|
1464
1484
|
show?: string[] | undefined;
|
|
1465
1485
|
hide?: string[] | undefined;
|
|
1466
1486
|
}>;
|
|
1487
|
+
/**
|
|
1488
|
+
* Specifies the direction to sort data in
|
|
1489
|
+
*
|
|
1490
|
+
* @group Types
|
|
1491
|
+
*/
|
|
1492
|
+
type SortDirection = z.infer<typeof SortDirectionSchema>;
|
|
1493
|
+
/** @ignore */
|
|
1494
|
+
declare const SortDirectionSchema: z.ZodEnum<["asc", "desc"]>;
|
|
1495
|
+
/**
|
|
1496
|
+
* Configuration for sorting data by a specific attribute
|
|
1497
|
+
*
|
|
1498
|
+
* @group Types
|
|
1499
|
+
*/
|
|
1500
|
+
interface SortConfig extends zInfer<typeof SortConfigSchema> {
|
|
1501
|
+
}
|
|
1502
|
+
/** @ignore */
|
|
1503
|
+
declare const SortConfigSchema: z.ZodObject<{
|
|
1504
|
+
/**
|
|
1505
|
+
* The attribute to sort by. What this represents depends on the context.
|
|
1506
|
+
* For instance, when sorting features in a data table, the attribute is
|
|
1507
|
+
* the column to sort by.
|
|
1508
|
+
*/
|
|
1509
|
+
attribute: z.ZodString;
|
|
1510
|
+
/**
|
|
1511
|
+
* The direction to sort in
|
|
1512
|
+
*/
|
|
1513
|
+
direction: z.ZodEnum<["asc", "desc"]>;
|
|
1514
|
+
}, "strip", z.ZodTypeAny, {
|
|
1515
|
+
attribute: string;
|
|
1516
|
+
direction: "asc" | "desc";
|
|
1517
|
+
}, {
|
|
1518
|
+
attribute: string;
|
|
1519
|
+
direction: "asc" | "desc";
|
|
1520
|
+
}>;
|
|
1467
1521
|
|
|
1468
1522
|
/**
|
|
1469
1523
|
* A feature is a single geographical item in a layer.
|
|
@@ -1888,6 +1942,31 @@ declare const FilterLogicGateSchema: z.ZodEnum<["and", "or"]>;
|
|
|
1888
1942
|
type FilterExpression = z.infer<typeof FilterExpressionSchema>;
|
|
1889
1943
|
declare const FilterExpressionSchema: z.ZodUnion<[z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["in", "ni"]>, z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>, "many">, z.ZodNull]>], null>, z.ZodTuple<[z.ZodUnion<[z.ZodString, z.ZodNull]>, z.ZodEnum<["lt", "gt", "le", "ge", "eq", "ne", "cn", "nc", "is", "isnt"]>, z.ZodUnion<[z.ZodNumber, z.ZodString, z.ZodBoolean, z.ZodNull]>], null>]>;
|
|
1890
1944
|
/**
|
|
1945
|
+
* A `FilterTernary` is a tree structure for combining expressions with logical operators.
|
|
1946
|
+
*
|
|
1947
|
+
* When combining three or more conditions, you must use proper nesting rather than a flat list.
|
|
1948
|
+
*
|
|
1949
|
+
* @example
|
|
1950
|
+
* ```typescript
|
|
1951
|
+
* // A simple filter with a single condition
|
|
1952
|
+
* const filter = [
|
|
1953
|
+
* ["AREA", "gt", 30_000],
|
|
1954
|
+
* "and",
|
|
1955
|
+
* ["COLOR", "eq", "red"]
|
|
1956
|
+
* ]
|
|
1957
|
+
*
|
|
1958
|
+
* // A complex filter with multiple conditions
|
|
1959
|
+
* const filter = [
|
|
1960
|
+
* ["AREA", "gt", 30_000],
|
|
1961
|
+
* "and",
|
|
1962
|
+
* [
|
|
1963
|
+
* ["COLOR", "eq", "red"],
|
|
1964
|
+
* "or",
|
|
1965
|
+
* ["TYPE", "eq", "residential"]
|
|
1966
|
+
* ]
|
|
1967
|
+
* ]
|
|
1968
|
+
* ```
|
|
1969
|
+
*
|
|
1891
1970
|
* @group Filters
|
|
1892
1971
|
*/
|
|
1893
1972
|
type FilterTernary = [
|
|
@@ -1900,6 +1979,12 @@ type FilterTernary = [
|
|
|
1900
1979
|
* Filters can be used to change which features in a layer are rendered. Filters can be
|
|
1901
1980
|
* applied to a layer by the `setLayerFilters` method on the Felt controller.
|
|
1902
1981
|
*
|
|
1982
|
+
* Filters use a tree structure for combining expressions with logical operators, called a
|
|
1983
|
+
* {@link FilterTernary}. When combining three or more conditions, you must use proper nesting
|
|
1984
|
+
* rather than a flat list.
|
|
1985
|
+
*
|
|
1986
|
+
* See the examples below for the correct structure to use when building complex filters.
|
|
1987
|
+
*
|
|
1903
1988
|
* @remarks
|
|
1904
1989
|
* The possible operators are:
|
|
1905
1990
|
* - `lt`: Less than
|
|
@@ -1917,17 +2002,82 @@ type FilterTernary = [
|
|
|
1917
2002
|
*
|
|
1918
2003
|
* @example
|
|
1919
2004
|
* ```typescript
|
|
1920
|
-
* //
|
|
2005
|
+
* // 1. Simple filter: single condition
|
|
1921
2006
|
* felt.setLayerFilters({
|
|
1922
2007
|
* layerId: "layer-1",
|
|
1923
2008
|
* filters: ["AREA", "gt", 30_000],
|
|
1924
2009
|
* });
|
|
1925
2010
|
*
|
|
1926
|
-
* //
|
|
2011
|
+
* // 2. Basic compound filter: two conditions with AND
|
|
1927
2012
|
* felt.setLayerFilters({
|
|
1928
2013
|
* layerId: "layer-1",
|
|
1929
|
-
* filters: [
|
|
1930
|
-
*
|
|
2014
|
+
* filters: [
|
|
2015
|
+
* ["AREA", "gt", 30_000], // First condition
|
|
2016
|
+
* "and", // Logic operator
|
|
2017
|
+
* ["COLOR", "eq", "red"] // Second condition
|
|
2018
|
+
* ]
|
|
2019
|
+
* });
|
|
2020
|
+
*
|
|
2021
|
+
* // 3. Complex filter: three or more conditions require nesting
|
|
2022
|
+
* // ⚠️ IMPORTANT: Filters use a tree structure, not a flat list
|
|
2023
|
+
* felt.setLayerFilters({
|
|
2024
|
+
* layerId: "layer-1",
|
|
2025
|
+
* filters: [
|
|
2026
|
+
* ["AREA", "gt", 30_000], // First condition
|
|
2027
|
+
* "and", // First logic operator
|
|
2028
|
+
* [ // Nested group starts
|
|
2029
|
+
* ["COLOR", "eq", "red"], // Second condition
|
|
2030
|
+
* "and", // Second logic operator
|
|
2031
|
+
* ["TYPE", "eq", "residential"] // Third condition
|
|
2032
|
+
* ] // Nested group ends
|
|
2033
|
+
* ]
|
|
2034
|
+
* });
|
|
2035
|
+
*
|
|
2036
|
+
* // 4. Even more complex: four conditions with proper nesting
|
|
2037
|
+
* // Visual structure:
|
|
2038
|
+
* // AND
|
|
2039
|
+
* // / \
|
|
2040
|
+
* // condition AND
|
|
2041
|
+
* // / \
|
|
2042
|
+
* // condition AND
|
|
2043
|
+
* // / \
|
|
2044
|
+
* // condition condition
|
|
2045
|
+
* felt.setLayerFilters({
|
|
2046
|
+
* layerId: "layer-1",
|
|
2047
|
+
* filters: [
|
|
2048
|
+
* ["AREA", "gt", 30_000], // First condition
|
|
2049
|
+
* "and",
|
|
2050
|
+
* [
|
|
2051
|
+
* ["COLOR", "eq", "red"], // Second condition
|
|
2052
|
+
* "and",
|
|
2053
|
+
* [
|
|
2054
|
+
* ["TYPE", "eq", "residential"], // Third condition
|
|
2055
|
+
* "and",
|
|
2056
|
+
* ["YEAR", "gt", 2000] // Fourth condition
|
|
2057
|
+
* ]
|
|
2058
|
+
* ]
|
|
2059
|
+
* ]
|
|
2060
|
+
* });
|
|
2061
|
+
*
|
|
2062
|
+
* // 5. Mixed operators: combining AND and OR
|
|
2063
|
+
* // Visual structure:
|
|
2064
|
+
* // AND
|
|
2065
|
+
* // / \
|
|
2066
|
+
* // condition OR
|
|
2067
|
+
* // / \
|
|
2068
|
+
* // condition condition
|
|
2069
|
+
* felt.setLayerFilters({
|
|
2070
|
+
* layerId: "layer-1",
|
|
2071
|
+
* filters: [
|
|
2072
|
+
* ["AREA", "gt", 30_000], // Must have large area
|
|
2073
|
+
* "and",
|
|
2074
|
+
* [
|
|
2075
|
+
* ["COLOR", "eq", "red"], // Must be either red
|
|
2076
|
+
* "or",
|
|
2077
|
+
* ["TYPE", "eq", "residential"] // OR residential type
|
|
2078
|
+
* ]
|
|
2079
|
+
* ]
|
|
2080
|
+
* });
|
|
1931
2081
|
* ```
|
|
1932
2082
|
*
|
|
1933
2083
|
* @group Filters
|
|
@@ -2179,8 +2329,8 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
|
|
|
2179
2329
|
} | undefined;
|
|
2180
2330
|
}>>;
|
|
2181
2331
|
}, "strip", z.ZodTypeAny, {
|
|
2182
|
-
layerId: string;
|
|
2183
2332
|
attribute: string;
|
|
2333
|
+
layerId: string;
|
|
2184
2334
|
values?: {
|
|
2185
2335
|
boundary?: [number, number][] | {
|
|
2186
2336
|
type: "Polygon";
|
|
@@ -2199,8 +2349,8 @@ declare const GetLayerCategoriesParamsSchema: z.ZodObject<{
|
|
|
2199
2349
|
filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
|
|
2200
2350
|
limit?: number | undefined;
|
|
2201
2351
|
}, {
|
|
2202
|
-
layerId: string;
|
|
2203
2352
|
attribute: string;
|
|
2353
|
+
layerId: string;
|
|
2204
2354
|
values?: {
|
|
2205
2355
|
boundary?: [number, number][] | {
|
|
2206
2356
|
type: "Polygon";
|
|
@@ -2370,8 +2520,8 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
|
|
|
2370
2520
|
} | undefined;
|
|
2371
2521
|
}>>;
|
|
2372
2522
|
}, "strip", z.ZodTypeAny, {
|
|
2373
|
-
layerId: string;
|
|
2374
2523
|
attribute: string;
|
|
2524
|
+
layerId: string;
|
|
2375
2525
|
steps: number[] | {
|
|
2376
2526
|
type: "equal-intervals";
|
|
2377
2527
|
count: number;
|
|
@@ -2396,8 +2546,8 @@ declare const GetLayerHistogramParamsSchema: z.ZodObject<{
|
|
|
2396
2546
|
} | [number, number, number, number] | undefined;
|
|
2397
2547
|
filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
|
|
2398
2548
|
}, {
|
|
2399
|
-
layerId: string;
|
|
2400
2549
|
attribute: string;
|
|
2550
|
+
layerId: string;
|
|
2401
2551
|
steps: number[] | {
|
|
2402
2552
|
type: "equal-intervals";
|
|
2403
2553
|
count: number;
|
|
@@ -2705,17 +2855,30 @@ declare const PinToolSettingsSchema: z.ZodObject<{
|
|
|
2705
2855
|
symbol: z.ZodString;
|
|
2706
2856
|
color: z.ZodString;
|
|
2707
2857
|
frame: z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>;
|
|
2858
|
+
afterCreation: z.ZodEnum<["enter name", "add another", "select"]>;
|
|
2708
2859
|
}, "strip", z.ZodTypeAny, {
|
|
2709
2860
|
symbol: string;
|
|
2710
2861
|
color: string;
|
|
2711
2862
|
frame: "frame-circle" | "frame-square" | null;
|
|
2863
|
+
afterCreation: "enter name" | "add another" | "select";
|
|
2712
2864
|
}, {
|
|
2713
2865
|
symbol: string;
|
|
2714
2866
|
color: string;
|
|
2715
2867
|
frame: "frame-circle" | "frame-square" | null;
|
|
2868
|
+
afterCreation: "enter name" | "add another" | "select";
|
|
2716
2869
|
}>;
|
|
2717
2870
|
interface PinToolSettings extends zInfer<typeof PinToolSettingsSchema> {
|
|
2718
2871
|
symbol: PlaceSymbol;
|
|
2872
|
+
/**
|
|
2873
|
+
* What to do after creating the Place element.
|
|
2874
|
+
*
|
|
2875
|
+
* - `"enter name"`: Enter a name for the Place, focusing the name input.
|
|
2876
|
+
* - `"add another"`: Add another Place, leaving the tool still selected.
|
|
2877
|
+
* - `"none"`: Puts the tool down and selects the new Place element.
|
|
2878
|
+
*
|
|
2879
|
+
* @defaultValue `"enter name"`
|
|
2880
|
+
*/
|
|
2881
|
+
afterCreation: "enter name" | "add another" | "select";
|
|
2719
2882
|
}
|
|
2720
2883
|
declare const LineToolSettingsSchema: z.ZodObject<{
|
|
2721
2884
|
color: z.ZodString;
|
|
@@ -3044,4 +3207,4 @@ declare const ViewportFitBoundsParamsSchema: z.ZodObject<{
|
|
|
3044
3207
|
bounds: [number, number, number, number];
|
|
3045
3208
|
}>;
|
|
3046
3209
|
|
|
3047
|
-
export type {
|
|
3210
|
+
export type { ImageElementRead as $, AggregationMethod as A, FeatureSelection as B, ConfigurableToolType as C, ToolSettingsMap as D, Element as E, Filters as F, Geometry as G, ToolSettingsChangeEvent as H, InputToolSettings as I, zInfer as J, SortConfig as K, Layer as L, MapInteractionEvent as M, SetViewportCenterZoomParams as N, ViewportConstraints as O, ViewportFitBoundsParams as P, ViewportCenterZoom as Q, CircleElementCreate as R, SetVisibilityRequest as S, ToolType as T, CircleElementRead as U, ViewportState as V, CircleElementUpdate as W, HighlighterElementCreate as X, HighlighterElementRead as Y, HighlighterElementUpdate as Z, ImageElementCreate as _, GetElementsConstraint as a, ImageElementUpdate as a0, LinkElementRead as a1, MarkerElementCreate as a2, MarkerElementRead as a3, MarkerElementUpdate as a4, NoteElementCreate as a5, NoteElementRead as a6, NoteElementUpdate as a7, PathElementCreate as a8, PathElementRead as a9, LineStringGeometry as aA, LngLatTuple as aB, MultiLineStringGeometry as aC, MultiPolygonGeometry as aD, PointGeometry as aE, PolygonGeometry as aF, SortDirection as aG, CircleToolSettings as aH, HighlighterToolSettings as aI, LineToolSettings as aJ, MarkerToolSettings as aK, NoteToolSettings as aL, PinToolSettings as aM, PlaceFrame as aN, PlaceSymbol as aO, PolygonToolSettings as aP, RouteToolSettings as aQ, TextToolSettings as aR, UnionToIntersection as aS, PromiseOrNot as aT, PathElementUpdate as aa, PlaceElementCreate as ab, PlaceElementRead as ac, PlaceElementUpdate as ad, PolygonElementCreate as ae, PolygonElementRead as af, PolygonElementUpdate as ag, TextElementCreate as ah, TextElementRead as ai, TextElementUpdate as aj, LayerProcessingStatus as ak, RasterValue as al, FilterExpression as am, FilterLogicGate as an, FilterTernary as ao, AggregationConfig as ap, MultiAggregationConfig as aq, ValueConfiguration as ar, ElementGroupNode as as, ElementNode as at, FeatureNode as au, LayerGroupNode as av, LayerNode as aw, FeltBoundary as ax, FeltZoom as ay, LatLng as az, ElementGroup as b, GetElementGroupsConstraint as c, ElementChangeCallbackParams as d, ElementGroupChangeCallbackParams as e, ElementCreate as f, ElementUpdate as g, GetLayersConstraint as h, LayerChangeCallbackParams as i, LayerGroup as j, GetLayerGroupsConstraint as k, LayerGroupChangeCallbackParams as l, LegendItemIdentifier as m, LegendItem as n, LegendItemsConstraint as o, LegendItemChangeCallbackParams as p, LayerFilters as q, GetRenderedFeaturesConstraint as r, Feature as s, GetLayerCategoriesParams as t, GetLayerCategoriesGroup as u, GetLayerHistogramParams as v, GetLayerHistogramBin as w, GetLayerCalculationParams as x, MapDetails as y, EntityNode as z };
|
package/handler.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as zod from 'zod';
|
|
2
1
|
import { z } from 'zod';
|
|
3
|
-
import { J as zInfer, E as Element, G as Geometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, j as LayerGroup, n as LegendItem, q as LayerFilters, s as Feature, u as GetLayerCategoriesGroup, w as GetLayerHistogramBin, A as AggregationMethod, i as LayerChangeCallbackParams, l as LayerGroupChangeCallbackParams, p as LegendItemChangeCallbackParams,
|
|
2
|
+
import { J as zInfer, E as Element, G as Geometry, b as ElementGroup, d as ElementChangeCallbackParams, e as ElementGroupChangeCallbackParams, M as MapInteractionEvent, L as Layer, j as LayerGroup, n as LegendItem, q as LayerFilters, s as Feature, u as GetLayerCategoriesGroup, w as GetLayerHistogramBin, A as AggregationMethod, i as LayerChangeCallbackParams, l as LayerGroupChangeCallbackParams, p as LegendItemChangeCallbackParams, ao as FilterTernary, y as MapDetails, z as EntityNode, T as ToolType, D as ToolSettingsMap, H as ToolSettingsChangeEvent, V as ViewportState, O as ViewportConstraints, aS as UnionToIntersection, aT as PromiseOrNot } from './types-BXCTpxot.js';
|
|
4
3
|
|
|
5
4
|
type Method<TRequest extends {
|
|
6
5
|
type: string;
|
|
@@ -1429,6 +1428,9 @@ type ElementsSchema = {
|
|
|
1429
1428
|
onElementChange: Listener<zInfer<typeof OnElementChangeMessage.shape.options>, ElementChangeCallbackParams>;
|
|
1430
1429
|
onElementGroupChange: Listener<zInfer<typeof OnElementGroupChangeMessage.shape.options>, ElementGroupChangeCallbackParams>;
|
|
1431
1430
|
onElementCreate: ListenerNoOptions<ElementChangeCallbackParams>;
|
|
1431
|
+
onElementCreateEnd: ListenerNoOptions<{
|
|
1432
|
+
element: Element;
|
|
1433
|
+
}>;
|
|
1432
1434
|
onElementDelete: Listener<zInfer<typeof OnElementDeleteMessage.shape.options>, void>;
|
|
1433
1435
|
};
|
|
1434
1436
|
};
|
|
@@ -1886,6 +1888,29 @@ declare const SetFiltersMessage: z.ZodObject<{
|
|
|
1886
1888
|
};
|
|
1887
1889
|
type: "setLayerFilters";
|
|
1888
1890
|
}>;
|
|
1891
|
+
declare const OnLayerFiltersChangeMessage: z.ZodObject<{
|
|
1892
|
+
eventName: z.ZodLiteral<"onLayerFiltersChange">;
|
|
1893
|
+
id: z.ZodString;
|
|
1894
|
+
options: z.ZodObject<{
|
|
1895
|
+
layerId: z.ZodString;
|
|
1896
|
+
}, "strip", z.ZodTypeAny, {
|
|
1897
|
+
layerId: string;
|
|
1898
|
+
}, {
|
|
1899
|
+
layerId: string;
|
|
1900
|
+
}>;
|
|
1901
|
+
}, "strict", z.ZodTypeAny, {
|
|
1902
|
+
options: {
|
|
1903
|
+
layerId: string;
|
|
1904
|
+
};
|
|
1905
|
+
id: string;
|
|
1906
|
+
eventName: "onLayerFiltersChange";
|
|
1907
|
+
}, {
|
|
1908
|
+
options: {
|
|
1909
|
+
layerId: string;
|
|
1910
|
+
};
|
|
1911
|
+
id: string;
|
|
1912
|
+
eventName: "onLayerFiltersChange";
|
|
1913
|
+
}>;
|
|
1889
1914
|
declare const GetRenderedFeaturesMessage: z.ZodObject<{
|
|
1890
1915
|
type: z.ZodLiteral<"getRenderedFeatures">;
|
|
1891
1916
|
params: z.ZodOptional<z.ZodObject<{
|
|
@@ -2027,8 +2052,8 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2027
2052
|
} | undefined;
|
|
2028
2053
|
}>>;
|
|
2029
2054
|
}, "strip", z.ZodTypeAny, {
|
|
2030
|
-
layerId: string;
|
|
2031
2055
|
attribute: string;
|
|
2056
|
+
layerId: string;
|
|
2032
2057
|
values?: {
|
|
2033
2058
|
boundary?: [number, number][] | {
|
|
2034
2059
|
type: "Polygon";
|
|
@@ -2047,8 +2072,8 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2047
2072
|
filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
|
|
2048
2073
|
limit?: number | undefined;
|
|
2049
2074
|
}, {
|
|
2050
|
-
layerId: string;
|
|
2051
2075
|
attribute: string;
|
|
2076
|
+
layerId: string;
|
|
2052
2077
|
values?: {
|
|
2053
2078
|
boundary?: [number, number][] | {
|
|
2054
2079
|
type: "Polygon";
|
|
@@ -2069,8 +2094,8 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2069
2094
|
}>;
|
|
2070
2095
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
2071
2096
|
params: {
|
|
2072
|
-
layerId: string;
|
|
2073
2097
|
attribute: string;
|
|
2098
|
+
layerId: string;
|
|
2074
2099
|
values?: {
|
|
2075
2100
|
boundary?: [number, number][] | {
|
|
2076
2101
|
type: "Polygon";
|
|
@@ -2092,8 +2117,8 @@ declare const GetLayerCategoriesMessage: z.ZodObject<{
|
|
|
2092
2117
|
type: "getCategoryData";
|
|
2093
2118
|
}, {
|
|
2094
2119
|
params: {
|
|
2095
|
-
layerId: string;
|
|
2096
2120
|
attribute: string;
|
|
2121
|
+
layerId: string;
|
|
2097
2122
|
values?: {
|
|
2098
2123
|
boundary?: [number, number][] | {
|
|
2099
2124
|
type: "Polygon";
|
|
@@ -2193,8 +2218,8 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2193
2218
|
} | undefined;
|
|
2194
2219
|
}>>;
|
|
2195
2220
|
}, "strip", z.ZodTypeAny, {
|
|
2196
|
-
layerId: string;
|
|
2197
2221
|
attribute: string;
|
|
2222
|
+
layerId: string;
|
|
2198
2223
|
steps: number[] | {
|
|
2199
2224
|
type: "equal-intervals";
|
|
2200
2225
|
count: number;
|
|
@@ -2219,8 +2244,8 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2219
2244
|
} | [number, number, number, number] | undefined;
|
|
2220
2245
|
filters?: boolean | [string | null, "in" | "ni", (string | number | boolean | null)[] | null] | [string | null, "lt" | "gt" | "le" | "ge" | "eq" | "ne" | "cn" | "nc" | "is" | "isnt", string | number | boolean | null] | FilterTernary | null | undefined;
|
|
2221
2246
|
}, {
|
|
2222
|
-
layerId: string;
|
|
2223
2247
|
attribute: string;
|
|
2248
|
+
layerId: string;
|
|
2224
2249
|
steps: number[] | {
|
|
2225
2250
|
type: "equal-intervals";
|
|
2226
2251
|
count: number;
|
|
@@ -2247,8 +2272,8 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2247
2272
|
}>;
|
|
2248
2273
|
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
2249
2274
|
params: {
|
|
2250
|
-
layerId: string;
|
|
2251
2275
|
attribute: string;
|
|
2276
|
+
layerId: string;
|
|
2252
2277
|
steps: number[] | {
|
|
2253
2278
|
type: "equal-intervals";
|
|
2254
2279
|
count: number;
|
|
@@ -2276,8 +2301,8 @@ declare const GetLayerHistogramMessage: z.ZodObject<{
|
|
|
2276
2301
|
type: "getHistogramData";
|
|
2277
2302
|
}, {
|
|
2278
2303
|
params: {
|
|
2279
|
-
layerId: string;
|
|
2280
2304
|
attribute: string;
|
|
2305
|
+
layerId: string;
|
|
2281
2306
|
steps: number[] | {
|
|
2282
2307
|
type: "equal-intervals";
|
|
2283
2308
|
count: number;
|
|
@@ -2406,6 +2431,7 @@ type LayersSchema = {
|
|
|
2406
2431
|
onLayerChange: Listener<zInfer<typeof OnLayerChangeMessage.shape.options>, LayerChangeCallbackParams>;
|
|
2407
2432
|
onLayerGroupChange: Listener<zInfer<typeof OnLayerGroupChangeMessage.shape.options>, LayerGroupChangeCallbackParams>;
|
|
2408
2433
|
onLegendItemChange: Listener<zInfer<typeof OnLegendItemChangeMessage.shape.options>, LegendItemChangeCallbackParams>;
|
|
2434
|
+
onLayerFiltersChange: Listener<zInfer<typeof OnLayerFiltersChangeMessage.shape.options>, LayerFilters>;
|
|
2409
2435
|
};
|
|
2410
2436
|
};
|
|
2411
2437
|
|
|
@@ -2549,6 +2575,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
2549
2575
|
symbol: z.ZodOptional<z.ZodString>;
|
|
2550
2576
|
color: z.ZodOptional<z.ZodString>;
|
|
2551
2577
|
frame: z.ZodOptional<z.ZodNullable<z.ZodEnum<["frame-circle", "frame-square"]>>>;
|
|
2578
|
+
afterCreation: z.ZodOptional<z.ZodEnum<["enter name", "add another", "select"]>>;
|
|
2552
2579
|
}, {
|
|
2553
2580
|
tool: z.ZodLiteral<"pin">;
|
|
2554
2581
|
}>, "strip", z.ZodTypeAny, {
|
|
@@ -2556,11 +2583,13 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
2556
2583
|
symbol?: string | undefined;
|
|
2557
2584
|
color?: string | undefined;
|
|
2558
2585
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
2586
|
+
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
2559
2587
|
}, {
|
|
2560
2588
|
tool: "pin";
|
|
2561
2589
|
symbol?: string | undefined;
|
|
2562
2590
|
color?: string | undefined;
|
|
2563
2591
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
2592
|
+
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
2564
2593
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
2565
2594
|
color: z.ZodOptional<z.ZodString>;
|
|
2566
2595
|
strokeOpacity: z.ZodOptional<z.ZodNumber>;
|
|
@@ -2732,6 +2761,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
2732
2761
|
symbol?: string | undefined;
|
|
2733
2762
|
color?: string | undefined;
|
|
2734
2763
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
2764
|
+
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
2735
2765
|
} | {
|
|
2736
2766
|
tool: "line";
|
|
2737
2767
|
color?: string | undefined;
|
|
@@ -2792,6 +2822,7 @@ declare const SetToolSettingsMessage: z.ZodObject<{
|
|
|
2792
2822
|
symbol?: string | undefined;
|
|
2793
2823
|
color?: string | undefined;
|
|
2794
2824
|
frame?: "frame-circle" | "frame-square" | null | undefined;
|
|
2825
|
+
afterCreation?: "enter name" | "add another" | "select" | undefined;
|
|
2795
2826
|
} | {
|
|
2796
2827
|
tool: "line";
|
|
2797
2828
|
color?: string | undefined;
|
|
@@ -2870,16 +2901,16 @@ type ToolsSchema = {
|
|
|
2870
2901
|
};
|
|
2871
2902
|
};
|
|
2872
2903
|
|
|
2873
|
-
declare const UiControlsMessage:
|
|
2874
|
-
type:
|
|
2875
|
-
params:
|
|
2876
|
-
showLegend:
|
|
2877
|
-
cooperativeGestures:
|
|
2878
|
-
fullScreenButton:
|
|
2879
|
-
geolocation:
|
|
2880
|
-
zoomControls:
|
|
2881
|
-
scaleBar:
|
|
2882
|
-
}, "strip",
|
|
2904
|
+
declare const UiControlsMessage: z.ZodObject<{
|
|
2905
|
+
type: z.ZodLiteral<"updateUiControls">;
|
|
2906
|
+
params: z.ZodObject<{
|
|
2907
|
+
showLegend: z.ZodOptional<z.ZodBoolean>;
|
|
2908
|
+
cooperativeGestures: z.ZodOptional<z.ZodBoolean>;
|
|
2909
|
+
fullScreenButton: z.ZodOptional<z.ZodBoolean>;
|
|
2910
|
+
geolocation: z.ZodOptional<z.ZodBoolean>;
|
|
2911
|
+
zoomControls: z.ZodOptional<z.ZodBoolean>;
|
|
2912
|
+
scaleBar: z.ZodOptional<z.ZodBoolean>;
|
|
2913
|
+
}, "strip", z.ZodTypeAny, {
|
|
2883
2914
|
showLegend?: boolean | undefined;
|
|
2884
2915
|
cooperativeGestures?: boolean | undefined;
|
|
2885
2916
|
fullScreenButton?: boolean | undefined;
|
|
@@ -2894,7 +2925,7 @@ declare const UiControlsMessage: zod.ZodObject<{
|
|
|
2894
2925
|
zoomControls?: boolean | undefined;
|
|
2895
2926
|
scaleBar?: boolean | undefined;
|
|
2896
2927
|
}>;
|
|
2897
|
-
},
|
|
2928
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
2898
2929
|
params: {
|
|
2899
2930
|
showLegend?: boolean | undefined;
|
|
2900
2931
|
cooperativeGestures?: boolean | undefined;
|
|
@@ -2915,15 +2946,15 @@ declare const UiControlsMessage: zod.ZodObject<{
|
|
|
2915
2946
|
};
|
|
2916
2947
|
type: "updateUiControls";
|
|
2917
2948
|
}>;
|
|
2918
|
-
declare const OnMapInteractionsMessage:
|
|
2919
|
-
type:
|
|
2920
|
-
params:
|
|
2921
|
-
featureSelectPanel:
|
|
2922
|
-
featureHoverPanel:
|
|
2923
|
-
elementSelectPanel:
|
|
2924
|
-
linkClickOpen:
|
|
2925
|
-
imageLightboxOpen:
|
|
2926
|
-
}, "strip",
|
|
2949
|
+
declare const OnMapInteractionsMessage: z.ZodObject<{
|
|
2950
|
+
type: z.ZodLiteral<"setOnMapInteractionsUi">;
|
|
2951
|
+
params: z.ZodObject<{
|
|
2952
|
+
featureSelectPanel: z.ZodOptional<z.ZodBoolean>;
|
|
2953
|
+
featureHoverPanel: z.ZodOptional<z.ZodBoolean>;
|
|
2954
|
+
elementSelectPanel: z.ZodOptional<z.ZodBoolean>;
|
|
2955
|
+
linkClickOpen: z.ZodOptional<z.ZodBoolean>;
|
|
2956
|
+
imageLightboxOpen: z.ZodOptional<z.ZodBoolean>;
|
|
2957
|
+
}, "strip", z.ZodTypeAny, {
|
|
2927
2958
|
featureSelectPanel?: boolean | undefined;
|
|
2928
2959
|
featureHoverPanel?: boolean | undefined;
|
|
2929
2960
|
elementSelectPanel?: boolean | undefined;
|
|
@@ -2936,7 +2967,7 @@ declare const OnMapInteractionsMessage: zod.ZodObject<{
|
|
|
2936
2967
|
linkClickOpen?: boolean | undefined;
|
|
2937
2968
|
imageLightboxOpen?: boolean | undefined;
|
|
2938
2969
|
}>;
|
|
2939
|
-
},
|
|
2970
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
2940
2971
|
params: {
|
|
2941
2972
|
featureSelectPanel?: boolean | undefined;
|
|
2942
2973
|
featureHoverPanel?: boolean | undefined;
|
|
@@ -2955,10 +2986,68 @@ declare const OnMapInteractionsMessage: zod.ZodObject<{
|
|
|
2955
2986
|
};
|
|
2956
2987
|
type: "setOnMapInteractionsUi";
|
|
2957
2988
|
}>;
|
|
2989
|
+
declare const ShowLayerDataTableMessage: z.ZodObject<{
|
|
2990
|
+
type: z.ZodLiteral<"showLayerDataTable">;
|
|
2991
|
+
params: z.ZodOptional<z.ZodObject<{
|
|
2992
|
+
layerId: z.ZodString;
|
|
2993
|
+
sorting: z.ZodOptional<z.ZodObject<{
|
|
2994
|
+
attribute: z.ZodString;
|
|
2995
|
+
direction: z.ZodEnum<["asc", "desc"]>;
|
|
2996
|
+
}, "strip", z.ZodTypeAny, {
|
|
2997
|
+
attribute: string;
|
|
2998
|
+
direction: "asc" | "desc";
|
|
2999
|
+
}, {
|
|
3000
|
+
attribute: string;
|
|
3001
|
+
direction: "asc" | "desc";
|
|
3002
|
+
}>>;
|
|
3003
|
+
}, "strip", z.ZodTypeAny, {
|
|
3004
|
+
layerId: string;
|
|
3005
|
+
sorting?: {
|
|
3006
|
+
attribute: string;
|
|
3007
|
+
direction: "asc" | "desc";
|
|
3008
|
+
} | undefined;
|
|
3009
|
+
}, {
|
|
3010
|
+
layerId: string;
|
|
3011
|
+
sorting?: {
|
|
3012
|
+
attribute: string;
|
|
3013
|
+
direction: "asc" | "desc";
|
|
3014
|
+
} | undefined;
|
|
3015
|
+
}>>;
|
|
3016
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
3017
|
+
type: "showLayerDataTable";
|
|
3018
|
+
params?: {
|
|
3019
|
+
layerId: string;
|
|
3020
|
+
sorting?: {
|
|
3021
|
+
attribute: string;
|
|
3022
|
+
direction: "asc" | "desc";
|
|
3023
|
+
} | undefined;
|
|
3024
|
+
} | undefined;
|
|
3025
|
+
}, {
|
|
3026
|
+
type: "showLayerDataTable";
|
|
3027
|
+
params?: {
|
|
3028
|
+
layerId: string;
|
|
3029
|
+
sorting?: {
|
|
3030
|
+
attribute: string;
|
|
3031
|
+
direction: "asc" | "desc";
|
|
3032
|
+
} | undefined;
|
|
3033
|
+
} | undefined;
|
|
3034
|
+
}>;
|
|
3035
|
+
declare const HideLayerDataTableMessage: z.ZodObject<{
|
|
3036
|
+
type: z.ZodLiteral<"hideLayerDataTable">;
|
|
3037
|
+
params: z.ZodUndefined;
|
|
3038
|
+
}, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
3039
|
+
type: "hideLayerDataTable";
|
|
3040
|
+
params?: undefined;
|
|
3041
|
+
}, {
|
|
3042
|
+
type: "hideLayerDataTable";
|
|
3043
|
+
params?: undefined;
|
|
3044
|
+
}>;
|
|
2958
3045
|
type UiSchema = {
|
|
2959
3046
|
methods: {
|
|
2960
3047
|
updateUiControls: Method<zInfer<typeof UiControlsMessage>, void>;
|
|
2961
3048
|
setOnMapInteractionsUi: Method<zInfer<typeof OnMapInteractionsMessage>, void>;
|
|
3049
|
+
showLayerDataTable: Method<zInfer<typeof ShowLayerDataTableMessage>, void>;
|
|
3050
|
+
hideLayerDataTable: Method<zInfer<typeof HideLayerDataTableMessage>, void>;
|
|
2962
3051
|
};
|
|
2963
3052
|
listeners: {};
|
|
2964
3053
|
};
|