Skip to content

Commit

Permalink
VUU-333: Implement layout server (#970)
Browse files Browse the repository at this point in the history
* restore double quotes

* layout-provider

* layout-reducer

* layout-view

* palette

* palette

* placeholder

* layout-view decomment

* registry

* rollback multi filter dropdown

* stack

* tabs

* config wrapper

* tools

* utils

* layout top level

* revert flexbox layout change

* restore lost semicolon

* missing space

* change action to a type union

* Update README.md

* Sync with Finos main

* VUU-41 style fixes

* VUU-41 rename css variable to --vuu

* Manage layout persistence via interface (#55)

* VUU25: Initialise module

* VUU25: Basic Controller infrastructure

* VUU25: Implement Layout & Metadata models

* VUU25: Add OpenAPI docs (Swagger)

* VUU25: Add basic H2 database

* VUU25: Implement DTOs

* VUU-27 interface to return promises

* VUU25: Change server port and swagger URL

* VUU25: Wire up Controller, Service and Repository for full implementation

- Also amend DTOs to differentiate request/response data

* VUU25: Implement model mapper to replace manual entity<->DTO conversion

* VUU-47 add methods for loading and saving tempLayout

* VUU-47 use loadLayoutById in LayoutList

* VUU-47 remove unused files

* VUU-47 update other examples to use new hook

* VUU25: Fix one-to-one entity persistence issue

* Calculated column (#882)

* calculated column in settings, instrument search

* additional mock data sources

* instrument tiles

* calculated column editing

* measured-container

* Row used columnMap rathe than column key

* full keyboard nav for table

* fix drag drop in column group headerr

* use MeasuredContainer for Table List

* table cell editing updates datasource

* table editing

* fix type issues

* fix old background renderer

* remove outdated import in showcase story

* exclude PatternValidator from semgrep

* add vuu tooltip component (#885)

* VUU-47 improve naming

* VUU-47 use placeholder in defaultLayout

* VUU-47 update docs with new naming

* remove duplicate CSS

* VUU-47 fix layoutList styling

* VUU-47 add loaded layouts to layout view

* VUU25: Pluralise layout endpoint resource

* VUU25: Amend annotations, javadocs, and updateLayout signature in the Controller

* VUU25: Add javadocs to definition field in LayoutDTOs

* VUU25: Remove no args constructor on entities

* VUU25: Replace layoutRepository with metadataRepository in LayoutService.getMetadata

* VUU25: Add date to create layout HTTP response body

* VUU25: Introduce MetadataService

* VUU-47 rename currentLayout to applicationLayout

* VUU25: Create layout controller unit tests (backend)

* VUU25: Create layout integration tests (backend)

* VUU25: Add global exception handling to give appropriate HTTP responses

* VUU25: Rename LayoutResponseDTO to GetLayoutResponseDTO

* VUU25: Reformatting

* VUU25: Make deleteLayout generate 404 if layout does not exist (backend)

* VUU-47 make defaultLayout closeable and update features

* VUU25: Downgrade Java 17 -> 11 and Springboot 3 -> 2

* VUU25: Change DB persistence from file to in-memory

* VUU25: Fix issues caused by downgrading Java & Springboot

* VUU25: Write description for layout-server pom.xml

* VUU-27 interface to return promises

* VUU-54: Validate IDs in LocalLayoutPersistenceManager

* VUU-54: Mock get/saveLocalEntity

* VUU-54: Refactor promises

* VUU-54: Remove unnecessary asyncs

* VUU-54: Use string union to distinguish layouts/metadata

* VUU-54: Rename variables

* VUU-54: Convert layout types to interfaces

* VUU-54: Extract loadAndFilter method

* VUU-54: Replace filter with find

* VUU-54: Rename validateId variables

* VUU-54: Change vars to lets

* VUU-54: Update imports for consistency

* VUU-54: Add comment to explain filter(Boolean)

* VUU-54: Refactor tests

* VUU-54: Extract expectError

* VUU-54: Remove loadAndFilter method

* VUU-54: Remove removeEntry method

* VUU-52: Add E2E tests to CI

* VUU-52: Use commit hash for cypress-io

* VUU-52: Add comment to explain full SHA

* VUU25: Implement interface for Metadata DTOs

* VUU-47 rename imports

* VUU-59 set up notification context

* VUU-47 fix cypress test

* Update vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-47 remove unused import

* VUU25: Create layout service unit tests (backend)

* VUU25: Add test for transactional nature of LayoutService.createLayout()

* VUU25: Remove unnecessary LayoutController unit tests

* VUU25: Mock out model mapper in LayoutController tests

* VUU25: Remove TODO

* VUU25: Move 'updated date' logic from DTO to service for update layout requests

* VUU-59 notifications with animation

* VUU25: Move updateLayout logic from mapper in controller to setters in service

* VUU-59 revert changes to imports

* VUU25: Fix tests for recent changes in layout server

- Update and delete layout in LayoutControllerTest and LayoutServiceTest

* VUU25: Remove unnecessary autogenerated content

- maven wrapper files
- gitignore

* VUU25: Make create layout (with a valid layout) integration test more robust

* VUU-59 change toast timeout

* VUU-59 change notificationType to enum

* VUU-27 remotePersistenceManager implementation

* VUU-27 https in baseUrl

* VUU25: Increase max length of screenshot column

* VUU25: Change create layout endpoint to return whole layout object

* VUU25: Fix tests for new create layout response

* VUU25: Simplify LayoutControllerTest test name

- `getLayout_validIdAndLayoutExists_returnsLayout` -> `getLayout_layoutExists_returnsLayout`

* VUU-59 improvements to example and add comments

* VUU25: Fix tests for changed unidirectional Layout<->Metadata relationship

* VUU-27 add cors config

* VUU-27 improve error messages

* VUU-27 improve error

* VUU-27 add type for LayoutMetadataDto

* VUU-27 remove redundant instantiation of persistenceManager

* VUU-27 improvements to unit tests

* VUU25: Implement layout server (#57)

Implement the remote server implementation for layout management

* VUU-27 make fetch method explicit for "GET"

* VUU-70: Create resource for application layouts

* VUU-70: Add integration tests

* VUU-70: Add unit tests for controller

* VUU-70: Fix service test

* VUU-70: Extract constant for default layout file

* VUU-70: Adjust whitespace

* VUU-70: Use AttributeConverter for JsonNode

* VUU-70: Remove DTO annotations

* VUU-70: Rename method

* VUU-70: Refactor getApplicationLayout

* VUU-70: Standardise DTO casing

* VUU-70: Return 500 on failed JSON read

* VUU-70: Adjust exception handling

* VUU-27 add check for date

* VUU-27 allow BASE_URL env variable

* VUU-70: Implement custom error responses

* VUU25: Fix tests since merging in main with BaseMetadata

* VUU25: Fix exception not being resolved due to invalid parameters

* VUU-70: Update javadocs

* VUU25: Add response body content message assertion for non-200 test requests

* VUU-70: Revert application properties

* VUU-27 test improvements

* VUU25: Cleanup conflict resolution mistakes from merge commit

* #900 disable failing test

* Update check on viewport and context menu (#913)

* remove reprecated Portal, fixes in COntextMenu

* use woff2 font, fix portal

* make sure ContextMenu always has theme attributes

* type fixes

* Tidy package and type issues (#914)

* fix package references, type issues

* add typescript config for correct auto import resolution

* add Layout Management Provider to sample apps (#917)

* add Layout Management Provider to sample apps

* fix test dependencies

* Drag drop provider (#918)

* add DragDrop example, resume drag in DragProvider

* full flow for remote drag

* fix type issues

* fix post rebase conflicts, type issues

* ignore type issue in drag drop code for now, so packages build

* Filterbar styling (#919)

* improve the keyboards navigation in Toolbar

* fix form control styling, uennecessaryb layout rerenders, table resize bug

* make sure all table config setting changes are saved, style tweaks

* calculated columns

* fix dropdown width

* fix width of combo in SaveLayout Panel

* remove console.log

* fix bug in OverflowContainer when orientation vertical

* remove global error listener, leave this to cypress

* move test schemas out of showcase (#920)

* Update dependency electron to v22 [SECURITY] (#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump vite, vitest versions to latest (#921)

* Instrument picker (#923)

* make instrument-picker more generic

* refactor Table navigation, preparing for row highlighting

* fix broken import paths

* add empty inlined worker as vitext mocj fails otherwise

* reinstate ignore for inlined-wotker so stub file doesn't get overwritten (#924)

* VUU-27 refactor to not use appendAndPersist

* VUU-70: Add DefaultApplicationLayoutLoader

- Introduce DefaultApplicationLayoutLoader to lazily load JSON from a static file
- Refactor service to use loader
- Add integration test case for failure to load default
- Rename static JSON files
- Move JsonNodeConverter to utils package

* VUU-70: Rename controller test methods

* VUU25: Modify exception handling for deleteLayout

* Merge branch 'main' of https://github.com/ScottLogic/finos-vuu into VUU-27-remote-layout-management

* VUU-27 extract updatedLayout vars

* VUU-27 add types for responses

* VUU-89 make metadata and layout share ids

* VUU-89 fix integration tests

* VUU25: Improve non-200 response messages

* VUU-70: Rename header key for username

- Rename header key from 'user' to 'username'
- Add integration tests for missing username

* VUU-70: Remove POST endpoint

* VUU-89 set metadata.id in Layout id setter and test improvements

* Merge finos:main -> sl:main

* #900 disable failing test

* Update check on viewport and context menu (#913)

* remove reprecated Portal, fixes in COntextMenu

* use woff2 font, fix portal

* make sure ContextMenu always has theme attributes

* type fixes

* Tidy package and type issues (#914)

* fix package references, type issues

* add typescript config for correct auto import resolution

* Layout Management (#916)

* fix vuu-filters types

* drawer and dialog fix

* drag drop flexbox editable

* Update vuu-ui/packages/vuu-filters/src/filter-utils.ts

Whitespace between guard clauses

Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>

* layout header

* restore double quotes

* layout-provider

* layout-reducer

* layout-view

* palette

* palette

* placeholder

* layout-view decomment

* registry

* rollback multi filter dropdown

* stack

* tabs

* config wrapper

* tools

* utils

* layout top level

* revert flexbox layout change

* restore lost semicolon

* missing space

* change action to a type union

* Update README.md

* Sync with Finos main

* VUU-41 style fixes

* VUU-41 rename css variable to --vuu

* Manage layout persistence via interface (#55)

* VUU-27 interface to return promises

* VUU-47 add methods for loading and saving tempLayout

* VUU-47 use loadLayoutById in LayoutList

* VUU-47 remove unused files

* VUU-47 update other examples to use new hook

* Calculated column (#882)

* calculated column in settings, instrument search

* additional mock data sources

* instrument tiles

* calculated column editing

* measured-container

* Row used columnMap rathe than column key

* full keyboard nav for table

* fix drag drop in column group headerr

* use MeasuredContainer for Table List

* table cell editing updates datasource

* table editing

* fix type issues

* fix old background renderer

* remove outdated import in showcase story

* exclude PatternValidator from semgrep

* add vuu tooltip component (#885)

* VUU-47 improve naming

* VUU-47 use placeholder in defaultLayout

* VUU-47 update docs with new naming

* remove duplicate CSS

* VUU-47 fix layoutList styling

* VUU-47 add loaded layouts to layout view

* VUU-47 rename currentLayout to applicationLayout

* VUU-47 make defaultLayout closeable and update features

* VUU-27 interface to return promises

* VUU-54: Validate IDs in LocalLayoutPersistenceManager

* VUU-54: Mock get/saveLocalEntity

* VUU-54: Refactor promises

* VUU-54: Remove unnecessary asyncs

* VUU-54: Use string union to distinguish layouts/metadata

* VUU-54: Rename variables

* VUU-54: Convert layout types to interfaces

* VUU-54: Extract loadAndFilter method

* VUU-54: Replace filter with find

* VUU-54: Rename validateId variables

* VUU-54: Change vars to lets

* VUU-54: Update imports for consistency

* VUU-54: Add comment to explain filter(Boolean)

* VUU-54: Refactor tests

* VUU-54: Extract expectError

* VUU-54: Remove loadAndFilter method

* VUU-54: Remove removeEntry method

* VUU-52: Add E2E tests to CI

* VUU-52: Use commit hash for cypress-io

* VUU-52: Add comment to explain full SHA

* VUU-47 rename imports

* VUU-59 set up notification context

* VUU-47 fix cypress test

* Update vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-47 remove unused import

* VUU-59 notifications with animation

* VUU-59 revert changes to imports

* VUU-59 change toast timeout

* VUU-59 change notificationType to enum

* VUU-59 improvements to example and add comments

---------

Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: cfisher-scottlogic <cfisher@scottlogic.com>
Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: heswell <steve@heswell.com>

* add Layout Management Provider to sample apps (#917)

* add Layout Management Provider to sample apps

* fix test dependencies

* Drag drop provider (#918)

* add DragDrop example, resume drag in DragProvider

* full flow for remote drag

* fix type issues

* fix post rebase conflicts, type issues

* ignore type issue in drag drop code for now, so packages build

* Filterbar styling (#919)

* improve the keyboards navigation in Toolbar

* fix form control styling, uennecessaryb layout rerenders, table resize bug

* make sure all table config setting changes are saved, style tweaks

* calculated columns

* fix dropdown width

* fix width of combo in SaveLayout Panel

* remove console.log

* fix bug in OverflowContainer when orientation vertical

* remove global error listener, leave this to cypress

* move test schemas out of showcase (#920)

* Update dependency electron to v22 [SECURITY] (#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump vite, vitest versions to latest (#921)

* Instrument picker (#923)

* make instrument-picker more generic

* refactor Table navigation, preparing for row highlighting

* fix broken import paths

* add empty inlined worker as vitext mocj fails otherwise

* reinstate ignore for inlined-wotker so stub file doesn't get overwritten (#924)

* disable basket functionality in showcase while we wait for full server (#925)

* disable basket functionality in showcase while we wait for server implementation

* remove console log

* fix styling of main tabs during drag (#929)

* wiring together calculated column pieces (#931)

* wiring together calculated column pieces

* remove logging

* re-enable all tests

* fix FilterTable resize bug (#932)

* move table height fix to measured container (#933)

* type fixes (#934)

* final styling for calculated column input (#935)

* connect filterbar to persistence (#936)

* connect filterbar to persistence

* skip test for missing TreeWalker finctionality until its there

* final adjustments to table column header styling (#937)

* move date generators to test data package (#938)

* Bump postcss from 8.4.27 to 8.4.31 in /vuu-ui (#926)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* #850 added for functionality to the rpc service, not ready for the big time yet, but not far off.

* #850 added ability to reference tables in separate modules.

* #850 refactored simul module to take prices out to prices module

* #850 refactored tableDefContainer to make it an implicit, otherwise it is re-used in the tests causing issues.

* #850 found a bug with basket constituents, not resolved as of this commit.

* #850 found a bug with basket constituents, not resolved as of this commit.

* Update basket tables UI (#940)

* update all basket tables, integrate basket server changes

* filter basket tables when loading

* connect cell editing

* remove console log

* fix newFeature story

* remove console log

* fix for dropdown width error

* remove console.log

* Fix faulty conflict resolutions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: keikeicheung <keikei274@gmail.com>
Co-authored-by: heswell <steve@heswell.com>
Co-authored-by: Vasco <98337074+vferraro-scottlogic@users.noreply.github.com>
Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris <chris.stevenson@gmail.com>

* VUU-89 add unit test for Layout

* VUU-89 add id to response and service to return layout

* VUU-70: Remove @Validated annotation

* VUU-70: Make integration test constants private

* VUU-89 sort imports and remove unneeded annotation

* Merge finos:main -> sl:main

* #900 disable failing test

* Update check on viewport and context menu (#913)

* remove reprecated Portal, fixes in COntextMenu

* use woff2 font, fix portal

* make sure ContextMenu always has theme attributes

* type fixes

* Tidy package and type issues (#914)

* fix package references, type issues

* add typescript config for correct auto import resolution

* Layout Management (#916)

* fix vuu-filters types

* drawer and dialog fix

* drag drop flexbox editable

* Update vuu-ui/packages/vuu-filters/src/filter-utils.ts

Whitespace between guard clauses

Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>

* layout header

* restore double quotes

* layout-provider

* layout-reducer

* layout-view

* palette

* palette

* placeholder

* layout-view decomment

* registry

* rollback multi filter dropdown

* stack

* tabs

* config wrapper

* tools

* utils

* layout top level

* revert flexbox layout change

* restore lost semicolon

* missing space

* change action to a type union

* Update README.md

* Sync with Finos main

* VUU-41 style fixes

* VUU-41 rename css variable to --vuu

* Manage layout persistence via interface (#55)

* VUU-27 interface to return promises

* VUU-47 add methods for loading and saving tempLayout

* VUU-47 use loadLayoutById in LayoutList

* VUU-47 remove unused files

* VUU-47 update other examples to use new hook

* Calculated column (#882)

* calculated column in settings, instrument search

* additional mock data sources

* instrument tiles

* calculated column editing

* measured-container

* Row used columnMap rathe than column key

* full keyboard nav for table

* fix drag drop in column group headerr

* use MeasuredContainer for Table List

* table cell editing updates datasource

* table editing

* fix type issues

* fix old background renderer

* remove outdated import in showcase story

* exclude PatternValidator from semgrep

* add vuu tooltip component (#885)

* VUU-47 improve naming

* VUU-47 use placeholder in defaultLayout

* VUU-47 update docs with new naming

* remove duplicate CSS

* VUU-47 fix layoutList styling

* VUU-47 add loaded layouts to layout view

* VUU-47 rename currentLayout to applicationLayout

* VUU-47 make defaultLayout closeable and update features

* VUU-27 interface to return promises

* VUU-54: Validate IDs in LocalLayoutPersistenceManager

* VUU-54: Mock get/saveLocalEntity

* VUU-54: Refactor promises

* VUU-54: Remove unnecessary asyncs

* VUU-54: Use string union to distinguish layouts/metadata

* VUU-54: Rename variables

* VUU-54: Convert layout types to interfaces

* VUU-54: Extract loadAndFilter method

* VUU-54: Replace filter with find

* VUU-54: Rename validateId variables

* VUU-54: Change vars to lets

* VUU-54: Update imports for consistency

* VUU-54: Add comment to explain filter(Boolean)

* VUU-54: Refactor tests

* VUU-54: Extract expectError

* VUU-54: Remove loadAndFilter method

* VUU-54: Remove removeEntry method

* VUU-52: Add E2E tests to CI

* VUU-52: Use commit hash for cypress-io

* VUU-52: Add comment to explain full SHA

* VUU-47 rename imports

* VUU-59 set up notification context

* VUU-47 fix cypress test

* Update vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-47 remove unused import

* VUU-59 notifications with animation

* VUU-59 revert changes to imports

* VUU-59 change toast timeout

* VUU-59 change notificationType to enum

* VUU-59 improvements to example and add comments

---------

Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: cfisher-scottlogic <cfisher@scottlogic.com>
Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: heswell <steve@heswell.com>

* add Layout Management Provider to sample apps (#917)

* add Layout Management Provider to sample apps

* fix test dependencies

* Drag drop provider (#918)

* add DragDrop example, resume drag in DragProvider

* full flow for remote drag

* fix type issues

* fix post rebase conflicts, type issues

* ignore type issue in drag drop code for now, so packages build

* Filterbar styling (#919)

* improve the keyboards navigation in Toolbar

* fix form control styling, uennecessaryb layout rerenders, table resize bug

* make sure all table config setting changes are saved, style tweaks

* calculated columns

* fix dropdown width

* fix width of combo in SaveLayout Panel

* remove console.log

* fix bug in OverflowContainer when orientation vertical

* remove global error listener, leave this to cypress

* move test schemas out of showcase (#920)

* Update dependency electron to v22 [SECURITY] (#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump vite, vitest versions to latest (#921)

* Instrument picker (#923)

* make instrument-picker more generic

* refactor Table navigation, preparing for row highlighting

* fix broken import paths

* add empty inlined worker as vitext mocj fails otherwise

* reinstate ignore for inlined-wotker so stub file doesn't get overwritten (#924)

* disable basket functionality in showcase while we wait for full server (#925)

* disable basket functionality in showcase while we wait for server implementation

* remove console log

* fix styling of main tabs during drag (#929)

* wiring together calculated column pieces (#931)

* wiring together calculated column pieces

* remove logging

* re-enable all tests

* fix FilterTable resize bug (#932)

* move table height fix to measured container (#933)

* type fixes (#934)

* final styling for calculated column input (#935)

* connect filterbar to persistence (#936)

* connect filterbar to persistence

* skip test for missing TreeWalker finctionality until its there

* final adjustments to table column header styling (#937)

* move date generators to test data package (#938)

* Bump postcss from 8.4.27 to 8.4.31 in /vuu-ui (#926)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* #850 added for functionality to the rpc service, not ready for the big time yet, but not far off.

* #850 added ability to reference tables in separate modules.

* #850 refactored simul module to take prices out to prices module

* #850 refactored tableDefContainer to make it an implicit, otherwise it is re-used in the tests causing issues.

* #850 found a bug with basket constituents, not resolved as of this commit.

* #850 found a bug with basket constituents, not resolved as of this commit.

* Update basket tables UI (#940)

* update all basket tables, integrate basket server changes

* filter basket tables when loading

* connect cell editing

* remove console log

* fix newFeature story

* remove console log

* fix for dropdown width error

* remove console.log

* basket workflow (#941)

* Fix faulty conflict resolutions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: keikeicheung <keikei274@gmail.com>
Co-authored-by: heswell <steve@heswell.com>
Co-authored-by: Vasco <98337074+vferraro-scottlogic@users.noreply.github.com>
Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris <chris.stevenson@gmail.com>

* VUU86: Add tests for layout server (#68)

* merge main in VUU-70

* VUU-70 improve exception handling and clean-up

* VUU-70 fix comment

* VUU-70 remove helper method

* Update layout-server/src/main/java/org/finos/vuu/layoutserver/repository/MetadataRepository.java

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* Update layout-server/src/main/java/org/finos/vuu/layoutserver/model/Layout.java

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-89 re-add unit test

* VUU-71: Interact with server for application layouts

* VUU-71: Extract app layout in remote manager

* VUU-71: Rename variable

* VUU-71: Apply auto formatting

* Sync mains (pull) (#106)

* #900 disable failing test

* Update check on viewport and context menu (#913)

* remove reprecated Portal, fixes in COntextMenu

* use woff2 font, fix portal

* make sure ContextMenu always has theme attributes

* type fixes

* Tidy package and type issues (#914)

* fix package references, type issues

* add typescript config for correct auto import resolution

* Layout Management (#916)

* fix vuu-filters types

* drawer and dialog fix

* drag drop flexbox editable

* Update vuu-ui/packages/vuu-filters/src/filter-utils.ts

Whitespace between guard clauses

Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>

* layout header

* restore double quotes

* layout-provider

* layout-reducer

* layout-view

* palette

* palette

* placeholder

* layout-view decomment

* registry

* rollback multi filter dropdown

* stack

* tabs

* config wrapper

* tools

* utils

* layout top level

* revert flexbox layout change

* restore lost semicolon

* missing space

* change action to a type union

* Update README.md

* Sync with Finos main

* VUU-41 style fixes

* VUU-41 rename css variable to --vuu

* Manage layout persistence via interface (#55)

* VUU-27 interface to return promises

* VUU-47 add methods for loading and saving tempLayout

* VUU-47 use loadLayoutById in LayoutList

* VUU-47 remove unused files

* VUU-47 update other examples to use new hook

* Calculated column (#882)

* calculated column in settings, instrument search

* additional mock data sources

* instrument tiles

* calculated column editing

* measured-container

* Row used columnMap rathe than column key

* full keyboard nav for table

* fix drag drop in column group headerr

* use MeasuredContainer for Table List

* table cell editing updates datasource

* table editing

* fix type issues

* fix old background renderer

* remove outdated import in showcase story

* exclude PatternValidator from semgrep

* add vuu tooltip component (#885)

* VUU-47 improve naming

* VUU-47 use placeholder in defaultLayout

* VUU-47 update docs with new naming

* remove duplicate CSS

* VUU-47 fix layoutList styling

* VUU-47 add loaded layouts to layout view

* VUU-47 rename currentLayout to applicationLayout

* VUU-47 make defaultLayout closeable and update features

* VUU-27 interface to return promises

* VUU-54: Validate IDs in LocalLayoutPersistenceManager

* VUU-54: Mock get/saveLocalEntity

* VUU-54: Refactor promises

* VUU-54: Remove unnecessary asyncs

* VUU-54: Use string union to distinguish layouts/metadata

* VUU-54: Rename variables

* VUU-54: Convert layout types to interfaces

* VUU-54: Extract loadAndFilter method

* VUU-54: Replace filter with find

* VUU-54: Rename validateId variables

* VUU-54: Change vars to lets

* VUU-54: Update imports for consistency

* VUU-54: Add comment to explain filter(Boolean)

* VUU-54: Refactor tests

* VUU-54: Extract expectError

* VUU-54: Remove loadAndFilter method

* VUU-54: Remove removeEntry method

* VUU-52: Add E2E tests to CI

* VUU-52: Use commit hash for cypress-io

* VUU-52: Add comment to explain full SHA

* VUU-47 rename imports

* VUU-59 set up notification context

* VUU-47 fix cypress test

* Update vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-47 remove unused import

* VUU-59 notifications with animation

* VUU-59 revert changes to imports

* VUU-59 change toast timeout

* VUU-59 change notificationType to enum

* VUU-59 improvements to example and add comments

---------

Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: cfisher-scottlogic <cfisher@scottlogic.com>
Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: heswell <steve@heswell.com>

* add Layout Management Provider to sample apps (#917)

* add Layout Management Provider to sample apps

* fix test dependencies

* Drag drop provider (#918)

* add DragDrop example, resume drag in DragProvider

* full flow for remote drag

* fix type issues

* fix post rebase conflicts, type issues

* ignore type issue in drag drop code for now, so packages build

* Filterbar styling (#919)

* improve the keyboards navigation in Toolbar

* fix form control styling, uennecessaryb layout rerenders, table resize bug

* make sure all table config setting changes are saved, style tweaks

* calculated columns

* fix dropdown width

* fix width of combo in SaveLayout Panel

* remove console.log

* fix bug in OverflowContainer when orientation vertical

* remove global error listener, leave this to cypress

* move test schemas out of showcase (#920)

* Update dependency electron to v22 [SECURITY] (#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump vite, vitest versions to latest (#921)

* Instrument picker (#923)

* make instrument-picker more generic

* refactor Table navigation, preparing for row highlighting

* fix broken import paths

* add empty inlined worker as vitext mocj fails otherwise

* reinstate ignore for inlined-wotker so stub file doesn't get overwritten (#924)

* disable basket functionality in showcase while we wait for full server (#925)

* disable basket functionality in showcase while we wait for server implementation

* remove console log

* fix styling of main tabs during drag (#929)

* wiring together calculated column pieces (#931)

* wiring together calculated column pieces

* remove logging

* re-enable all tests

* fix FilterTable resize bug (#932)

* move table height fix to measured container (#933)

* type fixes (#934)

* final styling for calculated column input (#935)

* connect filterbar to persistence (#936)

* connect filterbar to persistence

* skip test for missing TreeWalker finctionality until its there

* final adjustments to table column header styling (#937)

* move date generators to test data package (#938)

* Bump postcss from 8.4.27 to 8.4.31 in /vuu-ui (#926)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* #850 added for functionality to the rpc service, not ready for the big time yet, but not far off.

* #850 added ability to reference tables in separate modules.

* #850 refactored simul module to take prices out to prices module

* #850 refactored tableDefContainer to make it an implicit, otherwise it is re-used in the tests causing issues.

* #850 found a bug with basket constituents, not resolved as of this commit.

* #850 found a bug with basket constituents, not resolved as of this commit.

* Update basket tables UI (#940)

* update all basket tables, integrate basket server changes

* filter basket tables when loading

* connect cell editing

* remove console log

* fix newFeature story

* remove console log

* fix for dropdown width error

* remove console.log

* basket workflow (#941)

* Login panel (#942)

* login panel

* WIP

* tidy up type issues etc

* import fixes

* remove deprecated example

* #944 Added fix for threading related issue in ViewPortContainer.scala when change was called.

* #944 Reduced logging

* Switch UI to new Theme (#943)

* remove sample app

* rename basket trading app to sample-app

* fix broken inmports

* fix bugs persistning table settings

* 862 create a basketdesign table that represents the specific instance of a basket that we are modifying it will be based on a basket entry but can be customized to what the user needs (#948)

* #862 Fixed test versions to abstract out clock.

* #862 Added Viewport scoped rpc service to test.

* #862 Added ability to edit baskets join service.

* Fix minor UI issues (#949)

* fix UI dataTable issue - bugs after resize

A column resize operation populates the ColumnState state value. From
this point on columnState shadows modelColumns so subsequent changes
to modelColumns are not rendered.

* enable custom editors for cell renderers

Column Settings Panel allows a custom renderer to be selected.
Some renderers will have settings of their own. This enables
editors form those settings to be made available.

* fix type issue

* update baskets used in showcase examples to match server tables (#950)

* add initial support for columns backed by lookup tables (#951)

* move basket data generation into simulated vuu module to pave way for rpc support

* add updater for prices, insert for array data source

* create Table for test data in modules

* fix scrolling issue in table when focusing edit fields

* add initial support for table columns backed by lookup tables

* wire table cell editing to server calls (#953)

* Schema load sequence (#955)

* cache table meta requests with promise to avoid multiple server requests

* ensure table meta is loaded before client is notified of subcribe

table meta for all tables was being requested from server every
time any hook asked for the table data. This was happening twice
at startup. Now we cache the metadata.
If we didn't have table meta at point where CREATE_VP_SUCCESS was
handled, we notified client anyway. This caused tables to be rendered
with no type information, so alignment was wrong on numerics.

* fix all data tests

* Merge persistence manager generator approaches

* Fix duplicated NavigationStyle export in `TableNext.examples.tsx`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: keikeicheung <keikei274@gmail.com>
Co-authored-by: heswell <steve@heswell.com>
Co-authored-by: Vasco <98337074+vferraro-scottlogic@users.noreply.github.com>
Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris <chris.stevenson@gmail.com>
Co-authored-by: chrisjstevo <chrisjstevo@users.noreply.github.com>

* VUU80: Refactor Dialog styling to fix multiple components (#100)

- Header alignment
- Border
- Fonts
- 'Close' button
- Body padding

* Sync mains (pull) (#107)

* #900 disable failing test

* Update check on viewport and context menu (#913)

* remove reprecated Portal, fixes in COntextMenu

* use woff2 font, fix portal

* make sure ContextMenu always has theme attributes

* type fixes

* Tidy package and type issues (#914)

* fix package references, type issues

* add typescript config for correct auto import resolution

* Layout Management (#916)

* fix vuu-filters types

* drawer and dialog fix

* drag drop flexbox editable

* Update vuu-ui/packages/vuu-filters/src/filter-utils.ts

Whitespace between guard clauses

Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>

* layout header

* restore double quotes

* layout-provider

* layout-reducer

* layout-view

* palette

* palette

* placeholder

* layout-view decomment

* registry

* rollback multi filter dropdown

* stack

* tabs

* config wrapper

* tools

* utils

* layout top level

* revert flexbox layout change

* restore lost semicolon

* missing space

* change action to a type union

* Update README.md

* Sync with Finos main

* VUU-41 style fixes

* VUU-41 rename css variable to --vuu

* Manage layout persistence via interface (#55)

* VUU-27 interface to return promises

* VUU-47 add methods for loading and saving tempLayout

* VUU-47 use loadLayoutById in LayoutList

* VUU-47 remove unused files

* VUU-47 update other examples to use new hook

* Calculated column (#882)

* calculated column in settings, instrument search

* additional mock data sources

* instrument tiles

* calculated column editing

* measured-container

* Row used columnMap rathe than column key

* full keyboard nav for table

* fix drag drop in column group headerr

* use MeasuredContainer for Table List

* table cell editing updates datasource

* table editing

* fix type issues

* fix old background renderer

* remove outdated import in showcase story

* exclude PatternValidator from semgrep

* add vuu tooltip component (#885)

* VUU-47 improve naming

* VUU-47 use placeholder in defaultLayout

* VUU-47 update docs with new naming

* remove duplicate CSS

* VUU-47 fix layoutList styling

* VUU-47 add loaded layouts to layout view

* VUU-47 rename currentLayout to applicationLayout

* VUU-47 make defaultLayout closeable and update features

* VUU-27 interface to return promises

* VUU-54: Validate IDs in LocalLayoutPersistenceManager

* VUU-54: Mock get/saveLocalEntity

* VUU-54: Refactor promises

* VUU-54: Remove unnecessary asyncs

* VUU-54: Use string union to distinguish layouts/metadata

* VUU-54: Rename variables

* VUU-54: Convert layout types to interfaces

* VUU-54: Extract loadAndFilter method

* VUU-54: Replace filter with find

* VUU-54: Rename validateId variables

* VUU-54: Change vars to lets

* VUU-54: Update imports for consistency

* VUU-54: Add comment to explain filter(Boolean)

* VUU-54: Refactor tests

* VUU-54: Extract expectError

* VUU-54: Remove loadAndFilter method

* VUU-54: Remove removeEntry method

* VUU-52: Add E2E tests to CI

* VUU-52: Use commit hash for cypress-io

* VUU-52: Add comment to explain full SHA

* VUU-47 rename imports

* VUU-59 set up notification context

* VUU-47 fix cypress test

* Update vuu-ui/packages/vuu-layout/src/layout-persistence/LayoutPersistenceManager.ts

Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>

* VUU-47 remove unused import

* VUU-59 notifications with animation

* VUU-59 revert changes to imports

* VUU-59 change toast timeout

* VUU-59 change notificationType to enum

* VUU-59 improvements to example and add comments

---------

Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: cfisher-scottlogic <cfisher@scottlogic.com>
Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: heswell <steve@heswell.com>

* add Layout Management Provider to sample apps (#917)

* add Layout Management Provider to sample apps

* fix test dependencies

* Drag drop provider (#918)

* add DragDrop example, resume drag in DragProvider

* full flow for remote drag

* fix type issues

* fix post rebase conflicts, type issues

* ignore type issue in drag drop code for now, so packages build

* Filterbar styling (#919)

* improve the keyboards navigation in Toolbar

* fix form control styling, uennecessaryb layout rerenders, table resize bug

* make sure all table config setting changes are saved, style tweaks

* calculated columns

* fix dropdown width

* fix width of combo in SaveLayout Panel

* remove console.log

* fix bug in OverflowContainer when orientation vertical

* remove global error listener, leave this to cypress

* move test schemas out of showcase (#920)

* Update dependency electron to v22 [SECURITY] (#894)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* bump vite, vitest versions to latest (#921)

* Instrument picker (#923)

* make instrument-picker more generic

* refactor Table navigation, preparing for row highlighting

* fix broken import paths

* add empty inlined worker as vitext mocj fails otherwise

* reinstate ignore for inlined-wotker so stub file doesn't get overwritten (#924)

* disable basket functionality in showcase while we wait for full server (#925)

* disable basket functionality in showcase while we wait for server implementation

* remove console log

* fix styling of main tabs during drag (#929)

* wiring together calculated column pieces (#931)

* wiring together calculated column pieces

* remove logging

* re-enable all tests

* fix FilterTable resize bug (#932)

* move table height fix to measured container (#933)

* type fixes (#934)

* final styling for calculated column input (#935)

* connect filterbar to persistence (#936)

* connect filterbar to persistence

* skip test for missing TreeWalker finctionality until its there

* final adjustments to table column header styling (#937)

* move date generators to test data package (#938)

* Bump postcss from 8.4.27 to 8.4.31 in /vuu-ui (#926)

Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.31.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.31)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* #850 added for functionality to the rpc service, not ready for the big time yet, but not far off.

* #850 added ability to reference tables in separate modules.

* #850 refactored simul module to take prices out to prices module

* #850 refactored tableDefContainer to make it an implicit, otherwise it is re-used in the tests causing issues.

* #850 found a bug with basket constituents, not resolved as of this commit.

* #850 found a bug with basket constituents, not resolved as of this commit.

* Update basket tables UI (#940)

* update all basket tables, integrate basket server changes

* filter basket tables when loading

* connect cell editing

* remove console log

* fix newFeature story

* remove console log

* fix for dropdown width error

* remove console.log

* basket workflow (#941)

* Login panel (#942)

* login panel

* WIP

* tidy up type issues etc

* import fixes

* remove deprecated example

* #944 Added fix for threading related issue in ViewPortContainer.scala when change was called.

* #944 Reduced logging

* Switch UI to new Theme (#943)

* remove sample app

* rename basket trading app to sample-app

* fix broken inmports

* fix bugs persistning table settings

* 862 create a basketdesign table that represents the specific instance of a basket that we are modifying it will be based on a basket entry but can be customized to what the user needs (#948)

* #862 Fixed test versions to abstract out clock.

* #862 Added Viewport scoped rpc service to test.

* #862 Added ability to edit baskets join service.

* Fix minor UI issues (#949)

* fix UI dataTable issue - bugs after resize

A column resize operation populates the ColumnState state value. From
this point on columnState shadows modelColumns so subsequent changes
to modelColumns are not rendered.

* enable custom editors for cell renderers

Column Settings Panel allows a custom renderer to be selected.
Some renderers will have settings of their own. This enables
editors form those settings to be made available.

* fix type issue

* update baskets used in showcase examples to match server tables (#950)

* add initial support for columns backed by lookup tables (#951)

* move basket data generation into simulated vuu module to pave way for rpc support

* add updater for prices, insert for array data source

* create Table for test data in modules

* fix scrolling issue in table when focusing edit fields

* add initial support for table columns backed by lookup tables

* wire table cell editing to server calls (#953)

* Schema load sequence (#955)

* cache table meta requests with promise to avoid multiple server requests

* ensure table meta is loaded before client is notified of subcribe

table meta for all tables was being requested from server every
time any hook asked for the table data. This was happening twice
at startup. Now we cache the metadata.
If we didn't have table meta at point where CREATE_VP_SUCCESS was
handled, we notified client anyway. This caused tables to be rendered
with no type information, so alignment was wrong on numerics.

* fix all data tests

* Issue 850 added the first example module test for rpc services  (#954)

* #850 Refactored example code so that simulation is in its own module

* #850 Refactored example code into its own module

* #850 updated documentation

* #850 organized imports

* #850 added first consumer test outline

* #850 added ability to create viewport in test easily

* #850 added ability to create viewport in test easily

* #850 added first example working test calling viewport Rpc call.

* #850 renamed test case.

* #850 Added example flow for baskets

* #850 Added additional example for editRowAction

* #850 Added additional methods for editable example.

* #850 Added additional methods for editable example.

* #850 Added more functionality to the demo basket app.

* #850 Added thorough test of basket functionality.

* #850 Fixed test assert which accidentally changed contract in test.

* #850 Fixed test assert which accidentally changed contract in test.

* #850 Fixed test assert which accidentally changed contract in test.

* #850 fixed the bad pom definition.

* #850 deleted duplicate and not required config and updated semgrep.

* Release 0.9.20 beta (#956)

* [maven-release-plugin] prepare release vuu-parent-0.9.20-beta

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: GitHub Actions <actions@github.com>

* #957 added all projects to release build. (#960)

* #957 added all projects to release build.

* #957 added all projects to release build.

* #957 added all projects to release build.

* Release 0.9.33 beta (#961)

* [maven-release-plugin] prepare release vuu-parent-0.9.33-beta

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: GitHub Actions <actions@github.com>

* #957 fixed issue with javadoc. (#963)

* Release 0.9.35 beta (#964)

* [maven-release-plugin] prepare release vuu-parent-0.9.35-beta

* [maven-release-plugin] prepare for next development iteration

---------

Co-authored-by: GitHub Actions <actions@github.com>

* enable context menu on basket constituents (#965)

* fix behaviour in baskets module in data-test

* fix pinned column rendering gap

* enable context menu in basket constituent table in basket feature

* remove console log

* Fix conflict resolutions

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: keikeicheung <keikei274@gmail.com>
Co-authored-by: heswell <steve@heswell.com>
Co-authored-by: Vasco <98337074+vferraro-scottlogic@users.noreply.github.com>
Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: Peter Ling <pling@scottlogic.com>
Co-authored-by: pling-scottlogic <79100986+pling-scottlogic@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris <chris.stevenson@gmail.com>
Co-authored-by: chrisjstevo <chrisjstevo@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>

* VUU-333: Post-merge fix

* VUU-96: Convert Date to LocalDate

* VUU-81 layout definition as ObjectNode

* VUU-81 remove unused imports

* VUU-81 remove redundant annotation and tidy up

* VUU-81 make const naming consistent in unit tests and add comments

* VUU-81 remove stringify() for definition in POST

* VUU-81 improve naming in test

* SLVUU-27: Add allowed origins to CORS config

* SLVUU-113: Add `process.env.LOCAL` flag to `esbuild.mjs` (#116)

* SLVUU-113: Add `process.env.LOCAL` flag to `esbuild.mjs`

* SLVUU-113: Remove runtime null coalescence of envar

* SLVUU-113: Add BASE_URL envar to sample-app's esbuild.mjs

* SLVUU-113: Add BASE_URL envar to showcase's vite.config.js

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: harryhartley <hhartley94@gmail.com>
Co-authored-by: Joe Dunleavy <107405201+Joe-Dunleavy@users.noreply.github.com>
Co-authored-by: Joe Dunleavy <jdunleavy@scottlogic.com>
Co-authored-by: cfisher-scottlogic <cfisher@scottlogic.com>
Co-authored-by: Cara <99646608+cfisher-scottlogic@users.noreply.github.com>
Co-authored-by: vferraro-scottlogic <vferraro@scottlogic.com>
Co-authored-by: Vasco <98337074+vferraro-scottlogic@users.noreply.github.com>
Co-authored-by: heswell <steve@heswell.com>
Co-authored-by: keikeicheung <keikei274@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Luke Vincent <lincent@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris <chris.stevenson@gmail.com>
Co-authored-by: chrisjstevo <chrisjstevo@users.noreply.github.com>
Co-authored-by: GitHub Actions <actions@github.com>
  • Loading branch information
16 people authored Nov 21, 2023
1 parent f98649b commit 0badbdc
Show file tree
Hide file tree
Showing 68 changed files with 2,786 additions and 185 deletions.
1 change: 1 addition & 0 deletions .semgrepignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ example/order/src/main/scala/org/finos/vuu/provider/simulation/SimulatedBigInstr
vuu/src/main/scala/org/finos/vuu/provider/simulation/SimulatedBigInstrumentsProvider.scala
vuu-ui/packages/vuu-data/src/array-data-source/group-utils.ts
vuu-ui/packages/vuu-datagrid-extras/src/column-expression-input/column-language-parser/walkExpressionTree.ts
vuu-ui/packages/vuu-layout/src/layout-persistence/RemoteLayoutPersistenceManager.ts
vuu-ui/packages/vuu-popups/src/menu/useContextMenu.tsx
vuu-ui/packages/vuu-table-extras/src/cell-edit-validators/PatternValidator.ts
vuu-ui/packages/vuu-ui-controls/src/list/Highlighter.tsx
Expand Down
78 changes: 78 additions & 0 deletions layout-server/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.16</version>
<relativePath/> <!-- lookup parent fromEntity repository -->
</parent>
<groupId>org.finos.vuu</groupId>
<artifactId>layout-server</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>layout-server</name>
<description>A remote server to persist layouts for the Vuu client</description>
<properties>
<java.version>11</java.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.6.12</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency>
<groupId>org.modelmapper</groupId>
<artifactId>modelmapper</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains</groupId>
<artifactId>annotations</artifactId>
<version>13.0</version>
<scope>compile</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package org.finos.vuu.layoutserver;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class CorsConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedOrigins(
"http://127.0.0.1:5173",
"https://127.0.0.1:5173",
"http://127.0.0.1:8443/",
"https://127.0.0.1:8443/"
)
.allowedMethods("GET", "POST", "PUT", "DELETE");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package org.finos.vuu.layoutserver;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class LayoutServerApplication {

public static void main(String[] args) {
SpringApplication.run(LayoutServerApplication.class, args);
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.finos.vuu.layoutserver.config;

import lombok.RequiredArgsConstructor;
import org.finos.vuu.layoutserver.dto.request.LayoutRequestDto;
import org.finos.vuu.layoutserver.model.Layout;
import org.modelmapper.ModelMapper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@RequiredArgsConstructor
@Configuration
public class MappingConfig {

@Bean
public ModelMapper modelMapper() {
ModelMapper mapper = new ModelMapper();

mapper.typeMap(LayoutRequestDto.class, Layout.class)
.addMappings(m -> m.skip(Layout::setId));

return mapper;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
package org.finos.vuu.layoutserver.controller;

import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.RequiredArgsConstructor;
import org.finos.vuu.layoutserver.dto.response.ApplicationLayoutDto;
import org.finos.vuu.layoutserver.service.ApplicationLayoutService;
import org.modelmapper.ModelMapper;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/application-layouts")
public class ApplicationLayoutController {

private final ApplicationLayoutService service;
private final ModelMapper mapper;

/**
* Gets the persisted application layout for the requesting user. If the requesting user does not have an
* application layout persisted, a default layout with a null username is returned instead. No more than one
* application layout can be persisted for a given user.
*
* @return the application layout
*/
@ResponseStatus(HttpStatus.OK)
@GetMapping
public ApplicationLayoutDto getApplicationLayout(@RequestHeader("username") String username) {
return mapper.map(service.getApplicationLayout(username), ApplicationLayoutDto.class);
}

/**
* Creates or updates the unique application layout for the requesting user.
*
* @param layoutDefinition JSON representation of the application layout to be created
* @param username the user making the request
*/
@ResponseStatus(HttpStatus.CREATED)
@PutMapping
public void persistApplicationLayout(@RequestHeader("username") String username, @RequestBody ObjectNode layoutDefinition) {
service.persistApplicationLayout(username, layoutDefinition);
}

/**
* Deletes the application layout for the requesting user. A 404 will be returned if there is no existing
* application layout.
*
* @param username the user making the request
*/
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping
public void deleteApplicationLayout(@RequestHeader("username") String username) {
service.deleteApplicationLayout(username);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
package org.finos.vuu.layoutserver.controller;

import lombok.RequiredArgsConstructor;
import org.finos.vuu.layoutserver.dto.request.LayoutRequestDto;
import org.finos.vuu.layoutserver.dto.response.LayoutResponseDto;
import org.finos.vuu.layoutserver.dto.response.MetadataResponseDto;
import org.finos.vuu.layoutserver.model.Layout;
import org.finos.vuu.layoutserver.service.LayoutService;
import org.finos.vuu.layoutserver.service.MetadataService;
import org.modelmapper.ModelMapper;
import org.springframework.http.HttpStatus;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;
import java.util.UUID;

@RequiredArgsConstructor
@RestController
@RequestMapping("/layouts")
@Validated
public class LayoutController {

private final LayoutService layoutService;
private final MetadataService metadataService;
private final ModelMapper mapper;

/**
* Gets the specified layout
*
* @param id ID of the layout to get
* @return the layout
*/
@ResponseStatus(HttpStatus.OK)
@GetMapping("/{id}")
public LayoutResponseDto getLayout(@PathVariable UUID id) {
return mapper.map(layoutService.getLayout(id), LayoutResponseDto.class);
}

/**
* Gets metadata for all layouts
*
* @return the metadata
*/
@ResponseStatus(HttpStatus.OK)
@GetMapping("/metadata")
public List<MetadataResponseDto> getMetadata() {

return metadataService.getMetadata()
.stream()
.map(metadata -> mapper.map(metadata, MetadataResponseDto.class))
.collect(java.util.stream.Collectors.toList());
}

/**
* Creates a new layout
*
* @param layoutToCreate the layout to be created
* @return the layout that has been created, with the autogenerated ID and created date
*/
@ResponseStatus(HttpStatus.CREATED)
@PostMapping
public LayoutResponseDto createLayout(@RequestBody @Valid LayoutRequestDto layoutToCreate) {
Layout layout = mapper.map(layoutToCreate, Layout.class);

return mapper.map(layoutService.createLayout(layout), LayoutResponseDto.class);
}

/**
* Updates the specified layout
*
* @param id ID of the layout to update
* @param layout the new layout
*/
@ResponseStatus(HttpStatus.NO_CONTENT)
@PutMapping("/{id}")
public void updateLayout(@PathVariable UUID id, @RequestBody @Valid LayoutRequestDto layout) {
Layout newLayout = mapper.map(layout, Layout.class);

layoutService.updateLayout(id, newLayout);
}

/**
* Deletes the specified layout
*
* @param id ID of the layout to delete
*/
@ResponseStatus(HttpStatus.NO_CONTENT)
@DeleteMapping("/{id}")
public void deleteLayout(@PathVariable UUID id) {
layoutService.deleteLayout(id);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.finos.vuu.layoutserver.dto.request;

import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.Data;

import javax.validation.constraints.NotNull;

@Data
public class LayoutRequestDto {

/**
* The definition of the layout as an arbitrary JSON structure, describing all required components
*/
@NotNull(message = "Definition must not be null")
private ObjectNode definition;

@NotNull(message = "Metadata must not be null")
private MetadataRequestDto metadata;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.finos.vuu.layoutserver.dto.request;

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import lombok.Data;
import org.finos.vuu.layoutserver.model.BaseMetadata;

@Data
public class MetadataRequestDto {

@JsonUnwrapped
BaseMetadata baseMetadata;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package org.finos.vuu.layoutserver.dto.response;

import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.Data;

@Data
public class ApplicationLayoutDto {
private String username;
private ObjectNode definition;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.finos.vuu.layoutserver.dto.response;

import lombok.Data;
import org.springframework.http.HttpStatus;

import javax.servlet.http.HttpServletRequest;
import java.time.LocalDate;
import java.util.List;

@Data
public class ErrorResponse {
private LocalDate timestamp = LocalDate.now();
private int status;
private String error;
private List<String> messages;
private String path;

public ErrorResponse(HttpServletRequest request, List<String> messages, HttpStatus status) {
this.status = status.value();
this.error = status.getReasonPhrase();
this.path = request.getRequestURI();
this.messages = messages;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.finos.vuu.layoutserver.dto.response;

import com.fasterxml.jackson.databind.node.ObjectNode;
import lombok.Data;

import java.util.UUID;

@Data
public class LayoutResponseDto {

private UUID id;

/**
* The definition of the layout as an arbitrary JSON structure, describing all required components
*/
private ObjectNode definition;

private MetadataResponseDto metadata;
}
Loading

0 comments on commit 0badbdc

Please sign in to comment.