@dsivd/prestations-ng 16.0.0-beta1 → 16.0.0-beta10

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 (202) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/ESLINT_MIGRATION_GUIDE.md +39 -13
  3. package/UPGRADING_V16.md +434 -26
  4. package/dsivd-prestations-ng-v16.0.0-beta10.tgz +0 -0
  5. package/esm2020/abstract-page-component.mjs +3 -3
  6. package/esm2020/directives/currency-formatter.directive.mjs +3 -3
  7. package/esm2020/directives/formatter.module.mjs +4 -4
  8. package/esm2020/directives/iban-formatter.directive.mjs +3 -3
  9. package/esm2020/directives/ide-formatter.directive.mjs +3 -3
  10. package/esm2020/directives/ndc-formatter.directive.mjs +3 -3
  11. package/esm2020/foehn-address/foehn-address.module.mjs +4 -4
  12. package/esm2020/foehn-address/foehn-display-address.component.mjs +3 -3
  13. package/esm2020/foehn-address/foehn-input-address.component.mjs +3 -3
  14. package/esm2020/foehn-address/foehn-input-foreign-locality.component.mjs +3 -3
  15. package/esm2020/foehn-address/foehn-input-foreign-street.component.mjs +3 -3
  16. package/esm2020/foehn-agenda/foehn-agenda-navigation/foehn-agenda-navigation.component.mjs +3 -3
  17. package/esm2020/foehn-agenda/foehn-agenda-timeslot-panel/foehn-agenda-timeslot-panel.component.mjs +3 -3
  18. package/esm2020/foehn-agenda/foehn-agenda.component.mjs +3 -3
  19. package/esm2020/foehn-agenda/foehn-agenda.module.mjs +4 -4
  20. package/esm2020/foehn-autocomplete/foehn-autocomplete.component.mjs +3 -3
  21. package/esm2020/foehn-autocomplete/foehn-autocomplete.module.mjs +4 -4
  22. package/esm2020/foehn-boolean/foehn-boolean-checkbox.component.mjs +3 -3
  23. package/esm2020/foehn-boolean/foehn-boolean-radio.component.mjs +3 -3
  24. package/esm2020/foehn-boolean/foehn-boolean.module.mjs +4 -4
  25. package/esm2020/foehn-breadcrumb/breadcrumb-event.service.mjs +3 -3
  26. package/esm2020/foehn-breadcrumb/foehn-breadcrumb.component.mjs +3 -3
  27. package/esm2020/foehn-breadcrumb/foehn-breadcrumb.module.mjs +4 -4
  28. package/esm2020/foehn-checkables/foehn-checkable-group.component.mjs +3 -3
  29. package/esm2020/foehn-checkables/foehn-checkables.module.mjs +4 -4
  30. package/esm2020/foehn-checkables/foehn-checkbox.component.mjs +3 -3
  31. package/esm2020/foehn-checkables/foehn-radio.component.mjs +3 -3
  32. package/esm2020/foehn-checkables/foehn-select.component.mjs +3 -3
  33. package/esm2020/foehn-confirm-modal/foehn-confirm-modal.component.mjs +3 -3
  34. package/esm2020/foehn-confirm-modal/foehn-confirm-modal.module.mjs +4 -4
  35. package/esm2020/foehn-confirm-modal/foehn-confirm-modal.service.mjs +3 -3
  36. package/esm2020/foehn-date-picker/foehn-date-picker.component.mjs +9 -7
  37. package/esm2020/foehn-date-picker/foehn-date-picker.module.mjs +4 -4
  38. package/esm2020/foehn-date-picker-button/foehn-date-picker-button.component.mjs +3 -3
  39. package/esm2020/foehn-date-picker-button/foehn-date-picker-button.module.mjs +4 -4
  40. package/esm2020/foehn-debug-summary/foehn-debug-summary.component.mjs +3 -3
  41. package/esm2020/foehn-debug-summary/foehn-debug-summary.component.module.mjs +4 -4
  42. package/esm2020/foehn-decision-electronique/foehn-decision-electronique.component.mjs +3 -3
  43. package/esm2020/foehn-decision-electronique/foehn-decision-electronique.module.mjs +4 -4
  44. package/esm2020/foehn-footer/foehn-footer.component.mjs +3 -3
  45. package/esm2020/foehn-footer/foehn-footer.module.mjs +4 -4
  46. package/esm2020/foehn-form/foehn-form.component.mjs +3 -3
  47. package/esm2020/foehn-form/foehn-form.module.mjs +4 -4
  48. package/esm2020/foehn-form/register-ng-model.service.mjs +3 -3
  49. package/esm2020/foehn-growl/foehn-growl.component.mjs +3 -3
  50. package/esm2020/foehn-growl/foehn-growl.module.mjs +4 -4
  51. package/esm2020/foehn-growl/growl-broker.service.mjs +3 -3
  52. package/esm2020/foehn-header/foehn-header.component.mjs +3 -3
  53. package/esm2020/foehn-header/foehn-header.module.mjs +4 -4
  54. package/esm2020/foehn-header/foehn-skip-link.component.mjs +3 -3
  55. package/esm2020/foehn-help-modal/foehn-help-modal.component.mjs +3 -3
  56. package/esm2020/foehn-help-modal/foehn-help-modal.module.mjs +4 -4
  57. package/esm2020/foehn-icons/abstract-icon-component.mjs +3 -3
  58. package/esm2020/foehn-icons/foehn-icon-calendar.component.mjs +3 -3
  59. package/esm2020/foehn-icons/foehn-icon-check-square-o.component.mjs +3 -3
  60. package/esm2020/foehn-icons/foehn-icon-check.component.mjs +3 -3
  61. package/esm2020/foehn-icons/foehn-icon-chevron-down.component.mjs +3 -3
  62. package/esm2020/foehn-icons/foehn-icon-chevron-left.component.mjs +3 -3
  63. package/esm2020/foehn-icons/foehn-icon-chevron-right.component.mjs +3 -3
  64. package/esm2020/foehn-icons/foehn-icon-chevron-up.component.mjs +3 -3
  65. package/esm2020/foehn-icons/foehn-icon-clock.component.mjs +3 -3
  66. package/esm2020/foehn-icons/foehn-icon-comment-dots.component.mjs +3 -3
  67. package/esm2020/foehn-icons/foehn-icon-edit.component.mjs +3 -3
  68. package/esm2020/foehn-icons/foehn-icon-external-link-alt.component.mjs +3 -3
  69. package/esm2020/foehn-icons/foehn-icon-file-pdf.component.mjs +3 -3
  70. package/esm2020/foehn-icons/foehn-icon-info-circle.component.mjs +3 -3
  71. package/esm2020/foehn-icons/foehn-icon-lock.component.mjs +3 -3
  72. package/esm2020/foehn-icons/foehn-icon-map-marker.component.mjs +3 -3
  73. package/esm2020/foehn-icons/foehn-icon-minus-circle.component.mjs +3 -3
  74. package/esm2020/foehn-icons/foehn-icon-plus-circle.component.mjs +3 -3
  75. package/esm2020/foehn-icons/foehn-icon-plus-square.component.mjs +3 -3
  76. package/esm2020/foehn-icons/foehn-icon-search.component.mjs +3 -3
  77. package/esm2020/foehn-icons/foehn-icon-times.component.mjs +3 -3
  78. package/esm2020/foehn-icons/foehn-icon-trash-alt.component.mjs +3 -3
  79. package/esm2020/foehn-icons/foehn-icon-unlock-alt.component.mjs +3 -3
  80. package/esm2020/foehn-icons/foehn-icons.module.mjs +4 -4
  81. package/esm2020/foehn-input/foehn-input-email.component.mjs +3 -3
  82. package/esm2020/foehn-input/foehn-input-hidden.component.mjs +3 -3
  83. package/esm2020/foehn-input/foehn-input-number.component.mjs +3 -3
  84. package/esm2020/foehn-input/foehn-input-password.component.mjs +3 -3
  85. package/esm2020/foehn-input/foehn-input-phone.component.mjs +3 -3
  86. package/esm2020/foehn-input/foehn-input-string.component.mjs +3 -3
  87. package/esm2020/foehn-input/foehn-input-text.component.mjs +3 -3
  88. package/esm2020/foehn-input/foehn-input-textarea.component.mjs +3 -3
  89. package/esm2020/foehn-input/foehn-input.component.mjs +3 -3
  90. package/esm2020/foehn-input/foehn-input.module.mjs +4 -4
  91. package/esm2020/foehn-input-date/foehn-input-date.component.mjs +3 -3
  92. package/esm2020/foehn-input-date-time/foehn-input-date-time.component.mjs +3 -3
  93. package/esm2020/foehn-input-time/foehn-input-time.component.mjs +3 -3
  94. package/esm2020/foehn-list/foehn-list.component.mjs +3 -3
  95. package/esm2020/foehn-list/foehn-list.module.mjs +4 -4
  96. package/esm2020/foehn-menu-prestation/abstract-list-item-detail-page.component.mjs +3 -3
  97. package/esm2020/foehn-menu-prestation/abstract-menu-page.component.mjs +3 -3
  98. package/esm2020/foehn-menu-prestation/abstract-page-from-menu.component.mjs +3 -3
  99. package/esm2020/foehn-menu-prestation/foehn-error-pill/foehn-error-pill.component.mjs +3 -3
  100. package/esm2020/foehn-menu-prestation/foehn-list-summary/foehn-list-summary.component.mjs +3 -3
  101. package/esm2020/foehn-menu-prestation/foehn-menu-items/foehn-menu-item/foehn-menu-item.component.mjs +3 -3
  102. package/esm2020/foehn-menu-prestation/foehn-menu-items/foehn-menu-item-transmit/foehn-menu-item-transmit.component.mjs +3 -3
  103. package/esm2020/foehn-menu-prestation/foehn-menu-prestation.module.mjs +4 -4
  104. package/esm2020/foehn-misc/foehn-abbr.component.mjs +3 -3
  105. package/esm2020/foehn-misc/foehn-misc.module.mjs +4 -4
  106. package/esm2020/foehn-modal/foehn-modal.component.mjs +3 -3
  107. package/esm2020/foehn-modal/foehn-modal.module.mjs +4 -4
  108. package/esm2020/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.component.mjs +3 -3
  109. package/esm2020/foehn-multiselect-autocomplete/foehn-multiselect-autocomplete.module.mjs +4 -4
  110. package/esm2020/foehn-nav13/foehn-input-nav13.component.mjs +3 -3
  111. package/esm2020/foehn-nav13/foehn-input-nav13.module.mjs +4 -4
  112. package/esm2020/foehn-navigation/foehn-navigation.component.mjs +3 -3
  113. package/esm2020/foehn-navigation/foehn-navigation.module.mjs +4 -4
  114. package/esm2020/foehn-navigation/foehn-navigation.service.mjs +3 -3
  115. package/esm2020/foehn-notfound/foehn-notfound.component.mjs +3 -3
  116. package/esm2020/foehn-notfound/foehn-notfound.module.mjs +4 -4
  117. package/esm2020/foehn-page/foehn-page-counter.component.mjs +3 -3
  118. package/esm2020/foehn-page/foehn-page-modal.component.mjs +3 -3
  119. package/esm2020/foehn-page/foehn-page-modal.service.mjs +3 -3
  120. package/esm2020/foehn-page/foehn-page.component.mjs +3 -3
  121. package/esm2020/foehn-page/foehn-page.module.mjs +4 -4
  122. package/esm2020/foehn-page/foehn-page.service.mjs +3 -3
  123. package/esm2020/foehn-recap-section/foehn-recap-section.component.mjs +3 -3
  124. package/esm2020/foehn-recap-section/foehn-recap-section.module.mjs +4 -4
  125. package/esm2020/foehn-remaining-alerts-summary/foehn-remaining-alerts-summary.component.mjs +3 -3
  126. package/esm2020/foehn-remaining-alerts-summary/foehn-remaining-alerts-summary.module.mjs +4 -4
  127. package/esm2020/foehn-status-progress-bar/foehn-status-progress-bar.component.mjs +3 -3
  128. package/esm2020/foehn-status-progress-bar/foehn-status-progress-bar.module.mjs +4 -4
  129. package/esm2020/foehn-table/foehn-table.component.mjs +3 -3
  130. package/esm2020/foehn-table/foehn-table.module.mjs +4 -4
  131. package/esm2020/foehn-upload/abstract-foehn-uploader.component.mjs +5 -7
  132. package/esm2020/foehn-upload/foehn-bo-multi-upload/bo-multi-upload.service.mjs +3 -3
  133. package/esm2020/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.mjs +6 -6
  134. package/esm2020/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.module.mjs +4 -4
  135. package/esm2020/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.mjs +6 -6
  136. package/esm2020/foehn-upload/foehn-multi-upload/foehn-multi-upload.module.mjs +4 -4
  137. package/esm2020/foehn-upload/foehn-multi-upload/multi-upload.service.mjs +3 -3
  138. package/esm2020/foehn-upload/foehn-multi-upload/pending-upload.service.mjs +3 -3
  139. package/esm2020/foehn-upload/foehn-picture-upload/foehn-picture-upload.component.mjs +3 -3
  140. package/esm2020/foehn-upload/foehn-picture-upload/foehn-picture-upload.module.mjs +4 -4
  141. package/esm2020/foehn-upload/foehn-upload-progress-bar/foehn-upload-progress-bar.component.mjs +3 -3
  142. package/esm2020/foehn-upload/foehn-upload-progress-bar/foehn-upload-progress-bar.module.mjs +4 -4
  143. package/esm2020/foehn-upload/foehn-upload-progress-bar/upload-progress.service.mjs +3 -3
  144. package/esm2020/foehn-upload/uploader.helper.mjs +24 -35
  145. package/esm2020/foehn-user-connected-as/foehn-user-connected-as.component.mjs +3 -3
  146. package/esm2020/foehn-user-connected-as/foehn-user-connected-as.module.mjs +4 -4
  147. package/esm2020/foehn-validation-alert-summary/foehn-validation-alert-summary.component.mjs +3 -3
  148. package/esm2020/foehn-validation-alert-summary/foehn-validation-alert-summary.module.mjs +4 -4
  149. package/esm2020/foehn-validation-alerts/foehn-validation-alerts.component.mjs +3 -3
  150. package/esm2020/foehn-validation-alerts/foehn-validation-alerts.module.mjs +4 -4
  151. package/esm2020/gesdem/gesdem-error-handler.service.mjs +3 -3
  152. package/esm2020/gesdem/gesdem-event.service.mjs +3 -3
  153. package/esm2020/gesdem/gesdem-handler.service.mjs +3 -3
  154. package/esm2020/gesdem/gesdem-loader.guard.mjs +3 -3
  155. package/esm2020/gesdem-action-recovery/gesdem-action-recovery-login/gesdem-action-recovery-login.component.mjs +3 -3
  156. package/esm2020/gesdem-action-recovery/gesdem-action-recovery-registration/gesdem-action-recovery-registration.component.mjs +3 -3
  157. package/esm2020/gesdem-action-recovery/gesdem-action-recovery.module.mjs +4 -4
  158. package/esm2020/gesdem-action-recovery/gesdem-action-recovery.service.mjs +3 -3
  159. package/esm2020/gesdem-confirmation/gesdem-confirmation.component.mjs +3 -3
  160. package/esm2020/gesdem-confirmation/gesdem-confirmation.module.mjs +4 -4
  161. package/esm2020/gesdem-error/gesdem-error.component.mjs +3 -3
  162. package/esm2020/gesdem-error/gesdem-error.module.mjs +4 -4
  163. package/esm2020/pipes/currency.pipe.mjs +3 -3
  164. package/esm2020/pipes/date.pipe.mjs +3 -3
  165. package/esm2020/pipes/formatIde.pipe.mjs +3 -3
  166. package/esm2020/pipes/pipes.module.mjs +4 -4
  167. package/esm2020/prestations-ng-core.module.mjs +4 -4
  168. package/esm2020/sdk-appinfo/application-info.mjs +1 -1
  169. package/esm2020/sdk-appinfo/application-info.service.mjs +3 -3
  170. package/esm2020/sdk-currency/currency.helper.mjs +3 -3
  171. package/esm2020/sdk-date/date.helper.mjs +3 -3
  172. package/esm2020/sdk-dictionary/sdk-dictionary.module.mjs +4 -4
  173. package/esm2020/sdk-dictionary/sdk-dictionary.pipe.mjs +3 -3
  174. package/esm2020/sdk-dictionary/sdk-dictionary.service.mjs +3 -3
  175. package/esm2020/sdk-epayment/sdk-epayment.component.mjs +3 -3
  176. package/esm2020/sdk-epayment/sdk-epayment.module.mjs +4 -4
  177. package/esm2020/sdk-epayment/sdk-epayment.service.mjs +3 -3
  178. package/esm2020/sdk-recaptcha/grecaptcha/grecaptcha.component.mjs +3 -3
  179. package/esm2020/sdk-recaptcha/recaptcha.service.mjs +3 -3
  180. package/esm2020/sdk-recaptcha/sdk-recaptcha.component.mjs +3 -3
  181. package/esm2020/sdk-recaptcha/sdk-recaptcha.module.mjs +4 -4
  182. package/esm2020/sdk-redirect/iam-expired-interceptor.service.mjs +3 -3
  183. package/esm2020/sdk-redirect/redirect.component.mjs +3 -3
  184. package/esm2020/sdk-redirect/sdk-redirect.module.mjs +4 -4
  185. package/esm2020/sdk-session-info/session-info-with-application.service.mjs +3 -3
  186. package/esm2020/sdk-session-info/session-info.service.mjs +3 -3
  187. package/esm2020/sdk-statistics/sdk-statistics.service.mjs +3 -3
  188. package/esm2020/sdk-support-alert/support-alert-container.component.mjs +3 -3
  189. package/esm2020/sdk-support-alert/support-alert.component.mjs +3 -3
  190. package/esm2020/sdk-support-alert/support-alert.module.mjs +4 -4
  191. package/esm2020/sdk-support-alert/support-alert.service.mjs +3 -3
  192. package/esm2020/supported-browser.mjs +2 -2
  193. package/esm2020/validation/validation-handler.service.mjs +3 -3
  194. package/fesm2015/dsivd-prestations-ng.mjs +641 -652
  195. package/fesm2015/dsivd-prestations-ng.mjs.map +1 -1
  196. package/fesm2020/dsivd-prestations-ng.mjs +641 -652
  197. package/fesm2020/dsivd-prestations-ng.mjs.map +1 -1
  198. package/foehn-upload/abstract-foehn-uploader.component.d.ts +1 -2
  199. package/foehn-upload/uploader.helper.d.ts +6 -7
  200. package/package.json +12 -8
  201. package/sdk-appinfo/application-info.d.ts +3 -1
  202. package/dsivd-prestations-ng-v16.0.0-beta1.tgz +0 -0
