This repository has been archived by the owner on Dec 8, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved flyout demo & show iterator (#2239)
* added rough draft of iterator demo * updated to utilize highlightedRowId * updated demo to use rowHighlightedId * new demo * removed comments * PR feedback * style fix * pr feedback
- Loading branch information
1 parent
619e6af
commit 79a78c4
Showing
8 changed files
with
361 additions
and
122 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,7 @@ | ||
export class FlyoutDemoContext { | ||
public id: number; | ||
public name: string; | ||
public constituentCode: string; | ||
public latestGift: number; | ||
public status: string; | ||
} |
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,23 @@ | ||
import { | ||
Component | ||
} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'sky-flyout-demo-internal', | ||
template: ` | ||
<div | ||
class="sky-padding-even-large" | ||
> | ||
<h2>Sample flyout</h2> | ||
<p>Flyouts can display large quantities of supplementary information related to a task, including:</p> | ||
<ul> | ||
<li><a href="https://developer.blackbaud.com/skyux/components/list">lists</a></li> | ||
<li>record views</li> | ||
<li>analytics</li> | ||
<li>other information</li> | ||
</ul> | ||
</div> | ||
` | ||
}) | ||
export class SkyFlyoutDemoInternalSimpleComponent { | ||
} |
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 |
---|---|---|
@@ -1,30 +1,39 @@ | ||
<sky-page-summary> | ||
<sky-page-summary-alert> | ||
<sky-alert | ||
alertType="info"> | ||
The internal flyout content is dynamic! | ||
</sky-alert> | ||
</sky-page-summary-alert> | ||
<sky-page-summary-image> | ||
<sky-avatar | ||
[name]="context.name" | ||
[canChange]="false"> | ||
> | ||
</sky-avatar> | ||
</sky-page-summary-image> | ||
<sky-page-summary-title> | ||
{{context.name}} | ||
</sky-page-summary-title> | ||
<sky-page-summary-subtitle> | ||
Board member | ||
{{context.constituentCode}} | ||
</sky-page-summary-subtitle> | ||
<sky-page-summary-status> | ||
<sky-label | ||
labelType="success"> | ||
Fundraiser | ||
labelType="{{ context.status === 'Past due' ? 'danger' : 'success' }}" | ||
> | ||
{{ context.status }} | ||
</sky-label> | ||
<sky-label>Inactive</sky-label> | ||
</sky-page-summary-status> | ||
<sky-page-summary-content> | ||
This is the arbitrary content section. | ||
<h2> | ||
Constiuent Summary | ||
</h2> | ||
<p> | ||
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quis quae mollitia rem obcaecati. Aspernatur vitae iusto cum corporis adipisci corrupti dolore odit a impedit enim. Porro ab exercitationem quidem? Maiores! | ||
</p> | ||
</sky-page-summary-content> | ||
<sky-page-summary-key-info> | ||
<sky-key-info> | ||
<sky-key-info-value> | ||
{{ context.latestGift }} | ||
</sky-key-info-value> | ||
<sky-key-info-label> | ||
Latest gift | ||
</sky-key-info-label> | ||
</sky-key-info> | ||
</sky-page-summary-key-info> | ||
</sky-page-summary> |
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 |
---|---|---|
@@ -1,72 +1,123 @@ | ||
<sky-list | ||
[data]="users" | ||
[defaultView]="grid"> | ||
<sky-list-view-grid #grid> | ||
<sky-grid-column | ||
[locked]="true" | ||
[template]="customTemplate"> | ||
</sky-grid-column> | ||
<sky-grid-column | ||
field="name" | ||
heading="Name" | ||
[locked]="true"> | ||
</sky-grid-column> | ||
</sky-list-view-grid> | ||
</sky-list> | ||
<h2 | ||
class="sky-section-heading" | ||
> | ||
Basic flyout | ||
</h2> | ||
|
||
<ng-template | ||
let-row="row" | ||
#customTemplate> | ||
<p> | ||
<button | ||
class="sky-btn sky-btn-default" | ||
type="button" | ||
class="sky-btn sky-btn-link" | ||
(click)="openRecord(row)"> | ||
View record | ||
(click)="openSimpleFlyout()" | ||
> | ||
Standard width | ||
</button> | ||
|
||
<button | ||
*ngIf="isRecordOpen(row)" | ||
type="button" | ||
class="sky-btn sky-btn-default" | ||
title="Close record" | ||
(click)="closeFlyout()"> | ||
<sky-icon icon="close"></sky-icon> | ||
type="button" | ||
(click)="openFlyoutWithCutsomWidth()" | ||
> | ||
Custom width | ||
</button> | ||
</ng-template> | ||
</p> | ||
|
||
<div *ngIf="flyout"> | ||
<p> | ||
This button will close the flyout and then delete the host element from the document. | ||
</p> | ||
<h2 | ||
class="sky-section-heading" | ||
> | ||
Flyout with customized headers | ||
</h2> | ||
|
||
<p> | ||
<button | ||
class="sky-btn sky-btn-default" | ||
type="button" | ||
(click)="openFlyoutWithUrlPermalink()" | ||
> | ||
URL permalink | ||
</button> | ||
|
||
<button | ||
class="sky-btn sky-btn-default" | ||
(click)="removeFlyout()"> | ||
<sky-icon icon="trash"></sky-icon> | ||
Delete flyout | ||
type="button" | ||
(click)="openFlyoutWithRoutePermalink()" | ||
> | ||
Angular routing permalink | ||
</button> | ||
</div> | ||
|
||
<div> | ||
<p> | ||
The following button will open a flyout with a URL permalink in the header. | ||
</p> | ||
<button | ||
class="sky-btn sky-btn-default" | ||
type="button" | ||
(click)="openFlyoutWithIterators()" | ||
> | ||
Iterators | ||
</button> | ||
</p> | ||
|
||
<h2 | ||
class="sky-section-heading" | ||
> | ||
Close the flyout programmatically | ||
</h2> | ||
|
||
<p> | ||
<button | ||
class="sky-btn sky-btn-default" | ||
(click)="openFlyoutWithUrlPermalink()"> | ||
Open flyout with a URL permalink | ||
type="button" | ||
[disabled]="!flyout" | ||
(click)="closeAndRemoveFlyout()" | ||
> | ||
Close | ||
</button> | ||
</div> | ||
</p> | ||
|
||
<div> | ||
<p> | ||
The following button will open a flyout with a button which invokes a custom action callback in the header. | ||
</p> | ||
<h2 | ||
class="sky-section-heading" | ||
> | ||
Grid with flyout | ||
</h2> | ||
|
||
<sky-list | ||
[data]="users" | ||
[defaultView]="grid" | ||
> | ||
<sky-list-view-grid | ||
[rowHighlightedId]="rowHighlightedId" | ||
#grid | ||
> | ||
<sky-grid-column | ||
field="name" | ||
heading="Name" | ||
[template]="customTemplate" | ||
> | ||
</sky-grid-column> | ||
<sky-grid-column | ||
field="constituentCode" | ||
heading="Constituent code" | ||
> | ||
</sky-grid-column> | ||
<sky-grid-column | ||
field="latestGift" | ||
heading="Latest gift" | ||
> | ||
</sky-grid-column> | ||
<sky-grid-column | ||
field="status" | ||
heading="Status" | ||
> | ||
</sky-grid-column> | ||
</sky-list-view-grid> | ||
</sky-list> | ||
|
||
<ng-template | ||
let-row="row" | ||
#customTemplate | ||
> | ||
<button | ||
class="sky-btn sky-btn-link" | ||
type="button" | ||
class="sky-btn sky-btn-default" | ||
(click)="openFlyoutWithPrimaryAction()"> | ||
Open flyout with a primary action | ||
(click)="onNameClick(row)" | ||
> | ||
{{ row.name }} | ||
</button> | ||
</div> | ||
</ng-template> |
Oops, something went wrong.