@seidhr/sanity-plugin-muna-schemas
Version:
Muna or ᛗᚢᚾᚨ means remember in norse. Muna is a schema for the Sanity Studio that enables detailed descriptions of cultural heritage objects and knowledge about their contexts as well as pages about them (or anything else really.)
56 lines (50 loc) • 1.18 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _defaultFieldsets = require("../../../../fieldsets/defaultFieldsets");
var _coalesceLabel = require("../../../../helpers/coalesceLabel");
var _default = {
name: 'GeojsonFeatureCollection',
type: 'object',
title: 'Feature Collection',
options: {
semanticSanity: {
exclude: true
}
},
fieldsets: _defaultFieldsets.defaultFieldsets,
fields: [// Foreign member not in the GeoJSON schema
{
name: 'label',
title: 'Tittel',
titleEN: 'Title',
description: '',
descriptionEN: '',
fieldset: 'core',
type: 'LocalizedString'
}, {
name: 'features',
title: 'Features',
titleEN: 'Features',
type: 'array',
of: [{
type: 'GeojsonFeature'
}]
}],
preview: {
select: {
title: 'label'
},
prepare(selection) {
var title = selection.title;
var label = (0, _coalesceLabel.coalesceLabel)(title);
return {
title: label || 'GeoJSON Feature Collection'
};
}
}
};
exports.default = _default;
//# sourceMappingURL=GeojsonFeatureCollection.js.map