Skip to content

Commit

Permalink
Merge pull request #130 from PioneerCode/feature/add-history-option
Browse files Browse the repository at this point in the history
Add history action to table and update to Angular 8
  • Loading branch information
chad-ramos authored Jun 13, 2019
2 parents 6058dc9 + 664ffba commit 8b80f08
Show file tree
Hide file tree
Showing 29 changed files with 4,284 additions and 4,214 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"pioneercode",
"polyfills",
"prismjs",
"routerlink",
"ryancavanaugh",
"styleext",
"tooltips",
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
<a name="1.0.0"></a>
# [v1.0.0](https://github.com/PioneerCode/pioneer-charts/releases/tag/1.0.0) (2019-06-13)

### Added
- Update to Angular 8, marking a 1.0 release.
- Added onHistoryClicked action to Table.

<a name="0.21.0"></a>
# [v0.21.0](https://github.com/PioneerCode/pioneer-charts/releases/tag/0.21.0) (2019-02-18)

Expand Down
2 changes: 1 addition & 1 deletion apps/dev/src/app/pages/test/test.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { IPcacData } from 'projects/pcac/src/lib/core/public_api';
export class TestComponent {
public showModal = true;

@ViewChild(PcacDialogComponent) dialog: PcacDialogComponent;
@ViewChild(PcacDialogComponent, { static: true }) dialog: PcacDialogComponent;

constructor(public pcService: PcService) { }

Expand Down
3 changes: 2 additions & 1 deletion apps/dev/src/assets/mock/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
"enableStickyHeader": true,
"enableStickyFooter": true,
"hideColumnOne": false,
"enableEditAction": false,
"enableEditAction": true,
"enableHistoryAction": true,
"enableDeleteAction": true,
"data": [
{
Expand Down
5 changes: 2 additions & 3 deletions apps/dev/src/tsconfig.app.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"extends": "../../../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015"
},
"outDir": "../out-tsc/app"
},
"include": [
"**/*.ts"
],
Expand Down
1 change: 0 additions & 1 deletion apps/dev/src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "../out-tsc/spec",
"baseUrl": "./",
"module": "commonjs",
"types": [
"jasmine",
"node"
Expand Down
39 changes: 26 additions & 13 deletions apps/docs/src/app/pages/charts/charts.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,87 +5,100 @@
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Vertical Single: Hide Axis'}"></pcac-header>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartSingleConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartSingleConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Vertical Grouped'}"></pcac-header>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartGroupConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartGroupConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Vertical Stacked'}"></pcac-header>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartStackedConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartStackedConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Vertical Bars'}"></pcac-header>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
<pcac-bar-vertical-chart [config]="pcService.barVerticalChartConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-vertical-chart>
</div>
</div>
</div>
<div class="row pc-row">
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Horizontal Single: Hide Axis & Grid'}"></pcac-header>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartSingleConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartSingleConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Horizontal Group: Color Override & Spread'}"></pcac-header>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartGroupConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartGroupConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Horizontal Stacked'}"></pcac-header>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartStackedConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartStackedConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':' Horizontal Bars'}"></pcac-header>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartConfig" (barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
<pcac-bar-horizontal-chart [config]="pcService.barHorizontalChartConfig"
(barClicked)="pcService.onClicked($event)"></pcac-bar-horizontal-chart>
</div>
</div>
</div>
<div class="row pc-row">
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Line Chart'}"></pcac-header>
<pcac-line-area-chart [config]="pcService.lineChartConfig" (dotClicked)="pcService.onClicked($event)"></pcac-line-area-chart>
<pcac-line-area-chart [config]="pcService.lineChartConfig" (dotClicked)="pcService.onClicked($event)">
</pcac-line-area-chart>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Area Chart'}"></pcac-header>
<pcac-line-area-chart [config]="pcService.areaChartConfig" (dotClicked)="pcService.onClicked($event)"></pcac-line-area-chart>
<pcac-line-area-chart [config]="pcService.areaChartConfig" (dotClicked)="pcService.onClicked($event)">
</pcac-line-area-chart>
</div>
</div>
</div>
<div class="row pc-row">
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Area Chart: Hide Axis & Grid'}"></pcac-header>
<pcac-line-area-chart [config]="pcService.areaChartHideConfig" (dotClicked)="pcService.onClicked($event)"></pcac-line-area-chart>
<pcac-line-area-chart [config]="pcService.areaChartHideConfig" (dotClicked)="pcService.onClicked($event)">
</pcac-line-area-chart>
</div>
</div>
</div>
<div class="row">
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Table'}"></pcac-header>
<pcac-table [config]="pcService.tableConfig" (deleteClicked)="onDeleteClicked($event)" (editClicked)="onEditClicked($event)"></pcac-table>
<pcac-table [config]="pcService.tableConfig" (deleteClicked)="onDeleteClicked($event)"
(editClicked)="onEditClicked($event)" (historyClicked)="onHistoryClicked($event)"></pcac-table>
</div>
</div>
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Pie Chart'}"></pcac-header>
<pcac-pie-chart [config]="pcService.pieChartConfig" (sliceClicked)="pcService.onClicked($event)"></pcac-pie-chart>
<pcac-pie-chart [config]="pcService.pieChartConfig" (sliceClicked)="pcService.onClicked($event)">
</pcac-pie-chart>
</div>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions apps/docs/src/app/pages/charts/charts.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ export class ChartsComponent {
onDeleteClicked(row: IPcacData): void {
alert("Delete Row");
}

onHistoryClicked(row: IPcacData): void {
alert("Show History");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
<div class="col-sm">
<div class="pc-chart-container">
<pcac-header [config]="{'title':'Table'}"></pcac-header>
<pcac-table [config]="pcService.tableConfig" (deleteClicked)="onDeleteClicked($event)" (editClicked)="onEditClicked($event)"></pcac-table>
<pcac-table [config]="pcService.tableConfig" (deleteClicked)="onDeleteClicked($event)"
(editClicked)="onEditClicked($event)" (historyClicked)="onHistoryClicked($event)"></pcac-table>
</div>
</div>
</div>
</section>
<section class="pc-doc-section">
<section class=" pc-doc-section">
<div class="row">
<div class="col-sm">
<h3>Markup</h3>
Expand Down Expand Up @@ -42,8 +43,8 @@ <h3>API</h3>
<tr>
<td>data</td>
<td>
Collection of <a routerlink="/docs/guides/data-contract" ng-reflect-router-link="/docs/guides/data-contract"
href="/docs/guides/data-contract">IPcacData</a>
Collection of <a routerlink="/docs/guides/data-contract"
ng-reflect-router-link="/docs/guides/data-contract" href="/docs/guides/data-contract">IPcacData</a>
objects.
</td>
</tr>
Expand All @@ -63,6 +64,10 @@ <h3>API</h3>
<td>enableDeleteAction</td>
<td>Show/Hide delete icon in action row. (deleteClicked)</td>
</tr>
<tr>
<td>enableHistoryAction</td>
<td>Show/Hide history icon in action row. (historyClicked)</td>
</tr>
<tr>
<td>hideColumnOne</td>
<td>Often is of value to track an ID that is associated with a row, i.e. record. When that ID is part
Expand Down Expand Up @@ -104,6 +109,15 @@ <h3 id="events">Events</h3>
Associated row data (IPcacData)
</td>
</tr>
<tr>
<td>
historyClicked
</td>
<td>Emitted when "history" icon is clicked inside a row.</td>
<td>
Associated row data (IPcacData)
</td>
</tr>
</tbody>
</table>
</section>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class TableComponent {
level: JumpNavLevel.h2
}
] as IJumpNav[];
markupCode = `<pcac-table [config]="config" (deleteClicked)="onDeleteClicked($event)" (editClicked)="onEditClicked($event)"></pcac-table>`;
markupCode = `<pcac-table [config]="config" (deleteClicked)="onDeleteClicked($event)" (editClicked)="onEditClicked($event)" (historyClicked)="onHistoryClicked($event)"></pcac-table>`;
importCode = `import { PcacTableModule } from '@pioneer-code/pioneer-charts';`;

constructor(public pcService: PcService) { }
Expand All @@ -54,4 +54,8 @@ export class TableComponent {
onDeleteClicked(row: IPcacData): void {
alert("Delete Row");
}

onHistoryClicked(row: IPcacData): void {
alert("Show History");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ onClosed(): void {
}
] as IJumpNav[];

@ViewChild(PcacDialogComponent) dialog: PcacDialogComponent;
@ViewChild(PcacDialogComponent, {static: false}) dialog: PcacDialogComponent;

constructor(public pcService: PcService) { }

Expand Down
1 change: 1 addition & 0 deletions apps/docs/src/assets/mock/table.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"enableStickyFooter": true,
"enableActionRow": true,
"enableEditAction": true,
"enableHistoryAction": true,
"enableDeleteAction": true,
"data": [
{
Expand Down
59 changes: 21 additions & 38 deletions apps/docs/src/polyfills.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,70 +11,53 @@
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
* Learn more in https://angular.io/guide/browser-support
*/

/***************************************************************************************************
* BROWSER POLYFILLS
*/

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
// import 'core-js/es6/symbol';
// import 'core-js/es6/object';
// import 'core-js/es6/function';
// import 'core-js/es6/parse-int';
// import 'core-js/es6/parse-float';
// import 'core-js/es6/number';
// import 'core-js/es6/math';
// import 'core-js/es6/string';
// import 'core-js/es6/date';
// import 'core-js/es6/array';
// import 'core-js/es6/regexp';
// import 'core-js/es6/map';
// import 'core-js/es6/weak-map';
// import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
// import 'core-js/es6/reflect';


/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';


/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
**/
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.

/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/

// (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
// (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
// (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames

/*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*/
// (window as any).__Zone_enable_cross_context_check = true;

/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.



/***************************************************************************************************
* APPLICATION IMPORTS
*/
1 change: 0 additions & 1 deletion apps/docs/src/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../../../tsconfig.node.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"types": []
},
"exclude": [
Expand Down
1 change: 0 additions & 1 deletion apps/docs/src/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/spec",
"module": "commonjs",
"types": [
"jasmine",
"node"
Expand Down
12 changes: 12 additions & 0 deletions browserslist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
not IE 9-11 # For IE 9-11 support, remove 'not'.
Loading

0 comments on commit 8b80f08

Please sign in to comment.