@softpak/components 19.0.0-beta.1 → 19.0.0-beta.10
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.
- package/esm2022/placeholder.mjs +2 -0
- package/esm2022/public_api.mjs +2 -0
- package/esm2022/softpak-components.mjs +5 -0
- package/esm2022/spx-alert/public-api.mjs +3 -0
- package/esm2022/spx-alert/softpak-components-spx-alert.mjs +5 -0
- package/esm2022/spx-alert/spx-alert.component.mjs +203 -0
- package/esm2022/spx-alert/spx-alert.interface.mjs +3 -0
- package/esm2022/spx-app-configuration/public-api.mjs +8 -0
- package/esm2022/spx-app-configuration/softpak-components-spx-app-configuration.mjs +5 -0
- package/esm2022/spx-app-configuration/spx-app-alert.interface.mjs +2 -0
- package/esm2022/spx-app-configuration/spx-app-bundle-set.interface.mjs +2 -0
- package/esm2022/spx-app-configuration/spx-app-channel-type.enum.mjs +8 -0
- package/esm2022/spx-app-configuration/spx-app-channel.interface.mjs +2 -0
- package/esm2022/spx-app-configuration/spx-app-config.interface.mjs +2 -0
- package/esm2022/spx-app-configuration/spx-app-id.enum.mjs +8 -0
- package/esm2022/spx-app-configuration/spx-app-lang.enum.mjs +6 -0
- package/esm2022/spx-app-configuration/spx-app-release-note.interface.mjs +2 -0
- package/esm2022/spx-app-expiry/public-api.mjs +6 -0
- package/esm2022/spx-app-expiry/softpak-components-spx-app-expiry.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-app-expiry.component.mjs +107 -0
- package/esm2022/spx-app-expiry/spx-app-expiry.interface.mjs +2 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-final-warning.interface.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-happened.interface.mjs +5 -0
- package/esm2022/spx-app-expiry/spx-check-expiry-warning.interface.mjs +5 -0
- package/esm2022/spx-app-update/public-api.mjs +2 -0
- package/esm2022/spx-app-update/softpak-components-spx-app-update.mjs +5 -0
- package/esm2022/spx-app-update/spx-app-update.component.mjs +323 -0
- package/esm2022/spx-button/public-api.mjs +2 -0
- package/esm2022/spx-button/softpak-components-spx-button.mjs +5 -0
- package/esm2022/spx-button/spx-button.component.mjs +142 -0
- package/esm2022/spx-capitalize/public-api.mjs +2 -0
- package/esm2022/spx-capitalize/softpak-components-spx-capitalize.mjs +5 -0
- package/esm2022/spx-capitalize/spx-capitalize.pipe.mjs +20 -0
- package/esm2022/spx-card/public-api.mjs +5 -0
- package/esm2022/spx-card/softpak-components-spx-card.mjs +5 -0
- package/esm2022/spx-card/spx-card-grid.component.mjs +46 -0
- package/esm2022/spx-card/spx-card-item.component.mjs +117 -0
- package/esm2022/spx-card/spx-card-line.component.mjs +124 -0
- package/esm2022/spx-card/spx-card.component.mjs +96 -0
- package/esm2022/spx-change-details/public-api.mjs +2 -0
- package/esm2022/spx-change-details/softpak-components-spx-change-details.mjs +5 -0
- package/esm2022/spx-change-details/spx-change-details-value.interface.mjs +2 -0
- package/esm2022/spx-change-details/spx-change-details.component.mjs +197 -0
- package/esm2022/spx-channel-selection/public-api.mjs +3 -0
- package/esm2022/spx-channel-selection/softpak-components-spx-channel-selection.mjs +5 -0
- package/esm2022/spx-channel-selection/src/spx-channel-indicator.component.mjs +45 -0
- package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +132 -0
- package/esm2022/spx-check-digit/public-api.mjs +2 -0
- package/esm2022/spx-check-digit/softpak-components-spx-check-digit.mjs +5 -0
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +91 -0
- package/esm2022/spx-form-section/public-api.mjs +2 -0
- package/esm2022/spx-form-section/softpak-components-spx-form-section.mjs +5 -0
- package/esm2022/spx-form-section/spx-form-section.component.mjs +42 -0
- package/esm2022/spx-form-view/public-api.mjs +7 -0
- package/esm2022/spx-form-view/softpak-components-spx-form-view.mjs +5 -0
- package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +117 -0
- package/esm2022/spx-form-view/spx-form-button-type.enum.mjs +6 -0
- package/esm2022/spx-form-view/spx-form-button.interface.mjs +2 -0
- package/esm2022/spx-form-view/spx-form-field.interface.mjs +2 -0
- package/esm2022/spx-form-view/spx-form-section.interface.mjs +2 -0
- package/esm2022/spx-form-view/spx-form-view.component.mjs +297 -0
- package/esm2022/spx-form-view/spx-form.interface.mjs +2 -0
- package/esm2022/spx-helpers/calc-check-digit.function.mjs +21 -0
- package/esm2022/spx-helpers/public-api.mjs +4 -0
- package/esm2022/spx-helpers/softpak-components-spx-helpers.mjs +5 -0
- package/esm2022/spx-helpers/spx-severity.enum.mjs +10 -0
- package/esm2022/spx-helpers/value-pair-to-value.function.mjs +7 -0
- package/esm2022/spx-inputs/public-api.mjs +6 -0
- package/esm2022/spx-inputs/softpak-components-spx-inputs.mjs +5 -0
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +93 -0
- package/esm2022/spx-inputs/spx-input-box.component.mjs +273 -0
- package/esm2022/spx-inputs/spx-input-date/spx-input-date.component.mjs +194 -0
- package/esm2022/spx-inputs/spx-input-float.component.mjs +157 -0
- package/esm2022/spx-inputs/spx-input-number.component.mjs +87 -0
- package/esm2022/spx-inputs/spx-input-radio.component.mjs +129 -0
- package/esm2022/spx-inputs/spx-input-text.component.mjs +160 -0
- package/esm2022/spx-inputs/spx-input-time-modal.component.mjs +131 -0
- package/esm2022/spx-inputs/spx-input-time.component.mjs +156 -0
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +17 -0
- package/esm2022/spx-inputs/spx-input.component.mjs +461 -0
- package/esm2022/spx-inputs/spx-value-interface.mjs +2 -0
- package/esm2022/spx-navigation/public-api.mjs +5 -0
- package/esm2022/spx-navigation/softpak-components-spx-navigation.mjs +5 -0
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +71 -0
- package/esm2022/spx-navigation/spx-home-tiles.component.mjs +24 -0
- package/esm2022/spx-navigation/spx-navigation-item.interface.mjs +2 -0
- package/esm2022/spx-navigation/spx-navigation.component.mjs +47 -0
- package/esm2022/spx-number-check/public-api.mjs +2 -0
- package/esm2022/spx-number-check/softpak-components-spx-number-check.mjs +5 -0
- package/esm2022/spx-number-check/spx-number-check.component.mjs +265 -0
- package/esm2022/spx-pagination/public-api.mjs +2 -0
- package/esm2022/spx-pagination/softpak-components-spx-pagination.mjs +5 -0
- package/esm2022/spx-pagination/spx-pagination.component.mjs +44 -0
- package/esm2022/spx-patch/patch-check.function.mjs +9 -0
- package/esm2022/spx-patch/public-api.mjs +4 -0
- package/esm2022/spx-patch/release-check.function.mjs +14 -0
- package/esm2022/spx-patch/softpak-components-spx-patch.mjs +5 -0
- package/esm2022/spx-patch/spx-patch.component.mjs +54 -0
- package/esm2022/spx-progress-bar/public-api.mjs +2 -0
- package/esm2022/spx-progress-bar/softpak-components-spx-progress-bar.mjs +5 -0
- package/esm2022/spx-progress-bar/spx-progress-bar.component.mjs +29 -0
- package/esm2022/spx-spinner/public-api.mjs +2 -0
- package/esm2022/spx-spinner/softpak-components-spx-spinner.mjs +5 -0
- package/esm2022/spx-spinner/spx-spinner.component.mjs +160 -0
- package/esm2022/spx-stock-info/public-api.mjs +3 -0
- package/esm2022/spx-stock-info/softpak-components-spx-stock-info.mjs +5 -0
- package/esm2022/spx-stock-info/spx-stock-info-value.interface.mjs +2 -0
- package/esm2022/spx-stock-info/spx-stock-info.component.mjs +324 -0
- package/esm2022/spx-storage/public-api.mjs +3 -0
- package/esm2022/spx-storage/softpak-components-spx-storage.mjs +5 -0
- package/esm2022/spx-storage/src/spx-storage-key.enum.mjs +13 -0
- package/esm2022/spx-storage/src/spx-storage.class.mjs +45 -0
- package/esm2022/spx-suggestion/public-api.mjs +2 -0
- package/esm2022/spx-suggestion/softpak-components-spx-suggestion.mjs +5 -0
- package/esm2022/spx-suggestion/spx-suggestion.component.mjs +61 -0
- package/esm2022/spx-toaster/public-api.mjs +4 -0
- package/esm2022/spx-toaster/softpak-components-spx-toaster.mjs +5 -0
- package/esm2022/spx-toaster/src/spx-toaster-autoclose-speed.mjs +23 -0
- package/esm2022/spx-toaster/src/spx-toaster-message.interface.mjs +3 -0
- package/esm2022/spx-toaster/src/spx-toaster.component.mjs +168 -0
- package/esm2022/spx-update/public-api.mjs +3 -0
- package/esm2022/spx-update/softpak-components-spx-update.mjs +5 -0
- package/esm2022/spx-update/src/spx-update-info.component.mjs +86 -0
- package/esm2022/spx-update/src/spx-update-progress.component.mjs +46 -0
- package/esm2022/spx-validation/max.validator.mjs +17 -0
- package/esm2022/spx-validation/maxlength.validator.mjs +20 -0
- package/esm2022/spx-validation/min.validator.mjs +17 -0
- package/esm2022/spx-validation/minlength.validator.mjs +20 -0
- package/esm2022/spx-validation/pattern.validator.mjs +12 -0
- package/esm2022/spx-validation/public-api.mjs +9 -0
- package/esm2022/spx-validation/required.validator.mjs +12 -0
- package/esm2022/spx-validation/softpak-components-spx-validation.mjs +5 -0
- package/esm2022/spx-validation/spx-validate-control.component.mjs +65 -0
- package/esm2022/spx-validation/year-and-month.validator.mjs +42 -0
- package/fesm2022/softpak-components-spx-alert.mjs +56 -45
- package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-configuration.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-expiry.mjs +59 -41
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-app-update.mjs +74 -68
- package/fesm2022/softpak-components-spx-app-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-button.mjs +5 -4
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-capitalize.mjs +3 -3
- package/fesm2022/softpak-components-spx-capitalize.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-card.mjs +163 -127
- package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +5 -7
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +11 -12
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +6 -9
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +20 -15
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +147 -139
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-helpers.mjs +1 -0
- package/fesm2022/softpak-components-spx-helpers.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +817 -862
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +53 -52
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +49 -42
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-pagination.mjs +4 -4
- package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-patch.mjs +29 -22
- package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-progress-bar.mjs +3 -3
- package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-spinner.mjs +144 -143
- package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-stock-info.mjs +8 -11
- package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-storage.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +41 -49
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-toaster.mjs +94 -98
- package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +11 -11
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +5 -8
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +76 -23
- package/spx-app-update/spx-app-update.component.d.ts +3 -3
- package/spx-helpers/spx-severity.enum.d.ts +2 -1
- package/spx-inputs/spx-input-date/spx-input-date.component.d.ts +43 -0
- package/spx-inputs/spx-input-float.component.d.ts +5 -4
- package/spx-inputs/spx-input-text.component.d.ts +2 -1
- package/spx-inputs/spx-input-time.component.d.ts +1 -1
- package/spx-inputs/spx-input.component.d.ts +2 -1
- package/spx-suggestion/spx-suggestion.component.d.ts +5 -5
- package/tailwind.css +1 -1
- package/spx-inputs/spx-input-date.component.d.ts +0 -50
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NgClass } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { EventEmitter, Component, Input, Output, HostBinding } from '@angular/core';
|
|
4
4
|
import * as i1 from '@fortawesome/angular-fontawesome';
|
|
@@ -19,64 +19,68 @@ class SpxCardComponent {
|
|
|
19
19
|
onClick() {
|
|
20
20
|
this.clicked.emit();
|
|
21
21
|
}
|
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
23
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", 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: `
|
|
24
24
|
<button type="button"
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
<ng-content select="[card-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
25
|
+
class="block w-full text-left rounded font-body items-stretch"
|
|
26
|
+
[class.flex]="tableView"
|
|
27
|
+
[class.cursor-pointer]="clickable"
|
|
28
|
+
[class.cursor-not-allowed]="!clickable"
|
|
29
|
+
[class.focus:ring-2]="clickable"
|
|
30
|
+
[class.focus:ring-offset-2]="clickable"
|
|
31
|
+
[class.focus:ring-blue-500]="clickable"
|
|
32
|
+
(click)="onClick()"
|
|
33
|
+
[tabIndex]="clickable ? 0 : -1">
|
|
34
|
+
<div class="text-gray-900 opacity-90" [class.w-96]="tableView">
|
|
35
|
+
<ng-content select="[card-header]"></ng-content>
|
|
36
|
+
</div>
|
|
37
|
+
<ng-content select="[card-content-top]"></ng-content>
|
|
38
|
+
@if (hasContent) {
|
|
39
|
+
<div class="bg-white dark:bg-gray-600 p-3">
|
|
40
|
+
<ng-content select="[card-content]"></ng-content>
|
|
41
|
+
</div>
|
|
42
|
+
}
|
|
43
|
+
<ng-content select="[card-content-bottom]"></ng-content>
|
|
44
|
+
<div class="bg-gray-50 dark:bg-gray-700 p-3 grow" [class.rounded-b-lg]="!onDetailPage && !tableView" [class.rounded-r-lg]="!onDetailPage && tableView">
|
|
45
|
+
<ng-content select="[card-lines]"></ng-content>
|
|
46
|
+
</div>
|
|
47
|
+
</button>
|
|
48
|
+
`, isInline: true }); }
|
|
47
49
|
}
|
|
48
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardComponent, decorators: [{
|
|
49
51
|
type: Component,
|
|
50
52
|
args: [{
|
|
51
53
|
selector: 'spx-card',
|
|
54
|
+
standalone: true,
|
|
52
55
|
imports: [
|
|
53
|
-
NgClass
|
|
54
|
-
NgIf,
|
|
56
|
+
NgClass
|
|
55
57
|
],
|
|
56
58
|
template: `
|
|
57
59
|
<button type="button"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
<ng-content select="[card-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
+
`,
|
|
80
84
|
}]
|
|
81
85
|
}], ctorParameters: () => [], propDecorators: { clickable: [{
|
|
82
86
|
type: Input
|
|
@@ -109,8 +113,8 @@ class SpxCardItemComponent {
|
|
|
109
113
|
get spxIconSeveritySuccess() { return this.spxIconSeverity === SpxSeverityEnum.success; }
|
|
110
114
|
get spxIconSeverityUnknown() { return this.spxIconSeverity === SpxSeverityEnum.unknown; }
|
|
111
115
|
get spxIconSeverityWarning() { return this.spxIconSeverity === SpxSeverityEnum.warning; }
|
|
112
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
113
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
116
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
117
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxCardItemComponent, isStandalone: true, selector: "spx-card-item", inputs: { icon: "icon", iconOnly: "iconOnly", spxLabel: "spxLabel", spxValue: "spxValue", spxSeverity: "spxSeverity", spxIconSeverity: "spxIconSeverity" }, host: { properties: { "class.h-full": "this.hFull" } }, ngImport: i0, template: `
|
|
114
118
|
<div class='py-2 px-3 rounded h-full'
|
|
115
119
|
[class.bg-slate-100]="!spxSeverity"
|
|
116
120
|
[class.dark:bg-slate-600]="!spxSeverity"
|
|
@@ -119,36 +123,40 @@ class SpxCardItemComponent {
|
|
|
119
123
|
[class.bg-red-700]="spxSeverityError"
|
|
120
124
|
[class.bg-green-700]="spxSeveritySuccess"
|
|
121
125
|
[class.bg-blue-700]="spxSeverityInfo"
|
|
122
|
-
[class.bg-
|
|
126
|
+
[class.bg-gray-400]="spxSeverityUnknown"
|
|
123
127
|
[class.bg-amber-700]="spxSeverityWarning">
|
|
124
128
|
<div class="font-small leading-normal">{{ spxLabel }}</div>
|
|
125
129
|
<div class="flex gap-4 text-lg leading-normal py-1">
|
|
126
|
-
|
|
127
|
-
<div
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
130
|
+
@if (icon) {
|
|
131
|
+
<div class="font-bold text-center leading-normal max-w-12 min-w-12" [class.grow]="iconOnly">
|
|
132
|
+
<div
|
|
133
|
+
class="px-3 py-1 text-white rounded"
|
|
134
|
+
[class.bg-black]="!spxIconSeverity"
|
|
135
|
+
[class.bg-red-700]="spxIconSeverityError"
|
|
136
|
+
[class.bg-green-700]="spxIconSeveritySuccess"
|
|
137
|
+
[class.bg-blue-700]="spxIconSeverityInfo"
|
|
138
|
+
[class.bg-gray-400]="spxIconSeverityUnknown"
|
|
139
|
+
[class.bg-amber-700]="spxIconSeverityWarning">
|
|
140
|
+
<fa-icon [icon]="icon"></fa-icon>
|
|
141
|
+
</div>
|
|
136
142
|
</div>
|
|
137
|
-
|
|
143
|
+
}
|
|
138
144
|
<div class="grow font-bold">
|
|
139
|
-
|
|
145
|
+
@if (!iconOnly) {
|
|
146
|
+
<ng-content></ng-content><div [innerHTML]="spxValue"></div>
|
|
147
|
+
}
|
|
140
148
|
</div>
|
|
141
149
|
</div>
|
|
142
150
|
</div>
|
|
143
|
-
|
|
151
|
+
`, isInline: true, dependencies: [{ kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }] }); }
|
|
144
152
|
}
|
|
145
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
153
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardItemComponent, decorators: [{
|
|
146
154
|
type: Component,
|
|
147
155
|
args: [{
|
|
148
156
|
selector: 'spx-card-item',
|
|
157
|
+
standalone: true,
|
|
149
158
|
imports: [
|
|
150
|
-
FaIconComponent
|
|
151
|
-
NgIf,
|
|
159
|
+
FaIconComponent
|
|
152
160
|
],
|
|
153
161
|
template: `
|
|
154
162
|
<div class='py-2 px-3 rounded h-full'
|
|
@@ -159,28 +167,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.0", ngImpor
|
|
|
159
167
|
[class.bg-red-700]="spxSeverityError"
|
|
160
168
|
[class.bg-green-700]="spxSeveritySuccess"
|
|
161
169
|
[class.bg-blue-700]="spxSeverityInfo"
|
|
162
|
-
[class.bg-
|
|
170
|
+
[class.bg-gray-400]="spxSeverityUnknown"
|
|
163
171
|
[class.bg-amber-700]="spxSeverityWarning">
|
|
164
172
|
<div class="font-small leading-normal">{{ spxLabel }}</div>
|
|
165
173
|
<div class="flex gap-4 text-lg leading-normal py-1">
|
|
166
|
-
|
|
167
|
-
<div
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
@if (icon) {
|
|
175
|
+
<div class="font-bold text-center leading-normal max-w-12 min-w-12" [class.grow]="iconOnly">
|
|
176
|
+
<div
|
|
177
|
+
class="px-3 py-1 text-white rounded"
|
|
178
|
+
[class.bg-black]="!spxIconSeverity"
|
|
179
|
+
[class.bg-red-700]="spxIconSeverityError"
|
|
180
|
+
[class.bg-green-700]="spxIconSeveritySuccess"
|
|
181
|
+
[class.bg-blue-700]="spxIconSeverityInfo"
|
|
182
|
+
[class.bg-gray-400]="spxIconSeverityUnknown"
|
|
183
|
+
[class.bg-amber-700]="spxIconSeverityWarning">
|
|
184
|
+
<fa-icon [icon]="icon"></fa-icon>
|
|
185
|
+
</div>
|
|
176
186
|
</div>
|
|
177
|
-
|
|
187
|
+
}
|
|
178
188
|
<div class="grow font-bold">
|
|
179
|
-
|
|
189
|
+
@if (!iconOnly) {
|
|
190
|
+
<ng-content></ng-content><div [innerHTML]="spxValue"></div>
|
|
191
|
+
}
|
|
180
192
|
</div>
|
|
181
193
|
</div>
|
|
182
194
|
</div>
|
|
183
|
-
|
|
195
|
+
`,
|
|
184
196
|
}]
|
|
185
197
|
}], propDecorators: { hFull: [{
|
|
186
198
|
type: HostBinding,
|
|
@@ -203,8 +215,8 @@ class SpxCardGridComponent {
|
|
|
203
215
|
constructor() {
|
|
204
216
|
this.minWidth2Columns = 460;
|
|
205
217
|
}
|
|
206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
207
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
218
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
219
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: SpxCardGridComponent, isStandalone: true, selector: "spx-card-grid", inputs: { minWidth2Columns: "minWidth2Columns" }, ngImport: i0, template: `
|
|
208
220
|
<div class='grid gap-3 items-stretch'
|
|
209
221
|
[class.min-[300px]:grid-cols-2]="minWidth2Columns == 300"
|
|
210
222
|
[class.min-[320px]:grid-cols-2]="minWidth2Columns == 320"
|
|
@@ -219,7 +231,7 @@ class SpxCardGridComponent {
|
|
|
219
231
|
</div>
|
|
220
232
|
`, isInline: true }); }
|
|
221
233
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
234
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardGridComponent, decorators: [{
|
|
223
235
|
type: Component,
|
|
224
236
|
args: [{
|
|
225
237
|
selector: 'spx-card-grid',
|
|
@@ -254,71 +266,95 @@ class SpxCardLineComponent {
|
|
|
254
266
|
displayValue(val) {
|
|
255
267
|
return val || val === 0 ? val : '—';
|
|
256
268
|
}
|
|
257
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
258
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
269
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardLineComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
270
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: SpxCardLineComponent, isStandalone: true, selector: "spx-card-line", inputs: { icon: "icon", showPositiveOrNegative: "showPositiveOrNegative", text: "text", value: "value", secondValue: "secondValue", showProgress: "showProgress", unit: "unit", newOrderScreen: "newOrderScreen" }, ngImport: i0, template: `
|
|
259
271
|
<div class="items-center" [class.flex]="!newOrderScreen">
|
|
260
272
|
<div class="block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1" [class.pt-1]="!newOrderScreen" [innerHTML]="text"></div>
|
|
261
273
|
<div class="flex">
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
274
|
+
@if (icon) {
|
|
275
|
+
<fa-icon [icon]="icon" class="text-lg mr-3 w-6 text-center"></fa-icon>
|
|
276
|
+
}
|
|
277
|
+
@if (showPositiveOrNegative && numericValue < 0) {
|
|
278
|
+
<div class="rounded-full w-4 h-4 mr-2 bg-sky-600"> </div>
|
|
279
|
+
}
|
|
280
|
+
@if (!showProgress) {
|
|
281
|
+
<span class="block font-medium grow whitespace-pre-line leading-5">
|
|
282
|
+
<span [innerHTML]="displayValue(value)"></span>
|
|
283
|
+
<ng-content></ng-content>
|
|
284
|
+
@if (unit) {
|
|
285
|
+
<span> {{ unit }}</span>
|
|
286
|
+
}
|
|
287
|
+
@if (!unit && secondValue !== null && secondValue !== undefined) {
|
|
288
|
+
/ {{ displayValue(secondValue) }}
|
|
289
|
+
}
|
|
290
|
+
</span>
|
|
291
|
+
}
|
|
270
292
|
</div>
|
|
271
|
-
|
|
272
|
-
<div class="
|
|
273
|
-
<div class="flex
|
|
274
|
-
<div class="
|
|
275
|
-
<div class="bg-
|
|
293
|
+
@if (showProgress) {
|
|
294
|
+
<div class="block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200">
|
|
295
|
+
<div class="flex">
|
|
296
|
+
<div class="flex grow gap-2">
|
|
297
|
+
<div class="bg-gray-200 my-0.5 h-5 w-full rounded">
|
|
298
|
+
<div class="bg-teal-600 h-5 rounded" [style.width]="((+value) / (secondValue ? +secondValue : 0)) * 100 + '%'"></div>
|
|
299
|
+
</div>
|
|
300
|
+
</div>
|
|
301
|
+
<div class="flex text-left pl-3 gap-2">
|
|
302
|
+
<div class="block w-16 text-right">{{ value }} / {{ secondValue }}</div>
|
|
276
303
|
</div>
|
|
277
|
-
</div>
|
|
278
|
-
<div class="flex text-left pl-3 gap-2">
|
|
279
|
-
<div class="block w-16 text-right">{{ value }} / {{ secondValue }}</div>
|
|
280
304
|
</div>
|
|
281
305
|
</div>
|
|
282
|
-
|
|
306
|
+
}
|
|
283
307
|
</div>
|
|
284
|
-
`, isInline: true, 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"] }
|
|
308
|
+
`, isInline: true, 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"] }] }); }
|
|
285
309
|
}
|
|
286
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxCardLineComponent, decorators: [{
|
|
287
311
|
type: Component,
|
|
288
312
|
args: [{
|
|
289
313
|
selector: 'spx-card-line',
|
|
314
|
+
standalone: true,
|
|
290
315
|
imports: [
|
|
291
316
|
FontAwesomeModule,
|
|
292
|
-
NgClass
|
|
293
|
-
NgIf,
|
|
317
|
+
NgClass
|
|
294
318
|
],
|
|
295
319
|
template: `
|
|
296
320
|
<div class="items-center" [class.flex]="!newOrderScreen">
|
|
297
321
|
<div class="block w-24 text-gray-600 dark:text-gray-200 text-xs mb-1" [class.pt-1]="!newOrderScreen" [innerHTML]="text"></div>
|
|
298
322
|
<div class="flex">
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
<
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
323
|
+
@if (icon) {
|
|
324
|
+
<fa-icon [icon]="icon" class="text-lg mr-3 w-6 text-center"></fa-icon>
|
|
325
|
+
}
|
|
326
|
+
@if (showPositiveOrNegative && numericValue < 0) {
|
|
327
|
+
<div class="rounded-full w-4 h-4 mr-2 bg-sky-600"> </div>
|
|
328
|
+
}
|
|
329
|
+
@if (!showProgress) {
|
|
330
|
+
<span class="block font-medium grow whitespace-pre-line leading-5">
|
|
331
|
+
<span [innerHTML]="displayValue(value)"></span>
|
|
332
|
+
<ng-content></ng-content>
|
|
333
|
+
@if (unit) {
|
|
334
|
+
<span> {{ unit }}</span>
|
|
335
|
+
}
|
|
336
|
+
@if (!unit && secondValue !== null && secondValue !== undefined) {
|
|
337
|
+
/ {{ displayValue(secondValue) }}
|
|
338
|
+
}
|
|
339
|
+
</span>
|
|
340
|
+
}
|
|
307
341
|
</div>
|
|
308
|
-
|
|
309
|
-
<div class="
|
|
310
|
-
<div class="flex
|
|
311
|
-
<div class="
|
|
312
|
-
<div class="bg-
|
|
342
|
+
@if (showProgress) {
|
|
343
|
+
<div class="block font-medium grow whitespace-pre-line text-gray-600 dark:text-gray-200">
|
|
344
|
+
<div class="flex">
|
|
345
|
+
<div class="flex grow gap-2">
|
|
346
|
+
<div class="bg-gray-200 my-0.5 h-5 w-full rounded">
|
|
347
|
+
<div class="bg-teal-600 h-5 rounded" [style.width]="((+value) / (secondValue ? +secondValue : 0)) * 100 + '%'"></div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
<div class="flex text-left pl-3 gap-2">
|
|
351
|
+
<div class="block w-16 text-right">{{ value }} / {{ secondValue }}</div>
|
|
313
352
|
</div>
|
|
314
|
-
</div>
|
|
315
|
-
<div class="flex text-left pl-3 gap-2">
|
|
316
|
-
<div class="block w-16 text-right">{{ value }} / {{ secondValue }}</div>
|
|
317
353
|
</div>
|
|
318
354
|
</div>
|
|
319
|
-
|
|
355
|
+
}
|
|
320
356
|
</div>
|
|
321
|
-
|
|
357
|
+
`,
|
|
322
358
|
}]
|
|
323
359
|
}], ctorParameters: () => [], propDecorators: { icon: [{
|
|
324
360
|
type: Input
|
|
@@ -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.component.ts","../../../../projects/softpak/components/spx-card/spx-card-grid.component.ts","../../../../projects/softpak/components/spx-card/spx-card-line.component.ts","../../../../projects/softpak/components/spx-card/softpak-components-spx-card.ts"],"sourcesContent":["import { NgClass, NgIf } from '@angular/common';\nimport { Component, EventEmitter, Input, Output } from '@angular/core';\n\n@Component({\n selector: 'spx-card',\n imports: [\n NgClass,\n NgIf,\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 <div *ngIf=\"hasContent\" class=\"bg-white dark:bg-gray-600 p-3\">\n <ng-content select=\"[card-content]\"></ng-content>\n </div>\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","import { NgIf } from '@angular/common';\nimport { 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';\n\n@Component({\n selector: 'spx-card-item',\n imports: [\n FaIconComponent,\n NgIf,\n ],\n template: `\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]=\"spxSeverityWarning\"\n [class.text-white]=\"spxSeverityError || spxSeverityInfo || spxSeveritySuccess || spxSeverityUnknown\"\n [class.bg-red-700]=\"spxSeverityError\"\n [class.bg-green-700]=\"spxSeveritySuccess\"\n [class.bg-blue-700]=\"spxSeverityInfo\"\n [class.bg-grey-700]=\"spxSeverityUnknown\"\n [class.bg-amber-700]=\"spxSeverityWarning\">\n <div class=\"font-small leading-normal\">{{ spxLabel }}</div>\n <div class=\"flex gap-4 text-lg leading-normal py-1\">\n <div *ngIf=\"icon\" class=\"font-bold text-center leading-normal w-10 max-w-10 min-w-10\" [class.grow]=\"iconOnly\">\n <div \n class=\"px-3 py-1 text-white rounded\"\n [class.bg-black]=\"!spxIconSeverity\"\n [class.bg-red-700]=\"spxIconSeverityError\"\n [class.bg-green-700]=\"spxIconSeveritySuccess\"\n [class.bg-blue-700]=\"spxIconSeverityInfo\"\n [class.bg-grey-700]=\"spxIconSeverityUnknown\"\n [class.bg-amber-700]=\"spxIconSeverityWarning\">\n <fa-icon [icon]=\"icon\"></fa-icon>\n </div>\n </div>\n <div class=\"grow font-bold\">\n <ng-container *ngIf=\"!iconOnly\"><ng-content></ng-content><div [innerHTML]=\"spxValue\"></div></ng-container>\n </div>\n </div>\n </div>\n `\n})\nexport class SpxCardItemComponent {\n @HostBinding('class.h-full') hFull = true;\n @Input() icon?: IconProp;\n @Input() iconOnly = false;\n @Input() spxLabel!: string;\n @Input() spxValue!: string;\n @Input() spxSeverity?: SpxSeverityEnum;\n @Input() spxIconSeverity?: SpxSeverityEnum;\n get spxSeverityError() { return this.spxSeverity === SpxSeverityEnum.error; }\n get spxSeverityInfo() { return this.spxSeverity === SpxSeverityEnum.info; }\n get spxSeveritySuccess() { return this.spxSeverity === SpxSeverityEnum.success; }\n get spxSeverityUnknown() { return this.spxSeverity === SpxSeverityEnum.unknown; }\n get spxSeverityWarning() { return this.spxSeverity === SpxSeverityEnum.warning; }\n get spxIconSeverityError() { return this.spxIconSeverity === SpxSeverityEnum.error; }\n get spxIconSeverityInfo() { return this.spxIconSeverity === SpxSeverityEnum.info; }\n get spxIconSeveritySuccess() { return this.spxIconSeverity === SpxSeverityEnum.success; }\n get spxIconSeverityUnknown() { return this.spxIconSeverity === SpxSeverityEnum.unknown; }\n get spxIconSeverityWarning() { return this.spxIconSeverity === SpxSeverityEnum.warning; }\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-card-grid',\n standalone: true,\n template: `\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>\n `,\n})\nexport class SpxCardGridComponent {\n @Input() minWidth2Columns?: 300 | 320 | 340 | 360 | 380 | 400 | 420 | 440 | 460 = 460;\n}\n","import { NgClass, NgIf } from '@angular/common';\nimport { Component, Input } 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: [\n FontAwesomeModule,\n NgClass,\n NgIf,\n ],\n template: `\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 <fa-icon *ngIf=\"icon\" [icon]=\"icon\" class=\"text-lg mr-3 w-6 text-center\"></fa-icon>\n <div *ngIf=\"showPositiveOrNegative && numericValue < 0\" class=\"rounded-full w-4 h-4 mr-2 bg-sky-600\"> </div>\n <span *ngIf=\"!showProgress\" class=\"block font-medium grow whitespace-pre-line leading-5\">\n <span [innerHTML]=\"displayValue(value)\"></span>\n <ng-content></ng-content>\n <span *ngIf=\"unit\"> {{ unit }}</span>\n <ng-container *ngIf=\"!unit && secondValue !== null && secondValue !== undefined\"> / {{ displayValue(secondValue) }}</ng-container>\n </span>\n </div>\n <div *ngIf=\"showProgress\" 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</div>\n`\n})\nexport class SpxCardLineComponent {\n @Input() icon?: IconProp;\n @Input() showPositiveOrNegative = false;\n @Input() text: string | unknown;\n @Input() value!: string | number;\n @Input() secondValue?: string | number;\n @Input() showProgress?: boolean;\n @Input() unit?: string;\n @Input() newOrderScreen = false;\n\n get numericValue() {\n return this.value as number;\n }\n\n constructor() { }\n\n public displayValue(val: string | number | unknown): string | number | unknown {\n return val || val === 0 ? val : '—';\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MAkCa,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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A;sBAAZ;gBACQ,cAAc,EAAA,CAAA;sBAAtB;;;AChDH;;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.component.ts","../../../../projects/softpak/components/spx-card/spx-card-grid.component.ts","../../../../projects/softpak/components/spx-card/spx-card-line.component.ts","../../../../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 standalone: true,\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 { 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';\n\n@Component({\n selector: 'spx-card-item',\n standalone: true,\n imports: [\n FaIconComponent\n],\n template: `\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]=\"spxSeverityWarning\"\n [class.text-white]=\"spxSeverityError || spxSeverityInfo || spxSeveritySuccess || spxSeverityUnknown\"\n [class.bg-red-700]=\"spxSeverityError\"\n [class.bg-green-700]=\"spxSeveritySuccess\"\n [class.bg-blue-700]=\"spxSeverityInfo\"\n [class.bg-gray-400]=\"spxSeverityUnknown\"\n [class.bg-amber-700]=\"spxSeverityWarning\">\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]=\"spxIconSeverityError\"\n [class.bg-green-700]=\"spxIconSeveritySuccess\"\n [class.bg-blue-700]=\"spxIconSeverityInfo\"\n [class.bg-gray-400]=\"spxIconSeverityUnknown\"\n [class.bg-amber-700]=\"spxIconSeverityWarning\">\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>\n `,\n})\nexport class SpxCardItemComponent {\n @HostBinding('class.h-full') hFull = true;\n @Input() icon?: IconProp;\n @Input() iconOnly = false;\n @Input() spxLabel!: string;\n @Input() spxValue!: string;\n @Input() spxSeverity?: SpxSeverityEnum;\n @Input() spxIconSeverity?: SpxSeverityEnum;\n get spxSeverityError() { return this.spxSeverity === SpxSeverityEnum.error; }\n get spxSeverityInfo() { return this.spxSeverity === SpxSeverityEnum.info; }\n get spxSeveritySuccess() { return this.spxSeverity === SpxSeverityEnum.success; }\n get spxSeverityUnknown() { return this.spxSeverity === SpxSeverityEnum.unknown; }\n get spxSeverityWarning() { return this.spxSeverity === SpxSeverityEnum.warning; }\n get spxIconSeverityError() { return this.spxIconSeverity === SpxSeverityEnum.error; }\n get spxIconSeverityInfo() { return this.spxIconSeverity === SpxSeverityEnum.info; }\n get spxIconSeveritySuccess() { return this.spxIconSeverity === SpxSeverityEnum.success; }\n get spxIconSeverityUnknown() { return this.spxIconSeverity === SpxSeverityEnum.unknown; }\n get spxIconSeverityWarning() { return this.spxIconSeverity === SpxSeverityEnum.warning; }\n}\n","import { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-card-grid',\n standalone: true,\n template: `\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>\n `,\n})\nexport class SpxCardGridComponent {\n @Input() minWidth2Columns?: 300 | 320 | 340 | 360 | 380 | 400 | 420 | 440 | 460 = 460;\n}\n","import { NgClass } from '@angular/common';\nimport { Component, Input } 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 standalone: true,\n imports: [\n FontAwesomeModule,\n NgClass\n],\n template: `\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\"> </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`,\n})\nexport class SpxCardLineComponent {\n @Input() icon?: IconProp;\n @Input() showPositiveOrNegative = false;\n @Input() text: string | unknown;\n @Input() value!: string | number;\n @Input() secondValue?: string | number;\n @Input() showProgress?: boolean;\n @Input() unit?: string;\n @Input() newOrderScreen = false;\n\n get numericValue() {\n return this.value as number;\n }\n\n constructor() { }\n\n public displayValue(val: string | number | unknown): string | number | unknown {\n return val || val === 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CAAA;sBAAZ,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;;;AC5DR;;AAEG;;;;"}
|
|
@@ -3,7 +3,6 @@ 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 { spxValidatorRequired, SpxValidateControlComponent } from '@softpak/components/spx-validation';
|
|
6
|
-
import { CommonModule } from '@angular/common';
|
|
7
6
|
import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
8
7
|
import { SpxFormButtonTypeEnum, SpxFormViewComponent } from '@softpak/components/spx-form-view';
|
|
9
8
|
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
@@ -152,19 +151,18 @@ class SpxChangeDetailsComponent {
|
|
|
152
151
|
this.spxSearchTonsTested.emit(valuePair);
|
|
153
152
|
});
|
|
154
153
|
}
|
|
155
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
156
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
154
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxChangeDetailsComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
155
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", 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"] }] }); }
|
|
157
156
|
}
|
|
158
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
|
|
159
158
|
type: Component,
|
|
160
|
-
args: [{ selector: 'spx-change-details', imports: [
|
|
161
|
-
CommonModule,
|
|
159
|
+
args: [{ selector: 'spx-change-details', standalone: true, imports: [
|
|
162
160
|
FormsModule,
|
|
163
161
|
ReactiveFormsModule,
|
|
164
162
|
SpxButtonComponent,
|
|
165
163
|
SpxFormViewComponent,
|
|
166
164
|
SpxInputComponent,
|
|
167
|
-
SpxValidateControlComponent
|
|
165
|
+
SpxValidateControlComponent
|
|
168
166
|
], 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>" }]
|
|
169
167
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { formGroup: [{
|
|
170
168
|
type: Input
|
|
@@ -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 { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { spxValidatorRequired, SpxValidateControlComponent } from '@softpak/components/spx-validation';\nimport { CommonModule } from '@angular/common';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxFormButtonTypeEnum, SpxFormFieldI, SpxFormI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\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 CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxFormViewComponent,\n SpxInputComponent,\n SpxValidateControlComponent,\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":";;;;;;;;;;;AAWO,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;MAepB,yBAAyB,CAAA;AAwFpC,IAAA,IAAI,YAAY,GAAA,EAAkB,OAAO,IAAI,CAA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AY,EAAA,CAAA;sBAApB;gBACQ,gBAAgB,EAAA,CAAA;sBAAxB;gBACQ,QAAQ,EAAA,CAAA;sBAAhB;gBACQ,cAAc,EAAA,CAAA;sBAAtB;gBACS,eAAe,EAAA,CAAA;sBAAxB;gBACS,oBAAoB,EAAA,CAAA;sBAA7B;gBACS,iBAAiB,EAAA,CAAA;sBAA1B;gBACS,sBAAsB,EAAA,CAAA;sBAA/B;gBACS,mBAAmB,EAAA,CAAA;sBAA5B;gBACS,MAAM,EAAA,CAAA;sBAAf;;;AEjDH;;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 { spxValidatorRequired, SpxValidateControlComponent } from '@softpak/components/spx-validation';\n\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxFormButtonTypeEnum, SpxFormFieldI, SpxFormI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\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 standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxFormViewComponent,\n SpxInputComponent,\n SpxValidateControlComponent\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":";;;;;;;;;;AAWO,MAAM,oBAAoB,GAAG,gBAAgB;AAC7C,MAAM,mBAAmB,GAAG,kBAAkB;AAC9C,MAAM,kBAAkB,GAAG,iBAAiB;AAC5C,MAAM,iBAAiB,GAAG,gBAAgB;AAC1C,MAAM,YAAY,GAAG,WAAW;AAChC,MAAM,cAAc,GAAG,aAAa;AACpC,MAAM,gBAAgB,GAAG,eAAe;AACxC,MAAM,YAAY,GAAG,WAAW;AAChC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