@ogc-maps/storybook-components 0.13.0 → 0.15.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/{LayerPanel-SCdJ8948.js → LayerPanel-C6H74vhO.js} +14 -14
- package/dist/components/CollectionBrowser/CollectionBrowser.d.ts +3 -1
- package/dist/components/CollectionBrowser/CollectionBrowser.d.ts.map +1 -1
- package/dist/components/Cql2FilterEditor/Cql2FilterEditor.d.ts +9 -0
- package/dist/components/Cql2FilterEditor/Cql2FilterEditor.d.ts.map +1 -0
- package/dist/components/Cql2FilterEditor/Cql2Preview.d.ts +6 -0
- package/dist/components/Cql2FilterEditor/Cql2Preview.d.ts.map +1 -0
- package/dist/components/Cql2FilterEditor/FilterRuleEditor.d.ts +9 -0
- package/dist/components/Cql2FilterEditor/FilterRuleEditor.d.ts.map +1 -0
- package/dist/components/Cql2FilterEditor/FilterRuleGroupEditor.d.ts +10 -0
- package/dist/components/Cql2FilterEditor/FilterRuleGroupEditor.d.ts.map +1 -0
- package/dist/components/Cql2FilterEditor/FilterValueInput.d.ts +12 -0
- package/dist/components/Cql2FilterEditor/FilterValueInput.d.ts.map +1 -0
- package/dist/components/Cql2FilterEditor/index.d.ts +2 -0
- package/dist/components/Cql2FilterEditor/index.d.ts.map +1 -0
- package/dist/components/Cql2FilterEditor/operatorOptions.d.ts +9 -0
- package/dist/components/Cql2FilterEditor/operatorOptions.d.ts.map +1 -0
- package/dist/components/Cql2FilterEditor/styles.d.ts +3 -0
- package/dist/components/Cql2FilterEditor/styles.d.ts.map +1 -0
- package/dist/components/ImageryEditor/ImageryEditor.d.ts +13 -0
- package/dist/components/ImageryEditor/ImageryEditor.d.ts.map +1 -0
- package/dist/components/ImageryEditor/ImageryList.d.ts +8 -0
- package/dist/components/ImageryEditor/ImageryList.d.ts.map +1 -0
- package/dist/components/ImageryEditor/index.d.ts +5 -0
- package/dist/components/ImageryEditor/index.d.ts.map +1 -0
- package/dist/components/ImageryPanel/ImageryPanel.d.ts +10 -0
- package/dist/components/ImageryPanel/ImageryPanel.d.ts.map +1 -0
- package/dist/components/ImageryPanel/index.d.ts +3 -0
- package/dist/components/ImageryPanel/index.d.ts.map +1 -0
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/LayerPanel/index.js +1 -1
- package/dist/components/QueryPanel/QueryPanel.d.ts +14 -0
- package/dist/components/QueryPanel/QueryPanel.d.ts.map +1 -0
- package/dist/components/QueryPanel/index.d.ts +3 -0
- package/dist/components/QueryPanel/index.d.ts.map +1 -0
- package/dist/components/ResultsDrawer/ResultsDrawer.d.ts +18 -4
- package/dist/components/ResultsDrawer/ResultsDrawer.d.ts.map +1 -1
- package/dist/components/ResultsDrawer/index.d.ts +1 -1
- package/dist/components/ResultsDrawer/index.d.ts.map +1 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts +3 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
- package/dist/components/SourceEditor/SourceEditor.d.ts +2 -2
- package/dist/components/SourceEditor/SourceEditor.d.ts.map +1 -1
- package/dist/components/SourceEditor/SourceList.d.ts.map +1 -1
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts +2 -2
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -1
- package/dist/components/StyleEditor/PropertyField.d.ts +2 -2
- package/dist/components/StyleEditor/PropertyField.d.ts.map +1 -1
- package/dist/components/StyleEditor/PropertyGroup.d.ts +2 -2
- package/dist/components/StyleEditor/PropertyGroup.d.ts.map +1 -1
- package/dist/components/StyleEditor/StyleEditor.d.ts +2 -2
- package/dist/components/StyleEditor/StyleEditor.d.ts.map +1 -1
- package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
- package/dist/components/index.d.ts +9 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/geo-BXaVaxak.js +9707 -0
- package/dist/hooks/index.d.ts +6 -4
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +68 -52
- package/dist/hooks/useExport.d.ts +2 -8
- package/dist/hooks/useExport.d.ts.map +1 -1
- package/dist/hooks/useOgcCollections.d.ts +3 -2
- package/dist/hooks/useOgcCollections.d.ts.map +1 -1
- package/dist/hooks/useOgcFeatures.d.ts +2 -2
- package/dist/hooks/useOgcFeatures.d.ts.map +1 -1
- package/dist/index-CzYEPGO9.js +3571 -0
- package/dist/main.js +3182 -1971
- package/dist/schemas/config.d.ts +1833 -4763
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +18 -16
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +41 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +42 -29
- package/dist/useSelection-B1RnQZlj.js +206 -0
- package/dist/utils/cql2.d.ts +34 -5
- package/dist/utils/cql2.d.ts.map +1 -1
- package/dist/utils/exportConverters.d.ts +16 -0
- package/dist/utils/exportConverters.d.ts.map +1 -0
- package/dist/utils/geo.d.ts +6 -0
- package/dist/utils/geo.d.ts.map +1 -1
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +275 -0
- package/dist/utils/ogcApi.d.ts +63 -14
- package/dist/utils/ogcApi.d.ts.map +1 -1
- package/dist/utils/queryParameters.d.ts +22 -0
- package/dist/utils/queryParameters.d.ts.map +1 -0
- package/dist/utils/queryableHelpers.d.ts +4 -0
- package/dist/utils/queryableHelpers.d.ts.map +1 -1
- package/package.json +26 -15
- package/dist/components/PropertyDisplayEditor/__tests__/PropertyDisplayEditor.test.d.ts +0 -2
- package/dist/components/PropertyDisplayEditor/__tests__/PropertyDisplayEditor.test.d.ts.map +0 -1
- package/dist/geo-BxXVSJvJ.js +0 -1133
- package/dist/index-CtbLVsqD.js +0 -3011
- package/dist/schemas/__tests__/config.test.d.ts +0 -2
- package/dist/schemas/__tests__/config.test.d.ts.map +0 -1
- package/dist/utils/__tests__/cql2.test.d.ts +0 -2
- package/dist/utils/__tests__/cql2.test.d.ts.map +0 -1
- package/dist/utils/__tests__/expressionColors.test.d.ts +0 -2
- package/dist/utils/__tests__/expressionColors.test.d.ts.map +0 -1
- package/dist/utils/__tests__/propertyDisplay.test.d.ts +0 -2
- package/dist/utils/__tests__/propertyDisplay.test.d.ts.map +0 -1
- package/dist/utils/__tests__/queryableHelpers.test.d.ts +0 -2
- package/dist/utils/__tests__/queryableHelpers.test.d.ts.map +0 -1
- package/dist/utils/__tests__/wkt.test.d.ts +0 -2
- package/dist/utils/__tests__/wkt.test.d.ts.map +0 -1
package/dist/utils/cql2.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { FilterRule, FilterRuleGroup, RelativeDateValue, Cql2QueryShape } from '../types';
|
|
1
2
|
/**
|
|
2
3
|
* CQL2 JSON (OGC Common Query Language 2) types and builder utilities.
|
|
3
4
|
*
|
|
@@ -23,13 +24,16 @@ export type CQL2Timestamp = {
|
|
|
23
24
|
export type CQL2Interval = {
|
|
24
25
|
interval: [string, string];
|
|
25
26
|
};
|
|
27
|
+
/** CQL2 operators that appear in serialized expression nodes. */
|
|
28
|
+
export type CQL2Operator = '=' | '<>' | '>' | '>=' | '<' | '<=' | 'like' | 'in' | 'isNull' | 'and' | 'or' | 'not' | 't_after' | 't_before' | 't_during' | 's_intersects' | 's_within';
|
|
26
29
|
/**
|
|
27
|
-
* A CQL2 expression node.
|
|
28
|
-
*
|
|
29
|
-
* and
|
|
30
|
+
* A CQL2 expression node. The `op` field is constrained to operators
|
|
31
|
+
* that actually appear in serialized CQL2 JSON. UI-level operators like
|
|
32
|
+
* 'between' and 's_dwithin' decompose into simpler expressions before
|
|
33
|
+
* reaching this type.
|
|
30
34
|
*/
|
|
31
35
|
export type CQL2Expression = {
|
|
32
|
-
op:
|
|
36
|
+
op: CQL2Operator;
|
|
33
37
|
args: unknown[];
|
|
34
38
|
};
|
|
35
39
|
export declare function eq(property: string, value: string | number | boolean | CQL2Date | CQL2Timestamp): CQL2Expression;
|
|
@@ -67,7 +71,11 @@ export type CQL2Geometry = {
|
|
|
67
71
|
export declare function sIntersects(property: string, geometry: CQL2Geometry): CQL2Expression;
|
|
68
72
|
/** S_WITHIN — tests whether the first geometry is completely within the second. */
|
|
69
73
|
export declare function sWithin(property: string, geometry: CQL2Geometry): CQL2Expression;
|
|
70
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* S_DWITHIN — tests whether two geometries are within a specified distance.
|
|
76
|
+
* tipg/pygeofilter doesn't support s_dwithin directly, so we buffer the
|
|
77
|
+
* geometry client-side using turf and use s_intersects instead.
|
|
78
|
+
*/
|
|
71
79
|
export declare function sDwithin(property: string, geometry: CQL2Geometry, distance: number, units?: string): CQL2Expression;
|
|
72
80
|
/**
|
|
73
81
|
* Converts a simple key-value filter record to a CQL2 expression.
|
|
@@ -83,4 +91,25 @@ export declare function fromSimpleFilters(filters: Record<string, string | numbe
|
|
|
83
91
|
export declare function fromStructuredFilters(filters: Record<string, import('../types').SearchFilterValue>, fields: import('../types').SearchField[]): CQL2Expression | null;
|
|
84
92
|
/** Serializes a CQL2 expression to a JSON string for use as a query parameter. */
|
|
85
93
|
export declare function serializeCql2(expr: CQL2Expression): string;
|
|
94
|
+
/**
|
|
95
|
+
* Resolves a relative date value (e.g., "3 years ago") to an ISO timestamp string.
|
|
96
|
+
* Supports parameterized offsets resolved from `params`. The optional `now` parameter
|
|
97
|
+
* overrides the current date (useful for testing).
|
|
98
|
+
*/
|
|
99
|
+
export declare function resolveRelativeDate(value: RelativeDateValue, params?: Record<string, unknown>, now?: Date): string;
|
|
100
|
+
export declare function isFilterRuleGroup(item: FilterRule | FilterRuleGroup): item is FilterRuleGroup;
|
|
101
|
+
/**
|
|
102
|
+
* Converts a FilterRuleGroup (visual query builder model) to a CQL2Expression.
|
|
103
|
+
*
|
|
104
|
+
* @param group - The rule group to convert
|
|
105
|
+
* @param params - Runtime parameter values (for parameterized templates)
|
|
106
|
+
* @param selectionGeometry - Geometry from selected feature(s) for spatial operators
|
|
107
|
+
* @returns CQL2Expression or null if the group produces no valid expressions
|
|
108
|
+
*/
|
|
109
|
+
export declare function fromFilterRuleGroup(group: FilterRuleGroup, params?: Record<string, unknown>, selectionGeometry?: CQL2Geometry | null): CQL2Expression | null;
|
|
110
|
+
/**
|
|
111
|
+
* Builds a full query shape from a FilterRuleGroup, including sort and limit metadata.
|
|
112
|
+
* Use this when you need the complete query (filter + sort + limit) rather than just the CQL2 filter.
|
|
113
|
+
*/
|
|
114
|
+
export declare function buildCql2Query(group: FilterRuleGroup, params?: Record<string, unknown>, selectionGeometry?: CQL2Geometry | null): Cql2QueryShape;
|
|
86
115
|
//# sourceMappingURL=cql2.d.ts.map
|
package/dist/utils/cql2.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cql2.d.ts","sourceRoot":"","sources":["../../src/utils/cql2.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;
|
|
1
|
+
{"version":3,"file":"cql2.d.ts","sourceRoot":"","sources":["../../src/utils/cql2.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH,uEAAuE;AACvE,MAAM,MAAM,eAAe,GAAG;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,yDAAyD;AACzD,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,4EAA4E;AAC5E,MAAM,MAAM,aAAa,GAAG;IAAE,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC;AAElD,gFAAgF;AAChF,MAAM,MAAM,YAAY,GAAG;IAAE,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC;AAE1D,iEAAiE;AACjE,MAAM,MAAM,YAAY,GACpB,GAAG,GAAG,IAAI,GAAG,GAAG,GAAG,IAAI,GAAG,GAAG,GA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
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { GeoJsonFeature } from './ogcApi';
|
|
2
|
+
export type FormatConverter = (features: GeoJsonFeature[], collectionId: string) => Promise<{
|
|
3
|
+
blob: Blob;
|
|
4
|
+
filename: string;
|
|
5
|
+
}> | {
|
|
6
|
+
blob: Blob;
|
|
7
|
+
filename: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const csvConverter: FormatConverter;
|
|
10
|
+
export declare const geojsonConverter: FormatConverter;
|
|
11
|
+
export declare const kmlConverter: FormatConverter;
|
|
12
|
+
export declare const shapefileConverter: FormatConverter;
|
|
13
|
+
export declare const flatgeobufConverter: FormatConverter;
|
|
14
|
+
export declare const geopackageConverter: FormatConverter;
|
|
15
|
+
export declare const exportConverters: Record<string, FormatConverter>;
|
|
16
|
+
//# sourceMappingURL=exportConverters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportConverters.d.ts","sourceRoot":"","sources":["../../src/utils/exportConverters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAG/C,MAAM,MAAM,eAAe,GAAG,CAC5B,QAAQ,EAAE,cAAc,EAAE,EAC1B,YAAY,EAAE,MAAM,KACjB,OAAO,CAAC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC;AAalF,eAAO,MAAM,YAAY,EAAE,eAM1B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAM9B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,eAS1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,eAUhC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eASjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAqBjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAO5D,CAAC"}
|
package/dist/utils/geo.d.ts
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export type BBox = [number, number, number, number];
|
|
2
|
+
/**
|
|
3
|
+
* Combines multiple geometries into a single geometry.
|
|
4
|
+
* Returns the geometry directly if only one, or a GeometryCollection if multiple.
|
|
5
|
+
* Returns null if the array is empty.
|
|
6
|
+
*/
|
|
7
|
+
export declare function combineGeometries(geometries: Record<string, unknown>[]): Record<string, unknown> | null;
|
|
2
8
|
export declare function bboxFromGeometry(geometry: Record<string, unknown>): BBox | null;
|
|
3
9
|
//# sourceMappingURL=geo.d.ts.map
|
package/dist/utils/geo.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geo.d.ts","sourceRoot":"","sources":["../../src/utils/geo.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAkBpD,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CAqB/E"}
|
|
1
|
+
{"version":3,"file":"geo.d.ts","sourceRoot":"","sources":["../../src/utils/geo.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,IAAI,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;AAkBpD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAIvG;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GAAG,IAAI,CAqB/E"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -9,4 +9,9 @@ export * from './expressionColors';
|
|
|
9
9
|
export * from './measure';
|
|
10
10
|
export * from './selection';
|
|
11
11
|
export * from './boxDraw';
|
|
12
|
+
export * from './geo';
|
|
13
|
+
export * from './download';
|
|
14
|
+
export * from './exportFormats';
|
|
15
|
+
export * from './queryParameters';
|
|
16
|
+
export * from './exportConverters';
|
|
12
17
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { m as p } from "../geo-BXaVaxak.js";
|
|
2
|
+
import { D as z, aa as U, ac as M, a as N, b as O, c as j, d as L, e as R, f as $, ak as I, g as J, a6 as _, a7 as K, al as Q, am as V, a5 as W, h as X, a8 as H, ah as Y, an as Z, ai as x, ao as ee, ap as te, i as ae, j as re, a4 as oe, k as se, aq as ne, l as le, n as ie, o as ce, p as ue, q as fe, r as pe, s as ye, t as me, u as ge, v as be, ar as he, as as Te, w as Fe, ab as de, x as Se, y as Ce, z as we, at as ve, aj as Ge, A as Pe, B as Ae, C as ke, E as Be, F as De, G as qe, H as Ee, I as ze, J as Ue, au as Me, K as Ne, L as Oe, av as je, M as Le, N as Re, O as $e, P as Ie, Q as Je, R as _e, S as Ke, T as Qe, aw as Ve, U as We, V as Xe, W as He, X as Ye, Y as Ze, Z as xe, a9 as et, _ as tt, $ as at, a0 as rt, a1 as ot, a2 as st, a3 as nt, ag as lt } from "../geo-BXaVaxak.js";
|
|
3
|
+
const c = [
|
|
4
|
+
"#4e79a7",
|
|
5
|
+
"#f28e2b",
|
|
6
|
+
"#e15759",
|
|
7
|
+
"#76b7b2",
|
|
8
|
+
"#59a14f",
|
|
9
|
+
"#edc948",
|
|
10
|
+
"#b07aa1",
|
|
11
|
+
"#ff9da7",
|
|
12
|
+
"#9c755f",
|
|
13
|
+
"#bab0ac"
|
|
14
|
+
];
|
|
15
|
+
function S(e) {
|
|
16
|
+
return c[e % c.length];
|
|
17
|
+
}
|
|
18
|
+
function C(e) {
|
|
19
|
+
return Array.isArray(e);
|
|
20
|
+
}
|
|
21
|
+
function w(e) {
|
|
22
|
+
return e[0] === "match" ? "match" : e[0] === "interpolate" ? "interpolate" : null;
|
|
23
|
+
}
|
|
24
|
+
function v(e) {
|
|
25
|
+
if (e[0] === "match") {
|
|
26
|
+
const t = [];
|
|
27
|
+
for (let r = 3; r < e.length; r += 2)
|
|
28
|
+
typeof e[r] == "string" && t.push(e[r]);
|
|
29
|
+
const a = e[e.length - 1];
|
|
30
|
+
return typeof a == "string" && t.push(a), t;
|
|
31
|
+
}
|
|
32
|
+
if (e[0] === "interpolate") {
|
|
33
|
+
const t = [];
|
|
34
|
+
for (let a = 4; a < e.length; a += 2)
|
|
35
|
+
typeof e[a] == "string" && t.push(e[a]);
|
|
36
|
+
return t;
|
|
37
|
+
}
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
function G(e) {
|
|
41
|
+
if (e[0] === "match") {
|
|
42
|
+
const t = [];
|
|
43
|
+
for (let r = 2; r < e.length - 1; r += 2) {
|
|
44
|
+
const o = String(e[r]), s = e[r + 1];
|
|
45
|
+
typeof s == "string" && t.push({ label: o, color: s });
|
|
46
|
+
}
|
|
47
|
+
const a = e[e.length - 1];
|
|
48
|
+
return typeof a == "string" && t.push({ label: "Other", color: a }), t;
|
|
49
|
+
}
|
|
50
|
+
if (e[0] === "interpolate") {
|
|
51
|
+
const t = [];
|
|
52
|
+
for (let a = 3; a < e.length; a += 2) {
|
|
53
|
+
const r = String(e[a]), o = e[a + 1];
|
|
54
|
+
typeof o == "string" && t.push({ label: r, color: o });
|
|
55
|
+
}
|
|
56
|
+
return t;
|
|
57
|
+
}
|
|
58
|
+
return [];
|
|
59
|
+
}
|
|
60
|
+
function P(e) {
|
|
61
|
+
const t = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
|
|
62
|
+
if (Array.isArray(t)) {
|
|
63
|
+
if (t[0] === "get" && typeof t[1] == "string") return t[1];
|
|
64
|
+
if (t[0] === "to-number" && Array.isArray(t[1]) && t[1][0] === "get")
|
|
65
|
+
return t[1][1] ?? null;
|
|
66
|
+
}
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
function A(e) {
|
|
70
|
+
switch (e.type) {
|
|
71
|
+
case "fill":
|
|
72
|
+
return e.paint["fill-color"] ?? "#000000";
|
|
73
|
+
case "line":
|
|
74
|
+
return e.paint["line-color"] ?? "#000000";
|
|
75
|
+
case "circle":
|
|
76
|
+
return e.paint["circle-color"] ?? "#000000";
|
|
77
|
+
case "symbol":
|
|
78
|
+
return e.paint["text-color"] ?? e.paint["icon-color"] ?? "#000000";
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
function k(e) {
|
|
82
|
+
switch (e.type) {
|
|
83
|
+
case "fill":
|
|
84
|
+
return "square";
|
|
85
|
+
case "line":
|
|
86
|
+
return "line";
|
|
87
|
+
case "circle":
|
|
88
|
+
case "symbol":
|
|
89
|
+
return "circle";
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function y(e, t) {
|
|
93
|
+
const [a, r] = e, [o, s] = t;
|
|
94
|
+
return {
|
|
95
|
+
type: "Polygon",
|
|
96
|
+
coordinates: [[
|
|
97
|
+
[a, r],
|
|
98
|
+
[o, r],
|
|
99
|
+
[o, s],
|
|
100
|
+
[a, s],
|
|
101
|
+
[a, r]
|
|
102
|
+
]]
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
function B(e, t) {
|
|
106
|
+
return {
|
|
107
|
+
type: "Feature",
|
|
108
|
+
properties: {},
|
|
109
|
+
geometry: y(e, t)
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function l(e) {
|
|
113
|
+
return {
|
|
114
|
+
type: "FeatureCollection",
|
|
115
|
+
features: e.map((t) => ({
|
|
116
|
+
type: "Feature",
|
|
117
|
+
geometry: t.geometry,
|
|
118
|
+
properties: t.properties ?? {}
|
|
119
|
+
}))
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
const m = (e, t) => {
|
|
123
|
+
const a = p(e);
|
|
124
|
+
return {
|
|
125
|
+
blob: new Blob([a], { type: "text/csv;charset=utf-8;" }),
|
|
126
|
+
filename: `${t}.csv`
|
|
127
|
+
};
|
|
128
|
+
}, g = (e, t) => {
|
|
129
|
+
const a = l(e);
|
|
130
|
+
return {
|
|
131
|
+
blob: new Blob([JSON.stringify(a, null, 2)], { type: "application/geo+json" }),
|
|
132
|
+
filename: `${t}.geojson`
|
|
133
|
+
};
|
|
134
|
+
}, b = async (e, t) => {
|
|
135
|
+
const { toKML: a } = await import("@tmcw/tokml"), r = l(e), o = a(r);
|
|
136
|
+
return {
|
|
137
|
+
blob: new Blob([o], { type: "application/vnd.google-earth.kml+xml" }),
|
|
138
|
+
filename: `${t}.kml`
|
|
139
|
+
};
|
|
140
|
+
}, h = async (e, t) => {
|
|
141
|
+
var i;
|
|
142
|
+
const a = await import("shp-write"), r = l(e), s = await (((i = a.default) == null ? void 0 : i.zip) ?? a.zip)(r);
|
|
143
|
+
return {
|
|
144
|
+
blob: s instanceof Blob ? s : new Blob([s]),
|
|
145
|
+
filename: `${t}.zip`
|
|
146
|
+
};
|
|
147
|
+
}, T = async (e, t) => {
|
|
148
|
+
const { serialize: a } = await import("flatgeobuf/lib/mjs/geojson.js"), r = l(e), o = a(r);
|
|
149
|
+
return {
|
|
150
|
+
blob: new Blob([o], { type: "application/flatgeobuf" }),
|
|
151
|
+
filename: `${t}.fgb`
|
|
152
|
+
};
|
|
153
|
+
}, F = async (e, t) => {
|
|
154
|
+
const { GeoPackageAPI: a, setSqljsWasmLocateFile: r } = await import("@ngageoint/geopackage");
|
|
155
|
+
r((n) => `/${n}`);
|
|
156
|
+
const o = await a.create(), i = [...new Set(e.flatMap((n) => Object.keys(n.properties ?? {})))].map((n) => ({ name: n, dataType: "TEXT" }));
|
|
157
|
+
o.createFeatureTableFromProperties(t, i);
|
|
158
|
+
const u = l(e).features;
|
|
159
|
+
await o.addGeoJSONFeaturesToGeoPackage(u, t);
|
|
160
|
+
const f = await o.export();
|
|
161
|
+
return o.close(), {
|
|
162
|
+
blob: new Blob([f], { type: "application/geopackage+sqlite3" }),
|
|
163
|
+
filename: `${t}.gpkg`
|
|
164
|
+
};
|
|
165
|
+
}, D = {
|
|
166
|
+
csv: m,
|
|
167
|
+
geojson: g,
|
|
168
|
+
kml: b,
|
|
169
|
+
shapefile: h,
|
|
170
|
+
flatgeobuf: T,
|
|
171
|
+
geopackage: F
|
|
172
|
+
};
|
|
173
|
+
export {
|
|
174
|
+
z as DEFAULT_EXPORT_FORMATS,
|
|
175
|
+
U as UNITS_FOR_MODE,
|
|
176
|
+
M as UNIT_LABELS,
|
|
177
|
+
N as and,
|
|
178
|
+
O as appendAuth,
|
|
179
|
+
j as authHeaders,
|
|
180
|
+
L as bboxFromGeometry,
|
|
181
|
+
R as between,
|
|
182
|
+
B as buildBoxDrawData,
|
|
183
|
+
y as buildBoxPolygon,
|
|
184
|
+
$ as buildCql2Query,
|
|
185
|
+
I as buildDefaultStylesForGeometryTypes,
|
|
186
|
+
J as buildGeometryFilter,
|
|
187
|
+
_ as buildMeasureGeometryData,
|
|
188
|
+
K as buildMeasurePointsData,
|
|
189
|
+
Q as calculateArea,
|
|
190
|
+
V as calculateDistance,
|
|
191
|
+
W as calculateMeasurement,
|
|
192
|
+
X as combineGeometries,
|
|
193
|
+
m as csvConverter,
|
|
194
|
+
H as defaultUnitForMode,
|
|
195
|
+
Y as detectGeometryStyleTypesFromQueryables,
|
|
196
|
+
Z as detectGeometryTypeFromQueryables,
|
|
197
|
+
x as detectGeometryTypesFromFeatures,
|
|
198
|
+
ee as detectStyleTypeForCollection,
|
|
199
|
+
te as detectStyleTypesForCollection,
|
|
200
|
+
ae as detectTileSourceType,
|
|
201
|
+
re as downloadBlob,
|
|
202
|
+
oe as downloadCsv,
|
|
203
|
+
se as eq,
|
|
204
|
+
D as exportConverters,
|
|
205
|
+
v as expressionColors,
|
|
206
|
+
G as expressionEntries,
|
|
207
|
+
P as expressionPropertyName,
|
|
208
|
+
w as expressionType,
|
|
209
|
+
ne as extractGeometryType,
|
|
210
|
+
le as extractQueryParameters,
|
|
211
|
+
p as featuresToCsv,
|
|
212
|
+
ie as fetchCollectionDetail,
|
|
213
|
+
ce as fetchCollections,
|
|
214
|
+
ue as fetchConformance,
|
|
215
|
+
fe as fetchDistinctValues,
|
|
216
|
+
pe as fetchFeatureById,
|
|
217
|
+
ye as fetchFeatureCount,
|
|
218
|
+
me as fetchFeatures,
|
|
219
|
+
ge as fetchGenericTileJson,
|
|
220
|
+
be as fetchQueryables,
|
|
221
|
+
he as fetchSpriteNames,
|
|
222
|
+
Te as fetchSpriteUrlFromStyle,
|
|
223
|
+
Fe as fetchTileJson,
|
|
224
|
+
T as flatgeobufConverter,
|
|
225
|
+
de as formatMeasurement,
|
|
226
|
+
Se as fromFilterRuleGroup,
|
|
227
|
+
Ce as fromSimpleFilters,
|
|
228
|
+
we as fromStructuredFilters,
|
|
229
|
+
g as geojsonConverter,
|
|
230
|
+
ve as geometryTypeToStyleType,
|
|
231
|
+
Ge as geometryTypeToStyleTypes,
|
|
232
|
+
F as geopackageConverter,
|
|
233
|
+
S as getColorFromPalette,
|
|
234
|
+
Pe as getCql2FilteredVectorTileUrl,
|
|
235
|
+
Ae as getFilteredVectorTileUrl,
|
|
236
|
+
ke as getGeometryPropertyNames,
|
|
237
|
+
Be as getImageryTileUrl,
|
|
238
|
+
A as getPrimaryColor,
|
|
239
|
+
k as getShapeForStyleType,
|
|
240
|
+
De as getTileJsonUrl,
|
|
241
|
+
qe as getVectorTileSourceKey,
|
|
242
|
+
Ee as getVectorTileUrl,
|
|
243
|
+
ze as gt,
|
|
244
|
+
Ue as gte,
|
|
245
|
+
Me as humanizePropertyName,
|
|
246
|
+
Ne as inList,
|
|
247
|
+
C as isExpression,
|
|
248
|
+
Oe as isFilterRuleGroup,
|
|
249
|
+
je as isGeometryProperty,
|
|
250
|
+
Le as isNull,
|
|
251
|
+
b as kmlConverter,
|
|
252
|
+
Re as like,
|
|
253
|
+
$e as lt,
|
|
254
|
+
Ie as lte,
|
|
255
|
+
Je as neq,
|
|
256
|
+
_e as not,
|
|
257
|
+
Ke as or,
|
|
258
|
+
Qe as queryRequiresGeometry,
|
|
259
|
+
Ve as resolveAvailableIcons,
|
|
260
|
+
We as resolvePropertyDisplay,
|
|
261
|
+
Xe as resolveRelativeDate,
|
|
262
|
+
He as resolveStyleWithSprites,
|
|
263
|
+
Ye as sDwithin,
|
|
264
|
+
Ze as sIntersects,
|
|
265
|
+
xe as sWithin,
|
|
266
|
+
et as selectedFeatureKey,
|
|
267
|
+
tt as serializeCql2,
|
|
268
|
+
h as shapefileConverter,
|
|
269
|
+
at as stripTrailingSlash,
|
|
270
|
+
rt as tAfter,
|
|
271
|
+
ot as tBefore,
|
|
272
|
+
st as tDuring,
|
|
273
|
+
nt as tileSizeFromTileJson,
|
|
274
|
+
lt as toAvailableProperties
|
|
275
|
+
};
|
package/dist/utils/ogcApi.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CQL2Expression } from './cql2';
|
|
2
|
+
import { SourceAuth } from '../types';
|
|
2
3
|
/** A single OGC API collection. */
|
|
3
4
|
export interface OgcCollection {
|
|
4
5
|
id: string;
|
|
@@ -88,7 +89,11 @@ export interface TileJson {
|
|
|
88
89
|
description?: string;
|
|
89
90
|
fields?: Record<string, string>;
|
|
90
91
|
}>;
|
|
92
|
+
/** Non-standard extension (MapTiler): tile scale factor. "2.000000" or 2 means 512px tiles. */
|
|
93
|
+
scale?: string | number;
|
|
91
94
|
}
|
|
95
|
+
/** Derive tileSize from TileJSON scale field. Returns 512 for @2x tiles, 256 otherwise. */
|
|
96
|
+
export declare function tileSizeFromTileJson(tj: TileJson): number;
|
|
92
97
|
/** Options for fetchFeatures. */
|
|
93
98
|
export interface FetchFeaturesOptions {
|
|
94
99
|
bbox?: [number, number, number, number];
|
|
@@ -100,71 +105,96 @@ export interface FetchFeaturesOptions {
|
|
|
100
105
|
filter?: Record<string, string | number>;
|
|
101
106
|
/** CQL2 JSON filter expression. When provided, takes precedence over filter. */
|
|
102
107
|
cql2Filter?: CQL2Expression;
|
|
108
|
+
/** Sort fields for OGC API sortby parameter. */
|
|
109
|
+
sortby?: Array<{
|
|
110
|
+
property: string;
|
|
111
|
+
direction: 'asc' | 'desc';
|
|
112
|
+
}>;
|
|
103
113
|
}
|
|
114
|
+
export type { SourceAuth };
|
|
115
|
+
export declare function stripTrailingSlash(url: string): string;
|
|
116
|
+
/** Append query-param auth to a URL. No-op for header auth or undefined. */
|
|
117
|
+
export declare function appendAuth(url: string, auth?: SourceAuth): string;
|
|
118
|
+
/** Build headers object for header auth. Empty for query-param auth or undefined. */
|
|
119
|
+
export declare function authHeaders(auth?: SourceAuth): Record<string, string>;
|
|
104
120
|
/**
|
|
105
121
|
* Fetch the list of collections from an OGC API endpoint.
|
|
122
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
106
123
|
*/
|
|
107
|
-
export declare function fetchCollections(baseUrl: string): Promise<OgcCollection[]>;
|
|
124
|
+
export declare function fetchCollections(baseUrl: string, auth?: SourceAuth): Promise<OgcCollection[]>;
|
|
108
125
|
/**
|
|
109
126
|
* Fetch GeoJSON features from an OGC API collection.
|
|
127
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
110
128
|
*/
|
|
111
|
-
export declare function fetchFeatures(baseUrl: string, collection: string, options?: FetchFeaturesOptions): Promise<OgcFeatureCollection>;
|
|
129
|
+
export declare function fetchFeatures(baseUrl: string, collection: string, options?: FetchFeaturesOptions, auth?: SourceAuth): Promise<OgcFeatureCollection>;
|
|
112
130
|
/**
|
|
113
131
|
* Fetch a single feature by ID from an OGC API collection.
|
|
114
|
-
*
|
|
132
|
+
*
|
|
133
|
+
* Unlike other fetch functions in this module, this function catches errors
|
|
134
|
+
* and returns `null` instead of throwing. This is intentional: "find by ID"
|
|
135
|
+
* is a lookup pattern where not-found (404) is an expected outcome, not an
|
|
136
|
+
* exceptional condition.
|
|
137
|
+
*
|
|
138
|
+
* @returns The feature if found, or `null` if not found or the request fails.
|
|
115
139
|
*/
|
|
116
|
-
export declare function fetchFeatureById(baseUrl: string, collection: string, featureId: string | number): Promise<GeoJsonFeature | null>;
|
|
140
|
+
export declare function fetchFeatureById(baseUrl: string, collection: string, featureId: string | number, auth?: SourceAuth): Promise<GeoJsonFeature | null>;
|
|
117
141
|
/**
|
|
118
142
|
* Fetch queryable properties for a collection.
|
|
143
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
119
144
|
*/
|
|
120
|
-
export declare function fetchQueryables(baseUrl: string, collection: string): Promise<OgcQueryables>;
|
|
145
|
+
export declare function fetchQueryables(baseUrl: string, collection: string, auth?: SourceAuth): Promise<OgcQueryables>;
|
|
121
146
|
/**
|
|
122
147
|
* Fetch metadata for a single OGC API collection.
|
|
148
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
123
149
|
*/
|
|
124
|
-
export declare function fetchCollectionDetail(baseUrl: string, collectionId: string): Promise<OgcCollection>;
|
|
150
|
+
export declare function fetchCollectionDetail(baseUrl: string, collectionId: string, auth?: SourceAuth): Promise<OgcCollection>;
|
|
125
151
|
/**
|
|
126
152
|
* Fetch the OGC API conformance declaration to discover server capabilities.
|
|
153
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
127
154
|
*/
|
|
128
|
-
export declare function fetchConformance(baseUrl: string): Promise<OgcConformance>;
|
|
155
|
+
export declare function fetchConformance(baseUrl: string, auth?: SourceAuth): Promise<OgcConformance>;
|
|
129
156
|
/**
|
|
130
157
|
* Fetch the TileJSON document for a collection's vector tiles.
|
|
158
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
131
159
|
*/
|
|
132
|
-
export declare function fetchTileJson(baseUrl: string, collection: string, tileMatrixSetId?: string): Promise<TileJson>;
|
|
160
|
+
export declare function fetchTileJson(baseUrl: string, collection: string, tileMatrixSetId?: string, auth?: SourceAuth): Promise<TileJson>;
|
|
133
161
|
/**
|
|
134
162
|
* Fetch the total feature count for a collection (optionally filtered).
|
|
135
163
|
* Uses limit=0 and reads `numberMatched` from the response.
|
|
136
164
|
* Returns null if the server does not report numberMatched.
|
|
165
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
137
166
|
*/
|
|
138
|
-
export declare function fetchFeatureCount(baseUrl: string, collection: string, options?: Omit<FetchFeaturesOptions, 'limit' | 'offset' | 'properties'
|
|
167
|
+
export declare function fetchFeatureCount(baseUrl: string, collection: string, options?: Omit<FetchFeaturesOptions, 'limit' | 'offset' | 'properties'>, auth?: SourceAuth): Promise<number | null>;
|
|
139
168
|
/**
|
|
140
169
|
* Build the TileJSON URL for a collection's vector tiles.
|
|
141
170
|
*/
|
|
142
|
-
export declare function getTileJsonUrl(baseUrl: string, collection: string, tileMatrixSetId?: string): string;
|
|
171
|
+
export declare function getTileJsonUrl(baseUrl: string, collection: string, tileMatrixSetId?: string, auth?: SourceAuth): string;
|
|
143
172
|
/**
|
|
144
173
|
* Build the vector tile URL template for a collection.
|
|
145
174
|
* Returns a URL with `{z}/{x}/{y}` placeholders suitable for MapLibre.
|
|
146
175
|
*/
|
|
147
|
-
export declare function getVectorTileUrl(baseUrl: string, collection: string, tileMatrixSetId?: string): string;
|
|
176
|
+
export declare function getVectorTileUrl(baseUrl: string, collection: string, tileMatrixSetId?: string, auth?: SourceAuth): string;
|
|
148
177
|
/**
|
|
149
178
|
* Build a vector tile URL template with optional property filters applied as query parameters.
|
|
150
179
|
* Returns a URL with `{z}/{x}/{y}` placeholders suitable for MapLibre.
|
|
151
180
|
*/
|
|
152
|
-
export declare function getFilteredVectorTileUrl(baseUrl: string, collection: string, filter?: Record<string, string | number>, tileMatrixSetId?: string): string;
|
|
181
|
+
export declare function getFilteredVectorTileUrl(baseUrl: string, collection: string, filter?: Record<string, string | number>, tileMatrixSetId?: string, auth?: SourceAuth): string;
|
|
153
182
|
/**
|
|
154
183
|
* Fetch distinct non-null string values for a property in an OGC API collection.
|
|
155
184
|
* Optionally filters by a substring query using a CQL2 `like` filter.
|
|
185
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
156
186
|
*/
|
|
157
187
|
export declare function fetchDistinctValues(baseUrl: string, collection: string, property: string, options?: {
|
|
158
188
|
query?: string;
|
|
159
189
|
limit?: number;
|
|
160
190
|
fetchAll?: boolean;
|
|
161
191
|
maxFeatures?: number;
|
|
162
|
-
}): Promise<string[]>;
|
|
192
|
+
}, auth?: SourceAuth): Promise<string[]>;
|
|
163
193
|
/**
|
|
164
194
|
* Build a vector tile URL template with a CQL2 JSON filter applied.
|
|
165
195
|
* Returns a URL with `{z}/{x}/{y}` placeholders suitable for MapLibre.
|
|
166
196
|
*/
|
|
167
|
-
export declare function getCql2FilteredVectorTileUrl(baseUrl: string, collection: string, cql2Filter?: CQL2Expression | null, tileMatrixSetId?: string): string;
|
|
197
|
+
export declare function getCql2FilteredVectorTileUrl(baseUrl: string, collection: string, cql2Filter?: CQL2Expression | null, tileMatrixSetId?: string, auth?: SourceAuth): string;
|
|
168
198
|
/**
|
|
169
199
|
* Build a stable source key for a vector tile layer, incorporating the CQL2 filter.
|
|
170
200
|
* When the filter changes, the key changes, forcing MapLibre to re-fetch tiles.
|
|
@@ -175,4 +205,23 @@ export declare function getVectorTileSourceKey(layerId: string, cql2Filter?: CQL
|
|
|
175
205
|
* geometry types a layer renders.
|
|
176
206
|
*/
|
|
177
207
|
export declare function buildGeometryFilter(types: string[]): any;
|
|
208
|
+
/**
|
|
209
|
+
* Build a raster imagery tile URL template for MapLibre.
|
|
210
|
+
* If a custom tileUrlTemplate is provided, use it directly.
|
|
211
|
+
* Otherwise, construct the OGC API Tiles standard pattern.
|
|
212
|
+
*/
|
|
213
|
+
export declare function getImageryTileUrl(baseUrl: string, collection: string, tileMatrixSetId?: string, tileUrlTemplate?: string, auth?: SourceAuth): string;
|
|
214
|
+
/**
|
|
215
|
+
* Fetch a TileJSON document from any URL (not OGC-specific).
|
|
216
|
+
* Works with MapTiler, Mapbox, and any TileJSON-compliant endpoint.
|
|
217
|
+
* @throws {Error} If the request fails or the response status is not OK.
|
|
218
|
+
*/
|
|
219
|
+
export declare function fetchGenericTileJson(tileJsonUrl: string, auth?: SourceAuth): Promise<TileJson>;
|
|
220
|
+
/**
|
|
221
|
+
* Detect the type of a tile source URL.
|
|
222
|
+
* Returns 'tilejson' if URL likely points to a TileJSON document,
|
|
223
|
+
* 'xyz' if it contains {z}/{x}/{y} placeholders,
|
|
224
|
+
* or 'ogc-api' otherwise.
|
|
225
|
+
*/
|
|
226
|
+
export declare function detectTileSourceType(url: string): 'tilejson' | 'xyz' | 'ogc-api';
|
|
178
227
|
//# sourceMappingURL=ogcApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ogcApi.d.ts","sourceRoot":"","sources":["../../src/utils/ogcApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ogcApi.d.ts","sourceRoot":"","sources":["../../src/utils/ogcApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,mCAAmC;AACnC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC3E,MAAM,CAAC,EAAE;QACP,OAAO,CAAC,EAAE;YAAE,IAAI,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC;YAAC,GAAG,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;QAC9C,QAAQ,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,CAAA;SAAE,CAAC;KACjE,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,yCAAyC;AACzC,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,aAAa,EAAE,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI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
+
import { FilterRuleGroup } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* A user-facing parameter extracted from a CQL2 filter template.
|
|
4
|
+
* Used to render input fields in the QueryPanel.
|
|
5
|
+
*/
|
|
6
|
+
export interface QueryParameter {
|
|
7
|
+
name: string;
|
|
8
|
+
label: string;
|
|
9
|
+
inputType: 'text' | 'number' | 'date' | 'select';
|
|
10
|
+
default?: string | number;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Walks a FilterRuleGroup tree and extracts all parameterized values
|
|
14
|
+
* that the user needs to fill in at runtime. Deduplicates by name.
|
|
15
|
+
*/
|
|
16
|
+
export declare function extractQueryParameters(group: FilterRuleGroup): QueryParameter[];
|
|
17
|
+
/**
|
|
18
|
+
* Returns true if the filter group contains any spatial operators
|
|
19
|
+
* that require a selection geometry at runtime.
|
|
20
|
+
*/
|
|
21
|
+
export declare function queryRequiresGeometry(group: FilterRuleGroup): boolean;
|
|
22
|
+
//# sourceMappingURL=queryParameters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"queryParameters.d.ts","sourceRoot":"","sources":["../../src/utils/queryParameters.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,eAAe,EAAE,MAAM,UAAU,CAAC;AAI5D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;IACjD,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,eAAe,GAAG,cAAc,EAAE,CA4D/E;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAYrE"}
|
|
@@ -29,6 +29,10 @@ export declare function detectGeometryTypeFromQueryables(queryables: OgcQueryabl
|
|
|
29
29
|
* returns all suitable style types, or an empty array if none found.
|
|
30
30
|
*/
|
|
31
31
|
export declare function detectGeometryStyleTypesFromQueryables(queryables: OgcQueryables): ('fill' | 'line' | 'circle' | 'symbol')[];
|
|
32
|
+
/**
|
|
33
|
+
* Returns the names of all geometry properties in a queryables document.
|
|
34
|
+
*/
|
|
35
|
+
export declare function getGeometryPropertyNames(queryables: OgcQueryables): string[];
|
|
32
36
|
/**
|
|
33
37
|
* Filters out geometry properties and maps the rest to AvailableProperty[].
|
|
34
38
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"queryableHelpers.d.ts","sourceRoot":"","sources":["../../src/utils/queryableHelpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAI/D,kFAAkF;AAClF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAEnE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG9D;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAMtG;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAMpG;AAED;;;GAGG;AACH,wBAAgB,gCAAgC,CAC9C,UAAU,EAAE,aAAa,GACxB,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAQ9C;AAED;;;GAGG;AACH,wBAAgB,sCAAsC,CACpD,UAAU,EAAE,aAAa,G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