1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-24 16:36:46 +00:00
bramw_baserow/web-frontend/modules/builder/mixins/collectionField.js
2024-07-31 06:15:20 +00:00

37 lines
956 B
JavaScript

import element from '@baserow/modules/builder/mixins/element'
import { resolveColor } from '@baserow/modules/core/utils/colors'
import { ThemeConfigBlockType } from '@baserow/modules/builder/themeConfigBlockTypes'
import applicationContextMixin from '@baserow/modules/builder/mixins/applicationContext'
export default {
inject: ['workspace', 'builder', 'page', 'mode'],
mixins: [element, applicationContextMixin],
props: {
element: {
type: Object,
required: true,
},
field: {
type: Object,
required: true,
},
},
computed: {
elementType() {
return this.$registry.get('element', this.element.type)
},
themeConfigBlocks() {
return this.$registry.getOrderedList('themeConfigBlock')
},
colorVariables() {
return ThemeConfigBlockType.getAllColorVariables(
this.themeConfigBlocks,
this.builder.theme
)
},
},
methods: {
resolveColor,
},
}