@softpak/components 0.0.0-beta.16 → 0.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/esm2022/spx-alert/spx-alert.component.mjs +3 -5
  2. package/esm2022/spx-button/spx-button.component.mjs +36 -46
  3. package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +4 -5
  4. package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +4 -5
  5. package/esm2022/spx-check-digit/spx-check-digit.component.mjs +4 -6
  6. package/esm2022/spx-inputs/public-api.mjs +1 -2
  7. package/esm2022/spx-inputs/spx-input-box.component.mjs +5 -5
  8. package/esm2022/spx-inputs/spx-input.component.mjs +6 -11
  9. package/esm2022/spx-navigation/spx-home-tile.component.mjs +8 -24
  10. package/esm2022/spx-navigation/spx-home-tiles.component.mjs +5 -3
  11. package/esm2022/spx-navigation/spx-navigation-item.interface.mjs +1 -1
  12. package/esm2022/spx-navigation/spx-navigation.component.mjs +3 -3
  13. package/esm2022/spx-progress-bar/spx-progress-bar.component.mjs +3 -3
  14. package/esm2022/spx-suggestion/spx-suggestion.component.mjs +3 -3
  15. package/esm2022/spx-toaster/src/spx-toaster.component.mjs +21 -33
  16. package/fesm2022/softpak-components-spx-alert.mjs +2 -4
  17. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  18. package/fesm2022/softpak-components-spx-button.mjs +35 -45
  19. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  20. package/fesm2022/softpak-components-spx-channel-selection.mjs +5 -7
  21. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  22. package/fesm2022/softpak-components-spx-check-digit.mjs +3 -5
  23. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  24. package/fesm2022/softpak-components-spx-inputs.mjs +10 -27
  25. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  26. package/fesm2022/softpak-components-spx-navigation.mjs +14 -27
  27. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  28. package/fesm2022/softpak-components-spx-progress-bar.mjs +2 -2
  29. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  30. package/fesm2022/softpak-components-spx-suggestion.mjs +2 -2
  31. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  32. package/fesm2022/softpak-components-spx-toaster.mjs +20 -32
  33. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  34. package/package.json +19 -19
  35. package/spx-button/spx-button.component.d.ts +0 -4
  36. package/spx-channel-selection/src/spx-channel-selection.component.d.ts +1 -2
  37. package/spx-channel-selection/src/spx-company-selection.component.d.ts +1 -2
  38. package/spx-check-digit/spx-check-digit.component.d.ts +0 -3
  39. package/spx-inputs/public-api.d.ts +0 -1
  40. package/spx-inputs/spx-input-box.component.d.ts +2 -2
  41. package/spx-inputs/spx-input.component.d.ts +2 -3
  42. package/spx-navigation/spx-home-tile.component.d.ts +1 -2
  43. package/spx-navigation/spx-navigation-item.interface.d.ts +0 -1
  44. package/spx-toaster/src/spx-toaster.component.d.ts +1 -1
  45. package/tailwind.css +1 -1
  46. package/esm2022/spx-inputs/spx-input-type.enum.mjs +0 -13
  47. package/spx-inputs/spx-input-type.enum.d.ts +0 -11
@@ -1,4 +1,3 @@
1
- import { NgClass } from '@angular/common';
2
1
  import * as i0 from '@angular/core';
3
2
  import { EventEmitter, Component, HostBinding, Input, Output } from '@angular/core';
4
3
  import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
