@softpak/components 19.17.0-beta.3 → 19.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/fesm2022/softpak-components-spx-alert.mjs +6 -7
  2. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  3. package/fesm2022/softpak-components-spx-app-expiry.mjs +91 -23
  4. package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
  5. package/fesm2022/softpak-components-spx-button.mjs +22 -8
  6. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  7. package/fesm2022/softpak-components-spx-card.mjs +88 -17
  8. package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
  9. package/fesm2022/softpak-components-spx-change-details.mjs +64 -48
  10. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
  11. package/fesm2022/softpak-components-spx-check-digit.mjs +27 -23
  12. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  13. package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
  14. package/fesm2022/softpak-components-spx-form-section.mjs +33 -8
  15. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  16. package/fesm2022/softpak-components-spx-form-view.mjs +53 -39
  17. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
  18. package/fesm2022/softpak-components-spx-inputs.mjs +6 -15
  19. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  20. package/fesm2022/softpak-components-spx-navigation.mjs +89 -34
  21. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  22. package/fesm2022/softpak-components-spx-number-check.mjs +198 -91
  23. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  24. package/fesm2022/softpak-components-spx-pagination.mjs +21 -12
  25. package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
  26. package/fesm2022/softpak-components-spx-patch.mjs +39 -8
  27. package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
  28. package/fesm2022/softpak-components-spx-progress-bar.mjs +22 -8
  29. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  30. package/fesm2022/softpak-components-spx-spinner.mjs +160 -15
  31. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  32. package/fesm2022/softpak-components-spx-stock-info.mjs +128 -71
  33. package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
  34. package/fesm2022/softpak-components-spx-toaster.mjs +162 -35
  35. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  36. package/fesm2022/softpak-components-spx-update.mjs +3 -3
  37. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  38. package/fesm2022/softpak-components-spx-validation.mjs +54 -68
  39. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  40. package/package.json +9 -9
  41. package/spx-alert/spx-alert.component.d.ts +1 -1
  42. package/spx-app-expiry/spx-app-expiry.component.d.ts +14 -14
  43. package/spx-button/spx-button.component.d.ts +3 -0
  44. package/spx-card/spx-card-item/spx-card-item.component.d.ts +1 -0
  45. package/spx-card/spx-card.component.d.ts +9 -8
  46. package/spx-change-details/spx-change-details.component.d.ts +23 -22
  47. package/spx-check-digit/spx-check-digit.component.d.ts +9 -9
  48. package/spx-form-section/spx-form-section.component.d.ts +5 -5
  49. package/spx-form-view/spx-autocomplete-search.component.d.ts +16 -15
  50. package/spx-form-view/spx-form-view.component.d.ts +1 -1
  51. package/spx-inputs/spx-input-text/spx-input-text.component.d.ts +1 -4
  52. package/spx-inputs/spx-input.component.d.ts +0 -1
  53. package/spx-navigation/public-api.d.ts +2 -2
  54. package/spx-navigation/spx-home-tile.component.d.ts +11 -0
  55. package/spx-navigation/{spx-home-tile/spx-home-tiles.component.d.ts → spx-home-tiles.component.d.ts} +2 -2
  56. package/spx-navigation/spx-navigation.component.d.ts +8 -11
  57. package/spx-navigation/store/spx-navigation/spx-navigation.actions.d.ts +3 -3
  58. package/spx-number-check/spx-number-check.component.d.ts +32 -26
  59. package/spx-pagination/spx-pagination.component.d.ts +10 -9
  60. package/spx-patch/spx-patch.component.d.ts +4 -4
  61. package/spx-progress-bar/spx-progress-bar.component.d.ts +3 -3
  62. package/spx-spinner/spx-spinner.component.d.ts +3 -3
  63. package/spx-stock-info/spx-stock-info.component.d.ts +49 -48
  64. package/spx-toaster/src/spx-toaster-message.interface.d.ts +1 -5
  65. package/spx-toaster/src/spx-toaster.component.d.ts +14 -6
  66. package/spx-validation/spx-validate-control.component.d.ts +19 -19
  67. package/tailwind.css +1 -1
  68. package/spx-navigation/spx-home-tile/spx-home-tile.component.d.ts +0 -11
@@ -1,5 +1,6 @@
1
+ import { NgClass } from '@angular/common';
1
2
  import * as i0 from '@angular/core';
