mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: remove unused imports from global.js
This commit is contained in:
parent
b49f3d7633
commit
51e41b7bce
5 changed files with 12 additions and 59 deletions
|
@ -1,37 +1,13 @@
|
|||
import {
|
||||
uMapAlert as Alert,
|
||||
uMapAlertCreation as AlertCreation,
|
||||
} from '../components/alerts/alert.js'
|
||||
import {
|
||||
AjaxAutocomplete,
|
||||
AjaxAutocompleteMultiple,
|
||||
AutocompleteDatalist,
|
||||
} from './autocomplete.js'
|
||||
import Browser from './browser.js'
|
||||
import Caption from './caption.js'
|
||||
import ContextMenu from './ui/contextmenu.js'
|
||||
import Facets from './facets.js'
|
||||
import { Formatter } from './formatter.js'
|
||||
import { uMapAlert as Alert } from '../components/alerts/alert.js'
|
||||
import { AjaxAutocomplete, AjaxAutocompleteMultiple } from './autocomplete.js'
|
||||
import Help from './help.js'
|
||||
import Importer from './importer.js'
|
||||
import Orderable from './orderable.js'
|
||||
import { HTTPError, NOKError, Request, RequestError, ServerRequest } from './request.js'
|
||||
import Rules from './rules.js'
|
||||
import { ServerRequest } from './request.js'
|
||||
import { SCHEMA } from './schema.js'
|
||||
import Share from './share.js'
|
||||
import Slideshow from './slideshow.js'
|
||||
import { SyncEngine } from './sync/engine.js'
|
||||
import Dialog from './ui/dialog.js'
|
||||
import { EditPanel, FullPanel, Panel } from './ui/panel.js'
|
||||
import Tooltip from './ui/tooltip.js'
|
||||
import URLs from './urls.js'
|
||||
import * as Utils from './utils.js'
|
||||
import * as Icon from './rendering/icon.js'
|
||||
import { DataLayer, LAYER_TYPES } from './data/layer.js'
|
||||
import { DataLayerPermissions, MapPermissions } from './permissions.js'
|
||||
import { LAYER_TYPES } from './data/layer.js'
|
||||
import { Point, LineString, Polygon } from './data/features.js'
|
||||
import { LeafletMarker, LeafletPolyline, LeafletPolygon } from './rendering/ui.js'
|
||||
import * as SAVEMANAGER from './saving.js'
|
||||
|
||||
// Import modules and export them to the global scope.
|
||||
// For the not yet module-compatible JS out there.
|
||||
|
@ -39,45 +15,18 @@ import * as SAVEMANAGER from './saving.js'
|
|||
// By alphabetic order
|
||||
window.U = {
|
||||
Alert,
|
||||
AlertCreation,
|
||||
AjaxAutocomplete,
|
||||
AjaxAutocompleteMultiple,
|
||||
AutocompleteDatalist,
|
||||
Browser,
|
||||
Caption,
|
||||
ContextMenu,
|
||||
DataLayer,
|
||||
DataLayerPermissions,
|
||||
Dialog,
|
||||
EditPanel,
|
||||
Facets,
|
||||
Formatter,
|
||||
FullPanel,
|
||||
Help,
|
||||
HTTPError,
|
||||
Icon,
|
||||
Importer,
|
||||
LAYER_TYPES,
|
||||
LeafletMarker,
|
||||
LeafletPolygon,
|
||||
LeafletPolyline,
|
||||
LineString,
|
||||
MapPermissions,
|
||||
NOKError,
|
||||
Orderable,
|
||||
Panel,
|
||||
Point,
|
||||
Polygon,
|
||||
Request,
|
||||
RequestError,
|
||||
Rules,
|
||||
SAVEMANAGER,
|
||||
SCHEMA,
|
||||
ServerRequest,
|
||||
Share,
|
||||
Slideshow,
|
||||
SyncEngine,
|
||||
Tooltip,
|
||||
URLs,
|
||||
Utils,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import { DomEvent, DomUtil } from '../../vendors/leaflet/leaflet-src.esm.js'
|
||||
import { translate } from './i18n.js'
|
||||
import * as Utils from './utils.js'
|
||||
import Dialog from './ui/dialog.js'
|
||||
|
||||
const SHORTCUTS = {
|
||||
DRAW_MARKER: {
|
||||
|
@ -166,7 +167,7 @@ const ENTRIES = {
|
|||
export default class Help {
|
||||
constructor(umap) {
|
||||
this.umap = umap
|
||||
this.dialog = new U.Dialog({ className: 'dark', accept: false, cancel: false })
|
||||
this.dialog = new Dialog({ className: 'dark', accept: false, cancel: false })
|
||||
this.isMacOS = /mac/i.test(
|
||||
// eslint-disable-next-line compat/compat -- Fallback available.
|
||||
navigator.userAgentData ? navigator.userAgentData.platform : navigator.platform
|
||||
|
|
|
@ -12,6 +12,7 @@ import { translate } from '../i18n.js'
|
|||
import { uMapAlert as Alert } from '../../components/alerts/alert.js'
|
||||
import * as Utils from '../utils.js'
|
||||
import * as Icon from './icon.js'
|
||||
import ContextMenu from '../ui/contextmenu.js'
|
||||
|
||||
// Those options are not saved on the server, so they can live here
|
||||
// instead of in umap.properties
|
||||
|
@ -203,7 +204,7 @@ const ControlsMixin = {
|
|||
</button>
|
||||
`)
|
||||
rightContainer.appendChild(button)
|
||||
const menu = new U.ContextMenu({ className: 'dark', fixed: true })
|
||||
const menu = new ContextMenu({ className: 'dark', fixed: true })
|
||||
const actions = [
|
||||
{
|
||||
label: translate('New map'),
|
||||
|
|
|
@ -2,6 +2,7 @@ import { DomEvent, DomUtil, stamp } from '../../vendors/leaflet/leaflet-src.esm.
|
|||
import { translate } from './i18n.js'
|
||||
import * as Utils from './utils.js'
|
||||
import { AutocompleteDatalist } from './autocomplete.js'
|
||||
import Orderable from './orderable.js'
|
||||
|
||||
const EMPTY_VALUES = ['', undefined, null]
|
||||
|
||||
|
@ -236,7 +237,7 @@ export default class Rules {
|
|||
rule.renderToolbox(DomUtil.create('li', 'orderable', ul))
|
||||
}
|
||||
|
||||
const orderable = new U.Orderable(ul, this.onReorder.bind(this))
|
||||
const orderable = new Orderable(ul, this.onReorder.bind(this))
|
||||
}
|
||||
|
||||
DomUtil.createButton('umap-add', body, translate('Add rule'), this.addRule, this)
|
||||
|
|
|
@ -32,6 +32,7 @@ import {
|
|||
uMapAlertCreation as AlertCreation,
|
||||
uMapAlert as Alert,
|
||||
} from '../components/alerts/alert.js'
|
||||
import Orderable from './orderable.js'
|
||||
|
||||
export default class Umap extends ServerStored {
|
||||
constructor(element, geojson) {
|
||||
|
@ -1382,7 +1383,7 @@ export default class Umap extends ServerStored {
|
|||
})
|
||||
this.indexDatalayers()
|
||||
}
|
||||
const orderable = new U.Orderable(ul, onReorder)
|
||||
const orderable = new Orderable(ul, onReorder)
|
||||
|
||||
const bar = DomUtil.create('div', 'button-bar', container)
|
||||
DomUtil.createButton(
|
||||
|
|
Loading…
Reference in a new issue