@ogc-maps/storybook-components 0.10.0 → 0.12.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.
Files changed (49) hide show
  1. package/dist/FeatureTooltip-DxzN-jnp.js +49 -0
  2. package/dist/components/FeatureTooltip/FeatureTooltip.d.ts +12 -2
  3. package/dist/components/FeatureTooltip/FeatureTooltip.d.ts.map +1 -1
  4. package/dist/components/FeatureTooltip/index.js +1 -1
  5. package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
  6. package/dist/components/LayerEditor/LayerList.d.ts.map +1 -1
  7. package/dist/components/ResultsDrawer/ResultsDrawer.d.ts +15 -0
  8. package/dist/components/ResultsDrawer/ResultsDrawer.d.ts.map +1 -0
  9. package/dist/components/ResultsDrawer/index.d.ts +3 -0
  10. package/dist/components/ResultsDrawer/index.d.ts.map +1 -0
  11. package/dist/components/SelectionPanel/SelectionPanel.d.ts +15 -0
  12. package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -0
  13. package/dist/components/SelectionPanel/index.d.ts +3 -0
  14. package/dist/components/SelectionPanel/index.d.ts.map +1 -0
  15. package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
  16. package/dist/components/admin/CollapsibleSection.d.ts +1 -1
  17. package/dist/components/admin/CollapsibleSection.d.ts.map +1 -1
  18. package/dist/components/index.d.ts +6 -2
  19. package/dist/components/index.d.ts.map +1 -1
  20. package/dist/geo--Ta-t__y.js +1124 -0
  21. package/dist/hooks/index.d.ts +4 -2
  22. package/dist/hooks/index.d.ts.map +1 -1
  23. package/dist/hooks/index.js +47 -40
  24. package/dist/hooks/useSelection.d.ts +14 -0
  25. package/dist/hooks/useSelection.d.ts.map +1 -0
  26. package/dist/{index-DA_GGs_P.js → index-CqBeCxon.js} +203 -190
  27. package/dist/main.js +1494 -1208
  28. package/dist/schemas/config.d.ts +118 -0
  29. package/dist/schemas/config.d.ts.map +1 -1
  30. package/dist/schemas/index.d.ts +1 -1
  31. package/dist/schemas/index.d.ts.map +1 -1
  32. package/dist/schemas/index.js +22 -20
  33. package/dist/style.css +1 -1
  34. package/dist/types/index.d.ts +3 -2
  35. package/dist/types/index.d.ts.map +1 -1
  36. package/dist/types/index.js +30 -29
  37. package/dist/utils/boxDraw.d.ts +5 -0
  38. package/dist/utils/boxDraw.d.ts.map +1 -0
  39. package/dist/utils/cql2.d.ts +11 -0
  40. package/dist/utils/cql2.d.ts.map +1 -1
  41. package/dist/utils/index.d.ts +2 -0
  42. package/dist/utils/index.d.ts.map +1 -1
  43. package/dist/utils/ogcApi.d.ts +17 -0
  44. package/dist/utils/ogcApi.d.ts.map +1 -1
  45. package/dist/utils/selection.d.ts +12 -0
  46. package/dist/utils/selection.d.ts.map +1 -0
  47. package/package.json +1 -1
  48. package/dist/FeatureTooltip-Db1LgLQV.js +0 -47
  49. package/dist/geo-CIJBPCVe.js +0 -1038
@@ -8,11 +8,13 @@ export { downloadBlob } from '../utils/download';
8
8
  export { useOgcQueryables, type UseOgcQueryablesResult } from './useOgcQueryables';
9
9
  export { useOgcCollectionDetail, type UseOgcCollectionDetailResult } from './useOgcCollectionDetail';
10
10
  export { useMeasure, type UseMeasureResult } from './useMeasure';
11
+ export { useSelection, type UseSelectionResult } from './useSelection';
11
12
  export type { OgcApiSource, LayerConfig, MapConfig, UIConfig, ViewConfig, StyleConfig, FilterConfig, LegendConfig, SearchConfig, SearchField, TextSearchField, NumberSearchField, DatetimeSearchField, SelectSearchField, PropertyDisplay, PropertyDisplayConfig, } from '../types';
12
13
  export { resolvePropertyDisplay } from '../utils/propertyDisplay';
13
14
  export { resolveStyleWithSprites } from '../utils/spriteUtils';