@@ -22,82 +21,73 @@ class SpxButtonComponent {
22
21
  get hostClassBlock() { return this.spxFullWidth; }
23
22
  get hostClassHFull() { return this.spxFullHeight; }
24
23
  get hostClassWFull() { return this.spxFullWidth; }
25
- get severityError() { return this.spxSeverity === SpxSeverityEnum.error; }
26
- get severityInfo() { return this.spxSeverity === SpxSeverityEnum.info; }
27
- get severitySuccess() { return this.spxSeverity === SpxSeverityEnum.success; }
28
- get severityWarning() { return this.spxSeverity === SpxSeverityEnum.warning; }
29
24
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
25
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxButtonComponent, isStandalone: true, selector: "spx-button", inputs: { spxDisabled: "spxDisabled", spxClass: "spxClass", spxClassObject: "spxClassObject", spxForm: "spxForm", spxFullHeight: "spxFullHeight", spxFullWidth: "spxFullWidth", spxSeverity: "spxSeverity", spxSize: "spxSize", spxTabIndex: "spxTabIndex", spxType: "spxType" }, outputs: { spxClick: "spxClick" }, host: { properties: { "class.block": "this.hostClassBlock", "class.h-full": "this.hostClassHFull", "class.w-full": "this.hostClassWFull" } }, ngImport: i0, template: `
31
26
  <button
32
- class="border border-transparent font-bold px-4 py-2 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2"
27
+ class="border border-transparent font-medium px-4 py-2 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 text-sm"
33
28
  [class.h-full]="this.spxFullHeight"
34
29
  [class.w-full]="this.spxFullWidth"
35
- [class.bg-blue-600]="!this.spxSeverity || this.severityInfo"
36
- [class.focus:ring-blue-500]="!this.spxSeverity || this.severityInfo"
37
- [class.hover:bg-blue-800]="!this.spxSeverity || this.severityInfo"
38
- [class.bg-red-600]="this.severityError"
39
- [class.focus:ring-red-500]="this.severityError"
40
- [class.hover:bg-red-800]="this.severityError"
41
- [class.bg-lime-600]="this.severitySuccess"
42
- [class.focus:ring-lime-500]="this.severitySuccess"
43
- [class.hover:bg-lime-800]="this.severitySuccess"
44
- [class.bg-amber-600]="this.severityWarning"
45
- [class.focus:ring-amber-500]="this.severityWarning"
46
- [class.hover:bg-amber-800]="this.severityWarning"
30
+ [class.bg-blue-600]="!this.spxSeverity || this.spxSeverity === 'info'"
31
+ [class.focus:ring-blue-500]="!this.spxSeverity || this.spxSeverity === 'info'"
32
+ [class.hover:bg-blue-800]="!this.spxSeverity || this.spxSeverity === 'info'"
33
+ [class.bg-red-600]="!this.spxSeverity || this.spxSeverity === 'error'"
34
+ [class.focus:ring-red-500]="!this.spxSeverity || this.spxSeverity === 'error'"
35
+ [class.hover:bg-red-800]="!this.spxSeverity || this.spxSeverity === 'error'"
36
+ [class.bg-lime-600]="!this.spxSeverity || this.spxSeverity === 'success'"
37
+ [class.focus:ring-lime-500]="!this.spxSeverity || this.spxSeverity === 'success'"
38
+ [class.hover:bg-lime-800]="!this.spxSeverity || this.spxSeverity === 'success'"
39
+ [class.bg-amber-600]="!this.spxSeverity || this.spxSeverity === 'warning'"
40
+ [class.focus:ring-amber-500]="!this.spxSeverity || this.spxSeverity === 'warning'"
41
+ [class.hover:bg-amber-800]="!this.spxSeverity || this.spxSeverity === 'warning'"
47
42
  [class.text-xl]="this.spxSize === 'xl'"
48
43
  [class.text-lg]="this.spxSize === 'lg'"
49
44
  [class.cursor-pointer]="!this.spxDisabled"
50
45
  [class.cursor-not-allowed]="this.spxDisabled"
51
46
  [class.opacity-50]="this.spxDisabled"
52
47
  [class.focus:ring-0]="this.spxDisabled"
53
- [class.hover:bg-red-600]="this.spxDisabled && this.severityError"
54
- [class.hover:bg-blue-600]="this.spxDisabled && this.severityInfo"
55
- [class.hover:bg-lime-600]="this.spxDisabled && this.severitySuccess"
56
- [class.hover:bg-amber-600]="this.spxDisabled && this.severityWarning"
57
- [ngClass]="this.spxClass ? this.spxClass : undefined"
48
+ [class.hover:bg-red-600]="this.spxDisabled && this.spxSeverity === 'error'"
49
+ [class.hover:bg-blue-600]="this.spxDisabled && this.spxSeverity === 'info'"
50
+ [class.hover:bg-lime-600]="this.spxDisabled && this.spxSeverity === 'success'"
51
+ [class.hover:bg-amber-600]="this.spxDisabled && this.spxSeverity === 'warning'"
58
52
  [attr.disabled]="this.spxDisabled ? this.spxDisabled : undefined"
59
53
  [attr.form]="this.spxForm ? this.spxForm : undefined"
60
54
  [attr.tabindex]="this.spxTabIndex ? this.spxTabIndex : undefined"
61
55
  [attr.type]="this.spxType ? this.spxType : undefined"
62
56
  (click)="this.handleClick()"
63
- part="button"><ng-content></ng-content></button>`, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
57
+ part="button"><ng-content></ng-content></button>`, isInline: true }); }
64
58
  }
65
59
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxButtonComponent, decorators: [{
66
60
  type: Component,
67
61
  args: [{
68
62
  selector: 'spx-button',
69
63
  standalone: true,
70
- imports: [
71
- NgClass,
72
- ],
73
64
  template: `
74
65
  <button
75
- class="border border-transparent font-bold px-4 py-2 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2"
66
+ class="border border-transparent font-medium px-4 py-2 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 text-sm"
76
67
  [class.h-full]="this.spxFullHeight"
77
68
  [class.w-full]="this.spxFullWidth"
78
- [class.bg-blue-600]="!this.spxSeverity || this.severityInfo"
79
- [class.focus:ring-blue-500]="!this.spxSeverity || this.severityInfo"
80
- [class.hover:bg-blue-800]="!this.spxSeverity || this.severityInfo"
81
- [class.bg-red-600]="this.severityError"
82
- [class.focus:ring-red-500]="this.severityError"
83
- [class.hover:bg-red-800]="this.severityError"
84
- [class.bg-lime-600]="this.severitySuccess"
85
- [class.focus:ring-lime-500]="this.severitySuccess"
86
- [class.hover:bg-lime-800]="this.severitySuccess"
87
- [class.bg-amber-600]="this.severityWarning"
88
- [class.focus:ring-amber-500]="this.severityWarning"
89
- [class.hover:bg-amber-800]="this.severityWarning"
69
+ [class.bg-blue-600]="!this.spxSeverity || this.spxSeverity === 'info'"
70
+ [class.focus:ring-blue-500]="!this.spxSeverity || this.spxSeverity === 'info'"
71
+ [class.hover:bg-blue-800]="!this.spxSeverity || this.spxSeverity === 'info'"
72
+ [class.bg-red-600]="!this.spxSeverity || this.spxSeverity === 'error'"
73
+ [class.focus:ring-red-500]="!this.spxSeverity || this.spxSeverity === 'error'"
74
+ [class.hover:bg-red-800]="!this.spxSeverity || this.spxSeverity === 'error'"
75
+ [class.bg-lime-600]="!this.spxSeverity || this.spxSeverity === 'success'"
76
+ [class.focus:ring-lime-500]="!this.spxSeverity || this.spxSeverity === 'success'"
77
+ [class.hover:bg-lime-800]="!this.spxSeverity || this.spxSeverity === 'success'"
78
+ [class.bg-amber-600]="!this.spxSeverity || this.spxSeverity === 'warning'"
79
+ [class.focus:ring-amber-500]="!this.spxSeverity || this.spxSeverity === 'warning'"
80
+ [class.hover:bg-amber-800]="!this.spxSeverity || this.spxSeverity === 'warning'"
90
81
  [class.text-xl]="this.spxSize === 'xl'"
91
82
  [class.text-lg]="this.spxSize === 'lg'"
92
83
  [class.cursor-pointer]="!this.spxDisabled"
93
84
  [class.cursor-not-allowed]="this.spxDisabled"
94
85
  [class.opacity-50]="this.spxDisabled"
95
86
  [class.focus:ring-0]="this.spxDisabled"
96
- [class.hover:bg-red-600]="this.spxDisabled && this.severityError"
97
- [class.hover:bg-blue-600]="this.spxDisabled && this.severityInfo"
98
- [class.hover:bg-lime-600]="this.spxDisabled && this.severitySuccess"
99
- [class.hover:bg-amber-600]="this.spxDisabled && this.severityWarning"
100
- [ngClass]="this.spxClass ? this.spxClass : undefined"
87
+ [class.hover:bg-red-600]="this.spxDisabled && this.spxSeverity === 'error'"
88
+ [class.hover:bg-blue-600]="this.spxDisabled && this.spxSeverity === 'info'"
89
+ [class.hover:bg-lime-600]="this.spxDisabled && this.spxSeverity === 'success'"
90
+ [class.hover:bg-amber-600]="this.spxDisabled && this.spxSeverity === 'warning'"
101
91
  [attr.disabled]="this.spxDisabled ? this.spxDisabled : undefined"
102
92
  [attr.form]="this.spxForm ? this.spxForm : undefined"
103
93
  [attr.tabindex]="this.spxTabIndex ? this.spxTabIndex : undefined"
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-button',\n standalone: true,\n imports: [\n NgClass,\n ],\n template: `\n <button\n class=\"border border-transparent font-bold px-4 py-2 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2\"\n [class.h-full]=\"this.spxFullHeight\"\n [class.w-full]=\"this.spxFullWidth\"\n [class.bg-blue-600]=\"!this.spxSeverity || this.severityInfo\"\n [class.focus:ring-blue-500]=\"!this.spxSeverity || this.severityInfo\"\n [class.hover:bg-blue-800]=\"!this.spxSeverity || this.severityInfo\"\n [class.bg-red-600]=\"this.severityError\"\n [class.focus:ring-red-500]=\"this.severityError\"\n [class.hover:bg-red-800]=\"this.severityError\"\n [class.bg-lime-600]=\"this.severitySuccess\"\n [class.focus:ring-lime-500]=\"this.severitySuccess\"\n [class.hover:bg-lime-800]=\"this.severitySuccess\"\n [class.bg-amber-600]=\"this.severityWarning\"\n [class.focus:ring-amber-500]=\"this.severityWarning\"\n [class.hover:bg-amber-800]=\"this.severityWarning\"\n [class.text-xl]=\"this.spxSize === 'xl'\"\n [class.text-lg]=\"this.spxSize === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled\"\n [class.cursor-not-allowed]=\"this.spxDisabled\"\n [class.opacity-50]=\"this.spxDisabled\"\n [class.focus:ring-0]=\"this.spxDisabled\"\n [class.hover:bg-red-600]=\"this.spxDisabled && this.severityError\"\n [class.hover:bg-blue-600]=\"this.spxDisabled && this.severityInfo\"\n [class.hover:bg-lime-600]=\"this.spxDisabled && this.severitySuccess\"\n [class.hover:bg-amber-600]=\"this.spxDisabled && this.severityWarning\"\n [ngClass]=\"this.spxClass ? this.spxClass : undefined\"\n [attr.disabled]=\"this.spxDisabled ? this.spxDisabled : undefined\"\n [attr.form]=\"this.spxForm ? this.spxForm : undefined\"\n [attr.tabindex]=\"this.spxTabIndex ? this.spxTabIndex : undefined\"\n [attr.type]=\"this.spxType ? this.spxType : undefined\"\n (click)=\"this.handleClick()\"\n part=\"button\"><ng-content></ng-content></button>`,\n})\nexport class SpxButtonComponent {\n @HostBinding('class.block') get hostClassBlock() { return this.spxFullWidth; }\n @HostBinding('class.h-full') get hostClassHFull() { return this.spxFullHeight; }\n @HostBinding('class.w-full') get hostClassWFull() { return this.spxFullWidth; }\n @Input() spxDisabled = false;\n @Input() spxClass?: string;\n @Input() spxClassObject?: object;\n @Input() spxForm?: string;\n @Input() spxFullHeight?: boolean;\n @Input() spxFullWidth?: boolean;\n @Input() spxSeverity: SpxSeverityEnum = SpxSeverityEnum.info;\n @Input() spxSize: 'lg' | 'xl' = 'lg';\n @Input() spxTabIndex?: number;\n @Input() spxType: 'button' | 'submit' = 'submit';\n @Output() spxClick: EventEmitter<void> = new EventEmitter<void>();\n\n get severityError() { return this.spxSeverity === SpxSeverityEnum.error; }\n get severityInfo() { return this.spxSeverity === SpxSeverityEnum.info; }\n get severitySuccess() { return this.spxSeverity === SpxSeverityEnum.success; }\n get severityWarning() { return this.spxSeverity === SpxSeverityEnum.warning; }\n\n hasShadowDom = (el: HTMLElement) => {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n };\n handleClick = () => {\n if (!this.spxDisabled) {\n this.spxClick.emit();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MA6Ca,kBAAkB,CAAA;AAzC/B,IAAA,WAAA,GAAA;QA6CW,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAMpB,QAAA,IAAA,CAAA,WAAW,GAAoB,eAAe,CAAC,IAAI,CAAC;QACpD,IAAO,CAAA,OAAA,GAAgB,IAAI,CAAC;QAE5B,IAAO,CAAA,OAA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BAAC,cAAc,CAAA;gBACM,cAAc,EAAA,CAAA;sBAA9C,WAAW;uBAAC,cAAc,CAAA;gBAClB,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACI,QAAQ,EAAA,CAAA;sBAAjB,MAAM;;;AC3DT;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-button.mjs","sources":["../../../../projects/softpak/components/spx-button/spx-button.component.ts","../../../../projects/softpak/components/spx-button/softpak-components-spx-button.ts"],"sourcesContent":["import { Component, EventEmitter, HostBinding, Input, Output } from '@angular/core';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-button',\n standalone: true,\n template: `\n <button\n class=\"border border-transparent font-medium px-4 py-2 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2 text-sm\"\n [class.h-full]=\"this.spxFullHeight\"\n [class.w-full]=\"this.spxFullWidth\"\n [class.bg-blue-600]=\"!this.spxSeverity || this.spxSeverity === 'info'\"\n [class.focus:ring-blue-500]=\"!this.spxSeverity || this.spxSeverity === 'info'\"\n [class.hover:bg-blue-800]=\"!this.spxSeverity || this.spxSeverity === 'info'\"\n [class.bg-red-600]=\"!this.spxSeverity || this.spxSeverity === 'error'\"\n [class.focus:ring-red-500]=\"!this.spxSeverity || this.spxSeverity === 'error'\"\n [class.hover:bg-red-800]=\"!this.spxSeverity || this.spxSeverity === 'error'\"\n [class.bg-lime-600]=\"!this.spxSeverity || this.spxSeverity === 'success'\"\n [class.focus:ring-lime-500]=\"!this.spxSeverity || this.spxSeverity === 'success'\"\n [class.hover:bg-lime-800]=\"!this.spxSeverity || this.spxSeverity === 'success'\"\n [class.bg-amber-600]=\"!this.spxSeverity || this.spxSeverity === 'warning'\"\n [class.focus:ring-amber-500]=\"!this.spxSeverity || this.spxSeverity === 'warning'\"\n [class.hover:bg-amber-800]=\"!this.spxSeverity || this.spxSeverity === 'warning'\"\n [class.text-xl]=\"this.spxSize === 'xl'\"\n [class.text-lg]=\"this.spxSize === 'lg'\"\n [class.cursor-pointer]=\"!this.spxDisabled\"\n [class.cursor-not-allowed]=\"this.spxDisabled\"\n [class.opacity-50]=\"this.spxDisabled\"\n [class.focus:ring-0]=\"this.spxDisabled\"\n [class.hover:bg-red-600]=\"this.spxDisabled && this.spxSeverity === 'error'\"\n [class.hover:bg-blue-600]=\"this.spxDisabled && this.spxSeverity === 'info'\"\n [class.hover:bg-lime-600]=\"this.spxDisabled && this.spxSeverity === 'success'\"\n [class.hover:bg-amber-600]=\"this.spxDisabled && this.spxSeverity === 'warning'\"\n [attr.disabled]=\"this.spxDisabled ? this.spxDisabled : undefined\"\n [attr.form]=\"this.spxForm ? this.spxForm : undefined\"\n [attr.tabindex]=\"this.spxTabIndex ? this.spxTabIndex : undefined\"\n [attr.type]=\"this.spxType ? this.spxType : undefined\"\n (click)=\"this.handleClick()\"\n part=\"button\"><ng-content></ng-content></button>`,\n})\nexport class SpxButtonComponent {\n @HostBinding('class.block') get hostClassBlock() { return this.spxFullWidth; }\n @HostBinding('class.h-full') get hostClassHFull() { return this.spxFullHeight; }\n @HostBinding('class.w-full') get hostClassWFull() { return this.spxFullWidth; }\n @Input() spxDisabled = false;\n @Input() spxClass?: string;\n @Input() spxClassObject?: object;\n @Input() spxForm?: string;\n @Input() spxFullHeight?: boolean;\n @Input() spxFullWidth?: boolean;\n @Input() spxSeverity: SpxSeverityEnum = SpxSeverityEnum.info;\n @Input() spxSize: 'lg' | 'xl' = 'lg';\n @Input() spxTabIndex?: number;\n @Input() spxType: 'button' | 'submit' = 'submit';\n @Output() spxClick: EventEmitter<void> = new EventEmitter<void>();\n\n hasShadowDom = (el: HTMLElement) => {\n return !!el.shadowRoot && !!(el as any).attachShadow;\n };\n handleClick = () => {\n if (!this.spxDisabled) {\n this.spxClick.emit();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAwCa,kBAAkB,CAAA;AArC/B,IAAA,WAAA,GAAA;QAyCW,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAMpB,QAAA,IAAA,CAAA,WAAW,GAAoB,eAAe,CAAC,IAAI,CAAC;QACpD,IAAO,CAAA,OAAA,GAAgB,IAAI,CAAC;QAE5B,IAAO,CAAA,OAAA,GAAwB,QAAQ,CAAC;AACvC,QAAA,IAAA,CAAA,QAAQ,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAElE,QAAA,IAAA,CAAA,YAAY,GAAG,CAAC,EAAe,KAAI;YACjC,OAAO,CAAC,CAAC,EAAE,CAAC,UAAU,IAAI,CAAC,CAAE,EAAU,CAAC,YAAY,CAAC;AACvD,SAAC,CAAC;QACF,IAAW,CAAA,WAAA,GAAG,MAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE;AACrB,gBAAA,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;aACtB;AACH,SAAC,CAAA;AACF,KAAA;IAvBC,IAAgC,cAAc,KAAK,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE;IAC9E,IAAiC,cAAc,KAAK,OAAO,IAAI,CAAC,aAAa,CAAC,EAAE;IAChF,IAAiC,cAAc,KAAK,OAAO,IAAI,CAAC,YAAY,CAAC,EAAE;8GAHpE,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;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W,EAAA,CAAA;sBAAnB,KAAK;gBACG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBACI,QAAQ,EAAA,CAAA;sBAAjB,MAAM;;;ACtDT;;AAEG;;;;"}
@@ -5,7 +5,7 @@ import * as i1$1 from '@angular/common';
5
5
  import { CommonModule } from '@angular/common';
6
6
  import * as i1 from '@angular/forms';
7
7
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
8
+ import { SpxInputComponent } from '@softpak/components/spx-inputs';
9
9
  import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
10
10
  import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
11
11
 
@@ -54,12 +54,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
54
54
  class SpxChannelSelectionComponent {
55
55
  constructor() {
56
56
  this.options = [];
57
- this.inputTypeRadio = SpxInputTypeEnum.radio;
58
57
  }
59
58
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChannelSelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
59
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxChannelSelectionComponent, isStandalone: true, selector: "spx-channel-selection", inputs: { control: "control", options: "options", txtChannel: "txtChannel" }, ngImport: i0, template: `
61
60
  <spx-input [formControl]="control" [spxLabel]="txtChannel"
62
- [spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
61
+ [spxType]="'radio'" [spxSuggestions]="options"></spx-input>
63
62
  `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
64
63
  }
65
64
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChannelSelectionComponent, decorators: [{
@@ -68,7 +67,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
68
67
  selector: 'spx-channel-selection',
69
68
  template: `
70
69
  <spx-input [formControl]="control" [spxLabel]="txtChannel"
71
- [spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
70
+ [spxType]="'radio'" [spxSuggestions]="options"></spx-input>
72
71
  `,
73
72
  standalone: true,
74
73
  imports: [
@@ -89,13 +88,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
89
88
  class SpxCompanySelectionComponent {
90
89
  constructor() {
91
90
  this.options = [];
92
- this.inputTypeRadio = SpxInputTypeEnum.radio;
93
91
  }
94
92
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCompanySelectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
95
93
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxCompanySelectionComponent, isStandalone: true, selector: "spx-company-selection", inputs: { control: "control", options: "options", txtChannel: "txtChannel", txtCompany: "txtCompany" }, ngImport: i0, template: `<spx-form-section [spxTitle]="txtChannel" [spxIndex]="2">
96
94
  <div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3">
97
95
  <spx-input [formControl]="control" [spxLabel]="txtCompany"
98
- [spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
96
+ [spxType]="'radio'" [spxSuggestions]="options"></spx-input>
99
97
  </div>
100
98
  </spx-form-section>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }, { kind: "component", type: SpxFormSectionComponent, selector: "spx-form-section", inputs: ["spxIndex", "spxIndexSecondary", "spxTitle", "spxShowTitle"] }] }); }
101
99
  }
@@ -106,7 +104,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
106
104
  template: `<spx-form-section [spxTitle]="txtChannel" [spxIndex]="2">
107
105
  <div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3">
108
106
  <spx-input [formControl]="control" [spxLabel]="txtCompany"
109
- [spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
107
+ [spxType]="'radio'" [spxSuggestions]="options"></spx-input>
110
108
  </div>
111
109
  </spx-form-section>`,
112
110
  standalone: true,
@@ -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;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,W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kB;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-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, 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]=\"'radio'\" [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\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, 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]=\"'radio'\" [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\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;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,EAAA,SAAA,EAAA,eAAA,E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,EAAA,aAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;SAIH,EAGL,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,YAAY,8JACZ,kBAAkB,EAAA,QAAA,EAAA,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;;;;"}
@@ -8,7 +8,7 @@ import { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spx
8
8
  import { valuePairToValue, calcCheckDigit } from '@softpak/components/spx-helpers';
9
9
  import * as i2 from '@angular/common';
10
10
  import { CommonModule } from '@angular/common';
11
- import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
11
+ import { SpxInputComponent } from '@softpak/components/spx-inputs';
12
12
 
13
13
  const ctrlCheckDigit = 'checkDigit';
14
14
  const ctrlContainerNumber = 'containerNumber';
@@ -19,8 +19,6 @@ class SpxCheckDigitComponent {
19
19
  get ctrlContainerPrefix() { return this.formGroup.get(ctrlPrefix); }
20
20
  constructor(formBuilder) {
21
21
  this.formBuilder = formBuilder;
22
- this.inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;
23
- this.inputTypeText = SpxInputTypeEnum.text;
24
22
  this.formGroup = this.formBuilder.group({
25
23
  [ctrlCheckDigit]: [null, []],
26
24
  [ctrlContainerNumber]: [null, [
@@ -67,7 +65,7 @@ class SpxCheckDigitComponent {
67
65
  return formControl._rawValidators;
68
66
  }
69
67
  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-2\">\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: "ngmodule", type: SpxValidationModule }, { kind: "component", type: i3.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", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
68
+ 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-2\">\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]=\"'overlaynumber'\"\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]=\"'text'\"\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]=\"'text'\">\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: "ngmodule", type: SpxValidationModule }, { kind: "component", type: i3.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", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
71
69
  }
72
70
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCheckDigitComponent, decorators: [{
73
71
  type: Component,
@@ -77,7 +75,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
77
75
  ReactiveFormsModule,
78
76
  SpxValidationModule,
79
77
  SpxInputComponent,
80
- ], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-2\">\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>" }]
78
+ ], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-2\">\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]=\"'overlaynumber'\"\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]=\"'text'\"\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]=\"'text'\">\n </spx-input>\n</form>" }]
81
79
  }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { txtCheckDigit: [{
82
80
  type: Input
83
81
  }], txtContainer: [{
@@ -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, SpxValidationModule } 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 SpxValidationModule,\n SpxInputComponent,\n ]\n})\nexport class SpxCheckDigitComponent {\n @Input() txtCheckDigit!: string;\n @Input() txtContainer!: string;\n @Input() txtPrefix!: string;\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 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-2\">\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>","/**\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;AAQjC,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,SA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../../../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, SpxValidationModule } from '@softpak/components/spx-validation';\nimport { calcCheckDigit, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { CommonModule } from '@angular/common';\nimport { SpxInputComponent } 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 SpxValidationModule,\n SpxInputComponent,\n ]\n})\nexport class SpxCheckDigitComponent {\n @Input() txtCheckDigit!: string;\n @Input() txtContainer!: string;\n @Input() txtPrefix!: string;\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 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-2\">\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]=\"'overlaynumber'\"\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]=\"'text'\"\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]=\"'text'\">\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;AAMjC,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;QAEzC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC;AACtC,YAAA,CAAC,cAAc,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC;AAC5B,YAAA,CAAC,mBAAmB,GAAG,CAAC,IAAI,EAAE;AAC5B,oBAAA,oBAAoB,EAAE;oBACtB,qBAAqB,CAAC,CAAC,CAAC;oBACxB,qBAAqB,CAAC,CAAC,CAAC;oBACxB,mBAAmB,CAAC,UAAU,CAAC;iBAChC,CAAC;AACF,YAAA,CAAC,UAAU,GAAG,CAAC,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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,mBAAmB;wBACnB,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,8xCAAA,EAAA,CAAA;gFAGQ,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,SAAS,EAAA,CAAA;sBAAjB,KAAK;;;AE3BR;;AAEG;;;;"}
@@ -18,7 +18,7 @@ class SpxInputBoxComponent {
18
18
  this.spxReadonly = false;
19
19
  this.spxShowClear = true;
20
20
  this.spxClear = new EventEmitter();
21
- this.spxSearch = new EventEmitter();
21
+ this.spxSearchOutput = new EventEmitter();
22
22
  this.spxFocus = new EventEmitter();
23
23
  this.spxFocusOut = new EventEmitter();
24
24
  this.spxEdit = new EventEmitter();
@@ -48,7 +48,7 @@ class SpxInputBoxComponent {
48
48
  this.spxClear.emit();
49
49
  }
50
50
  onSearch() {
51
- this.spxSearch.emit();
51
+ this.spxSearchOutput.emit();
52
52
  }
53
53
  onEdit() {
54
54
  this.spxEdit.emit();
@@ -57,7 +57,7 @@ class SpxInputBoxComponent {
57
57
  this.spxHelp.emit();
58
58
  }
59
59
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputBoxComponent, isStandalone: true, selector: "spx-input-box", inputs: { spxLabel: "spxLabel", spxRequired: "spxRequired", spxReadonly: "spxReadonly", spxShowHelp: "spxShowHelp", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowEdit: "spxShowEdit", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxValue: "spxValue", spxFocused: "spxFocused" }, outputs: { spxClear: "spxClear", spxSearch: "spxSearch", spxFocus: "spxFocus", spxFocusOut: "spxFocusOut", spxEdit: "spxEdit", spxHelp: "spxHelp" }, ngImport: i0, template: `<div class="flex rounded w-full gap-3"
60
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxInputBoxComponent, isStandalone: true, selector: "spx-input-box", inputs: { spxLabel: "spxLabel", spxRequired: "spxRequired", spxReadonly: "spxReadonly", spxShowHelp: "spxShowHelp", spxCompact: "spxCompact", spxShowClear: "spxShowClear", spxShowEdit: "spxShowEdit", spxShowSearch: "spxShowSearch", spxShowValidationMessages: "spxShowValidationMessages", spxValue: "spxValue", spxFocused: "spxFocused" }, outputs: { spxClear: "spxClear", spxSearchOutput: "spxSearchOutput", spxFocus: "spxFocus", spxFocusOut: "spxFocusOut", spxEdit: "spxEdit", spxHelp: "spxHelp" }, ngImport: i0, template: `<div class="flex rounded w-full gap-3"
61
61
  [class.rounded-none]="this.spxShowValidationMessages"
62
62
  [class.rounded-t]="this.spxShowValidationMessages"
63
63
  [class.outline-none]="this.spxFocused && !this.spxReadonly"
@@ -219,7 +219,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
219
219
  type: Input
220
220
  }], spxClear: [{
221
221
  type: Output
222
- }], spxSearch: [{
222
+ }], spxSearchOutput: [{
223
223
  type: Output
224
224
  }], spxFocus: [{
225
225
  type: Output
@@ -968,19 +968,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
968
968
  type: Output
969
969
  }] } });
970
970
 
971
- var SpxInputTypeEnum;
972
- (function (SpxInputTypeEnum) {
973
- SpxInputTypeEnum["autocomplete"] = "autocomplete";
974
- SpxInputTypeEnum["date"] = "date";
975
- SpxInputTypeEnum["float"] = "float";
976
- SpxInputTypeEnum["overlay"] = "overlay";
977
- SpxInputTypeEnum["overlayNumber"] = "overlaynumber";
978
- SpxInputTypeEnum["radio"] = "radio";
979
- SpxInputTypeEnum["number"] = "number";
980
- SpxInputTypeEnum["password"] = "password";
981
- SpxInputTypeEnum["text"] = "text";
982
- })(SpxInputTypeEnum || (SpxInputTypeEnum = {}));
983
-
984
971
  class SpxInputComponent {
985
972
  constructor() {
986
973
  this.spxLabel = 'label';
@@ -996,7 +983,7 @@ class SpxInputComponent {
996
983
  this.spxShowSearch = false;
997
984
  this.spxShowValidationMessages = false;
998
985
  this.spxSuggestions = [];
999
- this.spxType = SpxInputTypeEnum.text;
986
+ this.spxType = 'text';
1000
987
  this.spxCapitalize = false;
1001
988
  this.spxBlur = new EventEmitter();
1002
989
  this.spxClear = new EventEmitter();
@@ -1009,7 +996,7 @@ class SpxInputComponent {
1009
996
  this.onChange = () => { };
1010
997
  this.onTouched = () => { };
1011
998
  }
1012
- spxSetFocus() {
999
+ async spxSetFocus() {
1013
1000
  this.passFocusToControl();
1014
1001
  }
1015
1002
  handleBlur() {
@@ -1020,7 +1007,6 @@ class SpxInputComponent {
1020
1007
  this.spxChange.emit(this.value);
1021
1008
  }
1022
1009
  handleClear() {
1023
- this.spxClear.emit();
1024
1010
  this.spxFocused = true;
1025
1011
  this.passFocusToControl();
1026
1012
  this.value = {
@@ -1030,7 +1016,6 @@ class SpxInputComponent {
1030
1016
  this.spxChange.emit(this.value);
1031
1017
  }
1032
1018
  handleFocus() {
1033
- this.spxFocus.emit();
1034
1019
  this.spxFocused = true;
1035
1020
  // this.elBox.spxSetFocus();
1036
1021
  }
@@ -1045,11 +1030,9 @@ class SpxInputComponent {
1045
1030
  this.spxFocused = false;
1046
1031
  }
1047
1032
  handleEdit() {
1048
- this.spxEdit.emit();
1049
1033
  this.spxFocused = true;
1050
1034
  }
1051
1035
  handleHelp() {
1052
- this.spxHelp.emit();
1053
1036
  this.spxFocused = true;
1054
1037
  }
1055
1038
  passFocusToControl() {
@@ -1095,7 +1078,7 @@ class SpxInputComponent {
1095
1078
  (spxHelp)="this.handleHelp()"
1096
1079
  (spxFocus)="this.setFocus()"
1097
1080
  (spxFocusOut)="this.setFocusOut()"
1098
- (spxSearch)="this.handleSearch()">
1081
+ (spxSearchOutput)="this.handleSearch()">
1099
1082
  <div controls>
1100
1083
  <spx-input-text
1101
1084
  *ngIf="this.spxType === 'autocomplete' || this.spxType === 'overlay' || this.spxType === 'overlaynumber' || this.spxType === 'text' || this.spxType === 'password'"
@@ -1168,7 +1151,7 @@ class SpxInputComponent {
1168
1151
  <div validation-messages>
1169
1152
  <ng-content></ng-content>
1170
1153
  </div>
1171
- </spx-input-box>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxLabel", "spxRequired", "spxReadonly", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowEdit", "spxShowSearch", "spxShowValidationMessages", "spxValue", "spxFocused"], outputs: ["spxClear", "spxSearch", "spxFocus", "spxFocusOut", "spxEdit", "spxHelp"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxName", "spxReadonly", "spxValidators", "spxFocused", "spxSelectMonth", "spxSelectDay", "value", "spxLastKeyPressed", "spxSelectStep", "spxInternalValue", "spxSuggestions", "spxWasInternalUpdate"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxWasInternalUpdate", "tick"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxFocused", "spxReadonly", "spxSuggestions", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxFocused", "spxType", "value", "spxWasInternalUpdate"], outputs: ["spxBlurFromChild", "spxChange", "spxFocus"] }] }); }
1154
+ </spx-input-box>`, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: SpxInputBoxComponent, selector: "spx-input-box", inputs: ["spxLabel", "spxRequired", "spxReadonly", "spxShowHelp", "spxCompact", "spxShowClear", "spxShowEdit", "spxShowSearch", "spxShowValidationMessages", "spxValue", "spxFocused"], outputs: ["spxClear", "spxSearchOutput", "spxFocus", "spxFocusOut", "spxEdit", "spxHelp"] }, { kind: "component", type: SpxInputDateComponent, selector: "spx-input-date", inputs: ["spxMax", "spxMin", "spxName", "spxReadonly", "spxValidators", "spxFocused", "spxSelectMonth", "spxSelectDay", "value", "spxLastKeyPressed", "spxSelectStep", "spxInternalValue", "spxSuggestions", "spxWasInternalUpdate"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputFloatComponent, selector: "spx-input-float", inputs: ["spxName", "spxAutofocus", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value", "spxWasInternalUpdate", "tick"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputNumberComponent, selector: "spx-input-number", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxReadonly", "spxValidators", "spxFocused", "spxStep", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputRadioComponent, selector: "spx-input-radio", inputs: ["spxName", "spxValidators", "spxFocused", "spxReadonly", "spxSuggestions", "value"], outputs: ["spxChange", "spxFocus"] }, { kind: "component", type: SpxInputTextComponent, selector: "spx-input-text", inputs: ["spxName", "spxAutofocus", "spxInputMode", "spxPattern", "spxSuggestions", "spxReadonly", "spxValidators", "spxCapitalize", "spxFocused", "spxType", "value", "spxWasInternalUpdate"], outputs: ["spxBlurFromChild", "spxChange", "spxFocus"] }] }); }
1172
1155
  }
1173
1156
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxInputComponent, decorators: [{
1174
1157
  type: Component,
@@ -1210,7 +1193,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1210
1193
  (spxHelp)="this.handleHelp()"
1211
1194
  (spxFocus)="this.setFocus()"
1212
1195
  (spxFocusOut)="this.setFocusOut()"
1213
- (spxSearch)="this.handleSearch()">
1196
+ (spxSearchOutput)="this.handleSearch()">
1214
1197
  <div controls>
1215
1198
  <spx-input-text
1216
1199
  *ngIf="this.spxType === 'autocomplete' || this.spxType === 'overlay' || this.spxType === 'overlaynumber' || this.spxType === 'text' || this.spxType === 'password'"
@@ -1356,5 +1339,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
1356
1339
  * Generated bundle index. Do not edit.
1357
1340
  */
1358
1341
 
1359
- export { SpxInputBoxComponent, SpxInputComponent, SpxInputTextComponent, SpxInputTypeEnum };
1342
+ export { SpxInputBoxComponent, SpxInputComponent, SpxInputTextComponent };
1360
1343
  //# sourceMappingURL=softpak-components-spx-inputs.mjs.map