@genesislcap/foundation-layout 14.395.0 → 14.396.1-TPD-4971.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/POPOUT_TODO.md +46 -0
  2. package/dist/custom-elements.json +466 -139
  3. package/dist/dts/index.d.ts +1 -1
  4. package/dist/dts/index.d.ts.map +1 -1
  5. package/dist/dts/main/layout-main.d.ts +9 -4
  6. package/dist/dts/main/layout-main.d.ts.map +1 -1
  7. package/dist/dts/main/layout-popout-controller.d.ts +49 -0
  8. package/dist/dts/main/layout-popout-controller.d.ts.map +1 -0
  9. package/dist/dts/utils/constants.d.ts +7 -1
  10. package/dist/dts/utils/constants.d.ts.map +1 -1
  11. package/dist/dts/utils/index.d.ts +1 -0
  12. package/dist/dts/utils/index.d.ts.map +1 -1
  13. package/dist/dts/utils/popout-events.d.ts +43 -0
  14. package/dist/dts/utils/popout-events.d.ts.map +1 -0
  15. package/dist/dts/utils/types.d.ts +39 -0
  16. package/dist/dts/utils/types.d.ts.map +1 -1
  17. package/dist/esm/index.js +1 -1
  18. package/dist/esm/main/layout-main.js +48 -21
  19. package/dist/esm/main/layout-popout-controller.js +289 -0
  20. package/dist/esm/utils/constants.js +7 -1
  21. package/dist/esm/utils/index.js +1 -0
  22. package/dist/esm/utils/popout-events.js +5 -0
  23. package/dist/foundation-layout.api.json +72 -5
  24. package/dist/foundation-layout.d.ts +103 -3
  25. package/docs/api/foundation-layout.foundationlayout.md +2 -2
  26. package/docs/api/foundation-layout.foundationlayout.popoutconfig.md +2 -2
  27. package/docs/api/foundation-layout.layout_popout_control_key.md +16 -0
  28. package/docs/api/foundation-layout.layoutpopoutconfig.md +22 -0
  29. package/docs/api/foundation-layout.md +22 -0
  30. package/docs/api/foundation-layout.serialisedlayout.md +3 -0
  31. package/docs/api-report.md.api.md +28 -1
  32. package/package.json +15 -13
package/POPOUT_TODO.md ADDED
@@ -0,0 +1,46 @@
1
+ # Foundation Layout TODOs
2
+
3
+ ## Multi-Instance Popouts
4
+ Currently, the popout system keys windows and state by their `registration` ID. This limits the layout to having only one instance of a specific component type (e.g., `rapid-grid-pro`) popped out at a time.
5
+
6
+ ### Proposed Improvement
7
+ Support multiple popouts of the same registration by introducing a unique `instanceId` (UUID).
8
+
9
+ - **URL Parameters**: Add a unique instance ID to the popout URL (e.g., `?layout-popout-control-key=my-grid&layout-popout-instance-id=uuid-123`).
10
+ - **Registry**: Update `FoundationLayoutPopoutController` to key the `popoutRegistry` by the unique `instanceId` rather than the `registration` name.
11
+ - **State Persistence**: Ensure the serialized layout stores the `registration` name alongside the state for each `instanceId` so they can be recreated correctly on restoration.
12
+ - **Communication**: Update the broadcast channel messages (`popout-update`, `popout-sync`, etc.) to use the `instanceId` for targeting and identification.
13
+
14
+ ## Configurable Popout Headers
15
+ A client has requested the ability to see the component header (title and custom buttons) inside the popout window, while still hiding the standard Golden Layout controls (Close, Maximise, and Popout-in-Popout).
16
+
17
+ ### Proposed Improvement
18
+ 1. **Update Configuration**: Add `showHeaders?: boolean` to the `LayoutPopoutConfig` interface (defaulting to `false`).
19
+ 2. **Update Activation Logic**:
20
+ - In `tryActivatePopoutMode`, pass the `showHeaders` value to the Golden Layout `settings.hasHeaders` property.
21
+ - Configure the root component item to disable standard buttons while allowing the header to render:
22
+ ```typescript
23
+ header: {
24
+ maximise: false,
25
+ close: false,
26
+ popout: false,
27
+ }
28
+ ```
29
+ 3. **Custom Buttons**: Ensure that the `setupCustomButtons` logic continues to run in the popout window so that the user's custom tools are injected into the newly visible header.
30
+
31
+ ## Restore on Manual Close
32
+ Currently, when a user manually closes a popout window, the component is removed from the layout entirely. We want to restore it to the main layout automatically.
33
+
34
+ ### Proposed Solution
35
+ 1. **Detect Manual Close**:
36
+ - In `FoundationLayoutPopoutController`, add a flag `isClosingAll` (boolean).
37
+ - Set `isClosingAll = true` at the start of `closeAllPopouts()` and `false` at the end.
38
+ - In the `popout-closed` event handler, check if `!isClosingAll`. If true, this is a manual user action.
39
+
40
+ 2. **Trigger Restoration**:
41
+ - If manual close is detected, call a restoration method on the parent `FoundationLayout` (e.g., `restoreItem`).
42
+ - Pass the `registration` ID and the final `state` (captured from the registry before deletion).
43
+
44
+ 3. **Implement `restoreItem`**:
45
+ - Update `FoundationLayout` to support restoring an item with its state preserved.
46
+ - This likely requires updating `addItem` or creating a new method that accepts `initialState` (or `componentState`) in the configuration, so the component re-initializes with its previous data (filters, scroll position, etc.).