@eo4geo/ngx-bok-visualization 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,133 @@
1
+ # bok-visualization
2
+
3
+ `bok-visualization` is an Angular library designed to facilitate the visualisation of the SpaceSUITE Body of Knowledge thanks to **D3.js** and **PrimeNG**. It offers a resusable and configurable component according to the user's needs that allows an easy integration in Angular applications.
4
+
5
+ ## Installation
6
+
7
+ First, install the library in your Angular project:
8
+
9
+ ```bash
10
+ npm install bok-visualization
11
+ ```
12
+
13
+ Make sure the required dependencies are installed in your project, as `bok-visualization` lists them as peerDependencies.
14
+
15
+ ## Configuration
16
+
17
+ ### Styling Configuration
18
+
19
+ To configure the colours to be used by the component, go to the file ‘src/styles.css’ and set the following variables. Additionally we can define the font and font colour of the project:
20
+
21
+ ```css
22
+ :root {
23
+ --primary-color: #0e145d;
24
+ --secondary-color: #3fb3f8;
25
+ --hover-color: #f46524;
26
+ --danger-color: #ce3a41;
27
+ --warning-color: #ffd400;
28
+ }
29
+
30
+ body {
31
+ color: var(--primary-color);
32
+ font-family: 'Poppins', sans-serif;
33
+ }
34
+ ```
35
+
36
+ ## PrimeNG Setup in main.ts
37
+
38
+ In your `main.ts` file, add the **PrimeNG** and **Angular animations** setup:
39
+
40
+ ```typescript
41
+ import { bootstrapApplication } from '@angular/platform-browser';
42
+ import { provideAnimationsAsync } from '@angular/platform-browser/animations/async';
43
+ import { providePrimeNG } from 'primeng/config';
44
+ import Aura from '@primeng/themes/aura';
45
+ import { AppComponent } from './app/app.component';
46
+
47
+ bootstrapApplication(AppComponent, {
48
+ providers: [
49
+ provideAnimationsAsync(),
50
+ providePrimeNG({
51
+ theme: {
52
+ preset: Aura,
53
+ options: {
54
+ prefix: 'p',
55
+ darkModeSelector: false,
56
+ cssLayer: false
57
+ }
58
+ }
59
+ })
60
+ ]
61
+ });
62
+ ```
63
+
64
+ ## Using the Library
65
+
66
+ Once installed and configured, you can begin using the components from the library in your Angular application.
67
+
68
+ ### Example Usage
69
+
70
+ ```typescript
71
+ import { Component } from '@angular/core';
72
+ import { BokComponent } from 'bok-visualization';
73
+
74
+ @Component({
75
+ selector: 'app-my-component',
76
+ template: `
77
+ <h1>Body of Knowledge</h1>
78
+ <bok-visualization [(selectedConcept)]="concept" [showDescription]="true" [showVersion]="true" [showSearchEngine]="true"></bok-visualization>
79
+ `
80
+ })
81
+ export class MyComponent {
82
+ concept: string = 'GIST';
83
+ }
84
+
85
+ ```
86
+
87
+ ### Inputs & Outputs
88
+
89
+ #### `[selectedConcept]` (Two-way binding)
90
+
91
+ - **Type**: `string`
92
+ - **Default Value**: 'GIST'
93
+ - **Description**: Represents the currently selected concept. This input allows you to bind a variable to track or modify the selected concept. The component will update the bound variable whenever the selected concept changes.
94
+
95
+ #### `[showDescription]`
96
+
97
+ - **Type**: boolean
98
+ - **Default Value**: `true`
99
+ - **Description**: Determines whether the component displays a description for the selected concept. If `true`, a detailed description section will be rendered.
100
+
101
+ #### `[showVersion]`
102
+
103
+ - **Type**: boolean
104
+ - **Default Value**: `true`
105
+ - **Description**: Indicates if the component should display a list of versions of the Body of Knowledge. When set to `true`, the list appears and allow the user to change the version.
106
+
107
+ #### `[showSearchEngine]`
108
+
109
+ - **Type**: boolean
110
+ - **Default Value**: `true`
111
+ - **Description**: Controls the visibility of the search engine functionality within the component. If `true`, a search engine interface will be displayed, allowing users to search for concepts
112
+
113
+ ## Dependencies
114
+
115
+ `bok-visualization` requires the following dependencies to be installed in your project:
116
+
117
+ - **Angular**: Version 19.1.x
118
+ - **primeng**: Version 19.0.x
119
+ - **d3**: Version 7.9.x
120
+ - **primeflex**: Version 3.3.x
121
+ - **primeicons**: Version 7.0.x
122
+
123
+ ### Installation
124
+
125
+ To install the dependencies, run the following command:
126
+
127
+ ```bash
128
+ npm install d3@^7.9.0 primeflex@^3.3.0 primeicons@^7.0.0 primeng@^19.0.0
129
+ ```
130
+
131
+ ## License
132
+
133
+ This library is licensed under the **MIT** License.
@@ -0,0 +1,3 @@
1
+ export declare const environment: {
2
+ URL_ARRAY: string[];
3
+ };