2
- import { input, output, Component, ChangeDetectionStrategy, model, computed } from '@angular/core';
3
+ import { EventEmitter, Component, Input, Output, input, ChangeDetectionStrategy, HostBinding, model, computed } from '@angular/core';
3
4
  import * as i1 from '@fortawesome/angular-fontawesome';
4
5
  import { FaIconComponent, FontAwesomeModule } from '@fortawesome/angular-fontawesome';
5
6
  import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
@@ -7,13 +8,11 @@ import { IsSeverityPipe } from '@softpak/components/spx-pipes';
7
8
 
8
9
  class SpxCardComponent {
9
10
  constructor() {
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();
11
+ this.clickable = true;
12
+ this.hasContent = true;
13
+ this.onDetailPage = false;
14
+ this.tableView = false;
15
+ this.clicked = new EventEmitter();
17
16
  }
18
17
  displayValue(val) {
19
18
  return val || (val === 0) ? val : '—';
@@ -22,15 +21,86 @@ class SpxCardComponent {
22
21
  this.clicked.emit();
23
22
  }
24
23
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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 }); }
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 }); }
26
50
  }
27
51
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardComponent, decorators: [{
28
52
  type: Component,
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: () => [] });
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
+ }] } });
31
100
 
32
101
  class SpxCardItemComponent {
33
102
  constructor() {
103
+ this.hFull = true;
34
104
  this.icon = input();
35
105
  this.iconOnly = input(false);
36
106
  this.spxLabel = input.required();
@@ -40,17 +110,18 @@ class SpxCardItemComponent {
40
110
  this.SpxSeverityEnum = SpxSeverityEnum;
41
111
  }
42
112
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
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 }); }
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'\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 }); }
44
114
  }
45
115
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardItemComponent, decorators: [{
46
116
  type: Component,
47
117
  args: [{ selector: 'spx-card-item', imports: [
48
118
  FaIconComponent,
49
119
  IsSeverityPipe
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
- }] });
120
+ ], changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
121
+ }], propDecorators: { hFull: [{
122
+ type: HostBinding,
123
+ args: ['class.h-full']
124
+ }] } });
54
125
 