package/CHANGELOG.md CHANGED
@@ -37,6 +37,13 @@ A change is considered **breaking** if you have to change your code or update yo
37
37
 
38
38
  - [foehn-checkable-group.component.ts](projects/prestations-ng/src/foehn-checkables/foehn-checkable-group.component.ts)
39
39
  - removed `@Input() allElementDisabled = false`. Now managed by setting `@Input() disabled` to `true` on component.
40
+
41
+ - [abstract-foehn-uploader.component.ts](projects/prestations-ng/src/foehn-upload/abstract-foehn-uploader.component.ts)
42
+ - [foehn-bo-multi-upload.component.ts](projects/prestations-ng/src/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.ts)
43
+ - [foehn-multi-upload.component.ts](projects/prestations-ng/src/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.ts)
44
+ - removed `@Input() overrideMaxSizeInMo`. Now managed by the backend (see `DocumentProperties.fileMaxSizeByFormKey`)
45
+
46
+ ## [15.5.3]
40
47
 
41
48
  ## [15.5.3]
42
49
 
@@ -71,10 +71,10 @@ After:
71
71
  }
72
72
  ```
73
73
 
74
- ## Adding `import` ,`jasmine` ,`jsdoc` ,`prefer-arrow` ,`rxjs` and `rxjs-angular` as plugins
74
+ ## Adding `import` ,`jasmine` ,`jsdoc` ,`simple-import-sort` ,`rxjs` and `rxjs-angular` as plugins
75
75
 
76
76
  ```bash
