Skip to content

Commit

Permalink
Clean changes for easier diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
ridoo committed Aug 19, 2024
1 parent 49daeca commit b9d9a40
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 87 deletions.
1 change: 0 additions & 1 deletion geonode_mapstore_client/client/js/epics/gnsave.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ export const gnSaveContent = (action$, store) =>
...(data && { 'data': JSON.parse(JSON.stringify(data)) }),
...(extent && { extent })
};
//console.log("gnSaveContent", body)
const currentResource = getResourceData(state);
return Observable.defer(() => SaveAPI[contentType](state, action.id, body, action.reload)) //step 8
.switchMap((resource) => {
Expand Down
16 changes: 8 additions & 8 deletions geonode_mapstore_client/client/js/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,6 @@ export const plugins = {
'VisualStyleEditor',
() => import(/* webpackChunkName: 'plugins/visual-style-editor-plugin' */ '@js/plugins/VisualStyleEditor')
),
LayerDetailViewerPlugin: toModulePlugin(
'LayerDetailViewer',
() => import(/* webpackChunkName: 'plugins/detail-viewer-plugin' */ '@js/plugins/LayerDetailViewer')
),
LegendPlugin: toModulePlugin(
'Legend',
() => import(/* webpackChunkName: 'plugins/legend-plugin' */ '@js/plugins/Legend')
Expand Down Expand Up @@ -412,10 +408,6 @@ export const plugins = {
'DublinCoreDownload',
() => import(/* webpackChunkName: 'plugins/iso-download-plugin' */ '@js/plugins/downloads/DublinCoreDownload')
),
DataCiteDownloadPlugin: toModulePlugin(
'DataCiteDownload',
() => import('@js/plugins/downloads/DataCiteDownload')
),
ResourcesGridPlugin: toModulePlugin(
'ResourcesGrid',
() => import(/* webpackChunkName: 'plugins/resources-grid' */ '@js/plugins/ResourcesGrid')
Expand Down Expand Up @@ -451,6 +443,14 @@ export const plugins = {
TabularPreviewPlugin: toModulePlugin(
'TabularPreview',
() => import(/* webpackChunkName: 'plugins/tabular-preview-plugin' */ '@js/plugins/TabularPreview')
),
LayerDetailViewerPlugin: toModulePlugin(
'LayerDetailViewer',
() => import(/* webpackChunkName: 'plugins/detail-viewer-plugin' */ '@js/plugins/LayerDetailViewer')
),
DataCiteDownloadPlugin: toModulePlugin(
'DataCiteDownload',
() => import('@js/plugins/downloads/DataCiteDownload')
)
};

Expand Down
3 changes: 1 addition & 2 deletions geonode_mapstore_client/client/js/selectors/mapsave.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ import { layersSelector } from '@mapstore/framework/selectors/layers';
*/
export const mapSaveSelector = (state) => {
const layersState = layersSelector(state);
const { map, ...data } = msMapSaveSelector(state); //step 4
//console.log("mapSave", state, map, data )
const { map, ...data } = msMapSaveSelector(state);
return {
...data,
map: {
Expand Down
2 changes: 1 addition & 1 deletion geonode_mapstore_client/client/js/selectors/resource.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const getDataPayload = (state, resourceType) => {
switch (type) {
case ResourceTypes.MAP: {
const isMapAvailable = !!mapSelector(state);
return isMapAvailable ? mapSaveSelector(state) : null; //step3
return isMapAvailable ? mapSaveSelector(state) : null;
}
case ResourceTypes.GEOSTORY: {
return currentStorySelector(state);
Expand Down
6 changes: 2 additions & 4 deletions geonode_mapstore_client/client/js/utils/ResourceUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export const isDocumentExternalSource = (resource) => {
return resource && resource.resource_type === ResourceTypes.DOCUMENT && resource.sourcetype === 'REMOTE';
};

export const ResourceTypesInfos = {
export const getResourceTypesInfo = () => ({
[ResourceTypes.DATASET]: {
icon: 'database',
canPreviewed: (resource) => resourceHasPermission(resource, 'view_resourcebase'),
Expand Down Expand Up @@ -346,9 +346,7 @@ export const ResourceTypesInfos = {
formatDetailUrl: (resource) => resource?.detail_url && parseDevHostname(resource.detail_url),
formatMetadataUrl: (resource) => resource.url
}
}

export const getResourceTypesInfo = () => ResourceTypesInfos;
});

export const getMetadataUrl = (resource) => {
if (resource) {
Expand Down
2 changes: 1 addition & 1 deletion geonode_mapstore_client/client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "geonode-mapstore-client",
"version": "4.1.0",
"version": "4.0.0",
"description": "MapStore 2 bundles specific to geonode framework",
"eslintConfig": {
"extends": [
Expand Down
70 changes: 0 additions & 70 deletions geonode_mapstore_client/client/themes/geonode/less/geonode.less
Original file line number Diff line number Diff line change
Expand Up @@ -72,73 +72,3 @@
background: #eee;
}
}

#mapstore-drawermenu {

.mapstore-toc {

.toc-default-layer-head {
display: flex;
.toc-title {
flex: 1;
min-width: auto;
max-width: none;
width: auto;
&:hover {
font-weight: inherit;
}
}
}
.toc-default-group-head {
display: flex;
> div {
flex: 1;
display: flex;
max-width: calc(100% - 40px);
.toc-group-title {
flex: 1;
min-width: auto;
max-width: none;
width: auto;
&:hover {
font-weight: inherit;
}
}
}
}

// display title on multiple lines
.toc-default-layer-head {
min-height: 40px;
height: auto;
.toc-title {

word-break: normal;
overflow-wrap: anywhere;
hyphens: auto;

overflow: visible;
white-space: inherit;
height: auto;
}

}
.toc-default-group-head {
min-height: 40px;
height: auto;
> div {
.toc-group-title {

word-break: normal;
overflow-wrap: anywhere;
hyphens: auto;

overflow: visible;
white-space: inherit;
height: auto;
}
}
}
}
}

0 comments on commit b9d9a40

Please sign in to comment.