@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.
Files changed (91) hide show
  1. package/esm2022/spx-button/spx-button.component.mjs +18 -5
  2. package/esm2022/spx-change-details/public-api.mjs +2 -0
  3. package/esm2022/spx-change-details/softpak-components-spx-change-details.mjs +5 -0
  4. package/esm2022/spx-change-details/spx-change-details-value.interface.mjs +2 -0
  5. package/esm2022/spx-change-details/spx-change-details.component.mjs +199 -0
  6. package/esm2022/spx-channel-selection/src/spx-channel-selection.component.mjs +1 -1
  7. package/esm2022/spx-channel-selection/src/spx-company-selection.component.mjs +2 -2
  8. package/esm2022/spx-channel-selection/src/spx-welcome.component.mjs +112 -19
  9. package/esm2022/spx-check-digit/spx-check-digit.component.mjs +14 -7
  10. package/esm2022/spx-form-section/spx-form-section.component.mjs +11 -11
  11. package/esm2022/spx-form-view/public-api.mjs +4 -0
  12. package/esm2022/spx-form-view/softpak-components-spx-form-view.mjs +5 -0
  13. package/esm2022/spx-form-view/spx-autocomplete-search.component.mjs +119 -0
  14. package/esm2022/spx-form-view/spx-form-field.interface.mjs +2 -0
  15. package/esm2022/spx-form-view/spx-form-section.interface.mjs +2 -0
  16. package/esm2022/spx-form-view/spx-form-view.component.mjs +268 -0
  17. package/esm2022/spx-inputs/spx-dropdown.component.mjs +94 -0
  18. package/esm2022/spx-inputs/spx-input-box.component.mjs +70 -46
  19. package/esm2022/spx-inputs/spx-input-date.component.mjs +1 -1
  20. package/esm2022/spx-inputs/spx-input-float.component.mjs +10 -5
  21. package/esm2022/spx-inputs/spx-input-number.component.mjs +10 -5
  22. package/esm2022/spx-inputs/spx-input-radio.component.mjs +93 -27
  23. package/esm2022/spx-inputs/spx-input-text.component.mjs +25 -32
  24. package/esm2022/spx-inputs/spx-input-type.enum.mjs +4 -1
  25. package/esm2022/spx-inputs/spx-input.component.mjs +48 -13
  26. package/esm2022/spx-navigation/spx-home-tile.component.mjs +31 -12
  27. package/esm2022/spx-navigation/spx-home-tiles.component.mjs +14 -5
  28. package/esm2022/spx-navigation/spx-navigation-item.interface.mjs +1 -1
  29. package/esm2022/spx-navigation/spx-navigation.component.mjs +11 -5
  30. package/esm2022/spx-number-check/spx-number-check.component.mjs +87 -20
  31. package/esm2022/spx-suggestion/spx-suggestion.component.mjs +28 -10
  32. package/esm2022/spx-update/src/spx-update-info.component.mjs +1 -1
  33. package/esm2022/spx-validation/public-api.mjs +1 -2
  34. package/esm2022/spx-validation/spx-validate-control.component.mjs +8 -3
  35. package/fesm2022/softpak-components-spx-button.mjs +17 -4
  36. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  37. package/fesm2022/softpak-components-spx-change-details.mjs +206 -0
  38. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -0
  39. package/fesm2022/softpak-components-spx-channel-selection.mjs +110 -21
  40. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  41. package/fesm2022/softpak-components-spx-check-digit.mjs +13 -6
  42. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  43. package/fesm2022/softpak-components-spx-form-section.mjs +10 -10
  44. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  45. package/fesm2022/softpak-components-spx-form-view.mjs +385 -0
  46. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -0
  47. package/fesm2022/softpak-components-spx-inputs.mjs +337 -118
  48. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  49. package/fesm2022/softpak-components-spx-navigation.mjs +51 -17
  50. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  51. package/fesm2022/softpak-components-spx-number-check.mjs +86 -19
  52. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  53. package/fesm2022/softpak-components-spx-suggestion.mjs +27 -9
  54. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  55. package/fesm2022/softpak-components-spx-update.mjs +1 -1
  56. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  57. package/fesm2022/softpak-components-spx-validation.mjs +8 -28
  58. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  59. package/package.json +29 -16
  60. package/spx-button/spx-button.component.d.ts +4 -2
  61. package/spx-change-details/index.d.ts +5 -0
  62. package/spx-change-details/public-api.d.ts +1 -0
  63. package/spx-change-details/spx-change-details-value.interface.d.ts +7 -0
  64. package/spx-change-details/spx-change-details.component.d.ts +63 -0
  65. package/spx-channel-selection/src/spx-welcome.component.d.ts +37 -8
  66. package/spx-check-digit/spx-check-digit.component.d.ts +3 -1
  67. package/spx-form-view/index.d.ts +5 -0
  68. package/spx-form-view/public-api.d.ts +3 -0
  69. package/spx-form-view/spx-autocomplete-search.component.d.ts +43 -0
  70. package/spx-form-view/spx-form-field.interface.d.ts +18 -0
  71. package/spx-form-view/spx-form-section.interface.d.ts +9 -0
  72. package/spx-form-view/spx-form-view.component.d.ts +48 -0
  73. package/spx-inputs/spx-dropdown.component.d.ts +18 -0
  74. package/spx-inputs/spx-input-box.component.d.ts +14 -7
  75. package/spx-inputs/spx-input-float.component.d.ts +3 -2
  76. package/spx-inputs/spx-input-number.component.d.ts +3 -2
  77. package/spx-inputs/spx-input-radio.component.d.ts +13 -5
  78. package/spx-inputs/spx-input-text.component.d.ts +3 -2
  79. package/spx-inputs/spx-input-type.enum.d.ts +4 -1
  80. package/spx-inputs/spx-input.component.d.ts +11 -3
  81. package/spx-navigation/spx-home-tile.component.d.ts +5 -1
  82. package/spx-navigation/spx-home-tiles.component.d.ts +2 -1
  83. package/spx-navigation/spx-navigation-item.interface.d.ts +1 -0
  84. package/spx-navigation/spx-navigation.component.d.ts +4 -1
  85. package/spx-number-check/spx-number-check.component.d.ts +15 -3
  86. package/spx-suggestion/spx-suggestion.component.d.ts +3 -1
  87. package/spx-validation/public-api.d.ts +0 -1
  88. package/spx-validation/spx-validate-control.component.d.ts +1 -1
  89. package/tailwind.css +1 -1
  90. package/esm2022/spx-validation/spx-validation.module.mjs +0 -28
  91. package/spx-validation/spx-validation.module.d.ts +0 -9