55
126
  class SpxCardGridComponent {
56
127
  constructor() {
@@ -84,7 +155,7 @@ class SpxCardLineComponent {
84
155
  }
85
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxCardLineComponent, decorators: [{
86
157
  type: Component,
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>" }]
158
+ args: [{ selector: 'spx-card-line', imports: [FontAwesomeModule], changeDetection: ChangeDetectionStrategy.OnPush, 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>" }]
88
159
  }] });
89
160
 
90
161
  /**
@@ -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.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,IAAA,WAAA,GAAA;AARS,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC;AACvB,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC;AACxB,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAA,IAAA,GAAG,KAAK,EAAU;QACtB,IAAI,CAAA,IAAA,GAAG,KAAK,EAAU;AACtB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC;QACjC,IAAO,CAAA,OAAA,GAAG,MAAM,EAAE;;AAIlB,IAAA,YAAY,CAAC,GAAoB,EAAA;AAC/B,QAAA,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC,CAA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C,iBAAiB,CAAC,mBAEX,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,ohDAAA,EAAA;;;AETpB;;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-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';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'spx-card',\n imports: [\n NgClass\n ],\n template: `\n <button type=\"button\"\n class=\"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>\n `\n})\nexport class SpxCardComponent {\n @Input() clickable = true;\n @Input() hasContent = true;\n @Input() onDetailPage = false;\n @Input() text!: string;\n @Input() unit?: string;\n @Input() tableView = false;\n @Output() clicked: EventEmitter<void> = new EventEmitter<void>();\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","\nimport { ChangeDetectionStrategy, Component, HostBinding, 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})\nexport class SpxCardItemComponent {\n @HostBinding('class.h-full') hFull = true;\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})\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":";;;;;;;;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;AAChB,QAAA,IAAA,CAAA,OAAO,GAAuB,IAAI,YAAY,EAAQ;;AAIhE,IAAA,YAAY,CAAC,GAAoB,EAAA;AAC/B,QAAA,OAAO,GAAG,KAAK,GAAG,KAAK,CAAC,CAAC,GAAG,GAAG,GAAG,GAAG;;IAGvC,OAAO,GAAA;AACL,QAAA,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE;;8GAhBV,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,gBAAgB,EA3Bf,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,UAAA,EAAA,YAAA,EAAA,YAAA,EAAA,cAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,M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B,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,ohDAAA,EAAA;;;AERnD;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, output, computed, Component, ChangeDetectionStrategy } from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output } 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,29 +17,27 @@ 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); }
20
26
  constructor(formBuilder) {
21
27
  this.formBuilder = formBuilder;
22
- this.formGroup = input.required();
23
- this.suggestions = input({});
24
- this.textCategory = input.required();
25
- this.textContainerNumber = input.required();
26
- this.textContainerType = input.required();
27
- this.textCustomer = input.required();
28
- this.textLicensePlate = input.required();
29
- this.textSave = input.required();
30
- this.textTonsTested = input.required();
31
- this.spxBlurCategory = output();
32
- this.spxBlurContainerType = output();
33
- this.spxSearchCategory = output();
34
- this.spxSearchContainerType = output();
35
- this.spxSearchTonsTested = output();
36
- this.submit = output();
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();
37
35
  this.form = {
38
36
  buttons: [
39
37
  {
40
38
  severity: SpxSeverityEnum.success,
41
39
  type: SpxFormButtonTypeEnum.submit,
42
- label: () => this.textSave(),
40
+ label: () => this.textSave,
43
41
  }
44
42
  ],
45
43
  sections: [
@@ -55,7 +53,7 @@ class SpxChangeDetailsComponent {
55
53
  {
56
54
  key: ctrlContainerNumber,
57
55
  type: () => SpxInputTypeEnum.text,
58
- label: () => this.textContainerNumber(),
56
+ label: () => this.textContainerNumber,
59
57
  readonly: () => true,
60
58
  validators: () => [spxValidatorRequired()],
61
59
  },
@@ -64,33 +62,27 @@ class SpxChangeDetailsComponent {
64
62
  type: () => SpxInputTypeEnum.text,
65
63
  capitalize: () => true,
66
64
  readonly: () => true,
67
- label: () => this.textCustomer(),
65
+ label: () => this.textCustomer,
68
66
  validators: () => [spxValidatorRequired()],
69
67
  },
70
68
  {
71
69
  key: ctrlContainerType,
72
70
  type: () => SpxInputTypeEnum.autocomplete,
73
- label: () => this.textContainerType(),
71
+ label: () => this.textContainerType,
74
72
  capitalize: () => true,
75
73
  validators: () => [spxValidatorRequired()],
76
74
  },
77
75
  {
78
76
  key: ctrlTonsTested,
79
77
  type: () => SpxInputTypeEnum.radio,
80
- label: () => this.textTonsTested(),
81
- show: () => {
82
- const suggestions = this.suggestions();
83
- return suggestions?.[ctrlTonsTested] && suggestions?.[ctrlTonsTested].length && suggestions?.[ctrlTonsTested].length > 0;
84
- },
85
- validators: () => {
86
- const suggestions = this.suggestions();
87
- return suggestions?.[ctrlTonsTested] && suggestions?.[ctrlTonsTested].length && suggestions?.[ctrlTonsTested].length > 0 ? [spxValidatorRequired()] : [];
88
- },
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()] : [],
89
81
  },
90
82
  {
91
83
  key: ctrlLicensePlate,
92
84
  type: () => SpxInputTypeEnum.text,
93
- label: () => this.textLicensePlate(),
85
+ label: () => this.textLicensePlate,
94
86
  capitalize: () => true,
95
87
  },
96
88
  {
@@ -101,21 +93,15 @@ class SpxChangeDetailsComponent {
101
93
  {
102
94
  key: ctrlCategory,
103
95
  type: () => SpxInputTypeEnum.autocomplete,
104
- label: () => this.textCategory(),
96
+ label: () => this.textCategory,
105
97
  capitalize: () => true,
106
- show: () => valuePairToValue(this.ctrlUseCategories()?.value),
107
- validators: () => valuePairToValue(this.ctrlUseCategories()?.value) ? [spxValidatorRequired()] : [],
98
+ show: () => valuePairToValue(this.ctrlUseCategories?.value),
99
+ validators: () => valuePairToValue(this.ctrlUseCategories?.value) ? [spxValidatorRequired()] : [],
108
100
  }
109
101
  ]
110
102
  }
111
103
  ]
112
104
  };
113
- this.ctrlCategory = computed(() => this.formGroup().get(ctrlCategory));
114
- this.ctrlCustomer = computed(() => this.formGroup().get(ctrlCustomer));
115
- this.ctrlContainerType = computed(() => this.formGroup().get(ctrlContainerType));
116
- this.ctrlLicensePlate = computed(() => this.formGroup().get(ctrlLicensePlate));
117
- this.ctrlTonsTested = computed(() => this.formGroup()?.get(ctrlTonsTested));
118
- this.ctrlUseCategories = computed(() => this.formGroup()?.get(ctrlUseCategories));
119
105
  }
120
106
  createForm() {
121
107
  return SpxFormViewComponent.createForm(this.formBuilder, this.form.sections);
@@ -152,20 +138,20 @@ class SpxChangeDetailsComponent {
152
138
  }
153
139
  onSubmit() {
154
140
  this.submit.emit({
155
- category: valuePairToValue(this.ctrlUseCategories().value) ? this.ctrlCategory().value : null,
156
- containerType: this.ctrlContainerType().value,
157
- licensePlate: this.ctrlLicensePlate().value,
158
- tonsTested: this.ctrlTonsTested().value,
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,
159
145
  });
160
146
  }
161
147
  listenToContainerType() {
162
- this.subContainerType = this.ctrlContainerType().valueChanges.subscribe(valuePair => {
163
- this.ctrlTonsTested().setValue({ value: null });
148
+ this.subContainerType = this.ctrlContainerType.valueChanges.subscribe(valuePair => {
149
+ this.ctrlTonsTested.setValue({ value: null });
164
150
  this.spxSearchTonsTested.emit(valuePair);
165
151
  });
166
152
  }
167
153
  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 }); }
168
- 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: false, 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 }); }
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()\">\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"] }] }); }
169
155
  }
170
156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
171
157
  type: Component,
@@ -173,8 +159,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
173
159
  FormsModule,
174
160
  ReactiveFormsModule,
175
161
  SpxFormViewComponent,
176
- ], 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>" }]
177
- }], ctorParameters: () => [{ type: i1.FormBuilder }] });
162
+ ], 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>" }]
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
+ }] } });
178
194
 
179
195
  /**
180
196
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-change-details.mjs","sources":["../../../../projects/softpak/components/spx-change-details/spx-change-details.component.ts","../../../../projects/softpak/components/spx-change-details/spx-change-details.component.html","../../../../projects/softpak/components/spx-change-details/softpak-components-spx-change-details.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\nimport { SpxFormViewComponent, SpxFormI, SpxFormButtonTypeEnum, SpxFormFieldI } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\n\nexport const sectionChangeDetails = 'changeDetails';\nexport const ctrlContainerNumber = 'containerNumber';\nexport const ctrlContainerSeqNr = 'containerSeqNr';\nexport const ctrlContainerType = 'containerType';\nexport const ctrlCustomer = 'customer';\nexport const ctrlTonsTested = 'tonsTested';\nexport const ctrlLicensePlate = 'licensePlate';\nexport const ctrlCategory = 'category';\nexport const ctrlUseCategories = 'useCategories';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxFormViewComponent,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxChangeDetailsComponent {\n readonly formGroup = input.required<FormGroup>();\n readonly suggestions = input<any>({});\n readonly textCategory = input.required<string>();\n readonly textContainerNumber = input.required<string>();\n readonly textContainerType = input.required<string>();\n readonly textCustomer = input.required<string>();\n readonly textLicensePlate = input.required<string>();\n readonly textSave = input.required<string>();\n readonly textTonsTested = input.required<string>();\n spxBlurCategory = output<SpxValuePair<string>>();\n spxBlurContainerType = output<SpxValuePair<string>>();\n spxSearchCategory = output<SpxValuePair<string>>();\n spxSearchContainerType = output<SpxValuePair<string>>();\n spxSearchTonsTested = output<SpxValuePair<string>>();\n submit = output<SpxChangeDetailsValueI>();\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSave(),\n }\n ],\n sections: [\n {\n key: sectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: ctrlContainerSeqNr,\n type: () => SpxInputTypeEnum.hidden,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlContainerNumber,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textContainerNumber(),\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlCustomer,\n type: () => SpxInputTypeEnum.text,\n capitalize: () => true,\n readonly: () => true,\n label: () => this.textCustomer(),\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlContainerType,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textContainerType(),\n capitalize: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textTonsTested(),\n show: () => {\n const suggestions = this.suggestions();\n return suggestions?.[ctrlTonsTested] && suggestions?.[ctrlTonsTested].length && suggestions?.[ctrlTonsTested].length > 0;\n},\n validators: () => {\n const suggestions = this.suggestions();\n return suggestions?.[ctrlTonsTested] && suggestions?.[ctrlTonsTested].length && suggestions?.[ctrlTonsTested].length > 0 ? [spxValidatorRequired()] : [];\n},\n },\n {\n key: ctrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textLicensePlate(),\n capitalize: () => true,\n },\n {\n key: ctrlUseCategories,\n type: () => SpxInputTypeEnum.hidden,\n capitalize: () => true,\n },\n {\n key: ctrlCategory,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textCategory(),\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlUseCategories()?.value),\n validators: () => valuePairToValue(this.ctrlUseCategories()?.value) ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ]\n };\n\n readonly ctrlCategory = computed(() => this.formGroup().get(ctrlCategory) as FormControl);\n readonly ctrlCustomer = computed(() => this.formGroup().get(ctrlCustomer) as FormControl);\n readonly ctrlContainerType = computed(() => this.formGroup().get(ctrlContainerType) as FormControl);\n readonly ctrlLicensePlate = computed(() => this.formGroup().get(ctrlLicensePlate) as FormControl);\n readonly ctrlTonsTested = computed(() => this.formGroup()?.get(ctrlTonsTested) as FormControl);\n readonly ctrlUseCategories = computed(() => this.formGroup()?.get(ctrlUseCategories) as FormControl);\n\n private subContainerType?: Subscription;\n\n constructor(readonly formBuilder: FormBuilder) {\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.formBuilder, this.form.sections);\n }\n\n ngOnInit(): void {\n this.listenToContainerType();\n }\n\n ngOnDestroy(): void {\n if (this.subContainerType) {\n this.subContainerType.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n\n onBlur(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === ctrlCategory) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === ctrlContainerType) {\n this.spxBlurContainerType.emit(data.valuePair);\n }\n }\n\n onSearch(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === ctrlCategory) {\n this.spxSearchCategory.emit(data.valuePair);\n }\n if (data.field.key === ctrlContainerType) {\n this.spxSearchContainerType.emit(data.valuePair);\n }\n if (data.field.key === ctrlTonsTested) {\n this.spxSearchTonsTested.emit(data.valuePair);\n }\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: valuePairToValue(this.ctrlUseCategories().value) ? this.ctrlCategory().value : null,\n containerType: this.ctrlContainerType().value,\n licensePlate: this.ctrlLicensePlate().value,\n tonsTested: this.ctrlTonsTested().value,\n })\n }\n\n private listenToContainerType(): void {\n this.subContainerType = this.ctrlContainerType().valueChanges.subscribe(valuePair => {\n this.ctrlTonsTested().setValue({ value: null });\n this.spxSearchTonsTested.emit(valuePair);\n });\n }\n}\n","<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>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;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AyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAErB,OAAA,EAAA;wBACL,WAAW;wBACX,mBAAmB;wBACnB,oBAAoB;AACvB,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,yUAAA,EAAA;;;AE5BnD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-change-details.mjs","sources":["../../../../projects/softpak/components/spx-change-details/spx-change-details.component.ts","../../../../projects/softpak/components/spx-change-details/spx-change-details.component.html","../../../../projects/softpak/components/spx-change-details/softpak-components-spx-change-details.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\nimport { SpxFormViewComponent, SpxFormI, SpxFormButtonTypeEnum, SpxFormFieldI } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\n\nexport const sectionChangeDetails = 'changeDetails';\nexport const ctrlContainerNumber = 'containerNumber';\nexport const ctrlContainerSeqNr = 'containerSeqNr';\nexport const ctrlContainerType = 'containerType';\nexport const ctrlCustomer = 'customer';\nexport const ctrlTonsTested = 'tonsTested';\nexport const ctrlLicensePlate = 'licensePlate';\nexport const ctrlCategory = 'category';\nexport const ctrlUseCategories = 'useCategories';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxFormViewComponent,\n ]\n})\nexport class SpxChangeDetailsComponent {\n @Input() formGroup!: FormGroup;\n @Input() suggestions: any = {};\n @Input() textCategory!: string;\n @Input() textContainerNumber!: string;\n @Input() textContainerType!: string;\n @Input() textCustomer!: string;\n @Input() textLicensePlate!: string;\n @Input() textSave!: string;\n @Input() textTonsTested!: string;\n @Output() spxBlurCategory: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxBlurContainerType: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxSearchCategory: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxSearchContainerType: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxSearchTonsTested: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() submit: EventEmitter<SpxChangeDetailsValueI> = new EventEmitter<SpxChangeDetailsValueI>();\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSave,\n }\n ],\n sections: [\n {\n key: sectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: ctrlContainerSeqNr,\n type: () => SpxInputTypeEnum.hidden,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlContainerNumber,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textContainerNumber,\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlCustomer,\n type: () => SpxInputTypeEnum.text,\n capitalize: () => true,\n readonly: () => true,\n label: () => this.textCustomer,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlContainerType,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textContainerType,\n capitalize: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textTonsTested,\n show: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0,\n validators: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0 ? [spxValidatorRequired()] : [],\n },\n {\n key: ctrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textLicensePlate,\n capitalize: () => true,\n },\n {\n key: ctrlUseCategories,\n type: () => SpxInputTypeEnum.hidden,\n capitalize: () => true,\n },\n {\n key: ctrlCategory,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textCategory,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlUseCategories?.value),\n validators: () => valuePairToValue(this.ctrlUseCategories?.value) ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ]\n };\n\n get ctrlCategory(): FormControl { return this.formGroup.get(ctrlCategory) as FormControl; }\n get ctrlCustomer(): FormControl { return this.formGroup.get(ctrlCustomer) as FormControl; }\n get ctrlContainerType(): FormControl { return this.formGroup.get(ctrlContainerType) as FormControl; }\n get ctrlLicensePlate(): FormControl { return this.formGroup.get(ctrlLicensePlate) as FormControl; }\n get ctrlTonsTested(): FormControl { return this.formGroup?.get(ctrlTonsTested) as FormControl; }\n get ctrlUseCategories(): FormControl { return this.formGroup?.get(ctrlUseCategories) as FormControl; }\n\n private subContainerType?: Subscription;\n\n constructor(readonly formBuilder: FormBuilder) {\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.formBuilder, this.form.sections);\n }\n\n ngOnInit(): void {\n this.listenToContainerType();\n }\n\n ngOnDestroy(): void {\n if (this.subContainerType) {\n this.subContainerType.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n\n onBlur(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === ctrlCategory) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === ctrlContainerType) {\n this.spxBlurContainerType.emit(data.valuePair);\n }\n }\n\n onSearch(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === ctrlCategory) {\n this.spxSearchCategory.emit(data.valuePair);\n }\n if (data.field.key === ctrlContainerType) {\n this.spxSearchContainerType.emit(data.valuePair);\n }\n if (data.field.key === ctrlTonsTested) {\n this.spxSearchTonsTested.emit(data.valuePair);\n }\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: valuePairToValue(this.ctrlUseCategories.value) ? this.ctrlCategory.value : null,\n containerType: this.ctrlContainerType.value,\n licensePlate: this.ctrlLicensePlate.value,\n tonsTested: this.ctrlTonsTested.value,\n })\n }\n\n private listenToContainerType(): void {\n this.subContainerType = this.ctrlContainerType.valueChanges.subscribe(valuePair => {\n this.ctrlTonsTested.setValue({ value: null });\n this.spxSearchTonsTested.emit(valuePair);\n });\n }\n}\n","<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>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AASO,MAAM,oBAAoB,GAAG;AAC7B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,kBAAkB,GAAG;AAC3B,MAAM,iBAAiB,GAAG;AAC1B,MAAM,YAAY,GAAG;AACrB,MAAM,cAAc,GAAG;AACvB,MAAM,gBAAgB,GAAG;AACzB,MAAM,YAAY,GAAG;AACrB,MAAM,iBAAiB,GAAG;MAWpB,yBAAyB,CAAA;AAwFpC,IAAA,IAAI,YAAY,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAgB,CAAC;AACzF,IAAA,IAAI,YAAY,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAgB,CAAC;AACzF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