chore: reorder schema by keys

This commit is contained in:
Alexis Métaireau 2024-03-12 09:39:22 +01:00
parent cdbaab2d20
commit 41238f0a94

View file

@ -1,43 +1,36 @@
import { translate } from './i18n.js' import { translate } from './i18n.js'
export const SCHEMA = { export const SCHEMA = {
zoom: { captionBar: {
type: Number,
},
scrollWheelZoom: {
type: Boolean, type: Boolean,
label: translate('Allow scroll wheel zoom?'), label: translate('Do you want to display a caption bar?'),
},
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?'),
default: false, default: false,
}, },
displayPopupFooter: { captionMenus: {
type: Boolean, type: Boolean,
label: translate('Do you want to display popup footer?'), label: translate('Do you want to display caption menus?'),
default: false, default: true,
}, },
onLoadPanel: { color: {
type: String, type: String,
label: translate('Do you want to display a panel on load?'), handler: 'ColorPicker',
choices: [ label: translate('color'),
['none', translate('None')], helpEntries: 'colorValue',
['caption', translate('Caption')], inheritable: true,
['databrowser', translate('Data browser')], default: 'DarkBlue',
['facet', translate('Facet search')], },
], dashArray: {
default: 'none', 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: { defaultView: {
type: String, type: String,
@ -50,94 +43,30 @@ export const SCHEMA = {
], ],
default: 'center', default: 'center',
}, },
name: {
type: String,
label: translate('name'),
},
description: { description: {
label: translate('description'), label: translate('description'),
type: 'Text', type: 'Text',
helpEntries: 'textFormatting', helpEntries: 'textFormatting',
}, },
licence: { displayPopupFooter: {
type: String, type: Boolean,
label: translate('licence'), label: translate('Do you want to display popup footer?'),
default: false,
}, },
tilelayer: { easing: { type: Boolean, default: false },
type: Object, editinosmControl: {
type: Boolean,
nullable: true,
label: translate('Display the control to open OpenStreetMap editor'),
default: null,
}, },
overlay: { embedControl: {
type: Object, type: Boolean,
}, nullable: true,
limitBounds: { label: translate('Display the embed control'),
type: Object, default: true,
},
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,
}, },
facetKey: { type: String },
fill: { fill: {
type: Boolean, type: Boolean,
label: translate('fill'), label: translate('fill'),
@ -161,162 +90,11 @@ export const SCHEMA = {
inheritable: true, inheritable: true,
default: 0.3, default: 0.3,
}, },
dashArray: { filterKey: { type: String },
type: String, fromZoom: {
label: translate('dash array'),
helpEntries: 'dashArray',
inheritable: true,
},
popupShape: {
type: String,
label: translate('Popup shape'),
inheritable: true,
choices: [
['Default', translate('Popup')],
['Large', translate('Popup (large)')],
['Panel', translate('Side panel')],
],
default: 'Default',
},
popupTemplate: {
type: String,
label: translate('Popup content style'),
inheritable: true,
choices: [
['Default', translate('Default')],
['Table', translate('Table')],
['GeoRSSImage', translate('GeoRSS (title + image)')],
['GeoRSSLink', translate('GeoRSS (only link)')],
['OSM', translate('OpenStreetMap')],
],
default: 'Default',
},
popupContentTemplate: {
type: 'Text',
label: translate('Popup content template'),
helpEntries: ['dynamicProperties', 'textFormatting'],
placeholder: '# {name}',
inheritable: true,
default: '# {name}\n{description}',
},
zoomTo: {
type: Number, type: Number,
placeholder: translate('Inherit'), label: translate('From zoom'),
helpEntries: 'zoomTo', helpText: translate('Optional.'),
label: translate('Default zoom level'),
inheritable: true,
},
captionBar: {
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?'),
default: true,
},
slideshow: {
type: Object,
},
sortKey: {
type: String,
},
labelKey: {
type: String,
helpEntries: 'labelKey',
placeholder: translate('Default: name'),
label: translate('Label key'),
inheritable: true,
},
filterKey: {
type: String,
},
facetKey: {
type: String,
},
slugKey: {
type: String,
},
showLabel: {
type: Boolean,
nullable: true,
label: translate('Display label'),
inheritable: true,
default: false,
},
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,
},
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: { fullscreenControl: {
type: Boolean, type: Boolean,
@ -324,65 +102,263 @@ export const SCHEMA = {
label: translate('Display the fullscreen control'), label: translate('Display the fullscreen control'),
default: true, default: true,
}, },
editinosmControl: { iconClass: {
type: Boolean, type: String,
nullable: true, label: translate('Icon shape'),
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'),
},
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, inheritable: true,
default: true, choices: [
['Default', translate('Default')],
['Circle', translate('Circle')],
['Drop', translate('Drop')],
['Ball', translate('Ball')],
],
default: 'Default',
}, },
fromZoom: { iconOpacity: {
type: Number, type: Number,
label: translate('From zoom'), min: 0.1,
helpText: translate('Optional.'), max: 1,
}, step: 0.1,
toZoom: { label: translate('icon opacity'),
type: Number,
label: translate('To zoom'),
helpText: translate('Optional.'),
},
stroke: {
type: Boolean,
label: translate('stroke'),
helpEntries: 'stroke',
inheritable: true, inheritable: true,
default: true, default: 1,
}, },
outlink: { iconUrl: {
label: translate('Link to…'), type: String,
helpEntries: 'outlink', handler: 'IconUrl',
placeholder: 'http://...', label: translate('Icon symbol'),
inheritable: true, 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,
label: translate('Popup shape'),
inheritable: true,
choices: [
['Default', translate('Popup')],
['Large', translate('Popup (large)')],
['Panel', translate('Side panel')],
],
default: 'Default',
},
popupTemplate: {
type: String,
label: translate('Popup content style'),
inheritable: true,
choices: [
['Default', translate('Default')],
['Table', translate('Table')],
['GeoRSSImage', translate('GeoRSS (title + image)')],
['GeoRSSLink', translate('GeoRSS (only link)')],
['OSM', translate('OpenStreetMap')],
],
default: 'Default',
},
scaleControl: {
type: Boolean,
label: translate('Do you want to display the scale control?'),
default: true,
},
scrollWheelZoom: {
type: Boolean,
label: translate('Allow scroll wheel zoom?'),
},
searchControl: {
type: Boolean,
nullable: true,
label: translate('Display the search control'),
default: true,
},
shortCredit: {
type: String,
label: translate('Short credits'),
helpEntries: ['shortCredit', 'textFormatting'],
},
showLabel: {
type: Boolean,
nullable: true,
label: translate('Display label'),
inheritable: true,
default: false,
},
slideshow: { type: Object },
slugKey: { type: String },
smoothFactor: {
type: Number,
min: 0,
max: 10,
step: 0.5,
label: translate('Simplify'),
helpEntries: 'smoothFactor',
inheritable: true,
default: 1.0,
},
sortKey: { type: String },
starControl: {
type: Boolean,
nullable: true,
label: translate('Display the star map button'),
},
stroke: {
type: Boolean,
label: translate('stroke'),
helpEntries: 'stroke',
inheritable: true,
default: true,
},
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,
},
}, },
} }