@softpak/components 20.2.5 → 20.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/fesm2022/softpak-components-spx-404-page.mjs +3 -3
  2. package/fesm2022/softpak-components-spx-404-page.mjs.map +1 -1
  3. package/fesm2022/softpak-components-spx-alert.mjs +3 -3
  4. package/fesm2022/softpak-components-spx-alert.mjs.map +1 -1
  5. package/fesm2022/softpak-components-spx-app-expiry.mjs +3 -3
  6. package/fesm2022/softpak-components-spx-app-expiry.mjs.map +1 -1
  7. package/fesm2022/softpak-components-spx-button.mjs +3 -3
  8. package/fesm2022/softpak-components-spx-button.mjs.map +1 -1
  9. package/fesm2022/softpak-components-spx-capitalize.mjs +3 -3
  10. package/fesm2022/softpak-components-spx-capitalize.mjs.map +1 -1
  11. package/fesm2022/softpak-components-spx-card.mjs +12 -12
  12. package/fesm2022/softpak-components-spx-card.mjs.map +1 -1
  13. package/fesm2022/softpak-components-spx-change-details.mjs +6 -7
  14. package/fesm2022/softpak-components-spx-change-details.mjs.map +1 -1
  15. package/fesm2022/softpak-components-spx-channel-selection.mjs +11 -11
  16. package/fesm2022/softpak-components-spx-channel-selection.mjs.map +1 -1
  17. package/fesm2022/softpak-components-spx-check-digit.mjs +3 -3
  18. package/fesm2022/softpak-components-spx-check-digit.mjs.map +1 -1
  19. package/fesm2022/softpak-components-spx-confirm.mjs +9 -9
  20. package/fesm2022/softpak-components-spx-confirm.mjs.map +1 -1
  21. package/fesm2022/softpak-components-spx-form-section.mjs +3 -3
  22. package/fesm2022/softpak-components-spx-form-section.mjs.map +1 -1
  23. package/fesm2022/softpak-components-spx-form-view.mjs +35 -40
  24. package/fesm2022/softpak-components-spx-form-view.mjs.map +1 -1
  25. package/fesm2022/softpak-components-spx-inputs.mjs +33 -33
  26. package/fesm2022/softpak-components-spx-inputs.mjs.map +1 -1
  27. package/fesm2022/softpak-components-spx-navigation.mjs +9 -9
  28. package/fesm2022/softpak-components-spx-navigation.mjs.map +1 -1
  29. package/fesm2022/softpak-components-spx-number-check.mjs +3 -3
  30. package/fesm2022/softpak-components-spx-number-check.mjs.map +1 -1
  31. package/fesm2022/softpak-components-spx-pagination.mjs +3 -3
  32. package/fesm2022/softpak-components-spx-pagination.mjs.map +1 -1
  33. package/fesm2022/softpak-components-spx-patch.mjs +3 -3
  34. package/fesm2022/softpak-components-spx-patch.mjs.map +1 -1
  35. package/fesm2022/softpak-components-spx-pipes.mjs +3 -3
  36. package/fesm2022/softpak-components-spx-pipes.mjs.map +1 -1
  37. package/fesm2022/softpak-components-spx-progress-bar.mjs +3 -3
  38. package/fesm2022/softpak-components-spx-progress-bar.mjs.map +1 -1
  39. package/fesm2022/softpak-components-spx-spinner.mjs +3 -3
  40. package/fesm2022/softpak-components-spx-spinner.mjs.map +1 -1
  41. package/fesm2022/softpak-components-spx-stock-info.mjs +6 -7
  42. package/fesm2022/softpak-components-spx-stock-info.mjs.map +1 -1
  43. package/fesm2022/softpak-components-spx-suggestion.mjs +3 -3
  44. package/fesm2022/softpak-components-spx-suggestion.mjs.map +1 -1
  45. package/fesm2022/softpak-components-spx-tabs.mjs +3 -3
  46. package/fesm2022/softpak-components-spx-tabs.mjs.map +1 -1
  47. package/fesm2022/softpak-components-spx-toaster.mjs +3 -3
  48. package/fesm2022/softpak-components-spx-toaster.mjs.map +1 -1
  49. package/fesm2022/softpak-components-spx-toggle.mjs +3 -3
  50. package/fesm2022/softpak-components-spx-toggle.mjs.map +1 -1
  51. package/fesm2022/softpak-components-spx-update.mjs +12 -12
  52. package/fesm2022/softpak-components-spx-update.mjs.map +1 -1
  53. package/fesm2022/softpak-components-spx-validation-messages.mjs +3 -3
  54. package/fesm2022/softpak-components-spx-validation-messages.mjs.map +1 -1
  55. package/fesm2022/softpak-components-spx-validation.mjs +3 -3
  56. package/fesm2022/softpak-components-spx-validation.mjs.map +1 -1
  57. package/fesm2022/softpak-components-spx-welcome.mjs +4 -4
  58. package/fesm2022/softpak-components-spx-welcome.mjs.map +1 -1
  59. package/index.d.ts +5 -3
  60. package/package.json +17 -17
  61. package/placeholder.d.ts +1 -0
  62. package/public_api.d.ts +1 -0
  63. package/spx-404-page/index.d.ts +5 -18
  64. package/spx-404-page/public-api.d.ts +1 -0
  65. package/spx-404-page/spx-404-page.component.d.ts +15 -0
  66. package/spx-alert/index.d.ts +5 -34
  67. package/spx-alert/public-api.d.ts +2 -0
  68. package/spx-alert/spx-alert.component.d.ts +23 -0
  69. package/spx-alert/spx-alert.interface.d.ts +7 -0
  70. package/spx-app-configuration/index.d.ts +5 -73
  71. package/spx-app-configuration/public-api.d.ts +8 -0
  72. package/spx-app-configuration/spx-app-alert.interface.d.ts +7 -0
  73. package/spx-app-configuration/spx-app-bundle-set.interface.d.ts +4 -0
  74. package/spx-app-configuration/spx-app-channel-type.enum.d.ts +8 -0
  75. package/spx-app-configuration/spx-app-channel-type.model.d.ts +5 -0
  76. package/spx-app-configuration/spx-app-channel.interface.d.ts +10 -0
  77. package/spx-app-configuration/spx-app-config.interface.d.ts +19 -0
  78. package/spx-app-configuration/spx-app-id.enum.d.ts +6 -0
  79. package/spx-app-configuration/spx-app-lang.enum.d.ts +4 -0
  80. package/spx-app-configuration/spx-app-release-note.interface.d.ts +8 -0
  81. package/spx-app-expiry/index.d.ts +5 -38
  82. package/spx-app-expiry/public-api.d.ts +5 -0
  83. package/spx-app-expiry/spx-app-expiry.component.d.ts +21 -0
  84. package/spx-app-expiry/spx-app-expiry.interface.d.ts +7 -0
  85. package/spx-app-expiry/spx-check-expiry-final-warning.interface.d.ts +2 -0
  86. package/spx-app-expiry/spx-check-expiry-happened.interface.d.ts +2 -0
  87. package/spx-app-expiry/spx-check-expiry-warning.interface.d.ts +2 -0
  88. package/spx-button/index.d.ts +5 -26
  89. package/spx-button/public-api.d.ts +1 -0
  90. package/spx-button/spx-button.component.d.ts +23 -0
  91. package/spx-capitalize/index.d.ts +5 -11
  92. package/spx-capitalize/public-api.d.ts +1 -0
  93. package/spx-capitalize/spx-capitalize.pipe.d.ts +8 -0
  94. package/spx-card/index.d.ts +5 -54
  95. package/spx-card/public-api.d.ts +4 -0
  96. package/spx-card/spx-card-grid/spx-card-grid.component.d.ts +6 -0
  97. package/spx-card/spx-card-item/spx-card-item.component.d.ts +14 -0
  98. package/spx-card/spx-card-line/spx-card-line.component.d.ts +16 -0
  99. package/spx-card/spx-card.component.d.ts +15 -0
  100. package/spx-change-details/index.d.ts +5 -67
  101. package/spx-change-details/public-api.d.ts +1 -0
  102. package/spx-change-details/spx-change-details-value.interface.d.ts +7 -0
  103. package/spx-change-details/spx-change-details.component.d.ts +57 -0
  104. package/spx-channel-selection/index.d.ts +5 -107
  105. package/spx-channel-selection/public-api.d.ts +5 -0
  106. package/spx-channel-selection/src/spx-channel-guard.d.ts +7 -0
  107. package/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.d.ts +13 -0
  108. package/spx-channel-selection/store/spx-channel.actions.d.ts +21 -0
  109. package/spx-channel-selection/store/spx-channel.effects.d.ts +19 -0
  110. package/spx-channel-selection/store/spx-channel.reducer.d.ts +18 -0
  111. package/spx-check-digit/index.d.ts +5 -27
  112. package/spx-check-digit/public-api.d.ts +1 -0
  113. package/spx-check-digit/spx-check-digit.component.d.ts +24 -0
  114. package/spx-confirm/index.d.ts +5 -118
  115. package/spx-confirm/public-api.d.ts +5 -0
  116. package/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.d.ts +22 -0
  117. package/spx-confirm/spx-confirm.component.d.ts +16 -0
  118. package/spx-confirm/store/spx-confirm.actions.d.ts +22 -0
  119. package/spx-confirm/store/spx-confirm.effects.d.ts +12 -0
  120. package/spx-confirm/store/spx-confirm.reducer.d.ts +18 -0
  121. package/spx-form-section/index.d.ts +5 -12
  122. package/spx-form-section/public-api.d.ts +1 -0
  123. package/spx-form-section/spx-form-section.component.d.ts +9 -0
  124. package/spx-form-view/index.d.ts +5 -94
  125. package/spx-form-view/public-api.d.ts +6 -0
  126. package/spx-form-view/spx-autocomplete-search.component.d.ts +41 -0
  127. package/spx-form-view/spx-form-button-type.enum.d.ts +4 -0
  128. package/spx-form-view/spx-form-button.interface.d.ts +8 -0
  129. package/spx-form-view/spx-form-field.interface.d.ts +18 -0
  130. package/spx-form-view/spx-form-section.interface.d.ts +11 -0
  131. package/spx-form-view/spx-form-view.component.d.ts +46 -0
  132. package/spx-form-view/spx-form.interface.d.ts +6 -0
  133. package/spx-helpers/calc-check-digit.function.d.ts +1 -0
  134. package/spx-helpers/index.d.ts +5 -22
  135. package/spx-helpers/input-alert.interface.d.ts +5 -0
  136. package/spx-helpers/public-api.d.ts +5 -0
  137. package/spx-helpers/spx-severity.enum.d.ts +8 -0
  138. package/spx-helpers/unsubscribe-subscriptions.function.d.ts +1 -0
  139. package/spx-helpers/value-pair-to-value.function.d.ts +1 -0
  140. package/spx-inputs/index.d.ts +5 -330
  141. package/spx-inputs/input.service.d.ts +12 -0
  142. package/spx-inputs/public-api.d.ts +6 -0
  143. package/spx-inputs/spx-dropdown/spx-dropdown.component.d.ts +18 -0
  144. package/spx-inputs/spx-input-alert-interface.d.ts +5 -0
  145. package/spx-inputs/spx-input-box/spx-input-box.component.d.ts +41 -0
  146. package/spx-inputs/spx-input-date/spx-input-date.component.d.ts +50 -0
  147. package/spx-inputs/spx-input-float/spx-input-float.component.d.ts +33 -0
  148. package/spx-inputs/spx-input-number/spx-input-number.component.d.ts +24 -0
  149. package/spx-inputs/spx-input-radio/spx-input-radio.component.d.ts +27 -0
  150. package/spx-inputs/spx-input-text/spx-input-text.component.d.ts +34 -0
  151. package/spx-inputs/spx-input-time/spx-input-time.component.d.ts +35 -0
  152. package/spx-inputs/spx-input-time-modal/spx-input-time-modal.component.d.ts +18 -0
  153. package/spx-inputs/spx-input-type.enum.d.ts +16 -0
  154. package/spx-inputs/spx-input.component.d.ts +74 -0
  155. package/spx-inputs/spx-value-interface.d.ts +4 -0
  156. package/spx-navigation/index.d.ts +5 -140
  157. package/spx-navigation/public-api.d.ts +8 -0
  158. package/spx-navigation/spx-home-tile/spx-home-tile.component.d.ts +11 -0
  159. package/spx-navigation/spx-home-tile/spx-home-tiles.component.d.ts +6 -0
  160. package/spx-navigation/spx-navigation-item.interface.d.ts +22 -0
  161. package/spx-navigation/spx-navigation.component.d.ts +21 -0
  162. package/spx-navigation/store/spx-navigation/spx-navigation.actions.d.ts +28 -0
  163. package/spx-navigation/store/spx-navigation/spx-navigation.initial.d.ts +2 -0
  164. package/spx-navigation/store/spx-navigation/spx-navigation.reducer.d.ts +12 -0
  165. package/spx-navigation/store/spx-navigation/spx-navigation.state.d.ts +8 -0
  166. package/spx-number-check/index.d.ts +5 -43
  167. package/spx-number-check/public-api.d.ts +1 -0
  168. package/spx-number-check/spx-number-check.component.d.ts +40 -0
  169. package/spx-pagination/index.d.ts +5 -18
  170. package/spx-pagination/public-api.d.ts +1 -0
  171. package/spx-pagination/spx-pagination.component.d.ts +15 -0
  172. package/spx-patch/index.d.ts +5 -21
  173. package/spx-patch/patch-check.function.d.ts +4 -0
  174. package/spx-patch/public-api.d.ts +3 -0
  175. package/spx-patch/release-check.function.d.ts +1 -0
  176. package/spx-patch/spx-patch.component.d.ts +11 -0
  177. package/spx-pipes/index.d.ts +5 -11
  178. package/spx-pipes/public-api.d.ts +1 -0
  179. package/spx-pipes/spx-severity-pipe.d.ts +8 -0
  180. package/spx-progress-bar/index.d.ts +5 -10
  181. package/spx-progress-bar/public-api.d.ts +1 -0
  182. package/spx-progress-bar/spx-progress-bar.component.d.ts +7 -0
  183. package/spx-spinner/index.d.ts +5 -59
  184. package/spx-spinner/public-api.d.ts +5 -0
  185. package/spx-spinner/spx-spinner.component.d.ts +7 -0
  186. package/spx-spinner/store/spx-spinner/spx-spinner.actions.d.ts +6 -0
  187. package/spx-spinner/store/spx-spinner/spx-spinner.initial.d.ts +2 -0
  188. package/spx-spinner/store/spx-spinner/spx-spinner.reducer.d.ts +9 -0
  189. package/spx-spinner/store/spx-spinner/spx-spinner.state.d.ts +4 -0
  190. package/spx-stock-info/index.d.ts +5 -98
  191. package/spx-stock-info/public-api.d.ts +2 -0
  192. package/spx-stock-info/spx-stock-info-value.interface.d.ts +11 -0
  193. package/spx-stock-info/spx-stock-info.component.d.ts +83 -0
  194. package/spx-storage/index.d.ts +5 -26
  195. package/spx-storage/public-api.d.ts +2 -0
  196. package/spx-storage/src/spx-storage-key.enum.d.ts +15 -0
  197. package/spx-storage/src/spx-storage.class.d.ts +9 -0
  198. package/spx-suggestion/index.d.ts +5 -12
  199. package/spx-suggestion/public-api.d.ts +1 -0
  200. package/spx-suggestion/spx-suggestion.component.d.ts +9 -0
  201. package/spx-tabs/index.d.ts +5 -58
  202. package/spx-tabs/public-api.d.ts +3 -0
  203. package/spx-tabs/src/spx-tabs.component.d.ts +19 -0
  204. package/spx-tabs/store/spx-shortcuts.actions.d.ts +10 -0
  205. package/spx-tabs/store/spx-shortcuts.reducer.d.ts +11 -0
  206. package/spx-toaster/index.d.ts +5 -167
  207. package/spx-toaster/public-api.d.ts +7 -0
  208. package/spx-toaster/src/spx-toaster-autoclose-speed.d.ts +11 -0
  209. package/spx-toaster/src/spx-toaster-message.interface.d.ts +14 -0
  210. package/spx-toaster/src/spx-toaster.component.d.ts +11 -0
  211. package/spx-toaster/store/spx-toaster/spx-toaster.actions.d.ts +78 -0
  212. package/spx-toaster/store/spx-toaster/spx-toaster.initial.d.ts +2 -0
  213. package/spx-toaster/store/spx-toaster/spx-toaster.reducer.d.ts +11 -0
  214. package/spx-toaster/store/spx-toaster/spx-toaster.state.d.ts +5 -0
  215. package/spx-toggle/index.d.ts +5 -15
  216. package/spx-toggle/public-api.d.ts +1 -0
  217. package/spx-toggle/src/spx-toggle.component.d.ts +12 -0
  218. package/spx-translate/index.d.ts +5 -66
  219. package/spx-translate/public-api.d.ts +3 -0
  220. package/spx-translate/spx-translate._const.d.ts +59 -0
  221. package/spx-translate/spx-translate.en.d.ts +2 -0
  222. package/spx-translate/spx-translate.nl.d.ts +2 -0
  223. package/spx-update/index.d.ts +5 -208
  224. package/spx-update/public-api.d.ts +13 -0
  225. package/spx-update/spx-update-page.component.d.ts +17 -0
  226. package/spx-update/spx-update-pending.component.d.ts +25 -0
  227. package/spx-update/spx-update-url.d.ts +1 -0
  228. package/spx-update/store/spx-update-check/spx-update-check.actions.d.ts +28 -0
  229. package/spx-update/store/spx-update-check/spx-update-check.effects.d.ts +14 -0
  230. package/spx-update/store/spx-update-check/spx-update-check.initial.d.ts +2 -0
  231. package/spx-update/store/spx-update-check/spx-update-check.reducer.d.ts +10 -0
  232. package/spx-update/store/spx-update-check/spx-update-check.state.d.ts +5 -0
  233. package/spx-update/store/spx-update-pending/spx-update-pending.actions.d.ts +8 -0
  234. package/spx-update/store/spx-update-pending/spx-update-pending.effects.d.ts +10 -0
  235. package/spx-update/store/spx-update-pending/spx-update-pending.initial.d.ts +2 -0
  236. package/spx-update/store/spx-update-pending/spx-update-pending.reducer.d.ts +9 -0
  237. package/spx-update/store/spx-update-pending/spx-update-pending.state.d.ts +4 -0
  238. package/spx-validation/index.d.ts +5 -63
  239. package/spx-validation/max.validator.d.ts +7 -0
  240. package/spx-validation/maxlength.validator.d.ts +7 -0
  241. package/spx-validation/min.validator.d.ts +7 -0
  242. package/spx-validation/minlength.validator.d.ts +7 -0
  243. package/spx-validation/pattern.validator.d.ts +2 -0
  244. package/spx-validation/public-api.d.ts +8 -0
  245. package/spx-validation/required.validator.d.ts +2 -0
  246. package/spx-validation/spx-validate-control.component.d.ts +26 -0
  247. package/spx-validation/year-and-month.validator.d.ts +2 -0
  248. package/spx-validation-messages/index.d.ts +5 -28
  249. package/spx-validation-messages/public-api.d.ts +1 -0
  250. package/spx-validation-messages/spx-validation-messages.component.d.ts +25 -0
  251. package/spx-welcome/index.d.ts +5 -50
  252. package/spx-welcome/public-api.d.ts +1 -0
  253. package/spx-welcome/spx-welcome.component.d.ts +46 -0