@@ -1,6 +1,6 @@
1
1
  import { NgClass } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { EventEmitter, Component, HostBinding, Input, Output } from '@angular/core';
3
+ import { EventEmitter, Component, HostBinding, Input, Output, ViewChild } from '@angular/core';
4
4
  import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
5
5
 
6
6
  class SpxButtonComponent {
@@ -26,10 +26,15 @@ class SpxButtonComponent {
26
26
  get severityInfo() { return this.spxSeverity === SpxSeverityEnum.info; }
27
27
  get severitySuccess() { return this.spxSeverity === SpxSeverityEnum.success; }
28
28
  get severityWarning() { return this.spxSeverity === SpxSeverityEnum.warning; }
29
+ spxSetFocus() {
30
+ console.log(this.buttonRef);
31
+ this.buttonRef?.nativeElement?.focus();
32
+ }
29
33
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
30
- 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: `
34
+ 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" } }, viewQueries: [{ propertyName: "buttonRef", first: true, predicate: ["buttonRef"], descendants: true, static: true }], ngImport: i0, template: `
31
35
  <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"
36
+ #buttonRef
37
+ class="border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2"
33
38
  [class.h-full]="this.spxFullHeight"
34
39
  [class.w-full]="this.spxFullWidth"
35
40
  [class.bg-blue-600]="!this.spxSeverity || this.severityInfo"
@@ -44,6 +49,8 @@ class SpxButtonComponent {
44
49
  [class.bg-amber-600]="this.severityWarning"
45
50
  [class.focus:ring-amber-500]="this.severityWarning"
46
51
  [class.hover:bg-amber-800]="this.severityWarning"
52
+ [class.py-2]="!this.spxSize || this.spxSize === 'lg'"
53
+ [class.py-4]="!this.spxSize || this.spxSize === 'xl'"
47
54
  [class.text-xl]="this.spxSize === 'xl'"
48
55
  [class.text-lg]="this.spxSize === 'lg'"
49
56
  [class.cursor-pointer]="!this.spxDisabled"
@@ -72,7 +79,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
72
79
  ],
73
80
  template: `
74
81
  <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"
82
+ #buttonRef
83
+ class="border border-transparent font-bold px-4 relative rounded text-center text-white focus:outline-none focus:ring-2 focus:ring-offset-2"
76
84
  [class.h-full]="this.spxFullHeight"
77
85
  [class.w-full]="this.spxFullWidth"
78
86
  [class.bg-blue-600]="!this.spxSeverity || this.severityInfo"
@@ -87,6 +95,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
87
95
  [class.bg-amber-600]="this.severityWarning"
88
96
  [class.focus:ring-amber-500]="this.severityWarning"
89
97
  [class.hover:bg-amber-800]="this.severityWarning"
98
+ [class.py-2]="!this.spxSize || this.spxSize === 'lg'"
99
+ [class.py-4]="!this.spxSize || this.spxSize === 'xl'"
90
100
  [class.text-xl]="this.spxSize === 'xl'"
91
101
  [class.text-lg]="this.spxSize === 'lg'"
92
102
  [class.cursor-pointer]="!this.spxDisabled"
@@ -136,6 +146,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
136
146
  type: Input
137
147
  }], spxClick: [{
138
148
  type: Output
149
+ }], buttonRef: [{
150
+ type: ViewChild,
151
+ args: ['buttonRef', { static: true }]
139
152
  }] } });
140
153
 
141
154
  /**
@@ -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,OAAA,GAAwB,QAAQ,CAAC;AACvC,QAAA,IAAA,CAAA,QAAQ,GAAuB,IAAI,YAAY,EAAQ,CAAC;AAOlE,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;IA5BC,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;AAa/E,IAAA,IAAI,aAAa,GAAA,EAAK,OAAO,IAAI,CAAC,WAAW,KAAK,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AA,EAAA,WAAA,EAAA,IAAA,EAnCjD,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAqCE,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAzC9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,OAAO;AACR,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiCyC,oDAAA,CAAA;AACpD,iBAAA,CAAA;8BAEiC,cAAc,EAAA,CAAA;sBAA7C,WAAW;uBAAC,aAAa,CAAA;gBACO,cAAc,EAAA,CAAA;sBAA9C,WAAW;uBAAC,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 { NgClass } from '@angular/common';\nimport { Component, ElementRef, EventEmitter, HostBinding, Input, Output, ViewChild } 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 #buttonRef\n class=\"border border-transparent font-bold px-4 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.py-2]=\"!this.spxSize || this.spxSize === 'lg'\"\n [class.py-4]=\"!this.spxSize || this.spxSize === 'xl'\"\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 @ViewChild('buttonRef', { static: true }) buttonRef?: ElementRef<HTMLInputElement>;\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 spxSetFocus(): void {\n console.log(this.buttonRef);\n this.buttonRef?.nativeElement?.focus();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAgDa,kBAAkB,CAAA;AA5C/B,IAAA,WAAA,GAAA;QAgDW,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AAMpB,QAAA,IAAA,CAAA,WAAW,GAAqB,eAAe,CAAC,IAAI,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,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBA5C9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,YAAY;AACtB,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,OAAO,EAAE;wBACP,OAAO;AACR,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCyC,oDAAA,CAAA;AACpD,iBAAA,CAAA;8BAEiC,cAAc,EAAA,CAAA;sBAA7C,WAAW;uBAAC,aAAa,CAAA;gBACO,cAAc,EAAA,CAAA;sBAA9C,WAAW;uBAAC,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;gBACmC,SAAS,EAAA,CAAA;sBAAlD,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAA;;;AC/D1C;;AAEG;;;;"}
@@ -0,0 +1,206 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Component, Input, Output } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
5
+ import { spxValidatorRequired, SpxValidateControlComponent } from '@softpak/components/spx-validation';
6
+ import { CommonModule } from '@angular/common';
7
+ import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
8
+ import { SpxFormViewComponent } from '@softpak/components/spx-form-view';
9
+ import { SpxButtonComponent } from '@softpak/components/spx-button';
10
+ import { SpxSeverityEnum } from '@softpak/components/spx-helpers';
11
+
12
+ const sectionChangeDetails = 'changeDetails';
13
+ const ctrlContainerNumber = 'containerNumber';
14
+ const ctrlContainerPrefix = 'containerPrefix';
15
+ const ctrlContainerSeqNr = 'containerSeqNr';
16
+ const ctrlContainerType = 'containerType';
17
+ const ctrlCustomer = 'customer';
18
+ const ctrlTonsTested = 'tonsTested';
19
+ const ctrlLicensePlate = 'licensePlate';
20
+ const ctrlCategory = 'category';
21
+ class SpxChangeDetailsComponent {
22
+ get ctrlCategory() { return this.formGroup.get(ctrlCategory); }
23
+ get ctrlCustomer() { return this.formGroup.get(ctrlCustomer); }
24
+ get ctrlContainerType() { return this.formGroup.get(ctrlContainerType); }
25
+ get ctrlLicensePlate() { return this.formGroup.get(ctrlLicensePlate); }
26
+ get ctrlTonsTested() { return this.formGroup.get(ctrlTonsTested); }
27
+ constructor(formBuilder) {
28
+ this.formBuilder = formBuilder;
29
+ this.showCategory = false;
30
+ this.suggestions = {};
31
+ this.spxBlurCategory = new EventEmitter();
32
+ this.spxBlurContainerType = new EventEmitter();
33
+ this.spxSearchCategory = new EventEmitter();
34
+ this.spxSearchContainerType = new EventEmitter();
35
+ this.spxSearchTonsTested = new EventEmitter();
36
+ this.submit = new EventEmitter();
37
+ this.inputTypeAutocomplete = SpxInputTypeEnum.autocomplete;
38
+ this.inputTypeRadio = SpxInputTypeEnum.radio;
39
+ this.inputTypeText = SpxInputTypeEnum.text;
40
+ this.severitySuccess = SpxSeverityEnum.success;
41
+ this.sections = [
42
+ {
43
+ key: sectionChangeDetails,
44
+ showTitle: () => false,
45
+ fields: [
46
+ {
47
+ key: ctrlContainerNumber,
48
+ type: () => SpxInputTypeEnum.text,
49
+ label: () => this.txtContainerNumber,
50
+ readonly: () => true,
51
+ validators: () => [spxValidatorRequired()],
52
+ },
53
+ {
54
+ key: ctrlContainerPrefix,
55
+ type: () => SpxInputTypeEnum.text,
56
+ label: () => this.txtContainerPrefix,
57
+ capitalize: () => true,
58
+ readonly: () => true,
59
+ validators: () => [spxValidatorRequired()],
60
+ },
61
+ {
62
+ key: ctrlContainerSeqNr,
63
+ type: () => SpxInputTypeEnum.hidden,
64
+ validators: () => [spxValidatorRequired()],
65
+ },
66
+ {
67
+ key: ctrlCustomer,
68
+ type: () => SpxInputTypeEnum.text,
69
+ capitalize: () => true,
70
+ readonly: () => true,
71
+ label: () => this.txtCustomer,
72
+ validators: () => [spxValidatorRequired()],
73
+ },
74
+ {
75
+ key: ctrlContainerType,
76
+ type: () => SpxInputTypeEnum.autocomplete,
77
+ label: () => this.txtContainerType,
78
+ capitalize: () => true,
79
+ validators: () => [spxValidatorRequired()],
80
+ },
81
+ {
82
+ key: ctrlTonsTested,
83
+ type: () => SpxInputTypeEnum.radio,
84
+ label: () => this.txtTonsTested,
85
+ show: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0,
86
+ validators: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0 ? [spxValidatorRequired()] : [],
87
+ },
88
+ {
89
+ key: ctrlLicensePlate,
90
+ type: () => SpxInputTypeEnum.text,
91
+ label: () => this.txtLicensePlate,
92
+ capitalize: () => true,
93
+ },
94
+ {
95
+ key: ctrlCategory,
96
+ type: () => SpxInputTypeEnum.autocomplete,
97
+ label: () => this.txtCategory,
98
+ capitalize: () => true,
99
+ show: () => this.showCategory,
100
+ validators: () => this.showCategory ? [spxValidatorRequired()] : [],
101
+ }
102
+ ]
103
+ }
104
+ ];
105
+ }
106
+ createForm() {
107
+ return SpxFormViewComponent.createForm(this.formBuilder, this.sections);
108
+ }
109
+ ngOnInit() {
110
+ this.listenToContainerType();
111
+ }
112
+ ngOnDestroy() {
113
+ if (this.subContainerType) {
114
+ this.subContainerType.unsubscribe();
115
+ }
116
+ }
117
+ getRawValidators(formControl) {
118
+ return formControl._rawValidators;
119
+ }
120
+ onBlur(data) {
121
+ if (data.field.key === ctrlCategory) {
122
+ this.spxBlurCategory.emit(data.valuePair);
123
+ }
124
+ if (data.field.key === ctrlContainerType) {
125
+ this.spxBlurContainerType.emit(data.valuePair);
126
+ }
127
+ }
128
+ onSearch(data) {
129
+ if (data.field.key === ctrlCategory) {
130
+ this.spxSearchCategory.emit(data.valuePair);
131
+ }
132
+ if (data.field.key === ctrlContainerType) {
133
+ this.spxSearchContainerType.emit(data.valuePair);
134
+ }
135
+ if (data.field.key === ctrlTonsTested) {
136
+ this.spxSearchTonsTested.emit(data.valuePair);
137
+ }
138
+ }
139
+ onSubmit() {
140
+ this.submit.emit({
141
+ category: this.ctrlCategory.value,
142
+ containerType: this.ctrlContainerType.value,
143
+ licensePlate: this.ctrlLicensePlate.value,
144
+ tonsTested: this.ctrlTonsTested.value,
145
+ });
146
+ }
147
+ listenToContainerType() {
148
+ this.subContainerType = this.ctrlContainerType.valueChanges.subscribe(valuePair => {
149
+ this.ctrlTonsTested.setValue({ value: null });
150
+ this.spxSearchTonsTested.emit(valuePair);
151
+ });
152
+ }
153
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChangeDetailsComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
154
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxChangeDetailsComponent, isStandalone: true, selector: "spx-change-details", inputs: { formGroup: "formGroup", showCategory: "showCategory", suggestions: "suggestions", txtCategory: "txtCategory", txtContainerNumber: "txtContainerNumber", txtContainerPrefix: "txtContainerPrefix", txtContainerType: "txtContainerType", txtCustomer: "txtCustomer", txtLicensePlate: "txtLicensePlate", txtTonsTested: "txtTonsTested" }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerType: "spxBlurContainerType", spxSearchCategory: "spxSearchCategory", spxSearchContainerType: "spxSearchContainerType", spxSearchTonsTested: "spxSearchTonsTested", submit: "submit" }, ngImport: i0, template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup\"\n [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n</form>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxSections", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }] }); }
155
+ }
156
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
157
+ type: Component,
158
+ args: [{ selector: 'spx-change-details', standalone: true, imports: [
159
+ CommonModule,
160
+ FormsModule,
161
+ ReactiveFormsModule,
162
+ SpxButtonComponent,
163
+ SpxFormViewComponent,
164
+ SpxInputComponent,
165
+ SpxValidateControlComponent,
166
+ ], template: "<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup\"\n [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n</form>" }]
167
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { formGroup: [{
168
+ type: Input
169
+ }], showCategory: [{
170
+ type: Input
171
+ }], suggestions: [{
172
+ type: Input
173
+ }], txtCategory: [{
174
+ type: Input
175
+ }], txtContainerNumber: [{
176
+ type: Input
177
+ }], txtContainerPrefix: [{
178
+ type: Input
179
+ }], txtContainerType: [{
180
+ type: Input
181
+ }], txtCustomer: [{
182
+ type: Input
183
+ }], txtLicensePlate: [{
184
+ type: Input
185
+ }], txtTonsTested: [{
186
+ type: Input
187
+ }], spxBlurCategory: [{
188
+ type: Output
189
+ }], spxBlurContainerType: [{
190
+ type: Output
191
+ }], spxSearchCategory: [{
192
+ type: Output
193
+ }], spxSearchContainerType: [{
194
+ type: Output
195
+ }], spxSearchTonsTested: [{
196
+ type: Output
197
+ }], submit: [{
198
+ type: Output
199
+ }] } });
200
+
201
+ /**
202
+ * Generated bundle index. Do not edit.
203
+ */
204
+
205
+ export { SpxChangeDetailsComponent, ctrlCategory, ctrlContainerNumber, ctrlContainerPrefix, ctrlContainerSeqNr, ctrlContainerType, ctrlCustomer, ctrlLicensePlate, ctrlTonsTested, sectionChangeDetails };
206
+ //# sourceMappingURL=softpak-components-spx-change-details.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"softpak-components-spx-change-details.mjs","sources":["../../../../projects/softpak/components/spx-change-details/spx-change-details.component.ts","../../../../projects/softpak/components/spx-change-details/spx-change-details.component.html","../../../../projects/softpak/components/spx-change-details/softpak-components-spx-change-details.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { spxValidatorRequired, SpxValidateControlComponent } from '@softpak/components/spx-validation';\nimport { CommonModule } from '@angular/common';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { SpxFormFieldI, SpxFormSectionI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\n\nexport const sectionChangeDetails = 'changeDetails';\nexport const ctrlContainerNumber = 'containerNumber';\nexport const ctrlContainerPrefix = 'containerPrefix';\nexport const ctrlContainerSeqNr = 'containerSeqNr';\nexport const ctrlContainerType = 'containerType';\nexport const ctrlCustomer = 'customer';\nexport const ctrlTonsTested = 'tonsTested';\nexport const ctrlLicensePlate = 'licensePlate';\nexport const ctrlCategory = 'category';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxFormViewComponent,\n SpxInputComponent,\n SpxValidateControlComponent,\n ]\n})\nexport class SpxChangeDetailsComponent {\n @Input() formGroup!: FormGroup;\n @Input() showCategory = false;\n @Input() suggestions: any = {};\n @Input() txtCategory!: string;\n @Input() txtContainerNumber!: string;\n @Input() txtContainerPrefix!: string;\n @Input() txtContainerType!: string;\n @Input() txtCustomer!: string;\n @Input() txtLicensePlate!: string;\n @Input() txtTonsTested!: string;\n @Output() spxBlurCategory: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxBlurContainerType: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxSearchCategory: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxSearchContainerType: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() spxSearchTonsTested: EventEmitter<SpxValuePair<string>> = new EventEmitter<SpxValuePair<string>>();\n @Output() submit: EventEmitter<SpxChangeDetailsValueI> = new EventEmitter<SpxChangeDetailsValueI>();\n\n inputTypeAutocomplete = SpxInputTypeEnum.autocomplete;\n inputTypeRadio = SpxInputTypeEnum.radio;\n inputTypeText = SpxInputTypeEnum.text;\n severitySuccess = SpxSeverityEnum.success;\n \n sections: SpxFormSectionI[] = [\n {\n key: sectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: ctrlContainerNumber,\n type: () => SpxInputTypeEnum.text,\n label: () => this.txtContainerNumber,\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlContainerPrefix,\n type: () => SpxInputTypeEnum.text,\n label: () => this.txtContainerPrefix,\n capitalize: () => true,\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlContainerSeqNr,\n type: () => SpxInputTypeEnum.hidden,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlCustomer,\n type: () => SpxInputTypeEnum.text,\n capitalize: () => true,\n readonly: () => true,\n label: () => this.txtCustomer,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlContainerType,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.txtContainerType,\n capitalize: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.txtTonsTested,\n show: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0,\n validators: () => this.suggestions?.[ctrlTonsTested] && this.suggestions?.[ctrlTonsTested].length && this.suggestions?.[ctrlTonsTested].length > 0 ? [spxValidatorRequired()] : [],\n },\n {\n key: ctrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.txtLicensePlate,\n capitalize: () => true,\n },\n {\n key: ctrlCategory,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.txtCategory,\n capitalize: () => true,\n show: () => this.showCategory,\n validators: () => this.showCategory ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ];\n\n get ctrlCategory(): FormControl { return this.formGroup.get(ctrlCategory) as FormControl; }\n get ctrlCustomer(): FormControl { return this.formGroup.get(ctrlCustomer) as FormControl; }\n get ctrlContainerType(): FormControl { return this.formGroup.get(ctrlContainerType) as FormControl; }\n get ctrlLicensePlate(): FormControl { return this.formGroup.get(ctrlLicensePlate) as FormControl; }\n get ctrlTonsTested(): FormControl { return this.formGroup.get(ctrlTonsTested) as FormControl; }\n\n private subContainerType?: Subscription;\n\n constructor(readonly formBuilder: FormBuilder) {\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.formBuilder, this.sections);\n }\n\n ngOnInit(): void {\n this.listenToContainerType();\n }\n\n ngOnDestroy(): void {\n if (this.subContainerType) {\n this.subContainerType.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n\n onBlur(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === ctrlCategory) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === ctrlContainerType) {\n this.spxBlurContainerType.emit(data.valuePair);\n }\n }\n \n onSearch(data: { field: SpxFormFieldI, valuePair: SpxValuePair<any> }) {\n if (data.field.key === ctrlCategory) {\n this.spxSearchCategory.emit(data.valuePair);\n }\n if (data.field.key === ctrlContainerType) {\n this.spxSearchContainerType.emit(data.valuePair);\n }\n if (data.field.key === ctrlTonsTested) {\n this.spxSearchTonsTested.emit(data.valuePair);\n }\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: this.ctrlCategory.value,\n containerType: this.ctrlContainerType.value,\n licensePlate: this.ctrlLicensePlate.value,\n tonsTested: this.ctrlTonsTested.value,\n })\n }\n\n private listenToContainerType(): void {\n this.subContainerType = this.ctrlContainerType.valueChanges.subscribe(valuePair => {\n this.ctrlTonsTested.setValue({ value: null });\n this.spxSearchTonsTested.emit(valuePair);\n });\n }\n}\n","<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup\"\n [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAWO,MAAM,oBAAoB,GAAG,gBAAgB;AAC7C,MAAM,mBAAmB,GAAG,kBAAkB;AAC9C,MAAM,mBAAmB,GAAG,kBAAkB;AAC9C,MAAM,kBAAkB,GAAG,iBAAiB;AAC5C,MAAM,iBAAiB,GAAG,gBAAgB;AAC1C,MAAM,YAAY,GAAG,WAAW;AAChC,MAAM,cAAc,GAAG,aAAa;AACpC,MAAM,gBAAgB,GAAG,eAAe;AACxC,MAAM,YAAY,GAAG,WAAW;MAgB1B,yBAAyB,CAAA;AAwFpC,IAAA,IAAI,YAAY,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAgB,CAAC,EAAE;AAC3F,IAAA,IAAI,YAAY,GAAA,EAAkB,OAAO,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,YAAY,CAAgB,CAAC,EAAE;AAC3F,IAAA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drC,SAAS;+BACE,oBAAoB,EAAA,UAAA,EAElB,IAAI,EACP,OAAA,EAAA;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,kBAAkB;wBAClB,oBAAoB;wBACpB,iBAAiB;wBACjB,2BAA2B;AAC5B,qBAAA,EAAA,QAAA,EAAA,0bAAA,EAAA,CAAA;gFAGQ,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBACG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,kBAAkB,EAAA,CAAA;sBAA1B,KAAK;gBACG,kBAAkB,EAAA,CAAA;sBAA1B,KAAK;gBACG,gBAAgB,EAAA,CAAA;sBAAxB,KAAK;gBACG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBACG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBACG,aAAa,EAAA,CAAA;sBAArB,KAAK;gBACI,eAAe,EAAA,CAAA;sBAAxB,MAAM;gBACG,oBAAoB,EAAA,CAAA;sBAA7B,MAAM;gBACG,iBAAiB,EAAA,CAAA;sBAA1B,MAAM;gBACG,sBAAsB,EAAA,CAAA;sBAA/B,MAAM;gBACG,mBAAmB,EAAA,CAAA;sBAA5B,MAAM;gBACG,MAAM,EAAA,CAAA;sBAAf,MAAM;;;AEnDT;;AAEG;;;;"}
@@ -1,13 +1,15 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { EventEmitter, Component, Input, Output } from '@angular/core';
3
3
  import { SpxButtonComponent } from '@softpak/components/spx-button';
4
- import * as i1$1 from '@angular/common';
5
- import { CommonModule } from '@angular/common';
4
+ import { CommonModule, NgIf } from '@angular/common';
6
5
  import * as i1 from '@angular/forms';
7
6
  import { FormsModule, ReactiveFormsModule } from '@angular/forms';
8
7
  import { SpxInputTypeEnum, SpxInputComponent } from '@softpak/components/spx-inputs';
9
8
  import { SpxFormSectionComponent } from '@softpak/components/spx-form-section';
10
9
  import { SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';
10
+ import { SpxFormViewComponent } from '@softpak/components/spx-form-view';
11
+ import { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';
12
+ import { spxValidatorRequired } from '@softpak/components/spx-validation';
11
13
 
12
14
  class SpxChannelIndicatorComponent {
13
15
  constructor() {
@@ -60,7 +62,7 @@ class SpxChannelSelectionComponent {
60
62
  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
63
  <spx-input [formControl]="control" [spxLabel]="txtChannel"
62
64
  [spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
63
- `, 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"] }] }); }
65
+ `, 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", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "value", "spxCapitalize", "spxFocused"], outputs: ["spxBlur", "spxClear", "spxChange", "spxFocus", "spxEdit", "spxHelp", "spxSearch"] }] }); }
64
66
  }
65
67
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxChannelSelectionComponent, decorators: [{
66
68
  type: Component,
@@ -97,7 +99,7 @@ class SpxCompanySelectionComponent {
97
99
  <spx-input [formControl]="control" [spxLabel]="txtCompany"
98
100
  [spxType]="inputTypeRadio" [spxSuggestions]="options"></spx-input>
99
101
  </div>
100
- </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"] }] }); }
102
+ </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", "spxShowLabel", "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
103
  }
102
104
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxCompanySelectionComponent, decorators: [{
103
105
  type: Component,
@@ -128,40 +130,127 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
128
130
  type: Input
129
131
  }] } });
130
132
 
133
+ const sectionWelcome = 'welcome';
134
+ const ctrlChannel = 'channel';
135
+ const ctrlChannelType = 'channelType';
131
136
  class SpxWelcomeComponent {
132
- get filteredChannels() { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)); }
133
- constructor() {
137
+ get ctrlChannel() { return this.formGroup.get(ctrlChannel); }
138
+ get ctrlChannelType() { return this.formGroup.get(ctrlChannelType); }
139
+ get filteredCompanies() { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand })); }
140
+ constructor(formBuilder) {
141
+ this.formBuilder = formBuilder;
134
142
  this.channels = [];
135
- this.spxSelected = new EventEmitter();
143
+ this.channelTypes = [];
144
+ this.spxSelect = new EventEmitter();
145
+ this.severitySuccess = SpxSeverityEnum.success;
146
+ this.suggestions = {
147
+ [ctrlChannelType]: [],
148
+ [ctrlChannel]: [],
149
+ };
150
+ this.subscriptions = {};
151
+ this.sections = [
152
+ {
153
+ key: sectionWelcome,
154
+ showTitle: () => false,
155
+ fields: [
156
+ {
157
+ key: ctrlChannel,
158
+ type: () => SpxInputTypeEnum.radio,
159
+ label: () => this.txtCompany,
160
+ validators: () => [spxValidatorRequired()],
161
+ },
162
+ {
163
+ key: ctrlChannelType,
164
+ type: () => SpxInputTypeEnum.radio,
165
+ label: () => this.txtChannel,
166
+ capitalize: () => true,
167
+ show: () => valuePairToValue(this.ctrlChannel.value),
168
+ validators: () => [spxValidatorRequired()],
169
+ },
170
+ ]
171
+ }
172
+ ];
173
+ }
174
+ ngOnChanges(changes) {
175
+ this.suggestions[ctrlChannel] = this.filteredCompanies;
176
+ }
177
+ ngOnDestroy() {
178
+ }
179
+ ngOnInit() {
180
+ this.subscriptions.channel = this.ctrlChannel.valueChanges.subscribe(valuePair => {
181
+ const channel = this.channels?.find(c => c.brand === valuePairToValue(valuePair));
182
+ this.suggestions[ctrlChannelType] = !channel ? [] : channel?.channelTypes?.map(ct => ({
183
+ description: ct,
184
+ value: ct
185
+ }));
186
+ this.ctrlChannelType.setValue({
187
+ value: SpxAppChannelTypeEnum.production,
188
+ });
189
+ });
136
190
  }
137
- onSelectChannel(channel) {
138
- this.spxSelected.emit(channel);
191
+ onSubmit() {
192
+ console.log('spxSelect emitting...');
193
+ this.spxSelect.emit({
194
+ channel: this.channels?.find(c => c.brand === valuePairToValue(this.ctrlChannel.value)),
195
+ channelType: valuePairToValue(this.ctrlChannelType.value),
196
+ });
139
197
  }
140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxWelcomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxWelcomeComponent, isStandalone: true, selector: "spx-welcome", inputs: { channels: "channels" }, outputs: { spxSelected: "spxSelected" }, ngImport: i0, template: `<div class="flex flex-col gap-3">
142
- <spx-button [spxFullWidth]="true" *ngFor="let channel of filteredChannels" (click)="onSelectChannel(channel)">
143
- {{ channel.brand }}
198
+ createForm() {
199
+ return SpxFormViewComponent.createForm(this.formBuilder, this.sections);
200
+ }
201
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxWelcomeComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
202
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: SpxWelcomeComponent, isStandalone: true, selector: "spx-welcome", inputs: { channels: "channels", channelTypes: "channelTypes", formGroup: "formGroup", txtChannel: "txtChannel", txtCompany: "txtCompany" }, outputs: { spxSelect: "spxSelect" }, usesOnChanges: true, ngImport: i0, template: `<form [formGroup]="formGroup" class="max-w-lg mx-auto flex flex-col gap-3" (ngSubmit)="onSubmit()">
203
+ <spx-form-view
204
+ [spxFormGroup]="formGroup"
205
+ [spxSections]="sections"
206
+ [spxSuggestions]="suggestions">
207
+ </spx-form-view>
208
+ <spx-button
209
+ [spxFullWidth]="true"
210
+ [spxSeverity]="severitySuccess">
211
+ Save
144
212
  </spx-button>
145
- </div>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }] }); }
213
+ </form>`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxSections", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }] }); }
146
214
  }
147
215
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: SpxWelcomeComponent, decorators: [{
148
216
  type: Component,
149
217
  args: [{
150
218
  selector: 'spx-welcome',
151
- template: `<div class="flex flex-col gap-3">
152
- <spx-button [spxFullWidth]="true" *ngFor="let channel of filteredChannels" (click)="onSelectChannel(channel)">
153
- {{ channel.brand }}
219
+ template: `<form [formGroup]="formGroup" class="max-w-lg mx-auto flex flex-col gap-3" (ngSubmit)="onSubmit()">
220
+ <spx-form-view
221
+ [spxFormGroup]="formGroup"
222
+ [spxSections]="sections"
223
+ [spxSuggestions]="suggestions">
224
+ </spx-form-view>
225
+ <spx-button
226
+ [spxFullWidth]="true"
227
+ [spxSeverity]="severitySuccess">
228
+ Save
154
229
  </spx-button>
155
- </div>`,
230
+ </form>`,
156
231
  standalone: true,
157
232
  imports: [
158
233
  CommonModule,
234
+ FormsModule,
235
+ ReactiveFormsModule,
159
236
  SpxButtonComponent,
237
+ SpxFormSectionComponent,
238
+ SpxFormViewComponent,
239
+ SpxInputComponent,
240
+ NgIf,
160
241
  ]
161
242
  }]
162
- }], ctorParameters: () => [], propDecorators: { channels: [{
243
+ }], ctorParameters: () => [{ type: i1.FormBuilder }], propDecorators: { channels: [{
244
+ type: Input
245
+ }], channelTypes: [{
246
+ type: Input
247
+ }], formGroup: [{
248
+ type: Input
249
+ }], txtChannel: [{
250
+ type: Input
251
+ }], txtCompany: [{
163
252
  type: Input
164
- }], spxSelected: [{
253
+ }], spxSelect: [{
165
254
  type: Output
166
255
  }] } });
