@bcgov/nr-ngx-component-lib 0.0.1

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 (82) hide show
  1. package/components/button/button.component.d.ts +22 -0
  2. package/components/cell-content/cell-content.component.d.ts +12 -0
  3. package/components/device-view/device-view.component.d.ts +12 -0
  4. package/components/expansion-panel/expansion-panel.component.d.ts +26 -0
  5. package/components/filter-container/filter-container.component.d.ts +7 -0
  6. package/components/filter-date/filter-date.component.d.ts +12 -0
  7. package/components/filter-search/filter-search.component.d.ts +18 -0
  8. package/components/filter-select/filter-select.component.d.ts +63 -0
  9. package/components/filters-panel/filters-panel.component.d.ts +13 -0
  10. package/components/form-field/form-field.component.d.ts +13 -0
  11. package/components/form-layout/form-layout.component.d.ts +5 -0
  12. package/components/gap/gap.component.d.ts +9 -0
  13. package/components/page-container/page-container.component.d.ts +5 -0
  14. package/components/page-header/page-header.component.d.ts +6 -0
  15. package/components/row-list-desktop/row-list-desktop.component.d.ts +5 -0
  16. package/components/row-list-mobile/row-list-mobile.component.d.ts +5 -0
  17. package/components/row-list-pagination/row-list-pagination.component.d.ts +31 -0
  18. package/components/row-list-sorting/row-list-sorting.component.d.ts +18 -0
  19. package/components/snackbar/snackbar.component.d.ts +15 -0
  20. package/directives/configuration-subscriber.base.d.ts +14 -0
  21. package/directives/row-list.base.d.ts +55 -0
  22. package/esm2022/bcgov-nr-ngx-component-lib.mjs +5 -0
  23. package/esm2022/components/button/button.component.mjs +69 -0
  24. package/esm2022/components/cell-content/cell-content.component.mjs +34 -0
  25. package/esm2022/components/device-view/device-view.component.mjs +34 -0
  26. package/esm2022/components/expansion-panel/expansion-panel.component.mjs +144 -0
  27. package/esm2022/components/filter-container/filter-container.component.mjs +20 -0
  28. package/esm2022/components/filter-date/filter-date.component.mjs +43 -0
  29. package/esm2022/components/filter-search/filter-search.component.mjs +52 -0
  30. package/esm2022/components/filter-select/filter-select.component.mjs +269 -0
  31. package/esm2022/components/filters-panel/filters-panel.component.mjs +39 -0
  32. package/esm2022/components/form-field/form-field.component.mjs +103 -0
  33. package/esm2022/components/form-layout/form-layout.component.mjs +11 -0
  34. package/esm2022/components/gap/gap.component.mjs +21 -0
  35. package/esm2022/components/page-container/page-container.component.mjs +11 -0
  36. package/esm2022/components/page-header/page-header.component.mjs +19 -0
  37. package/esm2022/components/row-list-desktop/row-list-desktop.component.mjs +11 -0
  38. package/esm2022/components/row-list-mobile/row-list-mobile.component.mjs +11 -0
  39. package/esm2022/components/row-list-pagination/row-list-pagination.component.mjs +106 -0
  40. package/esm2022/components/row-list-sorting/row-list-sorting.component.mjs +44 -0
  41. package/esm2022/components/snackbar/snackbar.component.mjs +26 -0
  42. package/esm2022/directives/configuration-subscriber.base.mjs +28 -0
  43. package/esm2022/directives/row-list.base.mjs +150 -0
  44. package/esm2022/nr-ngx-component-lib.module.mjs +227 -0
  45. package/esm2022/public-api.mjs +33 -0
  46. package/esm2022/services/configuration.service.mjs +38 -0
  47. package/esm2022/services/page-state.service.mjs +28 -0
  48. package/esm2022/services/snackbar-util.service.mjs +69 -0
  49. package/esm2022/utils/code-table.util.mjs +23 -0
  50. package/esm2022/utils/date.util.mjs +15 -0
  51. package/esm2022/utils/filter.util.mjs +25 -0
  52. package/esm2022/utils/row-list.util.mjs +44 -0
  53. package/fesm2022/bcgov-nr-ngx-component-lib.mjs +1617 -0
  54. package/fesm2022/bcgov-nr-ngx-component-lib.mjs.map +1 -0
  55. package/index.d.ts +5 -0
  56. package/nr-ngx-component-lib.module.d.ts +46 -0
  57. package/package.json +22 -0
  58. package/public-api.d.ts +29 -0
  59. package/services/configuration.service.d.ts +16 -0
  60. package/services/page-state.service.d.ts +9 -0
  61. package/services/snackbar-util.service.d.ts +16 -0
  62. package/styles/bc-sans/FONTLOG_README.txt +30 -0
  63. package/styles/bc-sans/LICENSE_OFL.txt +94 -0
  64. package/styles/bc-sans/css/BCSans.css +28 -0
  65. package/styles/bc-sans/fonts/BCSans-Bold.woff +0 -0
  66. package/styles/bc-sans/fonts/BCSans-Bold.woff2 +0 -0
  67. package/styles/bc-sans/fonts/BCSans-BoldItalic.woff +0 -0
  68. package/styles/bc-sans/fonts/BCSans-BoldItalic.woff2 +0 -0
  69. package/styles/bc-sans/fonts/BCSans-Italic.woff +0 -0
  70. package/styles/bc-sans/fonts/BCSans-Italic.woff2 +0 -0
  71. package/styles/bc-sans/fonts/BCSans-Regular.woff +0 -0
  72. package/styles/bc-sans/fonts/BCSans-Regular.woff2 +0 -0
  73. package/styles/global.scss +34 -0
  74. package/styles/include/mat-button.scss +71 -0
  75. package/styles/include/mat-checkbox.scss +44 -0
  76. package/styles/include/mat-icon.scss +30 -0
  77. package/styles/include/mat-radio-button.scss +19 -0
  78. package/styles/material.scss +40 -0
  79. package/utils/code-table.util.d.ts +12 -0
  80. package/utils/date.util.d.ts +14 -0
  81. package/utils/filter.util.d.ts +4 -0
  82. package/utils/row-list.util.d.ts +16 -0