14
15
  export type SearchFieldType = SearchField['type'];
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';
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';
16
+ export { fetchCollections, fetchFeatures, fetchFeatureById, fetchQueryables, fetchCollectionDetail, fetchConformance, fetchTileJson, fetchFeatureCount, fetchDistinctValues, getFilteredVectorTileUrl, getCql2FilteredVectorTileUrl, getTileJsonUrl, getVectorTileUrl, getVectorTileSourceKey, buildGeometryFilter, type OgcCollection, type OgcCollectionsResponse, type GeoJsonFeature, type OgcFeatureCollection, type OgcQueryables, type OgcConformance, type TileJson, type QueryableProperty, type FetchFeaturesOptions, } from '../utils/ogcApi';
17
+ export { eq, neq, gt, gte, lt, lte, between, like, inList, isNull, and, or, not, tAfter, tBefore, tDuring, fromSimpleFilters, fromStructuredFilters, serializeCql2, sIntersects, sWithin, sDwithin, type CQL2Expression, type CQL2PropertyRef, type CQL2Date, type CQL2Timestamp, type CQL2Interval, type CQL2Geometry, } from '../utils/cql2';
17
18
  export { bboxFromGeometry, type BBox } from '../utils/geo';
19
+ export type { SelectionMode, SelectedFeature } from '../utils/selection';
18
20
  //# 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,qBAAqB,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,YAAY,EAAE,KAAK,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Aa,EAClB,KAAK,YAAY,EACjB,KAAK,YAAY,GAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,KAAK,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3D,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC"}
@@ -1,46 +1,53 @@
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";
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 h, m as C, n as F, o as y, p as d, q as m, r as b, s as p, t as T, u as D, v as S, w as V, x as q, y as v, z as x, A as O, B as U, C as w, D as B, E, F as G, G as I, H as J, I as Q, J as W, K as k, L as z, M as A, N as K, O as L, P as M, Q as N, R as P, S as j, T as H, U as R, V as X, W as Y, X as Z } from "../geo--Ta-t__y.js";
2
2
  export {
3
3
  a as and,
4
4
  t as bboxFromGeometry,
5
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,
6
+ r as buildGeometryFilter,
7
+ o as downloadBlob,
8
+ i as eq,
9
+ c as featuresToCsv,
10
+ u as fetchCollectionDetail,
11
+ n as fetchCollections,
12
+ f as fetchConformance,
13
+ g as fetchDistinctValues,
14
+ h as fetchFeatureById,
15
+ C as fetchFeatureCount,
16
+ F as fetchFeatures,
17
+ y as fetchQueryables,
18
+ d as fetchTileJson,
17
19
  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,
34
- J as resolveStyleWithSprites,
35
- Q as serializeCql2,
36
- k as tAfter,
37
- z as tBefore,
38
- A as tDuring,
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
20
+ b as fromStructuredFilters,
21
+ p as getCql2FilteredVectorTileUrl,
22
+ T as getFilteredVectorTileUrl,
23
+ D as getTileJsonUrl,
24
+ S as getVectorTileSourceKey,
25
+ V as getVectorTileUrl,
26
+ q as gt,
27
+ v as gte,
28
+ x as inList,
29
+ O as isNull,
30
+ U as like,
31
+ w as lt,
32
+ B as lte,
33
+ E as neq,
34
+ G as not,
35
+ I as or,
36
+ J as resolvePropertyDisplay,
37
+ Q as resolveStyleWithSprites,
38
+ W as sDwithin,
39
+ k as sIntersects,
40
+ z as sWithin,
41
+ A as serializeCql2,
42
+ K as tAfter,
43
+ L as tBefore,
44
+ M as tDuring,
45
+ N as useCsvExport,
46
+ P as useExport,
47
+ j as useMeasure,
48
+ H as useOgcCollectionDetail,
49
+ R as useOgcCollections,
50
+ X as useOgcFeatures,
51
+ Y as useOgcQueryables,
52
+ Z as useSelection
46
53
  };
@@ -0,0 +1,14 @@
1
+ import { SelectionMode, SelectedFeature } from '../utils/selection';
2
+ export interface UseSelectionResult {
3
+ mode: SelectionMode | null;
4
+ activeLayerId: string | null;
5
+ features: SelectedFeature[];
6
+ highlightData: GeoJSON.FeatureCollection | null;
7
+ setMode: (mode: SelectionMode | null) => void;
8
+ setActiveLayerId: (layerId: string | null) => void;
9
+ addFeatures: (features: SelectedFeature[]) => void;
10
+ removeFeature: (key: string) => void;
11
+ clearFeatures: () => void;
12
+ }
13
+ export declare function useSelection(): UseSelectionResult;
14
+ //# sourceMappingURL=useSelection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSelection.d.ts","sourceRoot":"","sources":["../../src/hooks/useSelection.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAGzE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,aAAa,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAChD,OAAO,EAAE,CAAC,IAAI,EAAE,aAAa,GAAG,IAAI,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,WAAW,EAAE,CAAC,QAAQ,EAAE,eAAe,EAAE,KAAK,IAAI,CAAC;IACnD,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAID,wBAAgB,YAAY,IAAI,kBAAkB,CAsDjD"}