New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ngx-flexlayout-test

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-flexlayout-test

This library is built to provide a solution for Angular enables the creation of complex layouts consisting of panels that can be floated, docked, nested, resized, pinned, unpinned and closed. Additional components can be integrated to create an IDE-like l

  • 0.0.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

ngx-flexlayout

This library is built to provide a solution for Angular enables the creation of complex layouts consisting of panels that can be floated, docked, nested, resized, pinned, unpinned and closed. Additional components can be integrated to create an IDE-like layout.
Demo on the Stackblitz or Codesandbox

Logo

Installation

Install ngx-flexlayout from npm:

npm install ngx-flexlayout --save

Add wanted package to NgModule imports:

import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { BrowserAnimationsModule } from "@angular/platform-browser/animations";

import { defineCustomElements } from 'ngx-flexlayout/loader';
defineCustomElements();

@NgModule({
  imports: [
    BrowserAnimationsModule
  ],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})

Component

public layout  = {
    rootPane: {
        type: 'splitPane',
        orientation: 'horizontal',
        panes: [
            {
                type: 'contentPane',
                contentId: 'content1',
                header: 'Pane 1'
            }
        ]
    }
};

Html

<ngx-flexlayout [layout]="layout">
  <div slot="content1" class="dockManagerContent">Content 1</div>
  ...
</ngx-flexlayout>

API Documentation

Content pane 🔗

The main building blocks in the Dock Manager are the panes. IgcContentPane

PropertyTypeDefaultDescription
idstringThe id of the pane. If not set the Dock Manager generates it automatically.
typestring ('splitPane', 'contentPane', 'tabGroupPane', 'documentHost')'contentPane'The type of the pane.
contentIdstringThe slot attribute's value of the content element.
headerstringThe text header of the content pane. Even if header slot templates are used, the text header is used for aria label.
headerIdstringThe slot attribute's value of the content pane header element. If not set, the header property value is used.
tabHeaderIdstringThe slot attribute's value of the tab header element. If not set, the header property value is used.
unpinnedHeaderIdstringThe slot attribute's value of the unpinned header element. If not set, the header property value is used.
sizenumber100The size of the pane relative to its sibling panes' sizes.

const contentPane: IgcContentPane = {
    type: 'contentPane',
    contentId: 'content1',
    header: 'Pane 1',
    isPinned: false
    tabHeaderId: 'tabHeader1'
}
public layout  = {
    rootPane: contentPane
};
<ngx-flexlayout [layout]="layout">
    <div slot="content1" class="dockManagerContent">Content 1</div>
    <span slot="tabHeader1">Pane 1 Tab</span>
</ngx-flexlayout>
Split pane 🔗

The content pane represents a pane with header and content. It can be hosted inside a Split Pane or a Tab Group Pane. IgcSplitPane

PropertyTypeDefaultDescription
idstringThe id of the pane. If not set the Dock Manager generates it automatically.
typestring ('splitPane', 'contentPane', 'tabGroupPane', 'documentHost')'splitPane'The type of the pane.
orientationstring ('horizontal', 'vertical')The orientation of the split pane.
panesIgcDockManagerPane[]The child panes of the split pane.
sizenumber100The size of the pane relative to its sibling panes' sizes.
floatingLocationIgcDockManagerPointThe absolute location point of the pane. Applies only for floating panes.
floatingWidthnumber100The absolute width of the pane. Applies only for floating panes.
floatingHeightnumber100The absolute height of the pane. Applies only for floating panes.
floatingResizablebooleanDetermines whether floating pane resizing is allowed. Applies only for floating panes.

const splitPane: IgcSplitPane = {
    type: 'splitPane',
    orientation: 'horizontal',
    panes: [
        {
            type: 'contentPane',
            contentId: 'content1',
            header: 'Pane 1'
        },
        {
            type: 'contentPane',
            contentId: 'content2',
            header: 'Pane 2'
        }
    ]
}
public layout  = {
    rootPane: splitPane
};
Tab group pane 🔗

The split pane is a container pane which stacks all of its child panes horizontally or vertically based on its orientation property. IgcTabGroupPane

PropertyTypeDefaultDescription
idstringThe id of the pane. If not set the Dock Manager generates it automatically.
typestring ('splitPane', 'contentPane', 'tabGroupPane', 'documentHost')'tabGroupPane'The type of the pane.
panesIgcContentPane[]The child content panes of the tab group.
sizenumber100The size of the pane relative to its sibling panes' sizes.
selectedIndexnumberThe index of the selected tab.

const tabGroupPane: IgcTabGroupPane = {
    type: 'tabGroupPane',
    panes: [
        {
            type: 'contentPane',
            contentId: 'content1',
            header: 'Pane 1'
        },
        {
            type: 'contentPane',
            contentId: 'content2',
            header: 'Pane 2'
        }
    ]
}
public layout  = {
    rootPane: tabGroupPane
};
Document host 🔗

The floating pane is a split pane rendered above all other ones in a floating window.IgcDocumentHost