@@ -0,0 +1,28 @@
1
+ @font-face {
2
+ font-family: "BCSans";
3
+ font-style: normal;
4
+ src: url("../fonts/BCSans-Regular.woff2") format("woff2"), /* Optimized for very modern browsers */
5
+ url("../fonts/BCSans-Regular.woff") format("woff"); /* Modern Browsers */
6
+ }
7
+
8
+ @font-face {
9
+ font-family: "BCSans";
10
+ font-style: italic;
11
+ src: url("../fonts/BCSans-Italic.woff2") format("woff2"), /* Optimized for very modern browsers */
12
+ url("../fonts/BCSans-Italic.woff") format("woff"); /* Modern Browsers */
13
+ }
14
+
15
+ @font-face {
16
+ font-family: "BCSans";
17
+ font-weight: 700;
18
+ src: url("../fonts/BCSans-Bold.woff2") format("woff2"), /* Optimized for very modern browsers */
19
+ url("../fonts/BCSans-Bold.woff") format("woff"); /* Modern Browsers */
20
+ }
21
+
22
+ @font-face {
23
+ font-family: "BCSans";
24
+ font-style: italic;
25
+ font-weight: 700;
26
+ src: url("../fonts/BCSans-BoldItalic.woff2") format("woff2"), /* Optimized for very modern browsers */
27
+ url("../fonts/BCSans-BoldItalic.woff") format("woff"); /* Modern Browsers */
28
+ }
@@ -0,0 +1,34 @@
1
+ :root {
2
+ --nrcl-font-family: BCSans,Noto Sans,Verdana,Arial,sans-serif;
3
+ --nrcl-font-size: 15px;
4
+ --nrcl-font-size-h1: 35px;
5
+ --nrcl-font-size-h2: 22px;
6
+ --nrcl-font-size-h3: 18px;
7
+ --nrcl-font-size-small: 12px;
8
+ --nrcl-border-radius: 5px;
9
+
10
+ --nrcl-filter-width-default: 150px;
11
+ --nrcl-filter-height-default: 40px;
12
+
13
+ --nrcl-icon-size: 24px;
14
+
15
+ // desktop
16
+ --nrcl-device-desktop-gutter-space: 16px;
17
+ --nrcl-device-desktop-form-layout-columns: 4;
18
+
19
+ //mobile
20
+ --nrcl-device-mobile-gutter-space: 8px;
21
+ --nrcl-device-mobile-form-layout-columns: 2;
22
+ }
23
+
24
+ html {
25
+ .nrcl-device-desktop {
26
+ --nrcl-gutter-space: var( --nrcl-device-desktop-gutter-space );
27
+ --nrcl-form-layout-columns: var( --nrcl-device-desktop-form-layout-columns );
28
+ }
29
+
30
+ .nrcl-device-mobile {
31
+ --nrcl-gutter-space: var( --nrcl-device-mobile-gutter-space );
32
+ --nrcl-form-layout-columns: var( --nrcl-device-mobile-form-layout-columns );
33
+ }
34
+ }
@@ -0,0 +1,71 @@
1
+ button {
2
+ &.mat-mdc-fab,
3
+ &.mat-mdc-raised-button,
4
+ &.mat-mdc-button,
5
+ &.mat-mdc-raised-button,
6
+ &.mat-mdc-icon-button,
7
+ &.mat-mdc-outlined-button,
8
+ &.mat-mdc-unelevated-button,
9
+ &.mat-mdc-fab,
10
+ &.mat-mdc-mini-fab .mat-mdc-menu-item {
11
+ font-family: var( --nrcl-font-family );
12
+ font-size: var( --nrcl-font-size );
13
+ white-space: nowrap;
14
+ font-weight: 500;
15
+
16
+ &[disabled] {
17
+ border: 1px solid #d7d7d7 !important;
18
+ }
19
+ }
20
+ }
21
+
22
+ button.primary {
23
+ &.mat-mdc-fab,
24
+ &.mat-mdc-raised-button,
25
+ &.mat-mdc-button,
26
+ &.mat-mdc-raised-button,
27
+ &.mat-mdc-icon-button,
28
+ &.mat-mdc-outlined-button,
29
+ &.mat-mdc-unelevated-button,
30
+ &.mat-mdc-fab,
31
+ &.mat-mdc-mini-fab .mat-mdc-menu-item {
32
+ &:not([disabled]) {
33
+ background-color: var( --nrcl-button-primary-background-color );
34
+ color: var( --nrcl-button-primary-foreground-color );
35
+
36
+ &.intermediate-action {
37
+ background-color: #2E7940;
38
+ }
39
+
40
+ &:hover {
41
+ background-color: var( --nrcl-button-primary-hover-background-color );
42
+ }
43
+ }
44
+ }
45
+ }
46
+
47
+ button.mat-mdc-fab,
48
+ button.mat-mdc-raised-button {
49
+ background-color: #AAAAAA;
50
+ color: white;
51
+ font-family: var( --nrcl-font-family );
52
+ font-size: var( --nrcl-font-size );
53
+ box-shadow: none !important;
54
+ border: 1px solid #003366;
55
+
56
+ &:not([class*=mat-elevation-z]) {
57
+ box-shadow: 0px 3px 1px -2px rgba(0, 0, 0, 0.2),
58
+ 0px 2px 2px 0px rgba(0, 0, 0, 0.14),
59
+ 0px 1px 5px 0px rgba(0, 0, 0, 0.12) !important;
60
+ }
61
+ }
62
+
63
+ button.mdc-button.right-side-icon {
64
+ display: flex;
65
+
66
+ mat-icon {
67
+ order: 1;
68
+ margin-left: 8px;
69
+ margin-right: -4px;
70
+ }
71
+ }
@@ -0,0 +1,44 @@
1
+ mat-checkbox.mat-mdc-checkbox.mat-accent,
2
+ mat-selection-list .mat-mdc-list-option {
3
+ font-family: var( --nrcl-font-family );
4
+ font-size: var( --nrcl-font-size );
5
+
6
+ .mdc-checkbox {
7
+ padding-left: 0;
8
+ padding-right: 0;
9
+
10
+ .mdc-checkbox__native-control {
11
+ & ~ .mdc-checkbox__background {
12
+ left: 0;
13
+ border: 1px solid #c6c8cb;
14
+ }
15
+ }
16
+
17
+ .mdc-checkbox__native-control:enabled {
18
+ & ~ .mdc-checkbox__background {
19
+ background-color: white;
20
+ }
21
+ }
22
+
23
+ &:hover .mdc-checkbox__native-control:not([disabled])~.mdc-checkbox__ripple,
24
+ .mat-mdc-checkbox-ripple,
25
+ .mdc-checkbox__ripple {
26
+ position: absolute;
27
+ top: 50%;
28
+ height: 48px;
29
+ left: 50%;
30
+ width: 48px;
31
+ transform: translate(-50%, -50%);
32
+ }
33
+ }
34
+ }
35
+
36
+ .table-search-header {
37
+ .search-and-filters {
38
+ .field.filter-checkbox-group {
39
+ .checkbox-group {
40
+ gap: 15px;
41
+ }
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,30 @@
1
+ .material-icons {
2
+ font-family: 'Material Symbols Outlined';
3
+ font-feature-settings: 'liga';
4
+ }
5
+
6
+ .mat-icon {
7
+ width: var( --nrcl-icon-size );
8
+ height: var( --nrcl-icon-size );
9
+ font-size: var( --nrcl-icon-size );
10
+ line-height: var( --nrcl-icon-size );
11
+ }
12
+
13
+ button {
14
+ &.mat-mdc-fab,
15
+ &.mat-mdc-raised-button,
16
+ &.mat-mdc-button,
17
+ &.mat-mdc-raised-button,
18
+ &.mat-mdc-icon-button,
19
+ &.mat-mdc-outlined-button,
20
+ &.mat-mdc-unelevated-button,
21
+ &.mat-mdc-fab,
22
+ &.mat-mdc-mini-fab .mat-mdc-menu-item {
23
+ > .mat-icon {
24
+ width: var( --nrcl-icon-size );
25
+ height: var( --nrcl-icon-size );
26
+ font-size: var( --nrcl-icon-size );
27
+ line-height: var( --nrcl-icon-size );
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,19 @@
1
+ .mat-mdc-radio-button.mat-accent {
2
+ --mdc-radio-selected-focus-icon-color: #003366;
3
+ --mdc-radio-selected-hover-icon-color: #003366;
4
+ --mdc-radio-selected-icon-color: #003366;
5
+ --mdc-radio-selected-pressed-icon-color: #003366;
6
+ --mat-mdc-radio-checked-ripple-color: #003366;
7
+
8
+ .mdc-form-field {
9
+ .mdc-radio {
10
+ .mdc-radio__native-control:enabled + .mdc-radio__background {
11
+ .mdc-radio__outer-circle {
12
+ background-color: white;
13
+ }
14
+ .mdc-radio__inner-circle {
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,40 @@
1
+ // Custom Theming for Angular Material
2
+ // For more information: https://material.angular.io/guide/theming
3
+ @use '@angular/material' as mat;
4
+ // Plus imports for other components in your app.
5
+
6
+ // Include the common styles for Angular Material. We include this here so that you only
7
+ // have to load a single css file for Angular Material in your app.
8
+ // Be sure that you only ever include this mixin once!
9
+ @include mat.core();
10
+
11
+ // Define the palettes for your theme using the Material Design palettes available in palette.scss
12
+ // (imported above). For each palette, you can optionally specify a default, lighter, and darker
13
+ // hue. Available color palettes: https://material.io/design/color/
14
+ $theme-primary: mat.m2-define-palette(mat.$m2-blue-gray-palette, A400, 500, 900);
15
+ $theme-accent: mat.m2-define-palette(mat.$m2-orange-palette, A200, A100, A400);
16
+
17
+ // The warn palette is optional (defaults to red).
18
+ $theme-warn: mat.m2-define-palette(mat.$m2-red-palette);
19
+
20
+ // Create the theme object. A theme consists of configurations for individual
21
+ // theming systems such as "color" or "typography".
22
+ $theme: mat.m2-define-light-theme((
23
+ color: (
24
+ primary: $theme-primary,
25
+ accent: $theme-accent,
26
+ warn: $theme-warn,
27
+ ),
28
+ typography: mat.m2-define-typography-config(
29
+ $body-1: mat.m2-define-typography-level( 16px, 24px, 500, 'BCSans', 'normal' ),
30
+ $body-2: mat.m2-define-typography-level( 15px, 24px, 200, 'BCSans', 'normal' ),
31
+ $headline-5: mat.m2-define-typography-level( 20px, 32px, 700, 'BCSans', 'normal' ),
32
+ $headline-6: mat.m2-define-typography-level( 20px, 32px, 700, 'BCSans', 'normal' ),
33
+ $button: mat.m2-define-typography-level( 15px, 24px, 700, 'BCSans', 'normal' ),
34
+ ),
35
+ ));
36
+
37
+ // Include theme styles for core and each component used in your app.
38
+ // Alternatively, you can import and @include the theme mixins for each component
39
+ // that you are using.
40
+ @include mat.all-component-themes($theme);
@@ -0,0 +1,12 @@
1
+ export type CodeDescription = {
2
+ code: string;
3
+ description: string;
4
+ };
5
+ export declare class CodeTable {
6
+ private _items;
7
+ private _reload?;
8
+ constructor(_items: (CodeDescription)[], _reload?: () => Promise<CodeDescription[]>);
9
+ get items(): readonly CodeDescription[];
10
+ forCode(code: string): CodeDescription;
11
+ reload(): Promise<void>;
12
+ }
@@ -0,0 +1,14 @@
1
+ export declare const DATE_FORMATS: {
2
+ fullPickerInput: string;
3
+ datePickerInput: string;
4
+ timePickerInput: string;
5
+ monthYearLabel: string;
6
+ dateA11yLabel: string;
7
+ monthYearA11yLabel: string;
8
+ simplifiedDate: string;
9
+ simplifiedMonthDate: string;
10
+ fullPickerInputWithSlash: string;
11
+ API_DATE: string;
12
+ API_TIMESTAMP: string;
13
+ API_TIMESTAMP_WITH_SEP: string;
14
+ };
@@ -0,0 +1,4 @@
1
+ import { CodeDescription } from "./code-table.util";
2
+ export declare function wrapFilterValue(val: any): any[];
3
+ export declare function unwrapFilterValue(val: any): any;
4
+ export declare function mapToCodeDescription(list: Array<any>, codeField: string, descriptionField: string): CodeDescription[];
@@ -0,0 +1,16 @@
1
+ import { Observable } from "rxjs";
2
+ export declare class Aborted {
3
+ reason: string;
4
+ constructor(reason: string);
5
+ }
6
+ export declare class ObservableAborter<T> {
7
+ private observable;
8
+ private delay;
9
+ private _promise;
10
+ private _abort;
11
+ private _aborted;
12
+ constructor(observable: () => Observable<T>, delay?: number);
13
+ abort(): void;
14
+ get aborted(): boolean;
15
+ get promise(): Promise<T>;
16
+ }