@@ -17,8 +17,7 @@ const spxCtrlLicensePlate = 'licensePlate';
17
17
  const spxCtrlCategory = 'category';
18
18
  const spxCtrlUseCategories = 'useCategories';
19
19
  class SpxChangeDetailsComponent {
20
- constructor(formBuilder) {
21
- this.formBuilder = formBuilder;
20
+ constructor() {
22
21
  this.formGroup = input();
23
22
  this.suggestions = input();
24
23
  this.showTonsTested = computed(() => this.suggestions()?.[spxCtrlTonsTested] &&
@@ -124,7 +123,7 @@ class SpxChangeDetailsComponent {
124
123
  });
125
124
  }
126
125
  createForm() {
127
- return SpxFormViewComponent.createForm(this.formBuilder, this.form.sections);
126
+ return SpxFormViewComponent.createForm(this.form);
128
127
  }
129
128
  ngOnInit() {
130
129
  this.listenToContainerType();
@@ -172,17 +171,17 @@ class SpxChangeDetailsComponent {
172
171
  this.spxSearchTonsTested.emit(valuePair);
173
172
  });
174
173
  }
175
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxChangeDetailsComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
176
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.1", type: SpxChangeDetailsComponent, isStandalone: true, selector: "spx-change-details", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, textCategory: { classPropertyName: "textCategory", publicName: "textCategory", isSignal: true, isRequired: false, transformFunction: null }, textContainerNumber: { classPropertyName: "textContainerNumber", publicName: "textContainerNumber", isSignal: true, isRequired: false, transformFunction: null }, textContainerType: { classPropertyName: "textContainerType", publicName: "textContainerType", isSignal: true, isRequired: false, transformFunction: null }, textCustomer: { classPropertyName: "textCustomer", publicName: "textCustomer", isSignal: true, isRequired: false, transformFunction: null }, textLicensePlate: { classPropertyName: "textLicensePlate", publicName: "textLicensePlate", isSignal: true, isRequired: false, transformFunction: null }, textSave: { classPropertyName: "textSave", publicName: "textSave", isSignal: true, isRequired: false, transformFunction: null }, textTonsTested: { classPropertyName: "textTonsTested", publicName: "textTonsTested", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerType: "spxBlurContainerType", spxSearchCategory: "spxSearchCategory", spxSearchContainerType: "spxSearchContainerType", spxSearchTonsTested: "spxSearchTonsTested", submit: "submit" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()!\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
174
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxChangeDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
175
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.11", type: SpxChangeDetailsComponent, isStandalone: true, selector: "spx-change-details", inputs: { formGroup: { classPropertyName: "formGroup", publicName: "formGroup", isSignal: true, isRequired: false, transformFunction: null }, suggestions: { classPropertyName: "suggestions", publicName: "suggestions", isSignal: true, isRequired: false, transformFunction: null }, textCategory: { classPropertyName: "textCategory", publicName: "textCategory", isSignal: true, isRequired: false, transformFunction: null }, textContainerNumber: { classPropertyName: "textContainerNumber", publicName: "textContainerNumber", isSignal: true, isRequired: false, transformFunction: null }, textContainerType: { classPropertyName: "textContainerType", publicName: "textContainerType", isSignal: true, isRequired: false, transformFunction: null }, textCustomer: { classPropertyName: "textCustomer", publicName: "textCustomer", isSignal: true, isRequired: false, transformFunction: null }, textLicensePlate: { classPropertyName: "textLicensePlate", publicName: "textLicensePlate", isSignal: true, isRequired: false, transformFunction: null }, textSave: { classPropertyName: "textSave", publicName: "textSave", isSignal: true, isRequired: false, transformFunction: null }, textTonsTested: { classPropertyName: "textTonsTested", publicName: "textTonsTested", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { spxBlurCategory: "spxBlurCategory", spxBlurContainerType: "spxBlurContainerType", spxSearchCategory: "spxSearchCategory", spxSearchContainerType: "spxSearchContainerType", spxSearchTonsTested: "spxSearchTonsTested", submit: "submit" }, ngImport: i0, template: "<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()!\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxFormViewComponent, selector: "spx-form-view", inputs: ["spxFormGroup", "spxForm", "spxSuggestions"], outputs: ["spxBlur", "spxClick", "spxSearch"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
177
176
  }
178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
177
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxChangeDetailsComponent, decorators: [{
179
178
  type: Component,
180
179
  args: [{ selector: 'spx-change-details', imports: [
181
180
  FormsModule,
182
181
  ReactiveFormsModule,
183
182
  SpxFormViewComponent,
184
183
  ], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()!\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n</form>" }]
185
- }], ctorParameters: () => [{ type: i1.FormBuilder }] });
184
+ }], ctorParameters: () => [] });
186
185
 
