1
0
Fork 0
mirror of https://gitlab.com/bramw/baserow.git synced 2025-01-31 03:12:45 +00:00
bramw_baserow/web-frontend/modules/builder/mixins/collectionField.js
2024-11-28 08:47:54 +00:00

36 lines
963 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', 'elementPage', '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,
},
}