@softpak/components 0.0.0-beta.98 → 0.0.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.
- 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 +90 -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-button/spx-button.component.mjs +18 -5
- package/esm2022/spx-change-details/spx-change-details.component.mjs +94 -13
- package/esm2022/spx-channel-selection/public-api.mjs +1 -3
- package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +112 -19
- package/esm2022/spx-check-digit/spx-check-digit.component.mjs +14 -7
- package/esm2022/spx-form-section/spx-form-section.component.mjs +11 -11
- package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +119 -0
- package/esm2022/spx-form-view/spx-form-field.interface.mjs +1 -1
- package/esm2022/spx-form-view/spx-form-view.component.mjs +119 -14
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +7 -8
- package/esm2022/spx-inputs/spx-input-box.component.mjs +32 -19
- package/esm2022/spx-inputs/spx-input-date.component.mjs +1 -1
- package/esm2022/spx-inputs/spx-input-float.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-number.component.mjs +10 -5
- package/esm2022/spx-inputs/spx-input-radio.component.mjs +93 -27
- package/esm2022/spx-inputs/spx-input-text.component.mjs +7 -4
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +3 -1
- package/esm2022/spx-inputs/spx-input.component.mjs +34 -8
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +3 -3
- package/esm2022/spx-navigation/spx-home-tiles.component.mjs +14 -5
- package/esm2022/spx-navigation/spx-navigation.component.mjs +6 -3
- package/esm2022/spx-number-check/spx-number-check.component.mjs +1 -4
- package/esm2022/spx-suggestion/spx-suggestion.component.mjs +30 -16
- package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
- package/esm2022/spx-validation/public-api.mjs +1 -2
- package/esm2022/spx-validation/spx-validate-control.component.mjs +8 -3
- package/fesm2022/softpak-components-spx-app-expiry.mjs +107 -0
- package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-button.mjs +17 -4
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +94 -13
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-channel-selection.mjs +109 -97
- package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-check-digit.mjs +13 -6
- package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-section.mjs +10 -10
- package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-form-view.mjs +229 -14
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-inputs.mjs +186 -68
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +19 -7
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +0 -3
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +29 -15
- package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-update.mjs +1 -1
- package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-validation.mjs +8 -28
- package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
- package/package.json +23 -16
- package/spx-app-expiry/index.d.ts +5 -0
- package/spx-app-expiry/public-api.d.ts +5 -0
- package/spx-app-expiry/spx-app-expiry.component.d.ts +21 -0
- package/spx-app-expiry/spx-app-expiry.interface.d.ts +7 -0
- package/spx-app-expiry/spx-check-expiry-final-warning.interface.d.ts +2 -0
- package/spx-app-expiry/spx-check-expiry-happened.interface.d.ts +2 -0
- package/spx-app-expiry/spx-check-expiry-warning.interface.d.ts +2 -0
- package/spx-button/spx-button.component.d.ts +4 -2
- package/spx-change-details/spx-change-details.component.d.ts +27 -4
- package/spx-channel-selection/public-api.d.ts +0 -2
- package/spx-channel-selection/src/spx-welcome.component.d.ts +37 -8
- package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
- package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
- package/spx-form-view/spx-form-field.interface.d.ts +2 -0
- package/spx-form-view/spx-form-view.component.d.ts +23 -2
- package/spx-inputs/spx-input-box.component.d.ts +8 -5
- package/spx-inputs/spx-input-float.component.d.ts +3 -2
- package/spx-inputs/spx-input-number.component.d.ts +3 -2
- package/spx-inputs/spx-input-radio.component.d.ts +13 -5
- package/spx-inputs/spx-input-text.component.d.ts +1 -1
- package/spx-inputs/spx-input-type.enum.d.ts +2 -0
- package/spx-inputs/spx-input.component.d.ts +9 -2
- package/spx-navigation/spx-home-tiles.component.d.ts +2 -1
- package/spx-navigation/spx-navigation.component.d.ts +2 -1
- package/spx-suggestion/spx-suggestion.component.d.ts +3 -2
- package/spx-validation/public-api.d.ts +0 -1
- package/spx-validation/spx-validate-control.component.d.ts +1 -1
- package/tailwind.css +1 -1
- package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +0 -41
- package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +0 -49
- package/esm2022/spx-validation/spx-validation.module.mjs +0 -28
- package/spx-channel-selection/src/spx-channel-selection.component.d.ts +0 -12
- package/spx-channel-selection/src/spx-company-selection.component.d.ts +0 -13
- package/spx-validation/spx-validation.module.d.ts +0 -9
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Component, Input, Output } from '@angular/core';
|
|
3
3
|
import { SpxButtonComponent } from '@softpak/components/spx-button';
|
|
4
|
-
import
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
+
import { CommonModule, NgIf } from '@angular/common';
|
|
6
5
|
import * as i1 from '@angular/forms';
|
|
7
6
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
8
|
-
import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
9
|
-
import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
|
|
10
7
|
import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
8
|
+
import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
|
|
9
|
+
import { SpxFormViewComponent } from '@softpak/components/spx-form-view';
|
|
10
|
+
import { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';
|
|
11
|
+
import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
|
|
12
|
+
import { spxValidatorRequired } from '@softpak/components/spx-validation';
|
|
11
13
|
|
|
12
14
|
class SpxChannelIndicatorComponent {
|
|
13
15
|
constructor() {
|
|
@@ -51,117 +53,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
51
53
|
type: Output
|
|
52
54
|
}] } });
|
|
53
55
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
const sectionWelcome = 'welcome';
|
|
57
|
+
const ctrlChannel = 'channel';
|
|
58
|
+
const ctrlChannelType = 'channelType';
|
|
59
|
+
class SpxWelcomeComponent {
|
|
60
|
+
get ctrlChannel() { return this.formGroup.get(ctrlChannel); }
|
|
61
|
+
get ctrlChannelType() { return this.formGroup.get(ctrlChannelType); }
|
|
62
|
+
get filteredCompanies() { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand })); }
|
|
63
|
+
constructor(formBuilder) {
|
|
64
|
+
this.formBuilder = formBuilder;
|
|
65
|
+
this.channels = [];
|
|
66
|
+
this.channelTypes = [];
|
|
67
|
+
this.spxSelect = new EventEmitter();
|
|
68
|
+
this.severitySuccess = SpxSeverityEnum.success;
|
|
69
|
+
this.suggestions = {
|
|
70
|
+
[ctrlChannelType]: [],
|
|
71
|
+
[ctrlChannel]: [],
|
|
72
|
+
};
|
|
73
|
+
this.subscriptions = {};
|
|
74
|
+
this.sections = [
|
|
75
|
+
{
|
|
76
|
+
key: sectionWelcome,
|
|
77
|
+
showTitle: () => false,
|
|
78
|
+
fields: [
|
|
79
|
+
{
|
|
80
|
+
key: ctrlChannel,
|
|
81
|
+
type: () => SpxInputTypeEnum.radio,
|
|
82
|
+
label: () => this.txtCompany,
|
|
83
|
+
validators: () => [spxValidatorRequired()],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: ctrlChannelType,
|
|
87
|
+
type: () => SpxInputTypeEnum.radio,
|
|
88
|
+
label: () => this.txtChannel,
|
|
89
|
+
capitalize: () => true,
|
|
90
|
+
show: () => valuePairToValue(this.ctrlChannel.value),
|
|
91
|
+
validators: () => [spxValidatorRequired()],
|
|
92
|
+
},
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
];
|
|
58
96
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
CommonModule,
|
|
76
|
-
FormsModule,
|
|
77
|
-
ReactiveFormsModule,
|
|
78
|
-
SpxInputComponent,
|
|
79
|
-
]
|
|
80
|
-
}]
|
|
81
|
-
}], ctorParameters: () => [], propDecorators: { control: [{
|
|
82
|
-
type: Input
|
|
83
|
-
}], options: [{
|
|
84
|
-
type: Input
|
|
85
|
-
}], txtChannel: [{
|
|
86
|
-
type: Input
|
|
87
|
-
}] } });
|
|
88
|
-
|
|
89
|
-
class SpxCompanySelectionComponent {
|
|
90
|
-
constructor() {
|
|
91
|
-
this.options = [];
|
|
92
|
-
this.inputTypeRadio = SpxInputTypeEnum.radio;
|
|
97
|
+
ngOnChanges(changes) {
|
|
98
|
+
this.suggestions[ctrlChannel] = this.filteredCompanies;
|
|
99
|
+
}
|
|
100
|
+
ngOnDestroy() {
|
|
101
|
+
}
|
|
102
|
+
ngOnInit() {
|
|
103
|
+
this.subscriptions.channel = this.ctrlChannel.valueChanges.subscribe(valuePair => {
|
|
104
|
+
const channel = this.channels?.find(c => c.brand === valuePairToValue(valuePair));
|
|
105
|
+
this.suggestions[ctrlChannelType] = !channel ? [] : channel?.channelTypes?.map(ct => ({
|
|
106
|
+
description: ct,
|
|
107
|
+
value: ct
|
|
108
|
+
}));
|
|
109
|
+
this.ctrlChannelType.setValue({
|
|
110
|
+
value: SpxAppChannelTypeEnum.production,
|
|
111
|
+
});
|
|
112
|
+
});
|
|
93
113
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
114
|
+
onSubmit() {
|
|
115
|
+
console.log('spxSelect emitting...');
|
|
116
|
+
this.spxSelect.emit({
|
|
117
|
+
channel: this.channels?.find(c => c.brand === valuePairToValue(this.ctrlChannel.value)),
|
|
118
|
+
channelType: valuePairToValue(this.ctrlChannelType.value),
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
createForm() {
|
|
122
|
+
return SpxFormViewComponent.createForm(this.formBuilder, this.sections);
|
|
123
|
+
}
|
|
124
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxWelcomeComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
125
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxWelcomeComponent, isStandalone: true, selector: "spx-welcome", inputs: { channels: "channels", channelTypes: "channelTypes", formGroup: "formGroup", txtChannel: "txtChannel", txtCompany: "txtCompany" }, outputs: { spxSelect: "spxSelect" }, usesOnChanges: true, ngImport: i0, template: `<form [formGroup]="formGroup" class="max-w-lg mx-auto flex flex-col gap-3" (ngSubmit)="onSubmit()">
|
|
126
|
+
<spx-form-view
|
|
127
|
+
[spxFormGroup]="formGroup"
|
|
128
|
+
[spxSections]="sections"
|
|
129
|
+
[spxSuggestions]="suggestions">
|
|
130
|
+
</spx-form-view>
|
|
131
|
+
<spx-button
|
|
132
|
+
[spxFullWidth]="true"
|
|
133
|
+
[spxSeverity]="severitySuccess">
|
|
134
|
+
Save
|
|
135
|
+
</spx-button>
|
|
136
|
+
</form>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { 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: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxSections", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }] }); }
|
|
101
137
|
}
|
|
102
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type:
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxWelcomeComponent, decorators: [{
|
|
103
139
|
type: Component,
|
|
104
140
|
args: [{
|
|
105
|
-
selector: 'spx-
|
|
106
|
-
template: `<
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
[
|
|
110
|
-
|
|
111
|
-
</spx-form-
|
|
141
|
+
selector: 'spx-welcome',
|
|
142
|
+
template: `<form [formGroup]="formGroup" class="max-w-lg mx-auto flex flex-col gap-3" (ngSubmit)="onSubmit()">
|
|
143
|
+
<spx-form-view
|
|
144
|
+
[spxFormGroup]="formGroup"
|
|
145
|
+
[spxSections]="sections"
|
|
146
|
+
[spxSuggestions]="suggestions">
|
|
147
|
+
</spx-form-view>
|
|
148
|
+
<spx-button
|
|
149
|
+
[spxFullWidth]="true"
|
|
150
|
+
[spxSeverity]="severitySuccess">
|
|
151
|
+
Save
|
|
152
|
+
</spx-button>
|
|
153
|
+
</form>`,
|
|
112
154
|
standalone: true,
|
|
113
155
|
imports: [
|
|
114
156
|
CommonModule,
|
|
115
157
|
FormsModule,
|
|
116
158
|
ReactiveFormsModule,
|
|
117
|
-
|
|
159
|
+
SpxButtonComponent,
|
|
118
160
|
SpxFormSectionComponent,
|
|
161
|
+
SpxFormViewComponent,
|
|
162
|
+
SpxInputComponent,
|
|
163
|
+
NgIf,
|
|
119
164
|
]
|
|
120
165
|
}]
|
|
121
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
166
|
+
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { channels: [{
|
|
122
167
|
type: Input
|
|
123
|
-
}],
|
|
168
|
+
}], channelTypes: [{
|
|
169
|
+
type: Input
|
|
170
|
+
}], formGroup: [{
|
|
124
171
|
type: Input
|
|
125
172
|
}], txtChannel: [{
|
|
126
173
|
type: Input
|
|
127
174
|
}], txtCompany: [{
|
|
128
175
|
type: Input
|
|
129
|
-
}]
|
|
130
|
-
|
|
131
|
-
class SpxWelcomeComponent {
|
|
132
|
-
get filteredChannels() { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)); }
|
|
133
|
-
constructor() {
|
|
134
|
-
this.channels = [];
|
|
135
|
-
this.spxSelected = new EventEmitter();
|
|
136
|
-
}
|
|
137
|
-
onSelectChannel(channel) {
|
|
138
|
-
this.spxSelected.emit(channel);
|
|
139
|
-
}
|
|
140
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxWelcomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
141
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxWelcomeComponent, isStandalone: true, selector: "spx-welcome", inputs: { channels: "channels" }, outputs: { spxSelected: "spxSelected" }, ngImport: i0, template: `<div class="flex flex-col gap-3">
|
|
142
|
-
<spx-button [spxFullWidth]="true" *ngFor="let channel of filteredChannels" (click)="onSelectChannel(channel)">
|
|
143
|
-
{{ channel.brand }}
|
|
144
|
-
</spx-button>
|
|
145
|
-
</div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }] }); }
|
|
146
|
-
}
|
|
147
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxWelcomeComponent, decorators: [{
|
|
148
|
-
type: Component,
|
|
149
|
-
args: [{
|
|
150
|
-
selector: 'spx-welcome',
|
|
151
|
-
template: `<div class="flex flex-col gap-3">
|
|
152
|
-
<spx-button [spxFullWidth]="true" *ngFor="let channel of filteredChannels" (click)="onSelectChannel(channel)">
|
|
153
|
-
{{ channel.brand }}
|
|
154
|
-
</spx-button>
|
|
155
|
-
</div>`,
|
|
156
|
-
standalone: true,
|
|
157
|
-
imports: [
|
|
158
|
-
CommonModule,
|
|
159
|
-
SpxButtonComponent,
|
|
160
|
-
]
|
|
161
|
-
}]
|
|
162
|
-
}], ctorParameters: () => [], propDecorators: { channels: [{
|
|
163
|
-
type: Input
|
|
164
|
-
}], spxSelected: [{
|
|
176
|
+
}], spxSelect: [{
|
|
165
177
|
type: Output
|
|
166
178
|
}] } });
|
|
167
179
|
|
|
@@ -169,5 +181,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
169
181
|
* Generated bundle index. Do not edit.
|
|
170
182
|
*/
|
|
171
183
|
|
|
172
|
-
export { SpxChannelIndicatorComponent,
|
|
184
|
+
export { SpxChannelIndicatorComponent, SpxWelcomeComponent, ctrlChannel, ctrlChannelType, sectionWelcome };
|
|
173
185
|
//# sourceMappingURL=softpak-components-spx-channel-selection.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-company-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-welcome.component.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-channel-indicator',\n template: `<div class=\"bg-white p-3 rounded flex gap-3 items-center text-black\">\n <div class=\"grow\">\n <div class=\"text-lg font-bold\">{{ channel?.brand }}</div>\n <div class=\"text-base text-gray-600\">{{ channelType }}</div>\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ txtChange }}</spx-button>\n </div>`,\n standalone: true,\n imports: [\n SpxButtonComponent,\n ],\n})\nexport class SpxChannelIndicatorComponent {\n @Input() channel?: SpxAppChannelI;\n @Input() channelType?: SpxAppChannelTypeEnum;\n @Input() txtChange!: string;\n @Output() spxChange: EventEmitter<void> = new EventEmitter<void>();\n\n constructor(\n ) { }\n\n onChange() {\n this.spxChange.emit();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\n\n@Component({\n selector: 'spx-channel-selection',\n template: `\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtChannel\"\n [spxType]=\"inputTypeRadio\" [spxSuggestions]=\"options\"></spx-input>\n `,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n ]\n})\nexport class SpxChannelSelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n inputTypeRadio = SpxInputTypeEnum.radio;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\n\n\n@Component({\n selector: 'spx-company-selection',\n template: `<spx-form-section [spxTitle]=\"txtChannel\" [spxIndex]=\"2\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtCompany\"\n [spxType]=\"inputTypeRadio\" [spxSuggestions]=\"options\"></spx-input>\n </div>\n</spx-form-section>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n SpxFormSectionComponent,\n ]\n})\nexport class SpxCompanySelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n @Input() txtCompany!: string;\n inputTypeRadio = SpxInputTypeEnum.radio;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-welcome',\n template: `<div class=\"flex flex-col gap-3\">\n <spx-button [spxFullWidth]=\"true\" *ngFor=\"let channel of filteredChannels\" (click)=\"onSelectChannel(channel)\">\n {{ channel.brand }}\n </spx-button>\n </div>`,\n standalone: true,\n imports: [\n CommonModule,\n SpxButtonComponent,\n ]\n})\nexport class SpxWelcomeComponent {\n @Input() public channels?: SpxAppChannelI[] = [];\n @Output() public spxSelected: EventEmitter<SpxAppChannelI> = new EventEmitter<SpxAppChannelI>();\n\n get filteredChannels () { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)); }\n\n constructor(\n ) { }\n\n onSelectChannel(channel: SpxAppChannelI) {\n this.spxSelected.emit(channel);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAkBa,4BAA4B,CAAA;AAMvC,IAAA,WAAA,GAAA;AAFU,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;K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A,YAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,gBAAA,EAAA,SAAA,EAAA,eAAA,EAAA,cAAA,EAAA,aAAA,EAAA,SAAA,EAAA,aAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGT,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAb/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,CAAA;;;;AAIH,QAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,kBAAkB;AACnB,qBAAA;AACF,iBAAA,CAAA;wDAEiB,QAAQ,EAAA,CAAA;sBAAvB,KAAK;gBACW,WAAW,EAAA,CAAA;sBAA3B,MAAM;;;ACpBT;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-welcome.component.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-channel-indicator',\n template: `<div class=\"bg-white p-3 rounded flex gap-3 items-center text-black\">\n <div class=\"grow\">\n <div class=\"text-lg font-bold\">{{ channel?.brand }}</div>\n <div class=\"text-base text-gray-600\">{{ channelType }}</div>\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ txtChange }}</spx-button>\n </div>`,\n standalone: true,\n imports: [\n SpxButtonComponent,\n ],\n})\nexport class SpxChannelIndicatorComponent {\n @Input() channel?: SpxAppChannelI;\n @Input() channelType?: SpxAppChannelTypeEnum;\n @Input() txtChange!: string;\n @Output() spxChange: EventEmitter<void> = new EventEmitter<void>();\n\n constructor(\n ) { }\n\n onChange() {\n this.spxChange.emit();\n }\n}\n","import { CommonModule, NgIf } from '@angular/common';\nimport { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, OnInit, OnDestroy } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\nimport { SpxFormSectionI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\nimport { Subscription } from 'rxjs';\n\nexport const sectionWelcome = 'welcome';\nexport const ctrlChannel = 'channel';\nexport const ctrlChannelType = 'channelType';\nexport interface SpxWelcomeValueI {\n [ctrlChannel]?: SpxAppChannelI;\n [ctrlChannelType]: SpxAppChannelTypeEnum;\n}\n\n@Component({\n selector: 'spx-welcome',\n 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 [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n </form>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxFormSectionComponent,\n SpxFormViewComponent,\n SpxInputComponent,\n NgIf,\n ]\n})\nexport class SpxWelcomeComponent implements OnChanges, OnInit, OnDestroy {\n @Input() channels?: SpxAppChannelI[] = [];\n @Input() channelTypes?: SpxAppChannelTypeEnum[] = [];\n @Input() formGroup!: FormGroup;\n @Input() txtChannel!: string;\n @Input() txtCompany!: string;\n @Output() spxSelect: EventEmitter<SpxWelcomeValueI> = new EventEmitter<SpxWelcomeValueI>();\n severitySuccess = SpxSeverityEnum.success;\n suggestions: {\n [ctrlChannelType]?: SpxValuePair<string>[];\n [ctrlChannel]?: SpxValuePair<string>[];\n } = {\n [ctrlChannelType]: [],\n [ctrlChannel]: [],\n };\n \n get ctrlChannel(): FormControl { return this.formGroup.get(ctrlChannel) as FormControl; }\n get ctrlChannelType(): FormControl { return this.formGroup.get(ctrlChannelType) as FormControl; }\n private subscriptions: {\n channel?: Subscription\n } = {};\n\n sections: SpxFormSectionI[] = [\n {\n key: sectionWelcome,\n showTitle: () => false,\n fields: [\n {\n key: ctrlChannel,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.txtCompany,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlChannelType,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.txtChannel,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlChannel.value),\n validators: () => [spxValidatorRequired()],\n },\n ]\n }\n ];\n \n get filteredCompanies(): SpxValuePair<string>[] { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand })); }\n\n constructor(readonly formBuilder: FormBuilder) {\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.suggestions[ctrlChannel] = this.filteredCompanies;\n }\n\n ngOnDestroy(): void {\n \n }\n\n ngOnInit(): void {\n this.subscriptions.channel = this.ctrlChannel.valueChanges.subscribe(valuePair => {\n const channel = this.channels?.find(c => c.brand === valuePairToValue(valuePair));\n this.suggestions[ctrlChannelType] = !channel ? [] : channel?.channelTypes?.map(ct => ({\n description: ct,\n value: ct\n }));\n this.ctrlChannelType.setValue({\n value: SpxAppChannelTypeEnum.production,\n });\n });\n }\n\n onSubmit(): void {\n console.log('spxSelect emitting...');\n this.spxSelect.emit({\n channel: this.channels?.find(c => c.brand === valuePairToValue(this.ctrlChannel.value)),\n channelType: valuePairToValue(this.ctrlChannelType.value),\n });\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.formBuilder, this.sections);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAkBa,4BAA4B,CAAA;AAMvC,IAAA,WAAA,GAAA;AAFU,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;KAG9D;IAEL,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB;8GAXU,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,EAZ7B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,aAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;AAMH,QAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAGL,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,MAAA,EAAA,CAAA,aAAA,EAAA,UAAA,EAAA,gBAAA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A,kBAAkB,qOAElB,oBAAoB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,aAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,UAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAKX,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBA1B/B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;AAWF,SAAA,CAAA;AACR,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,kBAAkB;wBAClB,uBAAuB;wBACvB,oBAAoB;wBACpB,iBAAiB;wBACjB,IAAI;AACL,qBAAA;AACF,iBAAA,CAAA;gFAEU,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACI,SAAS,EAAA,CAAA;sBAAlB,MAAM;;;ACpDT;;AAEG;;;;"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
+
import { Component, Input, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
4
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import { combineLatest, startWith, map } from 'rxjs';
|
|
6
|
-
import
|
|
7
|
-
import { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidationModule } from '@softpak/components/spx-validation';
|
|
6
|
+
import { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidateControlComponent } from '@softpak/components/spx-validation';
|
|
8
7
|
import { valuePairToValue, calcCheckDigit } from '@softpak/components/spx-helpers';
|
|
9
8
|
import * as i2 from '@angular/common';
|
|
10
9
|
import { CommonModule } from '@angular/common';
|
|
@@ -58,6 +57,11 @@ class SpxCheckDigitComponent {
|
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
59
|
}
|
|
60
|
+
ngAfterViewInit() {
|
|
61
|
+
setTimeout(() => {
|
|
62
|
+
this.ctrlContainerNumberRef?.setFocusIn();
|
|
63
|
+
}, 250);
|
|
64
|
+
}
|
|
61
65
|
ngOnDestroy() {
|
|
62
66
|
if (this.inputChanges) {
|
|
63
67
|
this.inputChanges.unsubscribe();
|
|
@@ -67,7 +71,7 @@ class SpxCheckDigitComponent {
|
|
|
67
71
|
return formControl._rawValidators;
|
|
68
72
|
}
|
|
69
73
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCheckDigitComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
70
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: "txtCheckDigit", txtContainer: "txtContainer", txtPrefix: "txtPrefix" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "
|
|
74
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: "txtCheckDigit", txtContainer: "txtContainer", txtPrefix: "txtPrefix" }, viewQueries: [{ propertyName: "ctrlContainerNumberRef", first: true, predicate: ["ctrlContainerNumberRef"], descendants: true }], ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n #ctrlContainerNumberRef\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
|
|
71
75
|
}
|
|
72
76
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCheckDigitComponent, decorators: [{
|
|
73
77
|
type: Component,
|
|
@@ -75,15 +79,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
75
79
|
CommonModule,
|
|
76
80
|
FormsModule,
|
|
77
81
|
ReactiveFormsModule,
|
|
78
|
-
|
|
82
|
+
SpxValidateControlComponent,
|
|
79
83
|
SpxInputComponent,
|
|
80
|
-
], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>" }]
|
|
84
|
+
], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n #ctrlContainerNumberRef\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>" }]
|
|
81
85
|
}], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { txtCheckDigit: [{
|
|
82
86
|
type: Input
|
|
83
87
|
}], txtContainer: [{
|
|
84
88
|
type: Input
|
|
85
89
|
}], txtPrefix: [{
|
|
86
90
|
type: Input
|
|
91
|
+
}], ctrlContainerNumberRef: [{
|
|
92
|
+
type: ViewChild,
|
|
93
|
+
args: ['ctrlContainerNumberRef']
|
|
87
94
|
}] } });
|
|
88
95
|
|
|
89
96
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-check-digit.mjs","sources":["../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.ts","../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.html","../../../../projects/softpak/components/spx-check-digit/softpak-components-spx-check-digit.ts"],"sourcesContent":["import { Component, Input } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern,
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-check-digit.mjs","sources":["../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.ts","../../../../projects/softpak/components/spx-check-digit/spx-check-digit.component.html","../../../../projects/softpak/components/spx-check-digit/softpak-components-spx-check-digit.ts"],"sourcesContent":["import { Component, Input, ViewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidateControlComponent } from '@softpak/components/spx-validation';\nimport { calcCheckDigit, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { CommonModule } from '@angular/common';\nimport { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\n\nconst ctrlCheckDigit = 'checkDigit';\nconst ctrlContainerNumber = 'containerNumber';\nconst ctrlPrefix = 'prefix';\n\n@Component({\n selector: 'spx-check-digit',\n templateUrl: './spx-check-digit.component.html',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxValidateControlComponent,\n SpxInputComponent,\n ]\n})\nexport class SpxCheckDigitComponent {\n @Input() txtCheckDigit!: string;\n @Input() txtContainer!: string;\n @Input() txtPrefix!: string;\n @ViewChild('ctrlContainerNumberRef') ctrlContainerNumberRef?: SpxInputComponent;\n inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;\n inputTypeText = SpxInputTypeEnum.text;\n formGroup: FormGroup;\n\n get ctrlCheckDigit(): FormControl { return this.formGroup.get(ctrlCheckDigit) as FormControl; }\n get ctrlContainerNumber(): FormControl { return this.formGroup.get(ctrlContainerNumber) as FormControl; }\n get ctrlContainerPrefix(): FormControl { return this.formGroup.get(ctrlPrefix) as FormControl; }\n\n private inputChanges?: Subscription;\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.formGroup = this.formBuilder.group({\n [ctrlCheckDigit]: [null, []],\n [ctrlContainerNumber]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(6),\n spxValidatorMinLength(6),\n spxValidatorPattern(/[0-9]{6}/),\n ]],\n [ctrlPrefix]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(4),\n spxValidatorMinLength(4),\n spxValidatorPattern(/[a-zA-Z]{4}/),\n ]],\n })\n }\n\n ngOnInit(): void {\n this.inputChanges = combineLatest([\n this.ctrlContainerNumber.valueChanges.pipe(startWith(this.ctrlContainerNumber.value)),\n this.ctrlContainerPrefix.valueChanges.pipe(startWith(this.ctrlContainerPrefix.value)),\n ])\n .pipe(map(([containerNumber$, prefix$]) => ({\n containerNumber: containerNumber$,\n prefix: prefix$\n })))\n .subscribe((v) => {\n if (this.ctrlContainerNumber.invalid || this.ctrlContainerPrefix.invalid) {\n this.ctrlCheckDigit.setValue(null, { emitEvent: false });\n } else {\n const prefix = valuePairToValue(this.ctrlContainerPrefix.value);\n const containerNumber = valuePairToValue(this.ctrlContainerNumber.value);\n const checkDigit = calcCheckDigit(`${prefix}${containerNumber}`);\n this.ctrlCheckDigit.setValue({ value: checkDigit }, { emitEvent: false });\n }\n });\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.ctrlContainerNumberRef?.setFocusIn(); \n }, 250);\n }\n\n ngOnDestroy(): void {\n if (this.inputChanges) {\n this.inputChanges.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n}\n","<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n #ctrlContainerNumberRef\n [formControl]=\"ctrlContainerNumber\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber && ctrlContainerNumber.errors && ctrlContainerNumber.touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber)\">\n <spx-validate-control [control]=\"ctrlContainerNumber\" [label]=\"txtContainer\"></spx-validate-control>\n </spx-input>\n <spx-input\n [formControl]=\"ctrlContainerPrefix\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtPrefix\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerPrefix && ctrlContainerPrefix.errors && ctrlContainerPrefix.touched\"\n [spxType]=\"inputTypeText\"\n [spxValidators]=\"getRawValidators(ctrlContainerPrefix)\">\n <spx-validate-control [control]=\"ctrlContainerPrefix\" [label]=\"txtPrefix\"></spx-validate-control>\n </spx-input>\n <spx-input\n *ngIf=\"ctrlCheckDigit.value\"\n [formControl]=\"ctrlCheckDigit\"\n [spxLabel]=\"txtCheckDigit\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAQA,MAAM,cAAc,GAAG,YAAY,CAAC;AACpC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;AAC9C,MAAM,UAAU,GAAG,QAAQ,CAAC;MAcf,sBAAsB,CAAA;AASjC,IAAA,IAAI,cAAc,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,cAAc,CAAgB,CAAC,EAAE;AAC/F,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,mBAAmB,CAAgB,CAAC,EAAE;AACzG,IAAA,IAAI,mBAAmB,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAgB,CAAC,EAAE;AAIhG,IAAA,WAAA,CACmB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;AAX3C,QAAA,IAAA,CAAA,sBAAsB,GAAG,gBAAgB,CAAC,aAAa,CAAC;AACxD,QAAA,IAAA,CAAA,aAAa,GAAG,gBAAgB,CAAC,IAAI,CAAC;QAYpC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AACtC,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,EAAA,OAAA,EAAA,aAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAC3B,iBAAiB,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,SAAA,EAAA,aAAA,EAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,aAAA,EAAA,aAAA,EAAA,cAAA,EAAA,YAAA,EAAA,cAAA,EAAA,eAAA,EAAA,2BAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,SAAA,EAAA,eAAA,EAAA,OAAA,EAAA,eAAA,EAAA,YAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,UAAA,EAAA,WAAA,EAAA,UAAA,EAAA,SAAA,EAAA,SAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGR,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAZlC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EAEf,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,2BAA2B;wBAC3B,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,g1CAAA,EAAA,CAAA;gFAGQ,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBAC+B,sBAAsB,EAAA,CAAA;sBAA1D,SAAS;uBAAC,wBAAwB,CAAA;;;AE5BrC;;AAEG;;;;"}
|
|
@@ -7,25 +7,25 @@ class SpxFormSectionComponent {
|
|
|
7
7
|
this.spxShowTitle = true;
|
|
8
8
|
}
|
|
9
9
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxFormSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxFormSectionComponent, isStandalone: true, selector: "spx-form-section", inputs: { spxIndex: "spxIndex", spxIndexSecondary: "spxIndexSecondary", spxTitle: "spxTitle", spxShowTitle: "spxShowTitle" }, ngImport: i0, template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title mb-2">
|
|
11
|
-
<div class="spx-form-section__title-index">{{this.spxIndex}}<ng-container *ngIf="this.spxIndexSecondary">{{ this.spxIndexSecondary }}</ng-container></div>
|
|
12
|
-
<div class="spx-form-
|
|
10
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxFormSectionComponent, isStandalone: true, selector: "spx-form-section", inputs: { spxIndex: "spxIndex", spxIndexSecondary: "spxIndexSecondary", spxTitle: "spxTitle", spxShowTitle: "spxShowTitle" }, ngImport: i0, template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title mb-2 flex gap-3 items-center">
|
|
11
|
+
<div class="spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold">{{this.spxIndex}}<ng-container *ngIf="this.spxIndexSecondary">{{ this.spxIndexSecondary }}</ng-container></div>
|
|
12
|
+
<div class="spx-form-section__content font-bold grow text-black dark:text-white">{{this.spxTitle}}</div>
|
|
13
13
|
</div>
|
|
14
|
-
<div class="
|
|
14
|
+
<div class="flex flex-col gap-3">
|
|
15
15
|
<ng-content></ng-content>
|
|
16
|
-
</div>`, isInline: true, styles: [":host{display:block}.spx-form-section__title-index{background-color:var(--spx-form-section--index--background-color
|
|
16
|
+
</div>`, isInline: true, styles: [":host{display:block}.spx-form-section__title-index{background-color:var(--spx-form-section--index--background-color);color:var(--spx-form-section--index--color, #FFFFFF);display:inline-block;vertical-align:middle}.spx-form-section__content{color:var(--spx-form-section--index--background-color, #000000)}@media (prefers-color-scheme: dark){.spx-form-section__content{color:var(--spx-form-section--index--background-color, #FFFFFF)}}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
17
17
|
}
|
|
18
18
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxFormSectionComponent, decorators: [{
|
|
19
19
|
type: Component,
|
|
20
20
|
args: [{ selector: 'spx-form-section', standalone: true, imports: [
|
|
21
21
|
NgIf,
|
|
22
|
-
], template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title mb-2">
|
|
23
|
-
<div class="spx-form-section__title-index">{{this.spxIndex}}<ng-container *ngIf="this.spxIndexSecondary">{{ this.spxIndexSecondary }}</ng-container></div>
|
|
24
|
-
<div class="spx-form-
|
|
22
|
+
], template: `<div *ngIf="this.spxShowTitle" class="spx-form-section__title mb-2 flex gap-3 items-center">
|
|
23
|
+
<div class="spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold">{{this.spxIndex}}<ng-container *ngIf="this.spxIndexSecondary">{{ this.spxIndexSecondary }}</ng-container></div>
|
|
24
|
+
<div class="spx-form-section__content font-bold grow text-black dark:text-white">{{this.spxTitle}}</div>
|
|
25
25
|
</div>
|
|
26
|
-
<div class="
|
|
26
|
+
<div class="flex flex-col gap-3">
|
|
27
27
|
<ng-content></ng-content>
|
|
28
|
-
</div>`, styles: [":host{display:block}.spx-form-section__title-index{background-color:var(--spx-form-section--index--background-color
|
|
28
|
+
</div>`, styles: [":host{display:block}.spx-form-section__title-index{background-color:var(--spx-form-section--index--background-color);color:var(--spx-form-section--index--color, #FFFFFF);display:inline-block;vertical-align:middle}.spx-form-section__content{color:var(--spx-form-section--index--background-color, #000000)}@media (prefers-color-scheme: dark){.spx-form-section__content{color:var(--spx-form-section--index--background-color, #FFFFFF)}}\n"] }]
|
|
29
29
|
}], propDecorators: { spxIndex: [{
|
|
30
30
|
type: Input
|
|
31
31
|
}], spxIndexSecondary: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-form-section.mjs","sources":["../../../../projects/softpak/components/spx-form-section/spx-form-section.component.ts","../../../../projects/softpak/components/spx-form-section/softpak-components-spx-form-section.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-form-section',\n standalone: true,\n imports: [\n NgIf,\n ],\n template: `<div *ngIf=\"this.spxShowTitle\" class=\"spx-form-section__title mb-2\">\n <div class=\"spx-form-section__title-index\">{{this.spxIndex}}<ng-container *ngIf=\"this.spxIndexSecondary\">{{ this.spxIndexSecondary }}</ng-container></div>\n <div class=\"spx-form-
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-form-section.mjs","sources":["../../../../projects/softpak/components/spx-form-section/spx-form-section.component.ts","../../../../projects/softpak/components/spx-form-section/softpak-components-spx-form-section.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport { Component, Input } from '@angular/core';\n\n@Component({\n selector: 'spx-form-section',\n standalone: true,\n imports: [\n NgIf,\n ],\n template: `<div *ngIf=\"this.spxShowTitle\" class=\"spx-form-section__title mb-2 flex gap-3 items-center\">\n <div class=\"spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold\">{{this.spxIndex}}<ng-container *ngIf=\"this.spxIndexSecondary\">{{ this.spxIndexSecondary }}</ng-container></div>\n <div class=\"spx-form-section__content font-bold grow text-black dark:text-white\">{{this.spxTitle}}</div>\n </div>\n <div class=\"flex flex-col gap-3\">\n <ng-content></ng-content>\n </div>`,\n styles: `\n :host {\n display: block;\n }\n \n .spx-form-section__title-index {\n background-color: var(--spx-form-section--index--background-color);\n color: var(--spx-form-section--index--color, #FFFFFF);\n display: inline-block;\n vertical-align: middle;\n }\n\n .spx-form-section__content {\n color: var(--spx-form-section--index--background-color, #000000);\n }\n\n @media (prefers-color-scheme: dark) {\n .spx-form-section__content {\n color: var(--spx-form-section--index--background-color, #FFFFFF);\n }\n}\n `,\n})\nexport class SpxFormSectionComponent {\n @Input() spxIndex?: number;\n @Input() spxIndexSecondary?: number;\n @Input() spxTitle?: string;\n @Input() spxShowTitle = true;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAuCa,uBAAuB,CAAA;AApCpC,IAAA,WAAA,GAAA;QAwCW,IAAY,CAAA,YAAA,GAAG,IAAI,CAAC;AAC9B,KAAA;8GALY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,EA9BxB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;AAMH,QAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,obAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EARL,IAAI,EAAA,QAAA,EAAA,QAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,UAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAgCK,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBApCnC,SAAS;+BACE,kBAAkB,EAAA,UAAA,EAChB,IAAI,EACP,OAAA,EAAA;wBACP,IAAI;qBACL,EACS,QAAA,EAAA,CAAA;;;;;;AAMH,QAAA,CAAA,EAAA,MAAA,EA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