@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.)
65 lines (61 loc) • 1.45 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _default = {
name: 'MiradorGallery',
type: 'object',
title: 'Mirador galleri',
titleEN: 'Mirador gallery',
options: {
semanticSanity: {
exclude: true
}
},
fields: [{
name: 'disabled',
title: 'Avslått?',
titleEN: 'Disabled',
type: 'boolean'
}, {
name: 'items',
title: 'Vinduer',
titleEN: 'Items',
type: 'array',
of: [{
type: 'MiradorGalleryWindow'
}]
}, {
name: 'label',
title: 'Tittel',
titleEN: 'Heading',
type: 'string'
}, {
name: 'description',
title: 'Beskrivelse',
titleEN: 'Description',
type: 'simpleBlockContent'
}],
preview: {
select: {
title: 'label',
media: 'items.0.manifestRef.image',
items: 'items'
},
prepare(_ref) {
var _items$length;
var title = _ref.title,
media = _ref.media,
items = _ref.items;
var count = (_items$length = items === null || items === void 0 ? void 0 : items.length) !== null && _items$length !== void 0 ? _items$length : 'no';
return {
title: title !== null && title !== void 0 ? title : 'Missing title',
subtitle: "Mirador galleri, ".concat(count, " document(s)"),
media: media ? media : ''
};
}
}
};
exports.default = _default;
//# sourceMappingURL=MiradorGallery.js.map