mirror of
https://github.com/umap-project/umap.git
synced 2025-05-06 06:21:49 +02:00
chore: reorder schema by keys
This commit is contained in:
parent
cdbaab2d20
commit
41238f0a94
1 changed files with 297 additions and 321 deletions
|
@ -1,43 +1,36 @@
|
|||
import { translate } from './i18n.js'
|
||||
|
||||
export const SCHEMA = {
|
||||
zoom: {
|
||||
type: Number,
|
||||
},
|
||||
scrollWheelZoom: {
|
||||
captionBar: {
|
||||
type: Boolean,
|
||||
label: translate('Allow scroll wheel zoom?'),
|
||||
},
|
||||
scaleControl: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display the scale control?'),
|
||||
default: true,
|
||||
},
|
||||
moreControl: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display the «more» control?'),
|
||||
default: true,
|
||||
},
|
||||
miniMap: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display a minimap?'),
|
||||
label: translate('Do you want to display a caption bar?'),
|
||||
default: false,
|
||||
},
|
||||
displayPopupFooter: {
|
||||
captionMenus: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display popup footer?'),
|
||||
default: false,
|
||||
label: translate('Do you want to display caption menus?'),
|
||||
default: true,
|
||||
},
|
||||
onLoadPanel: {
|
||||
color: {
|
||||
type: String,
|
||||
label: translate('Do you want to display a panel on load?'),
|
||||
choices: [
|
||||
['none', translate('None')],
|
||||
['caption', translate('Caption')],
|
||||
['databrowser', translate('Data browser')],
|
||||
['facet', translate('Facet search')],
|
||||
],
|
||||
default: 'none',
|
||||
handler: 'ColorPicker',
|
||||
label: translate('color'),
|
||||
helpEntries: 'colorValue',
|
||||
inheritable: true,
|
||||
default: 'DarkBlue',
|
||||
},
|
||||
dashArray: {
|
||||
type: String,
|
||||
label: translate('dash array'),
|
||||
helpEntries: 'dashArray',
|
||||
inheritable: true,
|
||||
},
|
||||
datalayersControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
handler: 'DataLayersControl',
|
||||
label: translate('Display the data layers control'),
|
||||
default: true,
|
||||
},
|
||||
defaultView: {
|
||||
type: String,
|
||||
|
@ -50,94 +43,30 @@ export const SCHEMA = {
|
|||
],
|
||||
default: 'center',
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
label: translate('name'),
|
||||
},
|
||||
description: {
|
||||
label: translate('description'),
|
||||
type: 'Text',
|
||||
helpEntries: 'textFormatting',
|
||||
},
|
||||
licence: {
|
||||
type: String,
|
||||
label: translate('licence'),
|
||||
displayPopupFooter: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display popup footer?'),
|
||||
default: false,
|
||||
},
|
||||
tilelayer: {
|
||||
type: Object,
|
||||
easing: { type: Boolean, default: false },
|
||||
editinosmControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the control to open OpenStreetMap editor'),
|
||||
default: null,
|
||||
},
|
||||
overlay: {
|
||||
type: Object,
|
||||
},
|
||||
limitBounds: {
|
||||
type: Object,
|
||||
},
|
||||
color: {
|
||||
type: String,
|
||||
handler: 'ColorPicker',
|
||||
label: translate('color'),
|
||||
helpEntries: 'colorValue',
|
||||
inheritable: true,
|
||||
default: 'DarkBlue',
|
||||
},
|
||||
iconClass: {
|
||||
type: String,
|
||||
label: translate('Icon shape'),
|
||||
inheritable: true,
|
||||
choices: [
|
||||
['Default', translate('Default')],
|
||||
['Circle', translate('Circle')],
|
||||
['Drop', translate('Drop')],
|
||||
['Ball', translate('Ball')],
|
||||
],
|
||||
default: 'Default',
|
||||
},
|
||||
iconUrl: {
|
||||
type: String,
|
||||
handler: 'IconUrl',
|
||||
label: translate('Icon symbol'),
|
||||
inheritable: true,
|
||||
// helpText: translate(
|
||||
// 'Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with "http://myserver.org/images/{name}.png", the {name} variable will be replaced by the "name" value of each marker.'
|
||||
// ),
|
||||
},
|
||||
smoothFactor: {
|
||||
type: Number,
|
||||
min: 0,
|
||||
max: 10,
|
||||
step: 0.5,
|
||||
label: translate('Simplify'),
|
||||
helpEntries: 'smoothFactor',
|
||||
inheritable: true,
|
||||
default: 1.0,
|
||||
},
|
||||
iconOpacity: {
|
||||
type: Number,
|
||||
min: 0.1,
|
||||
max: 1,
|
||||
step: 0.1,
|
||||
label: translate('icon opacity'),
|
||||
inheritable: true,
|
||||
default: 1,
|
||||
},
|
||||
opacity: {
|
||||
type: Number,
|
||||
min: 0.1,
|
||||
max: 1,
|
||||
step: 0.1,
|
||||
label: translate('opacity'),
|
||||
inheritable: true,
|
||||
default: 0.5,
|
||||
},
|
||||
weight: {
|
||||
type: Number,
|
||||
min: 1,
|
||||
max: 20,
|
||||
step: 1,
|
||||
label: translate('weight'),
|
||||
inheritable: true,
|
||||
default: 3,
|
||||
embedControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the embed control'),
|
||||
default: true,
|
||||
},
|
||||
facetKey: { type: String },
|
||||
fill: {
|
||||
type: Boolean,
|
||||
label: translate('fill'),
|
||||
|
@ -161,11 +90,165 @@ export const SCHEMA = {
|
|||
inheritable: true,
|
||||
default: 0.3,
|
||||
},
|
||||
dashArray: {
|
||||
filterKey: { type: String },
|
||||
fromZoom: {
|
||||
type: Number,
|
||||
label: translate('From zoom'),
|
||||
helpText: translate('Optional.'),
|
||||
},
|
||||
fullscreenControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the fullscreen control'),
|
||||
default: true,
|
||||
},
|
||||
iconClass: {
|
||||
type: String,
|
||||
label: translate('dash array'),
|
||||
helpEntries: 'dashArray',
|
||||
label: translate('Icon shape'),
|
||||
inheritable: true,
|
||||
choices: [
|
||||
['Default', translate('Default')],
|
||||
['Circle', translate('Circle')],
|
||||
['Drop', translate('Drop')],
|
||||
['Ball', translate('Ball')],
|
||||
],
|
||||
default: 'Default',
|
||||
},
|
||||
iconOpacity: {
|
||||
type: Number,
|
||||
min: 0.1,
|
||||
max: 1,
|
||||
step: 0.1,
|
||||
label: translate('icon opacity'),
|
||||
inheritable: true,
|
||||
default: 1,
|
||||
},
|
||||
iconUrl: {
|
||||
type: String,
|
||||
handler: 'IconUrl',
|
||||
label: translate('Icon symbol'),
|
||||
inheritable: true, // helpText: translate( // 'Symbol can be either a unicode character or an URL. You can use feature properties as variables: ex.: with "http://myserver.org/images/{name}.png", the {name} variable will be replaced by the "name" value of each marker.' // ), renderers: { map: [], features: [], } },
|
||||
interactive: {
|
||||
type: Boolean,
|
||||
label: translate('Allow interactions'),
|
||||
helpEntries: 'interactive',
|
||||
inheritable: true,
|
||||
default: true,
|
||||
},
|
||||
labelDirection: {
|
||||
type: String,
|
||||
label: translate('Label direction'),
|
||||
inheritable: true,
|
||||
choices: [
|
||||
['auto', translate('Automatic')],
|
||||
['left', translate('On the left')],
|
||||
['right', translate('On the right')],
|
||||
['top', translate('On the top')],
|
||||
['bottom', translate('On the bottom')],
|
||||
],
|
||||
default: 'auto',
|
||||
},
|
||||
labelInteractive: {
|
||||
type: Boolean,
|
||||
label: translate('Labels are clickable'),
|
||||
inheritable: true,
|
||||
},
|
||||
labelKey: {
|
||||
type: String,
|
||||
helpEntries: 'labelKey',
|
||||
placeholder: translate('Default: name'),
|
||||
label: translate('Label key'),
|
||||
inheritable: true,
|
||||
},
|
||||
licence: {
|
||||
type: String,
|
||||
label: translate('licence'),
|
||||
},
|
||||
limitBounds: { type: Object },
|
||||
locateControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the locate control'),
|
||||
},
|
||||
longCredit: {
|
||||
type: 'Text',
|
||||
label: translate('Long credits'),
|
||||
helpEntries: ['longCredit', 'textFormatting'],
|
||||
},
|
||||
measureControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the measure control'),
|
||||
},
|
||||
miniMap: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display a minimap?'),
|
||||
default: false,
|
||||
},
|
||||
moreControl: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display the «more» control?'),
|
||||
default: true,
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
label: translate('name'),
|
||||
},
|
||||
onLoadPanel: {
|
||||
type: String,
|
||||
label: translate('Do you want to display a panel on load?'),
|
||||
choices: [
|
||||
['none', translate('None')],
|
||||
['caption', translate('Caption')],
|
||||
['databrowser', translate('Data browser')],
|
||||
['facet', translate('Facet search')],
|
||||
],
|
||||
default: 'none',
|
||||
},
|
||||
opacity: {
|
||||
type: Number,
|
||||
min: 0.1,
|
||||
max: 1,
|
||||
step: 0.1,
|
||||
label: translate('opacity'),
|
||||
inheritable: true,
|
||||
default: 0.5,
|
||||
},
|
||||
outlink: {
|
||||
label: translate('Link to…'),
|
||||
helpEntries: 'outlink',
|
||||
placeholder: 'http://...',
|
||||
inheritable: true,
|
||||
},
|
||||
outlinkTarget: {
|
||||
type: String,
|
||||
label: translate('Open link in…'),
|
||||
inheritable: true,
|
||||
default: 'blank',
|
||||
choices: [
|
||||
['blank', translate('new window')],
|
||||
['self', translate('iframe')],
|
||||
['parent', translate('parent window')],
|
||||
],
|
||||
},
|
||||
overlay: { type: Object },
|
||||
permanentCredit: {
|
||||
type: 'Text',
|
||||
label: translate('Permanent credits'),
|
||||
helpEntries: ['permanentCredit', 'textFormatting'],
|
||||
},
|
||||
permanentCreditBackground: {
|
||||
type: Boolean,
|
||||
label: translate('Permanent credits background'),
|
||||
default: true,
|
||||
},
|
||||
popupContentTemplate: {
|
||||
type: 'Text',
|
||||
label: translate('Popup content template'),
|
||||
helpEntries: ['dynamicProperties', 'textFormatting'],
|
||||
placeholder: '# {name}',
|
||||
inheritable: true,
|
||||
default: '# {name}\n{description}',
|
||||
},
|
||||
popupShape: {
|
||||
type: String,
|
||||
|
@ -191,52 +274,25 @@ export const SCHEMA = {
|
|||
],
|
||||
default: 'Default',
|
||||
},
|
||||
popupContentTemplate: {
|
||||
type: 'Text',
|
||||
label: translate('Popup content template'),
|
||||
helpEntries: ['dynamicProperties', 'textFormatting'],
|
||||
placeholder: '# {name}',
|
||||
inheritable: true,
|
||||
default: '# {name}\n{description}',
|
||||
},
|
||||
zoomTo: {
|
||||
type: Number,
|
||||
placeholder: translate('Inherit'),
|
||||
helpEntries: 'zoomTo',
|
||||
label: translate('Default zoom level'),
|
||||
inheritable: true,
|
||||
},
|
||||
captionBar: {
|
||||
scaleControl: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display a caption bar?'),
|
||||
default: false,
|
||||
},
|
||||
captionMenus: {
|
||||
type: Boolean,
|
||||
label: translate('Do you want to display caption menus?'),
|
||||
label: translate('Do you want to display the scale control?'),
|
||||
default: true,
|
||||
},
|
||||
slideshow: {
|
||||
type: Object,
|
||||
scrollWheelZoom: {
|
||||
type: Boolean,
|
||||
label: translate('Allow scroll wheel zoom?'),
|
||||
},
|
||||
sortKey: {
|
||||
type: String,
|
||||
searchControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the search control'),
|
||||
default: true,
|
||||
},
|
||||
labelKey: {
|
||||
type: String,
|
||||
helpEntries: 'labelKey',
|
||||
placeholder: translate('Default: name'),
|
||||
label: translate('Label key'),
|
||||
inheritable: true,
|
||||
},
|
||||
filterKey: {
|
||||
type: String,
|
||||
},
|
||||
facetKey: {
|
||||
type: String,
|
||||
},
|
||||
slugKey: {
|
||||
shortCredit: {
|
||||
type: String,
|
||||
label: translate('Short credits'),
|
||||
helpEntries: ['shortCredit', 'textFormatting'],
|
||||
},
|
||||
showLabel: {
|
||||
type: Boolean,
|
||||
|
@ -245,133 +301,24 @@ export const SCHEMA = {
|
|||
inheritable: true,
|
||||
default: false,
|
||||
},
|
||||
labelDirection: {
|
||||
type: String,
|
||||
label: translate('Label direction'),
|
||||
slideshow: { type: Object },
|
||||
slugKey: { type: String },
|
||||
smoothFactor: {
|
||||
type: Number,
|
||||
min: 0,
|
||||
max: 10,
|
||||
step: 0.5,
|
||||
label: translate('Simplify'),
|
||||
helpEntries: 'smoothFactor',
|
||||
inheritable: true,
|
||||
choices: [
|
||||
['auto', translate('Automatic')],
|
||||
['left', translate('On the left')],
|
||||
['right', translate('On the right')],
|
||||
['top', translate('On the top')],
|
||||
['bottom', translate('On the bottom')],
|
||||
],
|
||||
default: 'auto',
|
||||
},
|
||||
labelInteractive: {
|
||||
type: Boolean,
|
||||
label: translate('Labels are clickable'),
|
||||
inheritable: true,
|
||||
},
|
||||
outlinkTarget: {
|
||||
type: String,
|
||||
label: translate('Open link in…'),
|
||||
inheritable: true,
|
||||
default: 'blank',
|
||||
choices: [
|
||||
['blank', translate('new window')],
|
||||
['self', translate('iframe')],
|
||||
['parent', translate('parent window')],
|
||||
],
|
||||
},
|
||||
shortCredit: {
|
||||
type: String,
|
||||
label: translate('Short credits'),
|
||||
helpEntries: ['shortCredit', 'textFormatting'],
|
||||
},
|
||||
longCredit: {
|
||||
type: 'Text',
|
||||
label: translate('Long credits'),
|
||||
helpEntries: ['longCredit', 'textFormatting'],
|
||||
},
|
||||
permanentCredit: {
|
||||
type: 'Text',
|
||||
label: translate('Permanent credits'),
|
||||
helpEntries: ['permanentCredit', 'textFormatting'],
|
||||
},
|
||||
permanentCreditBackground: {
|
||||
type: Boolean,
|
||||
label: translate('Permanent credits background'),
|
||||
default: true,
|
||||
},
|
||||
zoomControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the zoom control'),
|
||||
default: true,
|
||||
},
|
||||
datalayersControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
handler: 'DataLayersControl',
|
||||
label: translate('Display the data layers control'),
|
||||
default: true,
|
||||
},
|
||||
searchControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the search control'),
|
||||
default: true,
|
||||
},
|
||||
locateControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the locate control'),
|
||||
},
|
||||
fullscreenControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the fullscreen control'),
|
||||
default: true,
|
||||
},
|
||||
editinosmControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the control to open OpenStreetMap editor'),
|
||||
default: null,
|
||||
},
|
||||
embedControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the embed control'),
|
||||
default: true,
|
||||
},
|
||||
measureControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the measure control'),
|
||||
},
|
||||
tilelayersControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the tile layers control'),
|
||||
default: 1.0,
|
||||
},
|
||||
sortKey: { type: String },
|
||||
starControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the star map button'),
|
||||
},
|
||||
easing: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
interactive: {
|
||||
type: Boolean,
|
||||
label: translate('Allow interactions'),
|
||||
helpEntries: 'interactive',
|
||||
inheritable: true,
|
||||
default: true,
|
||||
},
|
||||
fromZoom: {
|
||||
type: Number,
|
||||
label: translate('From zoom'),
|
||||
helpText: translate('Optional.'),
|
||||
},
|
||||
toZoom: {
|
||||
type: Number,
|
||||
label: translate('To zoom'),
|
||||
helpText: translate('Optional.'),
|
||||
},
|
||||
stroke: {
|
||||
type: Boolean,
|
||||
label: translate('stroke'),
|
||||
|
@ -379,10 +326,39 @@ export const SCHEMA = {
|
|||
inheritable: true,
|
||||
default: true,
|
||||
},
|
||||
outlink: {
|
||||
label: translate('Link to…'),
|
||||
helpEntries: 'outlink',
|
||||
placeholder: 'http://...',
|
||||
tilelayer: { type: Object },
|
||||
tilelayersControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the tile layers control'),
|
||||
},
|
||||
toZoom: {
|
||||
type: Number,
|
||||
label: translate('To zoom'),
|
||||
helpText: translate('Optional.'),
|
||||
},
|
||||
weight: {
|
||||
type: Number,
|
||||
min: 1,
|
||||
max: 20,
|
||||
step: 1,
|
||||
label: translate('weight'),
|
||||
inheritable: true,
|
||||
default: 3,
|
||||
},
|
||||
zoom: { type: Number },
|
||||
zoomControl: {
|
||||
type: Boolean,
|
||||
nullable: true,
|
||||
label: translate('Display the zoom control'),
|
||||
default: true,
|
||||
},
|
||||
zoomTo: {
|
||||
type: Number,
|
||||
placeholder: translate('Inherit'),
|
||||
helpEntries: 'zoomTo',
|
||||
label: translate('Default zoom level'),
|
||||
inheritable: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue