Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 52c305f
Author: Christopher Phelefu <[email protected]>
Date:   Fri Oct 27 10:28:13 2023 -0400

    separate legend and layers (Canadian-Geospatial-Platform#1439)

    * separate legend and layers

    * fixing build errors

    * adding icons to the footer tabs

    * fixing errors

commit e944d8c
Author: Christopher Phelefu <[email protected]>
Date:   Thu Oct 26 13:43:00 2023 -0400

    move controlling views to a store flag (Canadian-Geospatial-Platform#1433)

    * move controlling views to a store flag

    * handling currentRightPanel in the code

    * adding legend-overview that uses store

    * connecting store to data

    * fixing legend overview

    * fixing legend overview

    * adding items to generated data

    * styling legend

    * pushes fixes to build

    * pushes fixes to build

    * fixing the legend errors

    * remove unused Grid reference

commit bd5d95c
Author: Kamy <[email protected]>
Date:   Thu Oct 26 11:13:07 2023 -0400

    646 UI components mui (Canadian-Geospatial-Platform#1431)

    * fix(appbar): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(footerTabs): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(map): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(mousePosition): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(northArrow): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(mousePosition): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(mousePosition): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Scale): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Divider): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Drawer): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(CheckboxList): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Modal): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Panel): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Select): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Slider): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Stepper): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Switch): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(TextField): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(Button): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(theme): mui styles refactor  Closes Canadian-Geospatial-Platform#646

    * fix(checkboxList): single style file  Closes Canadian-Geospatial-Platform#646

    * fix(MousePosition): update native button to MUI button  Closes Canadian-Geospatial-Platform#646

    * fix(Scale): update native button to MUI button  Closes Canadian-Geospatial-Platform#646

    * fix(basemappanel): nui style refactor  Closes Canadian-Geospatial-Platform#646

    * fix(layerList): nui style refactor  Closes Canadian-Geospatial-Platform#646

    * fix(layerList): nui style refactor  Closes Canadian-Geospatial-Platform#646

    * fix(divider): nui style refactor  Closes Canadian-Geospatial-Platform#646

