@softpak/components 19.18.0 → 19.21.0-beta.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 (88) hide show
  1. package/README.md +24 -24
  2. package/fesm2022/softpak-components-spx-404-page.mjs +2 -2
  3. package/fesm2022/softpak-components-spx-404-page.mjs.map +1 -1
  4. package/fesm2022/softpak-components-spx-alert.mjs +7 -6
  5. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  6. package/fesm2022/softpak-components-spx-app-configuration.mjs.map +1 -1
  7. package/fesm2022/softpak-components-spx-app-expiry.mjs +23 -91
  8. package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
  9. package/fesm2022/softpak-components-spx-button.mjs +8 -22
  10. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  11. package/fesm2022/softpak-components-spx-capitalize.mjs.map +1 -1
  12. package/fesm2022/softpak-components-spx-card.mjs +20 -91
  13. package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
  14. package/fesm2022/softpak-components-spx-change-details.mjs +54 -64
  15. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
  16. package/fesm2022/softpak-components-spx-channel-selection.mjs +52 -52
  17. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  18. package/fesm2022/softpak-components-spx-check-digit.mjs +24 -28
  19. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  20. package/fesm2022/softpak-components-spx-confirm.mjs +4 -4
  21. package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
  22. package/fesm2022/softpak-components-spx-form-section.mjs +8 -33
  23. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  24. package/fesm2022/softpak-components-spx-form-view.mjs +39 -53
  25. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
  26. package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
  27. package/fesm2022/softpak-components-spx-inputs.mjs +33 -24
  28. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  29. package/fesm2022/softpak-components-spx-navigation.mjs +34 -89
  30. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  31. package/fesm2022/softpak-components-spx-number-check.mjs +91 -198
  32. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  33. package/fesm2022/softpak-components-spx-pagination.mjs +12 -21
  34. package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
  35. package/fesm2022/softpak-components-spx-patch.mjs +8 -39
  36. package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
  37. package/fesm2022/softpak-components-spx-pipes.mjs.map +1 -1
  38. package/fesm2022/softpak-components-spx-progress-bar.mjs +8 -22
  39. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  40. package/fesm2022/softpak-components-spx-spinner.mjs +15 -160
  41. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  42. package/fesm2022/softpak-components-spx-stock-info.mjs +71 -128
  43. package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
  44. package/fesm2022/softpak-components-spx-storage.mjs.map +1 -1
  45. package/fesm2022/softpak-components-spx-suggestion.mjs +2 -2
  46. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  47. package/fesm2022/softpak-components-spx-toaster.mjs +36 -163
  48. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  49. package/fesm2022/softpak-components-spx-toggle.mjs +34 -0
  50. package/fesm2022/softpak-components-spx-toggle.mjs.map +1 -0
  51. package/fesm2022/softpak-components-spx-translate.mjs.map +1 -1
  52. package/fesm2022/softpak-components-spx-update.mjs +5 -5
  53. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  54. package/fesm2022/softpak-components-spx-validation.mjs +56 -55
  55. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  56. package/package.json +32 -28
  57. package/spx-alert/spx-alert.component.d.ts +1 -1
  58. package/spx-app-expiry/spx-app-expiry.component.d.ts +14 -14
  59. package/spx-button/spx-button.component.d.ts +0 -3
  60. package/spx-card/spx-card-item/spx-card-item.component.d.ts +0 -1
  61. package/spx-card/spx-card.component.d.ts +8 -9
  62. package/spx-change-details/spx-change-details.component.d.ts +23 -23
  63. package/spx-check-digit/spx-check-digit.component.d.ts +9 -9
  64. package/spx-form-section/spx-form-section.component.d.ts +5 -5
  65. package/spx-form-view/spx-autocomplete-search.component.d.ts +15 -16
  66. package/spx-form-view/spx-form-view.component.d.ts +1 -1
  67. package/spx-helpers/input-alert.interface.d.ts +5 -0
  68. package/spx-helpers/public-api.d.ts +1 -0
  69. package/spx-inputs/spx-input-text/spx-input-text.component.d.ts +4 -1
  70. package/spx-inputs/spx-input.component.d.ts +2 -1
  71. package/spx-navigation/public-api.d.ts +2 -2
  72. package/spx-navigation/spx-home-tile/spx-home-tile.component.d.ts +11 -0
  73. package/spx-navigation/{spx-home-tiles.component.d.ts → spx-home-tile/spx-home-tiles.component.d.ts} +2 -2
  74. package/spx-navigation/spx-navigation.component.d.ts +11 -8
  75. package/spx-number-check/spx-number-check.component.d.ts +26 -32
  76. package/spx-pagination/spx-pagination.component.d.ts +9 -10
  77. package/spx-patch/spx-patch.component.d.ts +4 -4
  78. package/spx-progress-bar/spx-progress-bar.component.d.ts +3 -3
  79. package/spx-spinner/spx-spinner.component.d.ts +3 -3
  80. package/spx-stock-info/spx-stock-info.component.d.ts +48 -49
  81. package/spx-toaster/src/spx-toaster-message.interface.d.ts +5 -1
  82. package/spx-toaster/src/spx-toaster.component.d.ts +6 -14
  83. package/spx-toggle/index.d.ts +5 -0
  84. package/spx-toggle/public-api.d.ts +1 -0
  85. package/spx-toggle/src/spx-toggle.component.d.ts +12 -0
  86. package/spx-validation/spx-validate-control.component.d.ts +22 -20
  87. package/tailwind.css +1 -1
  88. package/spx-navigation/spx-home-tile.component.d.ts +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-capitalize.mjs","sources":["../../../../projects/softpak/components/spx-capitalize/spx-capitalize.pipe.ts","../../../../projects/softpak/components/spx-capitalize/softpak-components-spx-capitalize.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\r\n\r\n@Pipe({\r\n name: 'capitalize',\r\n standalone: true,\r\n})\r\nexport class SpxCapitalizePipe implements PipeTransform {\r\n\r\n transform(value: string, ..._args: unknown[]): string {\r\n return value = value ? value.charAt(0).toUpperCase() + value.substr(1) : '';\r\n }\r\n\r\n static transform(value: string, ..._args: unknown[]): string {\r\n return new SpxCapitalizePipe().transform(value, _args);\r\n }\r\n\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QAC1C,OAAO,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;;AAG7E,IAAA,OAAO,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QACjD,OAAO,IAAI,iBAAiB,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;;8GAP7C,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,YAAY;AAClB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACLD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-capitalize.mjs","sources":["../../../../projects/softpak/components/spx-capitalize/spx-capitalize.pipe.ts","../../../../projects/softpak/components/spx-capitalize/softpak-components-spx-capitalize.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'capitalize',\n standalone: true,\n})\nexport class SpxCapitalizePipe implements PipeTransform {\n\n transform(value: string, ..._args: unknown[]): string {\n return value = value ? value.charAt(0).toUpperCase() + value.substr(1) : '';\n }\n\n static transform(value: string, ..._args: unknown[]): string {\n return new SpxCapitalizePipe().transform(value, _args);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAMa,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QAC1C,OAAO,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE;;AAG7E,IAAA,OAAO,SAAS,CAAC,KAAa,EAAE,GAAG,KAAgB,EAAA;QACjD,OAAO,IAAI,iBAAiB,EAAE,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;;8GAP7C,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,YAAY;AAClB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -1,6 +1,5 @@
1
- import { NgClass } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Component, Input, Output, input, ChangeDetectionStrategy, HostBinding, model, computed } from '@angular/core';
2
+ import { input, output, Component, ChangeDetectionStrategy, model, computed } from '@angular/core';
4
3
  import * as i1 from '@fortawesome/angular-fontawesome';
5
4
  import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
6
5
  import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
@@ -8,11 +7,13 @@ import { IsSeverityPipe } from '@softpak/components/spx-pipes';
8
7
 
9
8
  class SpxCardComponent {
10
9
  constructor() {
11
- this.clickable = true;
12
- this.hasContent = true;
13
- this.onDetailPage = false;
14
- this.tableView = false;
15
- this.clicked = new EventEmitter();
10
+ this.clickable = input(true);
11
+ this.hasContent = input(true);
12
+ this.onDetailPage = input(false);
13
+ this.text = input();
14
+ this.unit = input();
15
+ this.tableView = input(false);
16
+ this.clicked = output();
16
17
  }
17
18
  displayValue(val) {
18
19
  return val || (val === 0) ? val : '—';
@@ -21,86 +22,15 @@ class SpxCardComponent {
21
22
  this.clicked.emit();
22
23
  }
23
24
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxCardComponent, isStandalone: true, selector: "spx-card", inputs: { clickable: "clickable", hasContent: "hasContent", onDetailPage: "onDetailPage", text: "text", unit: "unit", tableView: "tableView" }, outputs: { clicked: "clicked" }, ngImport: i0, template: `
25
- <button type="button"
26
- class="block w-full text-left rounded font-body items-stretch"
27
- [class.flex]="tableView"
28
- [class.cursor-pointer]="clickable"
29
- [class.cursor-not-allowed]="!clickable"
30
- [class.focus:ring-2]="clickable"
31
- [class.focus:ring-offset-2]="clickable"
32
- [class.focus:ring-blue-500]="clickable"
33
- (click)="onClick()"
34
- [tabIndex]="clickable ? 0 : -1">
35
- <div class="text-gray-900 opacity-90" [class.w-96]="tableView">
36
- <ng-content select="[card-header]"></ng-content>
37
- </div>
38
- <ng-content select="[card-content-top]"></ng-content>
39
- @if (hasContent) {
40
- <div class="bg-white dark:bg-gray-600 p-3">
41
- <ng-content select="[card-content]"></ng-content>
42
- </div>
43
- }
44
- <ng-content select="[card-content-bottom]"></ng-content>
45
- <div class="bg-gray-50 dark:bg-gray-700 p-3 grow" [class.rounded-b-lg]="!onDetailPage && !tableView" [class.rounded-r-lg]="!onDetailPage && tableView">
46
- <ng-content select="[card-lines]"></ng-content>
47
- </div>
48
- </button>
49
- `, isInline: true }); }
25
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxCardComponent, isStandalone: true, selector: "spx-card", inputs: { clickable: { classPropertyName: "clickable", publicName: "clickable", isSignal: true, isRequired: false, transformFunction: null }, hasContent: { classPropertyName: "hasContent", publicName: "hasContent", isSignal: true, isRequired: false, transformFunction: null }, onDetailPage: { classPropertyName: "onDetailPage", publicName: "onDetailPage", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, tableView: { classPropertyName: "tableView", publicName: "tableView", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { clicked: "clicked" }, ngImport: i0, template: "<button type=\"button\"\nclass=\"block w-full text-left rounded font-body items-stretch\"\n[class.flex]=\"tableView()\"\n[class.cursor-pointer]=\"clickable()\"\n[class.cursor-not-allowed]=\"!clickable()\"\n[class.focus:ring-2]=\"clickable()\"\n[class.focus:ring-offset-2]=\"clickable()\"\n[class.focus:ring-blue-500]=\"clickable()\"\n(click)=\"onClick()\"\n[tabIndex]=\"clickable() ? 0 : -1\">\n<div class=\"text-gray-900 opacity-90\" [class.w-96]=\"tableView()\">\n <ng-content select=\"[card-header]\"></ng-content>\n</div>\n<ng-content select=\"[card-content-top]\"></ng-content>\n@if (hasContent()) {\n <div class=\"bg-white dark:bg-gray-600 p-3\">\n <ng-content select=\"[card-content]\"></ng-content>\n </div>\n}\n<ng-content select=\"[card-content-bottom]\"></ng-content>\n<div class=\"bg-gray-50 dark:bg-gray-700 p-3 grow\" [class.rounded-b-lg]=\"!onDetailPage() && !tableView()\" [class.rounded-r-lg]=\"!onDetailPage() && tableView()\">\n <ng-content select=\"[card-lines]\"></ng-content>\n</div>\n</button>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
50
26
  }
51
27
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardComponent, decorators: [{
52
28
  type: Component,
53
- args: [{
54
- selector: 'spx-card',
55
- imports: [
56
- NgClass
57
- ],
58
- template: `
59
- <button type="button"
60
- class="block w-full text-left rounded font-body items-stretch"
61
- [class.flex]="tableView"
62
- [class.cursor-pointer]="clickable"
63
- [class.cursor-not-allowed]="!clickable"
64
- [class.focus:ring-2]="clickable"
65
- [class.focus:ring-offset-2]="clickable"
66
- [class.focus:ring-blue-500]="clickable"
67
- (click)="onClick()"
68
- [tabIndex]="clickable ? 0 : -1">
69
- <div class="text-gray-900 opacity-90" [class.w-96]="tableView">
70
- <ng-content select="[card-header]"></ng-content>
71
- </div>
72
- <ng-content select="[card-content-top]"></ng-content>
73
- @if (hasContent) {
74
- <div class="bg-white dark:bg-gray-600 p-3">
75
- <ng-content select="[card-content]"></ng-content>
76
- </div>
77
- }
78
- <ng-content select="[card-content-bottom]"></ng-content>
79
- <div class="bg-gray-50 dark:bg-gray-700 p-3 grow" [class.rounded-b-lg]="!onDetailPage && !tableView" [class.rounded-r-lg]="!onDetailPage && tableView">
80
- <ng-content select="[card-lines]"></ng-content>
81
- </div>
82
- </button>
83
- `
84
- }]
85
- }], ctorParameters: () => [], propDecorators: { clickable: [{
86
- type: Input
87
- }], hasContent: [{
88
- type: Input
89
- }], onDetailPage: [{
90
- type: Input
91
- }], text: [{
92
- type: Input
93
- }], unit: [{
94
- type: Input
95
- }], tableView: [{
96
- type: Input
97
- }], clicked: [{
98
- type: Output
99
- }] } });
29
+ args: [{ selector: 'spx-card', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<button type=\"button\"\nclass=\"block w-full text-left rounded font-body items-stretch\"\n[class.flex]=\"tableView()\"\n[class.cursor-pointer]=\"clickable()\"\n[class.cursor-not-allowed]=\"!clickable()\"\n[class.focus:ring-2]=\"clickable()\"\n[class.focus:ring-offset-2]=\"clickable()\"\n[class.focus:ring-blue-500]=\"clickable()\"\n(click)=\"onClick()\"\n[tabIndex]=\"clickable() ? 0 : -1\">\n<div class=\"text-gray-900 opacity-90\" [class.w-96]=\"tableView()\">\n <ng-content select=\"[card-header]\"></ng-content>\n</div>\n<ng-content select=\"[card-content-top]\"></ng-content>\n@if (hasContent()) {\n <div class=\"bg-white dark:bg-gray-600 p-3\">\n <ng-content select=\"[card-content]\"></ng-content>\n </div>\n}\n<ng-content select=\"[card-content-bottom]\"></ng-content>\n<div class=\"bg-gray-50 dark:bg-gray-700 p-3 grow\" [class.rounded-b-lg]=\"!onDetailPage() && !tableView()\" [class.rounded-r-lg]=\"!onDetailPage() && tableView()\">\n <ng-content select=\"[card-lines]\"></ng-content>\n</div>\n</button>" }]
30
+ }], ctorParameters: () => [] });
100
31
 
