@energycap/components 0.45.2-multi-select-component.20260305-1130 → 0.46.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.
Files changed (60) hide show
  1. package/README.md +188 -188
  2. package/fesm2022/energycap-components.mjs +106 -106
  3. package/fesm2022/energycap-components.mjs.map +1 -1
  4. package/package.json +1 -1
  5. package/schematics/collection.json +4 -4
  6. package/src/assets/images/favicon-ech.svg +14 -14
  7. package/src/assets/images/favicon-esa.svg +6 -6
  8. package/src/assets/images/favicon-eum.svg +13 -13
  9. package/src/assets/images/favicon-whitelabel.svg +4 -4
  10. package/src/assets/images/favicon.svg +12 -12
  11. package/src/assets/images/icon-carbonhub.svg +10 -10
  12. package/src/assets/images/icon-eum.svg +5 -5
  13. package/src/assets/images/icon-ucp.svg +12 -12
  14. package/src/assets/images/icon-wattics.svg +5 -5
  15. package/src/assets/images/icon.svg +11 -11
  16. package/src/assets/images/logo.svg +10 -10
  17. package/src/assets/images/splash-electric.svg +3 -3
  18. package/src/assets/images/splash-interval.svg +3 -3
  19. package/src/assets/images/splash-seedling.svg +11 -11
  20. package/src/assets/images/splash-water.svg +3 -3
  21. package/src/assets/locales/en_US.json +65 -65
  22. package/src/assets/scripts/unsupported-browser.js +17 -17
  23. package/src/styles/_base.scss +38 -38
  24. package/src/styles/_colors.scss +96 -96
  25. package/src/styles/_core.scss +3 -3
  26. package/src/styles/_functions.scss +114 -114
  27. package/src/styles/_global-variables.scss +230 -230
  28. package/src/styles/_icons.scss +23 -23
  29. package/src/styles/bootstrap/_grid.scss +33 -33
  30. package/src/styles/bootstrap/_reboot.scss +322 -322
  31. package/src/styles/components/_badge.scss +14 -14
  32. package/src/styles/components/_card.scss +21 -21
  33. package/src/styles/components/_link-icons.scss +37 -37
  34. package/src/styles/components/_splash.scss +188 -188
  35. package/src/styles/components/_tag.scss +22 -22
  36. package/src/styles/components/_unsupported-browsers.scss +23 -23
  37. package/src/styles/email/_email-base.scss +227 -227
  38. package/src/styles/email/email.scss +42 -42
  39. package/src/styles/index.scss +29 -29
  40. package/src/styles/mixins/_animations.scss +17 -17
  41. package/src/styles/mixins/_button-base.scss +206 -206
  42. package/src/styles/mixins/_card-base.scss +40 -40
  43. package/src/styles/mixins/_common.scss +51 -51
  44. package/src/styles/mixins/_dialog-base.scss +95 -95
  45. package/src/styles/mixins/_form-control-base.scss +674 -674
  46. package/src/styles/mixins/_login.scss +74 -74
  47. package/src/styles/mixins/_menu-base.scss +153 -153
  48. package/src/styles/mixins/_overlay-base.scss +32 -32
  49. package/src/styles/mixins/_resizable-base.scss +57 -57
  50. package/src/styles/mixins/_spinner-base.scss +34 -34
  51. package/src/styles/mixins/_table-base.scss +297 -297
  52. package/src/styles/mixins/_tabs-base.scss +146 -146
  53. package/src/styles/mixins/_tags-base.scss +125 -125
  54. package/src/styles/mixins/_text.scss +89 -89
  55. package/src/styles/mixins.scss +14 -14
  56. package/src/styles/utilities/_borders.scss +29 -29
  57. package/src/styles/utilities/_common.scss +49 -49
  58. package/src/styles/utilities/_layout.scss +115 -115
  59. package/src/styles/utilities/_spacing.scss +64 -64
  60. package/src/styles/utilities/_text.scss +139 -139
