zammad/app/frontend/shared/components/Form/initializeFieldEditor.ts
Benjamin Scharf 1df003fce1 Feature: Editor - Improve UX for table actions
Co-authored-by: Benjamin Scharf <bs@zammad.com>
Co-authored-by: Dusan Vuckovic <dv@zammad.com>
2026-01-29 14:32:30 +01:00

45 lines
1 KiB
TypeScript

// Copyright (C) 2012-2026 Zammad Foundation, https://zammad-foundation.org/
import { type Component } from 'vue'
import type { FieldEditorClass } from './types.ts'
type EditorComponentMap = {
[key: string]: Component | null
}
// Provide your own map with the following keys, the values given here are just examples.
let editorClasses: FieldEditorClass = {
actionBar: {
tableMenuContainer: '',
tableMenuGrid: '',
button: {
base: '',
},
},
input: {
container: '',
inlineContainer: '',
},
tableMenu: {
triggerButton: '',
},
}
let editorComponents: EditorComponentMap = {
actionBar: null,
actionMenu: null,
suggestionList: null,
}
export const initializeFieldEditorClasses = (classes: FieldEditorClass) => {
editorClasses = classes
}
export const getFieldEditorClasses = () => editorClasses
export const initializeEditorComponents = (components: EditorComponentMap) => {
editorComponents = components
}
export const getEditorComponents = () => editorComponents