Skip to content

Commit

Permalink
feat(dock-manager): add split pane fixed size sample
Browse files Browse the repository at this point in the history
  • Loading branch information
igdmdimitrov committed Nov 20, 2024
1 parent a9120e0 commit 4e398c8
Show file tree
Hide file tree
Showing 25 changed files with 399 additions and 17 deletions.
1 change: 1 addition & 0 deletions browser/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,7 @@
<a class="nav-link" href="#" data-nav="/samples/layouts/dock-manager/hiding-panes"><span>Hiding Panes</span></a>
<a class="nav-link" href="#" data-nav="/samples/layouts/dock-manager/overview"><span>Overview</span></a>
<a class="nav-link" href="#" data-nav="/samples/layouts/dock-manager/proximity-dock"><span>Proximity Dock</span></a>
<a class="nav-link" href="#" data-nav="/samples/layouts/dock-manager/split-pane-fixed-size"><span>Split Pane Fixed Size</span></a>
<a class="nav-link" href="#" data-nav="/samples/layouts/dock-manager/styling"><span>Styling</span></a>
<a class="nav-link" href="#" data-nav="/samples/layouts/dock-manager/toggle-inner-dock"><span>Toggle Inner Dock</span></a>
<a class="nav-link" href="#" data-nav="/samples/layouts/dock-manager/updating-panes"><span>Updating Panes</span></a>
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"@webcomponents/webcomponentsjs": "2.3.0",
"core-js": "^3.6.5",
"file-saver": "^2.0.2",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"igniteui-webcomponents": "5.1.2",
"igniteui-webcomponents-charts": "5.1.0",
"igniteui-webcomponents-core": "5.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion samples/layouts/dock-manager/embedding-frames/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"igniteui-webcomponents-core": "5.1.0",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/layouts/dock-manager/focus-panes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion samples/layouts/dock-manager/hiding-panes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"igniteui-webcomponents-core": "5.1.0",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/layouts/dock-manager/overview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"igniteui-webcomponents-core": "5.1.0",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
Expand Down
2 changes: 1 addition & 1 deletion samples/layouts/dock-manager/proximity-dock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.15.2",
"igniteui-dockmanager": "1.16.0-beta.3",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
Expand Down
11 changes: 11 additions & 0 deletions samples/layouts/dock-manager/split-pane-fixed-size/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 250,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": false,
"trailingComma": "none",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"fluid": false
}
56 changes: 56 additions & 0 deletions samples/layouts/dock-manager/split-pane-fixed-size/ReadMe.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<!-- NOTE: do not change this file because it's auto re-generated from template: -->
<!-- https://github.com/IgniteUI/igniteui-wc-examples/tree/vnext/templates/browser/sample/ReadMe.md -->

