From 2301c2ade649ce6135596a0cb05efcb7645c1b41 Mon Sep 17 00:00:00 2001 From: "amir.azma" Date: Sat, 11 Nov 2023 23:37:29 -0500 Subject: [PATCH 1/5] feat: Icon stack component to display a group of icons --- .../core/components/data-table/data-panel.tsx | 4 +- .../components/data-table/data-table-style.ts | 1 + .../core/components/details/details-style.ts | 1 + .../components/details/layers-list-footer.tsx | 5 +- .../src/core/components/icon-stack/helper.ts | 46 ++++++++++++++ .../components/icon-stack/icon-stack-style.ts | 61 ++++++++++++++++++ .../core/components/icon-stack/icon-stack.tsx | 62 +++++++++++++++++++ .../geoview-core/src/core/components/index.ts | 1 + .../core/components/legend/legend-item.tsx | 26 ++------ .../geoview-core/src/core/utils/utilities.ts | 4 +- 10 files changed, 184 insertions(+), 27 deletions(-) create mode 100644 packages/geoview-core/src/core/components/icon-stack/helper.ts create mode 100644 packages/geoview-core/src/core/components/icon-stack/icon-stack-style.ts create mode 100644 packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx diff --git a/packages/geoview-core/src/core/components/data-table/data-panel.tsx b/packages/geoview-core/src/core/components/data-table/data-panel.tsx index 51cf3dd9ebe..bf836d85295 100644 --- a/packages/geoview-core/src/core/components/data-table/data-panel.tsx +++ b/packages/geoview-core/src/core/components/data-table/data-panel.tsx @@ -2,6 +2,7 @@ import { useCallback, useEffect, useState } from 'react'; import { useTheme } from '@mui/material/styles'; import { Projection } from 'ol/proj'; import { useTranslation } from 'react-i18next'; +import { IconStack } from '@/app'; import { Box, Typography, @@ -11,7 +12,6 @@ import { ListItemButton, IconButton, ListItemIcon, - SendIcon, ChevronRightIcon, CircularProgress, Button, @@ -124,7 +124,7 @@ export function Datapanel({ layerData, mapId, projectionConfig, language }: Data handleListItemClick(event, index)}> - + {layerName![language]} diff --git a/packages/geoview-core/src/core/components/data-table/data-table-style.ts b/packages/geoview-core/src/core/components/data-table/data-table-style.ts index dafe5d6d8bc..90296abdb36 100644 --- a/packages/geoview-core/src/core/components/data-table/data-table-style.ts +++ b/packages/geoview-core/src/core/components/data-table/data-table-style.ts @@ -36,6 +36,7 @@ export const getSxClasses = (theme: Theme) => ({ listPrimaryText: { minWidth: '0', marginTop: '0.5rem', + marginLeft: '10px', marginBottom: '0.5rem', flex: '1 1 auto', display: 'flex', diff --git a/packages/geoview-core/src/core/components/details/details-style.ts b/packages/geoview-core/src/core/components/details/details-style.ts index b1e3a993ab5..774003aa0c8 100644 --- a/packages/geoview-core/src/core/components/details/details-style.ts +++ b/packages/geoview-core/src/core/components/details/details-style.ts @@ -18,6 +18,7 @@ export const getSxClasses = (theme: Theme) => ({ textOverflow: 'ellipsis', }, listPrimaryText: { + marginLeft: '0.62rem', minWidth: '0', marginTop: '0.5rem', marginBottom: '0.5rem', diff --git a/packages/geoview-core/src/core/components/details/layers-list-footer.tsx b/packages/geoview-core/src/core/components/details/layers-list-footer.tsx index a4365abba3a..bf52c87eb7f 100644 --- a/packages/geoview-core/src/core/components/details/layers-list-footer.tsx +++ b/packages/geoview-core/src/core/components/details/layers-list-footer.tsx @@ -12,7 +12,6 @@ import { ListItemButton, List, ListItemIcon, - SendIcon, Tooltip, IconButton, Grid, @@ -28,7 +27,7 @@ import { ArrowBackIcon, } from '@/ui'; import { FeatureInfo } from './feature-info-new'; -import { PayloadBaseClass, api } from '@/app'; +import { PayloadBaseClass, api, IconStack } from '@/app'; import { EVENT_NAMES } from '@/api/events/event-types'; import { payloadIsAFeatureHighlight, @@ -200,7 +199,7 @@ export function LayersListFooter(props: TypeLayersListProps): JSX.Element { }} > - + {layerData.layerName ? layerData.layerName : t('details.clickOnMap')} diff --git a/packages/geoview-core/src/core/components/icon-stack/helper.ts b/packages/geoview-core/src/core/components/icon-stack/helper.ts new file mode 100644 index 00000000000..07e24770c87 --- /dev/null +++ b/packages/geoview-core/src/core/components/icon-stack/helper.ts @@ -0,0 +1,46 @@ +export type TypeLayerInfo = { + layerPath: string; + iconData: string[]; +}; + +export type TypeLayerInfoArray = TypeLayerInfo[]; + +export const layerInfo: TypeLayerInfoArray = [ + { + layerPath: 'esriFeatureLYR4/8', + iconData: [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAgpJREFUOE+FlM9rE0EUx9+bXbOa1phtio00xUIr0kPxJAj6LyjoyYNIT4LSYL0Itkn2ZW01B2O8eBFz8ODNk+DFmxevvUpVFKliTMmatPnRbHaebMraNNls5zjz5fNmPu8xCAHLNM15AM5LyQtE9GtYFIMg2YdZUyj2Tekob9jBFBG1/PJDIaZp3oDQzpo4/nOSa4kt2QmvsMOviKjTD/KFGIZxSVXxOY5tzONIGbmlO1yZXXdk6C6l6OOhECJKKArkMbJ5DSM/VBBuYQSuTTVlLfGusd25lcvlrF7QwE1cD8qx8iLqX3VQd/ezjsbSmqnKRqzY7+cAxPOgjH2eAq06UIDbEclbZ8uuHyNtFL0K/4OmaS4gynt7Hv4goPRpBAI3Y10/6eVH530g2fegti4q8fUwKO2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAgpJREFUOE+FlM9rE0EUx9+bXbOa1phtio00xUIr0kPxJAj6LyjoyYNIT4LSYL0Itkn2ZW01B2O8eBFz8ODNk+DFmxevvUpVFKliTMmatPnRbHaebMraNNls5zjz5fNmPu8xCAHLNM15AM5LyQtE9GtYFIMg2YdZUyj2Tekob9jBFBG1/PJDIaZp3oDQzpo4/nOSa4kt2QmvsMOviKjTD/KFGIZxSVXxOY5tzONIGbmlO1yZXXdk6C6l6OOhECJKKArkMbJ5DSM/VBBuYQSuTTVlLfGusd25lcvlrF7QwE1cD8qx8iLqX3VQd/ezjsbSmqnKRqzY7+cAxPOgjH2eAq06UIDbEclbZ8uuHyNtFL0K/4OmaS4gynt7Hv4goPRpBAI3Y10/6eVH530g2fegti4q8fUwKO2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAR1JREFUKFNjZEAFzAw+6e7GHOwWV37++cT79++BN9tmnoEpYYQxAjLKzJj//Fv76edvma9//zNwszIzcLEwMjz5/HP32VdfwxgOLPgAVmyakCUhx8JxdcvL70JoNjG4iXAyPP/y69CZ1VPswYojMkuXrn/yJQpdIYzvIcbJsOPFLw+wYu+Eout73n7XwKXYToiD4dCbHxOgigvv73n7QwGXYmNeVoa3P/8uBisOTC46vO3VdxucJguwMRz6+L0ErDg5u6Jy/aOPbV9xqPYS4/y5/vVfeVjQMcVklW7Y9viLL7oGDzHOv69+/k06vmTiIng4MzAwMCVklza//vYn8N8/BiUGBoY/HKxMV699+lp0c9WMoyBLkRXjcjJcHACUTW/kHNx1hAAAAABJRU5ErkJggg==', + ], + }, + { + layerPath: 'geojsonLYR1/polygons.json', + iconData: [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAASZJREFUKFNjZEAC/1cxMH96zOD+jUnbgpPh6ieG/yIHBIrenIEpYYQxbva5m/34zbOWh+m9DBvTV4bf/7kZfvznZhBierybnelCmGAhwwew4vtdphJfGGSuyrOuF0K2CcR++sebQYjl6SHxwgv2YMXnuiKWKrOsiGKE24Oq5ckfXwZp1l0eYOnr3V7XpVm2aaCbCuO/+evEIMx8dAJY8c0e9/uSzDsVcCn++M+cgY3xw2Kw4svdvoflWTbb4FL8+o8TgxDzvhKw4j3tyZWm7EvaGBl/YlX/6Lf/TwW2jfIwLzEd64rZoM2y2hdZw///DAxP/vr+FWJ9kyRZcHwRsv+ZDrUlNIuwvgxkY/in9J+R4c8PBo6rYv9uFImX3TwKshJHYGF3PQBCJWK8tt5Q2wAAAABJRU5ErkJggg==', + ], + }, + { + layerPath: 'geojsonLYR1/lines.json', + iconData: [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAgpJREFUOE+FlM9rE0EUx9+bXbOa1phtio00xUIr0kPxJAj6LyjoyYNIT4LSYL0Itkn2ZW01B2O8eBFz8ODNk+DFmxevvUpVFKliTMmatPnRbHaebMraNNls5zjz5fNmPu8xCAHLNM15AM5LyQtE9GtYFIMg2YdZUyj2Tekob9jBFBG1/PJDIaZp3oDQzpo4/nOSa4kt2QmvsMOviKjTD/KFGIZxSVXxOY5tzONIGbmlO1yZXXdk6C6l6OOhECJKKArkMbJ5DSM/VBBuYQSuTTVlLfGusd25lcvlrF7QwE1cD8qx8iLqX3VQd/ezjsbSmqnKRqzY7+cAxPOgjH2eAq06UIDbEclbZ8uuHyNtFL0K/4OmaS4gynt7Hv4goPRpBAI3Y10/6eVH530g2fegti4q8fUwKO2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAgpJREFUOE+FlM9rE0EUx9+bXbOa1phtio00xUIr0kPxJAj6LyjoyYNIT4LSYL0Itkn2ZW01B2O8eBFz8ODNk+DFmxevvUpVFKliTMmatPnRbHaebMraNNls5zjz5fNmPu8xCAHLNM15AM5LyQtE9GtYFIMg2YdZUyj2Tekob9jBFBG1/PJDIaZp3oDQzpo4/nOSa4kt2QmvsMOviKjTD/KFGIZxSVXxOY5tzONIGbmlO1yZXXdk6C6l6OOhECJKKArkMbJ5DSM/VBBuYQSuTTVlLfGusd25lcvlrF7QwE1cD8qx8iLqX3VQd/ezjsbSmqnKRqzY7+cAxPOgjH2eAq06UIDbEclbZ8uuHyNtFL0K/4OmaS4gynt7Hv4goPRpBAI3Y10/6eVH530g2fegti4q8fUwKO2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + ], + }, + { + layerPath: 'uniqueValueId/1', + iconData: [ + 'data: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GIZxSVXxOY5tzONIGbmlO1yZXXdk6C6l6OOhECJKKArkMbJ5DSM/VBBuYQSuTTVlLfGusd25lcvlrF7QwE1cD8qx8iLqX3VQd/ezjsbSmqnKRqzY7+cAxPOgjH2eAq06UIDbEclbZ8uuHyNtFL0K/4OmaS4gynt7Hv4goPRpBAI3Y10/6eVH530g2fegti4q8fUwKO2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAR1JREFUKFNjZEAFzAw+6e7GHOwWV37++cT79++BN9tmnoEpYYQxAjLKzJj//Fv76edvma9//zNwszIzcLEwMjz5/HP32VdfwxgOLPgAVmyakCUhx8JxdcvL70JoNjG4iXAyPP/y69CZ1VPswYojMkuXrn/yJQpdIYzvIcbJsOPFLw+wYu+Eout73n7XwKXYToiD4dCbHxOgigvv73n7QwGXYmNeVoa3P/8uBisOTC46vO3VdxucJguwMRz6+L0ErDg5u6Jy/aOPbV9xqPYS4/y5/vVfeVjQMcVklW7Y9viLL7oGDzHOv69+/k06vmTiIng4MzAwMCVklza//vYn8N8/BiUGBoY/HKxMV699+lp0c9WMoyBLkRXjcjJcHACUTW/kHNx1hAAAAABJRU5ErkJggg==', + ], + }, + { + layerPath: 'esriFeatureLYR5/0', + iconData: [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNS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QSuTTVlLfGusd25lcvlrF7QwE1cD8qx8iLqX3VQd/ezjsbSmqnKRqzY7+cAxPOgjH2eAq06UIDbEclbZ8uuHyNtFL0K/4OmaS4gynt7Hv4goPRpBAI3Y10/6eVH530g2fegti4q8fUwKO2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAR1JREFUKFNjZEAFzAw+6e7GHOwWV37++cT79++BN9tmnoEpYYQxAjLKzJj//Fv76edvma9//zNwszIzcLEwMjz5/HP32VdfwxgOLPgAVmyakCUhx8JxdcvL70JoNjG4iXAyPP/y69CZ1VPswYojMkuXrn/yJQpdIYzvIcbJsOPFLw+wYu+Eout73n7XwKXYToiD4dCbHxOgigvv73n7QwGXYmNeVoa3P/8uBisOTC46vO3VdxucJguwMRz6+L0ErDg5u6Jy/aOPbV9xqPYS4/y5/vVfeVjQMcVklW7Y9viLL7oGDzHOv69+/k06vmTiIng4MzAwMCVklza//vYn8N8/BiUGBoY/HKxMV699+lp0c9WMoyBLkRXjcjJcHACUTW/kHNx1hAAAAABJRU5ErkJggg==', + ], + }, +]; diff --git a/packages/geoview-core/src/core/components/icon-stack/icon-stack-style.ts b/packages/geoview-core/src/core/components/icon-stack/icon-stack-style.ts new file mode 100644 index 00000000000..b2e88f2624b --- /dev/null +++ b/packages/geoview-core/src/core/components/icon-stack/icon-stack-style.ts @@ -0,0 +1,61 @@ +export const getSxClasses = () => ({ + legendIconTransparent: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + width: 24, + height: 24, + }, + iconPreviewHoverable: { + position: 'absolute', + left: -3, + top: -2, + padding: 0, + borderRadius: 0, + border: '1px solid', + borderColor: 'grey.600', + boxShadow: 'rgb(0 0 0 / 20%) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px', + transition: 'transform .3s ease-in-out', + '&:hover': { + transform: 'rotate(-18deg) translateX(-8px)', + }, + }, + iconPreviewStacked: { + padding: 0, + borderRadius: 0, + border: '1px solid', + borderColor: 'grey.600', + boxShadow: 'rgb(0 0 0 / 20%) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px', + background: '#fff', + }, + maxIconImg: { + maxWidth: 24, + maxHeight: 24, + }, + legendIcon: { + display: 'flex', + justifyContent: 'center', + alignItems: 'center', + width: 24, + height: 24, + background: '#fff', + }, + stackIconsBox: { + position: 'relative', + marginLeft: 8, + '&:focus': { + outlineColor: 'grey', + }, + }, + iconPreview: { + marginLeft: 8, + padding: 0, + borderRadius: 0, + border: '1px solid', + borderColor: 'palette.grey.600', + boxShadow: 'rgb(0 0 0 / 20%) 0px 3px 1px -2px, rgb(0 0 0 / 14%) 0px 2px 2px 0px, rgb(0 0 0 / 12%) 0px 1px 5px 0px', + '&:focus': { + border: 'revert', + }, + }, +}); diff --git a/packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx b/packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx new file mode 100644 index 00000000000..d87e455d49e --- /dev/null +++ b/packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx @@ -0,0 +1,62 @@ +/* eslint-disable react/require-default-props */ +import React from 'react'; +import { Box, IconButton, BrowserNotSupportedIcon } from '@/ui'; +import { getSxClasses } from './icon-stack-style'; +import { layerInfo, TypeLayerInfo } from './helper'; +// TODO uncomment line below when you have layers and icons in the store +// import { useIconLayerSet } from '@/core/stores/store-interface-and-intial-values/layer-state'; + +export interface TypeIconStackProps { + layerPath: string; + onIconClick?: () => void; + onStackIconClick?: (e: React.KeyboardEvent) => void; +} + +/** + * Icon Stack to represent layer icons + * + * @param {string} layerPath + * @returns {JSX.Element} the icon stack item + */ +export function IconStack({ layerPath, onIconClick, onStackIconClick }: TypeIconStackProps): JSX.Element | null { + const sxClasses = getSxClasses(); + + // TODO use line below when we can get layers and their icons from the store + // const iconData = useIconLayerSet(layerPath); + + // TODO function below is using the fake data, remove it once you have layers and icons in the store + const findIconsData = (layerPathStr: string): string[] | undefined => { + const foundMatchedLayerPath: TypeLayerInfo | undefined = layerInfo.find((layer: TypeLayerInfo) => layer.layerPath === layerPathStr); + return foundMatchedLayerPath?.iconData; + }; + const iconData = findIconsData(layerPath); + + const iconImg: string = iconData && iconData.length > 0 ? iconData[0] : ''; + const iconImgStacked: string = iconData && iconData.length > 1 ? iconData[1] : ''; + const numOfIcons: number | undefined = iconData?.length; + + // TODO for now just use 2 icons + // eslint-disable-next-line no-nested-ternary + return numOfIcons === 1 ? ( + + {iconImg === 'no data' ? ( + + ) : ( + + icon + + )} + + ) : numOfIcons && numOfIcons > 0 ? ( + onStackIconClick?.(e)}> + + + {iconImgStacked && icon} + + + + {iconImg && icon} + + + ) : null; +} diff --git a/packages/geoview-core/src/core/components/index.ts b/packages/geoview-core/src/core/components/index.ts index 119d92d7254..ec12674b8c1 100644 --- a/packages/geoview-core/src/core/components/index.ts +++ b/packages/geoview-core/src/core/components/index.ts @@ -25,6 +25,7 @@ export * from './geolocator/geo-list'; export * from './geolocator/geolocator'; export * from './geolocator/geolocator-style'; export * from './hover-tooltip/hover-tooltip'; +export * from './icon-stack/icon-stack'; export * from './legend-2/legend-api'; export * from './legend/legend-api'; export * from './legend/legend-icon-list'; diff --git a/packages/geoview-core/src/core/components/legend/legend-item.tsx b/packages/geoview-core/src/core/components/legend/legend-item.tsx index bf27d46c483..11556e1731b 100644 --- a/packages/geoview-core/src/core/components/legend/legend-item.tsx +++ b/packages/geoview-core/src/core/components/legend/legend-item.tsx @@ -29,7 +29,7 @@ import { BrowserNotSupportedIcon, Grid, } from '@/ui'; -import { api, payloadIsLegendInfo, NumberPayload, PayloadBaseClass, EsriDynamic } from '@/app'; +import { api, payloadIsLegendInfo, NumberPayload, PayloadBaseClass, EsriDynamic, IconStack } from '@/app'; import { LegendIconList } from './legend-icon-list'; import { AbstractGeoViewLayer, @@ -191,7 +191,7 @@ export function LegendItem(props: TypeLegendItemProps): JSX.Element { const [currentWMSStyle, setCurrentWMSStyle] = useState(); const [iconType, setIconType] = useState(null); const [iconImg, setIconImg] = useState(null); - const [iconImgStacked, setIconImgStacked] = useState(null); + const [, setIconImgStacked] = useState(null); const [iconList, setIconList] = useState(null); const [labelList, setLabelList] = useState(null); const [geometryLayerConfig, setLayerConfig] = useState(null); @@ -541,26 +541,10 @@ export function LegendItem(props: TypeLegendItemProps): JSX.Element { )} )} - {iconType === 'list' && !isLegendOpen && ( - - handleStackIcon(e)} - > - - - {iconImgStacked && icon} - - - - {iconImg && icon} - - - + {!isLegendOpen && ( + handleStackIcon(e)} /> )} + {groupItems.length === 0 && WMSStyles.length < 2 && !iconType && !isLegendOpen && ( diff --git a/packages/geoview-core/src/core/utils/utilities.ts b/packages/geoview-core/src/core/utils/utilities.ts index eb6e64f1142..e3b690087ab 100644 --- a/packages/geoview-core/src/core/utils/utilities.ts +++ b/packages/geoview-core/src/core/utils/utilities.ts @@ -57,7 +57,9 @@ function _addNotification(mapId: string, type: NotificationType = 'info', messag }; // ? Need to do lazy import, if not viewer crashes (AppEventProcessor.addAppNotification(mapId, notification)); - import('@/api/event-processors/event-processor-children/app-event-processor').then((mod) => mod.AppEventProcessor.addAppNotification(mapId, notification)); + import('@/api/event-processors/event-processor-children/app-event-processor').then((mod) => + mod.AppEventProcessor.addAppNotification(mapId, notification) + ); } /** From 52f83ca57e40e15166ac435ccf382bc24572d76c Mon Sep 17 00:00:00 2001 From: "amir.azma" Date: Tue, 14 Nov 2023 16:33:10 -0500 Subject: [PATCH 2/5] fix(swiper): Fix swiper issue in footer-bar --- packages/geoview-swiper/src/index.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/geoview-swiper/src/index.tsx b/packages/geoview-swiper/src/index.tsx index 336540dbc67..d74531e9c62 100644 --- a/packages/geoview-swiper/src/index.tsx +++ b/packages/geoview-swiper/src/index.tsx @@ -61,7 +61,8 @@ class SwiperPlugin extends AbstractPlugin { // create the swiper container and insert it after top link const el = document.createElement('div'); el.setAttribute('id', `${mapId}-swiper`); - document.getElementById(`toplink-${mapId}`)?.after(el); + const mapElement = document.getElementById(`map-${mapId}`); + mapElement?.insertBefore(el, mapElement.firstChild); // create the swiper component and render const node = createElement(Swiper, { mapId, config: configObj!, translations: this.translations }); From af2c4246e79218b4fae1ece69e1738ccdb4800c2 Mon Sep 17 00:00:00 2001 From: "amir.azma" Date: Tue, 14 Nov 2023 16:43:14 -0500 Subject: [PATCH 3/5] fix(time-slider): Include IconStack in time slider --- .../src/core/components/time-slider/time-slider-panel.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/geoview-core/src/core/components/time-slider/time-slider-panel.tsx b/packages/geoview-core/src/core/components/time-slider/time-slider-panel.tsx index 6a6b4ff4981..b6d643ff007 100644 --- a/packages/geoview-core/src/core/components/time-slider/time-slider-panel.tsx +++ b/packages/geoview-core/src/core/components/time-slider/time-slider-panel.tsx @@ -12,7 +12,6 @@ import { ListItemButton, ListItemIcon, Paper, - SendIcon, Tooltip, Typography, ArrowForwardIcon, @@ -20,7 +19,7 @@ import { } from '@/ui'; import { getSxClasses } from './time-slider-style'; import { TimeSlider } from './time-slider'; -import { api, getLocalizedValue } from '@/app'; +import { api, getLocalizedValue, IconStack } from '@/app'; import { SliderFilterProps } from './time-slider-api'; import { ResponsiveGrid } from '../responsive-grid/responsive-grid'; @@ -75,7 +74,7 @@ export function TimeSliderPanel(props: TypeTimeSliderProps): JSX.Element { sx={{ height: '67px' }} > - + From 097eb9edec116136bd2129a89412fad296666918 Mon Sep 17 00:00:00 2001 From: "amir.azma" Date: Tue, 14 Nov 2023 16:51:52 -0500 Subject: [PATCH 4/5] fix(icon-stack-helper): Update icon stack helper --- .../src/core/components/icon-stack/helper.ts | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/packages/geoview-core/src/core/components/icon-stack/helper.ts b/packages/geoview-core/src/core/components/icon-stack/helper.ts index 07e24770c87..76a7dbdb22d 100644 --- a/packages/geoview-core/src/core/components/icon-stack/helper.ts +++ b/packages/geoview-core/src/core/components/icon-stack/helper.ts @@ -43,4 +43,27 @@ export const layerInfo: TypeLayerInfoArray = [ 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAR1JREFUKFNjZEAFzAw+6e7GHOwWV37++cT79++BN9tmnoEpYYQxAjLKzJj//Fv76edvma9//zNwszIzcLEwMjz5/HP32VdfwxgOLPgAVmyakCUhx8JxdcvL70JoNjG4iXAyPP/y69CZ1VPswYojMkuXrn/yJQpdIYzvIcbJsOPFLw+wYu+Eout73n7XwKXYToiD4dCbHxOgigvv73n7QwGXYmNeVoa3P/8uBisOTC46vO3VdxucJguwMRz6+L0ErDg5u6Jy/aOPbV9xqPYS4/y5/vVfeVjQMcVklW7Y9viLL7oGDzHOv69+/k06vmTiIng4MzAwMCVklza//vYn8N8/BiUGBoY/HKxMV699+lp0c9WMoyBLkRXjcjJcHACUTW/kHNx1hAAAAABJRU5ErkJggg==', ], }, + { + layerPath: 'historical-flood/0', + iconData: [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAgpJREFUOE+FlM9rE0EUx9+bXbOa1phtio00xUIr0kPxJAj6LyjoyYNIT4LSYL0It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EclbZ8uuHyNtFL0K/4OmaS4gynt7Hv4goPRpBAI3Y10/6eVH530g2fegti4q8fUwKO2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAR1JREFUKFNjZEAFzAw+6e7GHOwWV37++cT79++BN9tmnoEpYYQxAjLKzJj//Fv76edvma9//zNwszIzcLEwMjz5/HP32VdfwxgOLPgAVmyakCUhx8JxdcvL70JoNjG4iXAyPP/y69CZ1VPswYojMkuXrn/yJQpdIYzvIcbJsOPFLw+wYu+Eout73n7XwKXYToiD4dCbHxOgigvv73n7QwGXYmNeVoa3P/8uBisOTC46vO3VdxucJguwMRz6+L0ErDg5u6Jy/aOPbV9xqPYS4/y5/vVfeVjQMcVklW7Y9viLL7oGDzHOv69+/k06vmTiIng4MzAwMCVklza//vYn8N8/BiUGBoY/HKxMV699+lp0c9WMoyBLkRXjcjJcHACUTW/kHNx1hAAAAABJRU5ErkJggg==', + ], + }, + { + layerPath: 'historical-flood/0', + iconData: [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAgpJREFUOE+FlM9rE0EUx9+bXbOa1phtio00xUIr0kPxJAj6LyjoyYNIT4LSYL0Itkn2ZW01B2O8eBFz8ODNk+DFmxevvUpVFKliTMmatPnRbHaebMraNNls5zjz5fNmPu8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O2AziPI0rlm+v7TsA+EroNqGyL6bRZHSioA+4K4PgHy7/SnzPLjuQFIMpnUxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAALCAYAAACprHcmAAAAAXNSR0IArs4c6QAAAR1JREFUKFNjZEAFzAw+6e7GHOwWV37++cT79++BN9tmnoEpYYQxAjLKzJj//Fv76edvma9//zNwszIzcLEwMjz5/HP32VdfwxgOLPgAVmyakCUhx8JxdcvL70JoNjG4iXAyPP/y69CZ1VPswYojMkuXrn/yJQpdIYzvIcbJsOPFLw+wYu+Eout73n7XwKXYToiD4dCbHxOgigvv73n7QwGXYmNeVoa3P/8uBisOTC46vO3VdxucJguwMRz6+L0ErDg5u6Jy/aOPbV9xqPYS4/y5/vVfeVjQMcVklW7Y9viLL7oGDzHOv69+/k06vmTiIng4MzAwMCVklza//vYn8N8/BiUGBoY/HKxMV699+lp0c9WMoyBLkRXjcjJcHACUTW/kHNx1hAAAAABJRU5ErkJggg==', + ], + }, + { + layerPath: 'MSI/msi-94-or-more', + iconData: [ + 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAARCAYAAAA7bUf6AAAAAXNSR0IArs4c6QAAAgpJREFUOE+FlM9rE0EUx9+bXbOa1phtio00xUIr0kPxJAj6LyjoyYNIT4LSYL0Itkn2ZW01B2O8eBFz8ODNk+DFmxevvUpVFKliTMmatPnRbHaebMraNNls5zjz5fNmPu8xCAHLNM15AM5LyQtE9GtYFIMg2YdZUyj2Tekob9jBFBG1/PJDIaZp3oDQ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Uxif0KxhqPBP6lziGaqKfwrsngCtnbG6P3slkMi8HIO4GEYWUI/IBHK0sidhGFLBnrhwNpDXjcH0832i0cr1tHujA6urKaYn4RIz+vozR7xrAnmCuTrPcnnwrbWWRiDYD54SIBKhwQQi76Pnh+smuB3TCt1Op1AdEPCDMd+yJSEVVXu36CZfivHPKcT1YlvW6UCg0Dx17L+D5YbSXoKO96PcQ+Jygr2HY2T9D5usSwVan3AAAAABJRU5ErkJggg==', + ], + }, ]; From b9a14aba7d25e89b7616bf2bb3850f98c244c4d9 Mon Sep 17 00:00:00 2001 From: "amir.azma" Date: Tue, 14 Nov 2023 17:05:56 -0500 Subject: [PATCH 5/5] fix(time-slider): Fix time slider stack icon --- .../src/core/components/icon-stack/icon-stack.tsx | 10 +++++++++- .../core/components/time-slider/time-slider-style.ts | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx b/packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx index d87e455d49e..b47668486f5 100644 --- a/packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx +++ b/packages/geoview-core/src/core/components/icon-stack/icon-stack.tsx @@ -58,5 +58,13 @@ export function IconStack({ layerPath, onIconClick, onStackIconClick }: TypeIcon {iconImg && icon} - ) : null; + ) : ( + onStackIconClick?.(e)}> + + + + + + + ); } diff --git a/packages/geoview-core/src/core/components/time-slider/time-slider-style.ts b/packages/geoview-core/src/core/components/time-slider/time-slider-style.ts index 2e98d7c3e61..07361d56721 100644 --- a/packages/geoview-core/src/core/components/time-slider/time-slider-style.ts +++ b/packages/geoview-core/src/core/components/time-slider/time-slider-style.ts @@ -96,6 +96,7 @@ export const getSxClasses = (theme: Theme) => ({ }, gridContainer: { paddingLeft: '1rem', paddingRight: '1rem' }, listPrimaryText: { + marginLeft: '0.62rem', minWidth: '0', padding: '1.3rem 0', flex: '1 1 auto',