-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(dock-manager): add split pane fixed size sample
- Loading branch information
1 parent
a9120e0
commit 4e398c8
Showing
25 changed files
with
399 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
samples/layouts/dock-manager/split-pane-fixed-size/.prettierrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
56
samples/layouts/dock-manager/split-pane-fixed-size/ReadMe.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
30
samples/layouts/dock-manager/split-pane-fixed-size/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
58
samples/layouts/dock-manager/split-pane-fixed-size/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": "." | ||
} |
7 changes: 7 additions & 0 deletions
7
samples/layouts/dock-manager/split-pane-fixed-size/sandbox.config.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"infiniteLoopProtection": false, | ||
"hardReloadOnChange": false, | ||
"view": "browser", | ||
"template": "parcel" | ||
} | ||
|
9 changes: 9 additions & 0 deletions
9
samples/layouts/dock-manager/split-pane-fixed-size/src/DockManagerStyles.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; */ | ||
} |
2 changes: 2 additions & 0 deletions
2
samples/layouts/dock-manager/split-pane-fixed-size/src/index.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
83
samples/layouts/dock-manager/split-pane-fixed-size/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
Oops, something went wrong.