@hmcts/opal-frontend-common 0.0.24 → 0.0.26

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 (30) hide show
  1. package/components/custom/custom-horizontal-scroll-pane/index.d.ts +8 -0
  2. package/components/custom/custom-scrollable-panes/custom-scrollable-panes-inner-pane/index.d.ts +10 -0
  3. package/components/custom/custom-scrollable-panes/index.d.ts +9 -0
  4. package/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-inner-pane/index.d.ts +10 -0
  5. package/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-outer-pane/index.d.ts +9 -0
  6. package/components/custom/custom-vertical-scroll-pane/index.d.ts +8 -0
  7. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +18 -0
  8. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs.map +1 -0
  9. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +28 -0
  10. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs.map +1 -0
  11. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +22 -0
  12. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs.map +1 -0
  13. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +28 -0
  14. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs.map +1 -0
  15. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +22 -0
  16. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs.map +1 -0
  17. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +18 -0
  18. package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs.map +1 -0
  19. package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs +30 -0
  20. package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs.map +1 -0
  21. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service-constants.mjs +11 -0
  22. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service-constants.mjs.map +1 -0
  23. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +14 -6
  24. package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs.map +1 -1
  25. package/package.json +41 -1
  26. package/pipes/national-insurance/index.d.ts +10 -0
  27. package/services/transformation-service/constants/index.d.ts +5 -0
  28. package/services/transformation-service/interfaces/index.d.ts +11 -3
  29. package/styles/custom/_custom-scrollable-panes.scss +7 -0
  30. package/styles/styles.scss +1 -0