77
- yarn add eslint-plugin-import eslint-plugin-jasmine eslint-plugin-jsdoc eslint-plugin-prefer-arrow eslint-plugin-rxjs eslint-plugin-rxjs-angular --dev
77
+ yarn add eslint-plugin-import eslint-plugin-jasmine eslint-plugin-jsdoc eslint-plugin-simple-import-sort eslint-plugin-rxjs eslint-plugin-rxjs-angular --dev
78
78
  ```
79
79
 
80
80
  ## Customizing ESLint (inspired from OTIA and prestations-ng's files for rules)
@@ -94,13 +94,30 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
94
94
  },
95
95
  "ignorePatterns": [
96
96
  "/projects/**/*",
97
- "/src/test.ts",
97
+ "/package.json",
98
+ "/angular.json",
99
+ "/karma.conf.js",
100
+ "/.eslintrc.json",
101
+ "/tsconfig*.json",
102
+ "/src/tsconfig*.json",
98
103
  "/src/main.ts",
99
- "/src/polyfills.ts",
100
- "/src/environments/*.ts",
101
104
  "/src/typings.d.ts"
102
105
  ],
103
106
  "reportUnusedDisableDirectives": true,
107
+ "settings": {
108
+ "import/extensions": [
109
+ ".js",
110
+ ".ts",
111
+ ".mjs",
112
+ ".mts",
113
+ ".d.ts"
114
+ ],
115
+ "import/internal-regex": "^@dsivd/",
116
+ "import/resolver": {
117
+ "node": { "extensions": [".js", ".ts", ".d.ts"] },
118
+ "typescript": {}
119
+ }
120
+ },
104
121
  "overrides": [
105
122
  // Typescript
106
123
  {
@@ -108,17 +125,16 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
108
125
  "parserOptions": {
109
126
  "ecmaVersion": 2020,
110
127
  "project": [
111
- "tsconfig.json",
112
- "e2e/tsconfig.e2e.json"
128
+ "tsconfig.json"
113
129
  ],
114
130
  "createDefaultProgram": true
115
131
  },
116
132
  "plugins": [
117
133
  "import",
118
134
  "jsdoc",
119
- "prefer-arrow",
120
135
  "rxjs",
121
- "rxjs-angular"
136
+ "rxjs-angular",
137
+ "simple-import-sort"
122
138
  ],
123
139
  "extends": [
124
140
  "plugin:@angular-eslint/recommended",
@@ -152,7 +168,9 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
152
168
  }],
153
169
  "@typescript-eslint/ban-ts-comment": "error",
154
170
  "@typescript-eslint/ban-tslint-comment": "error",
155
- "@typescript-eslint/brace-style": "error",
171
+ "@typescript-eslint/brace-style": ["error", "1tbs", {
172
+ "allowSingleLine": true
173
+ }],
156
174
  "@typescript-eslint/comma-dangle": ["error", {
157
175
  "objects": "never",
158
176
  "arrays": "always-multiline",
@@ -204,6 +222,7 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
204
222
  "@typescript-eslint/no-unused-expressions": "error",
205
223
  "@typescript-eslint/no-use-before-define": "off",
206
224
  "@typescript-eslint/no-var-requires": "error",
225
+ "@typescript-eslint/object-curly-spacing": ["error", "always"],
207
226
  "@typescript-eslint/prefer-for-of": "error",
208
227
  "@typescript-eslint/prefer-function-type": "error",
209
228
  "@typescript-eslint/prefer-includes": "warn",
@@ -221,6 +240,7 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
221
240
  }],
222
241
  "@typescript-eslint/unified-signatures": "error",
223
242
  /* @eslint */
243
+ "array-bracket-spacing": ["error", "never"],
224
244
  "arrow-body-style": "error",
225
245
  "arrow-parens": ["error", "as-needed"],
226
246
  "brace-style": "off",
@@ -269,11 +289,13 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
269
289
  "no-unsafe-finally": "error",
270
290
  "no-unused-labels": "error",
271
291
  "no-var": "error",
292
+ "object-curly-spacing": "off",
272
293
  "object-shorthand": ["error", "always", {
273
294
  "avoidQuotes": true,
274
295
  "avoidExplicitReturnArrows": false
275
296
  }],
276
297
  "one-var": ["error", "never"],
298
+ "prefer-arrow-callback": "error",
277
299
  "prefer-template": "error",
278
300
  "quote-props": ["error", "as-needed"],
279
301
  "quotes": ["error", "single"],
@@ -284,6 +306,7 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
284
306
  "asyncArrow": "always",
285
307
  "named": "never"
286
308
  }],
309
+ "space-in-parens": ["error", "never"],
287
310
  "spaced-comment": ["error", "always", {
288
311
  "markers": ["/"]
289
312
  }],
@@ -298,15 +321,18 @@ You can replace the content of your `.eslintrc.json` with the following `json`.
298
321
  "ignoreExternal": true
299
322
  }],
300
323
  "import/no-deprecated": "warn",
324
+ "simple-import-sort/imports": "error",
325
+ "simple-import-sort/exports": "error",
326
+ "import/first": "error",
327
+ "import/newline-after-import": "error",
328
+ "import/no-duplicates": "error",
301
329
  /* @jsdoc */
302
330
  "jsdoc/check-alignment": "error",
303
331
  "jsdoc/check-indentation": "error",
304
332
  "jsdoc/newline-after-description": "error",
305
333
  "jsdoc/no-types": "error",
306
334
  "jsdoc/require-param-type": "off",
307
- "jsdoc/require-returns-type": "off",
308
- /* @preferArrow */
309
- "prefer-arrow/prefer-arrow-functions": "error"
335
+ "jsdoc/require-returns-type": "off"
310
336
  }
311
337
  },
312
338
  // HTML
package/UPGRADING_V16.md CHANGED
@@ -1,63 +1,471 @@
1
- # Upgrading from v15 to v16
1
+ # PRESTAKIT : Upgrading from v15 to v16
2
2
 
3
- The main feature in `prestations-ng` v15 is the update of the `@angular/*` peer dependencies
4
- to `^15.1.1`.
3
+ ## PRESTATIONS-NG
5
4
 
6
- ## Migrating to ESLint
5
+ The main feature in `prestations-ng` v16 is the update of the `@angular/*` peer dependencies
6
+ to `^15.1.1` and using `node 16+` to build.
7
7
 
8
- - Follow [our migration guide](ESLINT_MIGRATION_GUIDE.md) to migrate your project from TSLint to ESLint
8
+ ### Migrating to ESLint
9
9
 
10
- ## Updating Angular
10
+ Follow [our migration guide](ESLINT_MIGRATION_GUIDE.md) to migrate your project from TSLint to ESLint
11
11
 
12
- `prestations-ng` v16+ now supports Angular 15. You can follow the Angular update guide
12
+ ### Running with node 16+
13
+ #### Switch to node 16+
14
+ ##### If you are using our `slave-apps`
15
+
16
+ Be sure to update your `slave-apps` git repository and then execute
17
+ ```bash
18
+ node16
19
+ ```
20
+ which should switch your node version to 16+
21
+
22
+ ##### If you are NOT using our `slave-apps`
23
+
24
+ Be sure to use a node version 16+. To check your version, type the following command
25
+ ```bash
26
+ node --version
27
+ ```
28
+ which should print out a version 16+ otherwise, install a node 16+
29
+
30
+ #### In your project
31
+
32
+ Update your `package.json` to specify node engine
33
+ ```json
34
+ {
35
+ "engines": {
36
+ "node": ">=16.15.0"
37
+ }
38
+ }
39
+ ```
40
+
41
+ #### In your build
42
+
43
+ - Open your `jenkins` folder and update your jenkins files.
44
+ - Define a variable if it does not already exist and add `nodeVersion: 16` then pass it on to the build.
45
+
46
+ ##### UT folder
47
+ ```groovy
48
+ def args = [
49
+ nodeVersion: 16
50
+ ]
51
+
52
+ stage('Build pipeline') {
53
+ buildPipeline(args)
54
+ }
55
+ ```
56
+
57
+ ##### devex > snap folder
58
+ ```groovy
59
+ def buildArgs = [
60
+ nodeVersion : 16
61
+ ]
62
+
63
+ stage('Snap2Devex Skeleton') {
64
+ snap2Devex(buildArgs)
65
+ }
66
+ ```
67
+
68
+ ##### devex > stable folder
69
+ ```groovy
70
+ def args = [
71
+ nodeVersion : 16
72
+ ]
73
+
74
+ stage('Stable2Devex') {
75
+ stable2Devex(args)
76
+ }
77
+ ```
78
+
79
+ ### Updating Angular
80
+
81
+ `prestations-ng` **v16+** now supports **Angular v15**. You can follow the Angular update guide
13
82
  at this address:
14
83
 
15
84
  - [https://update.angular.io/?l=3&v=13.0-14.0](https://update.angular.io/?l=3&v=13.0-14.0)
16
85
  - [https://update.angular.io/?l=3&v=14.0-15.0](https://update.angular.io/?l=3&v=14.0-15.0)
17
86
 
18
- ### When having migrated to ESLint
87
+ #### When having migrated to ESLint
19
88
  ```bash
20
89
  yarn global add @angular/cli@14
21
90
  ng update @angular/core@14 @angular/cli@14
22
- ng update @angular/cdk@14
23
91
 
24
92
  yarn global add @angular/cli@15
25
- ng update @angular/core@15 @angular/cli@15
26
- ng update @angular/cdk@15
93
+ ng update @angular/core@15 @angular/cli@15 --force
27
94
  ng update @angular-eslint/builder@15
28
95
  ng update @angular-eslint/eslint-plugin @angular-eslint/eslint-plugin-template @angular-eslint/template-parser
29
96
  ng update @typescript-eslint/eslint-plugin @typescript-eslint/parser
30
97
  ng update eslint-plugin-import eslint-plugin-jasmine eslint-plugin-jsdoc eslint-plugin-rxjs-angular
31
98
  ng update eslint
32
99
  ng update eslint-plugin-rxjs@5
33
- ng update ngx-image-cropper@~6.3.2
34
- ng update ng-http-loader@13
35
- ng update dayjs@~1.11.7
36
- ng update rxjs@7
37
100
  ng update \
38
101
  @types/jasmine \
39
102
  @types/node@16 \
40
103
  ts-node@10
41
104
  ng update @dsivd/prestations-ng@latest
42
105
 
43
- yarn add eslint-import-resolver-typescript --dev
44
- yarn add eslint-plugin-rxjs-angular --dev
45
106
  yarn remove eslint-plugin-prefer-arrow
107
+ yarn add eslint-plugin-simple-import-sort --dev
108
+ yarn add eslint-import-resolver-typescript --dev
46
109
  # Remove your resolutions in package.json before executing 'yarn upgrade'
47
110
  yarn upgrade
48
111
  ```
49
112
 
50
- ## Deprecated features
113
+ ### Update "package.json" file to replace tilde(~) by caret(^) on following dependencies to be aligned with prestations-ng library
114
+
115
+ - core-js
116
+ - dayjs
117
+ - ng-http-loader
118
+ - ngx-image-cropper
119
+ - rxjs
120
+ - zone.js
121
+
122
+ Then run
123
+ ```bash
124
+ yarn install
125
+ ```
126
+
127
+ ### Update ".eslintrc.json" file if your project was already migrated to ESLint
128
+
129
+ Replace your current `.eslintrc.json` file by the one found in [ESLINT_MIGRATION.GUIDE](ESLINT_MIGRATION_GUIDE.md#customizing_eslint__inspired_from_otia_and_prestations-ng_s_files_for_rules_)
130
+
131
+ Then run
132
+ ```bash
133
+ ng lint --fix=true
134
+ ```
135
+ and finally fix manually remaining errors
136
+
137
+ ### Cleanup your project due to CLI improvements
138
+
139
+ See section "CLI improvements" in angular's blog (https://blog.angular.io/angular-v15-is-now-available-df7be7f2f4c8)
140
+
141
+ #### Remove files/folder from your project
142
+
143
+ - delete `/src/polyfills.ts` file
144
+ - delete `/src/test.ts` file
145
+ - delete `/src/environments` folder
146
+
147
+ #### Update your `main.ts` file
148
+ ```diff
149
+ -import { enableProdMode } from '@angular/core';
150
+ -import { environment } from './environments/environment';
151
+
152
+ -if (environment.production) {
153
+ - enableProdMode();
154
+ -}
155
+ ```
156
+
157
+ #### Update your `angular.json` file
158
+ ```diff
159
+ {
160
+ "projects": {
161
+ "[YOUR_PROJECT_NAME]": {
162
+ "architect": {
163
+ "build": {
164
+ "options": {
165
+ - "polyfills": "src/polyfills.ts",
166
+ + "polyfills": [
167
+ + "zone.js"
168
+ + ],
169
+ },
170
+ "configurations": {
171
+ "production": {
172
+ - "fileReplacements": [
173
+ - {
174
+ - "replace": "src/environments/environment.ts",
175
+ - "with": "src/environments/environment.prod.ts"
176
+ - }
177
+ - ]
178
+ }
179
+ }
180
+ },
181
+ "test": {
182
+ "options": {
183
+ - "main": "src/test.ts",
184
+ - "polyfills": "src/polyfills.ts",
185
+ + "polyfills": [
186
+ + "zone.js",
187
+ + "zone.js/testing"
188
+ + ],
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ ```
196
+ #### Update your `tsconfig.app.json` file
197
+ ```diff
198
+ {
199
+ "files": [
200
+ "main.ts",
201
+ - "polyfills.ts"
202
+ ],
203
+ }
204
+ ```
51
205
 
52
- ### All components extending FoehnCheckableGroupComponent such as foehn-autocomplete, foehn-checkbox, foehn-radio, foehn-select or your custom components
206
+ #### Update your `tsconfig.spec.json` file
207
+ ```diff
208
+ {
209
+ - "files": [
210
+ - "test.ts",
211
+ - "polyfills.ts"
212
+ - ],
213
+ }
214
+ ```
53
215
 
54
- Removed `@Input() allElementDisabled`. Now managed by setting `@Input() disabled`.
216
+ ### Update `allowedCommonJsDependencies` in your `angular.json` file to add `dayjs`
55
217
 
56
- - removed
57
- ```html
58
- <foehn-radio [allElementDisabled]="true"></foehn-radio>
218
+ ```diff
219
+ {
220
+ "projects": {
221
+ "[YOUR_PROJECT_NAME]": {
222
+ "architect": {
223
+ "build": {
224
+ "options": {
225
+ "allowedCommonJsDependencies": [
226
+ "core-js/modules/es.array.includes",
227
+ "iban",
228
+ - "zone.js/dist/zone-error"
229
+ + "zone.js/dist/zone-error",
230
+ + "dayjs"
231
+ ],
232
+ },
233
+ }
234
+ }
235
+ }
236
+ }
237
+ }
59
238
  ```
60
- - replaced by
61
- ```html
62
- <foehn-radio [disabled]="true"></foehn-radio>
239
+
240
+ ### HttpClientModule (`app.module.ts`)
241
+
242
+ Need to import only once PrestationsNgCoreModule (containing HttpClientModule) in root module and not in lazy modules.
243
+ Need to import only once HttpClientModule in root module done by PrestationsNgCoreModule.
244
+ See 'Usage note' in https://angular.io/api/common/http/HttpInterceptor
245
+
246
+ ```diff
247
+ @NgModule({
248
+ imports: [
249
+ - HttpClientModule,
250
+ NgHttpLoaderModule.forRoot()
251
+ ]
252
+ })
63
253
  ```
254
+
255
+ ### Use HTTP_LOADER_FILTERED_URL in your application to filter URLs in ng-http-loader component
256
+
257
+ - `app.component.ts`: Add a public variable `HTTP_LOADER_FILTERED_URL = HTTP_LOADER_FILTERED_URL;`
258
+ - `app.component.html`: Use the previous variable in `[filteredUrlPatterns]` attribute of `ng-http-loader` (`<ng-http-loader [filteredUrlPatterns]="HTTP_LOADER_FILTERED_URL"></ng-http-loader>`)
259
+
260
+ ### Rename your application page wrapper
261
+
262
+ Rename your application page wrapper (the one containing your `foehn-page`) folder into `page-wrapper` along with it's `.html` and `.ts` files.
263
+
264
+ ### Remove protractor and E2E tests
265
+
266
+ We do not use E2E tests in our applications. If you feel the need to have some, please use `Cypress` (https://docs.cypress.io/guides/getting-started/installing-cypress).
267
+
268
+ #### Remove protractor dependency
269
+
270
+ Since **Angular v12**, **protractor** has been **deprecated** (https://blog.angular.io/the-state-of-end-to-end-testing-with-angular-d175f751cb9c).
271
+ ```bash
272
+ yarn remove protractor
273
+ ```
274
+ Then delete file `front/protractor.conf.js`
275
+
276
+ #### Remove E2E test
277
+
278
+ - Delete folder `front/e2e`
279
+ - Remove `e2e/tsconfig.e2e.json` from `.eslintrc.json` file
280
+ ```diff
281
+ {
282
+ "overrides": [
283
+ // Typescript
284
+ {
285
+ "files": ["*.ts"],
286
+ "parserOptions": {
287
+ "project": [
288
+ "tsconfig.json",
289
+ - "e2e/tsconfig.e2e.json"
290
+ ],
291
+ }
292
+ }
293
+ ]
294
+ }
295
+ ```
296
+ - Remove script `"e2e": "ng e2e"` in `package.json` file
297
+ ```diff
298
+ {
299
+ "scripts": {
300
+ "ng": "ng",
301
+ "start": "ng serve",
302
+ "build": "ng build --configuration production",
303
+ "test": "ng test",
304
+ + "lint": "ng lint"
305
+ - "lint": "ng lint",
306
+ - "e2e": "ng e2e"
307
+ }
308
+ }
309
+ ```
310
+ - Remove E2E project from `angular.json` file
311
+ ```diff
312
+ {
313
+ "projects": {
314
+ - "[YOUR_PROJECT_NAME]-e2e": {
315
+ - "root": "e2e",
316
+ - "sourceRoot": "e2e",
317
+ - "projectType": "application",
318
+ - "architect": {
319
+ - "e2e": {
320
+ - "builder": "@angular-devkit/build-angular:protractor",
321
+ - "options": {
322
+ - "protractorConfig": "./protractor.conf.js",
323
+ - "devServerTarget": "skeleton:serve"
324
+ - }
325
+ - },
326
+ - "lint": {
327
+ - "builder": "@angular-eslint/builder:lint",
328
+ - "options": {
329
+ - "lintFilePatterns": [
330
+ - "e2e/**/*.ts",
331
+ - "e2e/**/*.html"
332
+ - ]
333
+ - }
334
+ - }
335
+ - }
336
+ - }
337
+ - },
338
+ }
339
+ ```
340
+
341
+ ### Use puppeteer when running tests
342
+
343
+ #### Add puppeteer dependency
344
+ ```bash
345
+ yarn add puppeteer --dev
346
+ ```
347
+
348
+ #### Update `karma.conf.js` file
349
+ ```diff
350
+ +process.env.CHROMIUM_BIN = require('puppeteer').executablePath();
351
+
352
+ module.exports = function(config) {
353
+ config.set({
354
+ ```
355
+
356
+ #### Cleanup your jenkins files
357
+
358
+ Remove `chromium-headless` label attribute on your args.
359
+
360
+ ##### UT folder
361
+ ```diff
362
+ def args = [
363
+ nodeVersion: 16,
364
+ - label: 'chromium-headless'
365
+ ]
366
+ ```
367
+ ##### devex > snap folder
368
+ ```diff
369
+ def buildArgs = [
370
+ nodeVersion : 16,
371
+ - label: 'chromium-headless'
372
+ ]
373
+ ```
374
+ ##### devex > stable folder
375
+ ```diff
376
+ def args = [
377
+ nodeVersion : 16,
378
+ - label: 'chromium-headless'
379
+ ]
380
+ ```
381
+
382
+ ### Deprecated features
383
+ #### Checkables
384
+
385
+ For all components extending FoehnCheckableGroupComponent such as:
386
+ - foehn-autocomplete
387
+ - foehn-checkbox
388
+ - foehn-radio
389
+ - foehn-select
390
+ - or your custom components
391
+
392
+ we have removed `@Input() allElementDisabled` to replace it by `@Input() disabled`.
393
+
394
+ See below exemple on our `foehn-radio` component:
395
+ ```diff
396
+ <foehn-radio
397
+
398
+ - [allElementDisabled]="true"
399
+ + [disabled]="true"
400
+
401
+ ></foehn-radio>
402
+ ```
403
+
404
+ #### Uploaders
405
+ - [foehn-bo-multi-upload.component.ts](projects/prestations-ng/src/foehn-upload/foehn-bo-multi-upload/foehn-bo-multi-upload.component.ts)
406
+ - [foehn-multi-upload.component.ts](projects/prestations-ng/src/foehn-upload/foehn-multi-upload/foehn-multi-upload.component.ts)
407
+ - remove `[overrideMaxSizeInMo]="xx"`. Now managed by the backend (see `DocumentProperties.fileMaxSizeByFormKey`)
408
+
409
+ ### Last but not least, check if your application is working!!!
410
+ ```bash
411
+ yarn build
412
+ yarn start
413
+ ```
414
+
415
+ ## PRESTATIONS-BE
416
+ ### Library upgrade
417
+
418
+ see https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.7-Release-Notes#upgrading-from-spring-boot-26
419
+
420
+ if you're using `org.springframework.boot.spring-boot-starter-parent` :
421
+ ```diff
422
+ <parent>
423
+ <groupId>org.springframework.boot</groupId>
424
+ <artifactId>spring-boot-starter-parent</artifactId>
425
+ - <version>2.6.x</version>
426
+ + <version>2.7.x</version>
427
+ <relativePath />
428
+ </parent>
429
+ ```
430
+
431
+ ```diff
432
+ - <prestations-be.version>15.x.x</prestations-be.version>
433
+ + <prestations-be.version>16.x.x</prestations-be.version>
434
+ ```
435
+
436
+ if you're using `ch.vd.cyber.parent.application-parent
437
+ ```diff
438
+ <parent>
439
+ <groupId>ch.vd.cyber.parent</groupId>
440
+ <artifactId>application-parent</artifactId>
441
+ - <version>11.x.x</version>
442
+ + <version>12.x.x</version>
443
+ <relativePath/>
444
+ </parent>
445
+ ```
446
+
447
+ ### WebServiceProperties
448
+ You should migrate your technical user (`webservice.username`) to a MiZo generated user.
449
+ Ask your **Intégrateur référent** if you're not sure.
450
+
451
+ ### Ref-inf
452
+
453
+ When using refinf :
454
+ ```diff
455
+ - refinf.baseUrl=https://int-esgate.vd.ch/refinf-rf/v5
456
+ + cyber-cache.base-url=https://int-esgate.vd.ch/cybercache-in
457
+ ```
458
+
459
+ When not using refinf (and SdkConfig.class is imported)
460
+ ```diff
461
+ - refinf.configuration.enabled=false
462
+ + cyber-cache.configuration.enabled=false
463
+ ```
464
+
465
+ ### DocumentProperties
466
+ if you're having one or more uploader, you have to define the max size for a file on each uploader in your `application.properties` :
467
+ i.e. `document.file-max-size-by-form-key.identityCard=5MB`
468
+
469
+ ### Verification page
470
+ When possible, the verification page should use the same data as the confirmation PDF
471
+ see example in skeleton : https://dsigit.etat-de-vaud.ch/outils/git/projects/CYBSDK/repos/skeleton/browse/front/src/app/verification-page
@@ -212,9 +212,9 @@ export class AbstractPageComponent {
212
212
  window.scrollTo(0, 0);
213
213
  }
214
214
  }
215
- AbstractPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: AbstractPageComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Directive });
216
- AbstractPageComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.2", type: AbstractPageComponent, viewQueries: [{ propertyName: "foehnFormComponent", first: true, predicate: FoehnFormComponent, descendants: true, static: true }], ngImport: i0 });
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: AbstractPageComponent, decorators: [{
215
+ AbstractPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AbstractPageComponent, deps: [{ token: i1.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Directive });
216
+ AbstractPageComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: AbstractPageComponent, viewQueries: [{ propertyName: "foehnFormComponent", first: true, predicate: FoehnFormComponent, descendants: true, static: true }], ngImport: i0 });
217
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: AbstractPageComponent, decorators: [{
218
218
  type: Directive
219
219
  }], ctorParameters: function () { return [{ type: i1.ActivatedRoute }]; }, propDecorators: { foehnFormComponent: [{
220
220
  type: ViewChild,
@@ -125,9 +125,9 @@ export class NumberCurrencyFormatterDirective {
125
125
  this.host.model.toString() !== newValueWithoutFormatting);
126
126
  }
127
127
  }
128
- NumberCurrencyFormatterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: NumberCurrencyFormatterDirective, deps: [{ token: i1.FoehnInputNumberComponent }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
129
- NumberCurrencyFormatterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.2", type: NumberCurrencyFormatterDirective, selector: "[numberCurrencyFormatter]", host: { listeners: { "blur": "onBlur($event.target.value)", "focus": "onFocus($event.target.value)", "modelChange": "onModelChange($event)" } }, ngImport: i0 });
130
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.2", ngImport: i0, type: NumberCurrencyFormatterDirective, decorators: [{
128
+ NumberCurrencyFormatterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NumberCurrencyFormatterDirective, deps: [{ token: i1.FoehnInputNumberComponent }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
129
+ NumberCurrencyFormatterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.1.4", type: NumberCurrencyFormatterDirective, selector: "[numberCurrencyFormatter]", host: { listeners: { "blur": "onBlur($event.target.value)", "focus": "onFocus($event.target.value)", "modelChange": "onModelChange($event)" } }, ngImport: i0 });
130
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.4", ngImport: i0, type: NumberCurrencyFormatterDirective, decorators: [{
131
131
  type: Directive,
132
132
  args: [{ selector: '[numberCurrencyFormatter]' }]
133
133
  }], ctorParameters: function () { return [{ type: i1.FoehnInputNumberComponent }, { type: i0.NgZone }]; }, propDecorators: { onBlur: [{