187
186
  /**
188
187
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-change-details.mjs","sources":["../../../../projects/softpak/components/spx-change-details/spx-change-details.component.ts","../../../../projects/softpak/components/spx-change-details/spx-change-details.component.html","../../../../projects/softpak/components/spx-change-details/softpak-components-spx-change-details.ts"],"sourcesContent":["import { ChangeDetectionStrategy, computed, effect, input, output } from '@angular/core';\nimport { Component } from '@angular/core';\nimport {\n FormBuilder,\n FormControl,\n FormGroup,\n FormsModule,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\nimport { SpxFormViewComponent, SpxFormI, SpxFormButtonTypeEnum, SpxFormFieldI } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\n\nexport const spxSectionChangeDetails = 'changeDetails';\nexport const spxCtrlContainerNumber = 'containerNumber';\nexport const spxCtrlContainerSeqNr = 'containerSeqNr';\nexport const spxCtrlContainerType = 'containerType';\nexport const spxCtrlCustomer = 'customer';\nexport const spxCtrlTonsTested = 'tonsTested';\nexport const spxCtrlLicensePlate = 'licensePlate';\nexport const spxCtrlCategory = 'category';\nexport const spxCtrlUseCategories = 'useCategories';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxFormViewComponent,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxChangeDetailsComponent {\n readonly formGroup = input<FormGroup>();\n readonly suggestions = input<any>();\n private readonly showTonsTested = computed(() =>\n this.suggestions()?.[spxCtrlTonsTested] &&\n this.suggestions()?.[spxCtrlTonsTested].length &&\n this.suggestions()?.[spxCtrlTonsTested].length > 0\n );\n readonly textCategory = input<string>();\n readonly textContainerNumber = input<string>();\n readonly textContainerType = input<string>();\n readonly textCustomer = input<string>();\n readonly textLicensePlate = input<string>();\n readonly textSave = input<string>();\n readonly textTonsTested = input<string>();\n spxBlurCategory = output<SpxValuePair<string>>();\n spxBlurContainerType = output<SpxValuePair<string>>();\n spxSearchCategory = output<SpxValuePair<string>>();\n spxSearchContainerType = output<SpxValuePair<string>>();\n spxSearchTonsTested = output<SpxValuePair<string>>();\n submit = output<SpxChangeDetailsValueI>();\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSave()!,\n }\n ],\n sections: [\n {\n key: spxSectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: spxCtrlContainerSeqNr,\n type: () => SpxInputTypeEnum.hidden,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerNumber,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textContainerNumber()!,\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlCustomer,\n type: () => SpxInputTypeEnum.text,\n capitalize: () => true,\n readonly: () => true,\n label: () => this.textCustomer()!,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerType,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textContainerType()!,\n capitalize: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textTonsTested()!,\n show: () => this.showTonsTested(),\n },\n {\n key: spxCtrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textLicensePlate()!,\n capitalize: () => true,\n },\n {\n key: spxCtrlUseCategories,\n type: () => SpxInputTypeEnum.hidden,\n capitalize: () => true,\n },\n {\n key: spxCtrlCategory,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textCategory()!,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlUseCategories()?.value),\n validators: () => valuePairToValue(this.ctrlUseCategories()?.value) ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ]\n };\n\n readonly ctrlCategory = computed(() => this.formGroup()?.get(spxCtrlCategory) as FormControl);\n readonly ctrlCustomer = computed(() => this.formGroup()?.get(spxCtrlCustomer) as FormControl);\n readonly ctrlContainerType = computed(() => this.formGroup()?.get(spxCtrlContainerType) as FormControl);\n readonly ctrlLicensePlate = computed(() => this.formGroup()?.get(spxCtrlLicensePlate) as FormControl);\n readonly ctrlTonsTested = computed(() => this.formGroup()?.get(spxCtrlTonsTested) as FormControl);\n readonly ctrlUseCategories = computed(() => this.formGroup()?.get(spxCtrlUseCategories) as FormControl);\n\n private subContainerType?: Subscription;\n\n constructor(readonly formBuilder: FormBuilder) {\n effect(() => {\n if (\n this.showTonsTested()\n ) {\n this.ctrlTonsTested()?.addValidators([spxValidatorRequired()]);\n this.ctrlTonsTested()?.updateValueAndValidity();\n } else {\n this.ctrlTonsTested()?.clearValidators();\n this.ctrlTonsTested()?.updateValueAndValidity();\n }\n });\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(\n this.formBuilder,\n this.form.sections\n );\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 setTimeout(() => {\n if (data.field.key === spxCtrlCategory && valuePairToValue(this.formGroup()!.get(spxCtrlCategory)!.value) !== null) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType && valuePairToValue(this.formGroup()!.get(spxCtrlContainerType)!.value) !== null) {\n this.spxBlurContainerType.emit(data.valuePair);\n }\n }, 300);\n }\n\n onSearch(data: { field: SpxFormFieldI; valuePair: SpxValuePair<any> }) {\n if (data.field.key === spxCtrlCategory) {\n this.spxSearchCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType) {\n this.spxSearchContainerType.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlTonsTested) {\n this.spxSearchTonsTested.emit(data.valuePair);\n }\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: valuePairToValue(this.ctrlUseCategories().value) ? this.ctrlCategory().value : null,\n containerType: this.ctrlContainerType().value,\n licensePlate: this.ctrlLicensePlate().value,\n tonsTested: this.ctrlTonsTested().value,\n })\n }\n\n private listenToContainerType(): void {\n this.subContainerType = this.ctrlContainerType().valueChanges.subscribe(valuePair => {\n this.ctrlTonsTested().setValue({ value: null });\n this.spxSearchTonsTested.emit(valuePair);\n });\n }\n}\n","<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()!\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAgBO,MAAM,uBAAuB,GAAG;AAChC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,oBAAoB,GAAG;AAC7B,MAAM,eAAe,GAAG;AACxB,MAAM,iBAAiB,GAAG;AAC1B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,eAAe,GAAG;AACxB,MAAM,oBAAoB,GAAG;MAavB,yBAAyB,CAAA;AAqGpC,IAAA,WAAA,CAAqB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW;QApGvB,IAAS,CAAA,SAAA,GAAG,KAAK,EAAa;QAC9B,IAAW,CAAA,WAAA,GAAG,KAAK,EAAO;AAClB,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MACzC,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC;YACvC,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC,MAAM;AAC9C,YAAA,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC,MAAM,GAAG,CAAC,CACnD;QACQ,IAAY,CAAA,YAAA,GAAG,KAAK,EAAU;QAC9B,IAAmB,CAAA,mBAAA,GAAG,KAAK,EAAU;QACrC,IAAiB,CAAA,iBAAA,GAAG,KAAK,EAAU;QACnC,IAAY,CAAA,YAAA,GAAG,KAAK,EAAU;QAC9B,IAAgB,CAAA,gBAAA,GAAG,KAAK,EAAU;QAClC,IAAQ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C,2UAQO,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EDsBH,WAAW,EACX,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,QAAA,EAAA,8CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,0FAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,gLACnB,oBAAoB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,UAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAKX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAErB,OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,oBAAoB;AACrB,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2UAAA,EAAA;;;AEnCjD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-change-details.mjs","sources":["../../../../projects/softpak/components/spx-change-details/spx-change-details.component.ts","../../../../projects/softpak/components/spx-change-details/spx-change-details.component.html","../../../../projects/softpak/components/spx-change-details/softpak-components-spx-change-details.ts"],"sourcesContent":["import { ChangeDetectionStrategy, computed, effect, input, output } from '@angular/core';\nimport { Component } from '@angular/core';\nimport {\n FormControl,\n FormGroup,\n FormsModule,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { SpxChangeDetailsValueI } from './spx-change-details-value.interface';\nimport { SpxFormViewComponent, SpxFormI, SpxFormButtonTypeEnum, SpxFormFieldI } from '@softpak/components/spx-form-view';\nimport { SpxSeverityEnum, valuePairToValue } from '@softpak/components/spx-helpers';\nimport { SpxValuePair, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired } from '@softpak/components/spx-validation';\n\nexport const spxSectionChangeDetails = 'changeDetails';\nexport const spxCtrlContainerNumber = 'containerNumber';\nexport const spxCtrlContainerSeqNr = 'containerSeqNr';\nexport const spxCtrlContainerType = 'containerType';\nexport const spxCtrlCustomer = 'customer';\nexport const spxCtrlTonsTested = 'tonsTested';\nexport const spxCtrlLicensePlate = 'licensePlate';\nexport const spxCtrlCategory = 'category';\nexport const spxCtrlUseCategories = 'useCategories';\n\n@Component({\n selector: 'spx-change-details',\n templateUrl: './spx-change-details.component.html',\n imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxFormViewComponent,\n ],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SpxChangeDetailsComponent {\n readonly formGroup = input<FormGroup>();\n readonly suggestions = input<any>();\n private readonly showTonsTested = computed(() =>\n this.suggestions()?.[spxCtrlTonsTested] &&\n this.suggestions()?.[spxCtrlTonsTested].length &&\n this.suggestions()?.[spxCtrlTonsTested].length > 0\n );\n readonly textCategory = input<string>();\n readonly textContainerNumber = input<string>();\n readonly textContainerType = input<string>();\n readonly textCustomer = input<string>();\n readonly textLicensePlate = input<string>();\n readonly textSave = input<string>();\n readonly textTonsTested = input<string>();\n spxBlurCategory = output<SpxValuePair<string>>();\n spxBlurContainerType = output<SpxValuePair<string>>();\n spxSearchCategory = output<SpxValuePair<string>>();\n spxSearchContainerType = output<SpxValuePair<string>>();\n spxSearchTonsTested = output<SpxValuePair<string>>();\n submit = output<SpxChangeDetailsValueI>();\n\n form: SpxFormI = {\n buttons: [\n {\n severity: SpxSeverityEnum.success,\n type: SpxFormButtonTypeEnum.submit,\n label: () => this.textSave()!,\n }\n ],\n sections: [\n {\n key: spxSectionChangeDetails,\n showTitle: () => false,\n fields: [\n {\n key: spxCtrlContainerSeqNr,\n type: () => SpxInputTypeEnum.hidden,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerNumber,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textContainerNumber()!,\n readonly: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlCustomer,\n type: () => SpxInputTypeEnum.text,\n capitalize: () => true,\n readonly: () => true,\n label: () => this.textCustomer()!,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlContainerType,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textContainerType()!,\n capitalize: () => true,\n validators: () => [spxValidatorRequired()],\n },\n {\n key: spxCtrlTonsTested,\n type: () => SpxInputTypeEnum.radio,\n label: () => this.textTonsTested()!,\n show: () => this.showTonsTested(),\n },\n {\n key: spxCtrlLicensePlate,\n type: () => SpxInputTypeEnum.text,\n label: () => this.textLicensePlate()!,\n capitalize: () => true,\n },\n {\n key: spxCtrlUseCategories,\n type: () => SpxInputTypeEnum.hidden,\n capitalize: () => true,\n },\n {\n key: spxCtrlCategory,\n type: () => SpxInputTypeEnum.autocomplete,\n label: () => this.textCategory()!,\n capitalize: () => true,\n show: () => valuePairToValue(this.ctrlUseCategories()?.value),\n validators: () => valuePairToValue(this.ctrlUseCategories()?.value) ? [spxValidatorRequired()] : [],\n }\n ]\n }\n ]\n };\n\n readonly ctrlCategory = computed(() => this.formGroup()?.get(spxCtrlCategory) as FormControl);\n readonly ctrlCustomer = computed(() => this.formGroup()?.get(spxCtrlCustomer) as FormControl);\n readonly ctrlContainerType = computed(() => this.formGroup()?.get(spxCtrlContainerType) as FormControl);\n readonly ctrlLicensePlate = computed(() => this.formGroup()?.get(spxCtrlLicensePlate) as FormControl);\n readonly ctrlTonsTested = computed(() => this.formGroup()?.get(spxCtrlTonsTested) as FormControl);\n readonly ctrlUseCategories = computed(() => this.formGroup()?.get(spxCtrlUseCategories) as FormControl);\n\n private subContainerType?: Subscription;\n\n constructor() {\n effect(() => {\n if (\n this.showTonsTested()\n ) {\n this.ctrlTonsTested()?.addValidators([spxValidatorRequired()]);\n this.ctrlTonsTested()?.updateValueAndValidity();\n } else {\n this.ctrlTonsTested()?.clearValidators();\n this.ctrlTonsTested()?.updateValueAndValidity();\n }\n });\n }\n\n createForm(): FormGroup {\n return SpxFormViewComponent.createForm(\n this.form\n );\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 setTimeout(() => {\n if (data.field.key === spxCtrlCategory && valuePairToValue(this.formGroup()!.get(spxCtrlCategory)!.value) !== null) {\n this.spxBlurCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType && valuePairToValue(this.formGroup()!.get(spxCtrlContainerType)!.value) !== null) {\n this.spxBlurContainerType.emit(data.valuePair);\n }\n }, 300);\n }\n\n onSearch(data: { field: SpxFormFieldI; valuePair: SpxValuePair<any> }) {\n if (data.field.key === spxCtrlCategory) {\n this.spxSearchCategory.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlContainerType) {\n this.spxSearchContainerType.emit(data.valuePair);\n }\n if (data.field.key === spxCtrlTonsTested) {\n this.spxSearchTonsTested.emit(data.valuePair);\n }\n }\n\n onSubmit(): void {\n this.submit.emit({\n category: valuePairToValue(this.ctrlUseCategories().value) ? this.ctrlCategory().value : null,\n containerType: this.ctrlContainerType().value,\n licensePlate: this.ctrlLicensePlate().value,\n tonsTested: this.ctrlTonsTested().value,\n })\n }\n\n private listenToContainerType(): void {\n this.subContainerType = this.ctrlContainerType().valueChanges.subscribe(valuePair => {\n this.ctrlTonsTested().setValue({ value: null });\n this.spxSearchTonsTested.emit(valuePair);\n });\n }\n}\n","<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\" (ngSubmit)=\"onSubmit()\">\n <spx-form-view\n [spxFormGroup]=\"formGroup()!\"\n [spxForm]=\"form\"\n [spxSuggestions]=\"suggestions()\"\n (spxBlur)=\"onBlur($event)\"\n (spxSearch)=\"onSearch($event)\">\n </spx-form-view>\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAeO,MAAM,uBAAuB,GAAG;AAChC,MAAM,sBAAsB,GAAG;AAC/B,MAAM,qBAAqB,GAAG;AAC9B,MAAM,oBAAoB,GAAG;AAC7B,MAAM,eAAe,GAAG;AACxB,MAAM,iBAAiB,GAAG;AAC1B,MAAM,mBAAmB,GAAG;AAC5B,MAAM,eAAe,GAAG;AACxB,MAAM,oBAAoB,GAAG;MAavB,yBAAyB,CAAA;AAqGpC,IAAA,WAAA,GAAA;QApGS,IAAS,CAAA,SAAA,GAAG,KAAK,EAAa;QAC9B,IAAW,CAAA,WAAA,GAAG,KAAK,EAAO;AAClB,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MACzC,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC;YACvC,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC,MAAM;AAC9C,YAAA,IAAI,CAAC,WAAW,EAAE,GAAG,iBAAiB,CAAC,CAAC,MAAM,GAAG,CAAC,CACnD;QACQ,IAAY,CAAA,YAAA,GAAG,KAAK,EAAU;QAC9B,IAAmB,CAAA,mBAAA,GAAG,KAAK,EAAU;QACrC,IAAiB,CAAA,iBAAA,GAAG,KAAK,EAAU;QACnC,IAAY,CAAA,YAAA,GAAG,KAAK,EAAU;QAC9B,IAAgB,CAAA,gBAAA,GAAG,KAAK,EAAU;QAClC,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU;QAC1B,IAAc,CAAA,cAAA,GAAG,KA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,QAAA,EAAA,8CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,0FAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,mBAAmB,gLACnB,oBAAoB,EAAA,QAAA,EAAA,eAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,EAAA,UAAA,EAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKX,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,oBAAoB,EAErB,OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,oBAAoB;AACrB,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,eAAA,EACC,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2UAAA,EAAA;;;AElCjD;;AAEG;;;;"}
@@ -114,10 +114,10 @@ class SpxChannelIndicatorComponent {
114
114
  canShowChannelType() {
115
115
  return Capacitor.getPlatform() !== 'web';
116
116
  }
117
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxChannelIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
118
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.1", type: SpxChannelIndicatorComponent, isStandalone: true, selector: "spx-channel-indicator", ngImport: i0, 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 @if (canShowChannelType() && channelType() !== 'Production') {\n <div class=\"text-base text-gray-600\">{{ channelType() }}</div>\n }\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ spxTextChange | translate | capitalize }}</spx-button>\n</div>", dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
117
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxChannelIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
118
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SpxChannelIndicatorComponent, isStandalone: true, selector: "spx-channel-indicator", ngImport: i0, 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 @if (canShowChannelType() && channelType() !== 'Production') {\n <div class=\"text-base text-gray-600\">{{ channelType() }}</div>\n }\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ spxTextChange | translate | capitalize }}</spx-button>\n</div>", dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "pipe", type: SpxCapitalizePipe, name: "capitalize" }, { kind: "pipe", type: TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
119
119
  }
120
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxChannelIndicatorComponent, decorators: [{
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxChannelIndicatorComponent, decorators: [{
121
121
  type: Component,
122
122
  args: [{ selector: 'spx-channel-indicator', imports: [
123
123
  SpxButtonComponent,
@@ -138,10 +138,10 @@ class SpxChannelGuard {
138
138
  }
139
139
  return true;
140
140
  }
141
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxChannelGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
142
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxChannelGuard, providedIn: 'root' }); }
141
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxChannelGuard, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
142
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxChannelGuard, providedIn: 'root' }); }
143
143
  }
144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxChannelGuard, decorators: [{
144
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxChannelGuard, decorators: [{
145
145
  type: Injectable,
146
146
  args: [{
147
147
  providedIn: 'root'
@@ -156,8 +156,8 @@ class Effects {
156
156
  this.onChoose$ = createEffect(() => this.actions$.pipe(ofType(choose), switchMap((action) => {
157
157
  if (Capacitor.getPlatform() === 'web') {
158
158
  const channelType = action.channel.channelTypes.find(channelType => channelType.name === action.channelType);
159
- console.log('window.location.href', window.location.href, window.location.href.replace(channelType.webUrl, '').split('/').at(0));
160
- if (channelType.webUrl && window.location.href.replace(channelType.webUrl, '').split('/').at(0) !== '') {
159
+ console.log('window.location.href', window.location.href);
160
+ if (channelType.webUrl && window.location.href.replace(channelType.webUrl, '').split('/').at(0) !== channelType.webUrl) {
161
161
  window.location.href = channelType.webUrl;
162
162
  }
163
163
  else {
@@ -182,10 +182,10 @@ class Effects {
182
182
  })];
183
183
  })), { dispatch: true });
184
184
  }
185
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: Effects, deps: [{ token: i1.Actions }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
186
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: Effects }); }
185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: Effects, deps: [{ token: i1.Actions }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable }); }
186
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: Effects }); }
187
187
  }
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: Effects, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: Effects, decorators: [{
189
189
  type: Injectable
190
190
  }], ctorParameters: () => [{ type: i1.Actions }, { type: i2.Router }] });
191
191
 
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.actions.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.reducer.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.html","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-guard.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.effects.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\n\nexport const choose = createAction('[SPX / Channel] Select', props<{\n channel: SpxAppChannelI;\n channelType: SpxAppChannelTypeEnum;\n}>());\nexport const initialize = createAction('[SPX / Channel] Initialize', props<{\n channels: SpxAppChannelI[];\n}>());\n\nconst all = union({\n choose,\n initialize,\n});\n\nexport type Actions = typeof all;\n","\nimport * as actions from './spx-channel.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum, SpxChannelTypeI } from '@softpak/components/spx-app-configuration';\nimport { Capacitor } from '@capacitor/core';\n\nexport const initialState: StateI = {\n previousChannel: null,\n channel: null,\n channelType: null,\n channels: [],\n};\n\nexport interface StateI {\n previousChannel: SpxAppChannelI | null;\n channel: SpxAppChannelI | null;\n channels: SpxAppChannelI[];\n channelType: SpxChannelTypeI | null;\n}\n\nconst determineActiveChannel = (channels: SpxAppChannelI[]): SpxAppChannelI | null => {\n if (SpxStorage.getSetting(SpxStorageKeyEnum.brand) && SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n const channelResult = channels.find(channel => channel.brand === SpxStorage.getSetting(SpxStorageKeyEnum.brand) && channel.channelTypes.some((e: SpxChannelTypeI) => e.name === SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum));\n if (channelResult) {\n return channelResult;\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n } else {\n SpxStorage.clearSetting(SpxStorageKeyEnum.brand);\n return null;\n }\n }\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n }\n return null;\n }\n}\n\nexport default createFeature({\n name: 'spxChannel',\n reducer: createReducer(\n initialState,\n on(actions.choose, (state, { channel, channelType }): StateI => {\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand, channel?.brand);\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType, channelType);\n return {\n ...state,\n previousChannel: state.channel,\n channel,\n };\n }),\n on(actions.initialize, (state, { channels }): StateI => {\n\n let channelType: SpxChannelTypeI | null = null;\n\n if (SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n channelType = { name: SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum };\n }\n else {\n channelType = { name: Capacitor.getPlatform() === 'web' ? SpxAppChannelTypeEnum.webLive : SpxAppChannelTypeEnum.production }; // Default to production if no type is set\n }\n\n return {\n ...state,\n channel: determineActiveChannel(channels),\n channels: channels.slice().sort((a, b) => a.brand.localeCompare(b.brand)),\n channelType: channelType,\n }\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport spxChannelReducer from '../../store/spx-channel.reducer';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextChange } from '@softpak/components/spx-translate';\nimport { NavController } from '@ionic/angular';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { map } from 'rxjs';\nimport { Capacitor } from '@capacitor/core';\nexport const spxChannelSelectionUrl = 'wlc';\n\n@Component({\n selector: 'spx-channel-indicator',\n templateUrl: './spx-channel-indicator.component.html',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxChannelIndicatorComponent {\n private readonly navController = inject(NavController);\n private readonly store = inject(Store);\n protected readonly channel = toSignal(this.store.select(spxChannelReducer.selectChannel));\n protected readonly channelType = toSignal(this.store.select(spxChannelReducer.selectChannelType).pipe(\n map(channelType => channelType?.name)\n ));\n protected readonly spxTextChange = spxTextChange;\n\n protected onChange() {\n this.navController.navigateRoot([spxChannelSelectionUrl]);\n }\n\n protected canShowChannelType() {\n return Capacitor.getPlatform() !== 'web';\n }\n}\n","<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 @if (canShowChannelType() && channelType() !== 'Production') {\n <div class=\"text-base text-gray-600\">{{ channelType() }}</div>\n }\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ spxTextChange | translate | capitalize }}</spx-button>\n</div>","import { Router } from '@angular/router';\nimport { inject, Injectable } from '@angular/core';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { spxChannelSelectionUrl } from './spx-channel-indicator/spx-channel-indicator.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SpxChannelGuard {\n\n private readonly router = inject(Router);\n\n canActivate(): boolean {\n if (\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand) ||\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType)\n ) {\n this.router.navigate([spxChannelSelectionUrl]);\n return false;\n }\n return true;\n }\n}\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { switchMap, withLatestFrom } from 'rxjs/operators';\nimport { inject, Injectable } from '@angular/core';\nimport * as actions from './spx-channel.actions';\nimport { setConfig } from '@capacitor/live-updates';\nimport { Capacitor } from '@capacitor/core';\nimport { Router } from '@angular/router';\nimport { spxUpdateUrl } from '@softpak/components/spx-update';\nimport { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';\nimport { captureMessage } from '@sentry/angular';\nimport { App } from '@capacitor/app';\nimport { Store } from '@ngrx/store';\n\n@Injectable()\nexport class Effects {\n store = inject(Store);\n\n onChoose$ =\n createEffect(() =>\n this.actions$.pipe(\n ofType(actions.choose),\n switchMap((action) => {\n if (Capacitor.getPlatform() === 'web') {\n const channelType = action.channel.channelTypes.find(channelType => channelType.name === action.channelType)!;\n console.log('window.location.href', window.location.href, window.location.href.replace(channelType.webUrl!,'').split('/').at(0));\n if (channelType.webUrl && window.location.href.replace(channelType.webUrl!,'').split('/').at(0) !== '') {\n window.location.href = channelType.webUrl!;\n } else {\n this.router.navigate(['tabs/hme']);\n }\n } else {\n App.getInfo().then((binaryInfo) => {\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\n setConfig({\n channel: `${action.channelType}-${binaryVersionGroup}.x`\n });\n this.router.navigate([spxUpdateUrl]);\n }).catch((err) => {\n captureMessage(`SPX Channel Error: ${JSON.stringify(err)}`);\n this.router.navigate([spxUpdateUrl]);\n });\n }\n\n return [spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n })];\n }),\n ), { dispatch: true });\n\n constructor(\n private readonly actions$: Actions,\n private readonly router: Router,\n ) { }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.choose","actions.initialize","spxChannelReducer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,MAAM,GAAG,YAAY,CAAC,wBAAwB,EAAE,KAAK,EAG9D,CAAC;AACE,MAAM,UAAU,GAAG,YAAY,CAAC,4BAA4B,EAAE,KAAK,EAEtE,CAAC;AAEL,MAAM,GAAG,GAAG,KAAK,CAAC;IACd,MAAM;IACN,UAAU;AACb,CAAA,CAAC;;;;;;;;ACPK,MAAM,YAAY,GAAW;AAClC,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,EAAE;CACb;AASD,MAAM,sBAAsB,GAAG,CAAC,QAA0B,KAA2B;AACnF,IAAA,IAAI,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC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S,CAAC,GAAG,CAAC,CAAE,CAAA,CAAC;oBAC3D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,CAAC;AACxC,iBAAC,CAAC;;AAGN,YAAA,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC;oBACpC,SAAS,EAAE,4BAA4B,CAAC,OAAO;AAC/C,oBAAA,WAAW,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK;AACrC,iBAAA,CAAC,CAAC;SACN,CAAC,CACL,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;8GAlCrB,OAAO,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;kHAAP,OAAO,EAAA,CAAA,CAAA;;2FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-channel-selection.mjs","sources":["../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.actions.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.reducer.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.ts","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-indicator/spx-channel-indicator.component.html","../../../../projects/softpak/components/spx-channel-selection/src/spx-channel-guard.ts","../../../../projects/softpak/components/spx-channel-selection/store/spx-channel.effects.ts","../../../../projects/softpak/components/spx-channel-selection/softpak-components-spx-channel-selection.ts"],"sourcesContent":["import { createAction, props, union } from '@ngrx/store';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum } from '@softpak/components/spx-app-configuration';\n\nexport const choose = createAction('[SPX / Channel] Select', props<{\n channel: SpxAppChannelI;\n channelType: SpxAppChannelTypeEnum;\n}>());\nexport const initialize = createAction('[SPX / Channel] Initialize', props<{\n channels: SpxAppChannelI[];\n}>());\n\nconst all = union({\n choose,\n initialize,\n});\n\nexport type Actions = typeof all;\n","\nimport * as actions from './spx-channel.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { SpxAppChannelI, SpxAppChannelTypeEnum, SpxChannelTypeI } from '@softpak/components/spx-app-configuration';\nimport { Capacitor } from '@capacitor/core';\n\nexport const initialState: StateI = {\n previousChannel: null,\n channel: null,\n channelType: null,\n channels: [],\n};\n\nexport interface StateI {\n previousChannel: SpxAppChannelI | null;\n channel: SpxAppChannelI | null;\n channels: SpxAppChannelI[];\n channelType: SpxChannelTypeI | null;\n}\n\nconst determineActiveChannel = (channels: SpxAppChannelI[]): SpxAppChannelI | null => {\n if (SpxStorage.getSetting(SpxStorageKeyEnum.brand) && SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n const channelResult = channels.find(channel => channel.brand === SpxStorage.getSetting(SpxStorageKeyEnum.brand) && channel.channelTypes.some((e: SpxChannelTypeI) => e.name === SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum));\n if (channelResult) {\n return channelResult;\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n } else {\n SpxStorage.clearSetting(SpxStorageKeyEnum.brand);\n return null;\n }\n }\n } else {\n const defaultBrandResult = channels.find(channel => channel.default);\n if (defaultBrandResult) {\n return defaultBrandResult;\n }\n return null;\n }\n}\n\nexport default createFeature({\n name: 'spxChannel',\n reducer: createReducer(\n initialState,\n on(actions.choose, (state, { channel, channelType }): StateI => {\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand, channel?.brand);\n SpxStorage.setSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType, channelType);\n return {\n ...state,\n previousChannel: state.channel,\n channel,\n };\n }),\n on(actions.initialize, (state, { channels }): StateI => {\n\n let channelType: SpxChannelTypeI | null = null;\n\n if (SpxStorage.getSetting(SpxStorageKeyEnum.channelType)) {\n channelType = { name: SpxStorage.getSetting(SpxStorageKeyEnum.channelType) as SpxAppChannelTypeEnum };\n }\n else {\n channelType = { name: Capacitor.getPlatform() === 'web' ? SpxAppChannelTypeEnum.webLive : SpxAppChannelTypeEnum.production }; // Default to production if no type is set\n }\n\n return {\n ...state,\n channel: determineActiveChannel(channels),\n channels: channels.slice().sort((a, b) => a.brand.localeCompare(b.brand)),\n channelType: channelType,\n }\n }),\n ),\n});\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport spxChannelReducer from '../../store/spx-channel.reducer';\nimport { TranslatePipe } from '@ngx-translate/core';\nimport { SpxCapitalizePipe } from '@softpak/components/spx-capitalize';\nimport { spxTextChange } from '@softpak/components/spx-translate';\nimport { NavController } from '@ionic/angular';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { map } from 'rxjs';\nimport { Capacitor } from '@capacitor/core';\nexport const spxChannelSelectionUrl = 'wlc';\n\n@Component({\n selector: 'spx-channel-indicator',\n templateUrl: './spx-channel-indicator.component.html',\n imports: [\n SpxButtonComponent,\n SpxCapitalizePipe,\n TranslatePipe,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxChannelIndicatorComponent {\n private readonly navController = inject(NavController);\n private readonly store = inject(Store);\n protected readonly channel = toSignal(this.store.select(spxChannelReducer.selectChannel));\n protected readonly channelType = toSignal(this.store.select(spxChannelReducer.selectChannelType).pipe(\n map(channelType => channelType?.name)\n ));\n protected readonly spxTextChange = spxTextChange;\n\n protected onChange() {\n this.navController.navigateRoot([spxChannelSelectionUrl]);\n }\n\n protected canShowChannelType() {\n return Capacitor.getPlatform() !== 'web';\n }\n}\n","<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 @if (canShowChannelType() && channelType() !== 'Production') {\n <div class=\"text-base text-gray-600\">{{ channelType() }}</div>\n }\n </div>\n <spx-button (click)=\"onChange()\" [spxType]=\"'button'\">{{ spxTextChange | translate | capitalize }}</spx-button>\n</div>","import { Router } from '@angular/router';\nimport { inject, Injectable } from '@angular/core';\nimport { SpxStorage, SpxStorageKeyEnum } from '@softpak/components/spx-storage';\nimport { spxChannelSelectionUrl } from './spx-channel-indicator/spx-channel-indicator.component';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class SpxChannelGuard {\n\n private readonly router = inject(Router);\n\n canActivate(): boolean {\n if (\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.brand) ||\n !SpxStorage.getSetting<SpxStorageKeyEnum>(SpxStorageKeyEnum.channelType)\n ) {\n this.router.navigate([spxChannelSelectionUrl]);\n return false;\n }\n return true;\n }\n}\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { switchMap, withLatestFrom } from 'rxjs/operators';\nimport { inject, Injectable } from '@angular/core';\nimport * as actions from './spx-channel.actions';\nimport { setConfig } from '@capacitor/live-updates';\nimport { Capacitor } from '@capacitor/core';\nimport { Router } from '@angular/router';\nimport { spxUpdateUrl } from '@softpak/components/spx-update';\nimport { spxToasterActions, SpxToasterAutoCloseSpeedEnum } from '@softpak/components/spx-toaster';\nimport { captureMessage } from '@sentry/angular';\nimport { App } from '@capacitor/app';\nimport { Store } from '@ngrx/store';\n\n@Injectable()\nexport class Effects {\n store = inject(Store);\n\n onChoose$ =\n createEffect(() =>\n this.actions$.pipe(\n ofType(actions.choose),\n switchMap((action) => {\n if (Capacitor.getPlatform() === 'web') {\n const channelType = action.channel.channelTypes.find(channelType => channelType.name === action.channelType)!;\n console.log('window.location.href', window.location.href);\n if (channelType.webUrl && window.location.href.replace(channelType.webUrl!,'').split('/').at(0) !== channelType.webUrl) {\n window.location.href = channelType.webUrl!;\n } else {\n this.router.navigate(['tabs/hme']);\n }\n } else {\n App.getInfo().then((binaryInfo) => {\n const binaryVersionGroup = binaryInfo.version.substring(0, 3);\n setConfig({\n channel: `${action.channelType}-${binaryVersionGroup}.x`\n });\n this.router.navigate([spxUpdateUrl]);\n }).catch((err) => {\n captureMessage(`SPX Channel Error: ${JSON.stringify(err)}`);\n this.router.navigate([spxUpdateUrl]);\n });\n }\n\n return [spxToasterActions.createSuccess({\n autoClose: SpxToasterAutoCloseSpeedEnum.DEFAULT,\n messageText: action.channel?.brand,\n })];\n }),\n ), { dispatch: true });\n\n constructor(\n private readonly actions$: Actions,\n private readonly router: Router,\n ) { }\n}\n\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["actions.choose","actions.initialize","spxChannelReducer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAGO,MAAM,MAAM,GAAG,YAAY,CAAC,wBAAwB,EAAE,KAAK,EAG9D,CAAC;AACE,MAAM,UAAU,GAAG,YAAY,CAAC,4BAA4B,EAAE,KAAK,EAEtE,CAAC;AAEL,MAAM,GAAG,GAAG,KAAK,CAAC;IACd,MAAM;IACN,UAAU;AACb,CAAA,CAAC;;;;;;;;ACPK,MAAM,YAAY,GAAW;AAClC,IAAA,eAAe,EAAE,IAAI;AACrB,IAAA,OAAO,EAAE,IAAI;AACb,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,QAAQ,EAAE,EAAE;CACb;AASD,MAAM,sBAAsB,GAAG,CAAC,QAA0B,KAA2B;AACnF,IAAA,IAAI,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,IAAI,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,EAAE;QAC1G,MAAM,aAAa,GAAG,QAAQ,CAAC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,KAAK,KAAK,UAAU,CAAC,UAAU,CAAC,iBAAiB,CAAC,KAAK,CAAC,I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EAAE,CAAC;;+GAlCrB,OAAO,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,OAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;mHAAP,OAAO,EAAA,CAAA,CAAA;;4FAAP,OAAO,EAAA,UAAA,EAAA,CAAA;kBADnB;;;;;;;;ACbD;;AAEG;;;;"}
@@ -73,10 +73,10 @@ class SpxCheckDigitComponent {
73
73
  getRawValidators(formControl) {
74
74
  return formControl._rawValidators;
75
75
  }
76
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxCheckDigitComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
77
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.1", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: { classPropertyName: "txtCheckDigit", publicName: "txtCheckDigit", isSignal: true, isRequired: true, transformFunction: null }, txtContainer: { classPropertyName: "txtContainer", publicName: "txtContainer", isSignal: true, isRequired: true, transformFunction: null }, txtPrefix: { classPropertyName: "txtPrefix", publicName: "txtPrefix", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "ctrlContainerNumberRef", first: true, predicate: SpxInputComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n #ctrlContainerNumberRef\n [formControl]=\"ctrlContainerNumber()\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer()\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber() && ctrlContainerNumber().errors && ctrlContainerNumber().touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber())\">\n <spx-validate-control [errors]=\"ctrlContainerNumber().errors\" [touched]=\"ctrlContainerNumber().touched\" [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 [errors]=\"ctrlContainerPrefix().errors\" [touched]=\"ctrlContainerPrefix().touched\" [control]=\"ctrlContainerPrefix()\" [label]=\"txtPrefix()\"></spx-validate-control>\n </spx-input>\n @if (ctrlCheckDigit().value) {\n <spx-input\n [formControl]=\"ctrlCheckDigit()\"\n [spxLabel]=\"txtCheckDigit()\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n }\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxAlert", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "spxCapitalize"], outputs: ["spxClear", "spxEdit", "spxHelp", "spxSearch", "spxBlur"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried", "errors", "touched"] }] }); }
76
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxCheckDigitComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
77
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SpxCheckDigitComponent, isStandalone: true, selector: "spx-check-digit", inputs: { txtCheckDigit: { classPropertyName: "txtCheckDigit", publicName: "txtCheckDigit", isSignal: true, isRequired: true, transformFunction: null }, txtContainer: { classPropertyName: "txtContainer", publicName: "txtContainer", isSignal: true, isRequired: true, transformFunction: null }, txtPrefix: { classPropertyName: "txtPrefix", publicName: "txtPrefix", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "ctrlContainerNumberRef", first: true, predicate: SpxInputComponent, descendants: true, isSignal: true }], ngImport: i0, template: "<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n #ctrlContainerNumberRef\n [formControl]=\"ctrlContainerNumber()\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer()\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber() && ctrlContainerNumber().errors && ctrlContainerNumber().touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber())\">\n <spx-validate-control [errors]=\"ctrlContainerNumber().errors\" [touched]=\"ctrlContainerNumber().touched\" [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 [errors]=\"ctrlContainerPrefix().errors\" [touched]=\"ctrlContainerPrefix().touched\" [control]=\"ctrlContainerPrefix()\" [label]=\"txtPrefix()\"></spx-validate-control>\n </spx-input>\n @if (ctrlCheckDigit().value) {\n <spx-input\n [formControl]=\"ctrlCheckDigit()\"\n [spxLabel]=\"txtCheckDigit()\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n }\n</form>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: SpxInputComponent, selector: "spx-input", inputs: ["spxLabel", "spxMax", "spxMin", "spxName", "spxReadonly", "spxAutocomplete", "spxAutofocus", "spxInputMode", "spxPattern", "spxRequired", "spxSelectMonth", "spxSelectDay", "spxShowEdit", "spxShowHelp", "spxShowLabel", "spxCompact", "spxShowClear", "spxShowSearch", "spxAlert", "spxShowValidationMessages", "spxStep", "spxSuggestions", "spxType", "spxValidators", "spxCapitalize"], outputs: ["spxClear", "spxEdit", "spxHelp", "spxSearch", "spxBlur"] }, { kind: "component", type: SpxValidateControlComponent, selector: "spx-validate-control", inputs: ["control", "label", "submitTried", "errors", "touched"] }] }); }
78
78
  }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxCheckDigitComponent, decorators: [{
79
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxCheckDigitComponent, decorators: [{
80
80
  type: Component,
81
81
  args: [{ selector: 'spx-check-digit', imports: [
82
82
  FormsModule,
@@ -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, computed, input, signal, viewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\nimport { valuePairToValue, calcCheckDigit } from '@softpak/components/spx-helpers';\nimport { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidateControlComponent } from '@softpak/components/spx-validation';\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 imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n SpxValidateControlComponent,\n ]\n})\nexport class SpxCheckDigitComponent {\n readonly txtCheckDigit = input.required<string>();\n readonly txtContainer = input.required<string>();\n readonly txtPrefix = input.required<string>();\n ctrlContainerNumberRef = viewChild(SpxInputComponent);\n inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;\n inputTypeText = SpxInputTypeEnum.text;\n formGroup = signal<FormGroup | null>(null);\n ctrlCheckDigit = computed(() => this.formGroup()?.get(ctrlCheckDigit) as FormControl);\n ctrlContainerNumber = computed(() => this.formGroup()?.get(ctrlContainerNumber) as FormControl);\n ctrlContainerPrefix = computed(() => this.formGroup()?.get(ctrlPrefix) as FormControl);\n\n private inputChanges?: Subscription;\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.formGroup.set(this.formBuilder.group({\n [ctrlCheckDigit]: [null, []],\n [ctrlContainerNumber]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(6),\n spxValidatorMinLength(6),\n spxValidatorPattern(/[0-9]{6}/),\n ]],\n [ctrlPrefix]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(4),\n spxValidatorMinLength(4),\n spxValidatorPattern(/[a-zA-Z]{4}/),\n ]],\n }));\n }\n\n ngOnInit(): void {\n this.inputChanges = combineLatest([\n this.ctrlContainerNumber().valueChanges.pipe(startWith(this.ctrlContainerNumber().value)),\n this.ctrlContainerPrefix().valueChanges.pipe(startWith(this.ctrlContainerPrefix().value)),\n ])\n .pipe(map(([containerNumber$, prefix$]) => ({\n containerNumber: containerNumber$,\n prefix: prefix$\n })))\n .subscribe((v) => {\n if (this.ctrlContainerNumber().invalid || this.ctrlContainerPrefix().invalid) {\n this.ctrlCheckDigit().setValue(null, { emitEvent: false });\n } else {\n const prefix = valuePairToValue(this.ctrlContainerPrefix().value);\n const containerNumber = valuePairToValue(this.ctrlContainerNumber().value);\n const checkDigit = calcCheckDigit(`${prefix}${containerNumber}`);\n this.ctrlCheckDigit().setValue({ value: checkDigit }, { emitEvent: false });\n }\n });\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.ctrlContainerNumberRef()?.setFocusIn(); \n }, 250);\n }\n\n ngOnDestroy(): void {\n if (this.inputChanges) {\n this.inputChanges.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n}\n","<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n #ctrlContainerNumberRef\n [formControl]=\"ctrlContainerNumber()\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer()\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber() && ctrlContainerNumber().errors && ctrlContainerNumber().touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber())\">\n <spx-validate-control [errors]=\"ctrlContainerNumber().errors\" [touched]=\"ctrlContainerNumber().touched\" [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 [errors]=\"ctrlContainerPrefix().errors\" [touched]=\"ctrlContainerPrefix().touched\" [control]=\"ctrlContainerPrefix()\" [label]=\"txtPrefix()\"></spx-validate-control>\n </spx-input>\n @if (ctrlCheckDigit().value) {\n <spx-input\n [formControl]=\"ctrlCheckDigit()\"\n [spxLabel]=\"txtCheckDigit()\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n }\n</form>","/**\n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A,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,SAAA,EAAA,aAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,cAAA,EAAA,YAAA,EAAA,aAAA,EAAA,gBAAA,EAAA,cAAA,EAAA,aAAA,EAAA,aAAA,EAAA,cAAA,EAAA,YAAA,EAAA,cAAA,EAAA,eAAA,EAAA,UAAA,EAAA,2BAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,SAAA,EAAA,eAAA,EAAA,eAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,SAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EACjB,2BAA2B,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,OAAA,EAAA,aAAA,EAAA,QAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;2FAGtB,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAVlC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAElB,OAAA,EAAA;wBACL,WAAW;wBACX,mBAAmB;wBACnB,iBAAiB;wBACjB,2BAA2B;AAC9B,qBAAA,EAAA,QAAA,EAAA,kjDAAA,EAAA;;;AEnBL;;AAEG;;;;"}
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, computed, input, signal, viewChild } from '@angular/core';\nimport { FormBuilder, FormControl, FormGroup, FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { Subscription, combineLatest, map, startWith } from 'rxjs';\nimport { valuePairToValue, calcCheckDigit } from '@softpak/components/spx-helpers';\nimport { SpxInputComponent, SpxInputTypeEnum } from '@softpak/components/spx-inputs';\nimport { spxValidatorRequired, spxValidatorMaxLength, spxValidatorMinLength, spxValidatorPattern, SpxValidateControlComponent } from '@softpak/components/spx-validation';\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 imports: [\n FormsModule,\n ReactiveFormsModule,\n SpxInputComponent,\n SpxValidateControlComponent,\n ]\n})\nexport class SpxCheckDigitComponent {\n readonly txtCheckDigit = input.required<string>();\n readonly txtContainer = input.required<string>();\n readonly txtPrefix = input.required<string>();\n ctrlContainerNumberRef = viewChild(SpxInputComponent);\n inputTypeOverlayNumber = SpxInputTypeEnum.overlayNumber;\n inputTypeText = SpxInputTypeEnum.text;\n formGroup = signal<FormGroup | null>(null);\n ctrlCheckDigit = computed(() => this.formGroup()?.get(ctrlCheckDigit) as FormControl);\n ctrlContainerNumber = computed(() => this.formGroup()?.get(ctrlContainerNumber) as FormControl);\n ctrlContainerPrefix = computed(() => this.formGroup()?.get(ctrlPrefix) as FormControl);\n\n private inputChanges?: Subscription;\n\n constructor(\n private readonly formBuilder: FormBuilder,\n ) {\n this.formGroup.set(this.formBuilder.group({\n [ctrlCheckDigit]: [null, []],\n [ctrlContainerNumber]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(6),\n spxValidatorMinLength(6),\n spxValidatorPattern(/[0-9]{6}/),\n ]],\n [ctrlPrefix]: [null, [\n spxValidatorRequired(),\n spxValidatorMaxLength(4),\n spxValidatorMinLength(4),\n spxValidatorPattern(/[a-zA-Z]{4}/),\n ]],\n }));\n }\n\n ngOnInit(): void {\n this.inputChanges = combineLatest([\n this.ctrlContainerNumber().valueChanges.pipe(startWith(this.ctrlContainerNumber().value)),\n this.ctrlContainerPrefix().valueChanges.pipe(startWith(this.ctrlContainerPrefix().value)),\n ])\n .pipe(map(([containerNumber$, prefix$]) => ({\n containerNumber: containerNumber$,\n prefix: prefix$\n })))\n .subscribe((v) => {\n if (this.ctrlContainerNumber().invalid || this.ctrlContainerPrefix().invalid) {\n this.ctrlCheckDigit().setValue(null, { emitEvent: false });\n } else {\n const prefix = valuePairToValue(this.ctrlContainerPrefix().value);\n const containerNumber = valuePairToValue(this.ctrlContainerNumber().value);\n const checkDigit = calcCheckDigit(`${prefix}${containerNumber}`);\n this.ctrlCheckDigit().setValue({ value: checkDigit }, { emitEvent: false });\n }\n });\n }\n\n ngAfterViewInit(): void {\n setTimeout(() => {\n this.ctrlContainerNumberRef()?.setFocusIn(); \n }, 250);\n }\n\n ngOnDestroy(): void {\n if (this.inputChanges) {\n this.inputChanges.unsubscribe();\n }\n }\n\n getRawValidators(formControl: FormControl) {\n return (formControl as any)._rawValidators;\n }\n}\n","<form [formGroup]=\"formGroup()!\" class=\"max-w-lg mx-auto flex flex-col gap-3\">\n <spx-input\n #ctrlContainerNumberRef\n [formControl]=\"ctrlContainerNumber()\"\n [spxAutofocus]=\"true\"\n [spxCapitalize]=\"true\"\n [spxLabel]=\"txtContainer()\"\n [spxPattern]=\"'[0-9]*'\"\n [spxRequired]=\"true\"\n [spxShowValidationMessages]=\"ctrlContainerNumber() && ctrlContainerNumber().errors && ctrlContainerNumber().touched\"\n [spxType]=\"inputTypeOverlayNumber\"\n [spxValidators]=\"getRawValidators(ctrlContainerNumber())\">\n <spx-validate-control [errors]=\"ctrlContainerNumber().errors\" [touched]=\"ctrlContainerNumber().touched\" [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 [errors]=\"ctrlContainerPrefix().errors\" [touched]=\"ctrlContainerPrefix().touched\" [control]=\"ctrlContainerPrefix()\" [label]=\"txtPrefix()\"></spx-validate-control>\n </spx-input>\n @if (ctrlCheckDigit().value) {\n <spx-input\n [formControl]=\"ctrlCheckDigit()\"\n [spxLabel]=\"txtCheckDigit()\"\n [spxReadonly]=\"true\"\n [spxType]=\"inputTypeText\">\n </spx-input>\n }\n</form>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAOA,MAAM,cAAc,GAAG,YAAY;AACnC,MAAM,mBAAmB,GAAG,iBAAiB;AAC7C,MAAM,UAAU,GAAG,QAAQ;MAYd,sBAAsB,CAAA;AAcjC,IAAA,WAAA,CACmB,WAAwB,EAAA;QAAxB,IAAW,CAAA,WAAA,GAAX,WAAW;AAdrB,QAAA,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,QAAQ,EAAU;AACxC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAC,QAAQ,EAAU;AACvC,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAU;AAC7C,QAAA,IAAA,CAAA,sBAAsB,GAAG,SAAS,CAAC,iBAAiB,CAAC;AACrD,QAAA,IAAA,CAAA,sBAAsB,GAAG,gBAAgB,CAAC,aAAa;AACvD,QAAA,IAAA,CAAA,aAAa,GAAG,gBAAgB,CAAC,IAAI;AACrC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAmB,IAAI,CAAC;AAC1C,QAAA,IAAA,CAAA,cAAc,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,CAAC,cAAc,CAAgB,CAAC;AACrF,QAAA,IAAA,CAAA,mBAAmB,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,SAAS,EAAE,EAAE,GAAG,CAAC,mBAAmB,CAAgB,CAAC;AAC/F,QAAA,IAAA,CAA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  }
31
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
32
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.0.1", type: SpxConfirmComponent, isStandalone: true, selector: "spx-confirm", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { spxCancel: "spxCancel", spxConfirm: "spxConfirm" }, ngImport: i0, template: "<div class=\"block spx-confirm h-full mt-12\">\n <div class=\"bg-amber-400 flex gap-3 items-center px-3 py-1 rounded-t text-black\">\n <div class=\"grow font-bold\">\n <ng-content select=\"[confirm__title]\"></ng-content>\n </div>\n <spx-button (spxClick)=\"onCancel()\" [spxType]=\"'button'\" [spxSeverity]=\"severityInfo\"><fa-icon\n [icon]=\"faTimes\"></fa-icon>\n </spx-button>\n </div>\n <div class=\"flex flex-col gap-3 dark:bg-gray-700 bg-white p-3\">\n <ng-content select=\"[confirm__content]\"></ng-content>\n <div class=\"grid grid-cols-1 grid-rows-2 sm:grid-rows-1 sm:grid-cols-2 gap-3 grid-flow-row\">\n <spx-button (spxClick)=\"onCancel()\" [spxFullWidth]=\"true\" [spxType]=\"'button'\"\n [spxSeverity]=\"severityError\">\n <ng-content select=\"[confirm__btn_cancel]\"></ng-content>\n </spx-button>\n <spx-button #confirm (spxClick)=\"onConfirm()\" [spxFullWidth]=\"true\" [spxType]=\"'submit'\"\n [spxSeverity]=\"severitySuccess\">\n <ng-content select=\"[confirm__btn_confirm]\"></ng-content>\n </spx-button>\n </div>\n </div>\n</div>", styles: [":host{position:absolute;z-index:var(--z-index--confirm);top:0;left:0;right:0;background-color:var(--color--backdrop)}.spx-confirm{background-color:var(--color--item--background);border-radius:3px;color:var(--ion-text-color, #000);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:90%;max-width:960px}\n"], dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"], outputs: ["iconChange", "titleChange", "animationChange", "maskChange", "flipChange", "sizeChange", "pullChange", "borderChange", "inverseChange", "symbolChange", "rotateChange", "fixedWidthChange", "transformChange", "a11yRoleChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxConfirmComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
32
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.11", type: SpxConfirmComponent, isStandalone: true, selector: "spx-confirm", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { spxCancel: "spxCancel", spxConfirm: "spxConfirm" }, ngImport: i0, template: "<div class=\"block spx-confirm h-full mt-12\">\n <div class=\"bg-amber-400 flex gap-3 items-center px-3 py-1 rounded-t text-black\">\n <div class=\"grow font-bold\">\n <ng-content select=\"[confirm__title]\"></ng-content>\n </div>\n <spx-button (spxClick)=\"onCancel()\" [spxType]=\"'button'\" [spxSeverity]=\"severityInfo\"><fa-icon\n [icon]=\"faTimes\"></fa-icon>\n </spx-button>\n </div>\n <div class=\"flex flex-col gap-3 dark:bg-gray-700 bg-white p-3\">\n <ng-content select=\"[confirm__content]\"></ng-content>\n <div class=\"grid grid-cols-1 grid-rows-2 sm:grid-rows-1 sm:grid-cols-2 gap-3 grid-flow-row\">\n <spx-button (spxClick)=\"onCancel()\" [spxFullWidth]=\"true\" [spxType]=\"'button'\"\n [spxSeverity]=\"severityError\">\n <ng-content select=\"[confirm__btn_cancel]\"></ng-content>\n </spx-button>\n <spx-button #confirm (spxClick)=\"onConfirm()\" [spxFullWidth]=\"true\" [spxType]=\"'submit'\"\n [spxSeverity]=\"severitySuccess\">\n <ng-content select=\"[confirm__btn_confirm]\"></ng-content>\n </spx-button>\n </div>\n </div>\n</div>", styles: [":host{position:absolute;z-index:var(--z-index--confirm);top:0;left:0;right:0;background-color:var(--color--backdrop)}.spx-confirm{background-color:var(--color--item--background);border-radius:3px;color:var(--ion-text-color, #000);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:90%;max-width:960px}\n"], dependencies: [{ kind: "component", type: SpxButtonComponent, selector: "spx-button", inputs: ["spxDisabled", "spxClass", "spxClassObject", "spxForm", "spxFullHeight", "spxFullWidth", "spxSeverity", "spxSize", "spxTabIndex", "spxType"], outputs: ["spxClick"] }, { kind: "component", type: FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "mask", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "transform", "a11yRole"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
33
33
  }
34
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxConfirmComponent, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxConfirmComponent, decorators: [{
35
35
  type: Component,
36
36
  args: [{ selector: 'spx-confirm', imports: [SpxButtonComponent, FaIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div class=\"block spx-confirm h-full mt-12\">\n <div class=\"bg-amber-400 flex gap-3 items-center px-3 py-1 rounded-t text-black\">\n <div class=\"grow font-bold\">\n <ng-content select=\"[confirm__title]\"></ng-content>\n </div>\n <spx-button (spxClick)=\"onCancel()\" [spxType]=\"'button'\" [spxSeverity]=\"severityInfo\"><fa-icon\n [icon]=\"faTimes\"></fa-icon>\n </spx-button>\n </div>\n <div class=\"flex flex-col gap-3 dark:bg-gray-700 bg-white p-3\">\n <ng-content select=\"[confirm__content]\"></ng-content>\n <div class=\"grid grid-cols-1 grid-rows-2 sm:grid-rows-1 sm:grid-cols-2 gap-3 grid-flow-row\">\n <spx-button (spxClick)=\"onCancel()\" [spxFullWidth]=\"true\" [spxType]=\"'button'\"\n [spxSeverity]=\"severityError\">\n <ng-content select=\"[confirm__btn_cancel]\"></ng-content>\n </spx-button>\n <spx-button #confirm (spxClick)=\"onConfirm()\" [spxFullWidth]=\"true\" [spxType]=\"'submit'\"\n [spxSeverity]=\"severitySuccess\">\n <ng-content select=\"[confirm__btn_confirm]\"></ng-content>\n </spx-button>\n </div>\n </div>\n</div>", styles: [":host{position:absolute;z-index:var(--z-index--confirm);top:0;left:0;right:0;background-color:var(--color--backdrop)}.spx-confirm{background-color:var(--color--item--background);border-radius:3px;color:var(--ion-text-color, #000);position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:90%;max-width:960px}\n"] }]
37
37
  }], ctorParameters: () => [] });
@@ -66,10 +66,10 @@ class SpxConfirmDisplayerComponent {
66
66
  id
67
67
  }));
68
68
  }
69
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxConfirmDisplayerComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
70
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.1", type: SpxConfirmDisplayerComponent, isStandalone: true, selector: "spx-confirm-displayer", ngImport: i0, template: "@if (confirms().length > 0) {\n <div class=\"bg-black/75 block relative h-full\" style=\"z-index: 1000\">\n @for (confirm of confirms(); track confirm.id) {\n <spx-confirm [id]=\"confirm.id\" (spxCancel)=\"onCancel($event)\"\n (spxConfirm)=\"onConfirm($event)\">\n <ng-container confirm__title>{{ confirm.title }}</ng-container>\n <ng-container confirm__content>{{ confirm.content }}</ng-container>\n <ng-container confirm__btn_cancel>{{confirm.noYesButton ? 'NO' : 'Cancel'}}</ng-container>\n <ng-container confirm__btn_confirm>{{confirm.noYesButton ? 'YES' : 'OK'}}</ng-container>\n </spx-confirm>\n }\n </div>\n}", styles: [""], dependencies: [{ kind: "component", type: SpxConfirmComponent, selector: "spx-confirm", inputs: ["id"], outputs: ["spxCancel", "spxConfirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
69
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxConfirmDisplayerComponent, deps: [{ token: i1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
70
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SpxConfirmDisplayerComponent, isStandalone: true, selector: "spx-confirm-displayer", ngImport: i0, template: "@if (confirms().length > 0) {\n <div class=\"bg-black/75 block relative h-full\" style=\"z-index: 1000\">\n @for (confirm of confirms(); track confirm.id) {\n <spx-confirm [id]=\"confirm.id\" (spxCancel)=\"onCancel($event)\"\n (spxConfirm)=\"onConfirm($event)\">\n <ng-container confirm__title>{{ confirm.title }}</ng-container>\n <ng-container confirm__content>{{ confirm.content }}</ng-container>\n <ng-container confirm__btn_cancel>{{confirm.noYesButton ? 'NO' : 'Cancel'}}</ng-container>\n <ng-container confirm__btn_confirm>{{confirm.noYesButton ? 'YES' : 'OK'}}</ng-container>\n </spx-confirm>\n }\n </div>\n}", styles: [""], dependencies: [{ kind: "component", type: SpxConfirmComponent, selector: "spx-confirm", inputs: ["id"], outputs: ["spxCancel", "spxConfirm"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
71
71
  }
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxConfirmDisplayerComponent, decorators: [{
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxConfirmDisplayerComponent, decorators: [{
73
73
  type: Component,
74
74
  args: [{ selector: 'spx-confirm-displayer', imports: [SpxConfirmComponent], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@if (confirms().length > 0) {\n <div class=\"bg-black/75 block relative h-full\" style=\"z-index: 1000\">\n @for (confirm of confirms(); track confirm.id) {\n <spx-confirm [id]=\"confirm.id\" (spxCancel)=\"onCancel($event)\"\n (spxConfirm)=\"onConfirm($event)\">\n <ng-container confirm__title>{{ confirm.title }}</ng-container>\n <ng-container confirm__content>{{ confirm.content }}</ng-container>\n <ng-container confirm__btn_cancel>{{confirm.noYesButton ? 'NO' : 'Cancel'}}</ng-container>\n <ng-container confirm__btn_confirm>{{confirm.noYesButton ? 'YES' : 'OK'}}</ng-container>\n </spx-confirm>\n }\n </div>\n}" }]
75
75
  }], ctorParameters: () => [{ type: i1.Store }] });
@@ -147,10 +147,10 @@ class SpxConfirmEffects {
147
147
  ];
148
148
  })));
149
149
  }
150
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxConfirmEffects, deps: [{ token: i1$1.Actions }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
151
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxConfirmEffects }); }
150
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxConfirmEffects, deps: [{ token: i1$1.Actions }, { token: i1.Store }], target: i0.ɵɵFactoryTarget.Injectable }); }
151
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxConfirmEffects }); }
152
152
  }
153
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxConfirmEffects, decorators: [{
153
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxConfirmEffects, decorators: [{
154
154
  type: Injectable
155
155
  }], ctorParameters: () => [{ type: i1$1.Actions }, { type: i1.Store }] });
156
156
 
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-confirm.mjs","sources":["../../../../projects/softpak/components/spx-confirm/spx-confirm.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm.component.html","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.html","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.actions.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.reducer.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.effects.ts","../../../../projects/softpak/components/spx-confirm/softpak-components-spx-confirm.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-confirm',\n templateUrl: './spx-confirm.component.html',\n styleUrls: ['./spx-confirm.component.scss'],\n imports: [SpxButtonComponent, FaIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmComponent {\n id = input.required<string>();\n spxCancel = output<string>();\n spxConfirm = output<string>();\n faTimes = faTimes;\n severityError = SpxSeverityEnum.error;\n severityInfo = SpxSeverityEnum.info;\n severitySuccess = SpxSeverityEnum.success;\n\n constructor() { }\n\n onCancel() {\n this.spxCancel.emit(this.id());\n }\n\n onConfirm() {\n if(this.id()) {}\n this.spxConfirm.emit(this.id());\n }\n\n}\n","<div class=\"block spx-confirm h-full mt-12\">\n <div class=\"bg-amber-400 flex gap-3 items-center px-3 py-1 rounded-t text-black\">\n <div class=\"grow font-bold\">\n <ng-content select=\"[confirm__title]\"></ng-content>\n </div>\n <spx-button (spxClick)=\"onCancel()\" [spxType]=\"'button'\" [spxSeverity]=\"severityInfo\"><fa-icon\n [icon]=\"faTimes\"></fa-icon>\n </spx-button>\n </div>\n <div class=\"flex flex-col gap-3 dark:bg-gray-700 bg-white p-3\">\n <ng-content select=\"[confirm__content]\"></ng-content>\n <div class=\"grid grid-cols-1 grid-rows-2 sm:grid-rows-1 sm:grid-cols-2 gap-3 grid-flow-row\">\n <spx-button (spxClick)=\"onCancel()\" [spxFullWidth]=\"true\" [spxType]=\"'button'\"\n [spxSeverity]=\"severityError\">\n <ng-content select=\"[confirm__btn_cancel]\"></ng-content>\n </spx-button>\n <spx-button #confirm (spxClick)=\"onConfirm()\" [spxFullWidth]=\"true\" [spxType]=\"'submit'\"\n [spxSeverity]=\"severitySuccess\">\n <ng-content select=\"[confirm__btn_confirm]\"></ng-content>\n </spx-button>\n </div>\n </div>\n</div>","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, signal } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\nimport { SpxConfirmComponent } from '../spx-confirm.component';\nimport { spxConfirmActions, spxConfirmReducer } from '../public-api';\n\n@Component({\n selector: 'spx-confirm-displayer',\n templateUrl: './spx-confirm-displayer.component.html',\n styleUrls: ['./spx-confirm-displayer.component.scss'],\n imports: [SpxConfirmComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmDisplayerComponent implements OnInit, OnDestroy {\n confirms = signal<{\n content: string;\n id: string;\n title: string;\n cancelled?: boolean;\n confirmed?: boolean;\n noYesButton?: boolean;\n }[]>([]);\n\n private subscriptions: {\n confirmState?: Subscription;\n } = {};\n\n constructor(\n private readonly appStore: Store,\n ) { }\n\n ngOnInit() {\n this.subscriptions.confirmState = this.appStore.select(spxConfirmReducer.default.selectConfirms).subscribe(confirms => {\n if (confirms?.length === 0) {\n this.confirms.set([]);\n return;\n }\n\n this.confirms.set(confirms);\n });\n }\n\n ngOnDestroy() {\n this.subscriptions?.confirmState?.unsubscribe();\n }\n\n onCancel(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n cancel: true,\n id\n }));\n }\n\n onConfirm(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n confirm: true,\n id\n }));\n }\n\n}\n","@if (confirms().length > 0) {\n <div class=\"bg-black/75 block relative h-full\" style=\"z-index: 1000\">\n @for (confirm of confirms(); track confirm.id) {\n <spx-confirm [id]=\"confirm.id\" (spxCancel)=\"onCancel($event)\"\n (spxConfirm)=\"onConfirm($event)\">\n <ng-container confirm__title>{{ confirm.title }}</ng-container>\n <ng-container confirm__content>{{ confirm.content }}</ng-container>\n <ng-container confirm__btn_cancel>{{confirm.noYesButton ? 'NO' : 'Cancel'}}</ng-container>\n <ng-container confirm__btn_confirm>{{confirm.noYesButton ? 'YES' : 'OK'}}</ng-container>\n </spx-confirm>\n }\n </div>\n}","import { createAction, props, union } from '@ngrx/store';\nimport { SpxConfirmI } from './spx-confirm.reducer';\n\nexport const answer = createAction('[Confirm] Answer', props<{\n cancel?: boolean;\n confirm?: boolean;\n id: string;\n}>());\nexport const reset = createAction('[Confirm] Reset', props<Record<string, unknown>>());\nexport const show = createAction('[Confirm] Show', props<SpxConfirmI>());\n\nexport const answerConfirm = createAction('[Confirm] Answer Confirm', props<{\n id: string;\n}>());\n\nconst all = union({\n reset,\n show,\n answerConfirm,\n});\nexport type Actions = typeof all;\n","import * as actions from './spx-confirm.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\n\nexport interface SpxConfirmI {\n content: string;\n id: string;\n title: string;\n noYesButton?: boolean;\n onOK?: () => void;\n onCancel?: () => void;\n}\n\nexport interface State {\n confirms: SpxConfirmI[];\n}\n\nconst initialState: State = {\n confirms: [],\n};\n\nexport default createFeature({\n name: 'spxConfirm',\n reducer: createReducer(\n initialState,\n on(\n actions.reset,\n (state: State, {}): State => ({\n ...state,\n })\n ),\n on(\n actions.show,\n (state: State, { content, id, title, noYesButton, onCancel, onOK }): State => {\n const confirms =\n state.confirms.filter((c) => c.id).length > 0\n ? state.confirms\n : [\n ...state.confirms,\n {\n content,\n id,\n title,\n noYesButton,\n onCancel,\n onOK,\n },\n ];\n return {\n ...state,\n confirms,\n };\n }\n ),\n on(\n actions.answerConfirm,\n (state: State, { id }): State => ({\n ...state,\n confirms: [\n ...state.confirms.filter((c) => c.id !== id),\n ],\n })\n )\n ),\n});\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Observable } from 'rxjs';\nimport { mergeMap, withLatestFrom } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-confirm.actions';\nimport { spxSpinnerActions } from '@softpak/components/spx-spinner';\nimport { Store } from '@ngrx/store';\nimport spxConfirmReducer from './spx-confirm.reducer';\n\n@Injectable()\nexport class SpxConfirmEffects {\n onAnswer$: Observable<any> = createEffect(() =>\n this.actions$.pipe(\n ofType(actions.answer),\n withLatestFrom(this.appStore.select(spxConfirmReducer.selectConfirms)),\n mergeMap(([action, confirms]) => {\n\n if (action.confirm) {\n confirms.find((c) => c.id === action.id)?.onOK?.();\n }\n if (action.cancel) {\n confirms.find((c) => c.id === action.id)?.onCancel?.();\n }\n return [\n actions.answerConfirm({id: action.id}),\n spxSpinnerActions.hide({})\n ];\n })\n )\n );\n\n constructor(\n private readonly actions$: Actions,\n private readonly appStore: Store,\n ) {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxConfirmReducer.default","spxConfirmActions.answer","actions.reset","actions.show","actions.answerConfirm","actions.answer","spxConfirmReducer","i1","i2"],"mappings":";;;;;;;;;;;;;MAca,mBAAmB,CAAA;AAS9B,IAAA,WAAA,GAAA;AARA,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAU;QAC7B,IAAS,CAAA,SAAA,GAAG,MAAM,EAAU;QAC5B,IAAU,CAAA,UAAA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,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAD7B;;;;;;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-confirm.mjs","sources":["../../../../projects/softpak/components/spx-confirm/spx-confirm.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm.component.html","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.ts","../../../../projects/softpak/components/spx-confirm/spx-confirm-displayer/spx-confirm-displayer.component.html","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.actions.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.reducer.ts","../../../../projects/softpak/components/spx-confirm/store/spx-confirm.effects.ts","../../../../projects/softpak/components/spx-confirm/softpak-components-spx-confirm.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, output } from '@angular/core';\nimport { FaIconComponent } from '@fortawesome/angular-fontawesome';\nimport { faTimes } from '@fortawesome/free-solid-svg-icons';\nimport { SpxButtonComponent } from '@softpak/components/spx-button';\nimport { SpxSeverityEnum } from '@softpak/components/spx-helpers';\n\n@Component({\n selector: 'spx-confirm',\n templateUrl: './spx-confirm.component.html',\n styleUrls: ['./spx-confirm.component.scss'],\n imports: [SpxButtonComponent, FaIconComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmComponent {\n id = input.required<string>();\n spxCancel = output<string>();\n spxConfirm = output<string>();\n faTimes = faTimes;\n severityError = SpxSeverityEnum.error;\n severityInfo = SpxSeverityEnum.info;\n severitySuccess = SpxSeverityEnum.success;\n\n constructor() { }\n\n onCancel() {\n this.spxCancel.emit(this.id());\n }\n\n onConfirm() {\n if(this.id()) {}\n this.spxConfirm.emit(this.id());\n }\n\n}\n","<div class=\"block spx-confirm h-full mt-12\">\n <div class=\"bg-amber-400 flex gap-3 items-center px-3 py-1 rounded-t text-black\">\n <div class=\"grow font-bold\">\n <ng-content select=\"[confirm__title]\"></ng-content>\n </div>\n <spx-button (spxClick)=\"onCancel()\" [spxType]=\"'button'\" [spxSeverity]=\"severityInfo\"><fa-icon\n [icon]=\"faTimes\"></fa-icon>\n </spx-button>\n </div>\n <div class=\"flex flex-col gap-3 dark:bg-gray-700 bg-white p-3\">\n <ng-content select=\"[confirm__content]\"></ng-content>\n <div class=\"grid grid-cols-1 grid-rows-2 sm:grid-rows-1 sm:grid-cols-2 gap-3 grid-flow-row\">\n <spx-button (spxClick)=\"onCancel()\" [spxFullWidth]=\"true\" [spxType]=\"'button'\"\n [spxSeverity]=\"severityError\">\n <ng-content select=\"[confirm__btn_cancel]\"></ng-content>\n </spx-button>\n <spx-button #confirm (spxClick)=\"onConfirm()\" [spxFullWidth]=\"true\" [spxType]=\"'submit'\"\n [spxSeverity]=\"severitySuccess\">\n <ng-content select=\"[confirm__btn_confirm]\"></ng-content>\n </spx-button>\n </div>\n </div>\n</div>","import { ChangeDetectionStrategy, Component, OnDestroy, OnInit, signal } from '@angular/core';\nimport { Store } from '@ngrx/store';\nimport { Subscription } from 'rxjs';\nimport { SpxConfirmComponent } from '../spx-confirm.component';\nimport { spxConfirmActions, spxConfirmReducer } from '../public-api';\n\n@Component({\n selector: 'spx-confirm-displayer',\n templateUrl: './spx-confirm-displayer.component.html',\n styleUrls: ['./spx-confirm-displayer.component.scss'],\n imports: [SpxConfirmComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class SpxConfirmDisplayerComponent implements OnInit, OnDestroy {\n confirms = signal<{\n content: string;\n id: string;\n title: string;\n cancelled?: boolean;\n confirmed?: boolean;\n noYesButton?: boolean;\n }[]>([]);\n\n private subscriptions: {\n confirmState?: Subscription;\n } = {};\n\n constructor(\n private readonly appStore: Store,\n ) { }\n\n ngOnInit() {\n this.subscriptions.confirmState = this.appStore.select(spxConfirmReducer.default.selectConfirms).subscribe(confirms => {\n if (confirms?.length === 0) {\n this.confirms.set([]);\n return;\n }\n\n this.confirms.set(confirms);\n });\n }\n\n ngOnDestroy() {\n this.subscriptions?.confirmState?.unsubscribe();\n }\n\n onCancel(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n cancel: true,\n id\n }));\n }\n\n onConfirm(id: string) {\n this.appStore.dispatch(spxConfirmActions.answer({\n confirm: true,\n id\n }));\n }\n\n}\n","@if (confirms().length > 0) {\n <div class=\"bg-black/75 block relative h-full\" style=\"z-index: 1000\">\n @for (confirm of confirms(); track confirm.id) {\n <spx-confirm [id]=\"confirm.id\" (spxCancel)=\"onCancel($event)\"\n (spxConfirm)=\"onConfirm($event)\">\n <ng-container confirm__title>{{ confirm.title }}</ng-container>\n <ng-container confirm__content>{{ confirm.content }}</ng-container>\n <ng-container confirm__btn_cancel>{{confirm.noYesButton ? 'NO' : 'Cancel'}}</ng-container>\n <ng-container confirm__btn_confirm>{{confirm.noYesButton ? 'YES' : 'OK'}}</ng-container>\n </spx-confirm>\n }\n </div>\n}","import { createAction, props, union } from '@ngrx/store';\nimport { SpxConfirmI } from './spx-confirm.reducer';\n\nexport const answer = createAction('[Confirm] Answer', props<{\n cancel?: boolean;\n confirm?: boolean;\n id: string;\n}>());\nexport const reset = createAction('[Confirm] Reset', props<Record<string, unknown>>());\nexport const show = createAction('[Confirm] Show', props<SpxConfirmI>());\n\nexport const answerConfirm = createAction('[Confirm] Answer Confirm', props<{\n id: string;\n}>());\n\nconst all = union({\n reset,\n show,\n answerConfirm,\n});\nexport type Actions = typeof all;\n","import * as actions from './spx-confirm.actions';\nimport { createFeature, createReducer, on } from '@ngrx/store';\n\nexport interface SpxConfirmI {\n content: string;\n id: string;\n title: string;\n noYesButton?: boolean;\n onOK?: () => void;\n onCancel?: () => void;\n}\n\nexport interface State {\n confirms: SpxConfirmI[];\n}\n\nconst initialState: State = {\n confirms: [],\n};\n\nexport default createFeature({\n name: 'spxConfirm',\n reducer: createReducer(\n initialState,\n on(\n actions.reset,\n (state: State, {}): State => ({\n ...state,\n })\n ),\n on(\n actions.show,\n (state: State, { content, id, title, noYesButton, onCancel, onOK }): State => {\n const confirms =\n state.confirms.filter((c) => c.id).length > 0\n ? state.confirms\n : [\n ...state.confirms,\n {\n content,\n id,\n title,\n noYesButton,\n onCancel,\n onOK,\n },\n ];\n return {\n ...state,\n confirms,\n };\n }\n ),\n on(\n actions.answerConfirm,\n (state: State, { id }): State => ({\n ...state,\n confirms: [\n ...state.confirms.filter((c) => c.id !== id),\n ],\n })\n )\n ),\n});\n","import { Actions, createEffect, ofType } from '@ngrx/effects';\nimport { Observable } from 'rxjs';\nimport { mergeMap, withLatestFrom } from 'rxjs/operators';\nimport { Injectable } from '@angular/core';\nimport * as actions from './spx-confirm.actions';\nimport { spxSpinnerActions } from '@softpak/components/spx-spinner';\nimport { Store } from '@ngrx/store';\nimport spxConfirmReducer from './spx-confirm.reducer';\n\n@Injectable()\nexport class SpxConfirmEffects {\n onAnswer$: Observable<any> = createEffect(() =>\n this.actions$.pipe(\n ofType(actions.answer),\n withLatestFrom(this.appStore.select(spxConfirmReducer.selectConfirms)),\n mergeMap(([action, confirms]) => {\n\n if (action.confirm) {\n confirms.find((c) => c.id === action.id)?.onOK?.();\n }\n if (action.cancel) {\n confirms.find((c) => c.id === action.id)?.onCancel?.();\n }\n return [\n actions.answerConfirm({id: action.id}),\n spxSpinnerActions.hide({})\n ];\n })\n )\n );\n\n constructor(\n private readonly actions$: Actions,\n private readonly appStore: Store,\n ) {}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["spxConfirmReducer.default","spxConfirmActions.answer","actions.reset","actions.show","actions.answerConfirm","actions.answer","spxConfirmReducer","i1","i2"],"mappings":";;;;;;;;;;;;;MAca,mBAAmB,CAAA;AAS9B,IAAA,WAAA,GAAA;AARA,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAC,QAAQ,EAAU;QAC7B,IAAS,CAAA,SAAA,GAAG,MAAM,EAAU;QAC5B,IAAU,CAAA,UAAA,GAAG,MAAM,EAAU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ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxFormSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.1", type: SpxFormSectionComponent, isStandalone: true, selector: "spx-form-section", inputs: { spxIndex: { classPropertyName: "spxIndex", publicName: "spxIndex", isSignal: true, isRequired: false, transformFunction: null }, spxIndexSecondary: { classPropertyName: "spxIndexSecondary", publicName: "spxIndexSecondary", isSignal: true, isRequired: false, transformFunction: null }, spxTitle: { classPropertyName: "spxTitle", publicName: "spxTitle", isSignal: true, isRequired: false, transformFunction: null }, spxShowTitle: { classPropertyName: "spxShowTitle", publicName: "spxShowTitle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (this.spxShowTitle()) {\n <div class=\"spx-form-section__title mb-3 flex gap-3 items-center\">\n <div class=\"spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold rounded\">{{this.spxIndex()}}@if (this.spxIndexSecondary()) {\n {{ this.spxIndexSecondary() }}\n }</div>\n <div class=\"spx-form-section__content font-bold grow text-black dark:text-white\">{{this.spxTitle()}}</div>\n </div>\n}\n<div class=\"flex flex-col gap-3\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spx-form-section__title-index{background-color:#000;display:inline-block;vertical-align:middle}.spx-form-section__title{color:var(--spx-form-section--color, #FFFFFF)}.spx-form-section__content{color:#000}@media (prefers-color-scheme: dark){.spx-form-section__title-index{background-color:var(--spx-form-section--color, #FFFFFF);color:#000}.spx-form-section__content{color:var(--spx-form-section--color, #FFFFFF)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxFormSectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
12
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.11", type: SpxFormSectionComponent, isStandalone: true, selector: "spx-form-section", inputs: { spxIndex: { classPropertyName: "spxIndex", publicName: "spxIndex", isSignal: true, isRequired: false, transformFunction: null }, spxIndexSecondary: { classPropertyName: "spxIndexSecondary", publicName: "spxIndexSecondary", isSignal: true, isRequired: false, transformFunction: null }, spxTitle: { classPropertyName: "spxTitle", publicName: "spxTitle", isSignal: true, isRequired: false, transformFunction: null }, spxShowTitle: { classPropertyName: "spxShowTitle", publicName: "spxShowTitle", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (this.spxShowTitle()) {\n <div class=\"spx-form-section__title mb-3 flex gap-3 items-center\">\n <div class=\"spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold rounded\">{{this.spxIndex()}}@if (this.spxIndexSecondary()) {\n {{ this.spxIndexSecondary() }}\n }</div>\n <div class=\"spx-form-section__content font-bold grow text-black dark:text-white\">{{this.spxTitle()}}</div>\n </div>\n}\n<div class=\"flex flex-col gap-3\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spx-form-section__title-index{background-color:#000;display:inline-block;vertical-align:middle}.spx-form-section__title{color:var(--spx-form-section--color, #FFFFFF)}.spx-form-section__content{color:#000}@media (prefers-color-scheme: dark){.spx-form-section__title-index{background-color:var(--spx-form-section--color, #FFFFFF);color:#000}.spx-form-section__content{color:var(--spx-form-section--color, #FFFFFF)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
13
13
  }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.1", ngImport: i0, type: SpxFormSectionComponent, decorators: [{
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.11", ngImport: i0, type: SpxFormSectionComponent, decorators: [{
15
15
  type: Component,
16
16
  args: [{ selector: 'spx-form-section', imports: [], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@if (this.spxShowTitle()) {\n <div class=\"spx-form-section__title mb-3 flex gap-3 items-center\">\n <div class=\"spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold rounded\">{{this.spxIndex()}}@if (this.spxIndexSecondary()) {\n {{ this.spxIndexSecondary() }}\n }</div>\n <div class=\"spx-form-section__content font-bold grow text-black dark:text-white\">{{this.spxTitle()}}</div>\n </div>\n}\n<div class=\"flex flex-col gap-3\">\n <ng-content></ng-content>\n</div>", styles: [":host{display:block}.spx-form-section__title-index{background-color:#000;display:inline-block;vertical-align:middle}.spx-form-section__title{color:var(--spx-form-section--color, #FFFFFF)}.spx-form-section__content{color:#000}@media (prefers-color-scheme: dark){.spx-form-section__title-index{background-color:var(--spx-form-section--color, #FFFFFF);color:#000}.spx-form-section__content{color:var(--spx-form-section--color, #FFFFFF)}}\n"] }]
17
17
  }] });
@@ -1 +1 @@
1
- {"version":3,"file":"softpak-components-spx-form-section.mjs","sources":["../../../../projects/softpak/components/spx-form-section/spx-form-section.component.ts","../../../../projects/softpak/components/spx-form-section/spx-form-section.component.html","../../../../projects/softpak/components/spx-form-section/softpak-components-spx-form-section.ts"],"sourcesContent":["\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-form-section',\n imports: [],\n templateUrl: './spx-form-section.component.html',\n styleUrl: './spx-form-section.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxFormSectionComponent {\n readonly spxIndex = input<number>();\n readonly spxIndexSecondary = input<number>();\n readonly spxTitle = input<string>();\n readonly spxShowTitle = input<boolean>(true);\n}\n","@if (this.spxShowTitle()) {\n <div class=\"spx-form-section__title mb-3 flex gap-3 items-center\">\n <div class=\"spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold rounded\">{{this.spxIndex()}}@if (this.spxIndexSecondary()) {\n {{ this.spxIndexSecondary() }}\n }</div>\n <div class=\"spx-form-section__content font-bold grow text-black dark:text-white\">{{this.spxTitle()}}</div>\n </div>\n}\n<div class=\"flex flex-col gap-3\">\n <ng-content></ng-content>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAWa,uBAAuB,CAAA;AARpC,IAAA,WAAA,GAAA;QASW,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU;QAC1B,IAAiB,CAAA,iBAAA,GAAG,KAAK,EAAU;QACnC,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU;AAC1B,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAU,IAAI,CAAC;AAC7C;8GALY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,uBAAuB,moBCXpC,mhBAUM,EAAA,MAAA,EAAA,CAAA,sbAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FDCO,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,WACnB,EAAE,EAAA,eAAA,EAGM,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,mhBAAA,EAAA,MAAA,EAAA,CAAA,sbAAA,CAAA,EAAA;;;AETpB;;AAEG;;;;"}
1
+ {"version":3,"file":"softpak-components-spx-form-section.mjs","sources":["../../../../projects/softpak/components/spx-form-section/spx-form-section.component.ts","../../../../projects/softpak/components/spx-form-section/spx-form-section.component.html","../../../../projects/softpak/components/spx-form-section/softpak-components-spx-form-section.ts"],"sourcesContent":["\nimport { ChangeDetectionStrategy, Component, input } from '@angular/core';\n\n@Component({\n selector: 'spx-form-section',\n imports: [],\n templateUrl: './spx-form-section.component.html',\n styleUrl: './spx-form-section.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class SpxFormSectionComponent {\n readonly spxIndex = input<number>();\n readonly spxIndexSecondary = input<number>();\n readonly spxTitle = input<string>();\n readonly spxShowTitle = input<boolean>(true);\n}\n","@if (this.spxShowTitle()) {\n <div class=\"spx-form-section__title mb-3 flex gap-3 items-center\">\n <div class=\"spx-form-section__title-index flex content-center text-center text-sm h-[30px] w-[30px] font-bold rounded\">{{this.spxIndex()}}@if (this.spxIndexSecondary()) {\n {{ this.spxIndexSecondary() }}\n }</div>\n <div class=\"spx-form-section__content font-bold grow text-black dark:text-white\">{{this.spxTitle()}}</div>\n </div>\n}\n<div class=\"flex flex-col gap-3\">\n <ng-content></ng-content>\n</div>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MAWa,uBAAuB,CAAA;AARpC,IAAA,WAAA,GAAA;QASW,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU;QAC1B,IAAiB,CAAA,iBAAA,GAAG,KAAK,EAAU;QACnC,IAAQ,CAAA,QAAA,GAAG,KAAK,EAAU;AAC1B,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAU,IAAI,CAAC;AAC7C;+GALY,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAvB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,uBAAuB,moBCXpC,mhBAUM,EAAA,MAAA,EAAA,CAAA,sbAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDCO,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBARnC,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,kBAAkB,WACnB,EAAE,EAAA,eAAA,EAGM,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,mhBAAA,EAAA,MAAA,EAAA,CAAA,sbAAA,CAAA,EAAA;;;AETpB;;AAEG;;;;"}