The widget system in RocketAdmin allows customization of how database fields are displayed and edited in the UI. Each field in a database table can be assigned a specific widget type with custom parameters to control its behavior and appearance.
Widgets are implemented across four different contexts, each serving a specific purpose in the UI:
| Context | Location | Purpose | Editable | Composable |
|---|---|---|---|---|
| Record Edit Fields | Create/Edit forms | Interactive input for data entry | ✅ Yes | useRecordEditField(props) |
| Record View Fields | Single record detail page | Read-only formatted display | ❌ No | useViewField(props, emit) |
| Table Display Fields | Table rows | Compact display in lists | ❌ No | useViewField(props, emit) |
| Filter Fields | Filter panels | Search and filter inputs | ✅ Yes | useFilterField(props) (an alias of useRecordEditField) |
All four composables live in frontend/src/components/fields/useFieldWidget.ts.
Example: The Boolean widget type has four implementations under frontend/src/components/fields/:
record-edit/BooleanEdit.vue- Checkbox toggle for editingrecord-view/BooleanRecordView.vue- "Yes/No" or icon displaytable-display/BooleanDisplay.vue- Badge or icon in table cellsfilter/BooleanFilter.vue- True/False/All dropdown for filtering
- Where Widgets Are Stored
- Widget Structure
- Available Widget Types
- How to Add a New Widget
- Widget Lifecycle
- Widget Parameters Examples
- Testing
- Real-World Example: Timezone Widget
- Important Notes
- Key Files Reference
Database:
- Table:
table_widget(PostgreSQL) - Entity:
backend/src/entities/widget/table-widget.entity.ts - Relationship: Many-to-one with
table_settings(CASCADE delete)
Key Backend Files:
backend/src/entities/widget/
├── table-widget.entity.ts # Entity definition
├── table-widget.controller.ts # API endpoints
├── table-widget.module.ts # Module registration
├── repository/ # Custom repository
├── use-cases/ # Business logic
└── utils/ # Validation utilities
The frontend (Vue 3, frontend/) implements widgets in four contexts. Each one is a folder of single-file components under frontend/src/components/fields/, named <Widget><Suffix>.vue. The props they share (label, value, fieldKey, structure, widgetStructure, relations, readonly, required, disabled) are defined in fields/types.ts. Their common logic lives in the composables in fields/useFieldWidget.ts.
Purpose: Interactive form inputs for editing and creating records.
Composable: useRecordEditField(props)
Key Features:
- Emit
fieldChangewith the new value. - Support validation and the required, disabled and readonly states.
Widgets: Binary, BinaryDataCaption, Boolean, Code, Color, Country, Date, DateTime, File, ForeignKey, Id, Image, JsonEditor, Language, LongText, Markdown, Money, Number, Password, Phone, Point, Range, S3, Select, StaticText, Text, Time, TimeInterval, Timezone, Url, Uuid
Purpose: Read-only display for the single-record detail view.
Composable: useViewField(props, emit)
Key Features:
- Display only, no editing.
- Copy to clipboard, which emits
copyToClipboard. - Present formatted values.
Widgets: the same set as Record Edit. RecordViewValue.vue picks the widget for a field.
Purpose: Compact, read-only display in table rows.
Composable: useViewField(props, emit)
Key Features:
- Condensed display for tables, with long values truncated.
- Copy to clipboard.
Widgets: the same set as Record Edit. TableDisplayCell.vue picks the widget for a cell.
Purpose: Search and filter inputs for table data.
Composable: useFilterField(props)
Key Features:
- Comparison operators (equals, contains, greater than, ...), which emit
comparatorChange. - Emit
fieldChangewhen the filter value changes. - Autofocus support.
Widgets: Binary, BinaryDataCaption, Boolean, Country, Date, DateTime, Default, Email, File, ForeignKey, Id, JsonEditor, LongText, Number, Password, Phone, Point, Select, StaticText, Text, Time, TimeInterval, Timezone. FilterComparatorRow.vue lays out the comparator next to the input.
Widget Registration:
frontend/src/consts/record-edit-types.ts,record-view-types.ts,table-display-types.tsandfilter-types.tsmap widget types and DB types to components (defineAsyncComponent).frontend/src/consts/widget-types.spec.tschecks these maps against a snapshot of the old Angular maps.
Widget Configuration UI:
frontend/src/views/table/TableWidgetsView.vuewithfrontend/src/components/table/TableWidgetItem.vueandwidget-defaults.ts.
Data Structures:
shared-code/src/data-access-layer/shared/data-structures/table-widget.ds.tsshared-code/src/data-access-layer/shared/enums/table-widget-type.enum.ts
@Entity('table_widget')
export class TableWidgetEntity {
@PrimaryGeneratedColumn('uuid')
id: string; // Unique identifier
@Column()
field_name: string; // Database column name
@Column({ default: null, type: 'varchar' })
widget_type?: WidgetTypeEnum; // Widget type (e.g., 'Boolean', 'Date')
@Column('json', { default: null })
widget_params: string; // JSON configuration parameters
@Column('json', { default: null })
widget_options: string; // JSON options
@Column({ default: null })
name?: string; // Display name
@Column({ default: null })
description?: string; // Widget description
@ManyToOne(() => TableSettingsEntity)
settings: Relation<TableSettingsEntity>;
}GET /widgets/:connectionId?tableName={tableName}- Fetch widgets for a tablePOST /widget/:connectionId?tableName={tableName}- Create/update widgets
Currently supported widget types (24 total):
| Widget Type | Description | Common Parameters |
|---|---|---|
Boolean |
Checkbox for true/false values | N/A |
Code |
Syntax-highlighted code editor | language, theme |
Color |
Color picker | N/A |
Country |
Country selector with flags | N/A |
Date |
Date picker (YYYY-MM-DD) | format |
DateTime |
Date and time picker | format |
Enum |
Dropdown for enum values | enum_values |
File |
File upload/download | max_size, allowed_types |
Foreign_key |
Related record selector | referenced_table_name, referenced_column_name |
Image |
Image upload/display | height, prefix |
JSON |
JSON editor | N/A |
Number |
Numeric input | unit, threshold_min, threshold_max |
Password |
Password input with encryption | encrypt, algorithm |
Phone |
Phone number input | country_code |
Range |
Range slider | min, max, step |
Readonly |
Read-only text display | N/A |
Select |
Dropdown selector | options, allow_null |
String |
Single-line text input | pattern |
Textarea |
Multi-line text input | rows, cols |
Time |
Time picker (HH:MM:SS) | format |
Timezone |
Timezone selector with UTC offsets | allow_null |
URL |
URL input with validation | N/A |
UUID |
UUID display/input | N/A |
Default |
Default rendering (inferred) | N/A |
Before adding a new widget, consider:
- Is there an existing widget type that can be configured to meet your needs?
- What database column types will this widget support?
- What parameters does the widget need?
File: backend/src/enums/widget-type.enum.ts
export enum WidgetTypeEnum {
// ... existing types
YOUR_NEW_WIDGET = 'Your_new_widget',
}When adding a new widget, you need to create components for all four contexts, under frontend/src/components/fields/:
- Record Edit Field (required) -
record-edit/YourNewWidgetEdit.vue - Record View Field (optional) -
record-view/YourNewWidgetRecordView.vue - Table Display Field (optional) -
table-display/YourNewWidgetDisplay.vue - Filter Field (optional) -
filter/YourNewWidgetFilter.vue
Note: At minimum, create the record-edit component. The other contexts will fall back to default rendering if not provided.
Every widget is a <script setup lang="ts"> single-file component. Next to it go a *.spec.ts (Vitest) and a *.stories.ts (Storybook), like the existing widgets. Build the markup from the primitives in @/components/ui (UiField, UiInput, UiSelect, ...). Keep styles scoped, BEM-named, and use only the --color-* (and spacing/text) CSS variables, so the dark theme works.
File: frontend/src/components/fields/record-edit/YourNewWidgetEdit.vue
<script setup lang="ts">
import { ref } from 'vue';
import { UiField, UiInput } from '@/components/ui';
import type { RecordEditFieldEmits, RecordEditFieldProps } from '../types';
import { useRecordEditField } from '../useFieldWidget';
const props = defineProps<RecordEditFieldProps & { value?: string | null }>();
const emit = defineEmits<RecordEditFieldEmits>();
const { normalizedLabel, widgetParams } = useRecordEditField(props);
const text = ref(props.value ?? '');
function onInput(value: string) {
text.value = value;
emit('fieldChange', value);
}
</script>
<template>
<UiField class="your-new-widget-edit" :label="normalizedLabel" :required="required">
<UiInput
:name="`${label}-${fieldKey}`"
:model-value="text"
:disabled="disabled"
:readonly="readonly"
:data-testid="`record-${label}-your-new-widget`"
@update:model-value="onInput"
/>
</UiField>
</template>
<style scoped>
.your-new-widget-edit {
width: 100%;
}
</style>The shared props (fieldKey, label, required, readonly, disabled, structure, widgetStructure, relations) come from RecordEditFieldProps in fields/types.ts; each widget adds its own typed value. Note that the field key is fieldKey (key is reserved in Vue), and the output is the fieldChange event. widgetParams is the parsed widget_params object, whether the API sent it as a string or an object.
Record View Field (record-view/YourNewWidgetRecordView.vue):
<script setup lang="ts">
import type { RecordViewFieldProps, ViewFieldEmits } from '../types';
import RecordViewValue from './RecordViewValue.vue';
defineProps<RecordViewFieldProps & { value?: string | null }>();
defineEmits<ViewFieldEmits>();
</script>
<template>
<RecordViewValue>{{ value || '—' }}</RecordViewValue>
</template>Table Display Field (table-display/YourNewWidgetDisplay.vue):
<script setup lang="ts">
import type { TableDisplayFieldProps, ViewFieldEmits } from '../types';
import { useViewField } from '../useFieldWidget';
import TableDisplayCell from './TableDisplayCell.vue';
const props = defineProps<TableDisplayFieldProps & { value?: string | null }>();
const emit = defineEmits<ViewFieldEmits>();
// `copy()` copies the value and emits `copyToClipboard` with the snackbar message.
const { copy } = useViewField(props, emit);
</script>
<template>
<TableDisplayCell @copy="copy(value)">{{ value || '—' }}</TableDisplayCell>
</template>Filter Field (filter/YourNewWidgetFilter.vue):
<script setup lang="ts">
import { ref } from 'vue';
import { UiField, UiInput } from '@/components/ui';
import type { FilterFieldEmits, FilterFieldProps } from '../types';
import { useFilterField } from '../useFieldWidget';
import { type FocusTarget, useAutofocus } from './useAutofocus';
const props = defineProps<FilterFieldProps & { value?: string | null }>();
const emit = defineEmits<FilterFieldEmits>();
const { normalizedLabel } = useFilterField(props);
const input = ref<FocusTarget>(null);
useAutofocus(props, input);
</script>
<template>
<UiField floating-label :label="normalizedLabel">
<UiInput
ref="input"
:name="`${label}-${fieldKey}`"
:model-value="value ?? ''"
:data-testid="`filter-${label}-your-new-widget`"
@update:model-value="emit('fieldChange', $event)"
/>
</UiField>
</template>A filter widget that picks its own comparator (eq, contains, startswith, empty, ...) emits comparatorChange as well.
You need to register your widget components in four separate registry files under frontend/src/consts/, one for each context. Each file declares the components as lazily loaded defineAsyncComponent(() => import(...)) constants and maps widget types to them in its UIwidgets export:
File: frontend/src/consts/record-edit-types.ts
const YourNewWidgetEdit = defineAsyncComponent(() => import('@/components/fields/record-edit/YourNewWidgetEdit.vue'));
export const UIwidgets = {
// ... existing widgets
Your_new_widget: YourNewWidgetEdit,
};The keys of this map also fill the widget type dropdown on the widgets settings page.
File: frontend/src/consts/record-view-types.ts
const YourNewWidgetRecordView = defineAsyncComponent(
() => import('@/components/fields/record-view/YourNewWidgetRecordView.vue'),
);
export const UIwidgets = {
// ... existing widgets
Your_new_widget: YourNewWidgetRecordView,
};File: frontend/src/consts/table-display-types.ts
const YourNewWidgetDisplay = defineAsyncComponent(() => import('@/components/fields/table-display/YourNewWidgetDisplay.vue'));
export const UIwidgets = {
// ... existing widgets
Your_new_widget: YourNewWidgetDisplay,
};File: frontend/src/consts/filter-types.ts
const YourNewWidgetFilter = defineAsyncComponent(() => import('@/components/fields/filter/YourNewWidgetFilter.vue'));
export const UIwidgets = {
// ... existing widgets
Your_new_widget: YourNewWidgetFilter,
};frontend/src/consts/widget-types.spec.ts compares every map in these four files against frontend/src/consts/widget-types.angular.json, a frozen snapshot of the old Angular maps (each entry is the SFC name, e.g. "Timezone": "TimezoneEdit"). A new entry fails that test until you add it to the JSON too:
{
"record-edit-types.ts": {
"UIwidgets": {
"Your_new_widget": "YourNewWidgetEdit"
}
}
}Add the matching entry under record-view-types.ts, table-display-types.ts and filter-types.ts for each context you registered.
Important Notes:
- Each registry file has its own
UIwidgetsexport mapping widget types to components - The same files also hold the DB-type maps (
recordEditTypes,recordViewFieldTypes,tableDisplayTypes,filterTypes) used for columns without a widget - If you only created the record-edit component, only add it to
record-edit-types.ts - The system will gracefully fall back to default rendering for missing contexts
- Component names follow the pattern:
{WidgetName}{Context}.vuewhere Context is Edit, RecordView, Display, or Filter
File: frontend/src/components/table/widget-defaults.ts
Add default parameters with documentation to WIDGET_DEFAULT_PARAMS. This is the JSON5 text the params editor starts with when the widget type is picked. A type whose default is NO_SETTINGS gets a read-only editor. You can also add a docs link to WIDGET_DOCS_URLS.
export const WIDGET_DEFAULT_PARAMS: Record<string, string> = {
// ... existing defaults
Your_new_widget: `// Parameter 1 description
// Parameter 2 description
{
"param1": "value1",
"param2": 100
}
`,
};File: backend/src/entities/widget/utils/validate-create-widgets-ds.ts
If your widget requires special validation:
async function validateCreateWidgetsDs(widgets, connection, tableName) {
for (const widget of widgets) {
// ... existing validations
if (widget.widget_type === WidgetTypeEnum.YOUR_NEW_WIDGET) {
// Validate widget-specific parameters
const params = JSON.parse(widget.widget_params || '{}');
if (!params.required_param) {
throw new Error('your_new_widget requires required_param');
}
}
}
}Update this file with:
- Description of the new widget
- Available parameters
- Example configuration
- Supported database types
File: backend/test/ava-tests/saas-tests/table-widgets-e2e.test.ts
test('should create widget with YOUR_NEW_WIDGET type', async t => {
// Arrange
const widget = {
field_name: 'test_field',
widget_type: 'Your_new_widget',
widget_params: JSON.stringify({ param1: 'value1' })
};
// Act
const response = await request(app.getHttpServer())
.post(`/widget/${connectionId}?tableName=test_table`)
.send({ widgets: [widget] });
// Assert
t.is(response.status, 200);
t.is(response.body[0].widget_type, 'Your_new_widget');
});File: frontend/src/components/fields/record-edit/YourNewWidgetEdit.spec.ts
import { mount } from '@vue/test-utils';
import { describe, expect, it } from 'vitest';
import { mockWidgetStructure } from '../stories.mocks';
import YourNewWidgetEdit from './YourNewWidgetEdit.vue';
describe('YourNewWidgetEdit', () => {
it('renders the value', () => {
const wrapper = mount(YourNewWidgetEdit, { props: { label: 'field', value: 'hello' } });
expect(wrapper.find('input').element.value).toBe('hello');
});
it('emits fieldChange on input', async () => {
const wrapper = mount(YourNewWidgetEdit, {
props: { label: 'field', widgetStructure: mockWidgetStructure({ param1: 'value1' }) },
});
await wrapper.find('[data-testid="record-field-your-new-widget"]').setValue('new value');
expect(wrapper.emitted('fieldChange')).toEqual([['new value']]);
});
});- User navigates to Settings > UI Widgets
- Selects a database field
- Chooses widget type from dropdown
- Configures widget parameters in JSON editor
- Clicks Save
- Widget configuration saved to
table_widgettable widget_paramsstored as JSON stringwidget_optionsauto-stringified if needed- Associated with table via
table_settingsrelationship
- Widgets fetched when table is loaded
- API:
GET /widgets/:connectionId?tableName={tableName} - Cached in the frontend tables store (
stores/tables.ts)
- When displaying/editing records:
- System checks if field has widget configured
- If yes: Renders the Vue component registered for its
widget_typein that context'sUIwidgetsmap (a dynamic<component :is>) - Passes
value,fieldKey,structureandwidgetStructureas props, and listens forfieldChange/comparatorChange/copyToClipboard - Component renders based on
widget_params
- User modifies widget configuration
- System validates new configuration
- Updates existing widget in database
- UI refreshes with new widget behavior
- Widget can be removed via UI
- Field becomes available for re-assignment
- Default rendering used if no widget configured
{
"allow_null": true,
"options": [
{"value": "active", "label": "Active"},
{"value": "inactive", "label": "Inactive"},
{"value": "pending", "label": "Pending"}
]
}{
"encrypt": true,
"algorithm": "bcrypt"
}Supported algorithms: sha1, sha3, sha224, sha256, sha512, sha384, bcrypt, scrypt, argon2, pbkdf2
{
"column_name": "user_id",
"referenced_column_name": "id",
"referenced_table_name": "users"
}{
"height": 100,
"prefix": "https://cdn.example.com/images/"
}{
"unit": "bytes",
"threshold_min": 0,
"threshold_max": 1048576
}{
"allow_null": false
}The Timezone widget automatically populates the dropdown with all available timezones from the Intl API, displaying them with their UTC offsets (e.g., "America/New_York (UTC-05:00)").
Run backend widget tests:
cd backend
npm test table-widgets-e2e.test.tsTest files:
backend/test/ava-tests/saas-tests/table-widgets-e2e.test.tsbackend/test/ava-tests/non-saas-tests/non-saas-table-widgets-e2e.test.ts
Run frontend tests (from project root):
cd frontend && pnpm test:ciThe tests use Vitest with @vue/test-utils (mount). Widget component tests sit next to each component:
frontend/src/components/fields/record-edit/YourWidgetEdit.spec.tsfrontend/src/components/fields/record-view/YourWidgetRecordView.spec.tsfrontend/src/components/fields/table-display/YourWidgetDisplay.spec.tsfrontend/src/components/fields/filter/YourWidgetFilter.spec.ts
frontend/src/consts/widget-types.spec.ts checks the registries against the frozen Angular snapshot.
The Timezone widget is a complete example demonstrating all the concepts covered in this guide.
Backend Enum (backend/src/enums/widget-type.enum.ts:24):
Timezone = 'Timezone'Frontend Component (frontend/src/components/fields/record-edit/TimezoneEdit.vue):
<script setup lang="ts">
import { computed, ref } from 'vue';
import { type SelectOption, UiField, UiSelect } from '@/components/ui';
import type { RecordEditFieldEmits, RecordEditFieldProps } from '../types';
import { useRecordEditField } from '../useFieldWidget';
const props = defineProps<RecordEditFieldProps & { value?: string | null }>();
const emit = defineEmits<RecordEditFieldEmits>();
const { normalizedLabel, widgetParams } = useRecordEditField(props);
const selected = ref<string | null>(props.value ?? null);
// Built once from the Intl API, sorted by name, each labelled with its current offset
const allTimezones: SelectOption<string | null>[] = Intl.supportedValuesOf('timeZone')
.map((tz) => ({ value: tz, label: `${tz} (UTC${getTimezoneOffset(tz)})` }))
.sort((a, b) => a.value.localeCompare(b.value));
// Empty option when the widget's allow_null or the column's allow_null is set
const timezones = computed<SelectOption<string | null>[]>(() =>
widgetParams.value.allow_null || props.structure?.allow_null
? [{ value: null, label: '' }, ...allTimezones]
: allTimezones,
);
function onChange(value: string | null | (string | null)[]) {
if (Array.isArray(value)) return;
selected.value = value;
emit('fieldChange', value);
}
function getTimezoneOffset(timezone: string): string {
// `+HH:MM` from Intl's `longOffset` ("GMT+05:30"), with a manual fallback
// ...
}
</script>
<template>
<UiField class="timezone-edit" :label="normalizedLabel" :required="required">
<UiSelect
:name="`${label}-${fieldKey}`"
:model-value="selected"
:options="timezones"
:disabled="disabled || readonly"
:data-testid="`record-${label}-timezone`"
@update:model-value="onChange"
/>
</UiField>
</template>Widget Registration in All Four Registries:
frontend/src/consts/record-edit-types.ts:33, 85:
const TimezoneEdit = defineAsyncComponent(() => import('@/components/fields/record-edit/TimezoneEdit.vue'));
export const UIwidgets = {
// ... other widgets
Timezone: TimezoneEdit,
// ... other widgets
};frontend/src/consts/record-view-types.ts:41, 72:
export const UIwidgets = {
// ... other widgets
Timezone: TimezoneRecordView,
// ... other widgets
};frontend/src/consts/table-display-types.ts:35, 64:
export const UIwidgets = {
// ... other widgets
Timezone: TimezoneDisplay,
// ... other widgets
};frontend/src/consts/filter-types.ts:26, 46:
export const UIwidgets = {
// ... other widgets
Timezone: TimezoneFilter,
// ... other widgets
};Each of these entries is also listed in the frozen snapshot frontend/src/consts/widget-types.angular.json.
Default Parameters (frontend/src/components/table/widget-defaults.ts:185-191):
Timezone: `// Configure timezone widget options
// Uses Intl API to populate timezone list automatically
// allow_null: Allow empty/null value selection
{
"allow_null": false
}
`,Key Features:
- Uses browser's Intl API (
Intl.supportedValuesOf('timeZone')) - Automatically calculates UTC offsets for each timezone
- Supports the
allow_nullparameter, and adds the empty option for nullable columns too UiSelectdropdown- Alphabetically sorted timezone list
- The record view and table display show the zone with its offset; the table cell copies the value to the clipboard
- Comprehensive test coverage
Component Files (All Four Contexts):
Each context has the component, a Vitest spec and a Storybook story, under frontend/src/components/fields/:
Record Edit Fields:
- Component:
record-edit/TimezoneEdit.vue - Tests:
record-edit/TimezoneEdit.spec.ts - Stories:
record-edit/TimezoneEdit.stories.ts
Record View Fields:
- Component:
record-view/TimezoneRecordView.vue - Tests:
record-view/TimezoneRecordView.spec.ts - Stories:
record-view/TimezoneRecordView.stories.ts
Table Display Fields:
- Component:
table-display/TimezoneDisplay.vue - Tests:
table-display/TimezoneDisplay.spec.ts - Stories:
table-display/TimezoneDisplay.stories.ts
Filter Fields:
- Component:
filter/TimezoneFilter.vue(its option list comes fromfilter/timezones.ts) - Tests:
filter/TimezoneFilter.spec.ts - Stories:
filter/TimezoneFilter.stories.ts
Registry Files:
frontend/src/consts/record-edit-types.ts(line 33, 85)frontend/src/consts/record-view-types.ts(line 41, 72)frontend/src/consts/table-display-types.ts(line 35, 64)frontend/src/consts/filter-types.ts(line 26, 46)
-
Four Field Contexts: Understanding when each field type is used:
- Record Edit Fields: Used in create/edit forms (modals, dedicated edit pages)
- Record View Fields: Used in single record detail/view pages (read-only)
- Table Display Fields: Used in table rows for listing multiple records (compact display)
- Filter Fields: Used in filter panels for searching/filtering table data
-
Composables, Not Inheritance: Field components don't extend a base class. Each one types its props and events with
fields/types.tsand calls the composable for its context:useRecordEditField(props)for record-edituseViewField(props, emit)for record-view and table-displayuseFilterField(props)for filter
-
Single-File Components: Widgets are
<script setup lang="ts">SFCs, loaded lazily throughdefineAsyncComponentin the registries. No other registration is needed. Use the@/components/uiprimitives, and keep styles scoped with only--color-*variables. -
JSON5 Support: Widget parameters support JSON5 format (comments, unquoted keys) in the UI editor, but are stored as standard JSON
-
Security: Widget parameters are parsed using
secure-json-parseto prevent prototype pollution attacks -
Validation: Always validate widget parameters both on frontend (user experience) and backend (security)
-
Database Types: Consider which database column types are compatible with your widget
-
Cascading Deletes: Widgets are automatically deleted when their parent
table_settingsrecord is removed -
Null Values: Widget type can be null (defaults to standard rendering)
-
Progressive Enhancement: Start with the record-edit component. Add view/display/filter components only if you need custom behavior for those contexts
- Entity:
backend/src/entities/widget/table-widget.entity.ts - Controller:
backend/src/entities/widget/table-widget.controller.ts - Module:
backend/src/entities/widget/table-widget.module.ts - Validation:
backend/src/entities/widget/utils/validate-create-widgets-ds.ts - Use Cases:
backend/src/entities/widget/use-cases/
Widget Registries (Type to Component Mapping):
frontend/src/consts/record-edit-types.ts- Edit form componentsfrontend/src/consts/record-view-types.ts- Detail view componentsfrontend/src/consts/table-display-types.ts- Table row componentsfrontend/src/consts/filter-types.ts- Filter panel componentsfrontend/src/consts/widget-types.spec.ts+widget-types.angular.json- Parity test against the frozen Angular snapshot
Shared Widget Code:
frontend/src/components/fields/types.ts- Props and events of each contextfrontend/src/components/fields/useFieldWidget.ts-useRecordEditField,useViewField,useFilterField
Widget Configuration:
- Widget Manager:
frontend/src/views/table/TableWidgetsView.vuewithfrontend/src/components/table/TableWidgetItem.vue- Configuration UI - Defaults:
frontend/src/components/table/widget-defaults.ts- Default params and docs links - Store:
frontend/src/stores/tables.ts- Widget fetch/update (/widgets/:connectionId,/widget/:connectionId)
Component Directories:
- Record Edit Fields:
frontend/src/components/fields/record-edit/- Interactive form inputs - Record View Fields:
frontend/src/components/fields/record-view/- Read-only detail display - Table Display Fields:
frontend/src/components/fields/table-display/- Compact table display - Filter Fields:
frontend/src/components/fields/filter/- Search/filter inputs
- Data Structures:
shared-code/src/data-access-layer/shared/data-structures/table-widget.ds.ts - Enums:
shared-code/src/data-access-layer/shared/enums/table-widget-type.enum.ts
For questions or issues related to widgets:
- Check existing widget implementations for reference
- Review E2E tests for usage examples
- Consult the backend validation logic for parameter requirements
- Open an issue on the project repository
Last Updated: 2026-11-03