mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
* feat: set up dashboard filters from a table and create the widgets they filter * feat: refine dashboard filter setup and widget association Support multi-table filters, guided widget configuration, same-table condition copying in display order, and automatic linking defaults. Preserve independent target settings and undo/redo behavior. * fix: show copied filter conditions after widget association * test: cover guided dashboard widget creation from a filter * test: cover dashboard filter copying across tables * refactor: simplify dashboard filter configuration * fix: restore dashboard filter links exactly on undo and redo * feat: set up a new widget and how a filter narrows it down in one modal * feat: fold the add-widget modal into collapsible sections that fit chart settings * fix: cancel queued updates when destroying dashboard charts * fix: reference dashboard option context by table * refactor: rename dashboard table context provider * fix: label dashboard table context as field options * fix: shorten dashboard table options label --------- Co-authored-by: Jeremie Pardou <571533+jrmi@users.noreply.github.com>
54 lines
1.8 KiB
JavaScript
54 lines
1.8 KiB
JavaScript
import {
|
|
WidgetDataProviderType,
|
|
DashboardTableContextDataProviderType,
|
|
} from '@baserow/modules/dashboard/dataProviderTypes'
|
|
import { DashboardSearchType } from '@baserow/modules/dashboard/searchTypes'
|
|
import { searchTypeRegistry } from '@baserow/modules/core/search/types/registry'
|
|
import dashboardApplicationStore from '@baserow/modules/dashboard/store/dashboardApplication'
|
|
import { DashboardApplicationType } from '@baserow/modules/dashboard/applicationTypes'
|
|
import { DashboardLastViewedItemType } from '@baserow/modules/dashboard/lastViewedItemTypes'
|
|
import {
|
|
SummaryWidgetType,
|
|
TextFilterWidgetType,
|
|
} from '@baserow/modules/dashboard/widgetTypes'
|
|
|
|
export default defineNuxtPlugin({
|
|
name: 'dashboard',
|
|
dependsOn: ['core', 'store'],
|
|
async setup(nuxtApp) {
|
|
const { $store, $registry } = nuxtApp
|
|
const context = { app: nuxtApp }
|
|
|
|
if (!$store.hasModule('dashboardApplication')) {
|
|
$store.registerModuleNuxtSafe(
|
|
'dashboardApplication',
|
|
dashboardApplicationStore
|
|
)
|
|
$store.registerModuleNuxtSafe(
|
|
'template/dashboardApplication',
|
|
dashboardApplicationStore
|
|
)
|
|
}
|
|
|
|
$registry.registerNamespace('dashboardDataProvider')
|
|
$registry.register(
|
|
'dashboardDataProvider',
|
|
new WidgetDataProviderType(context)
|
|
)
|
|
$registry.registerNamespace('dashboardWidget')
|
|
$registry.register(
|
|
'dashboardDataProvider',
|
|
new DashboardTableContextDataProviderType(context)
|
|
)
|
|
$registry.register('application', new DashboardApplicationType(context))
|
|
$registry.register(
|
|
'lastViewedItem',
|
|
new DashboardLastViewedItemType(context)
|
|
)
|
|
$registry.register('dashboardWidget', new SummaryWidgetType(context))
|
|
$registry.register('dashboardWidget', new TextFilterWidgetType(context))
|
|
|
|
searchTypeRegistry.register(new DashboardSearchType(context))
|
|
},
|
|
})
|