@@ -0,0 +1,8 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomHorizontalScrollPaneComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomHorizontalScrollPaneComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomHorizontalScrollPaneComponent, "opal-lib-custom-horizontal-scroll-pane", never, {}, {}, never, ["*"], true, never>;
6
+ }
7
+
8
+ export { CustomHorizontalScrollPaneComponent };
@@ -0,0 +1,10 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomScrollablePanesInnerPaneComponent {
4
+ stickyHeadersEnabled: boolean;
5
+ maxHeight: string;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomScrollablePanesInnerPaneComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomScrollablePanesInnerPaneComponent, "opal-lib-custom-scrollable-panes-inner-pane", never, { "stickyHeadersEnabled": { "alias": "stickyHeadersEnabled"; "required": false; }; "maxHeight": { "alias": "maxHeight"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
9
+
10
+ export { CustomScrollablePanesInnerPaneComponent };
@@ -0,0 +1,9 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomScrollablePanesComponent {
4
+ height: string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomScrollablePanesComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomScrollablePanesComponent, "opal-lib-custom-scrollable-panes", never, { "height": { "alias": "height"; "required": false; }; }, {}, never, ["*"], true, never>;
7
+ }
8
+
9
+ export { CustomScrollablePanesComponent };
@@ -0,0 +1,10 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomVerticalScrollPaneInnerPaneComponent {
4
+ maxHeight: string;
5
+ stickyHeadersEnabled: boolean;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomVerticalScrollPaneInnerPaneComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomVerticalScrollPaneInnerPaneComponent, "opal-lib-custom-vertical-scroll-pane-inner-pane", never, { "maxHeight": { "alias": "maxHeight"; "required": false; }; "stickyHeadersEnabled": { "alias": "stickyHeadersEnabled"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
9
+
10
+ export { CustomVerticalScrollPaneInnerPaneComponent };
@@ -0,0 +1,9 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomVerticalScrollPaneOuterPaneComponent {
4
+ height: string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomVerticalScrollPaneOuterPaneComponent, never>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomVerticalScrollPaneOuterPaneComponent, "opal-lib-custom-vertical-scroll-pane-outer-pane", never, { "height": { "alias": "height"; "required": false; }; }, {}, never, ["*"], true, never>;
7
+ }
8
+
9
+ export { CustomVerticalScrollPaneOuterPaneComponent };
@@ -0,0 +1,8 @@
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class CustomVerticalScrollPaneComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomVerticalScrollPaneComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomVerticalScrollPaneComponent, "opal-lib-custom-vertical-scroll-pane", never, {}, {}, never, ["*"], true, never>;
6
+ }
7
+
8
+ export { CustomVerticalScrollPaneComponent };
@@ -0,0 +1,18 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component } from '@angular/core';
3
+
4
+ class CustomHorizontalScrollPaneComponent {
5
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomHorizontalScrollPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CustomHorizontalScrollPaneComponent, isStandalone: true, selector: "opal-lib-custom-horizontal-scroll-pane", ngImport: i0, template: "<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-horizontal-scroll-pane{overflow-x:auto;overflow-y:hidden;width:100%}\n"] });
7
+ }
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomHorizontalScrollPaneComponent, decorators: [{
9
+ type: Component,
10
+ args: [{ selector: 'opal-lib-custom-horizontal-scroll-pane', template: "<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-horizontal-scroll-pane{overflow-x:auto;overflow-y:hidden;width:100%}\n"] }]
11
+ }] });
12
+
13
+ /**
14
+ * Generated bundle index. Do not edit.
15
+ */
16
+
17
+ export { CustomHorizontalScrollPaneComponent };
18
+ //# sourceMappingURL=hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/custom-horizontal-scroll-pane.component.ts","../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/custom-horizontal-scroll-pane.component.html","../../../projects/opal-frontend-common/components/custom/custom-horizontal-scroll-pane/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-horizontal-scroll-pane',\n templateUrl: './custom-horizontal-scroll-pane.component.html',\n styleUrl: './custom-horizontal-scroll-pane.component.scss',\n})\nexport class CustomHorizontalScrollPaneComponent {}\n","<div class=\"custom-horizontal-scroll-pane\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,mCAAmC,CAAA;wGAAnC,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mCAAmC,kGCPhD,sFAGA,EAAA,MAAA,EAAA,CAAA,gFAAA,CAAA,EAAA,CAAA;;4FDIa,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAL/C,SAAS;+BACE,wCAAwC,EAAA,QAAA,EAAA,sFAAA,EAAA,MAAA,EAAA,CAAA,gFAAA,CAAA,EAAA;;;AEHpD;;AAEG;;;;"}
@@ -0,0 +1,28 @@
1
+ import * as i1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Input, Component } from '@angular/core';
5
+
6
+ class CustomScrollablePanesInnerPaneComponent {
7
+ stickyHeadersEnabled = true;
8
+ maxHeight = '500px';
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomScrollablePanesInnerPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CustomScrollablePanesInnerPaneComponent, isStandalone: true, selector: "opal-lib-custom-scrollable-panes-inner-pane", inputs: { stickyHeadersEnabled: "stickyHeadersEnabled", maxHeight: "maxHeight" }, ngImport: i0, template: "<div\n class=\"custom-scrollable-panes-inner-pane\"\n [style.max-height]=\"maxHeight\"\n [ngClass]=\"{ 'sticky-headers': stickyHeadersEnabled }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".custom-scrollable-panes-inner-pane{overflow-y:auto}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
11
+ }
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomScrollablePanesInnerPaneComponent, decorators: [{
13
+ type: Component,
14
+ args: [{ selector: 'opal-lib-custom-scrollable-panes-inner-pane', imports: [CommonModule], template: "<div\n class=\"custom-scrollable-panes-inner-pane\"\n [style.max-height]=\"maxHeight\"\n [ngClass]=\"{ 'sticky-headers': stickyHeadersEnabled }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".custom-scrollable-panes-inner-pane{overflow-y:auto}\n"] }]
15
+ }], propDecorators: { stickyHeadersEnabled: [{
16
+ type: Input,
17
+ args: [{ required: false }]
18
+ }], maxHeight: [{
19
+ type: Input,
20
+ args: [{ required: false }]
21
+ }] } });
22
+
23
+ /**
24
+ * Generated bundle index. Do not edit.
25
+ */
26
+
27
+ export { CustomScrollablePanesInnerPaneComponent };
28
+ //# sourceMappingURL=hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-scrollable-panes/custom-scrollable-panes-inner-pane/custom-scrollable-panes-inner-pane.component.ts","../../../projects/opal-frontend-common/components/custom/custom-scrollable-panes/custom-scrollable-panes-inner-pane/custom-scrollable-panes-inner-pane.component.html","../../../projects/opal-frontend-common/components/custom/custom-scrollable-panes/custom-scrollable-panes-inner-pane/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-scrollable-panes-inner-pane',\n imports: [CommonModule],\n templateUrl: './custom-scrollable-panes-inner-pane.component.html',\n styleUrl: './custom-scrollable-panes-inner-pane.component.scss',\n})\nexport class CustomScrollablePanesInnerPaneComponent {\n @Input({ required: false }) stickyHeadersEnabled: boolean = true;\n @Input({ required: false }) maxHeight: string = '500px';\n}\n","<div\n class=\"custom-scrollable-panes-inner-pane\"\n [style.max-height]=\"maxHeight\"\n [ngClass]=\"{ 'sticky-headers': stickyHeadersEnabled }\"\n>\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,uCAAuC,CAAA;IACtB,oBAAoB,GAAY,IAAI;IACpC,SAAS,GAAW,OAAO;wGAF5C,uCAAuC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAAvC,uCAAuC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,6CAAA,EAAA,MAAA,EAAA,EAAA,oBAAA,EAAA,sBAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTpD,gMAOA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDFY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIX,uCAAuC,EAAA,UAAA,EAAA,CAAA;kBANnD,SAAS;+BACE,6CAA6C,EAAA,OAAA,EAC9C,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,gMAAA,EAAA,MAAA,EAAA,CAAA,wDAAA,CAAA,EAAA;8BAKK,oBAAoB,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,SAAS,EAAA,CAAA;sBAApC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;;AEX5B;;AAEG;;;;"}
@@ -0,0 +1,22 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Input, Component } from '@angular/core';
3
+
4
+ class CustomScrollablePanesComponent {
5
+ height = '100%';
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomScrollablePanesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CustomScrollablePanesComponent, isStandalone: true, selector: "opal-lib-custom-scrollable-panes", inputs: { height: "height" }, ngImport: i0, template: "<div class=\"custom-scrollable-pane\" [style.height]=\"height\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-scrollable-pane{width:100%}\n"] });
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomScrollablePanesComponent, decorators: [{
10
+ type: Component,
11
+ args: [{ selector: 'opal-lib-custom-scrollable-panes', template: "<div class=\"custom-scrollable-pane\" [style.height]=\"height\">\n <ng-content></ng-content>\n</div>\n", styles: [".custom-scrollable-pane{width:100%}\n"] }]
12
+ }], propDecorators: { height: [{
13
+ type: Input,
14
+ args: [{ required: false }]
15
+ }] } });
16
+
17
+ /**
18
+ * Generated bundle index. Do not edit.
19
+ */
20
+
21
+ export { CustomScrollablePanesComponent };
22
+ //# sourceMappingURL=hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-scrollable-panes/custom-scrollable-panes.component.ts","../../../projects/opal-frontend-common/components/custom/custom-scrollable-panes/custom-scrollable-panes.component.html","../../../projects/opal-frontend-common/components/custom/custom-scrollable-panes/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-scrollable-panes',\n templateUrl: './custom-scrollable-panes.component.html',\n styleUrl: './custom-scrollable-panes.component.scss',\n})\nexport class CustomScrollablePanesComponent {\n @Input({ required: false }) public height: string = '100%';\n}\n","<div class=\"custom-scrollable-pane\" [style.height]=\"height\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAOa,8BAA8B,CAAA;IACN,MAAM,GAAW,MAAM;wGAD/C,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA9B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,8BAA8B,0HCP3C,yGAGA,EAAA,MAAA,EAAA,CAAA,uCAAA,CAAA,EAAA,CAAA;;4FDIa,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAL1C,SAAS;+BACE,kCAAkC,EAAA,QAAA,EAAA,yGAAA,EAAA,MAAA,EAAA,CAAA,uCAAA,CAAA,EAAA;8BAKT,MAAM,EAAA,CAAA;sBAAxC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;;AER5B;;AAEG;;;;"}
@@ -0,0 +1,28 @@
1
+ import * as i1 from '@angular/common';
2
+ import { CommonModule } from '@angular/common';
3
+ import * as i0 from '@angular/core';
4
+ import { Input, Component } from '@angular/core';
5
+
6
+ class CustomVerticalScrollPaneInnerPaneComponent {
7
+ maxHeight = '500px';
8
+ stickyHeadersEnabled = true;
9
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomVerticalScrollPaneInnerPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
10
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CustomVerticalScrollPaneInnerPaneComponent, isStandalone: true, selector: "opal-lib-custom-vertical-scroll-pane-inner-pane", inputs: { maxHeight: "maxHeight", stickyHeadersEnabled: "stickyHeadersEnabled" }, ngImport: i0, template: "<div\n class=\"custom-vertical-scroll-pane-inner-pane\"\n [style.max-height]=\"maxHeight\"\n [ngClass]=\"{ 'sticky-headers': stickyHeadersEnabled }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".custom-vertical-scroll-pane-inner-pane{overflow-y:auto;overflow-x:hidden}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
11
+ }
12
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomVerticalScrollPaneInnerPaneComponent, decorators: [{
13
+ type: Component,
14
+ args: [{ selector: 'opal-lib-custom-vertical-scroll-pane-inner-pane', imports: [CommonModule], template: "<div\n class=\"custom-vertical-scroll-pane-inner-pane\"\n [style.max-height]=\"maxHeight\"\n [ngClass]=\"{ 'sticky-headers': stickyHeadersEnabled }\"\n>\n <ng-content></ng-content>\n</div>\n", styles: [".custom-vertical-scroll-pane-inner-pane{overflow-y:auto;overflow-x:hidden}\n"] }]
15
+ }], propDecorators: { maxHeight: [{
16
+ type: Input,
17
+ args: [{ required: false }]
18
+ }], stickyHeadersEnabled: [{
19
+ type: Input,
20
+ args: [{ required: false }]
21
+ }] } });
22
+
23
+ /**
24
+ * Generated bundle index. Do not edit.
25
+ */
26
+
27
+ export { CustomVerticalScrollPaneInnerPaneComponent };
28
+ //# sourceMappingURL=hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-inner-pane/custom-vertical-scroll-pane-inner-pane.component.ts","../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-inner-pane/custom-vertical-scroll-pane-inner-pane.component.html","../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-inner-pane/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-vertical-scroll-pane-inner-pane',\n imports: [CommonModule],\n templateUrl: './custom-vertical-scroll-pane-inner-pane.component.html',\n styleUrl: './custom-vertical-scroll-pane-inner-pane.component.scss',\n})\nexport class CustomVerticalScrollPaneInnerPaneComponent {\n @Input({ required: false }) maxHeight: string = '500px';\n @Input({ required: false }) stickyHeadersEnabled: boolean = true;\n}\n","<div\n class=\"custom-vertical-scroll-pane-inner-pane\"\n [style.max-height]=\"maxHeight\"\n [ngClass]=\"{ 'sticky-headers': stickyHeadersEnabled }\"\n>\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MASa,0CAA0C,CAAA;IACzB,SAAS,GAAW,OAAO;IAC3B,oBAAoB,GAAY,IAAI;wGAFrD,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAA1C,0CAA0C,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iDAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,oBAAA,EAAA,sBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECTvD,oMAOA,EAAA,MAAA,EAAA,CAAA,8EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDFY,YAAY,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FAIX,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBANtD,SAAS;+BACE,iDAAiD,EAAA,OAAA,EAClD,CAAC,YAAY,CAAC,EAAA,QAAA,EAAA,oMAAA,EAAA,MAAA,EAAA,CAAA,8EAAA,CAAA,EAAA;8BAKK,SAAS,EAAA,CAAA;sBAApC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;gBACE,oBAAoB,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;;AEX5B;;AAEG;;;;"}
@@ -0,0 +1,22 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Input, Component } from '@angular/core';
3
+
4
+ class CustomVerticalScrollPaneOuterPaneComponent {
5
+ height = '100%';
6
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomVerticalScrollPaneOuterPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
7
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CustomVerticalScrollPaneOuterPaneComponent, isStandalone: true, selector: "opal-lib-custom-vertical-scroll-pane-outer-pane", inputs: { height: "height" }, ngImport: i0, template: "<div class=\"custom-vertical-scroll-pane-outer-pane\" [style.height]=\"height\">\n <ng-content></ng-content>\n</div>\n" });
8
+ }
9
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomVerticalScrollPaneOuterPaneComponent, decorators: [{
10
+ type: Component,
11
+ args: [{ selector: 'opal-lib-custom-vertical-scroll-pane-outer-pane', template: "<div class=\"custom-vertical-scroll-pane-outer-pane\" [style.height]=\"height\">\n <ng-content></ng-content>\n</div>\n" }]
12
+ }], propDecorators: { height: [{
13
+ type: Input,
14
+ args: [{ required: false }]
15
+ }] } });
16
+
17
+ /**
18
+ * Generated bundle index. Do not edit.
19
+ */
20
+
21
+ export { CustomVerticalScrollPaneOuterPaneComponent };
22
+ //# sourceMappingURL=hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-outer-pane/custom-vertical-scroll-pane-outer-pane.component.ts","../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-outer-pane/custom-vertical-scroll-pane-outer-pane.component.html","../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-outer-pane/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-vertical-scroll-pane-outer-pane',\n templateUrl: './custom-vertical-scroll-pane-outer-pane.component.html',\n})\nexport class CustomVerticalScrollPaneOuterPaneComponent {\n @Input({ required: false }) height: string = '100%';\n}\n","<div class=\"custom-vertical-scroll-pane-outer-pane\" [style.height]=\"height\">\n <ng-content></ng-content>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,0CAA0C,CAAA;IACzB,MAAM,GAAW,MAAM;wGADxC,0CAA0C,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAA1C,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,0CAA0C,yICNvD,yHAGA,EAAA,CAAA;;4FDGa,0CAA0C,EAAA,UAAA,EAAA,CAAA;kBAJtD,SAAS;+BACE,iDAAiD,EAAA,QAAA,EAAA,yHAAA,EAAA;8BAI/B,MAAM,EAAA,CAAA;sBAAjC,KAAK;uBAAC,EAAE,QAAQ,EAAE,KAAK,EAAE;;;AEP5B;;AAEG;;;;"}
@@ -0,0 +1,18 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component } from '@angular/core';
3
+
4
+ class CustomVerticalScrollPaneComponent {
5
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomVerticalScrollPaneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
6
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: CustomVerticalScrollPaneComponent, isStandalone: true, selector: "opal-lib-custom-vertical-scroll-pane", ngImport: i0, template: "<ng-content></ng-content>\n" });
7
+ }
8
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: CustomVerticalScrollPaneComponent, decorators: [{
9
+ type: Component,
10
+ args: [{ selector: 'opal-lib-custom-vertical-scroll-pane', template: "<ng-content></ng-content>\n" }]
11
+ }] });
12
+
13
+ /**
14
+ * Generated bundle index. Do not edit.
15
+ */
16
+
17
+ export { CustomVerticalScrollPaneComponent };
18
+ //# sourceMappingURL=hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs","sources":["../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane.component.ts","../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane.component.html","../../../projects/opal-frontend-common/components/custom/custom-vertical-scroll-pane/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'opal-lib-custom-vertical-scroll-pane',\n templateUrl: './custom-vertical-scroll-pane.component.html',\n})\nexport class CustomVerticalScrollPaneComponent {}\n","<ng-content></ng-content>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,iCAAiC,CAAA;wGAAjC,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAjC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iCAAiC,gGCN9C,6BACA,EAAA,CAAA;;4FDKa,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAJ7C,SAAS;+BACE,sCAAsC,EAAA,QAAA,EAAA,6BAAA,EAAA;;;AEHlD;;AAEG;;;;"}
@@ -0,0 +1,30 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Pipe } from '@angular/core';
3
+
4
+ class NationalInsurancePipe {
5
+ transform(value) {
6
+ if (!value) {
7
+ return '';
8
+ }
9
+ const cleaned = value.replace(/[^a-zA-Z0-9]/g, '').toUpperCase();
10
+ if (cleaned.length < 9)
11
+ return value;
12
+ return `${cleaned.slice(0, 2)} ${cleaned.slice(2, 4)} ${cleaned.slice(4, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8)}`;
13
+ }
14
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NationalInsurancePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
15
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: NationalInsurancePipe, isStandalone: true, name: "nationalInsurance" });
16
+ }
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: NationalInsurancePipe, decorators: [{
18
+ type: Pipe,
19
+ args: [{
20
+ name: 'nationalInsurance',
21
+ standalone: true,
22
+ }]
23
+ }] });
24
+
25
+ /**
26
+ * Generated bundle index. Do not edit.
27
+ */
28
+
29
+ export { NationalInsurancePipe };
30
+ //# sourceMappingURL=hmcts-opal-frontend-common-pipes-national-insurance.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-pipes-national-insurance.mjs","sources":["../../../projects/opal-frontend-common/pipes/national-insurance/national-insurance.pipe.ts","../../../projects/opal-frontend-common/pipes/national-insurance/hmcts-opal-frontend-common-pipes-national-insurance.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'nationalInsurance',\n standalone: true,\n})\nexport class NationalInsurancePipe implements PipeTransform {\n transform(value: string | null): string {\n if (!value) {\n return '';\n }\n\n const cleaned = value.replace(/[^a-zA-Z0-9]/g, '').toUpperCase();\n\n if (cleaned.length < 9) return value;\n\n return `${cleaned.slice(0, 2)} ${cleaned.slice(2, 4)} ${cleaned.slice(4, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8)}`;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,qBAAqB,CAAA;AAChC,IAAA,SAAS,CAAC,KAAoB,EAAA;QAC5B,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,OAAO,EAAE;QACX;AAEA,QAAA,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;AAEhE,QAAA,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;AAAE,YAAA,OAAO,KAAK;QAEpC,OAAO,CAAA,EAAG,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,CAAA,EAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,CAAA,EAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,CAAA,EAAI,OAAO,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAA,CAAA,EAAI,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;IAC1H;wGAXW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA;sGAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,mBAAA,EAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,mBAAmB;AACzB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -0,0 +1,11 @@
1
+ const TRANSFORM_ITEM_DEFAULTS = {
2
+ dateConfig: null,
3
+ timeConfig: null,
4
+ };
5
+
6
+ /**
7
+ * Generated bundle index. Do not edit.
8
+ */
9
+
10
+ export { TRANSFORM_ITEM_DEFAULTS };
11
+ //# sourceMappingURL=hmcts-opal-frontend-common-services-transformation-service-constants.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hmcts-opal-frontend-common-services-transformation-service-constants.mjs","sources":["../../../projects/opal-frontend-common/services/transformation-service/constants/transform-item.constants.ts","../../../projects/opal-frontend-common/services/transformation-service/constants/hmcts-opal-frontend-common-services-transformation-service-constants.ts"],"sourcesContent":["import { ITransformItem } from '@hmcts/opal-frontend-common/services/transformation-service/interfaces';\n\nexport const TRANSFORM_ITEM_DEFAULTS: Pick<ITransformItem, 'dateConfig' | 'timeConfig'> = {\n dateConfig: null,\n timeConfig: null,\n};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"AAEO,MAAM,uBAAuB,GAAsD;AACxF,IAAA,UAAU,EAAE,IAAI;AAChB,IAAA,UAAU,EAAE,IAAI;;;ACJlB;;AAEG;;;;"}
@@ -16,15 +16,23 @@ class TransformationService {
16
16
  if (!value) {
17
17
  return value;
18
18
  }
19
- if (transformItem.transformType === 'date') {
20
- if (transformItem.dateInputFormat !== null && transformItem.dateOutputFormat !== null) {
21
- const parsedDate = this.dateService.getFromFormat(value, transformItem.dateInputFormat);
22
- if (this.dateService.isValidDate(parsedDate)) {
23
- return this.dateService.toFormat(parsedDate, transformItem.dateOutputFormat);
24
- }
19
+ if (transformItem.transformType === 'date' && transformItem.dateConfig) {
20
+ const parsedDate = this.dateService.getFromFormat(value, transformItem.dateConfig.inputFormat);
21
+ if (this.dateService.isValidDate(parsedDate)) {
22
+ return this.dateService.toFormat(parsedDate, transformItem.dateConfig.outputFormat);
25
23
  }
26
24
  return value;
27
25
  }
26
+ if (transformItem.transformType === 'time' && transformItem.timeConfig) {
27
+ if (transformItem.timeConfig.addOffset) {
28
+ // Add offset to the time value
29
+ return `${value}:00Z`;
30
+ }
31
+ else if (transformItem.timeConfig.removeOffset) {
32
+ // Remove offset from the time value
33
+ return value.replace(/:00Z$/, '');
34
+ }
35
+ }
28
36
  return value;
29
37
  }
30
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"hmcts-opal-frontend-common-services-transformation-service.mjs","sources":["../../../projects/opal-frontend-common/services/transformation-service/transformation.service.ts","../../../projects/opal-frontend-common/services/transformation-service/hmcts-opal-frontend-common-services-transformation-service.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ITransformItem } from '@hmcts/opal-frontend-common/services/transformation-service/interfaces';\nimport { DateService } from '@hmcts/opal-frontend-common/services/date-service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TransformationService {\n private readonly dateService = inject(DateService);\n\n /**\n * Applies a transformation to the given value based on the specified transformation configuration.\n *\n * @param value - The value to be transformed.\n * @param transformItem - The configuration for the transformation, including the type of transformation and any necessary format details.\n * @returns The transformed value, or the original value if no transformation is applied.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private applyTransformation(value: any, transformItem: ITransformItem): any {\n if (!value) {\n return value;\n }\n\n if (transformItem.transformType === 'date') {\n if (transformItem.dateInputFormat !== null && transformItem.dateOutputFormat !== null) {\n const parsedDate = this.dateService.getFromFormat(value, transformItem.dateInputFormat);\n if (this.dateService.isValidDate(parsedDate)) {\n return this.dateService.toFormat(parsedDate, transformItem.dateOutputFormat);\n }\n }\n return value;\n }\n\n return value;\n }\n\n /**\n * Transforms the values of an object based on a given transformation configuration.\n *\n * @param obj - The object whose values need to be transformed. It should be a non-null object.\n * @param toTransform - An array of transformation configurations, where each configuration specifies\n * the key to transform and the transformation details.\n * @returns The transformed object with values modified according to the transformation configuration.\n *\n * @remarks\n * - If the input `obj` is not an object or is null, it returns the input as is.\n * - The function recursively processes nested objects.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public transformObjectValues(obj: { [key: string]: any }, toTransform: ITransformItem[]): any {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n\n for (const [key, value] of Object.entries(obj)) {\n const transformItem = toTransform.find((item) => item.key === key);\n\n if (transformItem) {\n obj[key] = this.applyTransformation(value, transformItem);\n } else if (Array.isArray(value)) {\n obj[key] = value.map((item) =>\n typeof item === 'object' ? this.transformObjectValues(item, toTransform) : item,\n );\n } else if (typeof value === 'object') {\n obj[key] = this.transformObjectValues(value, toTransform); // Recursive call\n }\n }\n return obj;\n }\n\n /**\n * replaces the keys in the object provided\n * by replacing the current prefix with a new prefix.\n * Useful when mapping object keys to a different format or structure.\n * @param data - The data object containing key-value pairs.\n * @param currentPrefix - The prefix to be replaced in the keys.\n * @param replacementPrefix - The prefix to replace the current prefix with.\n * @returns A new object with the keys replaced.\n * @template T - The type of the form data object.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public replaceKeys<T extends object>(data: T, currentPrefix: string, replacementPrefix: string): Record<string, any> {\n if (typeof data !== 'object' || data === null) {\n return {};\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n\n for (const [key, value] of Object.entries(data)) {\n const newKey = key.replace(currentPrefix, replacementPrefix);\n result[newKey] = value;\n }\n\n return result;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"hmcts-opal-frontend-common-services-transformation-service.mjs","sources":["../../../projects/opal-frontend-common/services/transformation-service/transformation.service.ts","../../../projects/opal-frontend-common/services/transformation-service/hmcts-opal-frontend-common-services-transformation-service.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ITransformItem } from '@hmcts/opal-frontend-common/services/transformation-service/interfaces';\nimport { DateService } from '@hmcts/opal-frontend-common/services/date-service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TransformationService {\n private readonly dateService = inject(DateService);\n\n /**\n * Applies a transformation to the given value based on the specified transformation configuration.\n *\n * @param value - The value to be transformed.\n * @param transformItem - The configuration for the transformation, including the type of transformation and any necessary format details.\n * @returns The transformed value, or the original value if no transformation is applied.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private applyTransformation(value: any, transformItem: ITransformItem): any {\n if (!value) {\n return value;\n }\n\n if (transformItem.transformType === 'date' && transformItem.dateConfig) {\n const parsedDate = this.dateService.getFromFormat(value, transformItem.dateConfig.inputFormat);\n if (this.dateService.isValidDate(parsedDate)) {\n return this.dateService.toFormat(parsedDate, transformItem.dateConfig.outputFormat);\n }\n return value;\n }\n\n if (transformItem.transformType === 'time' && transformItem.timeConfig) {\n if (transformItem.timeConfig.addOffset) {\n // Add offset to the time value\n return `${value}:00Z`;\n } else if (transformItem.timeConfig.removeOffset) {\n // Remove offset from the time value\n return value.replace(/:00Z$/, '');\n }\n }\n\n return value;\n }\n\n /**\n * Transforms the values of an object based on a given transformation configuration.\n *\n * @param obj - The object whose values need to be transformed. It should be a non-null object.\n * @param toTransform - An array of transformation configurations, where each configuration specifies\n * the key to transform and the transformation details.\n * @returns The transformed object with values modified according to the transformation configuration.\n *\n * @remarks\n * - If the input `obj` is not an object or is null, it returns the input as is.\n * - The function recursively processes nested objects.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public transformObjectValues(obj: { [key: string]: any }, toTransform: ITransformItem[]): any {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n\n for (const [key, value] of Object.entries(obj)) {\n const transformItem = toTransform.find((item) => item.key === key);\n\n if (transformItem) {\n obj[key] = this.applyTransformation(value, transformItem);\n } else if (Array.isArray(value)) {\n obj[key] = value.map((item) =>\n typeof item === 'object' ? this.transformObjectValues(item, toTransform) : item,\n );\n } else if (typeof value === 'object') {\n obj[key] = this.transformObjectValues(value, toTransform); // Recursive call\n }\n }\n return obj;\n }\n\n /**\n * replaces the keys in the object provided\n * by replacing the current prefix with a new prefix.\n * Useful when mapping object keys to a different format or structure.\n * @param data - The data object containing key-value pairs.\n * @param currentPrefix - The prefix to be replaced in the keys.\n * @param replacementPrefix - The prefix to replace the current prefix with.\n * @returns A new object with the keys replaced.\n * @template T - The type of the form data object.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public replaceKeys<T extends object>(data: T, currentPrefix: string, replacementPrefix: string): Record<string, any> {\n if (typeof data !== 'object' || data === null) {\n return {};\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n\n for (const [key, value] of Object.entries(data)) {\n const newKey = key.replace(currentPrefix, replacementPrefix);\n result[newKey] = value;\n }\n\n return result;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":"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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmcts/opal-frontend-common",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^18.2.0 || ^19.0.0",
@@ -174,6 +174,36 @@
174
174
  "./components/custom/custom-page-header/custom-page-header-action-buttons-container": {
175
175
  "import": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header-custom-page-header-action-buttons-container.mjs"
176
176
  },
177
+ "./components/custom/custom-horizontal-scroll-pane": {
178
+ "import": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs",
179
+ "types": "./components/custom/custom-horizontal-scroll-pane/index.d.ts",
180
+ "default": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs"
181
+ },
182
+ "./components/custom/custom-scrollable-panes": {
183
+ "import": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs",
184
+ "types": "./components/custom/custom-scrollable-panes/index.d.ts",
185
+ "default": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs"
186
+ },
187
+ "./components/custom/custom-scrollable-panes/custom-scrollable-panes-inner-pane": {
188
+ "import": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs",
189
+ "types": "./components/custom/custom-scrollable-panes/custom-scrollable-panes-inner-pane/index.d.ts",
190
+ "default": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs"
191
+ },
192
+ "./components/custom/custom-vertical-scroll-pane": {
193
+ "import": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs",
194
+ "types": "./components/custom/custom-vertical-scroll-pane/index.d.ts",
195
+ "default": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs"
196
+ },
197
+ "./components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-inner-pane": {
198
+ "import": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs",
199
+ "types": "./components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-inner-pane/index.d.ts",
200
+ "default": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs"
201
+ },
202
+ "./components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-outer-pane": {
203
+ "import": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs",
204
+ "types": "./components/custom/custom-vertical-scroll-pane/custom-vertical-scroll-pane-outer-pane/index.d.ts",
205
+ "default": "./fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs"
206
+ },
177
207
  "./components/govuk/govuk-accordion": {
178
208
  "import": "./fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs",
179
209
  "types": "./components/govuk/govuk-accordion/index.d.ts",
@@ -560,6 +590,11 @@
560
590
  "types": "./pipes/days-ago/index.d.ts",
561
591
  "default": "./fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs"
562
592
  },
593
+ "./pipes/national-insurance": {
594
+ "import": "./fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs",
595
+ "types": "./pipes/national-insurance/index.d.ts",
596
+ "default": "./fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs"
597
+ },
563
598
  "./resolvers/title": {
564
599
  "import": "./fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs",
565
600
  "types": "./resolvers/title/index.d.ts",
@@ -671,6 +706,11 @@
671
706
  "./services/transformation-service/mocks": {
672
707
  "import": "./fesm2022/hmcts-opal-frontend-common-services-transformation-service-mocks.mjs"
673
708
  },
709
+ "./services/transformation-service/constants": {
710
+ "import": "./fesm2022/hmcts-opal-frontend-common-services-transformation-service-constants.mjs",
711
+ "types": "./services/transformation-service/constants/index.d.ts",
712
+ "default": "./fesm2022/hmcts-opal-frontend-common-services-transformation-service-constants.mjs"
713
+ },
674
714
  "./services/utils-service": {
675
715
  "import": "./fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs",
676
716
  "types": "./services/utils-service/index.d.ts",
@@ -0,0 +1,10 @@
1
+ import * as i0 from '@angular/core';
2
+ import { PipeTransform } from '@angular/core';
3
+
4
+ declare class NationalInsurancePipe implements PipeTransform {
5
+ transform(value: string | null): string;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<NationalInsurancePipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<NationalInsurancePipe, "nationalInsurance", true>;
8
+ }
9
+
10
+ export { NationalInsurancePipe };
@@ -0,0 +1,5 @@
1
+ import { ITransformItem } from '@hmcts/opal-frontend-common/services/transformation-service/interfaces';
2
+
3
+ declare const TRANSFORM_ITEM_DEFAULTS: Pick<ITransformItem, 'dateConfig' | 'timeConfig'>;
4
+
5
+ export { TRANSFORM_ITEM_DEFAULTS };
@@ -1,8 +1,16 @@
1
+ interface ITransformItemDateConfig {
2
+ inputFormat: string;
3
+ outputFormat: string;
4
+ }
5
+ interface ITransformItemTimeConfig {
6
+ addOffset: boolean;
7
+ removeOffset: boolean;
8
+ }
1
9
  interface ITransformItem {
2
10
  key: string;
3
11
  transformType: string;
4
- dateInputFormat: string | null;
5
- dateOutputFormat: string | null;
12
+ dateConfig: ITransformItemDateConfig | null;
13
+ timeConfig: ITransformItemTimeConfig | null;
6
14
  }
7
15
 
8
- export type { ITransformItem };
16
+ export type { ITransformItem, ITransformItemDateConfig, ITransformItemTimeConfig };
@@ -0,0 +1,7 @@
1
+ .custom-scrollable-panes-inner-pane.sticky-headers .govuk-table thead th,
2
+ .custom-vertical-scroll-pane-inner-pane.sticky-headers .govuk-table thead th {
3
+ position: sticky;
4
+ top: 0;
5
+ background-color: #fff;
6
+ z-index: 2;
7
+ }
@@ -2,6 +2,7 @@
2
2
  @import 'govuk-frontend/dist/govuk/all.scss';
3
3
  @import './custom/_custom-section_break.scss';
4
4
  @import 'home-office-kit/sass/_loadingSpinner.scss';
5
+ @import './custom/custom-scrollable-panes';
5
6
 
6
7
  html,
7
8
  body {