@softpak/components 0.0.0-beta.22 → 0.0.0-beta.220
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-button/spx-button.component.mjs +18 -5
- 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 +199 -0
- package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +1 -1
- package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +2 -2
- 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/public-api.mjs +4 -0
- package/esm2022/spx-form-view/softpak-components-spx-form-view.mjs +5 -0
- package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +119 -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 +268 -0
- package/esm2022/spx-inputs/spx-dropdown.component.mjs +94 -0
- package/esm2022/spx-inputs/spx-input-box.component.mjs +70 -46
- 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 +25 -32
- package/esm2022/spx-inputs/spx-input-type.enum.mjs +4 -1
- package/esm2022/spx-inputs/spx-input.component.mjs +48 -13
- package/esm2022/spx-navigation/spx-home-tile.component.mjs +31 -12
- package/esm2022/spx-navigation/spx-home-tiles.component.mjs +14 -5
- package/esm2022/spx-navigation/spx-navigation-item.interface.mjs +1 -1
- package/esm2022/spx-navigation/spx-navigation.component.mjs +11 -5
- package/esm2022/spx-number-check/spx-number-check.component.mjs +87 -20
- package/esm2022/spx-suggestion/spx-suggestion.component.mjs +28 -10
- 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-button.mjs +17 -4
- package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-change-details.mjs +206 -0
- package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-channel-selection.mjs +110 -21
- 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 +385 -0
- package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -0
- package/fesm2022/softpak-components-spx-inputs.mjs +337 -118
- package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-navigation.mjs +51 -17
- package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-number-check.mjs +86 -19
- package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
- package/fesm2022/softpak-components-spx-suggestion.mjs +27 -9
- 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 +29 -16
- package/spx-button/spx-button.component.d.ts +4 -2
- package/spx-change-details/index.d.ts +5 -0
- package/spx-change-details/public-api.d.ts +1 -0
- package/spx-change-details/spx-change-details-value.interface.d.ts +7 -0
- package/spx-change-details/spx-change-details.component.d.ts +63 -0
- 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/index.d.ts +5 -0
- package/spx-form-view/public-api.d.ts +3 -0
- package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
- package/spx-form-view/spx-form-field.interface.d.ts +18 -0
- package/spx-form-view/spx-form-section.interface.d.ts +9 -0
- package/spx-form-view/spx-form-view.component.d.ts +48 -0
- package/spx-inputs/spx-dropdown.component.d.ts +18 -0
- package/spx-inputs/spx-input-box.component.d.ts +14 -7
- 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 +3 -2
- package/spx-inputs/spx-input-type.enum.d.ts +4 -1
- package/spx-inputs/spx-input.component.d.ts +11 -3
- package/spx-navigation/spx-home-tile.component.d.ts +5 -1
- package/spx-navigation/spx-home-tiles.component.d.ts +2 -1
- package/spx-navigation/spx-navigation-item.interface.d.ts +1 -0
- package/spx-navigation/spx-navigation.component.d.ts +4 -1
- package/spx-number-check/spx-number-check.component.d.ts +15 -3
- package/spx-suggestion/spx-suggestion.component.d.ts +3 -1
- 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-validation/spx-validation.module.mjs +0 -28
- package/spx-validation/spx-validation.module.d.ts +0 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"softpak-components-spx-validation.mjs","sources":["../../../../projects/softpak/components/spx-validation/required.validator.ts","../../../../projects/softpak/components/spx-validation/max.validator.ts","../../../../projects/softpak/components/spx-validation/maxlength.validator.ts","../../../../projects/softpak/components/spx-validation/min.validator.ts","../../../../projects/softpak/components/spx-validation/minlength.validator.ts","../../../../projects/softpak/components/spx-validation/pattern.validator.ts","../../../../projects/softpak/components/spx-validation/year-and-month.validator.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.html","../../../../projects/softpak/components/spx-validation/spx-validation.module.ts","../../../../projects/softpak/components/spx-validation/softpak-components-spx-validation.ts"],"sourcesContent":["import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\n if (\n control &&\n valuePairToValue(control.value) === undefined ||\n valuePairToValue(control.value) === null ||\n valuePairToValue(control.value) === '' ||\n valuePairToValue(control.value) === 0\n ) {\n return { required: true };\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n if (!isNaN(value) && value > max) {\n return {\n max: {\n max,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length > maximumLength) {\n return {\n maxlength: {\n requiredLength: maximumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n\n if (!isNaN(value) && value < min) {\n return {\n min: {\n min,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length < minimumLength) {\n return {\n minlength: {\n requiredLength: minimumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const matches = valuePairToValue(control.value).toString().match(matcher);\n if (matches === null || matches.length === 0) {\n return { pattern: true };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nimport { DateTime } from 'luxon';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const val = valuePairToValue(control.value);\n if (val.toUpperCase() !== 'ACEP') {\n const date = DateTime.fromISO(val);\n const year = date.year;\n const month = date.month;\n if (val.length < 6) {\n return {\n minlength: {\n requiredLength: 6,\n actualLength: val.length\n }\n };\n }\n if (month < 1 || month > 12) {\n return { month: true };\n }\n if (future) {\n if (year > 2050 || year < DateTime.now().year) {\n return { yearFuture: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\n return { past: true };\n }\n } else {\n if (year < 1971 || year > DateTime.now().year) {\n return { year: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\n return { future: true };\n }\n }\n }\n }\n return null;\n};\n","import { Component, Input } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\n\n@Component({\n selector: 'spx-validate-control',\n templateUrl: './spx-validate-control.component.html',\n})\nexport class SpxValidateControlComponent {\n @Input() control!: AbstractControl;\n @Input() label: string | unknown;\n @Input() submitTried!: boolean;\n\n get maxLength() {\n return this.control.errors && this.control.errors['maxlength'];\n }\n\n get maxLengthRequiredLength() {\n return this.maxLength && this.control.errors && this.control.errors['maxlength']['requiredLength'];\n }\n\n get minLength() {\n return this.control.errors && this.control.errors['minlength'];\n }\n\n get minLengthRequiredLength() {\n return this.minLength && this.control.errors && this.control.errors['minlength']['requiredLength'];\n }\n\n get max() {\n return this.control.errors && this.control.errors['max'];\n }\n\n get maxRequiredMax() {\n return this.max && this.control.errors && this.control.errors['max']['max'];\n }\n\n get min() {\n return this.control.errors && this.control.errors['min'];\n }\n\n get minRequiredMin() {\n return this.min && this.control.errors && this.control.errors['min']['min'];\n }\n\n get pattern() {\n return this.control.errors && this.control.errors['pattern'];\n }\n\n get required() {\n return this.control.errors && this.control.errors['required'];\n }\n\n get year() {\n return this.control.errors && this.control.errors['year'];\n }\n\n get yearFuture() {\n return this.control.errors && this.control.errors['yearFuture'];\n }\n\n get month() {\n return this.control.errors && this.control.errors['month'];\n }\n\n get future() {\n return this.control.errors && this.control.errors['future'];\n }\n\n get past() {\n return this.control.errors && this.control.errors['past'];\n }\n}\n","<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SpxValidateControlComponent } from './spx-validate-control.component';\nimport { FormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n SpxValidateControlComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n ],\n exports: [\n SpxValidateControlComponent\n ]\n})\nexport class SpxValidationModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGa,MAAA,oBAAoB,GAAG,MAAM,CAAC,OAAwB,KAA6B;AAC5F,IAAA,IACI,OAAO;AACP,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS;AAC7C,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI;AACxC,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;QACtC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EACvC;AACE,QAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC7B;AACD,IAAA,OAAO,IAAI,CAAC;AAChB;;ACVO,MAAM,eAAe,GAAG,CAAC,GAA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A,EAAA,CAAA,CAAA,EAAA;+GAAnB,mBAAmB,EAAA,YAAA,EAAA,CAV5B,2BAA2B,CAAA,EAAA,OAAA,EAAA,CAG3B,YAAY;AACZ,YAAA,WAAW,aAGX,2BAA2B,CAAA,EAAA,CAAA,CAAA,EAAA;AAGlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAP5B,YAAY;YACZ,WAAW,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAMF,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAZ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,2BAA2B;AAC5B,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,WAAW;AACZ,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,2BAA2B;AAC5B,qBAAA;AACF,iBAAA,CAAA;;;AChBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"softpak-components-spx-validation.mjs","sources":["../../../../projects/softpak/components/spx-validation/required.validator.ts","../../../../projects/softpak/components/spx-validation/max.validator.ts","../../../../projects/softpak/components/spx-validation/maxlength.validator.ts","../../../../projects/softpak/components/spx-validation/min.validator.ts","../../../../projects/softpak/components/spx-validation/minlength.validator.ts","../../../../projects/softpak/components/spx-validation/pattern.validator.ts","../../../../projects/softpak/components/spx-validation/year-and-month.validator.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.ts","../../../../projects/softpak/components/spx-validation/spx-validate-control.component.html","../../../../projects/softpak/components/spx-validation/softpak-components-spx-validation.ts"],"sourcesContent":["import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorRequired = () => (control: AbstractControl): ValidationErrors | null => {\n if (\n control &&\n valuePairToValue(control.value) === undefined ||\n valuePairToValue(control.value) === null ||\n valuePairToValue(control.value) === '' ||\n valuePairToValue(control.value) === 0\n ) {\n return { required: true };\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMax = (max: number) => (control: AbstractControl): { max: { max: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n if (!isNaN(value) && value > max) {\n return {\n max: {\n max,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMaxLength = (maximumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { maxlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length > maximumLength) {\n return {\n maxlength: {\n requiredLength: maximumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMin = (min: number) => (control: AbstractControl): { min: { min: number; actual: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n const value = parseInt(valuePairToValue(control.value).toString(), 10);\n\n if (!isNaN(value) && value < min) {\n return {\n min: {\n min,\n actual: value\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl } from '@angular/forms';\nimport { spxValidatorRequired } from './required.validator';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\n\nexport const spxValidatorMinLength = (minimumLength: number, sanitizer?: (input: string) => string) => (control: AbstractControl): { minlength: { requiredLength: number; actualLength: number } } | null => {\n if (!spxValidatorRequired()(control)) {\n let value = valuePairToValue(control.value);\n if (sanitizer) {\n value = sanitizer(value.toString());\n }\n if (value.toString().length < minimumLength) {\n return {\n minlength: {\n requiredLength: minimumLength,\n actualLength: value.toString().length\n }\n };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorPattern = (matcher: RegExp) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const matches = valuePairToValue(control.value).toString().match(matcher);\n if (matches === null || matches.length === 0) {\n return { pattern: true };\n }\n }\n return null;\n};\n","import { AbstractControl, ValidationErrors } from '@angular/forms';\n\nimport { DateTime } from 'luxon';\nimport { valuePairToValue } from '@softpak/components/spx-helpers';\nimport { spxValidatorRequired } from './required.validator';\n\nexport const spxValidatorYearAndMonth = (future?: boolean) => (control: AbstractControl): ValidationErrors | null => {\n if (!spxValidatorRequired()(control)) {\n const val = valuePairToValue(control.value);\n if (val.toUpperCase() !== 'ACEP') {\n const date = DateTime.fromISO(val);\n const year = date.year;\n const month = date.month;\n if (val.length < 6) {\n return {\n minlength: {\n requiredLength: 6,\n actualLength: val.length\n }\n };\n }\n if (month < 1 || month > 12) {\n return { month: true };\n }\n if (future) {\n if (year > 2050 || year < DateTime.now().year) {\n return { yearFuture: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') < DateTime.now()) {\n return { past: true };\n }\n } else {\n if (year < 1971 || year > DateTime.now().year) {\n return { year: true };\n }\n if (DateTime.now().set({ year: year, month: DateTime.now().month - 1 }).startOf('month') > DateTime.now()) {\n return { future: true };\n }\n }\n }\n }\n return null;\n};\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { AbstractControl, FormsModule } from '@angular/forms';\n\n@Component({\n selector: 'spx-validate-control',\n templateUrl: './spx-validate-control.component.html',\n imports: [\n CommonModule,\n FormsModule,\n ],\n standalone: true,\n})\nexport class SpxValidateControlComponent {\n @Input() control!: AbstractControl;\n @Input() label: string | unknown;\n @Input() submitTried!: boolean;\n\n get maxLength() {\n return this.control.errors && this.control.errors['maxlength'];\n }\n\n get maxLengthRequiredLength() {\n return this.maxLength && this.control.errors && this.control.errors['maxlength']['requiredLength'];\n }\n\n get minLength() {\n return this.control.errors && this.control.errors['minlength'];\n }\n\n get minLengthRequiredLength() {\n return this.minLength && this.control.errors && this.control.errors['minlength']['requiredLength'];\n }\n\n get max() {\n return this.control.errors && this.control.errors['max'];\n }\n\n get maxRequiredMax() {\n return this.max && this.control.errors && this.control.errors['max']['max'];\n }\n\n get min() {\n return this.control.errors && this.control.errors['min'];\n }\n\n get minRequiredMin() {\n return this.min && this.control.errors && this.control.errors['min']['min'];\n }\n\n get pattern() {\n return this.control.errors && this.control.errors['pattern'];\n }\n\n get required() {\n return this.control.errors && this.control.errors['required'];\n }\n\n get year() {\n return this.control.errors && this.control.errors['year'];\n }\n\n get yearFuture() {\n return this.control.errors && this.control.errors['yearFuture'];\n }\n\n get month() {\n return this.control.errors && this.control.errors['month'];\n }\n\n get future() {\n return this.control.errors && this.control.errors['future'];\n }\n\n get past() {\n return this.control.errors && this.control.errors['past'];\n }\n}\n","<ng-container *ngIf=\"control && control.errors && (control.touched || submitTried)\">\n <div *ngIf=\"maxLength\">'{{ label }}' is too long, the maximum length is {{ maxLengthRequiredLength }}.</div>\n <div *ngIf=\"minLength\">'{{ label }}' is too short, the minimum length is {{ minLengthRequiredLength }}.</div>\n <div *ngIf=\"max\">The value of '{{ label }}' is too high, the maximum is {{ maxRequiredMax }}.</div>\n <div *ngIf=\"min\">The value of '{{ label }}' is too low, the minimum is {{ minRequiredMin }}.</div>\n <div *ngIf=\"pattern\">The pattern of '{{ label }}' not valid.</div>\n <div *ngIf=\"required\">'{{ label }}' is required.</div>\n <div *ngIf=\"year\">Please choose a year between 1991 and the current year.</div>\n <div *ngIf=\"yearFuture\">Please choose a year between the current year and 2050.</div>\n <div *ngIf=\"month\">Please choose a valid month (a value between 01 and 12).</div>\n <div *ngIf=\"future\">The selected date may not be in the future.</div>\n <div *ngIf=\"past\">The selected date may not be in the past.</div>\n</ng-container>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAGa,MAAA,oBAAoB,GAAG,MAAM,CAAC,OAAwB,KAA6B;AAC5F,IAAA,IACI,OAAO;AACP,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,SAAS;AAC7C,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,IAAI;AACxC,QAAA,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,EAAE;QACtC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,EACvC;AACE,QAAA,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KAC7B;AACD,IAAA,OAAO,IAAI,CAAC;AAChB;;ACVO,MAAM,eAAe,GAAG,CAAC,GAAW,KAAK,CAAC,OAAwB,KAAqD;AAC1H,IAAA,IAAI,CAAC,oBAAoB,EAAE,CAAC,OAAO,CAAC,EAAE;AAClC,QAAA,MAAM,KAAK,GAAG,QAAQ,CAAC,gBAAgB,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;QACvE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,GAAG,EAAE;YAC9B,OAAO;AACH,gBAAA,GAAG,EAAE;oBACD,GAAG;AACH,oBAAA,MAAM,EAAE,KAAK;AAChB,iBAAA;aACJ,CAAC;SACL;KACJ;AACD,IAAA,OAAO,IAAI,CAAC;AAChB;;ACbO,MAAM,qBAAqB,GAAG,CAAC,aAAqB,EAAE,SAAqC,KAAK,CAAC,OAAwB,KAA4E;AACxM,IAAA,IAAI,CAAC,oBAAoB,EAAE,CAAC,OAA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AAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,2BAA2B,ECbxC,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,KAAA,EAAA,OAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,4jCAYe,EDJX,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,kIACZ,WAAW,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAIF,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBATvC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,sBAAsB,EAEvB,OAAA,EAAA;wBACP,YAAY;wBACZ,WAAW;AACZ,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,QAAA,EAAA,4jCAAA,EAAA,CAAA;8BAGP,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,KAAK,EAAA,CAAA;sBAAb,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;;;AEhBR;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@softpak/components",
|
|
3
|
-
"version": "0.0.0-beta.
|
|
3
|
+
"version": "0.0.0-beta.220",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "
|
|
7
|
-
"@angular/core": "
|
|
8
|
-
"@fortawesome/free-solid-svg-icons": "^6.x.x"
|
|
6
|
+
"@angular/common": "17.x.x || 18.x.x",
|
|
7
|
+
"@angular/core": "17.x.x || 18.x.x",
|
|
8
|
+
"@fortawesome/free-solid-svg-icons": "^6.x.x",
|
|
9
|
+
"@ngx-translate/core": "^15.0.0"
|
|
9
10
|
},
|
|
10
11
|
"dependencies": {
|
|
11
12
|
"tslib": "^2.3.0"
|
|
@@ -29,24 +30,30 @@
|
|
|
29
30
|
"esm": "./esm2022/spx-alert/softpak-components-spx-alert.mjs",
|
|
30
31
|
"default": "./fesm2022/softpak-components-spx-alert.mjs"
|
|
31
32
|
},
|
|
32
|
-
"./spx-button": {
|
|
33
|
-
"types": "./spx-button/index.d.ts",
|
|
34
|
-
"esm2022": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
35
|
-
"esm": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
36
|
-
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
37
|
-
},
|
|
38
33
|
"./spx-app-configuration": {
|
|
39
34
|
"types": "./spx-app-configuration/index.d.ts",
|
|
40
35
|
"esm2022": "./esm2022/spx-app-configuration/softpak-components-spx-app-configuration.mjs",
|
|
41
36
|
"esm": "./esm2022/spx-app-configuration/softpak-components-spx-app-configuration.mjs",
|
|
42
37
|
"default": "./fesm2022/softpak-components-spx-app-configuration.mjs"
|
|
43
38
|
},
|
|
39
|
+
"./spx-button": {
|
|
40
|
+
"types": "./spx-button/index.d.ts",
|
|
41
|
+
"esm2022": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
42
|
+
"esm": "./esm2022/spx-button/softpak-components-spx-button.mjs",
|
|
43
|
+
"default": "./fesm2022/softpak-components-spx-button.mjs"
|
|
44
|
+
},
|
|
44
45
|
"./spx-capitalize": {
|
|
45
46
|
"types": "./spx-capitalize/index.d.ts",
|
|
46
47
|
"esm2022": "./esm2022/spx-capitalize/softpak-components-spx-capitalize.mjs",
|
|
47
48
|
"esm": "./esm2022/spx-capitalize/softpak-components-spx-capitalize.mjs",
|
|
48
49
|
"default": "./fesm2022/softpak-components-spx-capitalize.mjs"
|
|
49
50
|
},
|
|
51
|
+
"./spx-change-details": {
|
|
52
|
+
"types": "./spx-change-details/index.d.ts",
|
|
53
|
+
"esm2022": "./esm2022/spx-change-details/softpak-components-spx-change-details.mjs",
|
|
54
|
+
"esm": "./esm2022/spx-change-details/softpak-components-spx-change-details.mjs",
|
|
55
|
+
"default": "./fesm2022/softpak-components-spx-change-details.mjs"
|
|
56
|
+
},
|
|
50
57
|
"./spx-channel-selection": {
|
|
51
58
|
"types": "./spx-channel-selection/index.d.ts",
|
|
52
59
|
"esm2022": "./esm2022/spx-channel-selection/softpak-components-spx-channel-selection.mjs",
|
|
@@ -65,6 +72,12 @@
|
|
|
65
72
|
"esm": "./esm2022/spx-form-section/softpak-components-spx-form-section.mjs",
|
|
66
73
|
"default": "./fesm2022/softpak-components-spx-form-section.mjs"
|
|
67
74
|
},
|
|
75
|
+
"./spx-form-view": {
|
|
76
|
+
"types": "./spx-form-view/index.d.ts",
|
|
77
|
+
"esm2022": "./esm2022/spx-form-view/softpak-components-spx-form-view.mjs",
|
|
78
|
+
"esm": "./esm2022/spx-form-view/softpak-components-spx-form-view.mjs",
|
|
79
|
+
"default": "./fesm2022/softpak-components-spx-form-view.mjs"
|
|
80
|
+
},
|
|
68
81
|
"./spx-helpers": {
|
|
69
82
|
"types": "./spx-helpers/index.d.ts",
|
|
70
83
|
"esm2022": "./esm2022/spx-helpers/softpak-components-spx-helpers.mjs",
|
|
@@ -89,18 +102,18 @@
|
|
|
89
102
|
"esm": "./esm2022/spx-number-check/softpak-components-spx-number-check.mjs",
|
|
90
103
|
"default": "./fesm2022/softpak-components-spx-number-check.mjs"
|
|
91
104
|
},
|
|
92
|
-
"./spx-patch": {
|
|
93
|
-
"types": "./spx-patch/index.d.ts",
|
|
94
|
-
"esm2022": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
95
|
-
"esm": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
96
|
-
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
97
|
-
},
|
|
98
105
|
"./spx-progress-bar": {
|
|
99
106
|
"types": "./spx-progress-bar/index.d.ts",
|
|
100
107
|
"esm2022": "./esm2022/spx-progress-bar/softpak-components-spx-progress-bar.mjs",
|
|
101
108
|
"esm": "./esm2022/spx-progress-bar/softpak-components-spx-progress-bar.mjs",
|
|
102
109
|
"default": "./fesm2022/softpak-components-spx-progress-bar.mjs"
|
|
103
110
|
},
|
|
111
|
+
"./spx-patch": {
|
|
112
|
+
"types": "./spx-patch/index.d.ts",
|
|
113
|
+
"esm2022": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
114
|
+
"esm": "./esm2022/spx-patch/softpak-components-spx-patch.mjs",
|
|
115
|
+
"default": "./fesm2022/softpak-components-spx-patch.mjs"
|
|
116
|
+
},
|
|
104
117
|
"./spx-spinner": {
|
|
105
118
|
"types": "./spx-spinner/index.d.ts",
|
|
106
119
|
"esm2022": "./esm2022/spx-spinner/softpak-components-spx-spinner.mjs",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxButtonComponent {
|
|
@@ -11,17 +11,19 @@ export declare class SpxButtonComponent {
|
|
|
11
11
|
spxForm?: string;
|
|
12
12
|
spxFullHeight?: boolean;
|
|
13
13
|
spxFullWidth?: boolean;
|
|
14
|
-
spxSeverity
|
|
14
|
+
spxSeverity?: SpxSeverityEnum;
|
|
15
15
|
spxSize: 'lg' | 'xl';
|
|
16
16
|
spxTabIndex?: number;
|
|
17
17
|
spxType: 'button' | 'submit';
|
|
18
18
|
spxClick: EventEmitter<void>;
|
|
19
|
+
buttonRef?: ElementRef<HTMLInputElement>;
|
|
19
20
|
get severityError(): boolean;
|
|
20
21
|
get severityInfo(): boolean;
|
|
21
22
|
get severitySuccess(): boolean;
|
|
22
23
|
get severityWarning(): boolean;
|
|
23
24
|
hasShadowDom: (el: HTMLElement) => boolean;
|
|
24
25
|
handleClick: () => void;
|
|
26
|
+
spxSetFocus(): void;
|
|
25
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxButtonComponent, never>;
|
|
26
28
|
static ɵcmp: i0.ɵɵComponentDeclaration<SpxButtonComponent, "spx-button", never, { "spxDisabled": { "alias": "spxDisabled"; "required": false; }; "spxClass": { "alias": "spxClass"; "required": false; }; "spxClassObject": { "alias": "spxClassObject"; "required": false; }; "spxForm": { "alias": "spxForm"; "required": false; }; "spxFullHeight": { "alias": "spxFullHeight"; "required": false; }; "spxFullWidth": { "alias": "spxFullWidth"; "required": false; }; "spxSeverity": { "alias": "spxSeverity"; "required": false; }; "spxSize": { "alias": "spxSize"; "required": false; }; "spxTabIndex": { "alias": "spxTabIndex"; "required": false; }; "spxType": { "alias": "spxType"; "required": false; }; }, { "spxClick": "spxClick"; }, never, ["*"], true, never>;
|
|
27
29
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './spx-change-details.component';
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';
|
|
4
|
+
import { SpxFormFieldI, SpxFormSectionI } from '@softpak/components/spx-form-view';
|
|
5
|
+
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
6
|
+
import { SpxChangeDetailsValueI } from './spx-change-details-value.interface';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare const sectionChangeDetails = "changeDetails";
|
|
9
|
+
export declare const ctrlContainerNumber = "containerNumber";
|
|
10
|
+
export declare const ctrlContainerPrefix = "containerPrefix";
|
|
11
|
+
export declare const ctrlContainerSeqNr = "containerSeqNr";
|
|
12
|
+
export declare const ctrlContainerType = "containerType";
|
|
13
|
+
export declare const ctrlCustomer = "customer";
|
|
14
|
+
export declare const ctrlTonsTested = "tonsTested";
|
|
15
|
+
export declare const ctrlLicensePlate = "licensePlate";
|
|
16
|
+
export declare const ctrlCategory = "category";
|
|
17
|
+
export declare class SpxChangeDetailsComponent {
|
|
18
|
+
readonly formBuilder: FormBuilder;
|
|
19
|
+
formGroup: FormGroup;
|
|
20
|
+
showCategory: boolean;
|
|
21
|
+
suggestions: any;
|
|
22
|
+
txtCategory: string;
|
|
23
|
+
txtContainerNumber: string;
|
|
24
|
+
txtContainerPrefix: string;
|
|
25
|
+
txtContainerType: string;
|
|
26
|
+
txtCustomer: string;
|
|
27
|
+
txtLicensePlate: string;
|
|
28
|
+
txtTonsTested: string;
|
|
29
|
+
spxBlurCategory: EventEmitter<SpxValuePair<string>>;
|
|
30
|
+
spxBlurContainerType: EventEmitter<SpxValuePair<string>>;
|
|
31
|
+
spxSearchCategory: EventEmitter<SpxValuePair<string>>;
|
|
32
|
+
spxSearchContainerType: EventEmitter<SpxValuePair<string>>;
|
|
33
|
+
spxSearchTonsTested: EventEmitter<SpxValuePair<string>>;
|
|
34
|
+
submit: EventEmitter<SpxChangeDetailsValueI>;
|
|
35
|
+
inputTypeAutocomplete: SpxInputTypeEnum;
|
|
36
|
+
inputTypeRadio: SpxInputTypeEnum;
|
|
37
|
+
inputTypeText: SpxInputTypeEnum;
|
|
38
|
+
severitySuccess: SpxSeverityEnum;
|
|
39
|
+
sections: SpxFormSectionI[];
|
|
40
|
+
get ctrlCategory(): FormControl;
|
|
41
|
+
get ctrlCustomer(): FormControl;
|
|
42
|
+
get ctrlContainerType(): FormControl;
|
|
43
|
+
get ctrlLicensePlate(): FormControl;
|
|
44
|
+
get ctrlTonsTested(): FormControl;
|
|
45
|
+
private subContainerType?;
|
|
46
|
+
constructor(formBuilder: FormBuilder);
|
|
47
|
+
createForm(): FormGroup;
|
|
48
|
+
ngOnInit(): void;
|
|
49
|
+
ngOnDestroy(): void;
|
|
50
|
+
getRawValidators(formControl: FormControl): any;
|
|
51
|
+
onBlur(data: {
|
|
52
|
+
field: SpxFormFieldI;
|
|
53
|
+
valuePair: SpxValuePair<any>;
|
|
54
|
+
}): void;
|
|
55
|
+
onSearch(data: {
|
|
56
|
+
field: SpxFormFieldI;
|
|
57
|
+
valuePair: SpxValuePair<any>;
|
|
58
|
+
}): void;
|
|
59
|
+
onSubmit(): void;
|
|
60
|
+
private listenToContainerType;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpxChangeDetailsComponent, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxChangeDetailsComponent, "spx-change-details", never, { "formGroup": { "alias": "formGroup"; "required": false; }; "showCategory": { "alias": "showCategory"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "txtCategory": { "alias": "txtCategory"; "required": false; }; "txtContainerNumber": { "alias": "txtContainerNumber"; "required": false; }; "txtContainerPrefix": { "alias": "txtContainerPrefix"; "required": false; }; "txtContainerType": { "alias": "txtContainerType"; "required": false; }; "txtCustomer": { "alias": "txtCustomer"; "required": false; }; "txtLicensePlate": { "alias": "txtLicensePlate"; "required": false; }; "txtTonsTested": { "alias": "txtTonsTested"; "required": false; }; }, { "spxBlurCategory": "spxBlurCategory"; "spxBlurContainerType": "spxBlurContainerType"; "spxSearchCategory": "spxSearchCategory"; "spxSearchContainerType": "spxSearchContainerType"; "spxSearchTonsTested": "spxSearchTonsTested"; "submit": "submit"; }, never, never, true, never>;
|
|
63
|
+
}
|
|
@@ -1,12 +1,41 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { EventEmitter, OnChanges, SimpleChanges, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
|
|
4
|
+
import { SpxFormSectionI } from '@softpak/components/spx-form-view';
|
|
5
|
+
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
6
|
+
import { SpxValuePair } from '@softpak/components/spx-inputs';
|
|
3
7
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare
|
|
8
|
+
export declare const sectionWelcome = "welcome";
|
|
9
|
+
export declare const ctrlChannel = "channel";
|
|
10
|
+
export declare const ctrlChannelType = "channelType";
|
|
11
|
+
export interface SpxWelcomeValueI {
|
|
12
|
+
[ctrlChannel]?: SpxAppChannelI;
|
|
13
|
+
[ctrlChannelType]: SpxAppChannelTypeEnum;
|
|
14
|
+
}
|
|
15
|
+
export declare class SpxWelcomeComponent implements OnChanges, OnInit, OnDestroy {
|
|
16
|
+
readonly formBuilder: FormBuilder;
|
|
5
17
|
channels?: SpxAppChannelI[];
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
18
|
+
channelTypes?: SpxAppChannelTypeEnum[];
|
|
19
|
+
formGroup: FormGroup;
|
|
20
|
+
txtChannel: string;
|
|
21
|
+
txtCompany: string;
|
|
22
|
+
spxSelect: EventEmitter<SpxWelcomeValueI>;
|
|
23
|
+
severitySuccess: SpxSeverityEnum;
|
|
24
|
+
suggestions: {
|
|
25
|
+
[ctrlChannelType]?: SpxValuePair<string>[];
|
|
26
|
+
[ctrlChannel]?: SpxValuePair<string>[];
|
|
27
|
+
};
|
|
28
|
+
get ctrlChannel(): FormControl;
|
|
29
|
+
get ctrlChannelType(): FormControl;
|
|
30
|
+
private subscriptions;
|
|
31
|
+
sections: SpxFormSectionI[];
|
|
32
|
+
get filteredCompanies(): SpxValuePair<string>[];
|
|
33
|
+
constructor(formBuilder: FormBuilder);
|
|
34
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
35
|
+
ngOnDestroy(): void;
|
|
36
|
+
ngOnInit(): void;
|
|
37
|
+
onSubmit(): void;
|
|
38
|
+
createForm(): FormGroup;
|
|
10
39
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxWelcomeComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpxWelcomeComponent, "spx-welcome", never, { "channels": { "alias": "channels"; "required": false; }; }, { "
|
|
40
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxWelcomeComponent, "spx-welcome", never, { "channels": { "alias": "channels"; "required": false; }; "channelTypes": { "alias": "channelTypes"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "txtChannel": { "alias": "txtChannel"; "required": false; }; "txtCompany": { "alias": "txtCompany"; "required": false; }; }, { "spxSelect": "spxSelect"; }, never, never, true, never>;
|
|
12
41
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
2
|
-
import { SpxInputTypeEnum } from '@softpak/components/spx-inputs';
|
|
2
|
+
import { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxCheckDigitComponent {
|
|
5
5
|
private readonly formBuilder;
|
|
6
6
|
txtCheckDigit: string;
|
|
7
7
|
txtContainer: string;
|
|
8
8
|
txtPrefix: string;
|
|
9
|
+
ctrlContainerNumberRef?: SpxInputComponent;
|
|
9
10
|
inputTypeOverlayNumber: SpxInputTypeEnum;
|
|
10
11
|
inputTypeText: SpxInputTypeEnum;
|
|
11
12
|
formGroup: FormGroup;
|
|
@@ -15,6 +16,7 @@ export declare class SpxCheckDigitComponent {
|
|
|
15
16
|
private inputChanges?;
|
|
16
17
|
constructor(formBuilder: FormBuilder);
|
|
17
18
|
ngOnInit(): void;
|
|
19
|
+
ngAfterViewInit(): void;
|
|
18
20
|
ngOnDestroy(): void;
|
|
19
21
|
getRawValidators(formControl: FormControl): any;
|
|
20
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxCheckDigitComponent, never>;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { FormBuilder, FormControl, FormGroup } from '@angular/forms';
|
|
3
|
+
import { SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';
|
|
4
|
+
import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
|
|
5
|
+
import { SpxFormFieldI } from './spx-form-field.interface';
|
|
6
|
+
import { SpxFormSectionI } from './spx-form-section.interface';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
export declare const sectionAutocompleteSearch = "autocompleteSearch";
|
|
9
|
+
export declare const ctrlQuery = "query";
|
|
10
|
+
export declare const ctrlOptions = "options";
|
|
11
|
+
export declare class SpxAutocompleteSearchComponent implements OnInit, OnDestroy {
|
|
12
|
+
readonly formBuilder: FormBuilder;
|
|
13
|
+
formGroup: FormGroup;
|
|
14
|
+
spxSuggestions: SpxValuePair<any>[];
|
|
15
|
+
spxField: SpxFormFieldI;
|
|
16
|
+
txtOptions: string;
|
|
17
|
+
txtQuery: string;
|
|
18
|
+
txtSubmit: string;
|
|
19
|
+
spxValuePair: SpxValuePair<any>;
|
|
20
|
+
spxCancel: EventEmitter<void>;
|
|
21
|
+
spxSearch: EventEmitter<SpxValuePair<any>>;
|
|
22
|
+
spxSubmit: EventEmitter<SpxValuePair<any>>;
|
|
23
|
+
inputTypeRadio: SpxInputTypeEnum;
|
|
24
|
+
inputTypeText: SpxInputTypeEnum;
|
|
25
|
+
severityError: SpxSeverityEnum;
|
|
26
|
+
severitySuccess: SpxSeverityEnum;
|
|
27
|
+
sections: SpxFormSectionI[];
|
|
28
|
+
get ctrlQuery(): FormControl;
|
|
29
|
+
get ctrlOptions(): FormControl;
|
|
30
|
+
private subSelection?;
|
|
31
|
+
private subQuery?;
|
|
32
|
+
constructor(formBuilder: FormBuilder);
|
|
33
|
+
ngOnInit(): void;
|
|
34
|
+
ngOnDestroy(): void;
|
|
35
|
+
private createForm;
|
|
36
|
+
getRawValidators(formControl: FormControl): any;
|
|
37
|
+
onCancel(): void;
|
|
38
|
+
onSubmit(): void;
|
|
39
|
+
private listenToQuery;
|
|
40
|
+
private listenToSelection;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpxAutocompleteSearchComponent, never>;
|
|
42
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxAutocompleteSearchComponent, "spx-autocomplete-search", never, { "spxSuggestions": { "alias": "spxSuggestions"; "required": false; }; "spxField": { "alias": "spxField"; "required": false; }; "txtOptions": { "alias": "txtOptions"; "required": false; }; "txtQuery": { "alias": "txtQuery"; "required": false; }; "txtSubmit": { "alias": "txtSubmit"; "required": false; }; "spxValuePair": { "alias": "spxValuePair"; "required": false; }; }, { "spxCancel": "spxCancel"; "spxSearch": "spxSearch"; "spxSubmit": "spxSubmit"; }, never, never, true, never>;
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SpxSeverityEnum } from "@softpak/components/spx-helpers";
|
|
2
|
+
import { SpxInputTypeEnum, SpxValuePair } from "@softpak/components/spx-inputs";
|
|
3
|
+
export interface SpxFormFieldI {
|
|
4
|
+
afterValueChange?: (value: SpxValuePair<string | number | boolean | any>) => void;
|
|
5
|
+
autofocus?: () => boolean;
|
|
6
|
+
capitalize?: () => boolean;
|
|
7
|
+
defaultValue?: () => string | number | boolean | any;
|
|
8
|
+
key: string;
|
|
9
|
+
label?: () => string;
|
|
10
|
+
readonly?: () => boolean;
|
|
11
|
+
severity?: () => SpxSeverityEnum;
|
|
12
|
+
show?: () => boolean;
|
|
13
|
+
step?: () => number;
|
|
14
|
+
suggestions?: () => boolean;
|
|
15
|
+
suggestionsFixed?: () => SpxValuePair<string | number | boolean | any>[];
|
|
16
|
+
type: () => SpxInputTypeEnum;
|
|
17
|
+
validators?: () => any[];
|
|
18
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { EventEmitter, QueryList } from '@angular/core';
|
|
2
|
+
import { SpxFormSectionI } from './spx-form-section.interface';
|
|
3
|
+
import { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';
|
|
4
|
+
import { AbstractControl, FormBuilder, FormGroup } from '@angular/forms';
|
|
5
|
+
import { SpxFormFieldI } from './spx-form-field.interface';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare class SpxFormViewComponent {
|
|
8
|
+
readonly formBuilder: FormBuilder;
|
|
9
|
+
spxFormGroup: FormGroup;
|
|
10
|
+
spxSections: SpxFormSectionI[];
|
|
11
|
+
spxSuggestions: any;
|
|
12
|
+
spxBlur: EventEmitter<{
|
|
13
|
+
field: SpxFormFieldI;
|
|
14
|
+
valuePair: SpxValuePair<any>;
|
|
15
|
+
}>;
|
|
16
|
+
spxClick: EventEmitter<{
|
|
17
|
+
field: SpxFormFieldI;
|
|
18
|
+
}>;
|
|
19
|
+
spxSearch: EventEmitter<{
|
|
20
|
+
field: SpxFormFieldI;
|
|
21
|
+
valuePair: SpxValuePair<any>;
|
|
22
|
+
}>;
|
|
23
|
+
spxInputs: QueryList<SpxInputComponent>;
|
|
24
|
+
autocompleteField?: SpxFormFieldI;
|
|
25
|
+
typeAutocomplete: SpxInputTypeEnum;
|
|
26
|
+
typeButton: SpxInputTypeEnum;
|
|
27
|
+
typeFloat: SpxInputTypeEnum;
|
|
28
|
+
typeNumber: SpxInputTypeEnum;
|
|
29
|
+
typeRadio: SpxInputTypeEnum;
|
|
30
|
+
typeText: SpxInputTypeEnum;
|
|
31
|
+
typeNumericKeyboard: SpxInputTypeEnum;
|
|
32
|
+
typeOverlay: SpxInputTypeEnum;
|
|
33
|
+
typeOverlayNumber: SpxInputTypeEnum;
|
|
34
|
+
setAutofocus(key: string): void;
|
|
35
|
+
onBlur(field: SpxFormFieldI): void;
|
|
36
|
+
onClick(field: SpxFormFieldI): void;
|
|
37
|
+
onAutocompleteCancel(): void;
|
|
38
|
+
onAutocompleteSearch(valuePair: SpxValuePair<any>): void;
|
|
39
|
+
onAutocompleteSave(valuePair: SpxValuePair<any>): void;
|
|
40
|
+
onSearch(field: SpxFormFieldI): void;
|
|
41
|
+
getRawValidators(formControl: AbstractControl): any;
|
|
42
|
+
hasRequiredField(abstractControl: AbstractControl): boolean;
|
|
43
|
+
static initialFormValue(sections: SpxFormSectionI[]): any;
|
|
44
|
+
static createForm(formBuilder: FormBuilder, sections: SpxFormSectionI[]): FormGroup;
|
|
45
|
+
constructor(formBuilder: FormBuilder);
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpxFormViewComponent, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxFormViewComponent, "spx-form-view", never, { "spxFormGroup": { "alias": "spxFormGroup"; "required": false; }; "spxSections": { "alias": "spxSections"; "required": false; }; "spxSuggestions": { "alias": "spxSuggestions"; "required": false; }; }, { "spxBlur": "spxBlur"; "spxClick": "spxClick"; "spxSearch": "spxSearch"; }, never, never, true, never>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { SpxValuePair } from './spx-value-interface';
|
|
3
|
+
import { Subscription } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SpxDropdownComponent implements OnChanges, OnInit, OnDestroy {
|
|
6
|
+
protected focusPosition: number;
|
|
7
|
+
spxSuggestions: SpxValuePair<boolean | number | string>[];
|
|
8
|
+
spxSelect: EventEmitter<SpxValuePair<any>>;
|
|
9
|
+
subscriptionKeyUp?: Subscription;
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
handleSuggestionClick(valuePair: SpxValuePair<string | number | boolean>): void;
|
|
14
|
+
private listenToKeyUp;
|
|
15
|
+
private select;
|
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpxDropdownComponent, never>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxDropdownComponent, "spx-dropdown", never, { "spxSuggestions": { "alias": "spxSuggestions"; "required": false; }; }, { "spxSelect": "spxSelect"; }, never, never, true, never>;
|
|
18
|
+
}
|
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { SpxValuePair } from './spx-value-interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxInputBoxComponent {
|
|
5
|
+
private elRef;
|
|
5
6
|
faEdit: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
6
7
|
faSearch: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
7
8
|
faQuestion: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
8
9
|
faTimes: import("@fortawesome/fontawesome-common-types").IconDefinition;
|
|
10
|
+
spxCompact?: boolean;
|
|
11
|
+
spxFocused: boolean;
|
|
9
12
|
spxLabel?: string;
|
|
10
|
-
spxRequired?: boolean;
|
|
11
13
|
spxReadonly: boolean;
|
|
12
|
-
|
|
13
|
-
spxCompact?: boolean;
|
|
14
|
+
spxRequired?: boolean;
|
|
14
15
|
spxShowClear: boolean;
|
|
15
16
|
spxShowEdit?: boolean;
|
|
17
|
+
spxShowHelp?: boolean;
|
|
18
|
+
spxShowLabel: boolean;
|
|
16
19
|
spxShowSearch?: boolean;
|
|
17
20
|
spxShowValidationMessages?: boolean | null | undefined;
|
|
18
21
|
spxValue?: SpxValuePair<any>;
|
|
@@ -22,12 +25,16 @@ export declare class SpxInputBoxComponent {
|
|
|
22
25
|
spxFocusOut: EventEmitter<void>;
|
|
23
26
|
spxEdit: EventEmitter<void>;
|
|
24
27
|
spxHelp: EventEmitter<void>;
|
|
25
|
-
|
|
26
|
-
|
|
28
|
+
handleFocusIn(ev: Event): void;
|
|
29
|
+
handleFocusOut(ev: FocusEvent): void;
|
|
30
|
+
handleWindowClick(ev: Event): void;
|
|
27
31
|
onClear(): void;
|
|
28
32
|
onSearch(): void;
|
|
29
33
|
onEdit(): void;
|
|
30
34
|
onHelp(): void;
|
|
35
|
+
constructor(elRef: ElementRef);
|
|
36
|
+
private emitFocusIn;
|
|
37
|
+
private emitFocusOut;
|
|
31
38
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpxInputBoxComponent, never>;
|
|
32
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpxInputBoxComponent, "spx-input-box", never, { "
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpxInputBoxComponent, "spx-input-box", never, { "spxCompact": { "alias": "spxCompact"; "required": false; }; "spxFocused": { "alias": "spxFocused"; "required": false; }; "spxLabel": { "alias": "spxLabel"; "required": false; }; "spxReadonly": { "alias": "spxReadonly"; "required": false; }; "spxRequired": { "alias": "spxRequired"; "required": false; }; "spxShowClear": { "alias": "spxShowClear"; "required": false; }; "spxShowEdit": { "alias": "spxShowEdit"; "required": false; }; "spxShowHelp": { "alias": "spxShowHelp"; "required": false; }; "spxShowLabel": { "alias": "spxShowLabel"; "required": false; }; "spxShowSearch": { "alias": "spxShowSearch"; "required": false; }; "spxShowValidationMessages": { "alias": "spxShowValidationMessages"; "required": false; }; "spxValue": { "alias": "spxValue"; "required": false; }; }, { "spxClear": "spxClear"; "spxSearch": "spxSearch"; "spxFocus": "spxFocus"; "spxFocusOut": "spxFocusOut"; "spxEdit": "spxEdit"; "spxHelp": "spxHelp"; }, never, ["[controls]", "[validation-messages]"], true, never>;
|
|
33
40
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { SpxValuePair } from './spx-value-interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxInputFloatComponent {
|
|
@@ -17,7 +17,8 @@ export declare class SpxInputFloatComponent {
|
|
|
17
17
|
spxFocus: EventEmitter<void>;
|
|
18
18
|
spxWasInternalUpdate: boolean;
|
|
19
19
|
tick: {};
|
|
20
|
-
|
|
20
|
+
firstInputRef?: ElementRef<HTMLInputElement>;
|
|
21
|
+
spxSetFocus(): void;
|
|
21
22
|
componentDidLoad(): void;
|
|
22
23
|
handleFocus(): void;
|
|
23
24
|
handleSetValue(newValue: SpxValuePair<any>): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventEmitter } from '@angular/core';
|
|
1
|
+
import { ElementRef, EventEmitter } from '@angular/core';
|
|
2
2
|
import { SpxValuePair } from './spx-value-interface';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SpxInputNumberComponent {
|
|
@@ -12,8 +12,9 @@ export declare class SpxInputNumberComponent {
|
|
|
12
12
|
value?: SpxValuePair<any>;
|
|
13
13
|
spxChange: EventEmitter<SpxValuePair<any>>;
|
|
14
14
|
spxFocus: EventEmitter<void>;
|
|
15
|
+
inputRef?: ElementRef<HTMLInputElement>;
|
|
15
16
|
spxWasInternalUpdate: boolean;
|
|
16
|
-
spxSetFocus():
|
|
17
|
+
spxSetFocus(): void;
|
|
17
18
|
componentDidLoad(): void;
|
|
18
19
|
handleFocus(): void;
|
|
19
20
|
handleInput(event: any): void;
|