-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): added examples for list and tree (#UIM-261, #UIM-270) (#352)
- Loading branch information
1 parent
8cd752b
commit 22c19db
Showing
29 changed files
with
942 additions
and
96 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
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
1 change: 1 addition & 0 deletions
1
...ges/mosaic-examples/mosaic/list/list-multiple-checkbox/list-multiple-checkbox-example.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 @@ | ||
/** No CSS for this example */ |
16 changes: 16 additions & 0 deletions
16
...es/mosaic-examples/mosaic/list/list-multiple-checkbox/list-multiple-checkbox-example.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,16 @@ | ||
<mc-list-selection | ||
multiple="checkbox" | ||
[(ngModel)]="selected"> | ||
<mc-list-option value="Item 1" disabled>Item 1</mc-list-option> | ||
<mc-list-option value="Item 2">Item 2</mc-list-option> | ||
<mc-list-option value="Item 3">Item 3</mc-list-option> | ||
<mc-list-option value="Item 4">Item 4</mc-list-option> | ||
<mc-list-option value="Item 5">Item 5</mc-list-option> | ||
<mc-list-option value="Item 6">Item 6</mc-list-option> | ||
<mc-list-option value="Item 7">Item 7</mc-list-option> | ||
<mc-list-option value="Item 8">Item 8</mc-list-option> | ||
<mc-list-option value="Item 9">Item 9</mc-list-option> | ||
<mc-list-option value="Item 10">Item 10</mc-list-option> | ||
</mc-list-selection> | ||
<br> | ||
<div>Selected: {{ selected }}</div> |
14 changes: 14 additions & 0 deletions
14
...ages/mosaic-examples/mosaic/list/list-multiple-checkbox/list-multiple-checkbox-example.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,14 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
|
||
/** | ||
* @title Basic list | ||
*/ | ||
@Component({ | ||
selector: 'list-multiple-checkbox-example', | ||
templateUrl: 'list-multiple-checkbox-example.html', | ||
styleUrls: ['list-multiple-checkbox-example.css'] | ||
}) | ||
export class ListMultipleCheckboxExample { | ||
selected = []; | ||
} |
1 change: 1 addition & 0 deletions
1
...ges/mosaic-examples/mosaic/list/list-multiple-keyboard/list-multiple-keyboard-example.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 @@ | ||
/** No CSS for this example */ |
16 changes: 16 additions & 0 deletions
16
...es/mosaic-examples/mosaic/list/list-multiple-keyboard/list-multiple-keyboard-example.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,16 @@ | ||
<mc-list-selection | ||
multiple="keyboard" | ||
[(ngModel)]="selected"> | ||
<mc-list-option value="Item 1" disabled>Item 1</mc-list-option> | ||
<mc-list-option value="Item 2">Item 2</mc-list-option> | ||
<mc-list-option value="Item 3">Item 3</mc-list-option> | ||
<mc-list-option value="Item 4">Item 4</mc-list-option> | ||
<mc-list-option value="Item 5">Item 5</mc-list-option> | ||
<mc-list-option value="Item 6">Item 6</mc-list-option> | ||
<mc-list-option value="Item 7">Item 7</mc-list-option> | ||
<mc-list-option value="Item 8">Item 8</mc-list-option> | ||
<mc-list-option value="Item 9">Item 9</mc-list-option> | ||
<mc-list-option value="Item 10">Item 10</mc-list-option> | ||
</mc-list-selection> | ||
<br> | ||
<div>Selected: {{ selected }}</div> |
14 changes: 14 additions & 0 deletions
14
...ages/mosaic-examples/mosaic/list/list-multiple-keyboard/list-multiple-keyboard-example.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,14 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
|
||
/** | ||
* @title Basic list | ||
*/ | ||
@Component({ | ||
selector: 'list-multiple-keyboard-example', | ||
templateUrl: 'list-multiple-keyboard-example.html', | ||
styleUrls: ['list-multiple-keyboard-example.css'] | ||
}) | ||
export class ListMultipleKeyboardExample { | ||
selected = []; | ||
} |
1 change: 1 addition & 0 deletions
1
packages/mosaic-examples/mosaic/list/list-overview/list-overview-example.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 @@ | ||
/** No CSS for this example */ |
15 changes: 15 additions & 0 deletions
15
packages/mosaic-examples/mosaic/list/list-overview/list-overview-example.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,15 @@ | ||
<mc-list-selection | ||
[(ngModel)]="selected"> | ||
<mc-list-option value="Item 1" disabled>Item 1</mc-list-option> | ||
<mc-list-option value="Item 2">Item 2</mc-list-option> | ||
<mc-list-option value="Item 3">Item 3</mc-list-option> | ||
<mc-list-option value="Item 4">Item 4</mc-list-option> | ||
<mc-list-option value="Item 5">Item 5</mc-list-option> | ||
<mc-list-option value="Item 6">Item 6</mc-list-option> | ||
<mc-list-option value="Item 7">Item 7</mc-list-option> | ||
<mc-list-option value="Item 8">Item 8</mc-list-option> | ||
<mc-list-option value="Item 9">Item 9</mc-list-option> | ||
<mc-list-option value="Item 10">Item 10</mc-list-option> | ||
</mc-list-selection> | ||
<br> | ||
<div>Selected: {{ selected }}</div> |
14 changes: 14 additions & 0 deletions
14
packages/mosaic-examples/mosaic/list/list-overview/list-overview-example.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,14 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
|
||
/** | ||
* @title Basic list | ||
*/ | ||
@Component({ | ||
selector: 'list-overview-example', | ||
templateUrl: 'list-overview-example.html', | ||
styleUrls: ['list-overview-example.css'] | ||
}) | ||
export class ListOverviewExample { | ||
selected = []; | ||
} |
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,24 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { McListModule } from '@ptsecurity/mosaic/list'; | ||
|
||
import { ListMultipleCheckboxExample } from './list-multiple-checkbox/list-multiple-checkbox-example'; | ||
import { ListMultipleKeyboardExample } from './list-multiple-keyboard/list-multiple-keyboard-example'; | ||
import { ListOverviewExample } from './list-overview/list-overview-example'; | ||
|
||
|
||
const EXAMPLES = [ | ||
ListOverviewExample, | ||
ListMultipleCheckboxExample, | ||
ListMultipleKeyboardExample | ||
]; | ||
|
||
@NgModule({ | ||
imports: [ | ||
FormsModule, | ||
McListModule | ||
], | ||
declarations: EXAMPLES, | ||
exports: EXAMPLES | ||
}) | ||
export class ListExamplesModule {} |
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,34 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { McHighlightModule } from '@ptsecurity/mosaic/core'; | ||
import { McFormFieldModule } from '@ptsecurity/mosaic/form-field'; | ||
import { McIconModule } from '@ptsecurity/mosaic/icon'; | ||
import { McInputModule } from '@ptsecurity/mosaic/input'; | ||
import { McTreeModule } from '@ptsecurity/mosaic/tree'; | ||
|
||
import { TreeFilteringExample } from './tree-filtering/tree-filtering-example'; | ||
import { TreeMultipleCheckboxExample } from './tree-multiple-checkbox/tree-multiple-checkbox-example'; | ||
import { TreeMultipleKeyboardExample } from './tree-multiple-keyboard/tree-multiple-keyboard-example'; | ||
import { TreeOverviewExample } from './tree-overview/tree-overview-example'; | ||
|
||
|
||
const EXAMPLES = [ | ||
TreeOverviewExample, | ||
TreeMultipleCheckboxExample, | ||
TreeMultipleKeyboardExample, | ||
TreeFilteringExample | ||
]; | ||
|
||
@NgModule({ | ||
imports: [ | ||
FormsModule, | ||
McFormFieldModule, | ||
McInputModule, | ||
McTreeModule, | ||
McIconModule, | ||
McHighlightModule | ||
], | ||
declarations: EXAMPLES, | ||
exports: EXAMPLES | ||
}) | ||
export class TreeExamplesModule {} |
1 change: 1 addition & 0 deletions
1
packages/mosaic-examples/mosaic/tree/tree-filtering/tree-filtering-example.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 @@ | ||
/** No CSS for this example */ |
21 changes: 21 additions & 0 deletions
21
packages/mosaic-examples/mosaic/tree/tree-filtering/tree-filtering-example.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,21 @@ | ||
<mc-form-field> | ||
<input type="text" mcInput (ngModelChange)="onFilterChange($event)" [(ngModel)]="filterValue"> | ||
</mc-form-field> | ||
|
||
<br><br><br> | ||
|
||
<mc-tree-selection | ||
[(ngModel)]="modelValue" | ||
[dataSource]="dataSource" | ||
[treeControl]="treeControl"> | ||
|
||
<mc-tree-option *mcTreeNodeDef="let node" mcTreeNodePadding [disabled]="node.name === 'tests'"> | ||
<span [innerHTML]="treeControl.getViewValue(node) | mcHighlight : treeControl.filterValue.value"></span> | ||
</mc-tree-option> | ||
|
||
<mc-tree-option *mcTreeNodeDef="let node; when: hasChild" mcTreeNodePadding> | ||
<mc-tree-node-toggle [node]="node"></mc-tree-node-toggle> | ||
|
||
<span [innerHTML]="treeControl.getViewValue(node) | mcHighlight : treeControl.filterValue.value"></span> | ||
</mc-tree-option> | ||
</mc-tree-selection> |
Oops, something went wrong.