package/README.md CHANGED
@@ -1,189 +1,189 @@
1
- # EnergyCAP Components
2
- A collection of common components used in EnergyCAP's Angular applications.
3
-
4
- ## Install
5
- ```bash
6
- npm install @energycap/components
7
- ```
8
-
9
- ## Usage
10
- Import library into the root ngModule of your application
11
- ```js
12
- @import {ComponentsModule} from '@energycap/components'
13
-
14
- @NgModule({
15
- imports: [
16
- ComponentsModule
17
- ]
18
- })
19
- export class AppModule {}
20
- ```
21
-
22
- ---
23
-
24
- ## Logo Assets Setup
25
- The AppBarComponent includes an app icon image with a default path of '/assets/images/icon.svg'. You can either copy the assets that come bundled with the library:
26
- ```js
27
- // angular.json
28
- "build": {
29
- // ...
30
- "options": {
31
- // ...
32
- "assets": [
33
- // ...
34
- {
35
- "glob": "**/*",
36
- "input": "./node_modules/@energycap/components/src/assets/images",
37
- "output": "./assets/images"
38
- }
39
- ]
40
- }
41
- }
42
- ```
43
- or customize the path by passing a value to the `[iconPath]` input on the `<ec-app-bar>` component.
44
- ```html
45
- <ec-app-bar iconPath="path/to/my/icon.svg">
46
- ```
47
- Note: This can also be a fully qualified URL like: https://cdn.freebiesupply.com/images/large/2x/apple-logo-transparent.png.
48
-
49
- ---
50
- ## Logo Assets Setup
51
- The AppBarComponent includes an app icon image with a default path of '/assets/images/icon.svg'. You can either copy the assets that come bundled with the library:
52
- ```js
53
- // angular.json
54
- "build": {
55
- // ...
56
- "options": {
57
- // ...
58
- "assets": [
59
- // ...
60
- {
61
- "glob": "**/*",
62
- "input": "./node_modules/@energycap/components/assets/images",
63
- "output": "./assets/images"
64
- }
65
- ]
66
- }
67
- }
68
- ```
69
- or customize the path by passing a value to the `[iconPath]` input on the `<ec-app-bar>` component.
70
- ```html
71
- <ec-app-bar iconPath="path/to/my/icon.svg">
72
- ```
73
- Note: This can also be a fully qualified URL like: https://cdn.freebiesupply.com/images/large/2x/apple-logo-transparent.png.
74
- ---
75
- ## Form Control Validation Messages Setup
76
- This library provides helpful validation messages for the components. We have provided default messages which should be fine for most users, however they do require a bit of extra setup.
77
-
78
- The following is the recommended process for an Angular application:
79
-
80
- ### 1. Update `angular.json`
81
- The validation messages are provided in a file called `en_US.json` that ships with this library. The easiest way to make them available to your Angular application is to add the following to `angular.json`:
82
-
83
- ```js
84
- // ...
85
- "build": {
86
- // ...
87
- "options": {
88
- // ...
89
- "assets": [
90
- // ...
91
- {
92
- "glob": "**/*.json",
93
- "input": "./node_modules/@energycap/components/src/assets/locales",
94
- "output": "./assets/locales/"
95
- }
96
- ]
97
- }
98
- }
99
- ```
100
-
101
- ### 2. Install an Http Loader
102
- There is already a peer dependency on [@ngx-translate], which is the mechanism we use to provide the validation messages, so our recommendation is to use their [http-loader].
103
-
104
- _Note: This library does not support translation to any language other than English at this time._
105
-
106
- ```
107
- npm install @ngx-translate/http-loader --save
108
- ```
109
-
110
- ### 3. Update AppModule
111
- Update your `app.module.ts` to use the http-loader:
112
-
113
- ```js
114
- import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
115
- import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
116
- import { TranslateHttpLoader } from '@ngx-translate/http-loader';
117
- //...
118
- export function HttpLoaderFactory(http: HttpClient) {
119
- return new TranslateHttpLoader(http, "/assets/locales/");
120
- }
121
-
122
- @NgModule({
123
- imports: [
124
- TranslateModule.forRoot({
125
- loader: {
126
- provide: TranslateLoader,
127
- useFactory: HttpLoaderFactory,
128
- deps: [HttpClient]
129
- }
130
- })
131
- ],
132
- providers: [provideHttpClient(withInterceptorsFromDi())]
133
- ```
134
-
135
- ### 4. Update AppComponent
136
- Update your `app.component.ts`:
137
-
138
- ```js
139
- import { TranslateService } from '@ngx-translate/core';
140
-
141
- constructor(private translate: TranslateService) {
142
- translate.setDefaultLang('en_US');
143
- translate.use('en_US');
144
- }
145
- ```
146
-
147
- That's it!
148
-
149
- ---
150
-
151
- ## Icons
152
- This library uses icons from @energycap/energycap-icons package, which is listed as a peer dependency. Refer to their [documentation](https://www.npmjs.com/package/@energycap/energycap-icons) for configuring the *webfont* implementation.
153
-
154
- ---
155
-
156
- ## Unsupported Browsers
157
- This library does not support Internet Explorer. We've provided a helpful script that will mask the screen when a user attempts to use an
158
- application built with this library. To add this feature to your application, add the `unsupported-browser.js` script to the scripts array in the `angular.json` file.
159
-
160
- ```js
161
- // ...
162
- "build": {
163
- // ...
164
- "options": {
165
- // ...
166
- "scripts": [
167
- "./node_modules/@energycap/components/src/assets/scripts/unsupported-browser.js"
168
- ]
169
- }
170
- }
171
- ```
172
-
173
- ---
174
-
175
- ## More Info
176
- For a list of available components and their usage:
177
- 1. Pull the [energycap-libs repo]
178
- 2. Run:
179
- ```
180
- npm install
181
- npm start
182
- ```
183
- 3. Navigate to http://localhost:4200/
184
-
185
-
186
-
187
- [@ngx-translate]: https://github.com/ngx-translate/core
188
- [http-loader]: https://github.com/ngx-translate/http-loader
1
+ # EnergyCAP Components
2
+ A collection of common components used in EnergyCAP's Angular applications.
3
+
4
+ ## Install
5
+ ```bash
6
+ npm install @energycap/components
7
+ ```
8
+
9
+ ## Usage
10
+ Import library into the root ngModule of your application
11
+ ```js
12
+ @import {ComponentsModule} from '@energycap/components'
13
+
14
+ @NgModule({
15
+ imports: [
16
+ ComponentsModule
17
+ ]
18
+ })
19
+ export class AppModule {}
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Logo Assets Setup
25
+ The AppBarComponent includes an app icon image with a default path of '/assets/images/icon.svg'. You can either copy the assets that come bundled with the library:
26
+ ```js
27
+ // angular.json
28
+ "build": {
29
+ // ...
30
+ "options": {
31
+ // ...
32
+ "assets": [
33
+ // ...
34
+ {
35
+ "glob": "**/*",
36
+ "input": "./node_modules/@energycap/components/src/assets/images",
37
+ "output": "./assets/images"
38
+ }
39
+ ]
40
+ }
41
+ }
42
+ ```
43
+ or customize the path by passing a value to the `[iconPath]` input on the `<ec-app-bar>` component.
44
+ ```html
45
+ <ec-app-bar iconPath="path/to/my/icon.svg">
46
+ ```
47
+ Note: This can also be a fully qualified URL like: https://cdn.freebiesupply.com/images/large/2x/apple-logo-transparent.png.
48
+
49
+ ---
50
+ ## Logo Assets Setup
51
+ The AppBarComponent includes an app icon image with a default path of '/assets/images/icon.svg'. You can either copy the assets that come bundled with the library:
52
+ ```js
53
+ // angular.json
54
+ "build": {
55
+ // ...
56
+ "options": {
57
+ // ...
58
+ "assets": [
59
+ // ...
60
+ {
61
+ "glob": "**/*",
62
+ "input": "./node_modules/@energycap/components/assets/images",
63
+ "output": "./assets/images"
64
+ }
65
+ ]
66
+ }
67
+ }
68
+ ```
69
+ or customize the path by passing a value to the `[iconPath]` input on the `<ec-app-bar>` component.
70
+ ```html
71
+ <ec-app-bar iconPath="path/to/my/icon.svg">
72
+ ```
73
+ Note: This can also be a fully qualified URL like: https://cdn.freebiesupply.com/images/large/2x/apple-logo-transparent.png.
74
+ ---
75
+ ## Form Control Validation Messages Setup
76
+ This library provides helpful validation messages for the components. We have provided default messages which should be fine for most users, however they do require a bit of extra setup.
77
+
78
+ The following is the recommended process for an Angular application:
79
+
80
+ ### 1. Update `angular.json`
81
+ The validation messages are provided in a file called `en_US.json` that ships with this library. The easiest way to make them available to your Angular application is to add the following to `angular.json`:
82
+
83
+ ```js
84
+ // ...
85
+ "build": {
86
+ // ...
87
+ "options": {
88
+ // ...
89
+ "assets": [
90
+ // ...
91
+ {
92
+ "glob": "**/*.json",
93
+ "input": "./node_modules/@energycap/components/src/assets/locales",
94
+ "output": "./assets/locales/"
95
+ }
96
+ ]
97
+ }
98
+ }
99
+ ```
100
+
101
+ ### 2. Install an Http Loader
102
+ There is already a peer dependency on [@ngx-translate], which is the mechanism we use to provide the validation messages, so our recommendation is to use their [http-loader].
103
+
104
+ _Note: This library does not support translation to any language other than English at this time._
105
+
106
+ ```
107
+ npm install @ngx-translate/http-loader --save
108
+ ```
109
+
110
+ ### 3. Update AppModule
111
+ Update your `app.module.ts` to use the http-loader:
112
+
113
+ ```js
114
+ import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
115
+ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
116
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
117
+ //...
118
+ export function HttpLoaderFactory(http: HttpClient) {
119
+ return new TranslateHttpLoader(http, "/assets/locales/");
120
+ }
121
+
122
+ @NgModule({
123
+ imports: [
124
+ TranslateModule.forRoot({
125
+ loader: {
126
+ provide: TranslateLoader,
127
+ useFactory: HttpLoaderFactory,
128
+ deps: [HttpClient]
129
+ }
130
+ })
131
+ ],
132
+ providers: [provideHttpClient(withInterceptorsFromDi())]
133
+ ```
134
+
135
+ ### 4. Update AppComponent
136
+ Update your `app.component.ts`:
137
+
138
+ ```js
139
+ import { TranslateService } from '@ngx-translate/core';
140
+
141
+ constructor(private translate: TranslateService) {
142
+ translate.setDefaultLang('en_US');
143
+ translate.use('en_US');
144
+ }
145
+ ```
146
+
147
+ That's it!
148
+
149
+ ---
150
+
151
+ ## Icons
152
+ This library uses icons from @energycap/energycap-icons package, which is listed as a peer dependency. Refer to their [documentation](https://www.npmjs.com/package/@energycap/energycap-icons) for configuring the *webfont* implementation.
153
+
154
+ ---
155
+
156
+ ## Unsupported Browsers
157
+ This library does not support Internet Explorer. We've provided a helpful script that will mask the screen when a user attempts to use an
158
+ application built with this library. To add this feature to your application, add the `unsupported-browser.js` script to the scripts array in the `angular.json` file.
159
+
160
+ ```js
161
+ // ...
162
+ "build": {
163
+ // ...
164
+ "options": {
165
+ // ...
166
+ "scripts": [
167
+ "./node_modules/@energycap/components/src/assets/scripts/unsupported-browser.js"
168
+ ]
169
+ }
170
+ }
171
+ ```
172
+
173
+ ---
174
+
175
+ ## More Info
176
+ For a list of available components and their usage:
177
+ 1. Pull the [energycap-libs repo]
178
+ 2. Run:
179
+ ```
180
+ npm install
181
+ npm start
182
+ ```
183
+ 3. Navigate to http://localhost:4200/
184
+
185
+
186
+
187
+ [@ngx-translate]: https://github.com/ngx-translate/core
188
+ [http-loader]: https://github.com/ngx-translate/http-loader
189
189
  [energycap-libs repo]: https://bitbucket.org/energycap/energycap-libs/src/master/