This folder contains implementation of Web Components application with example of Split Pane Fixed Size feature using [Dock Manager](https://infragistics.com/webcomponentssite/components/general-getting-started.html) component.


<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<body>
<a target="_blank" href="https://infragistics.com/webcomponentssite/components/general-getting-started.html" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem" alt="View Docs" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-docs.png"/>
</a>
<a target="_blank" href="./src/index.ts" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="View Code" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-code.png"/>
</a>
<a target="_blank" href="https://www.infragistics.com/webcomponents-demos/samples/layouts/dock-manager/split-pane-fixed-size" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-run.png"/>
</a>
<a target="_blank" href="https://codesandbox.io/s/github/IgniteUI/igniteui-wc-examples/tree/master/samples/layouts/dock-manager/split-pane-fixed-size?fontsize=14&hidenavigation=1&theme=dark&view=preview&file=/src/{SampleFile}" rel="noopener noreferrer">
<img height="40px" style="border-radius: 0rem; max-width: 100%;" alt="Run Sample" src="https://github.com/IgniteUI/igniteui-blazor-examples/raw/vnext/templates/sample/images/button-sandbox.png"/>
</a>
</body>
</html>

## Branches

> **_NOTE:_** You should use [master](https://github.com/IgniteUI/igniteui-angular-examples/tree/master) branch of this repository if you want to run samples on your computer. Use the [vnext](https://github.com/IgniteUI/igniteui-angular-examples/tree/vnext) branch only when you want to contribute new samples to this repository.
## Instructions

To set up this project locally, execute these commands:

```
git clone https://github.com/IgniteUI/igniteui-wc-examples.git
git checkout master
cd ./igniteui-wc-examples
cd ./samples/layouts/dock-manager/split-pane-fixed-size
```

open above folder in VS Code or type:
```
code .
```

In terminal window, run:

```
npm install
npm run start
```

Then open http://localhost:4200/ in your browser


## Learn More

To learn more about **Ignite UI for Web Components**, check out the [Web Components documentation](https://infragistics.com/webcomponentssite/components/general-getting-started.html).
30 changes: 30 additions & 0 deletions samples/layouts/dock-manager/split-pane-fixed-size/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html>
<head>
<title>DockManagerSplitPaneFixedSize</title>
<meta charset="UTF-8" />

<link rel="shortcut icon" href="https://static.infragistics.com/xplatform/images/browsers/wc.png" >
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Kanit&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium Web" />
<link rel="stylesheet" href="https://static.infragistics.com/xplatform/css/samples/shared.v8.css" type="text/css" />
</head>

<body>
<div id="root">
<div class="container sample">
<igc-dockmanager id="dockManager">
<div slot="content1">Content 1</div>
<div slot="content2">Content 2</div>
<div slot="content3">Content 3</div>
<div slot="content4">Content 4</div>
<div slot="content5">Content 5</div>
</igc-dockmanager>
</div>
</div>

<!-- This script is needed only for parcel and it will be excluded for webpack -->
<% if (false) { %><script src="src/index.ts"></script><% } %>
</body>
</html>
58 changes: 58 additions & 0 deletions samples/layouts/dock-manager/split-pane-fixed-size/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"name": "wc-dock-manager-split-pane-fixed-size",
"version": "1.0.0",
"description": "This project provides example of Dock Manager Split Pane Fixed Size using IgniteUI for Web Components",
"main": "src/index.ts",
"scripts": {
"build": "npm run build:prod",
"build:dev": "webpack --mode development --config ./webpack.config.js --progress --color --display-error-details",
"build:prod": "webpack --env.NODE_ENV=production --mode production --config ./webpack.config.js --progress --color --display-error-details --bail",
"serve:dev": "node --max-old-space-size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --mode development --config ./webpack.config.js --hot --progress --open",
"serve:prod": "webpack-dev-server --env.NODE_ENV=production --mode production --config ./webpack.config.js --port 3000 --host 0.0.0.0 --hot --progress --open --content-base dist/",
"start": "npm run serve:dev",
"build:legacy": "npm run build:prod:legacy",
"build:dev:legacy": "webpack --env.legacy=true --mode development --config ./webpack.config.js --progress --color --display-error-details",
"build:prod:legacy": "webpack --env.NODE_ENV=production --env.legacy=true --mode production --config ./webpack.config.js --progress --color --display-error-details --bail",
"serve:dev:legacy": "node --max-old-space-size=8192 node_modules/webpack-dev-server/bin/webpack-dev-server.js --env.legacy=true --mode development --config ./webpack.config.js --hot --progress --open",
"serve:prod:legacy": "webpack-dev-server --env.NODE_ENV=production --env.legacy=true --mode production --config ./webpack.config.js --port 3000 --host 0.0.0.0 --hot --progress --open --content-base dist/",
"start:legacy": "npm run serve:dev:legacy"
},
"author": "Infragistics",
"dependencies": {
"@webcomponents/custom-elements": "^1.4.1",
"@webcomponents/template": "^1.4.2",
"babel-runtime": "^6.26.0",
"core-js": "^3.6.5",
"igniteui-dockmanager": "1.16.0-beta.3",
"lit-html": "^3.2.0",
"tslib": "^2.0.0"
},
"devDependencies": {
"@babel/cli": "^7.8.3",
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.10.0",
"@babel/preset-env": "^7.8.3",
"@babel/preset-typescript": "^7.8.3",
"@types/source-map": "^0.5.7",
"babel-loader": "^8.1.0",
"babel-plugin-transform-custom-element-classes": "^0.1.0",
"css-loader": "^1.0.0",
"csv-loader": "^3.0.2",
"file-loader": "^4.2.0",
"fork-ts-checker-webpack-plugin": "^4.1.5",
"html-webpack-plugin": "^4.3.0",
"parcel-bundler": "^1.6.1",
"source-map": "^0.7.3",
"style-loader": "^0.22.1",
"tsconfig-paths-webpack-plugin": "^4.0.0",
"typescript": "^4.4.4",
"webpack": "^5.96.1",
"webpack-cli": "^4.10.0",
"webpack-dev-server": "^4.11.1",
"worker-loader": "^3.0.8",
"xml-loader": "^1.2.1"
},
"license": "",
"homepage": "."
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"infiniteLoopProtection": false,
"hardReloadOnChange": false,
"view": "browser",
"template": "parcel"
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

igc-dockmanager > div {
padding: 0.5rem;
height: calc(100% - 1rem);
width: calc(100% - 1rem);
display: flex;
flex-direction: column;
/* background: orange; */
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* shared styles are loaded from: */
/* https://static.infragistics.com/xplatform/css/samples */
83 changes: 83 additions & 0 deletions samples/layouts/dock-manager/split-pane-fixed-size/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import './DockManagerStyles.css'
import { defineCustomElements } from 'igniteui-dockmanager/loader';
import {
IgcDockManagerPaneType,
IgcSplitPaneOrientation,
IgcDockManagerComponent
} from 'igniteui-dockmanager';

defineCustomElements();

export class DockManagerSplitPaneFixedSize {
private dockManager: IgcDockManagerComponent;

constructor() {
this.dockManager = document.getElementById('dockManager') as IgcDockManagerComponent;
this.dockManager.dir = 'ltr';

this.dockManager.layout = {
rootPane: {
type: IgcDockManagerPaneType.splitPane,
orientation: IgcSplitPaneOrientation.vertical,
panes: [
{
type: IgcDockManagerPaneType.splitPane,
orientation: IgcSplitPaneOrientation.horizontal,
panes: [
{
type: IgcDockManagerPaneType.contentPane,
contentId: 'content1',
header: 'Pane 1',
size: 400 // Size will be relative to siblings
},
{
type: IgcDockManagerPaneType.contentPane,
contentId: 'content2',
header: 'Pane 2',
size: 200 // Size will be relative to siblings
}
]
},
{
type: IgcDockManagerPaneType.splitPane,
orientation: IgcSplitPaneOrientation.horizontal,
useFixedSize: true,
panes: [
{
type: IgcDockManagerPaneType.contentPane,
contentId: 'content3',
header: 'Pane 3',
size: 400 // Size will be applied in pixels
},
{
type: IgcDockManagerPaneType.contentPane,
contentId: 'content4',
header: 'Pane 4',
size: 200 // Size will be applied in pixels
}
]
}
]
},
floatingPanes: [
{
type: IgcDockManagerPaneType.splitPane,
orientation: IgcSplitPaneOrientation.horizontal,
floatingLocation: { x: 700, y: 350 },
floatingWidth: 250,
floatingHeight: 150,
panes: [
{
type: IgcDockManagerPaneType.contentPane,
contentId: "content5",
header: "Content Pane 5",
size: 800
}
]
}
]
};
}
}

new DockManagerSplitPaneFixedSize();
Loading

0 comments on commit 4e398c8

Please sign in to comment.