167
256
 
@@ -169,5 +258,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
169
258
  * Generated bundle index. Do not edit.
170
259
  */
171
260
 
172
- export { SpxChannelIndicatorComponent, SpxChannelSelectionComponent, SpxCompanySelectionComponent, SpxWelcomeComponent };
261
+ export { SpxChannelIndicatorComponent, SpxChannelSelectionComponent, SpxCompanySelectionComponent, SpxWelcomeComponent, ctrlChannel, ctrlChannelType, sectionWelcome };
173
262
  //# sourceMappingURL=softpak-components-spx-channel-selection.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-company-selection.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-welcome.component.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-channel-indicator',\n template: `<div class=\"bg-white p-3 rounded flex gap-3 items-center text-black\">\n <div class=\"grow\">\n <div class=\"text-lg font-bold\">{{ channel?.brand }}</div>\n <div class=\"text-base text-gray-600\">{{ channelType }}</div>\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ txtChange }}</spx-button>\n </div>`,\n standalone: true,\n imports: [\n SpxButtonComponent,\n ],\n})\nexport class SpxChannelIndicatorComponent {\n @Input() channel?: SpxAppChannelI;\n @Input() channelType?: SpxAppChannelTypeEnum;\n @Input() txtChange!: string;\n @Output() spxChange: EventEmitter<void> = new EventEmitter<void>();\n\n constructor(\n ) { }\n\n onChange() {\n this.spxChange.emit();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\n\n@Component({\n selector: 'spx-channel-selection',\n template: `\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtChannel\"\n [spxType]=\"inputTypeRadio\" [spxSuggestions]=\"options\"></spx-input>\n `,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n ]\n})\nexport class SpxChannelSelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n inputTypeRadio = SpxInputTypeEnum.radio;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input } from '@angular/core';\nimport { FormControl, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\n\n\n@Component({\n selector: 'spx-company-selection',\n template: `<spx-form-section [spxTitle]=\"txtChannel\" [spxIndex]=\"2\">\n <div class=\"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-3\">\n <spx-input [formControl]=\"control\" [spxLabel]=\"txtCompany\"\n [spxType]=\"inputTypeRadio\" [spxSuggestions]=\"options\"></spx-input>\n </div>\n</spx-form-section>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n SpxFormSectionComponent,\n ]\n})\nexport class SpxCompanySelectionComponent {\n @Input() control!: FormControl;\n @Input() options: SpxValuePair<string>[] = [];\n @Input() txtChannel!: string;\n @Input() txtCompany!: string;\n inputTypeRadio = SpxInputTypeEnum.radio;\n\n constructor(\n ) { }\n}\n","import { CommonModule } from '@angular/common';\nimport { Component, Input, Output, EventEmitter } from '@angular/core';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\n\n@Component({\n selector: 'spx-welcome',\n template: `<div class=\"flex flex-col gap-3\">\n <spx-button [spxFullWidth]=\"true\" *ngFor=\"let channel of filteredChannels\" (click)=\"onSelectChannel(channel)\">\n {{ channel.brand }}\n </spx-button>\n </div>`,\n standalone: true,\n imports: [\n CommonModule,\n SpxButtonComponent,\n ]\n})\nexport class SpxWelcomeComponent {\n @Input() public channels?: SpxAppChannelI[] = [];\n @Output() public spxSelected: EventEmitter<SpxAppChannelI> = new EventEmitter<SpxAppChannelI>();\n\n get filteredChannels () { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)); }\n\n constructor(\n ) { }\n\n onSelectChannel(channel: SpxAppChannelI) {\n this.spxSelected.emit(channel);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\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AA,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;;;;"}
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, NgIf } from '@angular/common';\nimport { Component, Input, Output, EventEmitter, OnChanges, SimpleChanges, OnInit, OnDestroy } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxFormSectionComponent } from '@softpak/components/spx-form-section';\nimport { SpxFormSectionI, SpxFormViewComponent } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxInputComponent, SpxInputTypeEnum, SpxValuePair } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\nimport { Subscription } from 'rxjs';\n\nexport const sectionWelcome = 'welcome';\nexport const ctrlChannel = 'channel';\nexport const ctrlChannelType = 'channelType';\nexport interface SpxWelcomeValueI {\n [ctrlChannel]?: SpxAppChannelI;\n [ctrlChannelType]: SpxAppChannelTypeEnum;\n}\n\n@Component({\n selector: 'spx-welcome',\n template: `<form [formGroup]=\"formGroup\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup\"\n [spxSections]=\"sections\"\n [spxSuggestions]=\"suggestions\">\n </spx-form-view>\n <spx-button\n [spxFullWidth]=\"true\"\n [spxSeverity]=\"severitySuccess\">\n Save\n </spx-button>\n </form>`,\n standalone: true,\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n SpxButtonComponent,\n SpxFormSectionComponent,\n SpxFormViewComponent,\n SpxInputComponent,\n NgIf,\n ]\n})\nexport class SpxWelcomeComponent implements OnChanges, OnInit, OnDestroy {\n @Input() channels?: SpxAppChannelI[] = [];\n @Input() channelTypes?: SpxAppChannelTypeEnum[] = [];\n @Input() formGroup!: FormGroup;\n @Input() txtChannel!: string;\n @Input() txtCompany!: string;\n @Output() spxSelect: EventEmitter<SpxWelcomeValueI> = new EventEmitter<SpxWelcomeValueI>();\n severitySuccess = SpxSeverityEnum.success;\n suggestions: {\n [ctrlChannelType]?: SpxValuePair<string>[];\n [ctrlChannel]?: SpxValuePair<string>[];\n } = {\n [ctrlChannelType]: [],\n [ctrlChannel]: [],\n };\n \n get ctrlChannel(): FormControl { return this.formGroup.get(ctrlChannel) as FormControl; }\n get ctrlChannelType(): FormControl { return this.formGroup.get(ctrlChannelType) as FormControl; }\n private subscriptions: {\n channel?: Subscription\n } = {};\n\n sections: SpxFormSectionI[] = [\n {\n key: sectionWelcome,\n showTitle: () => false,\n fields: [\n {\n key: ctrlChannel,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.txtCompany,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: ctrlChannelType,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.txtChannel,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlChannel.value),\n validators: () => [spxValidatorRequired()],\n },\n ]\n }\n ];\n \n get filteredCompanies(): SpxValuePair<string>[] { return (this.channels ?? [])?.filter(channel => channel.channelTypes.includes(SpxAppChannelTypeEnum.production)).map(c => ({ description: c.brand, value: c.brand })); }\n\n constructor(readonly formBuilder: FormBuilder) {\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n this.suggestions[ctrlChannel] = this.filteredCompanies;\n }\n\n ngOnDestroy(): void {\n \n }\n\n ngOnInit(): void {\n this.subscriptions.channel = this.ctrlChannel.valueChanges.subscribe(valuePair => {\n const channel = this.channels?.find(c => c.brand === valuePairToValue(valuePair));\n this.suggestions[ctrlChannelType] = !channel ? [] : channel?.channelTypes?.map(ct => ({\n description: ct,\n value: ct\n }));\n this.ctrlChannelType.setValue({\n value: SpxAppChannelTypeEnum.production,\n });\n });\n }\n\n onSubmit(): void {\n console.log('spxSelect emitting...');\n this.spxSelect.emit({\n channel: this.channels?.find(c => c.brand === valuePairToValue(this.ctrlChannel.value)),\n channelType: valuePairToValue(this.ctrlChannelType.value),\n });\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(this.formBuilder, this.sections);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAkBa,4BAA4B,CAAA;AAMvC,IAAA,WAAA,GAAA;AAFU,QAAA,IAAA,CAAA,SAAS,GAAuB,IAAI,YAAY,EAAQ,CAAC;KAG9D;IAEL,QAAQ,GAAA;AACN,QAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;KACvB;8GAXU,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAA5B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,4BAA4B,EAZ7B,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,SAAA,EAAA,WAAA,EAAA,aAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,OAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;AAMH,QAAA,CAAA,E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