ICIJ / datashare-client

Frontend interface for Datashare, a self-hosted search engine for documents.
https://datashare.icij.org
GNU Affero General Public License v3.0
32 stars 17 forks source link

feat: add nested widgets #333

Closed pirhoo closed 1 year ago

pirhoo commented 1 year ago

PR description

This PR adds a new widget type to nest widgets for complex layouts.

Example

In the @/store/widgets/index.js we can define it as follow:

{
  card: true,
  type: 'WidgetNested',
  widgets: [
    {
      name: 'text',
      order: 50,
      card: true,
      cols: 6,
      type: 'WidgetText'
    },
    {
      name: 'empty',
      order: 5,
      card: true,
      cols: 6,
      type: 'WidgetEmpty'
    }
  ]
}

Preview

Screenshot 2023-10-25 at 13-36-32 Datashare