PropertyTypeDefaultDescription
idstringThe id of the pane. If not set the Dock Manager generates it automatically.
typestring ('splitPane', 'contentPane', 'tabGroupPane', 'documentHost')'documentHost'The type of the pane.
rootPaneIgcSplitPaneThe root split pane of the document host.
sizenumber100The size of the pane relative to its sibling panes' sizes.

const docHost: IgcDocumentHost = {
    type: 'documentHost',
    rootPane: {
        type: 'splitPane',
        orientation: 'horizontal',
        panes: [
            {
                type: 'tabGroupPane',
                panes: [
                    {
                        type: 'contentPane',
                        contentId: 'content1',
                        header: 'Grid'
                    },
                    {
                        type: 'contentPane',
                        contentId: 'content4',
                        header: 'List'
                    }
                ]
            }
        ]
    }
}
Floating pane 🔗

The tab group pane displays its child content panes as the tabs of a tab component. IgcSplitPane

const layout: IgcDockManagerLayout = {
    rootPane: {
        // ...
    },
    floatingPanes: [
        {
            type: 'splitPane',
            orientation: 'horizontal',
            floatingLocation: { x: 80, y: 80 },
            floatingWidth: 200,
            floatingHeight: 150,
            floatingResizable: true,
            panes: [
                {
                    type: 'contentPane',
                    contentId: 'content1',
                    header: 'Floating Pane 1'
                }
            ]
        }
    ]
};
Themes 🔗

@import '~ngx-flexlayout/dist/collection/styles/themes.css';
<ngx-flexlayout class="light-theme | dark-theme">
Localization 🔗

import { addResourceStrings } from 'ngx-flexlayout';

const dockManagerStringsFr: IgcDockManagerResourceStrings = {
  close: 'Fermer',
  // ...
};

addResourceStrings('fr', dockManagerStringsFr);
Input 🔗

InputTypeDefaultDescription
layoutIgcDockManagerLayoutGets/sets the layout configuration of the Dock Manager.
draggedPaneIgcContentPane, IgcSplitPane, IgcTabGroupPaneGets/sets the currently dragged pane.
dropPositionIgcDockManagerPointGets/sets the current drop position when performing custom drag/drop.
activePaneIgcContentPaneGets/sets the active pane of the Dock Manager.
allowMaximizebooleantrueDetermines whether the end user is allowed to maximize panes.
maximizedPaneIgcContentPane, IgcSplitPane, IgcTabGroupPaneGets/sets the maximized pane.
resourceStringsIgcDockManagerResourceStringsGets/sets the resource strings.
allowFloatingPanesResizebooleantrueDetermines whether the end user is allowed to resize floating panes.
Output 🔗

InputTypeDescription
splitterResizeStartCustomEventAn event raised when a splitter resizing starts.
splitterResizeEndCustomEventAn event raised when a splitter resizing ends.
paneHeaderConnectedCustomEvent - IgcPaneHeaderConnectionEventArgsAn event raised when a pane header element is connected.
paneHeaderDisconnectedCustomEvent - IgcPaneHeaderConnectionEventArgsAn event raised when a pane header element is disconnected.
tabHeaderConnectedCustomEvent - IgcTabHeaderConnectionEventArgsAn event raised when a tab header element is connected.
tabHeaderDisconnectedCustomEvent - IgcTabHeaderConnectionEventArgsAn event raised when a tab header element is disconnected.
paneCloseCustomEvent - IgcPaneCloseEventArgsAn event raised when panes are about to close.
panePinnedToggleCustomEvent - IgcPanePinnedEventArgsAn event raised when panes are about to get pinned/unpinned.
paneDragStartCustomEvent - IgcPaneDragStartEventArgsAn event raised when a pane drag starts.
paneDragOverCustomEvent - IgcPaneDragOverEventArgsAn event raised when a pane is dragged over.
paneDragEndCustomEvent - IgcPaneDragEndEventArgsAn event raised when a pane drag ends.
activePaneChangedCustomEvent - IgcActivePaneEventArgsAn event raised when a pane is selected/activated
floatingPaneResizeEndCustomEvent - IgcFloatingPaneResizeEventArgsAn event raised when a floating pane resize operation ends.
floatingPaneResizeStartCustomEvent - IgcFloatingPaneResizeEventArgsAn event raised when a floating pane resizing operation starts.
floatingPaneResizeMoveCustomEvent - IgcFloatingPaneResizeMoveEventArgsAn event raised when a floating pane resizing operation is in progress.
Method 🔗

InputTypeDescription
dropPanePromise - booleanPerforms drop of the draggedPane into the specified dropPosition. Returns true if the pane has been docked otherwise returns false.
removePanePromise - voidRemoves a pane from the layout.
addEventListenervoid
addEventListenervoid
removeEventListenervoid
removeEventListenervoid

License

MIT License. Copyright (c) 2021 DaiDH

Keywords

FAQs

Package last updated on 10 Nov 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc