Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#5561: Add documentation for all plugins #6084

Merged
merged 5 commits into from
Oct 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 60 additions & 7 deletions build/docma-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -213,69 +213,122 @@
"jsapi": "web/client/jsapi/MapStore2.js",
"plugins": [
"web/client/plugins/index.jsdoc",
"web/client/plugins/AddGroup.jsx",
"web/client/plugins/Annotations.jsx",
"web/client/plugins/AutoMapUpdate.jsx",
"web/client/plugins/BackgroundSelector.jsx",
"web/client/plugins/CreateNewMap.jsx",
"web/client/plugins/BurgerMenu.jsx",
"web/client/plugins/ContentTabs.jsx",
"web/client/plugins/Context.jsx",
"web/client/plugins/ContextCreator.jsx",
"web/client/plugins/contextmanager/ContextManager.jsx",
"web/client/plugins/Cookie.jsx",
"web/client/plugins/CreateNewMap.jsx",
"web/client/plugins/CRSSelector.jsx",
"web/client/plugins/Dashboard.jsx",
"web/client/plugins/DashboardEditor.jsx",
"web/client/plugins/DashboardSave.jsx",
"web/client/plugins/Dashboards.jsx",
"web/client/plugins/Details.jsx",
"web/client/plugins/DrawerMenu.jsx",
"web/client/plugins/Expander.jsx",
"web/client/plugins/FeaturedMaps.jsx",
"web/client/plugins/FeatureEditor.jsx",
"web/client/plugins/FeedbackMask.jsx",
"web/client/plugins/FilterLayer.jsx",
"web/client/plugins/FloatingLegend.jsx",
"web/client/plugins/FullScreen.jsx",
"web/client/plugins/GeoStory.jsx",
"web/client/plugins/GeoStories.jsx",
"web/client/plugins/GeoStoryEditor.jsx",
"web/client/plugins/GeoStoryNavigation.jsx",
"web/client/plugins/GeoStorySave.jsx",
"web/client/plugins/GlobeViewSwitcher.jsx",
"web/client/plugins/GoFull.jsx",
"web/client/plugins/HelpLink.jsx",
"web/client/plugins/Home.jsx",
"web/client/plugins/Identify.jsx",
"web/client/plugins/Language.jsx",
"web/client/plugins/LayerInfo.jsx",
"web/client/plugins/Locate.jsx",
"web/client/plugins/Login.jsx",
"web/client/plugins/manager/ManagerMenu.jsx",
"web/client/plugins/Map.jsx",
"web/client/plugins/MapCatalog.jsx",
"web/client/plugins/MapEditor.jsx",
"web/client/plugins/MapExport.jsx",
"web/client/plugins/MapFooter.jsx",
"web/client/plugins/MapImport.jsx",
"web/client/plugins/MapLoading.jsx",
"web/client/plugins/Maps.jsx",
"web/client/plugins/MapSearch.jsx",
"web/client/plugins/MapTemplates.jsx",
"web/client/plugins/MapImport.jsx",
"web/client/plugins/MapExport.jsx",
"web/client/plugins/Measure.jsx",
"web/client/plugins/MeasurePanel.jsx",
"web/client/plugins/MeasureResults.jsx",
"web/client/plugins/MediaEditor.jsx",
"web/client/plugins/MetadataExplorer.jsx",
"web/client/plugins/MousePosition.jsx",
"web/client/plugins/Notifications.jsx",
"web/client/plugins/OmniBar.jsx",
"web/client/plugins/Playback.jsx",
"web/client/plugins/Print.jsx",
"web/client/plugins/QueryPanel.jsx",
"web/client/plugins/Redirect.jsx",
"web/client/plugins/History.jsx",
"web/client/plugins/RulesEditor.jsx",
"web/client/plugins/RulesDataGrid.jsx",
"web/client/plugins/RulesManagerFooter.jsx",
"web/client/plugins/Save.jsx",
"web/client/plugins/SaveAs.jsx",
"web/client/plugins/ScaleBox.jsx",
"web/client/plugins/ScrollTop.jsx",
"web/client/plugins/Search.jsx",
"web/client/plugins/SearchByBookmark.jsx",
"web/client/plugins/SearchServicesConfig.jsx",
"web/client/plugins/Settings.jsx",
"web/client/plugins/Share.jsx",
"web/client/plugins/StyleEditor.jsx",
"web/client/plugins/Swipe.jsx",
"web/client/plugins/ThematicLayer.jsx",
"web/client/plugins/Timeline.jsx",
"web/client/plugins/TOC.jsx",
"web/client/plugins/TOCItemsSettings.jsx",
"web/client/plugins/Toolbar.jsx",
"web/client/plugins/Tutorial.jsx",
"web/client/plugins/UserExtensions.jsx",
"web/client/plugins/UserSession.jsx",
"web/client/plugins/Version.jsx",
"web/client/plugins/WFSDownload.jsx",
"web/client/plugins/Widgets.jsx",
"web/client/plugins/WidgetsBuilder.jsx",
"web/client/plugins/WidgetsTray.jsx",
"web/client/plugins/ZoomAll.jsx",
"web/client/plugins/ZoomIn.jsx",
"web/client/plugins/ZoomOut.jsx",

"web/client/plugins/manager/GroupManager.jsx",
"web/client/plugins/manager/ManagerMenu.jsx",
"web/client/plugins/manager/Manager.jsx",
"web/client/plugins/manager/UserManager.jsx",
"web/client/plugins/containers/ToolsContainer.jsx",
"web/client/product/pages/index.jsdoc",
"web/client/product/pages/Context.jsx",
"web/client/product/pages/ContextCreator.jsx",
"web/client/product/pages/ContextManager.jsx",
"web/client/product/pages/Dashboard.jsx",
"web/client/product/pages/GeoStory.jsx",
"web/client/product/pages/Importer.jsx",
"web/client/product/pages/Manager.jsx",
"web/client/product/pages/Maps.jsx",
"web/client/product/pages/MapViewer.jsx",
"web/client/product/pages/RulesManager.jsx",

"web/client/product/product/NavMenu.jsx"
"web/client/product/plugins/About.jsx",
"web/client/product/plugins/Attribution.jsx",
"web/client/product/plugins/Footer.jsx",
"web/client/product/plugins/Fork.jsx",
"web/client/product/plugins/Header.jsx",
"web/client/product/plugins/NavMenu.jsx",
"web/client/product/plugins/HomeDescription.jsx",
"web/client/product/plugins/MailingLists.jsx"
]
}
]
Expand Down
6 changes: 4 additions & 2 deletions web/client/plugins/AddGroup.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2019, GeoSolutions Sas.
* All rights reserved.
*
Expand Down Expand Up @@ -97,7 +97,9 @@ const AddGroupPlugin = connect((state) => ({
})(AddGroup);

/**
* AddGrouo. Add to the TOC the possibility to add layer group.
* Adds to the {@link #plugins.TOC|TOC} plugin a button for creating new layer groups.
* @name AddGroup
* @class
* @memberof plugins
* @requires plugins.TOC
*/
Expand Down
21 changes: 20 additions & 1 deletion web/client/plugins/BurgerMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,26 @@ class BurgerMenu extends React.Component {
/>);
}
}

/**
* Menu button that can contain other plugins entries.
* Usually rendered inside {@link #plugins.OmniBar|plugins.OmniBar}
* You can render an item inside burger menu by adding the following to the `containers` entry of your plugin.
* It is a wrapper for `ToolsContainer` so all the properties of the tools of {@link #plugins.containers.ToolContainer|ToolContainer} can be used here (action, selector ...).
* ```
* BurgerMenu: {
* name: 'my_entry', // name of your entry
* position: 1000, // the position you want
* text: <Message msgId="details.title"/>, // the text to show in the menu entry
* icon: <Glyphicon glyph="sheet"/>, // the icon to use
* // the following are some examples from ToolContainer property
* action: openDetailsPanel, // the function to call when the menu entry is clicked
* selector: a function that can return some additional properties for the menu entry. Is used typically to hide the menu returning, under certain contdition `{ style: {display: "none"} }`
* },
* ```
* @name BurgerMenu
* @class
* @memberof plugins
*/
module.exports = createPlugin(
'BurgerMenu',
{
Expand Down
6 changes: 3 additions & 3 deletions web/client/plugins/ContentTabs.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ const DefaultTitle = ({ item = {}, index }) => <span>{ item.title || `Tab ${inde
* @memberof plugins
* @class
* @classdesc
* ContentTabs plugin is used in home page allowing to switch between contained plugins (i.e. Maps and Dashboards plugins).
* <br/>Each contained plugin has to have the contenttabs configuration property in its plugin configuration.
* The key property is mandatory following and position property is used to order give tabs order.
* ContentTabs plugin is used in {@link #pages.Maps|home page} allowing to switch between contained plugins (i.e. Maps and Dashboards plugins).
* <br/>Each contained plugin must have the contenttabs configuration property in its plugin configuration.
* The key property is mandatory and position property is used to order give tabs order.
* An example of the contenttabs config in Maps plugin
* @example
* ContentTabs: {
Expand Down
4 changes: 3 additions & 1 deletion web/client/plugins/Context.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ import context from '../reducers/context';
import { createPlugin } from '../utils/PluginsUtils';

/**
* Plugin for Context support. Adds state handlers to the application (reducer and epics).
* Plugin for Context support.
* Adds state handlers to the application (reducer and epics).
* @name Context
* @class
* @memberof plugins
*/
export default createPlugin("Context", {
Expand Down
4 changes: 2 additions & 2 deletions web/client/plugins/ContextCreator.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2019, GeoSolutions Sas.
* All rights reserved.
*
Expand Down Expand Up @@ -64,7 +64,7 @@ export const contextCreatorSelector = createStructuredSelector({
});

/**
* Plugin for creation of Contexts.
* Plugin for creation of Contexts. Implements the wizard for creation of a context.
* @memberof plugins
* @name ContextCreator
* @class
Expand Down
11 changes: 11 additions & 0 deletions web/client/plugins/Cookie.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
const {connect} = require('react-redux');
const {setCookieVisibility, setMoreDetailsVisibility} = require('../actions/cookie');

/**
* Plugin for cookie policy.
* By default it links to MapStore's cookie information page, but you can customize the
* links to point to your own cookie information page.
* @name Cookie
* @memberof plugins
* @class
* @classdesc
* @prop {string} externalCookieUrl if provided then it link to that url otherwise it will opens a section with more details.
* @prop {string} declineUrl The url associated with the leave button
*/
const Cookie = connect((state) => ({
show: state.cookie && state.cookie.showCookiePanel,
html: state.cookie && state.cookie.html && state.cookie.html[state.locale && state.locale.current],
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/CreateNewMap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class CreateNewMap extends React.Component {
}

/**
* Button bar to create a new map or dashboard.
* Button bar to create a new contents.
* @memberof plugins
* @class CreateNewMap
* @static
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ const WidgetsView = compose(
)(require('../components/dashboard/Dashboard'));

/**
* Dashboard Plugin
* Dashboard Plugin. Renders the main dashboard UI.
* @static
* @memberof plugins
* @name Dashboard
Expand Down
7 changes: 6 additions & 1 deletion web/client/plugins/DashboardEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ const Toolbar = compose(

const { setEditing, setEditorAvailable } = require('../actions/dashboard');


/**
* Side toolbar that allows to edit dashboard widgets.
* @name DashboardEditor
* @class
* @memberof plugins
*/
class DashboardEditorComponent extends React.Component {
static propTypes = {
id: PropTypes.string,
Expand Down
15 changes: 13 additions & 2 deletions web/client/plugins/DashboardSave.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import dashboard from '../reducers/dashboard';

/**
* Save dialog component enhanced for dashboard
*
* @ignore
*/
const SaveBaseDialog = compose(
connect(createSelector(
Expand All @@ -39,7 +39,12 @@ const SaveBaseDialog = compose(
handleSaveModal
)(require('../components/resources/modals/Save'));


/**
* Implements "save" button for dashboards, to render in the {@link #plugins.BurgerMenu|BurgerMenu}}
* @class
* @name DashboardSave
* @memberof plugins
*/
export const DashboardSave = createPlugin('DashboardSave', {
component: compose(
connect(createSelector(
Expand Down Expand Up @@ -72,6 +77,12 @@ export const DashboardSave = createPlugin('DashboardSave', {
}
});

/**
* Implements "save as" button for dashboards, to render in the {@link #plugins.BurgerMenu|BurgerMenu}}
* @class
* @name DashboardSaveAs
* @memberof plugins
*/
export const DashboardSaveAs = createPlugin('DashboardSaveAs', {
component: compose(
connect(createSelector(
Expand Down
7 changes: 5 additions & 2 deletions web/client/plugins/Dashboards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ const dashboardsCountSelector = createSelector(
);

/**
* Plugin for Dashboards resources
* Plugin for Dashboards resources browsing.
* Can be rendered inside {@link #plugins.ContentTabs|ContentTabs} plugin
* and adds an entry to the {@link #plugins.NavMenu|NavMenu}
* @name Dashboards
* @memberof plugins
* @prop {boolean} cfg.showCreateButton default true, use to render create a new one button
* @class
* @prop {boolean} cfg.showCreateButton default true. Flag to show/hide the button "create a new one" when there is no dashboard yet.
*/
class Dashboards extends React.Component {
static propTypes = {
Expand Down
9 changes: 8 additions & 1 deletion web/client/plugins/Details.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,15 @@ import ResizableModal from '../components/misc/ResizableModal';
import {createPlugin} from '../utils/PluginsUtils';

/**
* Details plugin used for fetching details of the map
* Allow to show details for the map.
* "Details for a map" is a window with some HTML, editable from {@link #plugins.Save|Save}
* or {@link #plugins.SaveAs|SaveAs} plugins.
* If details for the current map are present, the plugin
* renders an entry in {@link #plugins.BurgerMenu|BurgerMenu} to show it.
* It supports as an alternative to render the entry as a
* button in the {@link #plugins.Toolbar|Toolbar}
* @class
* @name Details
* @memberof plugins
*/

Expand Down
4 changes: 3 additions & 1 deletion web/client/plugins/DrawerMenu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ const DrawerButton = connect(state => ({
);

/**
* DrawerMenu plugin. Shows a left menu with some pluins rendered inside it (typically the TOC).
* DrawerMenu plugin. It is a container for other plugins.
* It shows a collapsible panel on the left with some plugins rendered inside it (typically the {@link #plugins.TOC|TOC})
* and a button on the top-left corner to open this panel.
* @prop {string} cfg.glyph glyph icon to use for the button
* @prop {object} cfg.menuButtonStyle Css inline style for the button. Display property will be overridden by the hideButton/forceDrawer options.
* @prop {string} cfg.buttonClassName class for the toggle button
Expand Down
8 changes: 7 additions & 1 deletion web/client/plugins/Expander.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2016, GeoSolutions Sas.
* All rights reserved.
*
Expand All @@ -12,6 +12,12 @@ const assign = require('object-assign');

const ExpanderPlugin = require('../components/buttons/ToggleButton');

/**
* Expander plugin. Adds the '...' button to the Toolbar plugin to hide some buttons.
* @name Expander
* @class
* @memberof plugins
*/
module.exports = {
ExpanderPlugin: assign(ExpanderPlugin, {
Toolbar: {
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/FeatureEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const Dock = connect(createSelector(
* @prop {boolean} cfg.showTimeSync default false. Shows the button to enable time sync
* @prop {boolean} cfg.timeSync default false. If true, the timeSync is active by default.
* @classdesc
* FeatureEditor Plugin Provides functionalities to browse/edit data via WFS. The grid can be configured to use paging or
* FeatureEditor Plugin, also called *FeatureGrid*, provides functionalities to browse/edit data via WFS. The grid can be configured to use paging or
* <br/>virtual scroll mechanisms. By default virtual scroll is enabled. When on virtual scroll mode, the maxStoredPages param
* <br/>sets the size of loaded pages cache, while vsOverscan and scrollDebounce params determine the behavior of grid scrolling
* <br/>and of row loading.
Expand Down
2 changes: 1 addition & 1 deletion web/client/plugins/FeatureGrid.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/**
/*
* Copyright 2016, GeoSolutions Sas.
* All rights reserved.
*
Expand Down
2 changes: 2 additions & 0 deletions web/client/plugins/FeaturedMaps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,8 @@ const updateFeaturedMapsStream = mapPropsStream(props$ =>

/**
* FeaturedMaps plugin. Shows featured maps in a grid.
* Typically used in the {@link #pages.Maps|home page}.
* @name FeaturedMaps
* @prop {string} cfg.pageSize change the page size (only desktop)
* @memberof plugins
* @class
Expand Down
Loading