-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
302 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,4 +20,5 @@ | |
* | ||
*/ | ||
|
||
export * from './heat-map'; | ||
export * from './heat-map-module'; |
37 changes: 37 additions & 0 deletions
37
projects/core/reports/src/interface/widgets-instances/heat-map-widget-instance.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,37 @@ | ||
/** | ||
* @license | ||
* Copyright (C) Gnucoop soc. coop. | ||
* | ||
* This file is part of the Advanced JSON forms (ajf). | ||
* | ||
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Advanced JSON forms (ajf). | ||
* If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
import {AjfHeatMapFeatureCollection} from '@ajf/core/heat-map'; | ||
|
||
import {AjfHeatMapWidget} from '../widgets/heat-map-widget'; | ||
import {AjfBaseWidgetInstance} from './base-widget-instance'; | ||
|
||
export interface AjfHeatMapWidgetInstance extends AjfBaseWidgetInstance { | ||
widget: AjfHeatMapWidget; | ||
idProp: string; | ||
features: AjfHeatMapFeatureCollection; | ||
values: number[]; | ||
startColor: string; | ||
endColor: string; | ||
highlightColor: string; | ||
showVisualMap: boolean; | ||
} |
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
37 changes: 37 additions & 0 deletions
37
projects/core/reports/src/interface/widgets/heat-map-widget.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,37 @@ | ||
/** | ||
* @license | ||
* Copyright (C) Gnucoop soc. coop. | ||
* | ||
* This file is part of the Advanced JSON forms (ajf). | ||
* | ||
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Advanced JSON forms (ajf). | ||
* If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
import {AjfHeatMapFeatureCollection} from '@ajf/core/heat-map'; | ||
|
||
import {AjfBaseWidget} from './base-widget'; | ||
import {AjfWidgetType} from './widget-type'; | ||
|
||
export interface AjfHeatMapWidget extends AjfBaseWidget { | ||
widgetType: AjfWidgetType.HeatMap; | ||
idProp?: string; | ||
features: AjfHeatMapFeatureCollection | string; | ||
values: string | number[]; | ||
startColor?: string; | ||
endColor?: string; | ||
highlightColor?: string; | ||
showVisualMap?: boolean; | ||
} |
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 |
---|---|---|
|
@@ -36,5 +36,6 @@ export enum AjfWidgetType { | |
Graph, | ||
PaginatedList, | ||
Dialog, | ||
HeatMap, | ||
LENGTH, | ||
} |
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
31 changes: 31 additions & 0 deletions
31
projects/core/reports/src/utils/widgets-instances/is-heat-map-widget-instance.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,31 @@ | ||
/** | ||
* @license | ||
* Copyright (C) Gnucoop soc. coop. | ||
* | ||
* This file is part of the Advanced JSON forms (ajf). | ||
* | ||
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Advanced JSON forms (ajf). | ||
* If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
import {AjfHeatMapWidgetInstance} from '../../interface/widgets-instances/heat-map-widget-instance'; | ||
import {AjfWidgetInstance} from '../../interface/widgets-instances/widget-instance'; | ||
import {isHeatMapWidget} from '../widgets/is-heat-map-widget'; | ||
|
||
export const isHeatMapWidgetInstance = ( | ||
instance: AjfWidgetInstance, | ||
): instance is AjfHeatMapWidgetInstance => { | ||
return instance != null && isHeatMapWidget(instance.widget); | ||
}; |
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
29 changes: 29 additions & 0 deletions
29
projects/core/reports/src/utils/widgets/is-heat-map-widget.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,29 @@ | ||
/** | ||
* @license | ||
* Copyright (C) Gnucoop soc. coop. | ||
* | ||
* This file is part of the Advanced JSON forms (ajf). | ||
* | ||
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Advanced JSON forms (ajf). | ||
* If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
import {AjfHeatMapWidget} from '../../interface/widgets/heat-map-widget'; | ||
import {AjfWidget} from '../../interface/widgets/widget'; | ||
import {AjfWidgetType} from '../../interface/widgets/widget-type'; | ||
|
||
export const isHeatMapWidget = (widget: AjfWidget): widget is AjfHeatMapWidget => { | ||
return widget != null && widget.widgetType === AjfWidgetType.HeatMap; | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<ajf-heat-map *ngIf="instance" | ||
[idProp]="instance.idProp" | ||
[features]="instance.features" | ||
[values]="instance.values" | ||
[startColor]="instance.startColor" | ||
[endColor]="instance.endColor" | ||
[highlightColor]="instance.highlightColor" | ||
[showVisualMap]="instance.showVisualMap"></ajf-heat-map> |
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,6 @@ | ||
ajf-widget { | ||
ajf-heat-map { | ||
flex: 1; | ||
height: 100%; | ||
} | ||
} |
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,42 @@ | ||
/** | ||
* @license | ||
* Copyright (C) Gnucoop soc. coop. | ||
* | ||
* This file is part of the Advanced JSON forms (ajf). | ||
* | ||
* Advanced JSON forms (ajf) is free software: you can redistribute it and/or | ||
* modify it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the License, | ||
* or (at your option) any later version. | ||
* | ||
* Advanced JSON forms (ajf) is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero | ||
* General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with Advanced JSON forms (ajf). | ||
* If not, see http://www.gnu.org/licenses/. | ||
* | ||
*/ | ||
|
||
import {AjfBaseWidgetComponent, AjfHeatMapWidgetInstance} from '@ajf/core/reports'; | ||
import { | ||
ChangeDetectionStrategy, | ||
ChangeDetectorRef, | ||
Component, | ||
ElementRef, | ||
ViewEncapsulation, | ||
} from '@angular/core'; | ||
|
||
@Component({ | ||
templateUrl: 'heat-map-widget.html', | ||
styleUrls: ['heat-map-widget.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush, | ||
encapsulation: ViewEncapsulation.None, | ||
}) | ||
export class AjfHeatMapWidgetComponent extends AjfBaseWidgetComponent<AjfHeatMapWidgetInstance> { | ||
constructor(cdr: ChangeDetectorRef, el: ElementRef) { | ||
super(cdr, el); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<ajf-heat-map *ngIf="instance" | ||
[idProp]="instance.idProp" | ||
[features]="instance.features" | ||
[values]="instance.values" | ||
[startColor]="instance.startColor" | ||
[endColor]="instance.endColor" | ||
[highlightColor]="instance.highlightColor" | ||
[showVisualMap]="instance.showVisualMap"></ajf-heat-map> |
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,6 @@ | ||
ajf-widget { | ||
ajf-heat-map { | ||
flex: 1; | ||
height: 100%; | ||
} | ||
} |
Oops, something went wrong.