101
32
  class SpxCardItemComponent {
102
33
  constructor() {
103
- this.hFull = true;
104
34
  this.icon = input();
105
35
  this.iconOnly = input(false);
106
36
  this.spxLabel = input.required();
@@ -110,29 +40,28 @@ class SpxCardItemComponent {
110
40
  this.SpxSeverityEnum = SpxSeverityEnum;
111
41
  }
112
42
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
113
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxCardItemComponent, isStandalone: true, selector: "spx-card-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, spxLabel: { classPropertyName: "spxLabel", publicName: "spxLabel", isSignal: true, isRequired: true, transformFunction: null }, spxValue: { classPropertyName: "spxValue", publicName: "spxValue", isSignal: true, isRequired: false, transformFunction: null }, spxSeverity: { classPropertyName: "spxSeverity", publicName: "spxSeverity", isSignal: true, isRequired: false, transformFunction: null }, spxIconSeverity: { classPropertyName: "spxIconSeverity", publicName: "spxIconSeverity", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.h-full": "this.hFull" } }, ngImport: i0, template: "<div class='py-2 px-3 rounded h-full'\r\n [class.bg-slate-100]=\"!spxSeverity()\"\r\n [class.dark:bg-slate-600]=\"!spxSeverity()\"\r\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\r\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\r\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\r\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\r\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\r\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\r\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\r\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\r\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\r\n @if (icon()) {\r\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\r\n <div\r\n class=\"px-3 py-1 text-white rounded\"\r\n [class.bg-black]=\"!spxIconSeverity()\"\r\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\r\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\r\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\r\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\r\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\r\n <fa-icon [icon]=\"icon()!\"></fa-icon>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"grow font-bold\">\r\n @if (!iconOnly()) {\r\n <ng-content></ng-content><div [innerHTML]=\"spxValue()\"></div>\r\n }\r\n </div>\r\n </div>\r\n </div>", dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: IsSeverityPipe, name: "isSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
43
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxCardItemComponent, isStandalone: true, selector: "spx-card-item", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, iconOnly: { classPropertyName: "iconOnly", publicName: "iconOnly", isSignal: true, isRequired: false, transformFunction: null }, spxLabel: { classPropertyName: "spxLabel", publicName: "spxLabel", isSignal: true, isRequired: true, transformFunction: null }, spxValue: { classPropertyName: "spxValue", publicName: "spxValue", isSignal: true, isRequired: false, transformFunction: null }, spxSeverity: { classPropertyName: "spxSeverity", publicName: "spxSeverity", isSignal: true, isRequired: false, transformFunction: null }, spxIconSeverity: { classPropertyName: "spxIconSeverity", publicName: "spxIconSeverity", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.h-full": "true" } }, ngImport: i0, template: "<div class='py-2 px-3 rounded h-full'\n [class.bg-slate-100]=\"!spxSeverity()\"\n [class.dark:bg-slate-600]=\"!spxSeverity()\"\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\n @if (icon()) {\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\n <div\n class=\"px-3 py-1 text-white rounded\"\n [class.bg-black]=\"!spxIconSeverity()\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <fa-icon [icon]=\"icon()!\"></fa-icon>\n </div>\n </div>\n }\n <div class=\"grow font-bold\">\n @if (!iconOnly()) {\n <ng-content></ng-content><div [innerHTML]=\"spxValue()\"></div>\n }\n </div>\n </div>\n </div>", dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }, { kind: "pipe", type: IsSeverityPipe, name: "isSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
114
44
  }
