@ogc-maps/storybook-components 0.14.0 → 0.16.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/LICENSE +661 -0
- package/dist/{BasemapSwitcher-BW7lyZ2Y.js → BasemapSwitcher-DuqVusX0.js} +9 -9
- package/dist/CollapsibleControl-BTIkiTmU.js +60 -0
- package/dist/CoordinateDisplay-BblQ34mS.js +154 -0
- package/dist/{ExportButton-Ck1dESnc.js → ExportButton-C8hCCsav.js} +7 -7
- package/dist/{FeatureDetailPanel-CkFpdEKW.js → FeatureDetailPanel-DgCHiNi9.js} +16 -16
- package/dist/FeatureTooltip-DHjMZC0u.js +49 -0
- package/dist/{LayerPanel-SCdJ8948.js → LayerPanel-BkDbZ66Z.js} +23 -23
- package/dist/Legend-CvBd-v0n.js +285 -0
- package/dist/PropertyList-0EonV_BQ.js +33 -0
- package/dist/SearchPanel-DIb7aYVs.js +725 -0
- package/dist/components/BasemapSwitcher/index.js +1 -1
- package/dist/components/CollapsibleControl/CollapsibleControl.d.ts +4 -1
- package/dist/components/CollapsibleControl/CollapsibleControl.d.ts.map +1 -1
- package/dist/components/CollapsibleControl/index.js +1 -1
- package/dist/components/CompassControl/CompassControl.d.ts +19 -0
- package/dist/components/CompassControl/CompassControl.d.ts.map +1 -0
- package/dist/components/CompassControl/index.d.ts +3 -0
- package/dist/components/CompassControl/index.d.ts.map +1 -0
- package/dist/components/CoordinateDisplay/CoordinateDisplay.d.ts +35 -4
- package/dist/components/CoordinateDisplay/CoordinateDisplay.d.ts.map +1 -1
- package/dist/components/CoordinateDisplay/CoordinateDisplay.test.d.ts +2 -0
- package/dist/components/CoordinateDisplay/CoordinateDisplay.test.d.ts.map +1 -0
- package/dist/components/CoordinateDisplay/index.d.ts +1 -1
- package/dist/components/CoordinateDisplay/index.d.ts.map +1 -1
- package/dist/components/CoordinateDisplay/index.js +5 -3
- 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/ParameterizableField.d.ts +30 -0
- package/dist/components/Cql2FilterEditor/ParameterizableField.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/ExportButton/index.js +1 -1
- package/dist/components/ExportModal/ExportModal.d.ts +20 -1
- package/dist/components/ExportModal/ExportModal.d.ts.map +1 -1
- package/dist/components/ExportModal/index.d.ts +1 -1
- package/dist/components/ExportModal/index.d.ts.map +1 -1
- package/dist/components/FeatureDetailPanel/index.js +1 -1
- package/dist/components/FeatureTooltip/index.js +1 -1
- package/dist/components/GlobalSearchBar/GlobalSearchBar.d.ts +25 -0
- package/dist/components/GlobalSearchBar/GlobalSearchBar.d.ts.map +1 -0
- package/dist/components/GlobalSearchBar/GlobalSearchBar.test.d.ts +2 -0
- package/dist/components/GlobalSearchBar/GlobalSearchBar.test.d.ts.map +1 -0
- package/dist/components/GlobalSearchBar/index.d.ts +3 -0
- package/dist/components/GlobalSearchBar/index.d.ts.map +1 -0
- package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.d.ts +22 -0
- package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.d.ts.map +1 -0
- package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.test.d.ts +2 -0
- package/dist/components/GlobalSearchConfigEditor/GlobalSearchConfigEditor.test.d.ts.map +1 -0
- package/dist/components/GlobalSearchConfigEditor/index.d.ts +3 -0
- package/dist/components/GlobalSearchConfigEditor/index.d.ts.map +1 -0
- package/dist/components/ImageryEditor/ImageryEditor.d.ts +0 -1
- package/dist/components/ImageryEditor/ImageryEditor.d.ts.map +1 -1
- package/dist/components/ImageryEditor/index.d.ts +2 -1
- package/dist/components/ImageryEditor/index.d.ts.map +1 -1
- package/dist/components/ImageryPanel/ImageryPanel.d.ts.map +1 -1
- package/dist/components/InfoControl/InfoControl.d.ts +12 -0
- package/dist/components/InfoControl/InfoControl.d.ts.map +1 -0
- package/dist/components/InfoControl/InfoModal.d.ts +16 -0
- package/dist/components/InfoControl/InfoModal.d.ts.map +1 -0
- package/dist/components/InfoControl/index.d.ts +5 -0
- package/dist/components/InfoControl/index.d.ts.map +1 -0
- package/dist/components/LayerEditor/LayerEditor.d.ts +6 -1
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/LayerEditor/LayerList.d.ts +8 -1
- package/dist/components/LayerEditor/LayerList.d.ts.map +1 -1
- package/dist/components/LayerEditor/index.d.ts +1 -1
- package/dist/components/LayerEditor/index.d.ts.map +1 -1
- package/dist/components/LayerPanel/index.js +1 -1
- package/dist/components/Legend/Legend.d.ts +7 -1
- package/dist/components/Legend/Legend.d.ts.map +1 -1
- package/dist/components/Legend/index.js +1 -1
- package/dist/components/PropertyFilterPanel/PropertyFilterPanel.d.ts +21 -0
- package/dist/components/PropertyFilterPanel/PropertyFilterPanel.d.ts.map +1 -0
- package/dist/components/PropertyFilterPanel/index.d.ts +3 -0
- package/dist/components/PropertyFilterPanel/index.d.ts.map +1 -0
- 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 +29 -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/ResultsDrawer/tableUtils.d.ts +11 -0
- package/dist/components/ResultsDrawer/tableUtils.d.ts.map +1 -0
- package/dist/components/ScaleBarControl/ScaleBarControl.d.ts +32 -0
- package/dist/components/ScaleBarControl/ScaleBarControl.d.ts.map +1 -0
- package/dist/components/ScaleBarControl/index.d.ts +2 -0
- package/dist/components/ScaleBarControl/index.d.ts.map +1 -0
- package/dist/components/SearchPanel/SearchPanel.d.ts +15 -2
- package/dist/components/SearchPanel/SearchPanel.d.ts.map +1 -1
- package/dist/components/SearchPanel/index.js +1 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts +3 -1
- package/dist/components/SelectionPanel/SelectionPanel.d.ts.map +1 -1
- package/dist/components/SideMenuPanel/SideMenuPanel.d.ts +51 -0
- package/dist/components/SideMenuPanel/SideMenuPanel.d.ts.map +1 -0
- package/dist/components/SideMenuPanel/index.d.ts +3 -0
- package/dist/components/SideMenuPanel/index.d.ts.map +1 -0
- package/dist/components/SourceEditor/SourceEditor.d.ts +3 -1
- package/dist/components/SourceEditor/SourceEditor.d.ts.map +1 -1
- package/dist/components/SourceEditor/SourceList.d.ts +6 -1
- package/dist/components/SourceEditor/SourceList.d.ts.map +1 -1
- package/dist/components/SourceEditor/index.d.ts +1 -1
- package/dist/components/SourceEditor/index.d.ts.map +1 -1
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts +8 -3
- package/dist/components/StyleEditor/DataDrivenColorEditor.d.ts.map +1 -1
- package/dist/components/StyleEditor/PropertyField.d.ts +6 -3
- package/dist/components/StyleEditor/PropertyField.d.ts.map +1 -1
- package/dist/components/StyleEditor/PropertyGroup.d.ts +6 -3
- package/dist/components/StyleEditor/PropertyGroup.d.ts.map +1 -1
- package/dist/components/StyleEditor/StyleEditor.d.ts +7 -3
- package/dist/components/StyleEditor/StyleEditor.d.ts.map +1 -1
- package/dist/components/UIConfigEditor/UIConfigEditor.d.ts +13 -2
- package/dist/components/UIConfigEditor/UIConfigEditor.d.ts.map +1 -1
- package/dist/components/UserMenu/UserMenu.d.ts +15 -0
- package/dist/components/UserMenu/UserMenu.d.ts.map +1 -0
- package/dist/components/UserMenu/index.d.ts +3 -0
- package/dist/components/UserMenu/index.d.ts.map +1 -0
- package/dist/components/ViewEditor/ViewEditor.d.ts.map +1 -1
- package/dist/components/index.d.ts +26 -5
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/shared/controlIcons.d.ts +10 -0
- package/dist/components/shared/controlIcons.d.ts.map +1 -0
- package/dist/geo-DUdRIR7u.js +9776 -0
- package/dist/hooks/index.d.ts +5 -3
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +68 -59
- package/dist/hooks/useExport.d.ts +7 -7
- package/dist/hooks/useExport.d.ts.map +1 -1
- package/dist/id-C2J6iu8_.js +11 -0
- package/dist/index-BtQnyWPg.js +3718 -0
- package/dist/main.js +13801 -2600
- package/dist/schemas/config.d.ts +2127 -5011
- 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 +35 -24
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +47 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +56 -33
- package/dist/useSelection-BFHYsPvU.js +224 -0
- package/dist/utils/colorPalettes.d.ts +4 -2
- package/dist/utils/colorPalettes.d.ts.map +1 -1
- package/dist/utils/colorThemes.d.ts +12 -0
- package/dist/utils/colorThemes.d.ts.map +1 -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 +59 -0
- package/dist/utils/geo.d.ts.map +1 -1
- package/dist/utils/id.d.ts +2 -0
- package/dist/utils/id.d.ts.map +1 -0
- package/dist/utils/index.d.ts +9 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +477 -0
- package/dist/utils/ogcApi.d.ts +31 -6
- package/dist/utils/ogcApi.d.ts.map +1 -1
- package/dist/utils/propertyFilters.d.ts +35 -0
- package/dist/utils/propertyFilters.d.ts.map +1 -0
- package/dist/utils/queryParameters.d.ts +23 -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/dist/utils/slugify.d.ts +2 -0
- package/dist/utils/slugify.d.ts.map +1 -0
- package/package.json +31 -14
- package/dist/CollapsibleControl-qo9daiD8.js +0 -53
- package/dist/CoordinateDisplay-PxPmVjpm.js +0 -47
- package/dist/FeatureTooltip-DxzN-jnp.js +0 -49
- package/dist/Legend-BLWBzD7Y.js +0 -275
- package/dist/PropertyList-BGXHLVBM.js +0 -33
- package/dist/SearchPanel-4Y12jfuP.js +0 -401
- 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-PA_KiJwy.js +0 -1169
- package/dist/index-Cz_PEKV1.js +0 -3035
- 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
|
@@ -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,GACxB,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAQ3C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,aAAa,GAAG,iBAAiB,EAAE,CAYpF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE;IAAE,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,EAAE,GAClD,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAmCrF;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC,CAcvD;AAED;;;;GAIG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC,CAoBpD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
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,GACxB,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAQ3C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,aAAa,GAAG,MAAM,EAAE,CAI5E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,UAAU,EAAE,aAAa,GAAG,iBAAiB,EAAE,CAYpF;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE;IAAE,QAAQ,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,EAAE,GAClD,MAAM,EAAE,CAQV;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,CAmCrF;AAED;;;;GAIG;AACH,wBAAsB,4BAA4B,CAChD,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,IAAI,CAAC,CAcvD;AAED;;;;GAIG;AACH,wBAAsB,6BAA6B,CACjD,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,CAAC,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAC,CAoBpD;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKzD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"slugify.d.ts","sourceRoot":"","sources":["../../src/utils/slugify.ts"],"names":[],"mappings":"AAAA,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogc-maps/storybook-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/main.js",
|
|
6
6
|
"publishConfig": {
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"types": "./dist/components/FeatureTooltip/index.d.ts",
|
|
47
47
|
"import": "./dist/components/FeatureTooltip/index.js"
|
|
48
48
|
},
|
|
49
|
+
"./components/InfoControl": {
|
|
50
|
+
"types": "./dist/components/InfoControl/index.d.ts",
|
|
51
|
+
"import": "./dist/components/InfoControl/index.js"
|
|
52
|
+
},
|
|
49
53
|
"./components/SearchPanel": {
|
|
50
54
|
"types": "./dist/components/SearchPanel/index.d.ts",
|
|
51
55
|
"import": "./dist/components/SearchPanel/index.js"
|
|
@@ -61,6 +65,10 @@
|
|
|
61
65
|
"./types": {
|
|
62
66
|
"types": "./dist/types/index.d.ts",
|
|
63
67
|
"import": "./dist/types/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./utils": {
|
|
70
|
+
"types": "./dist/utils/index.d.ts",
|
|
71
|
+
"import": "./dist/utils/index.js"
|
|
64
72
|
}
|
|
65
73
|
},
|
|
66
74
|
"files": [
|
|
@@ -74,28 +82,36 @@
|
|
|
74
82
|
},
|
|
75
83
|
"dependencies": {
|
|
76
84
|
"@turf/area": "^7.3.4",
|
|
85
|
+
"@turf/buffer": "^7.3.4",
|
|
77
86
|
"@turf/helpers": "^7.3.4",
|
|
78
87
|
"@turf/length": "^7.3.4",
|
|
79
|
-
"
|
|
88
|
+
"react-markdown": "^9.0.1",
|
|
89
|
+
"remark-gfm": "^4.0.0",
|
|
90
|
+
"zod": "^4.3.6"
|
|
91
|
+
},
|
|
92
|
+
"optionalDependencies": {
|
|
93
|
+
"@mapbox/shp-write": "^0.4.3",
|
|
94
|
+
"@ngageoint/geopackage": "^4.2.0",
|
|
95
|
+
"@tmcw/tokml": "^1.0.0-alpha.0",
|
|
96
|
+
"flatgeobuf": "^3.32.0"
|
|
80
97
|
},
|
|
81
98
|
"devDependencies": {
|
|
82
|
-
"@chromatic-com/storybook": "^
|
|
83
|
-
"@storybook/addon-
|
|
84
|
-
"@storybook/addon-
|
|
85
|
-
"@storybook/
|
|
86
|
-
"@storybook/
|
|
87
|
-
"@
|
|
88
|
-
"@storybook/react-vite": "^8.5.0",
|
|
89
|
-
"@storybook/test": "^8.5.0",
|
|
90
|
-
"@tailwindcss/vite": "^4.0.0-beta.10",
|
|
99
|
+
"@chromatic-com/storybook": "^5.1.1",
|
|
100
|
+
"@storybook/addon-docs": "^10.3.3",
|
|
101
|
+
"@storybook/addon-links": "^10.3.3",
|
|
102
|
+
"@storybook/react": "^10.3.3",
|
|
103
|
+
"@storybook/react-vite": "^10.3.5",
|
|
104
|
+
"@tailwindcss/vite": "^4.0.0",
|
|
91
105
|
"@types/react": "^18.3.18",
|
|
92
106
|
"@types/react-dom": "^18.3.5",
|
|
93
107
|
"@vitejs/plugin-react": "^4.3.4",
|
|
108
|
+
"@vitest/coverage-v8": "^2.1.9",
|
|
109
|
+
"jsdom": "^29.0.1",
|
|
94
110
|
"react": "^18.3.1",
|
|
95
111
|
"react-dom": "^18.3.1",
|
|
96
112
|
"react-icons": "^5.0.0",
|
|
97
|
-
"storybook": "^
|
|
98
|
-
"tailwindcss": "^4.0.0
|
|
113
|
+
"storybook": "^10.3.5",
|
|
114
|
+
"tailwindcss": "^4.0.0",
|
|
99
115
|
"typescript": "^5.7.3",
|
|
100
116
|
"vite": "^6.0.7",
|
|
101
117
|
"vite-plugin-dts": "^4.3.0",
|
|
@@ -107,6 +123,7 @@
|
|
|
107
123
|
"build": "vite build",
|
|
108
124
|
"storybook": "storybook dev -p 6006",
|
|
109
125
|
"build-storybook": "storybook build",
|
|
110
|
-
"test": "vitest run"
|
|
126
|
+
"test": "vitest run",
|
|
127
|
+
"test:coverage": "vitest run --coverage"
|
|
111
128
|
}
|
|
112
129
|
}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { useState as h } from "react";
|
|
3
|
-
import { LuX as g } from "react-icons/lu";
|
|
4
|
-
function x({
|
|
5
|
-
icon: t,
|
|
6
|
-
label: i,
|
|
7
|
-
defaultCollapsed: l = !0,
|
|
8
|
-
collapsed: p,
|
|
9
|
-
onToggle: u,
|
|
10
|
-
children: o,
|
|
11
|
-
className: n = ""
|
|
12
|
-
}) {
|
|
13
|
-
const [c, d] = h(l), m = p !== void 0 ? p : c, s = () => {
|
|
14
|
-
const r = !m;
|
|
15
|
-
u ? u(r) : d(r);
|
|
16
|
-
};
|
|
17
|
-
return /* @__PURE__ */ e("div", { className: `mapui:relative mapui:w-10 mapui:h-10 ${n}`, children: [
|
|
18
|
-
/* @__PURE__ */ a(
|
|
19
|
-
"button",
|
|
20
|
-
{
|
|
21
|
-
type: "button",
|
|
22
|
-
onClick: s,
|
|
23
|
-
title: i,
|
|
24
|
-
"aria-label": i,
|
|
25
|
-
className: `mapui:flex mapui:items-center mapui:justify-center mapui:w-10 mapui:h-10 mapui:bg-white mapui:rounded mapui:shadow-md hover:mapui:bg-gray-50 mapui:transition-colors ${m ? "" : "mapui:bg-gray-100"}`,
|
|
26
|
-
children: /* @__PURE__ */ a(t, { size: 20, className: "mapui:text-gray-700" })
|
|
27
|
-
}
|
|
28
|
-
),
|
|
29
|
-
!m && /* @__PURE__ */ e("div", { className: "mapui:absolute mapui:top-0 mapui:right-full mapui:mr-2 mapui:z-10 mapui:bg-white mapui:rounded-lg mapui:shadow-lg", children: [
|
|
30
|
-
/* @__PURE__ */ e("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:p-2 mapui:border-b mapui:border-gray-200", children: [
|
|
31
|
-
/* @__PURE__ */ e("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
|
|
32
|
-
/* @__PURE__ */ a(t, { size: 18, className: "mapui:text-gray-700" }),
|
|
33
|
-
/* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-700", children: i })
|
|
34
|
-
] }),
|
|
35
|
-
/* @__PURE__ */ a(
|
|
36
|
-
"button",
|
|
37
|
-
{
|
|
38
|
-
type: "button",
|
|
39
|
-
onClick: s,
|
|
40
|
-
title: `Collapse ${i}`,
|
|
41
|
-
"aria-label": `Collapse ${i}`,
|
|
42
|
-
className: "mapui:flex mapui:items-center mapui:justify-center mapui:w-6 mapui:h-6 mapui:rounded hover:mapui:bg-gray-100 mapui:transition-colors",
|
|
43
|
-
children: /* @__PURE__ */ a(g, { size: 16, className: "mapui:text-gray-600" })
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
] }),
|
|
47
|
-
/* @__PURE__ */ a("div", { className: "mapui:p-2", children: o })
|
|
48
|
-
] })
|
|
49
|
-
] });
|
|
50
|
-
}
|
|
51
|
-
export {
|
|
52
|
-
x as C
|
|
53
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsxs as f, jsx as d } from "react/jsx-runtime";
|
|
2
|
-
function h(t, e) {
|
|
3
|
-
return `${t.toFixed(6)}, ${e.toFixed(6)}`;
|
|
4
|
-
}
|
|
5
|
-
function $(t, e) {
|
|
6
|
-
const a = (i, n, m) => {
|
|
7
|
-
const r = i >= 0 ? n : m, s = Math.abs(i), c = Math.floor(s), l = (s - c) * 60, p = Math.floor(l), x = ((l - p) * 60).toFixed(1);
|
|
8
|
-
return `${c}°${p}'${x}"${r}`;
|
|
9
|
-
}, o = a(t, "N", "S"), u = a(e, "E", "W");
|
|
10
|
-
return `${o} ${u}`;
|
|
11
|
-
}
|
|
12
|
-
function C({
|
|
13
|
-
latitude: t,
|
|
14
|
-
longitude: e,
|
|
15
|
-
activeFormat: a,
|
|
16
|
-
formats: o,
|
|
17
|
-
onFormatChange: u,
|
|
18
|
-
className: i = ""
|
|
19
|
-
}) {
|
|
20
|
-
const n = o.find((r) => r.id === a), m = () => {
|
|
21
|
-
const s = (o.findIndex((c) => c.id === a) + 1) % o.length;
|
|
22
|
-
u(o[s].id);
|
|
23
|
-
};
|
|
24
|
-
return /* @__PURE__ */ f(
|
|
25
|
-
"div",
|
|
26
|
-
{
|
|
27
|
-
className: `mapui:bg-black/60 mapui:text-white mapui:text-xs mapui:px-3 mapui:py-1 mapui:flex mapui:items-center mapui:gap-2 mapui:rounded ${i}`,
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ d(
|
|
30
|
-
"button",
|
|
31
|
-
{
|
|
32
|
-
onClick: m,
|
|
33
|
-
className: "mapui:text-blue-300 hover:mapui:text-blue-200 mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:p-0",
|
|
34
|
-
title: "Click to cycle coordinate format",
|
|
35
|
-
children: (n == null ? void 0 : n.label) ?? "Unknown"
|
|
36
|
-
}
|
|
37
|
-
),
|
|
38
|
-
/* @__PURE__ */ d("span", { className: "mapui:font-mono", children: t !== null && e !== null && n ? n.format(t, e) : "—" })
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
}
|
|
43
|
-
export {
|
|
44
|
-
C,
|
|
45
|
-
h as a,
|
|
46
|
-
$ as f
|
|
47
|
-
};
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { jsx as a, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import { P as h } from "./PropertyList-BGXHLVBM.js";
|
|
3
|
-
function N({
|
|
4
|
-
title: o,
|
|
5
|
-
properties: e,
|
|
6
|
-
fields: l,
|
|
7
|
-
labels: c,
|
|
8
|
-
features: m,
|
|
9
|
-
maxItems: p = 4,
|
|
10
|
-
className: r = ""
|
|
11
|
-
}) {
|
|
12
|
-
const t = m && m.length > 0 ? m : e ? [{ title: o, properties: e, fields: l, labels: c }] : [];
|
|
13
|
-
return t.length === 0 ? /* @__PURE__ */ a(
|
|
14
|
-
"div",
|
|
15
|
-
{
|
|
16
|
-
className: `mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-3 mapui:py-2 mapui:shadow-md ${r}`.trim(),
|
|
17
|
-
children: /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-gray-400", children: "No data" })
|
|
18
|
-
}
|
|
19
|
-
) : /* @__PURE__ */ a(
|
|
20
|
-
"div",
|
|
21
|
-
{
|
|
22
|
-
className: `mapui:min-w-[140px] mapui:max-w-[240px] mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:shadow-md ${r}`.trim(),
|
|
23
|
-
children: t.map((i, u) => {
|
|
24
|
-
const s = i.fields ?? Object.keys(i.properties), n = s.length > p, x = s.length - p;
|
|
25
|
-
return /* @__PURE__ */ a("div", { className: u > 0 ? "mapui:border-t mapui:border-gray-200" : "", children: /* @__PURE__ */ d("div", { className: "mapui:px-3 mapui:py-2", children: [
|
|
26
|
-
i.title && /* @__PURE__ */ a("p", { className: "mapui:mb-1.5 mapui:mt-0 mapui:text-xs mapui:font-semibold mapui:text-gray-700", children: i.title }),
|
|
27
|
-
/* @__PURE__ */ a(
|
|
28
|
-
h,
|
|
29
|
-
{
|
|
30
|
-
properties: i.properties,
|
|
31
|
-
fields: i.fields,
|
|
32
|
-
labels: i.labels,
|
|
33
|
-
maxItems: p,
|
|
34
|
-
density: "compact"
|
|
35
|
-
}
|
|
36
|
-
),
|
|
37
|
-
n && /* @__PURE__ */ d("p", { className: "mapui:mb-0 mapui:mt-1 mapui:text-xs mapui:text-gray-400", children: [
|
|
38
|
-
"+",
|
|
39
|
-
x,
|
|
40
|
-
" more"
|
|
41
|
-
] })
|
|
42
|
-
] }) }, u);
|
|
43
|
-
})
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
export {
|
|
48
|
-
N as F
|
|
49
|
-
};
|
package/dist/Legend-BLWBzD7Y.js
DELETED
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as a, Fragment as b } from "react/jsx-runtime";
|
|
2
|
-
import { useState as N } from "react";
|
|
3
|
-
import { BsArrowsAngleContract as C, BsArrowsAngleExpand as A } from "react-icons/bs";
|
|
4
|
-
import { MdOutlineKeyboardArrowDown as k, MdOutlineKeyboardArrowRight as v } from "react-icons/md";
|
|
5
|
-
const E = {
|
|
6
|
-
fill: "fill-opacity",
|
|
7
|
-
line: "line-opacity",
|
|
8
|
-
circle: "circle-opacity",
|
|
9
|
-
symbol: "icon-opacity"
|
|
10
|
-
};
|
|
11
|
-
function I(i) {
|
|
12
|
-
var s, p;
|
|
13
|
-
const e = (s = i.styles) == null ? void 0 : s[0];
|
|
14
|
-
if (!e) return 1;
|
|
15
|
-
const n = E[e.type];
|
|
16
|
-
if (!n) return 1;
|
|
17
|
-
const t = (p = e.paint) == null ? void 0 : p[n];
|
|
18
|
-
return typeof t == "number" ? t : 1;
|
|
19
|
-
}
|
|
20
|
-
function w({ color: i, shape: e }) {
|
|
21
|
-
const n = e ?? "square";
|
|
22
|
-
let t;
|
|
23
|
-
return n === "circle" ? t = /* @__PURE__ */ a(
|
|
24
|
-
"span",
|
|
25
|
-
{
|
|
26
|
-
className: "mapui:inline-block mapui:h-3 mapui:w-3 mapui:rounded-full",
|
|
27
|
-
style: { backgroundColor: i }
|
|
28
|
-
}
|
|
29
|
-
) : n === "line" ? t = /* @__PURE__ */ a(
|
|
30
|
-
"span",
|
|
31
|
-
{
|
|
32
|
-
className: "mapui:inline-block mapui:h-0.5 mapui:w-4 mapui:rounded-full",
|
|
33
|
-
style: { backgroundColor: i }
|
|
34
|
-
}
|
|
35
|
-
) : t = /* @__PURE__ */ a(
|
|
36
|
-
"span",
|
|
37
|
-
{
|
|
38
|
-
className: "mapui:inline-block mapui:h-3 mapui:w-3 mapui:rounded-sm",
|
|
39
|
-
style: { backgroundColor: i }
|
|
40
|
-
}
|
|
41
|
-
), /* @__PURE__ */ a("span", { className: "mapui:inline-flex mapui:items-center mapui:justify-center mapui:w-5 mapui:shrink-0", children: t });
|
|
42
|
-
}
|
|
43
|
-
function L(i) {
|
|
44
|
-
return `linear-gradient(to right, ${i.map((e, n) => `${e.color} ${n / i.length * 100}% ${(n + 1) / i.length * 100}%`).join(", ")})`;
|
|
45
|
-
}
|
|
46
|
-
function B(i) {
|
|
47
|
-
return `linear-gradient(to right, ${i.map((e) => e.color).join(", ")})`;
|
|
48
|
-
}
|
|
49
|
-
function y(i) {
|
|
50
|
-
const e = i.trim();
|
|
51
|
-
let n, t, s;
|
|
52
|
-
if (/^#[0-9a-f]{3}$/i.test(e))
|
|
53
|
-
n = parseInt(e[1] + e[1], 16), t = parseInt(e[2] + e[2], 16), s = parseInt(e[3] + e[3], 16);
|
|
54
|
-
else if (/^#[0-9a-f]{6}$/i.test(e))
|
|
55
|
-
n = parseInt(e.slice(1, 3), 16), t = parseInt(e.slice(3, 5), 16), s = parseInt(e.slice(5, 7), 16);
|
|
56
|
-
else
|
|
57
|
-
return null;
|
|
58
|
-
const p = n / 255, r = t / 255, d = s / 255, h = Math.max(p, r, d), g = Math.min(p, r, d), f = h - g;
|
|
59
|
-
if (f === 0) return 0;
|
|
60
|
-
let l = 0;
|
|
61
|
-
return h === p ? l = ((r - d) / f + 6) % 6 : h === r ? l = (d - p) / f + 2 : l = (p - r) / f + 4, l * 60;
|
|
62
|
-
}
|
|
63
|
-
function j(i) {
|
|
64
|
-
return [...i].sort((e, n) => {
|
|
65
|
-
const t = y(e.color), s = y(n.color);
|
|
66
|
-
return t === null && s === null ? 0 : t === null ? 1 : s === null ? -1 : t - s;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
function S({ legend: i, label: e, hasArrowColumn: n }) {
|
|
70
|
-
const { entries: t } = i, s = n ? /* @__PURE__ */ a("span", { className: "mapui:w-5 mapui:shrink-0" }) : null;
|
|
71
|
-
return t.length === 1 ? /* @__PURE__ */ o("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:min-w-0", children: [
|
|
72
|
-
s,
|
|
73
|
-
/* @__PURE__ */ a(w, { color: t[0].color, shape: t[0].shape }),
|
|
74
|
-
/* @__PURE__ */ a("span", { className: "mapui:text-gray-700 mapui:truncate", children: t[0].label || e })
|
|
75
|
-
] }) : /* @__PURE__ */ o("div", { children: [
|
|
76
|
-
/* @__PURE__ */ a("div", { className: "mapui:mb-1 mapui:text-xs mapui:font-medium mapui:text-gray-600", children: e }),
|
|
77
|
-
/* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:space-y-1 mapui:p-0 mapui:pl-1", children: t.map((p, r) => /* @__PURE__ */ o(
|
|
78
|
-
"li",
|
|
79
|
-
{
|
|
80
|
-
className: "mapui:flex mapui:items-center mapui:gap-2 mapui:min-w-0",
|
|
81
|
-
children: [
|
|
82
|
-
s,
|
|
83
|
-
/* @__PURE__ */ a(w, { color: p.color, shape: p.shape }),
|
|
84
|
-
/* @__PURE__ */ a("span", { className: "mapui:text-gray-700 mapui:truncate", children: p.label })
|
|
85
|
-
]
|
|
86
|
-
},
|
|
87
|
-
`${p.label}-${r}`
|
|
88
|
-
)) })
|
|
89
|
-
] });
|
|
90
|
-
}
|
|
91
|
-
function M({
|
|
92
|
-
legend: i,
|
|
93
|
-
label: e,
|
|
94
|
-
expanded: n,
|
|
95
|
-
onToggle: t,
|
|
96
|
-
hasArrowColumn: s
|
|
97
|
-
}) {
|
|
98
|
-
const { entries: p } = i, r = i.showColorBar !== !1, d = i.showDisclosureArrow !== !1, h = i.showLabelsCollapsed ?? !1, g = p.filter((u, c, x) => x.findIndex(($) => $.color === u.color) === c), f = j(g), l = /* @__PURE__ */ a("span", { className: "mapui:inline-flex mapui:items-center mapui:justify-center mapui:w-5 mapui:shrink-0", children: /* @__PURE__ */ a("span", { className: "mapui:text-gray-400", children: n ? /* @__PURE__ */ a(k, {}) : /* @__PURE__ */ a(v, {}) }) }), m = /* @__PURE__ */ o(b, { children: [
|
|
99
|
-
s && (d ? l : /* @__PURE__ */ a("span", { className: "mapui:w-5 mapui:shrink-0" })),
|
|
100
|
-
r ? /* @__PURE__ */ a(
|
|
101
|
-
"div",
|
|
102
|
-
{
|
|
103
|
-
className: "mapui:h-3 mapui:w-5 mapui:rounded-sm mapui:shrink-0",
|
|
104
|
-
style: { background: L(f) }
|
|
105
|
-
}
|
|
106
|
-
) : !s && d ? l : /* @__PURE__ */ a("span", { className: "mapui:w-5 mapui:shrink-0" }),
|
|
107
|
-
/* @__PURE__ */ a("span", { className: "mapui:truncate", children: e })
|
|
108
|
-
] });
|
|
109
|
-
return /* @__PURE__ */ o("div", { children: [
|
|
110
|
-
d ? /* @__PURE__ */ a(
|
|
111
|
-
"button",
|
|
112
|
-
{
|
|
113
|
-
type: "button",
|
|
114
|
-
className: "mapui:flex mapui:items-center mapui:gap-2 mapui:bg-transparent mapui:border-none mapui:p-0 mapui:cursor-pointer mapui:text-left mapui:text-gray-700 mapui:text-sm mapui:font-medium mapui:min-w-0",
|
|
115
|
-
onClick: t,
|
|
116
|
-
"aria-expanded": n,
|
|
117
|
-
children: m
|
|
118
|
-
}
|
|
119
|
-
) : /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:text-gray-700 mapui:text-sm mapui:font-medium mapui:min-w-0", children: m }),
|
|
120
|
-
(n || h) && /* @__PURE__ */ a("ul", { className: `mapui:m-0 mapui:mt-1 mapui:list-none mapui:space-y-1 mapui:p-0 mapui:max-h-48 mapui:overflow-y-auto${d ? " mapui:ml-7" : ""}`, children: p.map((u, c) => /* @__PURE__ */ o(
|
|
121
|
-
"li",
|
|
122
|
-
{
|
|
123
|
-
className: "mapui:flex mapui:items-center mapui:gap-2 mapui:min-w-0",
|
|
124
|
-
children: [
|
|
125
|
-
/* @__PURE__ */ a(w, { color: u.color, shape: u.shape }),
|
|
126
|
-
/* @__PURE__ */ a("span", { className: "mapui:text-gray-700 mapui:truncate mapui:text-xs", children: u.label })
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
`${u.label}-${c}`
|
|
130
|
-
)) })
|
|
131
|
-
] });
|
|
132
|
-
}
|
|
133
|
-
function D({
|
|
134
|
-
legend: i,
|
|
135
|
-
label: e,
|
|
136
|
-
expanded: n,
|
|
137
|
-
onToggle: t,
|
|
138
|
-
hasArrowColumn: s
|
|
139
|
-
}) {
|
|
140
|
-
const { entries: p, gradientProperty: r } = i, d = i.showColorBar !== !1, h = i.showDisclosureArrow !== !1, g = /* @__PURE__ */ a("span", { className: "mapui:inline-flex mapui:items-center mapui:justify-center mapui:w-5 mapui:shrink-0", children: /* @__PURE__ */ a("span", { className: "mapui:text-gray-400", children: n ? /* @__PURE__ */ a(k, {}) : /* @__PURE__ */ a(v, {}) }) }), f = /* @__PURE__ */ o(b, { children: [
|
|
141
|
-
s && (h ? g : /* @__PURE__ */ a("span", { className: "mapui:w-5 mapui:shrink-0" })),
|
|
142
|
-
d ? /* @__PURE__ */ a(
|
|
143
|
-
"div",
|
|
144
|
-
{
|
|
145
|
-
className: "mapui:h-3 mapui:w-5 mapui:rounded-sm mapui:shrink-0",
|
|
146
|
-
style: { background: B(p) }
|
|
147
|
-
}
|
|
148
|
-
) : !s && h ? g : /* @__PURE__ */ a("span", { className: "mapui:w-5 mapui:shrink-0" }),
|
|
149
|
-
/* @__PURE__ */ a("span", { className: "mapui:truncate", children: e })
|
|
150
|
-
] });
|
|
151
|
-
return /* @__PURE__ */ o("div", { children: [
|
|
152
|
-
h ? /* @__PURE__ */ a(
|
|
153
|
-
"button",
|
|
154
|
-
{
|
|
155
|
-
type: "button",
|
|
156
|
-
className: "mapui:flex mapui:items-center mapui:gap-2 mapui:bg-transparent mapui:border-none mapui:p-0 mapui:cursor-pointer mapui:text-left mapui:text-gray-700 mapui:text-sm mapui:font-medium",
|
|
157
|
-
onClick: t,
|
|
158
|
-
"aria-expanded": n,
|
|
159
|
-
children: f
|
|
160
|
-
}
|
|
161
|
-
) : /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:gap-2 mapui:text-gray-700 mapui:text-sm mapui:font-medium", children: f }),
|
|
162
|
-
n && /* @__PURE__ */ o(b, { children: [
|
|
163
|
-
r && /* @__PURE__ */ a("div", { className: `mapui:mt-1 mapui:text-xs mapui:font-medium mapui:text-gray-600${h ? " mapui:ml-7" : ""}`, children: r }),
|
|
164
|
-
/* @__PURE__ */ a("ul", { className: `mapui:m-0 mapui:mt-1 mapui:list-none mapui:space-y-1 mapui:p-0${h ? " mapui:ml-7" : ""}`, children: p.map((l, m) => /* @__PURE__ */ o(
|
|
165
|
-
"li",
|
|
166
|
-
{
|
|
167
|
-
className: "mapui:flex mapui:items-center mapui:gap-2 mapui:min-w-0",
|
|
168
|
-
children: [
|
|
169
|
-
/* @__PURE__ */ a(w, { color: l.color, shape: l.shape }),
|
|
170
|
-
/* @__PURE__ */ a("span", { className: "mapui:text-gray-700 mapui:truncate mapui:text-xs", children: l.label })
|
|
171
|
-
]
|
|
172
|
-
},
|
|
173
|
-
`${l.label}-${m}`
|
|
174
|
-
)) })
|
|
175
|
-
] })
|
|
176
|
-
] });
|
|
177
|
-
}
|
|
178
|
-
function T({
|
|
179
|
-
layerId: i,
|
|
180
|
-
opacity: e,
|
|
181
|
-
onChange: n,
|
|
182
|
-
hasArrowColumn: t
|
|
183
|
-
}) {
|
|
184
|
-
return /* @__PURE__ */ o("div", { className: `mapui:flex mapui:items-center mapui:gap-1.5 mapui:mt-0.5 ${t ? "mapui:ml-14" : "mapui:ml-7"}`, children: [
|
|
185
|
-
/* @__PURE__ */ a(
|
|
186
|
-
"input",
|
|
187
|
-
{
|
|
188
|
-
type: "range",
|
|
189
|
-
min: 0,
|
|
190
|
-
max: 1,
|
|
191
|
-
step: 0.01,
|
|
192
|
-
value: e,
|
|
193
|
-
onChange: (s) => n(i, parseFloat(s.target.value)),
|
|
194
|
-
className: "range-sm mapui:w-14"
|
|
195
|
-
}
|
|
196
|
-
),
|
|
197
|
-
/* @__PURE__ */ o("span", { className: "mapui:text-[9px] mapui:text-gray-400 mapui:w-6 mapui:text-right mapui:tabular-nums", children: [
|
|
198
|
-
Math.round(e * 100),
|
|
199
|
-
"%"
|
|
200
|
-
] })
|
|
201
|
-
] });
|
|
202
|
-
}
|
|
203
|
-
function F({ layers: i, visibleLayerIds: e, onOpacityChange: n, className: t }) {
|
|
204
|
-
const [s, p] = N(/* @__PURE__ */ new Set()), [r, d] = N(!1), h = i.filter((m) => e.includes(m.id));
|
|
205
|
-
function g(m) {
|
|
206
|
-
p((u) => {
|
|
207
|
-
const c = new Set(u);
|
|
208
|
-
return c.has(m) ? c.delete(m) : c.add(m), c;
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
const f = h.filter((m) => m.legend !== void 0);
|
|
212
|
-
if (f.length === 0)
|
|
213
|
-
return null;
|
|
214
|
-
const l = f.some((m) => {
|
|
215
|
-
const u = m.legend, c = u.displayMode ?? "simple", x = u.showDisclosureArrow !== !1;
|
|
216
|
-
return c === "gradient" || c === "categorical" ? x && u.showColorBar !== !1 : !1;
|
|
217
|
-
});
|
|
218
|
-
return /* @__PURE__ */ o(
|
|
219
|
-
"div",
|
|
220
|
-
{
|
|
221
|
-
className: `mapui:rounded-lg mapui:bg-white mapui:p-3 mapui:shadow-md mapui:text-sm${t ? ` ${t}` : ""}`,
|
|
222
|
-
children: [
|
|
223
|
-
/* @__PURE__ */ o("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:mb-2", children: [
|
|
224
|
-
/* @__PURE__ */ a("h3", { className: "mapui:m-0 mapui:text-xs mapui:font-semibold mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Legend" }),
|
|
225
|
-
n && /* @__PURE__ */ a(
|
|
226
|
-
"button",
|
|
227
|
-
{
|
|
228
|
-
type: "button",
|
|
229
|
-
className: "mapui:bg-transparent mapui:border-none mapui:p-0 mapui:cursor-pointer mapui:text-gray-400 hover:mapui:text-gray-600 mapui:text-sm",
|
|
230
|
-
onClick: () => d((m) => !m),
|
|
231
|
-
"aria-label": r ? "Collapse legend" : "Expand legend",
|
|
232
|
-
children: r ? /* @__PURE__ */ a(C, {}) : /* @__PURE__ */ a(A, {})
|
|
233
|
-
}
|
|
234
|
-
)
|
|
235
|
-
] }),
|
|
236
|
-
/* @__PURE__ */ a("ul", { className: `mapui:m-0 mapui:list-none mapui:p-0 ${r ? "mapui:space-y-1.5" : "mapui:space-y-2"}`, children: f.map((m) => {
|
|
237
|
-
const u = m.legend, c = u.displayMode ?? "simple", x = r || s.has(m.id);
|
|
238
|
-
return /* @__PURE__ */ o("li", { children: [
|
|
239
|
-
c === "categorical" ? /* @__PURE__ */ a(
|
|
240
|
-
M,
|
|
241
|
-
{
|
|
242
|
-
legend: u,
|
|
243
|
-
label: m.label,
|
|
244
|
-
expanded: x,
|
|
245
|
-
onToggle: () => g(m.id),
|
|
246
|
-
hasArrowColumn: l
|
|
247
|
-
}
|
|
248
|
-
) : c === "gradient" ? /* @__PURE__ */ a(
|
|
249
|
-
D,
|
|
250
|
-
{
|
|
251
|
-
legend: u,
|
|
252
|
-
label: m.label,
|
|
253
|
-
expanded: x,
|
|
254
|
-
onToggle: () => g(m.id),
|
|
255
|
-
hasArrowColumn: l
|
|
256
|
-
}
|
|
257
|
-
) : /* @__PURE__ */ a(S, { legend: u, label: m.label, hasArrowColumn: l }),
|
|
258
|
-
r && n && /* @__PURE__ */ a(
|
|
259
|
-
T,
|
|
260
|
-
{
|
|
261
|
-
layerId: m.id,
|
|
262
|
-
opacity: I(m),
|
|
263
|
-
onChange: n,
|
|
264
|
-
hasArrowColumn: l
|
|
265
|
-
}
|
|
266
|
-
)
|
|
267
|
-
] }, m.id);
|
|
268
|
-
}) })
|
|
269
|
-
]
|
|
270
|
-
}
|
|
271
|
-
);
|
|
272
|
-
}
|
|
273
|
-
export {
|
|
274
|
-
F as L
|
|
275
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
function p(i) {
|
|
3
|
-
return i == null ? "--" : typeof i == "boolean" ? i ? "Yes" : "No" : Array.isArray(i) ? i.map(p).join(", ") : typeof i == "object" ? JSON.stringify(i) : String(i);
|
|
4
|
-
}
|
|
5
|
-
function f({
|
|
6
|
-
properties: i,
|
|
7
|
-
fields: s,
|
|
8
|
-
labels: r,
|
|
9
|
-
maxItems: n,
|
|
10
|
-
density: o = "default",
|
|
11
|
-
className: u = ""
|
|
12
|
-
}) {
|
|
13
|
-
const c = s ?? Object.keys(i), d = n != null ? c.slice(0, n) : c;
|
|
14
|
-
return o === "compact" ? /* @__PURE__ */ t("dl", { className: `mapui:m-0 mapui:text-xs ${u}`.trim(), children: d.map((m) => /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1 mapui:py-0.5", children: [
|
|
15
|
-
/* @__PURE__ */ a("dt", { className: "mapui:shrink-0 mapui:font-medium mapui:text-gray-500", children: [
|
|
16
|
-
(r == null ? void 0 : r[m]) ?? m,
|
|
17
|
-
":"
|
|
18
|
-
] }),
|
|
19
|
-
/* @__PURE__ */ t("dd", { className: "mapui:m-0 mapui:truncate mapui:text-gray-800", children: p(i[m]) })
|
|
20
|
-
] }, m)) }) : /* @__PURE__ */ t(
|
|
21
|
-
"dl",
|
|
22
|
-
{
|
|
23
|
-
className: `mapui:m-0 mapui:grid mapui:grid-cols-2 mapui:gap-x-4 mapui:gap-y-2 mapui:text-sm ${u}`.trim(),
|
|
24
|
-
children: d.map((m) => /* @__PURE__ */ a("div", { className: "mapui:contents", children: [
|
|
25
|
-
/* @__PURE__ */ t("dt", { className: "mapui:break-words mapui:font-medium mapui:text-gray-500", children: (r == null ? void 0 : r[m]) ?? m }),
|
|
26
|
-
/* @__PURE__ */ t("dd", { className: "mapui:m-0 mapui:break-words mapui:text-gray-800", children: p(i[m]) })
|
|
27
|
-
] }, m))
|
|
28
|
-
}
|
|
29
|
-
);
|
|
30
|
-
}
|
|
31
|
-
export {
|
|
32
|
-
f as P
|
|
33
|
-
};
|