commit 3c23569
Merge: 51010d6 e7647a8
Author: Johann Levesque <[email protected]>
Date:   Tue Oct 24 15:07:19 2023 -0400

    Merge pull request Canadian-Geospatial-Platform#1432 from amir-azma/1376-details-store

    fix(layer-selection) Pre select the previously selected layer in left panel (Canadian-Geospatial-Platform#1432)

commit e7647a8
Author: amir.azma <[email protected]>
Date:   Tue Oct 24 14:59:49 2023 -0400

    fix(layer-selection) Fix typo

commit 2be27be
Author: amir.azma <[email protected]>
Date:   Tue Oct 24 14:41:50 2023 -0400

    fix(layer-selection) Remove prefix store from states

commit 91958e6
Author: amir.azma <[email protected]>
Date:   Tue Oct 24 14:29:17 2023 -0400

    fix(layer-selection) Refactor based on team feedback, fixed bug related to layer pre selection

commit 887a374
Author: amir.azma <[email protected]>
Date:   Mon Oct 23 16:49:23 2023 -0400

    fix(layer-selection) Pre select the previously selected layer in left panel

commit 51010d6
Merge: e427f97 46dc5da
Author: Johann Levesque <[email protected]>
Date:   Tue Oct 24 14:24:31 2023 -0400

    Merge pull request Canadian-Geospatial-Platform#1434 from jolevesq/1009-ext-inter

    feat(interaction): Add Extent interaction (Canadian-Geospatial-Platform#1434)

    Co-Authored-By: Johann Levesque <[email protected]>

commit 46dc5da
Author: Johann Levesque <[email protected]>
Date:   Tue Oct 24 09:21:57 2023 -0400

    feat(interaction): Add Extent interaction
    Closes Canadian-Geospatial-Platform#1009

commit e427f97
Merge: 2abfc6a 4a0ca7c
Author: Johann Levesque <[email protected]>
Date:   Tue Oct 24 13:43:52 2023 -0400

    Merge pull request Canadian-Geospatial-Platform#1435 from Alex-NRCan/feat-async-await-rule

    Added a rule about having an await if a function has the 'async' keyword (Canadian-Geospatial-Platform#1435)

commit 4a0ca7c
Author: Alex <[email protected]>
Date:   Tue Oct 24 10:55:00 2023 -0400

    Added a rule about having an await if a function has the 'async' keyword and enforcing the return to be a Promise.
    Changed from an error to a warning
    Fixed a the params comments on getGeoviewLayerByIdAsync

commit 2abfc6a
Merge: 8d6b933 bdf53a5
Author: Johann Levesque <[email protected]>
Date:   Tue Oct 24 10:04:48 2023 -0400

    Merge pull request Canadian-Geospatial-Platform#1417 from ychoquet/Encapsulate-promises-in-async-functions

    Encapsulate promises in async functions (Canadian-Geospatial-Platform#1417)

commit bdf53a5
Author: Yves Choquette <[email protected]>
Date:   Fri Oct 20 10:18:41 2023 -0400

    Encapssulate promises in async functions

commit 8d6b933
Merge: 342bccd 59a3321
Author: Johann Levesque <[email protected]>
Date:   Mon Oct 23 14:04:41 2023 -0400

    Merge pull request Canadian-Geospatial-Platform#1430 from ychoquet/1423--BUG]-Map-loaded-is-not-fired

    1423-[BUG] Map loaded is not fired (Canadian-Geospatial-Platform#1430)

commit 59a3321
Author: Yves Choquette <[email protected]>
Date:   Mon Oct 23 13:22:18 2023 -0400

    1423-[BUG] Map loaded is not fired

commit 342bccd
Merge: d549796 fc2b787
Author: Johann Levesque <[email protected]>
Date:   Mon Oct 23 13:36:35 2023 -0400

    Merge pull request Canadian-Geospatial-Platform#1429 from cphelefu/legend-fixes-rebased

    Legend fixes rebased (Canadian-Geospatial-Platform#1429)

commit fc2b787
Author: Christopher Ram <[email protected]>
Date:   Mon Oct 23 13:18:11 2023 -0400

    fixing footer bar

commit 96d4fa2
Author: Christopher Ram <[email protected]>
Date:   Mon Oct 23 12:56:26 2023 -0400

    remove console log

commit 7d10350
Author: Christopher Ram <[email protected]>
Date:   Mon Oct 23 12:32:45 2023 -0400

    reducing commits for legend files
  • Loading branch information
Alex-NRCan committed Oct 31, 2023
1 parent f2a2a89 commit 3201b0e
Show file tree
Hide file tree
Showing 104 changed files with 2,561 additions and 1,807 deletions.
3 changes: 2 additions & 1 deletion packages/.eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
{
"endOfLine": "auto"
}
]
],
"require-await": 1 // warning
}
}
81 changes: 81 additions & 0 deletions packages/geoview-basemap-panel/src/basemap-panel-style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
/* @ts-expect-error there is no mui style in this package */
export const getSxClasses = (theme) => ({
basemapCard: {
'& .MuiCard-root': {
backgroundColor: theme.palette.grey.A700,
color: theme.palette.primary.light,
display: 'flex',
flexDirection: 'column',
backgroundClip: 'padding-box',
border: '1px solid rgba(255,255,255,0.25)',
borderRadius: '6px',
boxShadow: 'none',
marginBottom: '16px',
transition: 'all 0.3s ease-in-out',
'&:last-child': {
marginBottom: '0px',
},
},
'& .MuiCardHeader-root': {
backgroundColor: `${theme.palette.grey.A700} !important`,
color: theme.basemapPanel.header,
fontSize: 14,
fontWeight: 400,
margin: 0,
padding: '0 12px',
height: 60,
width: '100%',
order: 2,
},
'& .MuiCardContent-root': {
order: 1,
height: 190,
position: 'relative',
padding: 0,
'&:last-child': {
padding: 0,
},
'& .basemapCardThumbnail': {
position: 'absolute',
height: '100%',
width: '100%',
objectFit: 'cover',
top: 0,
left: 0,
},
'& .basemapCardThumbnailOverlay': {
display: 'block',
height: '100%',
width: '100%',
position: 'absolute',
backgroundColor: theme.basemapPanel.overlayDefault,
transition: 'all 0.3s ease-in-out',
},
},
'&:hover': {
cursor: 'pointer',
borderColor: theme.basemapPanel.borderHover,
'& .MuiCardContent-root': {
'& .basemapCardThumbnailOverlay': {
backgroundColor: theme.basemapPanel.overlayHover,
},
},
},
'&.active': {
borderColor: theme.basemapPanel.borderActive,
'& .MuiCardContent-root': {
'& .basemapCardThumbnailOverlay': {
backgroundColor: theme.basemapPanel.overlayActive,
},
},
'&:hover': {
borderColor: 'rgba(255,255,255,0.75)',
'& .MuiCardContent-root': {
'& .basemapCardThumbnailOverlay': {
backgroundColor: 'rgba(0,0,0,0)',
},
},
},
},
},
});
90 changes: 7 additions & 83 deletions packages/geoview-basemap-panel/src/basemap-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
TypeBasemapOptions,
TypeValidMapProjectionCodes,
} from 'geoview-core';
import { getSxClasses } from './basemap-panel-style';

const w = window as TypeWindow;

Expand All @@ -25,93 +26,17 @@ export function BasemapPanel(props: BaseMapPanelProps): JSX.Element {
const myMap = cgpv.api.maps[mapId];

const { api, ui, react } = cgpv;
const { Select, Card } = ui.elements;
const { Select, Card, Box } = ui.elements;

const { useState, useEffect } = react;

const [basemapList, setBasemapList] = useState<TypeBasemapProps[]>([]);
const [activeBasemapId, setActiveBasemapId] = useState<string>('');
const [canSwichProjection] = useState(config.canSwichProjection);

const useStyles = ui.makeStyles((theme) => ({
basemapCard: {
backgroundColor: theme.palette.grey.A700,
color: theme.palette.primary.light,
display: 'flex',
flexDirection: 'column',
backgroundClip: 'padding-box',
border: `1px solid ${theme.basemapPanel.borderDefault}`,
borderRadius: 6,
boxShadow: 'none',
marginBottom: 16,
transition: 'all 0.3s ease-in-out',
'&:last-child': {
marginBottom: 0,
},
'& .MuiCardHeader-root': {
backgroundColor: theme.palette.grey.A700,
color: theme.basemapPanel.header,
fontSize: 14,
fontWeight: 400,
margin: 0,
padding: '0 12px',
height: 60,
width: '100%',
order: 2,
},
'& .MuiCardContent-root': {
order: 1,
height: 190,
position: 'relative',
padding: 0,
'&:last-child': {
padding: 0,
},
'& .basemapCardThumbnail': {
position: 'absolute',
height: '100%',
width: '100%',
objectFit: 'cover',
top: 0,
left: 0,
},
'& .basemapCardThumbnailOverlay': {
display: 'block',
height: '100%',
width: '100%',
position: 'absolute',
backgroundColor: theme.basemapPanel.overlayDefault,
transition: 'all 0.3s ease-in-out',
},
},
'&:hover': {
cursor: 'pointer',
borderColor: theme.basemapPanel.borderHover,
'& .MuiCardContent-root': {
'& .basemapCardThumbnailOverlay': {
backgroundColor: theme.basemapPanel.overlayHover,
},
},
},
'&.active': {
borderColor: theme.basemapPanel.borderActive,
'& .MuiCardContent-root': {
'& .basemapCardThumbnailOverlay': {
backgroundColor: theme.basemapPanel.overlayActive,
},
},
'&:hover': {
borderColor: 'rgba(255,255,255,0.75)',
'& .MuiCardContent-root': {
'& .basemapCardThumbnailOverlay': {
backgroundColor: 'rgba(0,0,0,0)',
},
},
},
},
},
}));
const classes = useStyles();
const theme = ui.useTheme();

const sxClasses = getSxClasses(theme);

// TODO: change the path for getting projection on schema refactor
const projections: number[] =
Expand Down Expand Up @@ -220,7 +145,7 @@ export function BasemapPanel(props: BaseMapPanelProps): JSX.Element {
}, []);

return (
<div>
<Box sx={sxClasses.basemapCard}>
{canSwichProjection && (
<Select
fullWidth
Expand All @@ -247,7 +172,6 @@ export function BasemapPanel(props: BaseMapPanelProps): JSX.Element {
return (
<Card
tabIndex={0}
classes={{ root: classes.basemapCard }}
className={basemap.basemapId === activeBasemapId ? 'active' : ''}
onClick={() => setBasemap(basemap.basemapId as string)}
onKeyPress={() => setBasemap(basemap.basemapId as string)}
Expand All @@ -269,6 +193,6 @@ export function BasemapPanel(props: BaseMapPanelProps): JSX.Element {
/>
);
})}
</div>
</Box>
);
}
3 changes: 2 additions & 1 deletion packages/geoview-core/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h4>Basic Maps</h4>
<h4>Basic Raw Components</h4>
<a class="page-link" href="./raw-feature-info-1.html">Basic Feature Info (in footer panel)</a>
<a class="page-link" href="./raw-data-table.html">Basic Data Table</a>
<a class="page-link" href="./raw-legend-2.html">Basic Legend</a>
<a class="page-link" href="./raw-legend-2.html">Basic Legend(2)</a>
<h4>Basic Loading</h4>
<a class="page-link" href="./default-config.html">Default Configuration</a>
<a class="page-link"
Expand Down Expand Up @@ -65,6 +65,7 @@ <h4>Interactions</h4>
<a class="page-link" href="./inter-modify.html">Modify</a>
<a class="page-link" href="./inter-translate.html">Translate</a>
<a class="page-link" href="./inter-snap.html">Snap</a>
<a class="page-link" href="./inter-extent.html">Extent</a>
<h4>Other</h4>
<a class="page-link" href="./responsive_page.html">Responsive Page</a>
<a class="page-link" href="./load-test.html">Performance Test</a>
Expand Down
7 changes: 5 additions & 2 deletions packages/geoview-core/public/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"general": {
"close": "Close",
"open": "Open"
"open": "Open",
"layers": "Layers"
},
"mapnav": {
"arianavbar": "vertical button group for map navigation",
Expand Down Expand Up @@ -54,12 +55,14 @@
"toggle_opacity": "Toggle Opacity",
"zoom_to": "Zoom to Layer",
"overview_title": "Legend Overview",
"bold_selection": "Selection: ",
"add_layer": "Add Layer",
"selected_legend": "Selected Legend",
"sort_layers": "Sort Layers",
"selected_Layers": "An overview of currrently selected layers",
"re-arrange": "re-arrange",
"categories_title": "Categories"
"categories_title" : "Categories",
"items_available": "items available"
},
"details": {
"zoom_to": "Zoom to feature",
Expand Down
3 changes: 2 additions & 1 deletion packages/geoview-core/public/locales/fr/translation.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"general": {
"close": "Fermer",
"open": "Ouvrir"
"open": "Ouvrir",
"layers": "Couches"
},
"mapnav": {
"arianavbar": "groupe de buttons vertical pour navigation sur la carte",
Expand Down
1 change: 1 addition & 0 deletions packages/geoview-core/public/templates/codedoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ function createCollapsible() {
function getAllInteractionEvents(api) {
return [
api.eventNames.INTERACTION.EVENT_SELECTED,
api.eventNames.INTERACTION.EVENT_EXTENT,
api.eventNames.INTERACTION.EVENT_DRAW_STARTED,
api.eventNames.INTERACTION.EVENT_DRAW_ENDED,
api.eventNames.INTERACTION.EVENT_MODIFY_STARTED,
Expand Down
Loading

0 comments on commit 3201b0e

Please sign in to comment.