115
45
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardItemComponent, decorators: [{
116
46
  type: Component,
117
47
  args: [{ selector: 'spx-card-item', imports: [
118
48
  FaIconComponent,
119
49
  IsSeverityPipe
120
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class='py-2 px-3 rounded h-full'\r\n [class.bg-slate-100]=\"!spxSeverity()\"\r\n [class.dark:bg-slate-600]=\"!spxSeverity()\"\r\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\r\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\r\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\r\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\r\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\r\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\r\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\r\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\r\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\r\n @if (icon()) {\r\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\r\n <div\r\n class=\"px-3 py-1 text-white rounded\"\r\n [class.bg-black]=\"!spxIconSeverity()\"\r\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\r\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\r\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\r\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\r\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\r\n <fa-icon [icon]=\"icon()!\"></fa-icon>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"grow font-bold\">\r\n @if (!iconOnly()) {\r\n <ng-content></ng-content><div [innerHTML]=\"spxValue()\"></div>\r\n }\r\n </div>\r\n </div>\r\n </div>" }]
121
- }], propDecorators: { hFull: [{
122
- type: HostBinding,
123
- args: ['class.h-full']
124
- }] } });
50
+ ], changeDetection: ChangeDetectionStrategy.OnPush, host: {
51
+ '[class.h-full]': 'true',
52
+ }, template: "<div class='py-2 px-3 rounded h-full'\n [class.bg-slate-100]=\"!spxSeverity()\"\n [class.dark:bg-slate-600]=\"!spxSeverity()\"\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\n @if (icon()) {\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\n <div\n class=\"px-3 py-1 text-white rounded\"\n [class.bg-black]=\"!spxIconSeverity()\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <fa-icon [icon]=\"icon()!\"></fa-icon>\n </div>\n </div>\n }\n <div class=\"grow font-bold\">\n @if (!iconOnly()) {\n <ng-content></ng-content><div [innerHTML]=\"spxValue()\"></div>\n }\n </div>\n </div>\n </div>" }]
53
+ }] });
125
54
 
