@ogc-maps/storybook-components 0.9.0 → 0.10.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/{CollapsibleControl-CGRNPpCw.js → CollapsibleControl-qo9daiD8.js} +5 -5
- package/dist/ExportButton-BsNrOvRE.js +25 -0
- package/dist/Legend-BLWBzD7Y.js +275 -0
- package/dist/SearchPanel-4Y12jfuP.js +401 -0
- package/dist/components/CollapsibleControl/index.js +1 -1
- package/dist/components/ExportButton/ExportButton.d.ts +2 -8
- package/dist/components/ExportButton/ExportButton.d.ts.map +1 -1
- package/dist/components/ExportButton/index.d.ts +1 -1
- package/dist/components/ExportButton/index.d.ts.map +1 -1
- package/dist/components/ExportButton/index.js +1 -1
- package/dist/components/ExportModal/ExportModal.d.ts +29 -0
- package/dist/components/ExportModal/ExportModal.d.ts.map +1 -0
- package/dist/components/ExportModal/index.d.ts +3 -0
- package/dist/components/ExportModal/index.d.ts.map +1 -0
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/Legend/Legend.d.ts.map +1 -1
- package/dist/components/Legend/index.js +1 -1
- package/dist/components/MeasurePanel/MeasurePanel.d.ts +13 -0
- package/dist/components/MeasurePanel/MeasurePanel.d.ts.map +1 -0
- package/dist/components/MeasurePanel/index.d.ts +3 -0
- package/dist/components/MeasurePanel/index.d.ts.map +1 -0
- package/dist/components/SearchFieldEditor/SearchFieldEditor.d.ts.map +1 -1
- package/dist/components/SearchPanel/NumberInput.d.ts.map +1 -1
- package/dist/components/SearchPanel/SearchPanel.d.ts +2 -1
- package/dist/components/SearchPanel/SearchPanel.d.ts.map +1 -1
- package/dist/components/SearchPanel/index.js +1 -1
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -1
- package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
- package/dist/components/index.d.ts +5 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/geo-CIJBPCVe.js +1038 -0
- package/dist/hooks/index.d.ts +5 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +40 -35
- package/dist/hooks/useExport.d.ts +22 -0
- package/dist/hooks/useExport.d.ts.map +1 -0
- package/dist/hooks/useMeasure.d.ts +15 -0
- package/dist/hooks/useMeasure.d.ts.map +1 -0
- package/dist/{index-UmK2u6Yd.js → index-DA_GGs_P.js} +296 -291
- package/dist/main.js +1370 -1031
- package/dist/schemas/config.d.ts +131 -0
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/index.js +1 -1
- package/dist/utils/cql2.d.ts.map +1 -1
- package/dist/utils/csvExport.d.ts.map +1 -1
- package/dist/utils/download.d.ts +2 -0
- package/dist/utils/download.d.ts.map +1 -0
- package/dist/utils/expressionColors.d.ts.map +1 -1
- package/dist/utils/geo.d.ts +3 -0
- package/dist/utils/geo.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/measure.d.ts +49 -0
- package/dist/utils/measure.d.ts.map +1 -0
- package/package.json +6 -3
- package/dist/ExportButton-CLsWoW4m.js +0 -77
- package/dist/Legend-CwaZA84A.js +0 -273
- package/dist/SearchPanel-DtLXMoVs.js +0 -363
- package/dist/cql2-DOJnQwcv.js +0 -440
package/dist/hooks/index.d.ts
CHANGED
|
@@ -2,12 +2,17 @@ import { SearchField } from '../types';
|
|
|
2
2
|
export { useOgcCollections, type UseOgcCollectionsResult } from './useOgcCollections';
|
|
3
3
|
export { useOgcFeatures, type UseOgcFeaturesResult } from './useOgcFeatures';
|
|
4
4
|
export { useCsvExport, type UseCsvExportOptions, type UseCsvExportResult } from './useCsvExport';
|
|
5
|
+
export { useExport, type UseExportOptions, type UseExportResult, type FormatConverter } from './useExport';
|
|
6
|
+
export { featuresToCsv, type CsvExportOptions } from '../utils/csvExport';
|
|
7
|
+
export { downloadBlob } from '../utils/download';
|
|
5
8
|
export { useOgcQueryables, type UseOgcQueryablesResult } from './useOgcQueryables';
|
|
6
9
|
export { useOgcCollectionDetail, type UseOgcCollectionDetailResult } from './useOgcCollectionDetail';
|
|
10
|
+
export { useMeasure, type UseMeasureResult } from './useMeasure';
|
|
7
11
|
export type { OgcApiSource, LayerConfig, MapConfig, UIConfig, ViewConfig, StyleConfig, FilterConfig, LegendConfig, SearchConfig, SearchField, TextSearchField, NumberSearchField, DatetimeSearchField, SelectSearchField, PropertyDisplay, PropertyDisplayConfig, } from '../types';
|
|
8
12
|
export { resolvePropertyDisplay } from '../utils/propertyDisplay';
|
|
9
13
|
export { resolveStyleWithSprites } from '../utils/spriteUtils';
|
|
10
14
|
export type SearchFieldType = SearchField['type'];
|
|
11
15
|
export { fetchCollections, fetchFeatures, fetchQueryables, fetchCollectionDetail, fetchConformance, fetchTileJson, fetchFeatureCount, fetchDistinctValues, getFilteredVectorTileUrl, getCql2FilteredVectorTileUrl, getTileJsonUrl, getVectorTileUrl, type OgcCollection, type OgcCollectionsResponse, type GeoJsonFeature, type OgcFeatureCollection, type OgcQueryables, type OgcConformance, type TileJson, type QueryableProperty, type FetchFeaturesOptions, } from '../utils/ogcApi';
|
|
12
16
|
export { eq, neq, gt, gte, lt, lte, between, like, inList, isNull, and, or, not, tAfter, tBefore, tDuring, fromSimpleFilters, fromStructuredFilters, serializeCql2, type CQL2Expression, type CQL2PropertyRef, type CQL2Date, type CQL2Timestamp, type CQL2Interval, } from '../utils/cql2';
|
|
17
|
+
export { bboxFromGeometry, type BBox } from '../utils/geo';
|
|
13
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAq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YAAY,EACZ,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,eAAe,EACf,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,MAAM,MAAM,eAAe,GAAG,WAAW,CAAC,MAAM,CAAC,CAAC;AAClD,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,4BAA4B,EAC5B,cAAc,EACd,gBAAgB,EAChB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,cAAc,EACnB,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,EAAE,EACF,GAAG,EACH,OAAO,EACP,IAAI,EACJ,MAAM,EACN,MAAM,EACN,GAAG,EACH,EAAE,EACF,GAAG,EACH,MAAM,EACN,OAAO,EACP,OAAO,EACP,iBAAiB,EACjB,qBAAqB,EACrB,aAAa,EACb,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC"}
|
package/dist/hooks/index.js
CHANGED
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
import { a, b as t,
|
|
1
|
+
import { a, b as t, c as l, d as r, e as o, f as i, g as c, h as u, i as n, j as f, k as g, l as C, m as h, n as F, o as m, p, q as b, r as d, s as y, t as D, u as T, v as q, w as v, x, y as O, z as S, A as U, B as V, C as w, D as B, E, F as J, G as Q, H as k, I as z, J as A, K as G, L, M, N, O as P, P as j, Q as H } from "../geo-CIJBPCVe.js";
|
|
2
2
|
export {
|
|
3
3
|
a as and,
|
|
4
|
-
t as
|
|
5
|
-
l as
|
|
6
|
-
r as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
c as
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
f as
|
|
13
|
-
g as
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
F as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
T as
|
|
24
|
-
|
|
25
|
-
v as
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
4
|
+
t as bboxFromGeometry,
|
|
5
|
+
l as between,
|
|
6
|
+
r as downloadBlob,
|
|
7
|
+
o as eq,
|
|
8
|
+
i as featuresToCsv,
|
|
9
|
+
c as fetchCollectionDetail,
|
|
10
|
+
u as fetchCollections,
|
|
11
|
+
n as fetchConformance,
|
|
12
|
+
f as fetchDistinctValues,
|
|
13
|
+
g as fetchFeatureCount,
|
|
14
|
+
C as fetchFeatures,
|
|
15
|
+
h as fetchQueryables,
|
|
16
|
+
F as fetchTileJson,
|
|
17
|
+
m as fromSimpleFilters,
|
|
18
|
+
p as fromStructuredFilters,
|
|
19
|
+
b as getCql2FilteredVectorTileUrl,
|
|
20
|
+
d as getFilteredVectorTileUrl,
|
|
21
|
+
y as getTileJsonUrl,
|
|
22
|
+
D as getVectorTileUrl,
|
|
23
|
+
T as gt,
|
|
24
|
+
q as gte,
|
|
25
|
+
v as inList,
|
|
26
|
+
x as isNull,
|
|
27
|
+
O as like,
|
|
28
|
+
S as lt,
|
|
29
|
+
U as lte,
|
|
30
|
+
V as neq,
|
|
31
|
+
w as not,
|
|
32
|
+
B as or,
|
|
33
|
+
E as resolvePropertyDisplay,
|
|
31
34
|
J as resolveStyleWithSprites,
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
Q as serializeCql2,
|
|
36
|
+
k as tAfter,
|
|
34
37
|
z as tBefore,
|
|
35
38
|
A as tDuring,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
G as useCsvExport,
|
|
40
|
+
L as useExport,
|
|
41
|
+
M as useMeasure,
|
|
42
|
+
N as useOgcCollectionDetail,
|
|
43
|
+
P as useOgcCollections,
|
|
44
|
+
j as useOgcFeatures,
|
|
45
|
+
H as useOgcQueryables
|
|
41
46
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GeoJsonFeature } from '../utils/ogcApi';
|
|
2
|
+
import { CQL2Expression } from '../utils/cql2';
|
|
3
|
+
export type FormatConverter = (features: GeoJsonFeature[], collectionId: string) => Promise<{
|
|
4
|
+
blob: Blob;
|
|
5
|
+
filename: string;
|
|
6
|
+
}> | {
|
|
7
|
+
blob: Blob;
|
|
8
|
+
filename: string;
|
|
9
|
+
};
|
|
10
|
+
export interface UseExportOptions {
|
|
11
|
+
baseUrl: string;
|
|
12
|
+
limit?: number;
|
|
13
|
+
converters: Record<string, FormatConverter>;
|
|
14
|
+
}
|
|
15
|
+
export interface UseExportResult {
|
|
16
|
+
runExport: (collectionId: string, formatId: string, filename: string, cql2Filter?: CQL2Expression) => Promise<void>;
|
|
17
|
+
loading: boolean;
|
|
18
|
+
progress: string | null;
|
|
19
|
+
error: Error | null;
|
|
20
|
+
}
|
|
21
|
+
export declare function useExport({ baseUrl, limit, converters, }: UseExportOptions): UseExportResult;
|
|
22
|
+
//# sourceMappingURL=useExport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useExport.d.ts","sourceRoot":"","sources":["../../src/hooks/useExport.ts"],"names":[],"mappings":"AACA,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAErE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,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;AAElF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,CACT,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,cAAc,KACxB,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,KAAe,EACf,UAAU,GACX,EAAE,gBAAgB,GAAG,eAAe,CAkEpC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { MeasureMode, MeasureUnit, Measurement } from '../utils/measure';
|
|
2
|
+
export interface UseMeasureResult {
|
|
3
|
+
mode: MeasureMode | null;
|
|
4
|
+
points: [number, number][];
|
|
5
|
+
unit: MeasureUnit;
|
|
6
|
+
measurement: Measurement | null;
|
|
7
|
+
geometryData: GeoJSON.Feature | null;
|
|
8
|
+
pointsData: GeoJSON.FeatureCollection | null;
|
|
9
|
+
setMode: (mode: MeasureMode | null) => void;
|
|
10
|
+
setUnit: (unit: MeasureUnit) => void;
|
|
11
|
+
addPoint: (point: [number, number]) => void;
|
|
12
|
+
clear: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function useMeasure(): UseMeasureResult;
|
|
15
|
+
//# sourceMappingURL=useMeasure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMeasure.d.ts","sourceRoot":"","sources":["../../src/hooks/useMeasure.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG9E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,WAAW,GAAG,IAAI,CAAC;IACzB,MAAM,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC;IAC3B,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC;IACrC,UAAU,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAC7C,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IAC5C,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAED,wBAAgB,UAAU,IAAI,gBAAgB,CAmC7C"}
|