diff --git a/geonode_mapstore_client/client/js/epics/gnsave.js b/geonode_mapstore_client/client/js/epics/gnsave.js index 69635c0843..33aa00c968 100644 --- a/geonode_mapstore_client/client/js/epics/gnsave.js +++ b/geonode_mapstore_client/client/js/epics/gnsave.js @@ -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) => { diff --git a/geonode_mapstore_client/client/js/plugins/index.js b/geonode_mapstore_client/client/js/plugins/index.js index 9a10770aeb..3dcf0f0bba 100644 --- a/geonode_mapstore_client/client/js/plugins/index.js +++ b/geonode_mapstore_client/client/js/plugins/index.js @@ -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') @@ -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') @@ -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') ) }; diff --git a/geonode_mapstore_client/client/js/selectors/mapsave.js b/geonode_mapstore_client/client/js/selectors/mapsave.js index 270d55524f..32b24ff17e 100644 --- a/geonode_mapstore_client/client/js/selectors/mapsave.js +++ b/geonode_mapstore_client/client/js/selectors/mapsave.js @@ -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: { diff --git a/geonode_mapstore_client/client/js/selectors/resource.js b/geonode_mapstore_client/client/js/selectors/resource.js index 33598290dd..9fbb411306 100644 --- a/geonode_mapstore_client/client/js/selectors/resource.js +++ b/geonode_mapstore_client/client/js/selectors/resource.js @@ -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); diff --git a/geonode_mapstore_client/client/js/utils/ResourceUtils.js b/geonode_mapstore_client/client/js/utils/ResourceUtils.js index 4a610a7804..8476de10d0 100644 --- a/geonode_mapstore_client/client/js/utils/ResourceUtils.js +++ b/geonode_mapstore_client/client/js/utils/ResourceUtils.js @@ -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'), @@ -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) { diff --git a/geonode_mapstore_client/client/package.json b/geonode_mapstore_client/client/package.json index f6d5224e93..1fc4d62333 100644 --- a/geonode_mapstore_client/client/package.json +++ b/geonode_mapstore_client/client/package.json @@ -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": [ diff --git a/geonode_mapstore_client/client/themes/geonode/less/geonode.less b/geonode_mapstore_client/client/themes/geonode/less/geonode.less index 7508794e6c..ca57ed4506 100644 --- a/geonode_mapstore_client/client/themes/geonode/less/geonode.less +++ b/geonode_mapstore_client/client/themes/geonode/less/geonode.less @@ -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; - } - } - } - } -} -