126
55
  class SpxCardGridComponent {
127
56
  constructor() {
128
57
  this.minWidth2Columns = input(460);
129
58
  }
130
59
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
131
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SpxCardGridComponent, isStandalone: true, selector: "spx-card-grid", inputs: { minWidth2Columns: { classPropertyName: "minWidth2Columns", publicName: "minWidth2Columns", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class='grid gap-3 items-stretch'\r\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\r\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\r\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\r\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\r\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\r\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\r\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\r\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\r\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\r\n <ng-content></ng-content>\r\n </div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
60
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SpxCardGridComponent, isStandalone: true, selector: "spx-card-grid", inputs: { minWidth2Columns: { classPropertyName: "minWidth2Columns", publicName: "minWidth2Columns", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class='grid gap-3 items-stretch'\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\n <ng-content></ng-content>\n </div>", changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
132
61
  }
133
62
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardGridComponent, decorators: [{
134
63
  type: Component,
135
- args: [{ selector: 'spx-card-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class='grid gap-3 items-stretch'\r\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\r\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\r\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\r\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\r\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\r\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\r\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\r\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\r\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\r\n <ng-content></ng-content>\r\n </div>" }]
64
+ args: [{ selector: 'spx-card-grid', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class='grid gap-3 items-stretch'\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\n <ng-content></ng-content>\n </div>" }]
136
65
  }] });
137
66
 
138
67
  class SpxCardLineComponent {
@@ -151,11 +80,11 @@ class SpxCardLineComponent {
151
80
  return val || val === 0 ? val : '—';
152
81
  }
153
82
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
154
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxCardLineComponent, isStandalone: true, selector: "spx-card-line", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showPositiveOrNegative: { classPropertyName: "showPositiveOrNegative", publicName: "showPositiveOrNegative", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, secondValue: { classPropertyName: "secondValue", publicName: "secondValue", isSignal: true, isRequired: false, transformFunction: null }, showProgress: { classPropertyName: "showProgress", publicName: "showProgress", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, newOrderScreen: { classPropertyName: "newOrderScreen", publicName: "newOrderScreen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\r\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\r\n <div class=\"flex\">\r\n @if (icon()) {\r\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\r\n }\r\n @if (showPositiveOrNegative() && numericValue() < 0) {\r\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\">&nbsp;</div>\r\n }\r\n @if (!showProgress()) {\r\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\r\n <span [innerHTML]=\"displayValue(value())\"></span>\r\n <ng-content></ng-content>\r\n @if (unit()) {\r\n <span> {{ unit() }}</span>\r\n }\r\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\r\n / {{ displayValue(secondValue()) }}\r\n }\r\n </span>\r\n }\r\n </div>\r\n @if (showProgress()) {\r\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\r\n <div class=\"flex\">\r\n <div class=\"flex grow gap-2\">\r\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\r\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\r\n </div>\r\n </div>\r\n <div class=\"flex text-left pl-3 gap-2\">\r\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>", dependencies: [{ kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
83
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.5", type: SpxCardLineComponent, isStandalone: true, selector: "spx-card-line", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, showPositiveOrNegative: { classPropertyName: "showPositiveOrNegative", publicName: "showPositiveOrNegative", isSignal: true, isRequired: false, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, secondValue: { classPropertyName: "secondValue", publicName: "secondValue", isSignal: true, isRequired: false, transformFunction: null }, showProgress: { classPropertyName: "showProgress", publicName: "showProgress", isSignal: true, isRequired: false, transformFunction: null }, unit: { classPropertyName: "unit", publicName: "unit", isSignal: true, isRequired: false, transformFunction: null }, newOrderScreen: { classPropertyName: "newOrderScreen", publicName: "newOrderScreen", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, ngImport: i0, template: "<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\n <div class=\"flex\">\n @if (icon()) {\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\n }\n @if (showPositiveOrNegative() && numericValue() < 0) {\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\">&nbsp;</div>\n }\n @if (!showProgress()) {\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\n <span [innerHTML]=\"displayValue(value())\"></span>\n <ng-content></ng-content>\n @if (unit()) {\n <span> {{ unit() }}</span>\n }\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\n / {{ displayValue(secondValue()) }}\n }\n </span>\n }\n </div>\n @if (showProgress()) {\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\n <div class=\"flex\">\n <div class=\"flex grow gap-2\">\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\n </div>\n </div>\n <div class=\"flex text-left pl-3 gap-2\">\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\n </div>\n </div>\n </div>\n }\n</div>", dependencies: [{ kind: "ngmodule", type: FontAwesomeModule }, { kind: "component", type: i1.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
155
84
  }
156
85
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardLineComponent, decorators: [{
157
86
  type: Component,
158
- args: [{ selector: 'spx-card-line', imports: [FontAwesomeModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\r\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\r\n <div class=\"flex\">\r\n @if (icon()) {\r\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\r\n }\r\n @if (showPositiveOrNegative() && numericValue() < 0) {\r\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\">&nbsp;</div>\r\n }\r\n @if (!showProgress()) {\r\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\r\n <span [innerHTML]=\"displayValue(value())\"></span>\r\n <ng-content></ng-content>\r\n @if (unit()) {\r\n <span> {{ unit() }}</span>\r\n }\r\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\r\n / {{ displayValue(secondValue()) }}\r\n }\r\n </span>\r\n }\r\n </div>\r\n @if (showProgress()) {\r\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\r\n <div class=\"flex\">\r\n <div class=\"flex grow gap-2\">\r\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\r\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\r\n </div>\r\n </div>\r\n <div class=\"flex text-left pl-3 gap-2\">\r\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>" }]
87
+ args: [{ selector: 'spx-card-line', imports: [FontAwesomeModule], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\n <div class=\"flex\">\n @if (icon()) {\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\n }\n @if (showPositiveOrNegative() && numericValue() < 0) {\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\">&nbsp;</div>\n }\n @if (!showProgress()) {\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\n <span [innerHTML]=\"displayValue(value())\"></span>\n <ng-content></ng-content>\n @if (unit()) {\n <span> {{ unit() }}</span>\n }\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\n / {{ displayValue(secondValue()) }}\n }\n </span>\n }\n </div>\n @if (showProgress()) {\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\n <div class=\"flex\">\n <div class=\"flex grow gap-2\">\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\n </div>\n </div>\n <div class=\"flex text-left pl-3 gap-2\">\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\n </div>\n </div>\n </div>\n }\n</div>" }]
159
88
  }] });
160
89
 
161
90
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-card.mjs","sources":["../../../../projects/softpak/components/spx-card/spx-card.component.ts","../../../../projects/softpak/components/spx-card/spx-card-item/spx-card-item.component.ts","../../../../projects/softpak/components/spx-card/spx-card-item/spx-card-item.component.html","../../../../projects/softpak/components/spx-card/spx-card-grid/spx-card-grid.component.ts","../../../../projects/softpak/components/spx-card/spx-card-grid/spx-card-grid.component.html","../../../../projects/softpak/components/spx-card/spx-card-line/spx-card-line.component.ts","../../../../projects/softpak/components/spx-card/spx-card-line/spx-card-line.component.html","../../../../projects/softpak/components/spx-card/softpak-components-spx-card.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\r\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'spx-card',\r\n imports: [\r\n NgClass\r\n ],\r\n template: `\r\n <button type=\"button\"\r\n class=\"block w-full text-left rounded font-body items-stretch\"\r\n [class.flex]=\"tableView\"\r\n [class.cursor-pointer]=\"clickable\"\r\n [class.cursor-not-allowed]=\"!clickable\"\r\n [class.focus:ring-2]=\"clickable\"\r\n [class.focus:ring-offset-2]=\"clickable\"\r\n [class.focus:ring-blue-500]=\"clickable\"\r\n (click)=\"onClick()\"\r\n [tabIndex]=\"clickable ? 0 : -1\">\r\n <div class=\"text-gray-900 opacity-90\" [class.w-96]=\"tableView\">\r\n <ng-content select=\"[card-header]\"></ng-content>\r\n </div>\r\n <ng-content select=\"[card-content-top]\"></ng-content>\r\n @if (hasContent) {\r\n <div class=\"bg-white dark:bg-gray-600 p-3\">\r\n <ng-content select=\"[card-content]\"></ng-content>\r\n </div>\r\n }\r\n <ng-content select=\"[card-content-bottom]\"></ng-content>\r\n <div class=\"bg-gray-50 dark:bg-gray-700 p-3 grow\" [class.rounded-b-lg]=\"!onDetailPage && !tableView\" [class.rounded-r-lg]=\"!onDetailPage && tableView\">\r\n <ng-content select=\"[card-lines]\"></ng-content>\r\n </div>\r\n </button>\r\n `\r\n})\r\nexport class SpxCardComponent {\r\n @Input() clickable = true;\r\n @Input() hasContent = true;\r\n @Input() onDetailPage = false;\r\n @Input() text!: string;\r\n @Input() unit?: string;\r\n @Input() tableView = false;\r\n @Output() clicked: EventEmitter<void> = new EventEmitter<void>();\r\n\r\n constructor() { }\r\n\r\n displayValue(val: string | number): string | number {\r\n return val || (val === 0) ? val : '—';\r\n }\r\n\r\n onClick(): void {\r\n this.clicked.emit();\r\n }\r\n}\r\n","\r\nimport { ChangeDetectionStrategy, Component, HostBinding, input } from '@angular/core';\r\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\r\nimport { IconProp } from '@fortawesome/angular-fontawesome/types';\r\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\r\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\r\n\r\n@Component({\r\n selector: 'spx-card-item',\r\n imports: [\r\n FaIconComponent,\r\n IsSeverityPipe\r\n ],\r\n templateUrl: './spx-card-item.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SpxCardItemComponent {\r\n @HostBinding('class.h-full') hFull = true;\r\n readonly icon = input<IconProp>();\r\n readonly iconOnly = input(false);\r\n readonly spxLabel = input.required<string>();\r\n readonly spxValue = input<string>();\r\n readonly spxSeverity = input<SpxSeverityEnum>();\r\n readonly spxIconSeverity = input<SpxSeverityEnum>();\r\n SpxSeverityEnum = SpxSeverityEnum;\r\n}\r\n","<div class='py-2 px-3 rounded h-full'\r\n [class.bg-slate-100]=\"!spxSeverity()\"\r\n [class.dark:bg-slate-600]=\"!spxSeverity()\"\r\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\r\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\r\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\r\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\r\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\r\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\r\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\r\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\r\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\r\n @if (icon()) {\r\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\r\n <div\r\n class=\"px-3 py-1 text-white rounded\"\r\n [class.bg-black]=\"!spxIconSeverity()\"\r\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\r\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\r\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\r\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\r\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\r\n <fa-icon [icon]=\"icon()!\"></fa-icon>\r\n </div>\r\n </div>\r\n }\r\n <div class=\"grow font-bold\">\r\n @if (!iconOnly()) {\r\n <ng-content></ng-content><div [innerHTML]=\"spxValue()\"></div>\r\n }\r\n </div>\r\n </div>\r\n </div>","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'spx-card-grid',\r\n standalone: true,\r\n templateUrl: './spx-card-grid.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SpxCardGridComponent {\r\n readonly minWidth2Columns = input<(300 | 320 | 340 | 360 | 380 | 400 | 420 | 440 | 460) | undefined>(460);\r\n}\r\n","<div class='grid gap-3 items-stretch'\r\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\r\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\r\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\r\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\r\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\r\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\r\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\r\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\r\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\r\n <ng-content></ng-content>\r\n </div>","import { ChangeDetectionStrategy, Component, computed, input, model } from '@angular/core';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\nimport { IconProp } from '@fortawesome/angular-fontawesome/types';\r\n\r\n@Component({\r\n selector: 'spx-card-line',\r\n imports: [FontAwesomeModule],\r\n templateUrl: './spx-card-line.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class SpxCardLineComponent {\r\n readonly icon = input<IconProp>();\r\n readonly showPositiveOrNegative = input(false);\r\n readonly text = input<string | unknown>();\r\n readonly value = model.required<string | number>();\r\n readonly secondValue = input<string | number>();\r\n readonly showProgress = input<boolean>();\r\n readonly unit = input<string>();\r\n readonly newOrderScreen = input(false);\r\n\r\n numericValue = computed(() => {return this.value() as number});\r\n\r\n public displayValue(val: string | number | unknown): string | number | unknown {\r\n return val || val === 0 ? val : '—';\r\n }\r\n}\r\n","<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\r\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\r\n <div class=\"flex\">\r\n @if (icon()) {\r\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\r\n }\r\n @if (showPositiveOrNegative() && numericValue() < 0) {\r\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\">&nbsp;</div>\r\n }\r\n @if (!showProgress()) {\r\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\r\n <span [innerHTML]=\"displayValue(value())\"></span>\r\n <ng-content></ng-content>\r\n @if (unit()) {\r\n <span> {{ unit() }}</span>\r\n }\r\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\r\n / {{ displayValue(secondValue()) }}\r\n }\r\n </span>\r\n }\r\n </div>\r\n @if (showProgress()) {\r\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\r\n <div class=\"flex\">\r\n <div class=\"flex grow gap-2\">\r\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\r\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\r\n </div>\r\n </div>\r\n <div class=\"flex text-left pl-3 gap-2\">\r\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\r\n </div>\r\n </div>\r\n </div>\r\n }\r\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAmCa,gBAAgB,CAAA;AAS3B,IAAA,WAAA,GAAA;QARS,IAAS,CAAA,SAAA,GAAG,IAAI;QAChB,IAAU,CAAA,UAAA,GAAG,IAAI;QACjB,IAAY,CAAA,YAAA,GAAG,KAAK;QAGpB,IAAS,CAAA,SAAA,GAAG,KAAK;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EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECVjC,4lDAoCM,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,ED9BQ,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAIlB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBANhC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,WAChB,CAAC,iBAAiB,CAAC,EAEX,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,4lDAAA,EAAA;;;AERnD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-card.mjs","sources":["../../../../projects/softpak/components/spx-card/spx-card.component.ts","../../../../projects/softpak/components/spx-card/spx-card.component.html","../../../../projects/softpak/components/spx-card/spx-card-item/spx-card-item.component.ts","../../../../projects/softpak/components/spx-card/spx-card-item/spx-card-item.component.html","../../../../projects/softpak/components/spx-card/spx-card-grid/spx-card-grid.component.ts","../../../../projects/softpak/components/spx-card/spx-card-grid/spx-card-grid.component.html","../../../../projects/softpak/components/spx-card/spx-card-line/spx-card-line.component.ts","../../../../projects/softpak/components/spx-card/spx-card-line/spx-card-line.component.html","../../../../projects/softpak/components/spx-card/softpak-components-spx-card.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\n\n@Component({\n selector: 'spx-card',\n templateUrl: './spx-card.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxCardComponent {\n readonly clickable = input(true);\n readonly hasContent = input(true);\n readonly onDetailPage = input(false);\n readonly text = input<string>();\n readonly unit = input<string>();\n readonly tableView = input(false);\n clicked = output();\n\n constructor() { }\n\n displayValue(val: string | number): string | number {\n return val || (val === 0) ? val : '—';\n }\n\n onClick(): void {\n this.clicked.emit();\n }\n}\n","<button type=\"button\"\nclass=\"block w-full text-left rounded font-body items-stretch\"\n[class.flex]=\"tableView()\"\n[class.cursor-pointer]=\"clickable()\"\n[class.cursor-not-allowed]=\"!clickable()\"\n[class.focus:ring-2]=\"clickable()\"\n[class.focus:ring-offset-2]=\"clickable()\"\n[class.focus:ring-blue-500]=\"clickable()\"\n(click)=\"onClick()\"\n[tabIndex]=\"clickable() ? 0 : -1\">\n<div class=\"text-gray-900 opacity-90\" [class.w-96]=\"tableView()\">\n <ng-content select=\"[card-header]\"></ng-content>\n</div>\n<ng-content select=\"[card-content-top]\"></ng-content>\n@if (hasContent()) {\n <div class=\"bg-white dark:bg-gray-600 p-3\">\n <ng-content select=\"[card-content]\"></ng-content>\n </div>\n}\n<ng-content select=\"[card-content-bottom]\"></ng-content>\n<div class=\"bg-gray-50 dark:bg-gray-700 p-3 grow\" [class.rounded-b-lg]=\"!onDetailPage() && !tableView()\" [class.rounded-r-lg]=\"!onDetailPage() && tableView()\">\n <ng-content select=\"[card-lines]\"></ng-content>\n</div>\n</button>","\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { IconProp } from '@fortawesome/angular-fontawesome/types';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { IsSeverityPipe } from '@softpak/components/spx-pipes';\n\n@Component({\n selector: 'spx-card-item',\n imports: [\n FaIconComponent,\n IsSeverityPipe\n ],\n templateUrl: './spx-card-item.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class.h-full]': 'true',\n },\n})\nexport class SpxCardItemComponent {\n readonly icon = input<IconProp>();\n readonly iconOnly = input(false);\n readonly spxLabel = input.required<string>();\n readonly spxValue = input<string>();\n readonly spxSeverity = input<SpxSeverityEnum>();\n readonly spxIconSeverity = input<SpxSeverityEnum>();\n SpxSeverityEnum = SpxSeverityEnum;\n}\n","<div class='py-2 px-3 rounded h-full'\n [class.bg-slate-100]=\"!spxSeverity()\"\n [class.dark:bg-slate-600]=\"!spxSeverity()\"\n [class.text-black]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\"\n [class.text-white]=\"this.spxSeverity() | isSeverity: [SpxSeverityEnum.error, SpxSeverityEnum.success, SpxSeverityEnum.unknown, SpxSeverityEnum.info]\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <div class=\"font-small leading-normal\">{{ spxLabel() }}</div>\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\n @if (icon()) {\n <div class=\"font-bold text-center leading-normal max-w-12 min-w-12\" [class.grow]=\"iconOnly()\">\n <div\n class=\"px-3 py-1 text-white rounded\"\n [class.bg-black]=\"!spxIconSeverity()\"\n [class.bg-red-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.error\"\n [class.bg-green-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.success\"\n [class.bg-blue-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.info\"\n [class.bg-gray-400]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.unknown\"\n [class.bg-amber-700]=\"this.spxSeverity() | isSeverity: SpxSeverityEnum.warning\">\n <fa-icon [icon]=\"icon()!\"></fa-icon>\n </div>\n </div>\n }\n <div class=\"grow font-bold\">\n @if (!iconOnly()) {\n <ng-content></ng-content><div [innerHTML]=\"spxValue()\"></div>\n }\n </div>\n </div>\n </div>","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-card-grid',\n standalone: true,\n templateUrl: './spx-card-grid.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class SpxCardGridComponent {\n readonly minWidth2Columns = input<(300 | 320 | 340 | 360 | 380 | 400 | 420 | 440 | 460) | undefined>(460);\n}\n","<div class='grid gap-3 items-stretch'\n [class.min-[300px]:grid-cols-2]=\"minWidth2Columns() == 300\"\n [class.min-[320px]:grid-cols-2]=\"minWidth2Columns() == 320\"\n [class.min-[340px]:grid-cols-2]=\"minWidth2Columns() == 340\"\n [class.min-[360px]:grid-cols-2]=\"minWidth2Columns() == 360\"\n [class.min-[380px]:grid-cols-2]=\"minWidth2Columns() == 380\"\n [class.min-[400px]:grid-cols-2]=\"minWidth2Columns() == 400\"\n [class.min-[420px]:grid-cols-2]=\"minWidth2Columns() == 420\"\n [class.min-[440px]:grid-cols-2]=\"minWidth2Columns() == 440\"\n [class.min-[460px]:grid-cols-2]=\"minWidth2Columns() == 460\">\n <ng-content></ng-content>\n </div>","import { ChangeDetectionStrategy, Component, computed, input, model } from '@angular/core';\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\nimport { IconProp } from '@fortawesome/angular-fontawesome/types';\n\n@Component({\n selector: 'spx-card-line',\n imports: [FontAwesomeModule],\n templateUrl: './spx-card-line.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxCardLineComponent {\n readonly icon = input<IconProp>();\n readonly showPositiveOrNegative = input(false);\n readonly text = input<string | unknown>();\n readonly value = model.required<string | number>();\n readonly secondValue = input<string | number>();\n readonly showProgress = input<boolean>();\n readonly unit = input<string>();\n readonly newOrderScreen = input(false);\n\n numericValue = computed(() => {return this.value() as number});\n\n public displayValue(val: string | number | unknown): string | number | unknown {\n return val || val === 0 ? val : '—';\n }\n}\n","<div class=\"items-center\" [class.flex]=\"!newOrderScreen()\">\n <div class=\"block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1\" [class.pt-1]=\"!newOrderScreen()\" [innerHTML]=\"text()\"></div>\n <div class=\"flex\">\n @if (icon()) {\n <fa-icon [icon]=\"icon()!\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\n }\n @if (showPositiveOrNegative() && numericValue() < 0) {\n <div class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\">&nbsp;</div>\n }\n @if (!showProgress()) {\n <span class=\"block font-medium grow whitespace-pre-line leading-5\">\n <span [innerHTML]=\"displayValue(value())\"></span>\n <ng-content></ng-content>\n @if (unit()) {\n <span> {{ unit() }}</span>\n }\n @if (!unit() && secondValue() !== null && secondValue() !== undefined) {\n / {{ displayValue(secondValue()) }}\n }\n </span>\n }\n </div>\n @if (showProgress()) {\n <div class=\"block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200\">\n <div class=\"flex\">\n <div class=\"flex grow gap-2\">\n <div class=\"bg-gray-200 my-0.5 h-5 w-full rounded\">\n <div class=\"bg-teal-600 h-5 rounded\" [style.width]=\"((+value()) / (secondValue() ? +secondValue()! : 0)) * 100 + '%'\"></div>\n </div>\n </div>\n <div class=\"flex text-left pl-3 gap-2\">\n <div class=\"block w-16 text-right\">{{ value() }} / {{ secondValue() }}</div>\n </div>\n </div>\n </div>\n }\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAQa,gBAAgB,CAAA;AAS3B,IAA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ED9BQ,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,OAAA,EAAA,WAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,MAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,YAAA,EAAA,WAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKlB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;+BACI,eAAe,EAAA,OAAA,EAChB,CAAC,iBAAiB,CAAC,mBAEX,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,ohDAAA,EAAA;;;AETpB;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Component, Input, Output } from '@angular/core';
2
+ import { input, computed, output, effect, Component, ChangeDetectionStrategy } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
4
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
5
  import { SpxFormButtonTypeEnum, SpxFormViewComponent } from '@softpak/components/spx-form-view';
@@ -17,27 +17,32 @@ const ctrlLicensePlate = 'licensePlate';
17
17
  const ctrlCategory = 'category';
18
18
  const ctrlUseCategories = 'useCategories';
19
19
  class SpxChangeDetailsComponent {
20
- get ctrlCategory() { return this.formGroup.get(ctrlCategory); }
21
- get ctrlCustomer() { return this.formGroup.get(ctrlCustomer); }
22
- get ctrlContainerType() { return this.formGroup.get(ctrlContainerType); }
23
- get ctrlLicensePlate() { return this.formGroup.get(ctrlLicensePlate); }
24
- get ctrlTonsTested() { return this.formGroup?.get(ctrlTonsTested); }
25
- get ctrlUseCategories() { return this.formGroup?.get(ctrlUseCategories); }
26
20
  constructor(formBuilder) {
27
21
  this.formBuilder = formBuilder;
28
- this.suggestions = {};
29
- this.spxBlurCategory = new EventEmitter();
30
- this.spxBlurContainerType = new EventEmitter();
31
- this.spxSearchCategory = new EventEmitter();
32
- this.spxSearchContainerType = new EventEmitter();
33
- this.spxSearchTonsTested = new EventEmitter();
34
- this.submit = new EventEmitter();
22
+ this.formGroup = input.required();
23
+ this.suggestions = input.required();
24
+ this.showTonsTested = computed(() => this.suggestions()?.[ctrlTonsTested] &&
25
+ this.suggestions()?.[ctrlTonsTested].length &&
26
+ this.suggestions()?.[ctrlTonsTested].length > 0);
27
+ this.textCategory = input.required();
28
+ this.textContainerNumber = input.required();
29
+ this.textContainerType = input.required();
30
+ this.textCustomer = input.required();
31
+ this.textLicensePlate = input.required();
32
+ this.textSave = input.required();
33
+ this.textTonsTested = input.required();
34
+ this.spxBlurCategory = output();
35
+ this.spxBlurContainerType = output();
36
+ this.spxSearchCategory = output();
37
+ this.spxSearchContainerType = output();
38
+ this.spxSearchTonsTested = output();
39
+ this.submit = output();
35
40
  this.form = {
36
41
  buttons: [
37
42
  {
38
43
  severity: SpxSeverityEnum.success,
39
44
  type: SpxFormButtonTypeEnum.submit,
40
- label: () => this.textSave,
45
+ label: () => this.textSave(),
41
46
  }
42
47
  ],
43
48
  sections: [
@@ -53,7 +58,7 @@ class SpxChangeDetailsComponent {
53
58
  {
54
59
  key: ctrlContainerNumber,
55
60
  type: () => SpxInputTypeEnum.text,
56
- label: () => this.textContainerNumber,
61
+ label: () => this.textContainerNumber(),
57
62
  readonly: () => true,
58
63
  validators: () => [spxValidatorRequired()],
59
64
  },
@@ -62,27 +67,26 @@ class SpxChangeDetailsComponent {
62
67
  type: () => SpxInputTypeEnum.text,
63
68
  capitalize: () => true,
64
69
  readonly: () => true,
65
- label: () => this.textCustomer,
70
+ label: () => this.textCustomer(),
66
71
  validators: () => [spxValidatorRequired()],
67
72
  },
68
73
  {
69
74
  key: ctrlContainerType,
70
75
  type: () => SpxInputTypeEnum.autocomplete,
71
- label: () => this.textContainerType,
76
+ label: () => this.textContainerType(),
72
77
  capitalize: () => true,
73
78
  validators: () => [spxValidatorRequired()],
74
79
  },
75
80
  {
76
81
  key: ctrlTonsTested,
77
82
  type: () => SpxInputTypeEnum.radio,
78
- label: () => this.textTonsTested,
79
- show: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0,
80
- validators: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0 ? [spxValidatorRequired()] : [],
83
+ label: () => this.textTonsTested(),
84
+ show: () => this.showTonsTested(),
81
85
  },
82
86
  {
83
87
  key: ctrlLicensePlate,
84
88
  type: () => SpxInputTypeEnum.text,
85
- label: () => this.textLicensePlate,
89
+ label: () => this.textLicensePlate(),
86
90
  capitalize: () => true,
87
91
  },
88
92
  {
@@ -93,15 +97,31 @@ class SpxChangeDetailsComponent {
93
97
  {
94
98
  key: ctrlCategory,
95
99
  type: () => SpxInputTypeEnum.autocomplete,
96
- label: () => this.textCategory,
100
+ label: () => this.textCategory(),
97
101
  capitalize: () => true,
98
- show: () => valuePairToValue(this.ctrlUseCategories?.value),
99
- validators: () => valuePairToValue(this.ctrlUseCategories?.value) ? [spxValidatorRequired()] : [],
102
+ show: () => valuePairToValue(this.ctrlUseCategories()?.value),
103
+ validators: () => valuePairToValue(this.ctrlUseCategories()?.value) ? [spxValidatorRequired()] : [],
100
104
  }
101
105
  ]
102
106
  }
103
107
  ]
104
108
  };
109
+ this.ctrlCategory = computed(() => this.formGroup().get(ctrlCategory));
110
+ this.ctrlCustomer = computed(() => this.formGroup().get(ctrlCustomer));
111
+ this.ctrlContainerType = computed(() => this.formGroup().get(ctrlContainerType));
112
+ this.ctrlLicensePlate = computed(() => this.formGroup().get(ctrlLicensePlate));
113
+ this.ctrlTonsTested = computed(() => this.formGroup()?.get(ctrlTonsTested));
114
+ this.ctrlUseCategories = computed(() => this.formGroup()?.get(ctrlUseCategories));
115
+ effect(() => {
116
+ if (this.showTonsTested()) {
117
+ this.ctrlTonsTested().addValidators([spxValidatorRequired()]);
118
+ this.ctrlTonsTested().updateValueAndValidity();
119
+ }
120
+ else {
121
+ this.ctrlTonsTested().clearValidators();
122
+ this.ctrlTonsTested().updateValueAndValidity();
123
+ }
124
+ });
105
125
  }
106
126
  createForm() {
107
127
  return SpxFormViewComponent.createForm(this.formBuilder, this.form.sections);
@@ -138,20 +158,20 @@ class SpxChangeDetailsComponent {
138
158
  }
139
159
  onSubmit() {
140
160
  this.submit.emit({
141
- category: valuePairToValue(this.ctrlUseCategories.value) ? this.ctrlCategory.value : null,
142
- containerType: this.ctrlContainerType.value,
143
- licensePlate: this.ctrlLicensePlate.value,
144
- tonsTested: this.ctrlTonsTested.value,
161
+ category: valuePairToValue(this.ctrlUseCategories().value) ? this.ctrlCategory().value : null,
162
+ containerType: this.ctrlContainerType().value,
163
+ licensePlate: this.ctrlLicensePlate().value,
164
+ tonsTested: this.ctrlTonsTested().value,
145
165
  });
146
166
  }
147
167
  listenToContainerType() {
148
- this.subContainerType = this.ctrlContainerType.valueChanges.subscribe(valuePair => {
149
- this.ctrlTonsTested.setValue({ value: null });
168
+ this.subContainerType = this.ctrlContainerType().valueChanges.subscribe(valuePair => {
169
+ this.ctrlTonsTested().setValue({ value: null });
150
170
  this.spxSearchTonsTested.emit(valuePair);
151
171
  });
152
172
  }
153
173
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxChangeDetailsComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
154
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.5", type: SpxChangeDetailsComponent, isStandalone: true, selector: "spx-change-details", inputs: { formGroup: "formGroup", suggestions: "suggestions", textCategory: "textCategory", textContainerNumber: "textContainerNumber", textContainerType: "textContainerType", textCustomer: "textCustomer", textLicensePlate: "textLicensePlate", textSave: "textSave", textTonsTested: "textTonsTested" }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerType: "spxBlurContainerType", spxSearchCategory: "spxSearchCategory", spxSearchContainerType: "spxSearchContainerType", spxSearchTonsTested: "spxSearchTonsTested", submit: "submit" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\r\n <spx-form-view\r\n [spxFormGroup]=\"formGroup\"\r\n [spxForm]=\"form\"\r\n [spxSuggestions]=\"suggestions\"\r\n (spxBlur)=\"onBlur($event)\"\r\n (spxSearch)=\"onSearch($event)\">\r\n </spx-form-view>\r\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }] }); }
174
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.5", type: SpxChangeDetailsComponent, isStandalone: true, selector: "spx-change-details", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: true, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: true, transformFunction: null }, textCategory: { classPropertyName: "textCategory", publicName: "textCategory", isSignal: true, isRequired: true, transformFunction: null }, textContainerNumber: { classPropertyName: "textContainerNumber", publicName: "textContainerNumber", isSignal: true, isRequired: true, transformFunction: null }, textContainerType: { classPropertyName: "textContainerType", publicName: "textContainerType", isSignal: true, isRequired: true, transformFunction: null }, textCustomer: { classPropertyName: "textCustomer", publicName: "textCustomer", isSignal: true, isRequired: true, transformFunction: null }, textLicensePlate: { classPropertyName: "textLicensePlate", publicName: "textLicensePlate", isSignal: true, isRequired: true, transformFunction: null }, textSave: { classPropertyName: "textSave", publicName: "textSave", isSignal: true, isRequired: true, transformFunction: null }, textTonsTested: { classPropertyName: "textTonsTested", publicName: "textTonsTested", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerType: "spxBlurContainerType", spxSearchCategory: "spxSearchCategory", spxSearchContainerType: "spxSearchContainerType", spxSearchTonsTested: "spxSearchTonsTested", submit: "submit" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
155
175
  }
156
176
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
157
177
  type: Component,
@@ -159,38 +179,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
159
179
  FormsModule,
160
180
  ReactiveFormsModule,
161
181
  SpxFormViewComponent,
162
- ], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\r\n <spx-form-view\r\n [spxFormGroup]=\"formGroup\"\r\n [spxForm]=\"form\"\r\n [spxSuggestions]=\"suggestions\"\r\n (spxBlur)=\"onBlur($event)\"\r\n (spxSearch)=\"onSearch($event)\">\r\n </spx-form-view>\r\n</form>" }]
163
- }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { formGroup: [{
164
- type: Input
165
- }], suggestions: [{
166
- type: Input
167
- }], textCategory: [{
168
- type: Input
169
- }], textContainerNumber: [{
170
- type: Input
171
- }], textContainerType: [{
172
- type: Input
173
- }], textCustomer: [{
174
- type: Input
175
- }], textLicensePlate: [{
176
- type: Input
177
- }], textSave: [{
178
- type: Input
179
- }], textTonsTested: [{
180
- type: Input
181
- }], spxBlurCategory: [{
182
- type: Output
183
- }], spxBlurContainerType: [{
184
- type: Output
185
- }], spxSearchCategory: [{
186
- type: Output
187
- }], spxSearchContainerType: [{
188
- type: Output
189
- }], spxSearchTonsTested: [{
190
- type: Output
191
- }], submit: [{
192
- type: Output
193
- }] } });
182
+ ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formGroup()\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n</form>" }]
183
+ }], ctorParameters: () => [{ type: i1.FormBuilder }] });
194
184
 
195
185
  /**
196
186
  * Generated bundle index. Do not edit.