@gloww/gloww 0.9.0-beta.2

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 (308) hide show
  1. package/README.md +24 -0
  2. package/compute-version.js +117 -0
  3. package/esm2020/gloww-gloww.mjs +5 -0
  4. package/esm2020/lib/Components/code-editor/code-editor.component.mjs +59 -0
  5. package/esm2020/lib/Components/confirmation/confirmation.component.mjs +43 -0
  6. package/esm2020/lib/Components/display-objects/display-objects.component.mjs +440 -0
  7. package/esm2020/lib/Components/display-objects-configuration.mjs +2 -0
  8. package/esm2020/lib/Components/download-progress/download-progress.component.mjs +119 -0
  9. package/esm2020/lib/Components/folders/file-edit/file-edit.component.mjs +71 -0
  10. package/esm2020/lib/Components/folders/folders/folders.component.mjs +180 -0
  11. package/esm2020/lib/Components/header/header.component.mjs +14 -0
  12. package/esm2020/lib/Components/html-editor/html-editor.component.mjs +175 -0
  13. package/esm2020/lib/Components/menu-list-item/menu-list-item.component.mjs +97 -0
  14. package/esm2020/lib/Components/prompt/prompt.component.mjs +52 -0
  15. package/esm2020/lib/Components/result-table/result-table.component.mjs +21 -0
  16. package/esm2020/lib/Components/search-form/search-form.component.mjs +14 -0
  17. package/esm2020/lib/Components/secure-a/secure-a.component.mjs +31 -0
  18. package/esm2020/lib/Components/secure-img/secure-img.component.mjs +45 -0
  19. package/esm2020/lib/Components/upload-doc/upload-doc.component.mjs +95 -0
  20. package/esm2020/lib/Components/upload-file/upload-file.component.mjs +136 -0
  21. package/esm2020/lib/Directives/file-sink.directive.mjs +52 -0
  22. package/esm2020/lib/Models/nav-item.mjs +2 -0
  23. package/esm2020/lib/Pipes/html-format.pipe.mjs +23 -0
  24. package/esm2020/lib/Pipes/retry-with-delay.mjs +12 -0
  25. package/esm2020/lib/Pipes/safe-html.pipe.mjs +22 -0
  26. package/esm2020/lib/Pipes/secure.pipe.mjs +34 -0
  27. package/esm2020/lib/Services/dialog.service.mjs +29 -0
  28. package/esm2020/lib/Services/folder-service-config.mjs +21 -0
  29. package/esm2020/lib/Services/folder.service.mjs +50 -0
  30. package/esm2020/lib/Services/gloww.service.mjs +44 -0
  31. package/esm2020/lib/Services/nav.service.mjs +28 -0
  32. package/esm2020/lib/Services/version-check.service.mjs +81 -0
  33. package/esm2020/lib/Services/voice-recognition.service.mjs +55 -0
  34. package/esm2020/lib/gloww-security/Components/change-password-dlg/change-password-dlg.component.mjs +67 -0
  35. package/esm2020/lib/gloww-security/Components/login/login.component.mjs +173 -0
  36. package/esm2020/lib/gloww-security/Components/social-network/social-network.component.mjs +46 -0
  37. package/esm2020/lib/gloww-security/Components/social-network-dlg/social-network-dlg.component.mjs +52 -0
  38. package/esm2020/lib/gloww-security/Components/user-menu/user-menu.component.mjs +73 -0
  39. package/esm2020/lib/gloww-security/Helpers/administrator.guard.mjs +27 -0
  40. package/esm2020/lib/gloww-security/Helpers/auth.guard.mjs +57 -0
  41. package/esm2020/lib/gloww-security/Helpers/error.interceptor.mjs +29 -0
  42. package/esm2020/lib/gloww-security/Helpers/index.mjs +5 -0
  43. package/esm2020/lib/gloww-security/Helpers/jwt.interceptor.mjs +31 -0
  44. package/esm2020/lib/gloww-security/Helpers/staging.interceptor.mjs +24 -0
  45. package/esm2020/lib/gloww-security/Models/oauthassociation.mjs +6 -0
  46. package/esm2020/lib/gloww-security/Models/user.mjs +3 -0
  47. package/esm2020/lib/gloww-security/Services/authentication-service-config.mjs +25 -0
  48. package/esm2020/lib/gloww-security/Services/authentication.service.mjs +205 -0
  49. package/esm2020/lib/gloww-security/Services/gloww-security.service.mjs +14 -0
  50. package/esm2020/lib/gloww-security/gloww-security.module.mjs +171 -0
  51. package/esm2020/lib/gloww.module.mjs +220 -0
  52. package/esm2020/lib/injection-token.mjs +3 -0
  53. package/esm2020/public-api.mjs +32 -0
  54. package/fesm2015/gloww-gloww.mjs +3018 -0
  55. package/fesm2015/gloww-gloww.mjs.map +1 -0
  56. package/fesm2020/gloww-gloww.mjs +2980 -0
  57. package/fesm2020/gloww-gloww.mjs.map +1 -0
  58. package/gloww-assets/.gitkeep +0 -0
  59. package/gloww-assets/7SS_logo.svg +1 -0
  60. package/gloww-assets/7SS_wobl.svg +1 -0
  61. package/gloww-assets/7stars.png +0 -0
  62. package/gloww-assets/gloww.svg +316 -0
  63. package/gloww-assets/images/google_signin_buttons/Google_signin_button.sketch +0 -0
  64. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_dark_disabled_hdpi.9.png +0 -0
  65. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_dark_focus_hdpi.9.png +0 -0
  66. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_dark_normal_hdpi.9.png +0 -0
  67. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_dark_pressed_hdpi.9.png +0 -0
  68. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_light_disabled_hdpi.9.png +0 -0
  69. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_light_focus_hdpi.9.png +0 -0
  70. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_light_normal_hdpi.9.png +0 -0
  71. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_light_pressed_hdpi.9.png +0 -0
  72. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_dark_disabled_hdpi.9.png +0 -0
  73. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_dark_focus_hdpi.9.png +0 -0
  74. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_dark_normal_hdpi.9.png +0 -0
  75. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_dark_pressed_hdpi.9.png +0 -0
  76. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_light_disabled_hdpi.9.png +0 -0
  77. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_light_focus_hdpi.9.png +0 -0
  78. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_light_normal_hdpi.9.png +0 -0
  79. package/gloww-assets/images/google_signin_buttons/android/hdpi/btn_google_signin_light_pressed_hdpi.9.png +0 -0
  80. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_dark_disabled_ldpi.9.png +0 -0
  81. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_dark_focus_ldpi.9.png +0 -0
  82. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_dark_normal_ldpi.9.png +0 -0
  83. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_dark_pressed_ldpi.9.png +0 -0
  84. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_light_disabled_ldpi.9.png +0 -0
  85. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_light_focus_ldpi.9.png +0 -0
  86. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_light_normal_ldpi.9.png +0 -0
  87. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_light_pressed_ldpi.9.png +0 -0
  88. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_dark_disabled_ldpi.9.png +0 -0
  89. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_dark_focus_ldpi.9.png +0 -0
  90. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_dark_normal_ldpi.9.png +0 -0
  91. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_dark_pressed_ldpi.9.png +0 -0
  92. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_light_disabled_ldpi.9.png +0 -0
  93. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_light_focus_ldpi.9.png +0 -0
  94. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_light_normal_ldpi.9.png +0 -0
  95. package/gloww-assets/images/google_signin_buttons/android/ldpi/btn_google_signin_light_pressed_ldpi.9.png +0 -0
  96. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_dark_disabled_mdpi.9.png +0 -0
  97. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_dark_focus_mdpi.9.png +0 -0
  98. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_dark_normal_mdpi.9.png +0 -0
  99. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_dark_pressed_mdpi.9.png +0 -0
  100. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_light_disabled_mdpi.9.png +0 -0
  101. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_light_focus_mdpi.9.png +0 -0
  102. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_light_normal_mdpi.9.png +0 -0
  103. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_light_pressed_mdpi.9.png +0 -0
  104. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_dark_disabled_mdpi.9.png +0 -0
  105. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_dark_focus_mdpi.9.png +0 -0
  106. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_dark_normal_mdpi.9.png +0 -0
  107. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_dark_pressed_mdpi.9.png +0 -0
  108. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_light_disabled_mdpi.9.png +0 -0
  109. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_light_focus_mdpi.9.png +0 -0
  110. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_light_normal_mdpi.9.png +0 -0
  111. package/gloww-assets/images/google_signin_buttons/android/mdpi/btn_google_signin_light_pressed_mdpi.9.png +0 -0
  112. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_dark_disabled_tvdpi.9.png +0 -0
  113. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_dark_focus_tvdpi.9.png +0 -0
  114. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_dark_normal_tvdpi.9.png +0 -0
  115. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_dark_pressed_tvdpi.9.png +0 -0
  116. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_light_disabled_tvdpi.9.png +0 -0
  117. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_light_focus_tvdpi.9.png +0 -0
  118. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_light_normal_tvdpi.9.png +0 -0
  119. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_light_pressed_tvdpi.9.png +0 -0
  120. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_dark_disabled_tvdpi.9.png +0 -0
  121. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_dark_focus_tvdpi.9.png +0 -0
  122. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_dark_normal_tvdpi.9.png +0 -0
  123. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_dark_pressed_tvdpi.9.png +0 -0
  124. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_light_disabled_tvdpi.9.png +0 -0
  125. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_light_focus_tvdpi.9.png +0 -0
  126. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_light_normal_tvdpi.9.png +0 -0
  127. package/gloww-assets/images/google_signin_buttons/android/tvdpi/btn_google_signin_light_pressed_tvdpi.9.png +0 -0
  128. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_dark_disabled_xhdpi.9.png +0 -0
  129. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_dark_focus_xhdpi.9.png +0 -0
  130. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_dark_normal_xhdpi.9.png +0 -0
  131. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_dark_pressed_xhdpi.9.png +0 -0
  132. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_light_disabled_xhdpi.9.png +0 -0
  133. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_light_focus_xhdpi.9.png +0 -0
  134. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_light_normal_xhdpi.9.png +0 -0
  135. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_light_pressed_xhdpi.9.png +0 -0
  136. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_dark_disabled_xhdpi.9.png +0 -0
  137. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_dark_focus_xhdpi.9.png +0 -0
  138. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_dark_normal_xhdpi.9.png +0 -0
  139. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_dark_pressed_xhdpi.9.png +0 -0
  140. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_light_disabled_xhdpi.9.png +0 -0
  141. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_light_focus_xhdpi.9.png +0 -0
  142. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_light_normal_xhdpi.9.png +0 -0
  143. package/gloww-assets/images/google_signin_buttons/android/xhdpi/btn_google_signin_light_pressed_xhdpi.9.png +0 -0
  144. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_dark_disabled_xxhdpi.9.png +0 -0
  145. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_dark_focus_xxhdpi.9.png +0 -0
  146. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_dark_normal_xxhdpi.9.png +0 -0
  147. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_dark_pressed_xxhdpi.9.png +0 -0
  148. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_light_disabled_xxhdpi.9.png +0 -0
  149. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_light_focus_xxhdpi.9.png +0 -0
  150. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_light_normal_xxhdpi.9.png +0 -0
  151. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_light_pressed_xxhdpi.9.png +0 -0
  152. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_dark_disabled_xxhdpi.9.png +0 -0
  153. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_dark_focus_xxhdpi.9.png +0 -0
  154. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_dark_normal_xxhdpi.9.png +0 -0
  155. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_dark_pressed_xxhdpi.9.png +0 -0
  156. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_light_disabled_xxhdpi.9.png +0 -0
  157. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_light_focus_xxhdpi.9.png +0 -0
  158. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_light_normal_xxhdpi.9.png +0 -0
  159. package/gloww-assets/images/google_signin_buttons/android/xxhdpi/btn_google_signin_light_pressed_xxhdpi.9.png +0 -0
  160. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_dark_disabled_xxxhdpi.9.png +0 -0
  161. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_dark_focus_xxxhdpi.9.png +0 -0
  162. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_dark_normal_xxxhdpi.9.png +0 -0
  163. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_dark_pressed_xxxhdpi.9.png +0 -0
  164. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_light_disabled_xxxhdpi.9.png +0 -0
  165. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_light_focus_xxxhdpi.9.png +0 -0
  166. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_light_normal_xxxhdpi.9.png +0 -0
  167. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_light_pressed_xxxhdpi.9.png +0 -0
  168. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_dark_disabled_xxxhdpi.9.png +0 -0
  169. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_dark_focus_xxxhdpi.9.png +0 -0
  170. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_dark_normal_xxxhdpi.9.png +0 -0
  171. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_dark_pressed_xxxhdpi.9.png +0 -0
  172. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_light_disabled_xxxhdpi.9.png +0 -0
  173. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_light_focus_xxxhdpi.9.png +0 -0
  174. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_light_normal_xxxhdpi.9.png +0 -0
  175. package/gloww-assets/images/google_signin_buttons/android/xxxhdpi/btn_google_signin_light_pressed_xxxhdpi.9.png +0 -0
  176. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_dark_disabled_ios.png +0 -0
  177. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_dark_focus_ios.png +0 -0
  178. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_dark_normal_ios.png +0 -0
  179. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_dark_pressed_ios.png +0 -0
  180. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_light_disabled_ios.png +0 -0
  181. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_light_focus_ios.png +0 -0
  182. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_light_normal_ios.png +0 -0
  183. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_light_pressed_ios.png +0 -0
  184. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_dark_disabled_ios.png +0 -0
  185. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_dark_focus_ios.png +0 -0
  186. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_dark_normal_ios.png +0 -0
  187. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_dark_pressed_ios.png +0 -0
  188. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_light_disabled_ios.png +0 -0
  189. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_light_focus_ios.png +0 -0
  190. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_light_normal_ios.png +0 -0
  191. package/gloww-assets/images/google_signin_buttons/ios/1x/btn_google_signin_light_pressed_ios.png +0 -0
  192. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_dark_disabled_ios@2x.png +0 -0
  193. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_dark_focus_ios@2x.png +0 -0
  194. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_dark_normal_ios@2x.png +0 -0
  195. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_dark_pressed_ios@2x.png +0 -0
  196. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_light_disabled_ios@2x.png +0 -0
  197. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_light_focus_ios@2x.png +0 -0
  198. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_light_normal_ios@2x.png +0 -0
  199. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_light_pressed_ios@2x.png +0 -0
  200. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_dark_disabled_ios@2x.png +0 -0
  201. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_dark_focus_ios@2x.png +0 -0
  202. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_dark_normal_ios@2x.png +0 -0
  203. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_dark_pressed_ios@2x.png +0 -0
  204. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_light_disabled_ios@2x.png +0 -0
  205. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_light_focus_ios@2x.png +0 -0
  206. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_light_normal_ios@2x.png +0 -0
  207. package/gloww-assets/images/google_signin_buttons/ios/2x/btn_google_signin_light_pressed_ios@2x.png +0 -0
  208. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_dark_disabled_ios@3x.png +0 -0
  209. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_dark_focus_ios@3x.png +0 -0
  210. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_dark_normal_ios@3x.png +0 -0
  211. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_dark_pressed_ios@3x.png +0 -0
  212. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_light_disabled_ios@3x.png +0 -0
  213. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_light_focus_ios@3x.png +0 -0
  214. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_light_normal_ios@3x.png +0 -0
  215. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_light_pressed_ios@3x.png +0 -0
  216. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_dark_disabled_ios@3x.png +0 -0
  217. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_dark_focus_ios@3x.png +0 -0
  218. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_dark_normal_ios@3x.png +0 -0
  219. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_dark_pressed_ios@3x.png +0 -0
  220. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_light_disabled_ios@3x.png +0 -0
  221. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_light_focus_ios@3x.png +0 -0
  222. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_light_normal_ios@3x.png +0 -0
  223. package/gloww-assets/images/google_signin_buttons/ios/3x/btn_google_signin_light_pressed_ios@3x.png +0 -0
  224. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_dark_disabled_web.png +0 -0
  225. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_dark_focus_web.png +0 -0
  226. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_dark_normal_web.png +0 -0
  227. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_dark_pressed_web.png +0 -0
  228. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_light_disabled_web.png +0 -0
  229. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_light_focus_web.png +0 -0
  230. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_light_normal_web.png +0 -0
  231. package/gloww-assets/images/google_signin_buttons/web/1x/btn_google_signin_light_pressed_web.png +0 -0
  232. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_dark_disabled_web@2x.png +0 -0
  233. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_dark_focus_web@2x.png +0 -0
  234. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_dark_normal_web@2x.png +0 -0
  235. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_dark_pressed_web@2x.png +0 -0
  236. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_light_disabled_web@2x.png +0 -0
  237. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_light_focus_web@2x.png +0 -0
  238. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_light_normal_web@2x.png +0 -0
  239. package/gloww-assets/images/google_signin_buttons/web/2x/btn_google_signin_light_pressed_web@2x.png +0 -0
  240. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_disabled_ios.eps +814 -0
  241. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_disabled_ios.svg +24 -0
  242. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_focus_ios.eps +1866 -0
  243. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_focus_ios.svg +51 -0
  244. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_normal_ios.eps +1031 -0
  245. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_normal_ios.svg +50 -0
  246. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_pressed_ios.eps +1031 -0
  247. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_dark_pressed_ios.svg +50 -0
  248. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_disabled_ios.eps +814 -0
  249. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_disabled_ios.svg +24 -0
  250. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_focus_ios.eps +1837 -0
  251. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_focus_ios.svg +44 -0
  252. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_normal_ios.eps +1002 -0
  253. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_normal_ios.svg +43 -0
  254. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_pressed_ios.eps +1002 -0
  255. package/gloww-assets/images/google_signin_buttons/web/vector/btn_google_light_pressed_ios.svg +43 -0
  256. package/gloww-assets/swagger.svg +1 -0
  257. package/gloww-gloww.d.ts +5 -0
  258. package/lib/Components/code-editor/code-editor.component.d.ts +16 -0
  259. package/lib/Components/confirmation/confirmation.component.d.ts +20 -0
  260. package/lib/Components/display-objects/display-objects.component.d.ts +90 -0
  261. package/lib/Components/display-objects-configuration.d.ts +5 -0
  262. package/lib/Components/download-progress/download-progress.component.d.ts +30 -0
  263. package/lib/Components/folders/file-edit/file-edit.component.d.ts +31 -0
  264. package/lib/Components/folders/folders/folders.component.d.ts +33 -0
  265. package/lib/Components/header/header.component.d.ts +8 -0
  266. package/lib/Components/html-editor/html-editor.component.d.ts +36 -0
  267. package/lib/Components/menu-list-item/menu-list-item.component.d.ts +22 -0
  268. package/lib/Components/prompt/prompt.component.d.ts +25 -0
  269. package/lib/Components/result-table/result-table.component.d.ts +11 -0
  270. package/lib/Components/search-form/search-form.component.d.ts +8 -0
  271. package/lib/Components/secure-a/secure-a.component.d.ts +13 -0
  272. package/lib/Components/secure-img/secure-img.component.d.ts +17 -0
  273. package/lib/Components/upload-doc/upload-doc.component.d.ts +19 -0
  274. package/lib/Components/upload-file/upload-file.component.d.ts +34 -0
  275. package/lib/Directives/file-sink.directive.d.ts +11 -0
  276. package/lib/Models/nav-item.d.ts +8 -0
  277. package/lib/Pipes/html-format.pipe.d.ts +10 -0
  278. package/lib/Pipes/retry-with-delay.d.ts +2 -0
  279. package/lib/Pipes/safe-html.pipe.d.ts +10 -0
  280. package/lib/Pipes/secure.pipe.d.ts +13 -0
  281. package/lib/Services/dialog.service.d.ts +11 -0
  282. package/lib/Services/folder-service-config.d.ts +7 -0
  283. package/lib/Services/folder.service.d.ts +19 -0
  284. package/lib/Services/gloww.service.d.ts +17 -0
  285. package/lib/Services/nav.service.d.ts +13 -0
  286. package/lib/Services/version-check.service.d.ts +30 -0
  287. package/lib/Services/voice-recognition.service.d.ts +14 -0
  288. package/lib/gloww-security/Components/change-password-dlg/change-password-dlg.component.d.ts +19 -0
  289. package/lib/gloww-security/Components/login/login.component.d.ts +43 -0
  290. package/lib/gloww-security/Components/social-network/social-network.component.d.ts +25 -0
  291. package/lib/gloww-security/Components/social-network-dlg/social-network-dlg.component.d.ts +21 -0
  292. package/lib/gloww-security/Components/user-menu/user-menu.component.d.ts +24 -0
  293. package/lib/gloww-security/Helpers/administrator.guard.d.ts +14 -0
  294. package/lib/gloww-security/Helpers/auth.guard.d.ts +14 -0
  295. package/lib/gloww-security/Helpers/error.interceptor.d.ts +11 -0
  296. package/lib/gloww-security/Helpers/index.d.ts +4 -0
  297. package/lib/gloww-security/Helpers/jwt.interceptor.d.ts +11 -0
  298. package/lib/gloww-security/Helpers/staging.interceptor.d.ts +9 -0
  299. package/lib/gloww-security/Models/oauthassociation.d.ts +7 -0
  300. package/lib/gloww-security/Models/user.d.ts +9 -0
  301. package/lib/gloww-security/Services/authentication-service-config.d.ts +17 -0
  302. package/lib/gloww-security/Services/authentication.service.d.ts +40 -0
  303. package/lib/gloww-security/Services/gloww-security.service.d.ts +6 -0
  304. package/lib/gloww-security/gloww-security.module.d.ts +35 -0
  305. package/lib/gloww.module.d.ts +59 -0
  306. package/lib/injection-token.d.ts +2 -0
  307. package/package.json +39 -0
  308. package/public-api.d.ts +28 -0
@@ -0,0 +1,2980 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Injectable, Pipe, Component, Inject, Input, EventEmitter, Directive, HostBinding, Output, HostListener, ViewChild, ContentChildren, PLATFORM_ID, Optional, ContentChild, NgModule, SecurityContext } from '@angular/core';
3
+ import { Subject, BehaviorSubject, of, combineLatest, forkJoin, throwError } from 'rxjs';
4
+ import * as i1 from '@angular/common/http';
5
+ import { HttpParams, HttpEventType, HTTP_INTERCEPTORS, HttpClientModule, HttpResponse } from '@angular/common/http';
6
+ import * as i1$2 from '@angular/material/dialog';
7
+ import { MAT_DIALOG_DATA, MatDialogConfig, MatDialogModule } from '@angular/material/dialog';
8
+ import * as i5 from '@angular/material/button';
9
+ import { MatButtonModule } from '@angular/material/button';
10
+ import * as i3 from '@angular/common';
11
+ import { isPlatformBrowser, CommonModule } from '@angular/common';
12
+ import * as i1$1 from '@angular/platform-browser';
13
+ import { BrowserModule } from '@angular/platform-browser';
14
+ import * as i2 from '@angular/router';
15
+ import { NavigationEnd, RouterModule } from '@angular/router';
16
+ import * as i5$3 from '@gloww/angular-editor';
17
+ import { AngularEditorModule } from '@gloww/angular-editor';
18
+ import { switchMap, map, tap, filter, catchError, take, mergeMap, retryWhen, scan, delay, first } from 'rxjs/operators';
19
+ import * as i15 from '@angular/material/sort';
20
+ import { MatSort, MatSortModule } from '@angular/material/sort';
21
+ import * as i13 from '@angular/material/paginator';
22
+ import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
23
+ import * as i12 from '@angular/material/table';
24
+ import { MatColumnDef, MatTableDataSource, MatTable, MatTableModule } from '@angular/material/table';
25
+ import * as i14 from '@angular/material/progress-spinner';
26
+ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
27
+ import * as i5$1 from '@angular/material/card';
28
+ import { MatCardModule } from '@angular/material/card';
29
+ import * as i11 from '@angular/material/icon';
30
+ import { MatIconModule } from '@angular/material/icon';
31
+ import * as i5$2 from '@angular/material/input';
32
+ import { MatInputModule } from '@angular/material/input';
33
+ import * as i1$4 from '@ctrl/ngx-codemirror';
34
+ import { CodemirrorModule } from '@ctrl/ngx-codemirror';
35
+ import * as i1$3 from '@angular/forms';
36
+ import { NG_VALUE_ACCESSOR, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
37
+ import * as i2$1 from '@angular/material/progress-bar';
38
+ import { MatProgressBarModule } from '@angular/material/progress-bar';
39
+ import * as i7 from '@angular/material/form-field';
40
+ import { MatFormFieldModule } from '@angular/material/form-field';
41
+ import * as i8 from '@angular/material/select';
42
+ import { MatSelectModule } from '@angular/material/select';
43
+ import * as i9 from '@angular/material/core';
44
+ import { trigger, state, style, transition, animate } from '@angular/animations';
45
+ import * as i9$1 from '@angular/flex-layout/flex';
46
+ import * as i4 from '@angular/flex-layout/extended';
47
+ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
48
+ import { FlexLayoutModule } from '@angular/flex-layout';
49
+ import { MatToolbarModule } from '@angular/material/toolbar';
50
+ import { MatSidenavModule } from '@angular/material/sidenav';
51
+ import jwt_decode from 'jwt-decode';
52
+ import * as FileSaver from 'file-saver';
53
+ import * as JSZip from 'jszip';
54
+
55
+ const API_SERVER_URL = new InjectionToken('ApiServerUrl.config');
56
+ const GLOWW_APPLI = new InjectionToken('GlowwAppli.config');
57
+ // @Injectable({
58
+ // providedIn: 'root'
59
+ // })
60
+ class GlowwService {
61
+ constructor(http, BasePath, ApiServerUrl, platformLocation) {
62
+ this.platformLocation = platformLocation;
63
+ this.InternalBasePath = '???';
64
+ this.basePathChange = new Subject();
65
+ this.baseUrl = '/';
66
+ this.baseHref = platformLocation.getBaseHrefFromDOM();
67
+ this.InternalBasePath = BasePath;
68
+ if (ApiServerUrl) {
69
+ this.baseUrl = ApiServerUrl;
70
+ if (!this.baseUrl.endsWith('/')) {
71
+ this.baseUrl += '/';
72
+ }
73
+ }
74
+ }
75
+ get basePath() {
76
+ return this.InternalBasePath;
77
+ }
78
+ set basePath(value) {
79
+ this.InternalBasePath = value;
80
+ this.basePathChange.next(value);
81
+ }
82
+ getParams(obj) {
83
+ let params = new HttpParams();
84
+ if (!obj) {
85
+ return params;
86
+ }
87
+ Object.keys(obj).forEach(p => {
88
+ if (obj[p]) {
89
+ params = params.append(p.toString(), obj[p].toString());
90
+ }
91
+ });
92
+ return params;
93
+ }
94
+ }
95
+
96
+ class VersionCheckService {
97
+ constructor(http) {
98
+ this.http = http;
99
+ // this will be replaced by actual hash post-build.js
100
+ this.currentHash = '{{POST_BUILD_ENTERS_HASH_HERE}}';
101
+ }
102
+ /**
103
+ * Checks in every set frequency the version of frontend application
104
+ * @param url the url to test (default : /version.json)
105
+ * @param frequency - in milliseconds, defaults to 1 minutes
106
+ * @param callback - function to call when the version is different, default askReloadApplication
107
+ */
108
+ initVersionCheck(url = '/version.json', frequency = 1000 * 60, callback = this.askReloadApplication) {
109
+ this.callback = callback;
110
+ this.url = url;
111
+ this.checkVersion();
112
+ setInterval(() => {
113
+ this.checkVersion();
114
+ }, frequency);
115
+ }
116
+ askReloadApplication() {
117
+ console.log('askReload');
118
+ // ENTER YOUR CODE TO DO SOMETHING UPON VERSION CHANGE
119
+ if (confirm('Une nouvelle version est disponible sur le serveur. Il est nécessaire de recharger l\'application. Veuillez confirmer le rechargement de l\'application')) {
120
+ this.reloadApplication();
121
+ }
122
+ }
123
+ reloadApplication() {
124
+ console.log('reload');
125
+ let search = location.search;
126
+ if (search) {
127
+ search += '&';
128
+ }
129
+ search += '___t=' + new Date().getTime();
130
+ console.log(`Search ${search}`);
131
+ location.search = search;
132
+ }
133
+ checkVersion() {
134
+ // timestamp these requests to invalidate caches
135
+ this.http.get(this.url + '?t=' + new Date().getTime())
136
+ // .first()
137
+ .subscribe((response) => {
138
+ console.log('get version ok');
139
+ const hash = response.hash;
140
+ const hashChanged = this.hasHashChanged(this.currentHash, hash);
141
+ console.log(`HASH : Current : ${this.currentHash}, New : ${hash}, Changed ${hashChanged}`);
142
+ // If new version, do something
143
+ if (hashChanged) {
144
+ this.callback();
145
+ }
146
+ // store the new hash so we wouldn't trigger versionChange again
147
+ // only necessary in case you did not force refresh
148
+ this.currentHash = hash;
149
+ }, (err) => {
150
+ console.error(err, 'Could not get version');
151
+ });
152
+ }
153
+ /**
154
+ * Checks if hash has changed.
155
+ * This file has the JS hash, if it is a different one than in the version.json
156
+ * we are dealing with version change
157
+ * @param currentHash currenthash
158
+ * @param newHash newhash
159
+ * @returns the currenthash and newhash are different
160
+ */
161
+ hasHashChanged(currentHash, newHash) {
162
+ return currentHash !== newHash;
163
+ }
164
+ }
165
+ VersionCheckService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: VersionCheckService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
166
+ VersionCheckService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: VersionCheckService, providedIn: 'root' });
167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: VersionCheckService, decorators: [{
168
+ type: Injectable,
169
+ args: [{
170
+ providedIn: 'root'
171
+ }]
172
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
173
+
174
+ class SafeHtmlPipe {
175
+ constructor(sanitizer) {
176
+ this.sanitizer = sanitizer;
177
+ }
178
+ transform(style) {
179
+ return this.sanitizer.bypassSecurityTrustHtml(style);
180
+ // return this.sanitizer.bypassSecurityTrustStyle(style);
181
+ // return this.sanitizer.bypassSecurityTrustXxx(style); - see docs
182
+ }
183
+ }
184
+ SafeHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SafeHtmlPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
185
+ SafeHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SafeHtmlPipe, name: "safeHtml" });
186
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SafeHtmlPipe, decorators: [{
187
+ type: Pipe,
188
+ args: [{
189
+ name: 'safeHtml'
190
+ }]
191
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
192
+
193
+ class ConfirmationComponent {
194
+ constructor(dialogRef, data) {
195
+ this.dialogRef = dialogRef;
196
+ this.data = data;
197
+ // Update view with given values
198
+ this.title = data.title;
199
+ this.message = data.message;
200
+ this.mode = data.mode ?? 'confirmation';
201
+ }
202
+ onConfirm() {
203
+ // Close the dialog, return true
204
+ this.dialogRef.close(true);
205
+ }
206
+ onDismiss() {
207
+ // Close the dialog, return false
208
+ this.dialogRef.close(false);
209
+ }
210
+ }
211
+ ConfirmationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmationComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
212
+ ConfirmationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ConfirmationComponent, selector: "glw-confirmation", ngImport: i0, template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content>\r\n <p [innerHTML]=\"message | safeHtml\"></p>\r\n</div>\r\n\r\n<mat-dialog-actions *ngIf=\"mode==='confirmation'\">\r\n <button mat-button (click)=\"onDismiss()\">No</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Yes</button>\r\n</mat-dialog-actions>\r\n<mat-dialog-actions *ngIf=\"mode==='alert'\">\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">OK</button>\r\n</mat-dialog-actions>\r\n", styles: [""], components: [{ type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], pipes: { "safeHtml": SafeHtmlPipe } });
213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ConfirmationComponent, decorators: [{
214
+ type: Component,
215
+ args: [{ selector: 'glw-confirmation', template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content>\r\n <p [innerHTML]=\"message | safeHtml\"></p>\r\n</div>\r\n\r\n<mat-dialog-actions *ngIf=\"mode==='confirmation'\">\r\n <button mat-button (click)=\"onDismiss()\">No</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">Yes</button>\r\n</mat-dialog-actions>\r\n<mat-dialog-actions *ngIf=\"mode==='alert'\">\r\n <button mat-raised-button color=\"primary\" (click)=\"onConfirm()\">OK</button>\r\n</mat-dialog-actions>\r\n", styles: [""] }]
216
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }, { type: ConfirmationModel, decorators: [{
217
+ type: Inject,
218
+ args: [MAT_DIALOG_DATA]
219
+ }] }]; } });
220
+ // tslint:disable-next-line: max-classes-per-file
221
+ class ConfirmationModel {
222
+ constructor(title, message, mode) {
223
+ this.title = title;
224
+ this.message = message;
225
+ this.mode = mode;
226
+ }
227
+ }
228
+
229
+ class DialogService {
230
+ constructor(dialog) {
231
+ this.dialog = dialog;
232
+ }
233
+ createConfirmationDialog(title, message, mode) {
234
+ const dialogData = new ConfirmationModel(title, message, mode);
235
+ return this.dialog.open(ConfirmationComponent, {
236
+ maxWidth: '80%',
237
+ data: dialogData,
238
+ disableClose: true
239
+ });
240
+ }
241
+ openConfirmationDialog(title, message, mode) {
242
+ return this.createConfirmationDialog(title, message, mode).afterClosed();
243
+ }
244
+ }
245
+ DialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DialogService, deps: [{ token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
246
+ DialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DialogService, providedIn: 'root' });
247
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DialogService, decorators: [{
248
+ type: Injectable,
249
+ args: [{
250
+ providedIn: 'root'
251
+ }]
252
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialog }]; } });
253
+
254
+ class NavService {
255
+ constructor(router) {
256
+ this.router = router;
257
+ this.currentUrl = new BehaviorSubject(undefined);
258
+ this.router.events.subscribe((event) => {
259
+ if (event instanceof NavigationEnd) {
260
+ this.currentUrl.next(event.urlAfterRedirects);
261
+ }
262
+ });
263
+ }
264
+ closeNav() {
265
+ this.appDrawer.close();
266
+ }
267
+ openNav() {
268
+ this.appDrawer.open();
269
+ }
270
+ }
271
+ NavService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavService, deps: [{ token: i2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
272
+ NavService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavService });
273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: NavService, decorators: [{
274
+ type: Injectable
275
+ }], ctorParameters: function () { return [{ type: i2.Router }]; } });
276
+
277
+ class VoiceRecognitionService {
278
+ constructor() {
279
+ this.recognition = new webkitSpeechRecognition();
280
+ this.isStoppedSpeechRecog = false;
281
+ this.text = '';
282
+ }
283
+ init() {
284
+ this.recognition.interimResults = true;
285
+ this.recognition.lang = 'fr-be';
286
+ this.recognition.addEventListener('result', (e) => {
287
+ const transcript = Array.from(e.results)
288
+ .map((result) => result[0])
289
+ .map((result) => result.transcript)
290
+ .join('');
291
+ this.tempWords = transcript;
292
+ console.log(transcript);
293
+ });
294
+ }
295
+ start() {
296
+ this.isStoppedSpeechRecog = false;
297
+ this.recognition.start();
298
+ console.log("Speech recognition started");
299
+ this.recognition.addEventListener('end', (condition) => {
300
+ if (this.isStoppedSpeechRecog) {
301
+ this.recognition.stop();
302
+ console.log("End speech recognition");
303
+ }
304
+ else {
305
+ this.wordConcat();
306
+ this.recognition.start();
307
+ }
308
+ });
309
+ }
310
+ stop() {
311
+ this.isStoppedSpeechRecog = true;
312
+ this.wordConcat();
313
+ this.recognition.stop();
314
+ console.log("End speech recognition");
315
+ }
316
+ wordConcat() {
317
+ this.text = this.text + ' ' + this.tempWords + '.';
318
+ this.tempWords = '';
319
+ }
320
+ }
321
+ VoiceRecognitionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: VoiceRecognitionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
322
+ VoiceRecognitionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: VoiceRecognitionService, providedIn: 'root' });
323
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: VoiceRecognitionService, decorators: [{
324
+ type: Injectable,
325
+ args: [{
326
+ providedIn: 'root'
327
+ }]
328
+ }], ctorParameters: function () { return []; } });
329
+
330
+ class SecureImgComponent {
331
+ // we need HttpClient to load the image
332
+ constructor(httpClient, domSanitizer) {
333
+ this.httpClient = httpClient;
334
+ this.domSanitizer = domSanitizer;
335
+ this.src$ = new BehaviorSubject(this.src);
336
+ // this stream will contain the actual url that our img tag will load
337
+ // everytime the src changes, the previous call would be canceled and the
338
+ // new resource would be loaded
339
+ this.dataUrl$ = this.src$.pipe(switchMap(url => this.loadImage(url)));
340
+ }
341
+ ngOnChanges() {
342
+ this.src$.next(this.src);
343
+ }
344
+ loadImage(url) {
345
+ return this.httpClient
346
+ // load the image as a blob
347
+ .get(url, { responseType: 'blob' })
348
+ // create an object url of that blob that we can use in the src attribute
349
+ .pipe(map(e => this.domSanitizer.bypassSecurityTrustUrl(URL.createObjectURL(e))));
350
+ }
351
+ }
352
+ SecureImgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SecureImgComponent, deps: [{ token: i1.HttpClient }, { token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
353
+ SecureImgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SecureImgComponent, selector: "secure-img", inputs: { src: "src" }, usesOnChanges: true, ngImport: i0, template: `
354
+ <img [src]="dataUrl$ | async" style="object-fit: contain;"/>
355
+ `, isInline: true, pipes: { "async": i3.AsyncPipe } });
356
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SecureImgComponent, decorators: [{
357
+ type: Component,
358
+ args: [{
359
+ selector: 'secure-img',
360
+ template: `
361
+ <img [src]="dataUrl$ | async" style="object-fit: contain;"/>
362
+ `
363
+ }]
364
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i1$1.DomSanitizer }]; }, propDecorators: { src: [{
365
+ type: Input
366
+ }] } });
367
+
368
+ class FileSinkDirective {
369
+ constructor() {
370
+ this.fileDropped = new EventEmitter();
371
+ }
372
+ // Dragover listener
373
+ onDragOver(evt) {
374
+ evt.preventDefault();
375
+ evt.stopPropagation();
376
+ this.fileOver = true;
377
+ }
378
+ // Dragleave listener
379
+ onDragLeave(evt) {
380
+ evt.preventDefault();
381
+ evt.stopPropagation();
382
+ this.fileOver = false;
383
+ }
384
+ // Drop listener
385
+ ondrop(evt) {
386
+ evt.preventDefault();
387
+ evt.stopPropagation();
388
+ this.fileOver = false;
389
+ let files = evt.dataTransfer.files;
390
+ if (files.length > 0) {
391
+ this.fileDropped.emit(files);
392
+ }
393
+ }
394
+ }
395
+ FileSinkDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FileSinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
396
+ FileSinkDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.2.3", type: FileSinkDirective, selector: "[glowwFileSink]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.fileover": "this.fileOver" } }, ngImport: i0 });
397
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FileSinkDirective, decorators: [{
398
+ type: Directive,
399
+ args: [{
400
+ selector: '[glowwFileSink]'
401
+ }]
402
+ }], propDecorators: { fileOver: [{
403
+ type: HostBinding,
404
+ args: ['class.fileover']
405
+ }], fileDropped: [{
406
+ type: Output
407
+ }], onDragOver: [{
408
+ type: HostListener,
409
+ args: ['dragover', ['$event']]
410
+ }], onDragLeave: [{
411
+ type: HostListener,
412
+ args: ['dragleave', ['$event']]
413
+ }], ondrop: [{
414
+ type: HostListener,
415
+ args: ['drop', ['$event']]
416
+ }] } });
417
+
418
+ class UploadFileComponent {
419
+ constructor() {
420
+ this.multiple = false;
421
+ this.allowAltFileName = false;
422
+ this.acceptMime = '*/*';
423
+ this.onChange = () => { };
424
+ this.onTouched = () => { };
425
+ this.files = [];
426
+ }
427
+ ngAfterViewInit() {
428
+ const fileUpload = this.fileUpload.nativeElement;
429
+ fileUpload.onchange = () => {
430
+ if (!this.multiple) {
431
+ this.files = [];
432
+ //if (this.allowAltFileName) { this.fileNames.clear(); }
433
+ }
434
+ for (const file of fileUpload.files) {
435
+ this.files.push({ data: file, inProgress: false, progress: 0, fileName: file.name, size: file.size, altFileName: '', status: '' });
436
+ //if (this.allowAltFileName) { this.fileNames.push(this.FileName(file.name)); }
437
+ }
438
+ this.onChange(this.files);
439
+ this.onTouched();
440
+ };
441
+ }
442
+ get value() {
443
+ return this.files;
444
+ //return this._value;
445
+ }
446
+ set value(val) {
447
+ this.files = val;
448
+ this.onChange(val);
449
+ this.onTouched();
450
+ }
451
+ writeValue(obj) {
452
+ this.value = obj;
453
+ }
454
+ registerOnChange(fn) {
455
+ this.onChange = fn;
456
+ }
457
+ registerOnTouched(fn) {
458
+ this.onTouched = fn;
459
+ }
460
+ setDisabledState(isDisabled) {
461
+ //throw new Error('Method not implemented.');
462
+ }
463
+ SelectFiles() {
464
+ this.fileUpload.nativeElement.click();
465
+ }
466
+ ChangeAltName(i, $event) {
467
+ this.files[i].altFileName = $event.target.value;
468
+ this.onChange(this.files);
469
+ this.onTouched();
470
+ }
471
+ onFileDropped($event) {
472
+ this.prepareFilesList($event);
473
+ }
474
+ prepareFilesList(files) {
475
+ if (files.length > 1 && !this.multiple) {
476
+ alert("You can only drop an only file at once");
477
+ return;
478
+ }
479
+ if (this.files && this.files.length > 0 && !this.multiple) {
480
+ if (confirm("Do you want to replace current file ?")) {
481
+ this.files = [];
482
+ }
483
+ else {
484
+ return;
485
+ }
486
+ }
487
+ for (const file of files) {
488
+ this.files.push({ data: file, inProgress: false, progress: 0, fileName: file.name, size: file.size, altFileName: '', status: '' });
489
+ }
490
+ this.onChange(this.files);
491
+ this.onTouched();
492
+ }
493
+ /**
494
+ * format bytes
495
+ * @param bytes (File size in bytes)
496
+ * @param decimals (Decimals point)
497
+ */
498
+ formatBytes(bytes, decimals = 2) {
499
+ if (bytes === 0) {
500
+ return "0 Bytes";
501
+ }
502
+ const k = 1024;
503
+ const dm = decimals <= 0 ? 0 : decimals;
504
+ const sizes = ["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
505
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
506
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + " " + sizes[i];
507
+ }
508
+ deleteFile(index) {
509
+ if (this.files[index].progress && this.files[index].progress < 100) {
510
+ console.log("Upload in progress.");
511
+ return;
512
+ }
513
+ this.files.splice(index, 1);
514
+ this.onChange(this.files);
515
+ this.onTouched();
516
+ }
517
+ }
518
+ UploadFileComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: UploadFileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
519
+ UploadFileComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: UploadFileComponent, selector: "gloww-upload-file", inputs: { multiple: "multiple", allowAltFileName: "allowAltFileName", acceptMime: "acceptMime" }, providers: [
520
+ {
521
+ provide: NG_VALUE_ACCESSOR,
522
+ multi: true,
523
+ useExisting: UploadFileComponent
524
+ }
525
+ ], viewQueries: [{ propertyName: "fileUpload", first: true, predicate: ["fileUpload"], descendants: true }], ngImport: i0, template: "<mat-card glowwFileSink (fileDropped)=\"onFileDropped($event)\" style=\"height:calc(100% - 40px)\">\r\n <mat-card-content style=\"min-height:100px;height:calc(100% - 60px)\">\r\n <div class=\"files-list\" *ngIf=\"files && files.length\" style=\"height:calc(100% - 60px)\">\r\n <div class=\"single-file\" *ngFor=\"let file of files; let i = index\" [ngClass]=\"file.status\">\r\n <i class=\"fa-thin fa-file fa-lg\"></i>\r\n <div class=\"info\">\r\n <h4 class=\"name\">\r\n {{ file?.fileName }}\r\n </h4>\r\n <p class=\"size\">\r\n {{ formatBytes(file?.size) }}\r\n </p>\r\n <mat-progress-bar [value]=\"file.progress\"></mat-progress-bar>\r\n </div>\r\n <i class=\"fa-thin fa-trash fa-lg\" (click)=\"deleteFile(i)\"></i>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!files || !files.length\" style=\"height:calc(100% - 60px)\">No file(s) selected</div>\r\n <input type=\"file\" #fileUpload id=\"fileUpload\" name=\"fileUpload\" [accept]=\"acceptMime\" style=\"display:none;\" [multiple]=\"multiple\" />\r\n </mat-card-content>\r\n <mat-card-actions style=\"text-align:center\">\r\n <button mat-raised-button color=\"accent\" (click)=\"SelectFiles()\">\r\n <i class=\"fal fa-file-upload\"></i> <span *ngIf=\"!multiple\">Select file or Drop a file</span>\r\n <span *ngIf=\"multiple\">Select file(s) or drop file(s)</span>\r\n </button>\r\n </mat-card-actions>\r\n</mat-card>", styles: ["ul{list-style:none;padding-left:0}ul li{padding-bottom:10px}.fileover{-webkit-animation:shake 1s;animation:shake 1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.files-list{margin-top:1.5rem}.files-list .single-file{padding:.5rem;justify-content:space-between;align-items:center;border:dashed 1px #979797;margin-bottom:1rem;display:flex;flex-grow:1}.files-list .single-file img.delete{margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0;margin-bottom:.25rem}.files-list .single-file .info{width:100%}.Done{background-color:green}.Error{background-color:red}@-webkit-keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}\n"], components: [{ type: i5$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: FileSinkDirective, selector: "[glowwFileSink]", outputs: ["fileDropped"] }, { type: i5$1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i5$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }] });
526
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: UploadFileComponent, decorators: [{
527
+ type: Component,
528
+ args: [{ selector: 'gloww-upload-file', providers: [
529
+ {
530
+ provide: NG_VALUE_ACCESSOR,
531
+ multi: true,
532
+ useExisting: UploadFileComponent
533
+ }
534
+ ], template: "<mat-card glowwFileSink (fileDropped)=\"onFileDropped($event)\" style=\"height:calc(100% - 40px)\">\r\n <mat-card-content style=\"min-height:100px;height:calc(100% - 60px)\">\r\n <div class=\"files-list\" *ngIf=\"files && files.length\" style=\"height:calc(100% - 60px)\">\r\n <div class=\"single-file\" *ngFor=\"let file of files; let i = index\" [ngClass]=\"file.status\">\r\n <i class=\"fa-thin fa-file fa-lg\"></i>\r\n <div class=\"info\">\r\n <h4 class=\"name\">\r\n {{ file?.fileName }}\r\n </h4>\r\n <p class=\"size\">\r\n {{ formatBytes(file?.size) }}\r\n </p>\r\n <mat-progress-bar [value]=\"file.progress\"></mat-progress-bar>\r\n </div>\r\n <i class=\"fa-thin fa-trash fa-lg\" (click)=\"deleteFile(i)\"></i>\r\n </div>\r\n </div>\r\n <div *ngIf=\"!files || !files.length\" style=\"height:calc(100% - 60px)\">No file(s) selected</div>\r\n <input type=\"file\" #fileUpload id=\"fileUpload\" name=\"fileUpload\" [accept]=\"acceptMime\" style=\"display:none;\" [multiple]=\"multiple\" />\r\n </mat-card-content>\r\n <mat-card-actions style=\"text-align:center\">\r\n <button mat-raised-button color=\"accent\" (click)=\"SelectFiles()\">\r\n <i class=\"fal fa-file-upload\"></i> <span *ngIf=\"!multiple\">Select file or Drop a file</span>\r\n <span *ngIf=\"multiple\">Select file(s) or drop file(s)</span>\r\n </button>\r\n </mat-card-actions>\r\n</mat-card>", styles: ["ul{list-style:none;padding-left:0}ul li{padding-bottom:10px}.fileover{-webkit-animation:shake 1s;animation:shake 1s;-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.files-list{margin-top:1.5rem}.files-list .single-file{padding:.5rem;justify-content:space-between;align-items:center;border:dashed 1px #979797;margin-bottom:1rem;display:flex;flex-grow:1}.files-list .single-file img.delete{margin-left:.5rem;cursor:pointer;align-self:flex-end}.files-list .single-file .name{font-size:14px;font-weight:500;color:#353f4a;margin:0}.files-list .single-file .size{font-size:12px;font-weight:500;color:#a4a4a4;margin:0;margin-bottom:.25rem}.files-list .single-file .info{width:100%}.Done{background-color:green}.Error{background-color:red}@-webkit-keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}@keyframes shake{0%{transform:translate(1px,1px) rotate(0)}10%{transform:translate(-1px,-2px) rotate(-1deg)}20%{transform:translate(-3px) rotate(1deg)}30%{transform:translate(3px,2px) rotate(0)}40%{transform:translate(1px,-1px) rotate(1deg)}50%{transform:translate(-1px,2px) rotate(-1deg)}60%{transform:translate(-3px,1px) rotate(0)}70%{transform:translate(3px,1px) rotate(-1deg)}80%{transform:translate(-1px,-1px) rotate(1deg)}90%{transform:translate(1px,2px) rotate(0)}to{transform:translate(1px,-2px) rotate(-1deg)}}\n"] }]
535
+ }], ctorParameters: function () { return []; }, propDecorators: { fileUpload: [{
536
+ type: ViewChild,
537
+ args: ['fileUpload']
538
+ }], multiple: [{
539
+ type: Input
540
+ }], allowAltFileName: [{
541
+ type: Input
542
+ }], acceptMime: [{
543
+ type: Input
544
+ }] } });
545
+
546
+ class UploadDocComponent {
547
+ constructor(dialogRef, data, formBuilder) {
548
+ this.dialogRef = dialogRef;
549
+ this.data = data;
550
+ this.formBuilder = formBuilder;
551
+ this.multiple = false;
552
+ this.allowAltFileName = false;
553
+ this.acceptMime = '*/*';
554
+ this.files = [];
555
+ if (data && data.acceptMime) {
556
+ this.acceptMime = data.acceptMime;
557
+ }
558
+ if (data && data.multiple) {
559
+ this.multiple = data.multiple;
560
+ }
561
+ if (data && data.allowAltFileName) {
562
+ this.allowAltFileName = data.allowAltFileName;
563
+ }
564
+ if (data && data.callback) {
565
+ this.callback = data.callback;
566
+ }
567
+ }
568
+ /*
569
+ get fileNames(): FormArray {
570
+ return this.form.get("fileNames") as FormArray
571
+ }
572
+
573
+ FileName(fn: string): FormGroup {
574
+ return this.formBuilder.group({
575
+ fileName: fn
576
+ })
577
+ }
578
+
579
+ ngOnInit() {
580
+ }
581
+
582
+ onClick() {
583
+ const fileUpload = this.fileUpload.nativeElement; fileUpload.onchange = () => {
584
+ if (this.multiple) {
585
+ this.files = [];
586
+ if (this.allowAltFileName) { this.fileNames.clear(); }
587
+ }
588
+ for (const file of fileUpload.files) {
589
+ this.files.push({ data: file, inProgress: false, progress: 0, fileName: file.name });
590
+ if (this.allowAltFileName) { this.fileNames.push(this.FileName(file.name)); }
591
+ }
592
+ };
593
+ fileUpload.click();
594
+ }
595
+
596
+ private uploadFiles() {
597
+ this.fileUpload.nativeElement.value = '';
598
+ this.files.forEach(file => {
599
+ alert('upload file');
600
+ // this.uploadFile(file);
601
+ });
602
+ }
603
+ */
604
+ cancel() {
605
+ this.dialogRef.close();
606
+ }
607
+ save() {
608
+ console.log("save UploadDoc");
609
+ console.log(`this.files.length ${this.files.length}`);
610
+ /*if (this.allowAltFileName) {
611
+ for (let i = 0; i < this.files.length; i++) {
612
+ // Comment to be sure new version
613
+ this.files[i].name = this.fileNames.value[i].fileName;
614
+ }
615
+ }*/
616
+ if (this.callback) {
617
+ this.callback(this.files).subscribe(res => this.dialogRef.close(this.files));
618
+ }
619
+ else {
620
+ this.dialogRef.close(this.files);
621
+ }
622
+ }
623
+ }
624
+ UploadDocComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: UploadDocComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
625
+ UploadDocComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: UploadDocComponent, selector: "gloww-upload-doc", ngImport: i0, template: "<h2 mat-dialog-title>\r\n Association d'un nouveau document</h2>\r\n\r\n<mat-dialog-content>\r\n\r\n <gloww-upload-file [(ngModel)]=\"files\" [acceptMime]=\"acceptMime\" [multiple]=\"multiple\" [allowAltFileName]=\"allowAltFileName\"></gloww-upload-file>\r\n\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-raised-button (click)=\"cancel()\">Close</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"save()\">Save</button>\r\n</mat-dialog-actions>\r\n", styles: ["ul{list-style:none;padding-left:0}ul li{padding-bottom:10px}\n"], components: [{ type: UploadFileComponent, selector: "gloww-upload-file", inputs: ["multiple", "allowAltFileName", "acceptMime"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
626
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: UploadDocComponent, decorators: [{
627
+ type: Component,
628
+ args: [{ selector: 'gloww-upload-doc', template: "<h2 mat-dialog-title>\r\n Association d'un nouveau document</h2>\r\n\r\n<mat-dialog-content>\r\n\r\n <gloww-upload-file [(ngModel)]=\"files\" [acceptMime]=\"acceptMime\" [multiple]=\"multiple\" [allowAltFileName]=\"allowAltFileName\"></gloww-upload-file>\r\n\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-raised-button (click)=\"cancel()\">Close</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"save()\">Save</button>\r\n</mat-dialog-actions>\r\n", styles: ["ul{list-style:none;padding-left:0}ul li{padding-bottom:10px}\n"] }]
629
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
630
+ type: Inject,
631
+ args: [MAT_DIALOG_DATA]
632
+ }] }, { type: i1$3.FormBuilder }]; } });
633
+
634
+ class SearchFormComponent {
635
+ constructor() { }
636
+ ngOnInit() {
637
+ }
638
+ }
639
+ SearchFormComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SearchFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
640
+ SearchFormComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SearchFormComponent, selector: "glw-search-form", ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
641
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SearchFormComponent, decorators: [{
642
+ type: Component,
643
+ args: [{ selector: 'glw-search-form', template: "<ng-content></ng-content>", styles: [""] }]
644
+ }], ctorParameters: function () { return []; } });
645
+
646
+ class HeaderComponent {
647
+ constructor() { }
648
+ ngOnInit() {
649
+ }
650
+ }
651
+ HeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
652
+ HeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: HeaderComponent, selector: "glw-header", ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
653
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HeaderComponent, decorators: [{
654
+ type: Component,
655
+ args: [{ selector: 'glw-header', template: "<ng-content></ng-content>", styles: [""] }]
656
+ }], ctorParameters: function () { return []; } });
657
+
658
+ class ResultTableComponent {
659
+ constructor() { }
660
+ ngAfterContentInit() {
661
+ console.log(this.columnDefs.length);
662
+ }
663
+ ngOnInit() {
664
+ }
665
+ }
666
+ ResultTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ResultTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
667
+ ResultTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ResultTableComponent, selector: "glw-result-table", queries: [{ propertyName: "columnDefs", predicate: MatColumnDef }], ngImport: i0, template: "<ng-content></ng-content>", styles: [""] });
668
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ResultTableComponent, decorators: [{
669
+ type: Component,
670
+ args: [{ selector: 'glw-result-table', template: "<ng-content></ng-content>", styles: [""] }]
671
+ }], ctorParameters: function () { return []; }, propDecorators: { columnDefs: [{
672
+ type: ContentChildren,
673
+ args: [MatColumnDef]
674
+ }] } });
675
+
676
+ class Oauthassociation {
677
+ toString() {
678
+ return this.provider;
679
+ }
680
+ }
681
+
682
+ class AuthenticationServiceConfig {
683
+ constructor() {
684
+ this.currentUserVariableName = 'currentuser';
685
+ this.authenticationUrl = `/admin/authusers/authenticate`;
686
+ this.changePasswordUrl = `/admin/authusers/changePassword`;
687
+ this.askResetPasswordCodeUrl = `/admin/authusers/askResetPasswordCode`;
688
+ this.resetPassworUrl = `/admin/authusers/resetPassword`;
689
+ this.environment = '__GlowwSecurity__';
690
+ this.showDomain = false;
691
+ this.askGSM = false;
692
+ this.googleClientId = '';
693
+ this.facebookClientId = '';
694
+ this.amazonClientId = '';
695
+ this.microsoftClientId = '';
696
+ }
697
+ }
698
+ AuthenticationServiceConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthenticationServiceConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
699
+ AuthenticationServiceConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthenticationServiceConfig, providedIn: 'root' });
700
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthenticationServiceConfig, decorators: [{
701
+ type: Injectable,
702
+ args: [{ providedIn: 'root' }]
703
+ }] });
704
+
705
+ class AuthenticationService {
706
+ constructor(http, platformId, config) {
707
+ this.http = http;
708
+ this.platformId = platformId;
709
+ this.hasLocalStorage = false;
710
+ this.hasLocalStorage = isPlatformBrowser(this.platformId);
711
+ if (config && config.currentUserVariableName) {
712
+ this.currentUserVariableName = config.currentUserVariableName;
713
+ }
714
+ else {
715
+ this.currentUserVariableName = 'currentUser';
716
+ }
717
+ if (config && config.authenticationUrl) {
718
+ this.authenticationUrl = config.authenticationUrl;
719
+ }
720
+ else {
721
+ this.authenticationUrl = `/admin/authusers/authenticate`;
722
+ }
723
+ if (config && config.changePasswordUrl) {
724
+ this.changePasswordUrl = config.changePasswordUrl;
725
+ }
726
+ else {
727
+ this.changePasswordUrl = this.authenticationUrl.replace('authenticate', 'changePassword');
728
+ }
729
+ if (config && config.askResetPasswordCodeUrl) {
730
+ this.askResetPasswordCodeUrl = config.askResetPasswordCodeUrl;
731
+ }
732
+ else {
733
+ this.askResetPasswordCodeUrl = this.authenticationUrl.replace('authenticate', 'askResetPasswordCode');
734
+ }
735
+ if (config && config.resetPassworUrl) {
736
+ this.resetPasswordUrl = config.resetPassworUrl;
737
+ }
738
+ else {
739
+ this.resetPasswordUrl = this.authenticationUrl.replace('authenticate', 'resetPassword');
740
+ }
741
+ this.OAuthGetProvidersUrl = this.authenticationUrl.replace('authenticate', 'OAuthGetProviders');
742
+ this.OAuthAskCodeUrl = this.authenticationUrl.replace('authenticate', 'OAuthAskCode');
743
+ this.OAuthAssociationUrl = this.authenticationUrl.replace('authenticate', 'OAuthAssociation');
744
+ this.OAuthGetAssociationsUrl = this.authenticationUrl.replace('authenticate', 'OAuthGetAssociations');
745
+ this.OAuthDeleteAssociationUrl = this.authenticationUrl.replace('authenticate', 'OAuthDeleteAssociation');
746
+ if (config && config.environment) {
747
+ this.environment = config.environment;
748
+ }
749
+ if (config && config.showDomain) {
750
+ this.showdomain = config.showDomain;
751
+ }
752
+ if (this.hasLocalStorage) { // Angular Universal
753
+ this.currentUserSubject = new BehaviorSubject(JSON.parse(localStorage.getItem(this.currentUserVariableName)));
754
+ this.currentUser = this.currentUserSubject.asObservable();
755
+ }
756
+ }
757
+ get currentUserValue() {
758
+ if (!this.currentUserSubject) {
759
+ return null;
760
+ } // Angular Universsal
761
+ return this.currentUserSubject.value;
762
+ }
763
+ get isConnected() {
764
+ if (!this.currentUserSubject) {
765
+ return null;
766
+ } // Angular Universsal
767
+ return this.currentUserSubject.value !== null;
768
+ }
769
+ login(domain, username, password) {
770
+ const formData = new FormData();
771
+ if (this.showdomain) {
772
+ formData.set('domain', domain);
773
+ }
774
+ formData.set('environment', this.environment);
775
+ formData.set('username', username);
776
+ formData.set('password', password);
777
+ return this.http.post(this.authenticationUrl, formData, { observe: 'response' })
778
+ .pipe(map(resp => {
779
+ // store user details and jwt token in local storage to keep user logged in between page refreshes
780
+ const user = resp.body;
781
+ if (this.hasLocalStorage) {
782
+ localStorage.setItem(this.currentUserVariableName, JSON.stringify(user));
783
+ }
784
+ this.currentUserSubject.next(user);
785
+ return user;
786
+ }));
787
+ }
788
+ changePassword(domain, username, oldpassword, newpassword) {
789
+ const params = new HttpParams({
790
+ fromObject: {
791
+ domain: this.currentUserValue.domain ?? '',
792
+ username: this.currentUserValue.username,
793
+ newpassword,
794
+ oldpassword,
795
+ environment: this.environment
796
+ }
797
+ });
798
+ return this.http.get(this.changePasswordUrl, { params });
799
+ }
800
+ logout() {
801
+ // remove user from local storage to log user out
802
+ if (this.hasLocalStorage) {
803
+ localStorage.removeItem(this.currentUserVariableName);
804
+ }
805
+ this.currentUserSubject.next(null);
806
+ }
807
+ askResetPasswordCode(domain, firstname, lastname, email, gsm) {
808
+ const params = new HttpParams({
809
+ fromObject: {
810
+ domain: '',
811
+ firstname,
812
+ lastname,
813
+ email,
814
+ gsm,
815
+ environment: this.environment
816
+ }
817
+ });
818
+ return this.http.get(this.askResetPasswordCodeUrl, { params });
819
+ }
820
+ resetPassword(email, code, password) {
821
+ const params = new HttpParams({
822
+ fromObject: {
823
+ email,
824
+ code,
825
+ password,
826
+ environment: this.environment
827
+ }
828
+ });
829
+ return this.http.get(this.resetPasswordUrl, { params });
830
+ }
831
+ getOAuthProviders() {
832
+ return this.http.get(this.OAuthGetProvidersUrl);
833
+ }
834
+ OAuthAskCode(environment, login, idOauth, provider, name, value) {
835
+ const params = new HttpParams({
836
+ fromObject: {
837
+ environment,
838
+ login,
839
+ idOauth,
840
+ provider,
841
+ name,
842
+ value
843
+ }
844
+ });
845
+ return this.http.get(this.OAuthAskCodeUrl, { params });
846
+ }
847
+ OAuthAssociation(environment, code, idOauth, provider, name, value) {
848
+ const params = new HttpParams({
849
+ fromObject: {
850
+ environment,
851
+ code,
852
+ idOauth,
853
+ provider,
854
+ name,
855
+ value
856
+ }
857
+ });
858
+ return this.http.get(this.OAuthAssociationUrl, { params }).pipe(map(resp => {
859
+ // store user details and jwt token in local storage to keep user logged in between page refreshes
860
+ console.log("OAuthAuthentication");
861
+ console.log(resp);
862
+ const user = resp;
863
+ if (this.hasLocalStorage) {
864
+ localStorage.setItem(this.currentUserVariableName, JSON.stringify(user));
865
+ }
866
+ this.currentUserSubject.next(user);
867
+ return user;
868
+ }));
869
+ }
870
+ getOAuthAssociations() {
871
+ const params = new HttpParams({
872
+ fromObject: {
873
+ environment: this.environment
874
+ }
875
+ });
876
+ return this.http.get(this.OAuthGetAssociationsUrl, { params }).pipe(tap((value) => console.log(value)), map((value) => value.map(item => Object.assign(new Oauthassociation(), item))), tap((value) => console.log(value)));
877
+ }
878
+ OAuthDeleteAssociation(provider, idOAuth) {
879
+ const params = new HttpParams({
880
+ fromObject: {
881
+ environment: this.environment,
882
+ provider,
883
+ idOAuth
884
+ }
885
+ });
886
+ return this.http.get(this.OAuthDeleteAssociationUrl, { params });
887
+ }
888
+ }
889
+ AuthenticationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthenticationService, deps: [{ token: i1.HttpClient }, { token: PLATFORM_ID }, { token: AuthenticationServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
890
+ AuthenticationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthenticationService, providedIn: 'root' });
891
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthenticationService, decorators: [{
892
+ type: Injectable,
893
+ args: [{ providedIn: 'root' }]
894
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: undefined, decorators: [{
895
+ type: Inject,
896
+ args: [PLATFORM_ID]
897
+ }] }, { type: AuthenticationServiceConfig, decorators: [{
898
+ type: Optional
899
+ }] }]; } });
900
+
901
+ ;
902
+ class DisplayObjectsComponent {
903
+ constructor(changeDetectorRef, dialog, router, location, authenticationService, formBuilder, route) {
904
+ this.changeDetectorRef = changeDetectorRef;
905
+ this.dialog = dialog;
906
+ this.router = router;
907
+ this.location = location;
908
+ this.authenticationService = authenticationService;
909
+ this.formBuilder = formBuilder;
910
+ this.route = route;
911
+ this.canDisplayObj = false;
912
+ this.canEdit = true;
913
+ this.canDelete = true;
914
+ this.canAdd = true;
915
+ this.mandatoryParams = {};
916
+ this.actions = [];
917
+ this.dialogConfig = {};
918
+ this.columnsToDisplay = [];
919
+ this.displayform = true;
920
+ this.displayresult = false;
921
+ this.queryParams = {};
922
+ const component = this;
923
+ this.currentUser = this.authenticationService.currentUserValue.UserInfo;
924
+ this.form2 = this.formBuilder.group({
925
+ _MaxRow_: [null]
926
+ });
927
+ }
928
+ ngOnChanges(changes) {
929
+ }
930
+ ngAfterViewInit() {
931
+ if (!this.searchRequest) {
932
+ this.searchRequest = this.glowwService[`search${this.objectName}`];
933
+ }
934
+ if (!this.postRequest) {
935
+ this.postRequest = this.glowwService[`post${this.objectName}`];
936
+ }
937
+ if (!this.deleteRequest) {
938
+ this.deleteRequest = this.glowwService[`delete${this.objectName}`];
939
+ }
940
+ if (!this.putRequest) {
941
+ this.putRequest = this.glowwService[`put${this.objectName}`];
942
+ }
943
+ if (this.maxrows?.length > 0) {
944
+ this.form.addControl("_MaxRow_", new FormControl(null));
945
+ }
946
+ }
947
+ ngAfterContentInit() {
948
+ if (!this.formLayout && this.resultLayout) {
949
+ this.displayform = false;
950
+ this.displayresult = true;
951
+ }
952
+ }
953
+ ngOnInit() {
954
+ }
955
+ Search(data) {
956
+ this.displayresult = true;
957
+ this.displayform = false;
958
+ this.resultException = null;
959
+ if (data) {
960
+ Object.keys(data).forEach(name => {
961
+ this.queryParams[name] = data[name];
962
+ });
963
+ }
964
+ Object.keys(this.route.snapshot.params).forEach(name => {
965
+ this.queryParams[name] = this.route.snapshot.params[name];
966
+ });
967
+ if (this.mandatoryParams) {
968
+ Object.keys(this.mandatoryParams).forEach(name => {
969
+ this.queryParams[name] = this.queryParams[name];
970
+ });
971
+ }
972
+ this.searchRequest.call(this.glowwService, this.queryParams).subscribe(r => {
973
+ this.dataSource = new MatTableDataSource(r);
974
+ this.changeDetectorRef.detectChanges();
975
+ this.UpdateTable();
976
+ }, error => {
977
+ this.displayresult = false;
978
+ this.displayform = true;
979
+ this.resultException = error;
980
+ });
981
+ }
982
+ clean(obj) {
983
+ for (const propName in obj) {
984
+ if (obj[propName] === null || obj[propName] === undefined) {
985
+ delete obj[propName];
986
+ }
987
+ }
988
+ }
989
+ onSearch() {
990
+ this.queryParams = {};
991
+ Object.keys(this.form.value).forEach(name => {
992
+ const val = this.form.value[name];
993
+ if (val) {
994
+ if (val.constructor.name === 'Moment') {
995
+ this.queryParams[name] = val.toISOString();
996
+ }
997
+ else {
998
+ this.queryParams[name] = val;
999
+ }
1000
+ }
1001
+ });
1002
+ if (this.form2.value._MaxRow_) {
1003
+ this.queryParams._MaxRow_ = this.form2.value._MaxRow_;
1004
+ }
1005
+ this.clean(this.queryParams);
1006
+ const params = new HttpParams({ fromObject: this.queryParams });
1007
+ const currentstate = this.location.getState();
1008
+ this.location.replaceState(this.router.url, params.toString());
1009
+ this.Search();
1010
+ }
1011
+ UpdateDataSource(r) {
1012
+ this.dataSource = new MatTableDataSource(r);
1013
+ this.changeDetectorRef.detectChanges();
1014
+ this.UpdateTable();
1015
+ }
1016
+ UpdateTable() {
1017
+ if (this.dataSource) {
1018
+ if (!this.table) {
1019
+ console.log('!this.table');
1020
+ return;
1021
+ }
1022
+ this.resultLayout.columnDefs.forEach(columnDef => this.table.addColumnDef(columnDef));
1023
+ this.dataSource.paginator = this.paginator;
1024
+ this.dataSource.sort = this.sort;
1025
+ this.columnsToDisplay = this.columns();
1026
+ }
1027
+ }
1028
+ canDisplayObjThis(obj, action) {
1029
+ try {
1030
+ if (!this.displayObjLink) {
1031
+ return false;
1032
+ }
1033
+ if (typeof this.canDisplayObj === 'boolean') {
1034
+ return this.canDisplayObj;
1035
+ }
1036
+ return this.canDisplayObj(this.currentUser, obj, action);
1037
+ }
1038
+ catch (ex) {
1039
+ console.log(ex);
1040
+ return true;
1041
+ }
1042
+ }
1043
+ canAddThis() {
1044
+ try {
1045
+ if (!this.canAdd) {
1046
+ return false;
1047
+ }
1048
+ if (typeof this.canAdd === 'boolean') {
1049
+ return this.canAdd;
1050
+ }
1051
+ return this.canAdd(this.currentUser);
1052
+ }
1053
+ catch (ex) {
1054
+ console.log(ex);
1055
+ return true;
1056
+ }
1057
+ }
1058
+ canEditThis(obj) {
1059
+ try {
1060
+ if (!this.canEdit) {
1061
+ return false;
1062
+ }
1063
+ if (typeof this.canEdit === 'boolean') {
1064
+ return this.canEdit;
1065
+ }
1066
+ return this.canEdit(this.currentUser, obj);
1067
+ }
1068
+ catch (ex) {
1069
+ console.log(ex);
1070
+ return true;
1071
+ }
1072
+ }
1073
+ canDeleteThis(obj) {
1074
+ try {
1075
+ if (!this.canDelete) {
1076
+ return false;
1077
+ }
1078
+ if (typeof this.canDelete === 'boolean') {
1079
+ return this.canDelete;
1080
+ }
1081
+ return this.canDelete(this.currentUser, obj);
1082
+ }
1083
+ catch (ex) {
1084
+ console.log(ex);
1085
+ return false;
1086
+ }
1087
+ }
1088
+ displayObjLinkThis(obj, action) {
1089
+ if (!this.displayObjLink) {
1090
+ return null;
1091
+ }
1092
+ return this.displayObjLink(obj, action);
1093
+ }
1094
+ isString(value) {
1095
+ return typeof value === 'string' || value instanceof String;
1096
+ }
1097
+ getPrimaryKey(obj) {
1098
+ let res = [];
1099
+ if (this.isString(this.primaryKey)) {
1100
+ console.log("string");
1101
+ res.push(obj[this.primaryKey]);
1102
+ }
1103
+ else {
1104
+ console.log("string[]");
1105
+ this.primaryKey.forEach(key => res.push(obj[key]));
1106
+ }
1107
+ return res;
1108
+ }
1109
+ _saveObj(obj) {
1110
+ var subject = new Subject();
1111
+ this.postRequest.call(this.glowwService, obj).subscribe(data => {
1112
+ const tmp = this.dataSource.data;
1113
+ tmp.push(data);
1114
+ this.dataSource.data = tmp;
1115
+ subject.next(data);
1116
+ }, error => {
1117
+ alert(`Unable to add Object ${error.status} ${error.statusText}\n${error.Message}\n${error.error}`);
1118
+ subject.error(error);
1119
+ });
1120
+ return subject;
1121
+ }
1122
+ _saveFile(fileField, obj, file) {
1123
+ const formData = new FormData();
1124
+ formData.append('file', file.data);
1125
+ return this.glowwService[`post${this.objectName}${fileField}`].call(this.glowwService, this.getPrimaryKey(obj), formData).pipe(tap((event) => {
1126
+ switch (event.type) {
1127
+ case HttpEventType.UploadProgress:
1128
+ file.progress = Math.round(event.loaded * 100 / (event.total ?? 1));
1129
+ file.inProgress = file.progress !== 100;
1130
+ break;
1131
+ case HttpEventType.Response:
1132
+ file.progress = 100;
1133
+ file.status = "Done";
1134
+ file.inProgress = false;
1135
+ break;
1136
+ }
1137
+ }), filter((event) => {
1138
+ console.log(`filter ${event.type}`);
1139
+ return event.type === HttpEventType.Response;
1140
+ }), map((event) => {
1141
+ console.log(`map ${event.type}`);
1142
+ return event.body;
1143
+ }), catchError((error) => {
1144
+ file.inProgress = false;
1145
+ file.status = "Error";
1146
+ console.log(`${file.data.name} upload failed.`);
1147
+ //subject.error(error);
1148
+ return of(`${file.data.name} upload failed.`);
1149
+ }));
1150
+ }
1151
+ AddObj() {
1152
+ const dialogConfig = new MatDialogConfig();
1153
+ dialogConfig.disableClose = true;
1154
+ dialogConfig.autoFocus = true;
1155
+ dialogConfig.closeOnNavigation = false;
1156
+ if (this.dialogConfig) {
1157
+ Object.keys(this.dialogConfig).forEach(name => {
1158
+ dialogConfig[name] = this.dialogConfig[name];
1159
+ });
1160
+ }
1161
+ let args = {};
1162
+ Object.keys(this.route.snapshot?.params).forEach(key => {
1163
+ args[key] = this.route.snapshot?.params[key];
1164
+ dialogConfig.data = args;
1165
+ });
1166
+ const dlg = this.dialog.open(this.Editor, dialogConfig);
1167
+ dlg.componentInstance.callback = (data => {
1168
+ let datacopy = { ...data };
1169
+ const fileFields = this.Editor.fileFields;
1170
+ if (fileFields.length = 1) {
1171
+ // Un seul champ, il peut être multiple
1172
+ const fileField = fileFields[0];
1173
+ const files = datacopy[fileField];
1174
+ delete datacopy[fileField];
1175
+ const allobs = {};
1176
+ files.forEach(file => {
1177
+ if (file.statut !== 'Done' && file.statut !== 'Error') {
1178
+ const obs = this._saveObj(datacopy).pipe(switchMap(newdata => this._saveFile(fileField, newdata, file)));
1179
+ allobs[file.name] = obs;
1180
+ }
1181
+ });
1182
+ return combineLatest(allobs).pipe(take(1));
1183
+ }
1184
+ else if (fileFields.length > 1) {
1185
+ // Plusieurs champs file, il ne peut y avoir qu'une seul fichier par champ.
1186
+ const fields = {};
1187
+ fileFields.forEach(ff => {
1188
+ fields[ff] = datacopy[ff];
1189
+ delete datacopy[ff];
1190
+ return this._saveObj(datacopy).pipe(mergeMap(newdata => {
1191
+ var allobs = [];
1192
+ Object.entries(fields).forEach(([fileField, files]) => {
1193
+ if (files.length > 0) {
1194
+ allobs.push(this._saveFile(fileField, newdata, files[0]));
1195
+ }
1196
+ });
1197
+ return forkJoin(allobs); // TODO : PAS TERMINE... JAMAIS UTILISE...
1198
+ }));
1199
+ });
1200
+ }
1201
+ else {
1202
+ // Form sans fichier
1203
+ return this._saveObj(data);
1204
+ }
1205
+ });
1206
+ }
1207
+ DeleteObj(obj) {
1208
+ if (confirm('Are you sure you want to delete this objet ? ')) {
1209
+ this.deleteRequest.apply(this.glowwService, this.getPrimaryKey(obj)).subscribe(p => {
1210
+ const i = this.dataSource.data.indexOf(obj);
1211
+ const tmp = this.dataSource.data;
1212
+ tmp.splice(i, 1);
1213
+ this.dataSource.data = tmp;
1214
+ }, error => {
1215
+ alert(`Unable to delete Object ${error.status} ${error.statusText}\n${error.Message}\n${error.error}`);
1216
+ });
1217
+ }
1218
+ }
1219
+ EditObj(obj) {
1220
+ const dialogConfig = new MatDialogConfig();
1221
+ dialogConfig.disableClose = true;
1222
+ dialogConfig.autoFocus = true;
1223
+ dialogConfig.closeOnNavigation = false;
1224
+ if (this.dialogConfig) {
1225
+ Object.keys(this.dialogConfig).forEach(name => {
1226
+ dialogConfig[name] = this.dialogConfig[name];
1227
+ });
1228
+ }
1229
+ dialogConfig.data = obj;
1230
+ this.dialog.open(this.Editor, dialogConfig).afterClosed().subscribe(data => {
1231
+ if (data) {
1232
+ let args = this.getPrimaryKey(obj);
1233
+ args.push(data);
1234
+ this.putRequest.apply(this.glowwService, args).subscribe(p => {
1235
+ const i = this.dataSource.data.indexOf(obj);
1236
+ const tmp = this.dataSource.data;
1237
+ tmp[i] = p;
1238
+ this.dataSource.data = tmp;
1239
+ });
1240
+ }
1241
+ }, error => {
1242
+ alert(`Unable to update Object ${error.status} ${error.statusText}\n${error.Message}\n${error.error}`);
1243
+ });
1244
+ }
1245
+ }
1246
+ DisplayObjectsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DisplayObjectsComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$2.MatDialog }, { token: i2.Router }, { token: i3.Location }, { token: AuthenticationService }, { token: i1$3.FormBuilder }, { token: i2.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
1247
+ DisplayObjectsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DisplayObjectsComponent, selector: "glw-display-objects", inputs: { configuration: "configuration", displayObjLink: "displayObjLink", canDisplayObj: "canDisplayObj", canEdit: "canEdit", canDelete: "canDelete", canAdd: "canAdd", form: "form", Editor: "Editor", searchRequest: "searchRequest", postRequest: "postRequest", deleteRequest: "deleteRequest", putRequest: "putRequest", columns: "columns", glowwService: "glowwService", objectName: "objectName", primaryKey: "primaryKey", maxrows: "maxrows", mandatoryParams: "mandatoryParams", actions: "actions", dialogConfig: "dialogConfig", fileFields: "fileFields" }, queries: [{ propertyName: "header", first: true, predicate: HeaderComponent, descendants: true }, { propertyName: "formLayout", first: true, predicate: SearchFormComponent, descendants: true }, { propertyName: "resultLayout", first: true, predicate: ResultTableComponent, descendants: true }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true }, { propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div>\r\n <ng-content select=\"glw-header\"></ng-content>\r\n</div>\r\n\r\n<div *ngIf=\"displayform\">\r\n <mat-card>\r\n <mat-card-content>\r\n <mat-error *ngIf=\"resultException\">\r\n Unable to query : {{resultException}}\r\n </mat-error>\r\n <ng-content select=\"glw-search-form\"></ng-content>\r\n <div *ngIf=\"maxrows\" [formGroup]=\"form2\">\r\n <br />\r\n <mat-form-field>\r\n <mat-select placeholder=\"MaxRow\" formControlName=\"_MaxRow_\">\r\n <mat-option *ngFor=\"let maxrow of maxrows\" [value]=\"maxrow\">\r\n <span *ngIf=\"maxrow\">{{maxrow}} objects</span>\r\n <span *ngIf=\"!maxrow\"> Default</span>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-stroked-button color=\"accent\" (click)=\"onSearch()\">\r\n <mat-icon>search</mat-icon>\r\n Search\r\n </button>\r\n </mat-card-actions>\r\n </mat-card>\r\n</div>\r\n\r\n<div *ngIf=\"displayresult\">\r\n <div class=\"mat-elevation-z8\" *ngIf=\"dataSource; else Spinner\">\r\n <table mat-table [dataSource]=\"dataSource\" matSort>\r\n <ng-container matColumnDef=\"action\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <i class=\"fal fa-plus\" (click)=\"AddObj()\" *ngIf=\"canAddThis()\">\r\n </i>\r\n </th>\r\n <td mat-cell *matCellDef=\"let obj\">\r\n <i class=\"fal fa-eye\" [routerLink]=\"displayObjLinkThis(obj)\" *ngIf=\"canDisplayObjThis(obj)\">\r\n </i>\r\n <ng-container *ngFor=\"let action of actions\">\r\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\" *ngIf=\"action.icon.icon && (!action.display || action.display(obj, action.name))\">\r\n </i>\r\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\" *ngIf=\"!action.icon.icon && (!action.display || action.display(obj, action.name))\"></i>\r\n </ng-container>\r\n <i class=\"fal fa-trash-alt\" (click)=\"DeleteObj(obj)\" *ngIf=\"canDeleteThis(obj)\">\r\n </i>\r\n <i class=\"fal fa-pencil\" (click)=\"EditObj(obj)\" *ngIf=\"canEditThis(obj)\">\r\n </i>\r\n </td>\r\n </ng-container>\r\n <ng-content select=\"glw-result-table\"></ng-content>\r\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay\"></tr>\r\n <tr mat-row *matRowDef=\"let myRowData; columns: columnsToDisplay\"></tr>\r\n </table>\r\n <mat-paginator pageSize=\"10\"></mat-paginator>\r\n </div>\r\n <ng-template #Spinner>\r\n <mat-spinner></mat-spinner>\r\n </ng-template>\r\n</div>\r\n", styles: ["table{width:100%}i{cursor:pointer;padding:5px}\n"], components: [{ type: i5$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i8.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i9.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i12.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: i12.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i12.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i13.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { type: i14.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5$1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i7.MatError, selector: "mat-error", inputs: ["id"] }, { type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i5$1.MatCardActions, selector: "mat-card-actions", inputs: ["align"], exportAs: ["matCardActions"] }, { type: i15.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i12.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i12.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i12.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i12.MatCellDef, selector: "[matCellDef]" }, { type: i12.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i2.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i12.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i12.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }] });
1248
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DisplayObjectsComponent, decorators: [{
1249
+ type: Component,
1250
+ args: [{ selector: 'glw-display-objects', template: "<div>\r\n <ng-content select=\"glw-header\"></ng-content>\r\n</div>\r\n\r\n<div *ngIf=\"displayform\">\r\n <mat-card>\r\n <mat-card-content>\r\n <mat-error *ngIf=\"resultException\">\r\n Unable to query : {{resultException}}\r\n </mat-error>\r\n <ng-content select=\"glw-search-form\"></ng-content>\r\n <div *ngIf=\"maxrows\" [formGroup]=\"form2\">\r\n <br />\r\n <mat-form-field>\r\n <mat-select placeholder=\"MaxRow\" formControlName=\"_MaxRow_\">\r\n <mat-option *ngFor=\"let maxrow of maxrows\" [value]=\"maxrow\">\r\n <span *ngIf=\"maxrow\">{{maxrow}} objects</span>\r\n <span *ngIf=\"!maxrow\"> Default</span>\r\n </mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <button mat-stroked-button color=\"accent\" (click)=\"onSearch()\">\r\n <mat-icon>search</mat-icon>\r\n Search\r\n </button>\r\n </mat-card-actions>\r\n </mat-card>\r\n</div>\r\n\r\n<div *ngIf=\"displayresult\">\r\n <div class=\"mat-elevation-z8\" *ngIf=\"dataSource; else Spinner\">\r\n <table mat-table [dataSource]=\"dataSource\" matSort>\r\n <ng-container matColumnDef=\"action\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <i class=\"fal fa-plus\" (click)=\"AddObj()\" *ngIf=\"canAddThis()\">\r\n </i>\r\n </th>\r\n <td mat-cell *matCellDef=\"let obj\">\r\n <i class=\"fal fa-eye\" [routerLink]=\"displayObjLinkThis(obj)\" *ngIf=\"canDisplayObjThis(obj)\">\r\n </i>\r\n <ng-container *ngFor=\"let action of actions\">\r\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\" *ngIf=\"action.icon.icon && (!action.display || action.display(obj, action.name))\">\r\n </i>\r\n <i [ngClass]=\"action.icon\" [routerLink]=\"action.routerLinkFct(obj)\" *ngIf=\"!action.icon.icon && (!action.display || action.display(obj, action.name))\"></i>\r\n </ng-container>\r\n <i class=\"fal fa-trash-alt\" (click)=\"DeleteObj(obj)\" *ngIf=\"canDeleteThis(obj)\">\r\n </i>\r\n <i class=\"fal fa-pencil\" (click)=\"EditObj(obj)\" *ngIf=\"canEditThis(obj)\">\r\n </i>\r\n </td>\r\n </ng-container>\r\n <ng-content select=\"glw-result-table\"></ng-content>\r\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplay\"></tr>\r\n <tr mat-row *matRowDef=\"let myRowData; columns: columnsToDisplay\"></tr>\r\n </table>\r\n <mat-paginator pageSize=\"10\"></mat-paginator>\r\n </div>\r\n <ng-template #Spinner>\r\n <mat-spinner></mat-spinner>\r\n </ng-template>\r\n</div>\r\n", styles: ["table{width:100%}i{cursor:pointer;padding:5px}\n"] }]
1251
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$2.MatDialog }, { type: i2.Router }, { type: i3.Location }, { type: AuthenticationService }, { type: i1$3.FormBuilder }, { type: i2.ActivatedRoute }]; }, propDecorators: { header: [{
1252
+ type: ContentChild,
1253
+ args: [HeaderComponent]
1254
+ }], formLayout: [{
1255
+ type: ContentChild,
1256
+ args: [SearchFormComponent]
1257
+ }], resultLayout: [{
1258
+ type: ContentChild,
1259
+ args: [ResultTableComponent]
1260
+ }], table: [{
1261
+ type: ViewChild,
1262
+ args: [MatTable, { static: false }]
1263
+ }], paginator: [{
1264
+ type: ViewChild,
1265
+ args: [MatPaginator, { static: false }]
1266
+ }], sort: [{
1267
+ type: ViewChild,
1268
+ args: [MatSort, { static: false }]
1269
+ }], configuration: [{
1270
+ type: Input
1271
+ }], displayObjLink: [{
1272
+ type: Input
1273
+ }], canDisplayObj: [{
1274
+ type: Input
1275
+ }], canEdit: [{
1276
+ type: Input
1277
+ }], canDelete: [{
1278
+ type: Input
1279
+ }], canAdd: [{
1280
+ type: Input
1281
+ }], form: [{
1282
+ type: Input
1283
+ }], Editor: [{
1284
+ type: Input
1285
+ }], searchRequest: [{
1286
+ type: Input
1287
+ }], postRequest: [{
1288
+ type: Input
1289
+ }], deleteRequest: [{
1290
+ type: Input
1291
+ }], putRequest: [{
1292
+ type: Input
1293
+ }], columns: [{
1294
+ type: Input
1295
+ }], glowwService: [{
1296
+ type: Input
1297
+ }], objectName: [{
1298
+ type: Input
1299
+ }], primaryKey: [{
1300
+ type: Input
1301
+ }], maxrows: [{
1302
+ type: Input
1303
+ }], mandatoryParams: [{
1304
+ type: Input
1305
+ }], actions: [{
1306
+ type: Input
1307
+ }], dialogConfig: [{
1308
+ type: Input
1309
+ }], fileFields: [{
1310
+ type: Input
1311
+ }] } });
1312
+
1313
+ class PromptComponent {
1314
+ constructor(dialogRef, data, formBuilder) {
1315
+ this.dialogRef = dialogRef;
1316
+ this.data = data;
1317
+ this.formBuilder = formBuilder;
1318
+ // Update view with given values
1319
+ this.title = data.title;
1320
+ this.message = data.message;
1321
+ this.form = this.formBuilder.group({
1322
+ prompt: [data.initialValue, data.required ? Validators.required : null],
1323
+ });
1324
+ }
1325
+ ngOnInit() {
1326
+ }
1327
+ onCancel() {
1328
+ // Close the dialog, return true
1329
+ this.dialogRef.close(false);
1330
+ }
1331
+ onOK() {
1332
+ // Close the dialog, return false
1333
+ this.dialogRef.close(this.form.value.prompt);
1334
+ }
1335
+ }
1336
+ PromptComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PromptComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i1$3.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
1337
+ PromptComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: PromptComponent, selector: "gloww-prompt", ngImport: i0, template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content [formGroup]=\"form\">\r\n <p [innerHTML]=\"message | safeHtml\"></p>\r\n <mat-form-field>\r\n <input matInput placeholder=\"Prompt\" formControlName=\"prompt\" style=\"width: calc(100% - 32px);\">\r\n </mat-form-field>\r\n</div>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button (click)=\"onCancel()\">Cancel</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onOK()\">Yes</button>\r\n</mat-dialog-actions>\r\n", styles: [""], components: [{ type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], pipes: { "safeHtml": SafeHtmlPipe } });
1338
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: PromptComponent, decorators: [{
1339
+ type: Component,
1340
+ args: [{ selector: 'gloww-prompt', template: "<h1 mat-dialog-title>\r\n {{title}}\r\n</h1>\r\n\r\n<div mat-dialog-content [formGroup]=\"form\">\r\n <p [innerHTML]=\"message | safeHtml\"></p>\r\n <mat-form-field>\r\n <input matInput placeholder=\"Prompt\" formControlName=\"prompt\" style=\"width: calc(100% - 32px);\">\r\n </mat-form-field>\r\n</div>\r\n\r\n<mat-dialog-actions>\r\n <button mat-button (click)=\"onCancel()\">Cancel</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"onOK()\">Yes</button>\r\n</mat-dialog-actions>\r\n", styles: [""] }]
1341
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }, { type: PromptModel, decorators: [{
1342
+ type: Inject,
1343
+ args: [MAT_DIALOG_DATA]
1344
+ }] }, { type: i1$3.FormBuilder }]; } });
1345
+ // tslint:disable-next-line: max-classes-per-file
1346
+ class PromptModel {
1347
+ constructor(title, message, initialValue, required) {
1348
+ this.title = title;
1349
+ this.message = message;
1350
+ this.initialValue = initialValue;
1351
+ this.required = required;
1352
+ }
1353
+ }
1354
+
1355
+ function retryWithDelay(delay$1, count = 1) {
1356
+ return (input) => input.pipe(retryWhen((errors) => errors.pipe(scan((acc, error) => ({ count: acc.count + 1, error }), {
1357
+ count: 0,
1358
+ error: undefined,
1359
+ }), tap((current) => {
1360
+ if (current.count > count) {
1361
+ throw current.error;
1362
+ }
1363
+ }), delay(delay$1))));
1364
+ }
1365
+
1366
+ class SecurePipe {
1367
+ constructor(http, domSanitizer) {
1368
+ this.http = http;
1369
+ this.domSanitizer = domSanitizer;
1370
+ }
1371
+ transform(url, delayVal, retryVal) {
1372
+ if (!delayVal) {
1373
+ delayVal = 5000;
1374
+ }
1375
+ if (!retryVal) {
1376
+ retryVal = 0;
1377
+ }
1378
+ return this.http
1379
+ // load the image as a blob
1380
+ .get(url, { responseType: 'blob' })
1381
+ // create an object url of that blob that we can use in the src attribute
1382
+ .pipe(map(e => this.domSanitizer.bypassSecurityTrustUrl(URL.createObjectURL(e))), retryWithDelay(delayVal, retryVal));
1383
+ }
1384
+ }
1385
+ SecurePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SecurePipe, deps: [{ token: i1.HttpClient }, { token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1386
+ SecurePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SecurePipe, name: "secure" });
1387
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SecurePipe, decorators: [{
1388
+ type: Pipe,
1389
+ args: [{
1390
+ name: 'secure'
1391
+ }]
1392
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i1$1.DomSanitizer }]; } });
1393
+
1394
+ class MenuListItemComponent {
1395
+ constructor(navService, router) {
1396
+ this.navService = navService;
1397
+ this.router = router;
1398
+ this._expanded = false;
1399
+ this.ariaExpanded = this.expanded;
1400
+ if (this.depth === undefined) {
1401
+ this.depth = 0;
1402
+ }
1403
+ }
1404
+ get expanded() {
1405
+ return this._expanded;
1406
+ }
1407
+ set expanded(value) {
1408
+ console.log("change expanded");
1409
+ this._expanded = value;
1410
+ }
1411
+ ngOnInit() {
1412
+ this.navService.currentUrl.subscribe((url) => {
1413
+ let route = this.item.route;
1414
+ if (typeof this.item.route === 'function') {
1415
+ const routefct = this.item.route;
1416
+ route = routefct.call(this);
1417
+ }
1418
+ if (this.item.route && url) {
1419
+ // console.log(`Checking '/${this.item.route}' against '${url}'`);
1420
+ //this.expanded = url.indexOf(`/${route}`) === 0;
1421
+ //this.ariaExpanded = this.expanded;
1422
+ // console.log(`${this.item.route} is expanded: ${this.expanded}`);
1423
+ }
1424
+ });
1425
+ }
1426
+ onItemSelected(item) {
1427
+ /*if (!item.children || !item.children.length) {
1428
+ if (typeof item.route === 'function') {
1429
+ const routefct: () => string = item.route;
1430
+ this.router.navigate([routefct.call(this)]);
1431
+ } else {
1432
+ const route: string = item.route;
1433
+ this.router.navigate([route]);
1434
+ }
1435
+ this.navService.closeNav();
1436
+ }*/
1437
+ if (item.children && item.children.length) {
1438
+ this.expanded = !this.expanded;
1439
+ }
1440
+ }
1441
+ isActive(item) {
1442
+ let route = this.item.route;
1443
+ if (typeof this.item.route === 'function') {
1444
+ const routefct = this.item.route;
1445
+ route = routefct.call(this);
1446
+ return route ? this.router.isActive(route, true) : false;
1447
+ }
1448
+ }
1449
+ routerLink(item) {
1450
+ let route = this.item.route;
1451
+ if (typeof this.item.route === 'function') {
1452
+ const routefct = this.item.route;
1453
+ route = routefct.call(this);
1454
+ }
1455
+ return route;
1456
+ }
1457
+ }
1458
+ MenuListItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MenuListItemComponent, deps: [{ token: NavService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
1459
+ MenuListItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: MenuListItemComponent, selector: "gloww-menu-list-item", inputs: { item: "item", depth: "depth" }, host: { properties: { "attr.aria-expanded": "this.ariaExpanded" } }, ngImport: i0, template: "<div class=\"thisMenu\" (click)=\"onItemSelected(item)\">\r\n <a mat-list-item [ngStyle]=\"{'padding-left': (depth * 12) + 'px'}\" [routerLink]=\"routerLink(item)\" [ngClass]=\"{'active': isActive(item), 'expanded': expanded}\" class=\"menu-list-item\">\r\n <mat-icon class=\"routeIcon\"><i [ngClass]=\"item.icon\" [ngStyle]=\"item.iconStyle\"></i></mat-icon> {{item.displayName}}\r\n </a>\r\n <span fxFlex *ngIf=\"item.children && item.children.length\">\r\n <span fxFlex></span>\r\n <mat-icon [@indicatorRotate]=\"expanded ? 'expanded': 'collapsed'\" class=\"expandIcon\">\r\n expand_more\r\n </mat-icon>\r\n </span>\r\n</div>\r\n<div *ngIf=\"expanded\">\r\n <gloww-menu-list-item *ngFor=\"let child of item.children\" [item]=\"child\" [depth]=\"depth+1\">\r\n </gloww-menu-list-item>\r\n</div>\r\n", styles: [".thisMenu{display:flex;flex-direction:row;justify-content:space-between;align-items:center;outline:none;width:calc(100% - 20px);margin:10px}.thisMenu .mat-list-item.active{background-color:#e8eaf6}.thisMenu:hover>.mat-list-item:not(.expanded),.thisMenu:focus>.mat-list-item:not(.expanded){background-color:#c5cae9!important}.mat-list-item{padding:8px 0;display:flex;width:auto}.mat-list-item .routeIcon{margin-right:40px}.routeIcon{margin-right:20px}.expandIcon{cursor:pointer}\n"], components: [{ type: i11.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: MenuListItemComponent, selector: "gloww-menu-list-item", inputs: ["item", "depth"] }], directives: [{ type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], animations: [
1460
+ trigger('indicatorRotate', [
1461
+ state('collapsed', style({ transform: 'rotate(0deg)' })),
1462
+ state('expanded', style({ transform: 'rotate(180deg)' })),
1463
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
1464
+ ])
1465
+ ] });
1466
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: MenuListItemComponent, decorators: [{
1467
+ type: Component,
1468
+ args: [{ selector: 'gloww-menu-list-item', animations: [
1469
+ trigger('indicatorRotate', [
1470
+ state('collapsed', style({ transform: 'rotate(0deg)' })),
1471
+ state('expanded', style({ transform: 'rotate(180deg)' })),
1472
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4,0.0,0.2,1)')),
1473
+ ])
1474
+ ], template: "<div class=\"thisMenu\" (click)=\"onItemSelected(item)\">\r\n <a mat-list-item [ngStyle]=\"{'padding-left': (depth * 12) + 'px'}\" [routerLink]=\"routerLink(item)\" [ngClass]=\"{'active': isActive(item), 'expanded': expanded}\" class=\"menu-list-item\">\r\n <mat-icon class=\"routeIcon\"><i [ngClass]=\"item.icon\" [ngStyle]=\"item.iconStyle\"></i></mat-icon> {{item.displayName}}\r\n </a>\r\n <span fxFlex *ngIf=\"item.children && item.children.length\">\r\n <span fxFlex></span>\r\n <mat-icon [@indicatorRotate]=\"expanded ? 'expanded': 'collapsed'\" class=\"expandIcon\">\r\n expand_more\r\n </mat-icon>\r\n </span>\r\n</div>\r\n<div *ngIf=\"expanded\">\r\n <gloww-menu-list-item *ngFor=\"let child of item.children\" [item]=\"child\" [depth]=\"depth+1\">\r\n </gloww-menu-list-item>\r\n</div>\r\n", styles: [".thisMenu{display:flex;flex-direction:row;justify-content:space-between;align-items:center;outline:none;width:calc(100% - 20px);margin:10px}.thisMenu .mat-list-item.active{background-color:#e8eaf6}.thisMenu:hover>.mat-list-item:not(.expanded),.thisMenu:focus>.mat-list-item:not(.expanded){background-color:#c5cae9!important}.mat-list-item{padding:8px 0;display:flex;width:auto}.mat-list-item .routeIcon{margin-right:40px}.routeIcon{margin-right:20px}.expandIcon{cursor:pointer}\n"] }]
1475
+ }], ctorParameters: function () { return [{ type: NavService }, { type: i2.Router }]; }, propDecorators: { ariaExpanded: [{
1476
+ type: HostBinding,
1477
+ args: ['attr.aria-expanded']
1478
+ }], item: [{
1479
+ type: Input
1480
+ }], depth: [{
1481
+ type: Input
1482
+ }] } });
1483
+
1484
+ class CodeEditorComponent {
1485
+ constructor() {
1486
+ this._value = null;
1487
+ this.onChange = () => { };
1488
+ this.onTouched = () => { };
1489
+ }
1490
+ get value() {
1491
+ return this._value;
1492
+ }
1493
+ set value(val) {
1494
+ this._value = val;
1495
+ this.onChange(val);
1496
+ this.onTouched();
1497
+ }
1498
+ writeValue(obj) {
1499
+ if (typeof (obj) === 'object') {
1500
+ this.value = JSON.stringify(obj);
1501
+ }
1502
+ else {
1503
+ this.value = obj;
1504
+ }
1505
+ }
1506
+ registerOnChange(fn) {
1507
+ this.onChange = fn;
1508
+ }
1509
+ registerOnTouched(fn) {
1510
+ this.onTouched = fn;
1511
+ }
1512
+ setDisabledState(isDisabled) {
1513
+ //throw new Error('Method not implemented.');
1514
+ }
1515
+ }
1516
+ CodeEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CodeEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1517
+ CodeEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: CodeEditorComponent, selector: "gloww-code-editor", inputs: { _value: ["value", "_value"] }, providers: [
1518
+ {
1519
+ provide: NG_VALUE_ACCESSOR,
1520
+ multi: true,
1521
+ useExisting: CodeEditorComponent
1522
+ }
1523
+ ], ngImport: i0, template: "<ngx-codemirror [(ngModel)]=\"value\" [options]=\"{lineNumbers: true,theme: 'eclipse', indentWithTabs:true,indentUnit: 4,matchBrackets: true, mode: 'text/typescript', fixedGutter:false}\">\r\n</ngx-codemirror>\r\n", styles: [".cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);background-position:right;background-repeat:no-repeat}\n"], components: [{ type: i1$4.CodemirrorComponent, selector: "ngx-codemirror", inputs: ["className", "name", "autoFocus", "options", "preserveScrollPosition"], outputs: ["cursorActivity", "focusChange", "scroll", "drop"] }], directives: [{ type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
1524
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: CodeEditorComponent, decorators: [{
1525
+ type: Component,
1526
+ args: [{ selector: 'gloww-code-editor', providers: [
1527
+ {
1528
+ provide: NG_VALUE_ACCESSOR,
1529
+ multi: true,
1530
+ useExisting: CodeEditorComponent
1531
+ }
1532
+ ], template: "<ngx-codemirror [(ngModel)]=\"value\" [options]=\"{lineNumbers: true,theme: 'eclipse', indentWithTabs:true,indentUnit: 4,matchBrackets: true, mode: 'text/typescript', fixedGutter:false}\">\r\n</ngx-codemirror>\r\n", styles: [".cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);background-position:right;background-repeat:no-repeat}\n"] }]
1533
+ }], ctorParameters: function () { return []; }, propDecorators: { _value: [{
1534
+ type: Input,
1535
+ args: ['value']
1536
+ }] } });
1537
+
1538
+ class HtmlFormatPipe {
1539
+ constructor(_sanitizer) {
1540
+ this._sanitizer = _sanitizer;
1541
+ }
1542
+ transform(value, ...args) {
1543
+ const newval = value.replace(/(^\s*\w|\.\s\w)/g, m => m.toUpperCase()).replace(/\s\./ig, '').replace(/\s*Nouvelle ligne\s*.\s*/ig, '<br/>').trim();
1544
+ if (!this._sanitizer)
1545
+ return newval;
1546
+ return this._sanitizer.bypassSecurityTrustHtml(newval);
1547
+ }
1548
+ }
1549
+ HtmlFormatPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HtmlFormatPipe, deps: [{ token: i1$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
1550
+ HtmlFormatPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HtmlFormatPipe, name: "htmlFormat" });
1551
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HtmlFormatPipe, decorators: [{
1552
+ type: Pipe,
1553
+ args: [{
1554
+ name: 'htmlFormat'
1555
+ }]
1556
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }]; } });
1557
+
1558
+ class SocialNetworkComponent {
1559
+ // oAuthAssociations: string[];
1560
+ // oAuthProviders: string[];
1561
+ constructor(authenticationService) {
1562
+ this.authenticationService = authenticationService;
1563
+ this.callback = new EventEmitter();
1564
+ this.icons = {
1565
+ Google: "fa-brands fa-google",
1566
+ LinkedIN: "fa-brands fa-linkedin",
1567
+ Facebook: "fa-brands fa-facebook",
1568
+ Github: "fa-brands fa-github",
1569
+ Amazon: "fa-brands fa-amazon",
1570
+ Apple: "fa-brands fa-apple",
1571
+ Microsoft: "fa-brands fa-microsoft",
1572
+ Twitter: "fa-brands fa-twitter",
1573
+ VK: "fa-brands fa-vk",
1574
+ };
1575
+ // this.authenticationService.getOAuthProviders().subscribe(oap => this.oAuthProviders = oap);
1576
+ // this.authenticationService.getOAuthAssociations().subscribe(oap => this.oAuthAssociations = oap);
1577
+ }
1578
+ ngOnInit() {
1579
+ }
1580
+ execute(provider) {
1581
+ this.callback.emit(provider);
1582
+ }
1583
+ writeobj(provider) {
1584
+ console.log(provider);
1585
+ }
1586
+ }
1587
+ SocialNetworkComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialNetworkComponent, deps: [{ token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Component });
1588
+ SocialNetworkComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SocialNetworkComponent, selector: "gloww-social-network", inputs: { oAuthProviders: "oAuthProviders" }, outputs: { callback: "callback" }, ngImport: i0, template: "<div class=\"SocialNetwork\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" *ngIf=\"oAuthProviders\">\r\n <ng-container *ngFor=\"let provider of oAuthProviders\">\r\n <a (click)=\"execute(provider)\">\r\n <i [ngClass]=\"icons[provider.toString()]\"></i>\r\n </a>\r\n </ng-container>\r\n</div>\r\n", styles: [""], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i9$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i9$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }] });
1589
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialNetworkComponent, decorators: [{
1590
+ type: Component,
1591
+ args: [{ selector: 'gloww-social-network', template: "<div class=\"SocialNetwork\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" *ngIf=\"oAuthProviders\">\r\n <ng-container *ngFor=\"let provider of oAuthProviders\">\r\n <a (click)=\"execute(provider)\">\r\n <i [ngClass]=\"icons[provider.toString()]\"></i>\r\n </a>\r\n </ng-container>\r\n</div>\r\n", styles: [""] }]
1592
+ }], ctorParameters: function () { return [{ type: AuthenticationService }]; }, propDecorators: { oAuthProviders: [{
1593
+ type: Input
1594
+ }], callback: [{
1595
+ type: Output
1596
+ }] } });
1597
+
1598
+ class LoginComponent {
1599
+ constructor(formBuilder, route, router, authenticationService, config) {
1600
+ this.formBuilder = formBuilder;
1601
+ this.route = route;
1602
+ this.router = router;
1603
+ this.authenticationService = authenticationService;
1604
+ this.loading = false;
1605
+ this.submitted = false;
1606
+ this.error = '';
1607
+ this.showDomain = false;
1608
+ this.state = 1;
1609
+ // redirect to home if already logged in
1610
+ if (this.authenticationService.currentUserValue) {
1611
+ this.router.navigate(['/']);
1612
+ }
1613
+ this.config = config;
1614
+ if (config && config.showDomain) {
1615
+ this.showDomain = config.showDomain;
1616
+ }
1617
+ this.authenticationService.getOAuthProviders().subscribe(oap => this.oAuthProviders = oap);
1618
+ }
1619
+ MatchPassword(fg) {
1620
+ if (!fg) {
1621
+ return;
1622
+ }
1623
+ return fg.get('newpassword')?.value === fg.get('confirmationPassword')?.value;
1624
+ }
1625
+ ngOnInit() {
1626
+ const grp = {
1627
+ username: ['', Validators.required],
1628
+ password: ['', Validators.required]
1629
+ };
1630
+ const lostPwd = {
1631
+ email: ['', Validators.required],
1632
+ gsm: [''],
1633
+ firstname: ['', Validators.required],
1634
+ lastname: ['', Validators.required]
1635
+ };
1636
+ const resetPwd = {
1637
+ email: ['', Validators.required],
1638
+ code: ['', Validators.required],
1639
+ newPassword: ['', Validators.required],
1640
+ confirmationPassword: ['', Validators.required]
1641
+ };
1642
+ if (this.showDomain) {
1643
+ grp.domain = [''];
1644
+ }
1645
+ this.loginForm = this.formBuilder.group(grp);
1646
+ this.lostPasswordForm = this.formBuilder.group(lostPwd);
1647
+ this.resetPasswordForm = this.formBuilder.group(resetPwd, { validator: this.MatchPassword });
1648
+ // get return url from route parameters or default to '/'
1649
+ this.returnUrl = this.route.snapshot.queryParams.returnUrl; //|| window.location.search;
1650
+ this.application = this.route.snapshot.queryParams.application; //|| window.location.pathname;
1651
+ console.log(`returnUrl : ${this.returnUrl}`);
1652
+ console.log(`application : ${this.application}`);
1653
+ this.idOauth = this.route.snapshot.queryParams.idOauth;
1654
+ this.provider = this.route.snapshot.queryParams.provider;
1655
+ this.name = this.route.snapshot.queryParams.name;
1656
+ this.value = this.route.snapshot.queryParams.value;
1657
+ if (this.idOauth) {
1658
+ this.state = 4;
1659
+ }
1660
+ }
1661
+ // convenience getter for easy access to form fields
1662
+ get f() { return this.loginForm.controls; }
1663
+ resetError() {
1664
+ this.error = "";
1665
+ }
1666
+ onConnect() {
1667
+ this.submitted = true;
1668
+ this.error = "";
1669
+ // stop here if form is invalid
1670
+ if (this.loginForm.invalid) {
1671
+ return;
1672
+ }
1673
+ this.loading = true;
1674
+ let domain = '';
1675
+ if (this.showDomain) {
1676
+ domain = this.f.domain.value;
1677
+ }
1678
+ this.authenticationService.login(domain, this.f.username.value, this.f.password.value)
1679
+ .pipe(first())
1680
+ .subscribe(data => {
1681
+ console.log(`navigate to ${this.returnUrl}`);
1682
+ this.router.navigate([this.returnUrl]);
1683
+ }, error => {
1684
+ if (error.error?.Code) {
1685
+ switch (error.error?.Code) {
1686
+ case 'BADAUTH':
1687
+ this.error = 'Utilisateur inconnu ou mauvais mot de passe. Veuillez vérifier vos identifiants.';
1688
+ break;
1689
+ case 'WEAKPASSWORD':
1690
+ this.error = 'Le mot de passe que vous avez utilisez est trop faible. S\'il s\'agit effectivement de votre mot de passe, veuillez le réinitialiser au moyen de la fonctionnalité "Mot de passe oublié". ';
1691
+ break;
1692
+ case 'BLACKLISTEDIP':
1693
+ this.error = `Trop de tentatives de connexion à partir de cette adresse IP(${error.error?.Params?.IP}).Vous ne pouvez plus vous connecter à partir de ce poste.`;
1694
+ break;
1695
+ case 'TOOMANYFROMIP':
1696
+ this.error = `Trop de tentatives de connexion, à partir de cette adresse IP(${error.error?.Params?.IP}).Vous ne pouvez pas réessayer pendant ${error.error?.Params?.nbrMinutes} minutes.`;
1697
+ break;
1698
+ case 'TOOMANYFORUSERNAME':
1699
+ this.error = `Trop de tentatives de connexion pour cet utilisateur(${error.error?.Params?.Username}).Vous ne pouvez pas réessayer pendant ${error.error?.Params?.nbrMinutes} minutes.`;
1700
+ break;
1701
+ }
1702
+ if (!this.error)
1703
+ this.error = error.error.Message;
1704
+ }
1705
+ else {
1706
+ this.error = 'Impossible de se connecter. ';
1707
+ }
1708
+ this.loading = false;
1709
+ });
1710
+ }
1711
+ onAskResetPasswordCode() {
1712
+ let gsm = this.lostPasswordForm.value.gsm;
1713
+ if (!this.config?.askGSM) {
1714
+ gsm = '--noGSM--';
1715
+ }
1716
+ this.authenticationService
1717
+ .askResetPasswordCode('', this.lostPasswordForm.value.firstname, this.lostPasswordForm.value.lastname, this.lostPasswordForm.value.email, gsm)
1718
+ .subscribe(d => { }, error => { });
1719
+ this.state = 3;
1720
+ }
1721
+ onResetPassword() {
1722
+ this.authenticationService
1723
+ .resetPassword(this.resetPasswordForm.value.email, this.resetPasswordForm.value.code, this.resetPasswordForm.value.newPassword)
1724
+ .subscribe(d => { }, error => { });
1725
+ this.state = 1;
1726
+ }
1727
+ OAuthSignIn(provider) {
1728
+ const url = `${window.location.origin}/admin/AuthUsers/OAuth/${provider}/${this.config.environment}?returnUrl=${encodeURI(this.returnUrl)}&application=${encodeURI(this.application)}&loginUrl=${encodeURI(window.location.pathname)}&currentUserVariableName=${this.authenticationService.currentUserVariableName}`;
1729
+ window.location.href = url;
1730
+ }
1731
+ onOAuthAskCode() {
1732
+ this.authenticationService
1733
+ .OAuthAskCode(this.authenticationService.environment, this.resetPasswordForm.value.email, this.idOauth, this.provider, this.name, this.value)
1734
+ .subscribe(d => {
1735
+ this.state = 5;
1736
+ }, error => { });
1737
+ }
1738
+ onOAuthAssociation() {
1739
+ this.authenticationService
1740
+ .OAuthAssociation(this.authenticationService.environment, this.resetPasswordForm.value.code, this.idOauth, this.provider, this.name, this.value)
1741
+ .subscribe(user => {
1742
+ console.log(user);
1743
+ window.location.href = this.returnUrl;
1744
+ }, error => { });
1745
+ }
1746
+ }
1747
+ LoginComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LoginComponent, deps: [{ token: i1$3.FormBuilder }, { token: i2.ActivatedRoute }, { token: i2.Router }, { token: AuthenticationService }, { token: AuthenticationServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1748
+ LoginComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: LoginComponent, selector: "gloww-login", ngImport: i0, template: "<div class=\"login-wrapper\" fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"height:100%\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Connexion</mat-card-title>\r\n </mat-card-header>\r\n\r\n <form class=\"example-form\" [formGroup]=\"loginForm\" (ngSubmit)=\"onConnect()\" *ngIf=\"state==1\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" *ngIf=\"showDomain\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Domain\" formControlName=\"domain\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Username\" formControlName=\"username\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Password\" formControlName=\"password\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxLayoutGap=\"20px\">\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Me Connecter</button>\r\n <button mat-stroked-button color=\"primary\" class=\"btn-block\" (click)=\"state=2; resetError();\">Mot de passe\r\n oubli\u00E9</button>\r\n </div>\r\n <br />\r\n <gloww-social-network (callback)=\"OAuthSignIn($event)\" [oAuthProviders]=\"oAuthProviders\"></gloww-social-network>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"lostPasswordForm\" (ngSubmit)=\"onAskResetPasswordCode()\" *ngIf=\"state==2\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" *ngIf=\"showDomain\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Domain\" formControlName=\"domain\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Pr\u00E9nom\" formControlName=\"firstname\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Nom\" formControlName=\"lastname\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\" *ngIf=\"config?.askGSM\">\r\n <input matInput placeholder=\"Mobile\" formControlName=\"gsm\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Demande de\r\n r\u00E9initialisation</button>\r\n <button mat-stroked-button color=\"primary\" class=\"btn-block\" (click)=\"state=3\">J'ai un\r\n code</button>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"onResetPassword()\" *ngIf=\"state==3\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Code\" formControlName=\"code\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Password\" formControlName=\"newPassword\" type=\"password\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Confirmation\" formControlName=\"confirmationPassword\" type=\"password\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">R\u00E9initialiser</button>\r\n <button mat-stroked-button color=\"primary\" class=\"btn-block\" (click)=\"state=1\">J'ai retrouv\u00E9 mon mot de\r\n passe</button>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"onOAuthAskCode()\" *ngIf=\"state==4\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span fxFlex=\"100%\">Entrez l'adresse associ\u00E9e \u00E0 votre compte. Vous recevrez un code par email.</span>\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Obtenir code</button>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"onOAuthAssociation()\" *ngIf=\"state==5\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span fxFlex=\"100%\">Faites un copier/coller du code re\u00E7u par mail</span>\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Code\" formControlName=\"code\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Associer</button>\r\n </form>\r\n </mat-card>\r\n</div>", styles: ["html,body{height:100%;margin:0;padding:0}body{background-image:url(https://lh4.googleusercontent.com/-XplyTa1Za-I/VMSgIyAYkHI/AAAAAAAADxM/oL-rD6VP4ts/w1184-h666/Android-Lollipop-wallpapers-Google-Now-Wallpaper-2.png);background-position:center;background-size:cover;background-repeat:no-repeat;min-height:100vh;font-family:Roboto,sans-serif}.app-header{justify-content:space-between;position:fixed;top:0;left:0;right:0;z-index:2;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.positronx{text-decoration:none;color:#fff}.box{position:relative;top:0;opacity:1;float:left;padding:60px 50px 40px;width:100%;background:#fff;border-radius:10px;transform:scale(1);-webkit-transform:scale(1);-ms-transform:scale(1);z-index:5;max-width:330px}.box.back{transform:scale(.95);-webkit-transform:scale(.95);-ms-transform:scale(.95);top:-20px;opacity:.8;z-index:-1}.box:before{content:\"\";width:100%;height:30px;border-radius:10px;position:absolute;top:-10px;background:rgba(255,255,255,.6);left:0;transform:scale(.95);-webkit-transform:scale(.95);-ms-transform:scale(.95);z-index:-1}.login-wrapper{height:100%}.login-wrapper mat-card-header{text-align:center;width:100%;display:block;font-weight:700}.login-wrapper mat-card-header mat-card-title{font-size:30px;margin:0}.login-wrapper .mat-card{padding:40px 70px 50px}.login-wrapper .mat-stroked-button{border:1px solid currentColor;background:#FFF7FA}.login-wrapper .mat-form-field-appearance-legacy .mat-form-field-infix{padding:.8375em 0}.SocialNetwork a{margin:10px}.SocialNetwork a i{border:1;padding:10px}\n"], components: [{ type: i5$1.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i5$1.MatCardHeader, selector: "mat-card-header" }, { type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: SocialNetworkComponent, selector: "gloww-social-network", inputs: ["oAuthProviders"], outputs: ["callback"] }], directives: [{ type: i9$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i9$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i5$1.MatCardTitle, selector: "mat-card-title, [mat-card-title], [matCardTitle]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5$1.MatCardContent, selector: "mat-card-content, [mat-card-content], [matCardContent]" }, { type: i9$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i5$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i9$1.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }] });
1749
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: LoginComponent, decorators: [{
1750
+ type: Component,
1751
+ args: [{ selector: 'gloww-login', template: "<div class=\"login-wrapper\" fxLayout=\"row\" fxLayoutAlign=\"center center\" style=\"height:100%\">\r\n\r\n <mat-card>\r\n <mat-card-header>\r\n <mat-card-title>Connexion</mat-card-title>\r\n </mat-card-header>\r\n\r\n <form class=\"example-form\" [formGroup]=\"loginForm\" (ngSubmit)=\"onConnect()\" *ngIf=\"state==1\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" *ngIf=\"showDomain\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Domain\" formControlName=\"domain\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Username\" formControlName=\"username\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Password\" formControlName=\"password\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\" fxLayoutGap=\"20px\">\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Me Connecter</button>\r\n <button mat-stroked-button color=\"primary\" class=\"btn-block\" (click)=\"state=2; resetError();\">Mot de passe\r\n oubli\u00E9</button>\r\n </div>\r\n <br />\r\n <gloww-social-network (callback)=\"OAuthSignIn($event)\" [oAuthProviders]=\"oAuthProviders\"></gloww-social-network>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"lostPasswordForm\" (ngSubmit)=\"onAskResetPasswordCode()\" *ngIf=\"state==2\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" *ngIf=\"showDomain\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Domain\" formControlName=\"domain\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Pr\u00E9nom\" formControlName=\"firstname\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Nom\" formControlName=\"lastname\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\" *ngIf=\"config?.askGSM\">\r\n <input matInput placeholder=\"Mobile\" formControlName=\"gsm\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Demande de\r\n r\u00E9initialisation</button>\r\n <button mat-stroked-button color=\"primary\" class=\"btn-block\" (click)=\"state=3\">J'ai un\r\n code</button>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"onResetPassword()\" *ngIf=\"state==3\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Code\" formControlName=\"code\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Password\" formControlName=\"newPassword\" type=\"password\">\r\n </mat-form-field>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Confirmation\" formControlName=\"confirmationPassword\" type=\"password\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">R\u00E9initialiser</button>\r\n <button mat-stroked-button color=\"primary\" class=\"btn-block\" (click)=\"state=1\">J'ai retrouv\u00E9 mon mot de\r\n passe</button>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"onOAuthAskCode()\" *ngIf=\"state==4\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span fxFlex=\"100%\">Entrez l'adresse associ\u00E9e \u00E0 votre compte. Vous recevrez un code par email.</span>\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Email\" formControlName=\"email\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Obtenir code</button>\r\n </form>\r\n <form class=\"example-form\" [formGroup]=\"resetPasswordForm\" (ngSubmit)=\"onOAuthAssociation()\" *ngIf=\"state==5\">\r\n <mat-card-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <span fxFlex=\"100%\">Faites un copier/coller du code re\u00E7u par mail</span>\r\n <span style=\"color:red; font-weight:bold;\" *ngIf=\"error\" fxFlex=\"100%\">{{error}}</span>\r\n <mat-form-field class=\"example-full-width\" fxFlex=\"100%\">\r\n <input matInput placeholder=\"Code\" formControlName=\"code\">\r\n </mat-form-field>\r\n </div>\r\n </mat-card-content>\r\n <button mat-raised-button color=\"primary\" class=\"btn-block\" type=\"submit\">Associer</button>\r\n </form>\r\n </mat-card>\r\n</div>", styles: ["html,body{height:100%;margin:0;padding:0}body{background-image:url(https://lh4.googleusercontent.com/-XplyTa1Za-I/VMSgIyAYkHI/AAAAAAAADxM/oL-rD6VP4ts/w1184-h666/Android-Lollipop-wallpapers-Google-Now-Wallpaper-2.png);background-position:center;background-size:cover;background-repeat:no-repeat;min-height:100vh;font-family:Roboto,sans-serif}.app-header{justify-content:space-between;position:fixed;top:0;left:0;right:0;z-index:2;box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f}.positronx{text-decoration:none;color:#fff}.box{position:relative;top:0;opacity:1;float:left;padding:60px 50px 40px;width:100%;background:#fff;border-radius:10px;transform:scale(1);-webkit-transform:scale(1);-ms-transform:scale(1);z-index:5;max-width:330px}.box.back{transform:scale(.95);-webkit-transform:scale(.95);-ms-transform:scale(.95);top:-20px;opacity:.8;z-index:-1}.box:before{content:\"\";width:100%;height:30px;border-radius:10px;position:absolute;top:-10px;background:rgba(255,255,255,.6);left:0;transform:scale(.95);-webkit-transform:scale(.95);-ms-transform:scale(.95);z-index:-1}.login-wrapper{height:100%}.login-wrapper mat-card-header{text-align:center;width:100%;display:block;font-weight:700}.login-wrapper mat-card-header mat-card-title{font-size:30px;margin:0}.login-wrapper .mat-card{padding:40px 70px 50px}.login-wrapper .mat-stroked-button{border:1px solid currentColor;background:#FFF7FA}.login-wrapper .mat-form-field-appearance-legacy .mat-form-field-infix{padding:.8375em 0}.SocialNetwork a{margin:10px}.SocialNetwork a i{border:1;padding:10px}\n"] }]
1752
+ }], ctorParameters: function () { return [{ type: i1$3.FormBuilder }, { type: i2.ActivatedRoute }, { type: i2.Router }, { type: AuthenticationService }, { type: AuthenticationServiceConfig, decorators: [{
1753
+ type: Optional
1754
+ }] }]; } });
1755
+
1756
+ class JwtInterceptor {
1757
+ constructor(authenticationService) {
1758
+ this.authenticationService = authenticationService;
1759
+ }
1760
+ intercept(request, next) {
1761
+ // add authorization header with jwt token if available
1762
+ try {
1763
+ const currentUser = this.authenticationService.currentUserValue;
1764
+ if (currentUser && currentUser.Token) {
1765
+ request = request.clone({
1766
+ setHeaders: {
1767
+ Authorization: `Bearer ${currentUser.Token}`
1768
+ }
1769
+ });
1770
+ }
1771
+ }
1772
+ catch (e) {
1773
+ console.log(`jwt interceptor ${e}`);
1774
+ }
1775
+ return next.handle(request);
1776
+ }
1777
+ }
1778
+ JwtInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JwtInterceptor, deps: [{ token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
1779
+ JwtInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JwtInterceptor });
1780
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: JwtInterceptor, decorators: [{
1781
+ type: Injectable
1782
+ }], ctorParameters: function () { return [{ type: AuthenticationService }]; } });
1783
+
1784
+ class ErrorInterceptor {
1785
+ constructor(authenticationService) {
1786
+ this.authenticationService = authenticationService;
1787
+ }
1788
+ intercept(request, next) {
1789
+ return next.handle(request).pipe(catchError(err => {
1790
+ if (err.status === 401) {
1791
+ // auto logout if 401 response returned from api
1792
+ this.authenticationService.logout();
1793
+ location.reload();
1794
+ }
1795
+ const error = err.error ? (err.error.message || err.StatusText) : err.statusText;
1796
+ if (console)
1797
+ console.log(err);
1798
+ return throwError(err);
1799
+ }));
1800
+ }
1801
+ }
1802
+ ErrorInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorInterceptor, deps: [{ token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable });
1803
+ ErrorInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorInterceptor });
1804
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ErrorInterceptor, decorators: [{
1805
+ type: Injectable
1806
+ }], ctorParameters: function () { return [{ type: AuthenticationService }]; } });
1807
+
1808
+ class ChangePasswordDlgComponent {
1809
+ constructor(formBuilder, dialogRef, authenticationService) {
1810
+ this.formBuilder = formBuilder;
1811
+ this.dialogRef = dialogRef;
1812
+ this.authenticationService = authenticationService;
1813
+ this.form = this.formBuilder.group({
1814
+ oldpassword: ['', Validators.required],
1815
+ newpassword: ['', Validators.required],
1816
+ confirmationpassword: ['', Validators.required]
1817
+ }, { validator: c => c.get('newpassword').value === c.get('confirmationpassword').value });
1818
+ }
1819
+ ngOnInit() {
1820
+ }
1821
+ resetError() {
1822
+ this.error = '';
1823
+ }
1824
+ onSubmit() {
1825
+ this.resetError();
1826
+ if (this.form.invalid) {
1827
+ return;
1828
+ }
1829
+ const user = this.authenticationService.currentUserValue;
1830
+ this.authenticationService.changePassword('', user.username, this.form.value.oldpassword, this.form.value.newpassword).subscribe(r => this.dialogRef.close(true), error => {
1831
+ switch (error.error?.Code) {
1832
+ case 'COMPLEXITY':
1833
+ this.error = 'Le mot de passe souhaitez n\'est pas suffisamment complexe. Veuillez utiliser un mot de passe long (8 caractères minimum) combinant des majuscules, minuscules, chiffres et caractères spéciaux.';
1834
+ break;
1835
+ case 'BADAUTH':
1836
+ this.error = 'Utilisateur inconnu ou mauvais mot de passe. Veuillez vérifier vos identifiants.';
1837
+ break;
1838
+ case 'WEAKPASSWORD':
1839
+ this.error = 'Le mot de passe que vous avez utilisez est trop faible. S\'il s\'agit effectivement de votre mot de passe, veuillez le réinitialiser au moyen de la fonctionnalité "Mot de passe oublié". ';
1840
+ break;
1841
+ case 'BLACKLISTEDIP':
1842
+ this.error = `Trop de tentatives de connexion à partir de cette adresse IP (${error.error?.Params?.IP}). Vous ne pouvez plus vous connecter à partir de ce poste.`;
1843
+ break;
1844
+ case 'TOOMANYFROMIP':
1845
+ this.error = `Trop de tentatives de connexion, à partir de cette adresse IP (${error.error?.Params?.IP}). Vous ne pouvez pas réessayer pendant ${error.error?.Params?.nbrMinutes} minutes.`;
1846
+ break;
1847
+ case 'TOOMANYFORUSERNAME':
1848
+ this.error = `Trop de tentatives de connexion pour cet utilisateur (${error.error?.Params?.Username}). Vous ne pouvez pas réessayer pendant ${error.error?.Params?.nbrMinutes} minutes.`;
1849
+ break;
1850
+ }
1851
+ this.error = error.error.Message;
1852
+ });
1853
+ }
1854
+ cancel() {
1855
+ this.dialogRef.close();
1856
+ }
1857
+ }
1858
+ ChangePasswordDlgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChangePasswordDlgComponent, deps: [{ token: i1$3.FormBuilder }, { token: i1$2.MatDialogRef }, { token: AuthenticationService }], target: i0.ɵɵFactoryTarget.Component });
1859
+ ChangePasswordDlgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: ChangePasswordDlgComponent, selector: "gloww-change-password-dlg", ngImport: i0, template: "<h2 mat-dialog-title>Change Password</h2>\r\n<form class=\"example-form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <div style=\"color:red; font-weight:bold;\" fxFlex=\"100%\">{{error}}</div>\r\n <mat-form-field fxFlex=\"100%\">\r\n <input matInput placeholder=\"Old Password\" formControlName=\"oldpassword\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field fxFlex=\"100%\">\r\n <input matInput placeholder=\"New Password\" formControlName=\"newpassword\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field fxFlex=\"100%\">\r\n <input matInput placeholder=\"Confirmation\" formControlName=\"confirmationpassword\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-stroked-button color=\"accent\" class=\"btn-block\" type=\"submit\" [disabled]=\"form.invalid\">Change\r\n Password</button>\r\n <button mat-stroked-button color=\"accent\" class=\"btn-block\" (click)=\"cancel()\">Cancel</button>\r\n </mat-dialog-actions>\r\n</form>", styles: [""], components: [{ type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i9$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i9$1.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i5$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
1860
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: ChangePasswordDlgComponent, decorators: [{
1861
+ type: Component,
1862
+ args: [{ selector: 'gloww-change-password-dlg', template: "<h2 mat-dialog-title>Change Password</h2>\r\n<form class=\"example-form\" [formGroup]=\"form\" (ngSubmit)=\"onSubmit()\">\r\n <mat-dialog-content>\r\n <div fxLayout=\"row wrap\" fxLayoutAlign=\"space-between center\">\r\n <div style=\"color:red; font-weight:bold;\" fxFlex=\"100%\">{{error}}</div>\r\n <mat-form-field fxFlex=\"100%\">\r\n <input matInput placeholder=\"Old Password\" formControlName=\"oldpassword\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field fxFlex=\"100%\">\r\n <input matInput placeholder=\"New Password\" formControlName=\"newpassword\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n <mat-form-field fxFlex=\"100%\">\r\n <input matInput placeholder=\"Confirmation\" formControlName=\"confirmationpassword\" type=\"password\" (change)=\"resetError()\">\r\n </mat-form-field>\r\n </div>\r\n </mat-dialog-content>\r\n <mat-dialog-actions>\r\n <button mat-stroked-button color=\"accent\" class=\"btn-block\" type=\"submit\" [disabled]=\"form.invalid\">Change\r\n Password</button>\r\n <button mat-stroked-button color=\"accent\" class=\"btn-block\" (click)=\"cancel()\">Cancel</button>\r\n </mat-dialog-actions>\r\n</form>", styles: [""] }]
1863
+ }], ctorParameters: function () { return [{ type: i1$3.FormBuilder }, { type: i1$2.MatDialogRef }, { type: AuthenticationService }]; } });
1864
+
1865
+ class SocialNetworkDlgComponent {
1866
+ constructor(dialogRef, authenticationService, dialog, config) {
1867
+ this.dialogRef = dialogRef;
1868
+ this.authenticationService = authenticationService;
1869
+ this.dialog = dialog;
1870
+ this.config = config;
1871
+ this.authenticationService.getOAuthProviders().subscribe(oap => this.oAuthProviders = oap);
1872
+ this.authenticationService.getOAuthAssociations().subscribe(oap => {
1873
+ this.oAuthAssociations = oap; //oap.map(item => Object.assign(new Oauthassociation(), item));
1874
+ });
1875
+ }
1876
+ ngOnInit() {
1877
+ }
1878
+ OK() {
1879
+ this.dialogRef.close();
1880
+ }
1881
+ OAuthAddAssociation(provider) {
1882
+ const url = `${window.location.origin}/admin/AuthUsers/OAuth/${provider}/${this.config.environment}`;
1883
+ window.location.href = url;
1884
+ }
1885
+ OAuthDeleteAssociation(association) {
1886
+ this.authenticationService.OAuthDeleteAssociation(association.provider, association.idOAuth).subscribe(result => {
1887
+ alert("Association supprimée");
1888
+ const index = this.oAuthAssociations.indexOf(association, 0);
1889
+ if (index >= 0) {
1890
+ this.oAuthAssociations.splice(index, 1);
1891
+ }
1892
+ else {
1893
+ alert("unable to delete item");
1894
+ }
1895
+ //this.oAuthAssociations.find(a => a === association
1896
+ }, error => {
1897
+ alert('Impossible d\'effacer l\'association');
1898
+ });
1899
+ }
1900
+ }
1901
+ SocialNetworkDlgComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialNetworkDlgComponent, deps: [{ token: i1$2.MatDialogRef }, { token: AuthenticationService }, { token: i1$2.MatDialog }, { token: AuthenticationServiceConfig, optional: true }], target: i0.ɵɵFactoryTarget.Component });
1902
+ SocialNetworkDlgComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SocialNetworkDlgComponent, selector: "gloww-social-network-dlg", ngImport: i0, template: "<h2 mat-dialog-title>Gestion des identifications par r\u00E9seaux sociaux</h2>\r\n<mat-dialog-content>\r\n <h3>Associations \u00E9tablies</h3>\r\n <p>Choisissez l'association que vous souhaitez supprimer</p>\r\n <gloww-social-network (callback)=\"OAuthDeleteAssociation($event)\" [oAuthProviders]=\"oAuthAssociations\"></gloww-social-network>\r\n <h3>Nouvelle association</h3>\r\n <p>Choisissez le provider</p>\r\n <gloww-social-network (callback)=\"OAuthAddAssociation($event)\" [oAuthProviders]=\"oAuthProviders\"></gloww-social-network>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-stroked-button color=\"accent\" class=\"btn-block\" (click)=\"OK() \">OK</button>\r\n</mat-dialog-actions>", styles: [""], components: [{ type: SocialNetworkComponent, selector: "gloww-social-network", inputs: ["oAuthProviders"], outputs: ["callback"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
1903
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SocialNetworkDlgComponent, decorators: [{
1904
+ type: Component,
1905
+ args: [{ selector: 'gloww-social-network-dlg', template: "<h2 mat-dialog-title>Gestion des identifications par r\u00E9seaux sociaux</h2>\r\n<mat-dialog-content>\r\n <h3>Associations \u00E9tablies</h3>\r\n <p>Choisissez l'association que vous souhaitez supprimer</p>\r\n <gloww-social-network (callback)=\"OAuthDeleteAssociation($event)\" [oAuthProviders]=\"oAuthAssociations\"></gloww-social-network>\r\n <h3>Nouvelle association</h3>\r\n <p>Choisissez le provider</p>\r\n <gloww-social-network (callback)=\"OAuthAddAssociation($event)\" [oAuthProviders]=\"oAuthProviders\"></gloww-social-network>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <button mat-stroked-button color=\"accent\" class=\"btn-block\" (click)=\"OK() \">OK</button>\r\n</mat-dialog-actions>", styles: [""] }]
1906
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }, { type: AuthenticationService }, { type: i1$2.MatDialog }, { type: AuthenticationServiceConfig, decorators: [{
1907
+ type: Optional
1908
+ }] }]; } });
1909
+
1910
+ class UserMenuComponent {
1911
+ constructor(authenticationService, dialog, router) {
1912
+ this.authenticationService = authenticationService;
1913
+ this.dialog = dialog;
1914
+ this.router = router;
1915
+ this.size = '1x';
1916
+ this.imageUser = null;
1917
+ this.loginpage = '';
1918
+ this.showMenuUser = false;
1919
+ this.connected = false;
1920
+ const person = this.authenticationService.currentUserValue;
1921
+ if (person && person.UserInfo) {
1922
+ this.connected = true;
1923
+ if (person.UserInfo.Picture) {
1924
+ this.imageUser = '/' + authenticationService.environment + '/' + person.UserInfo.Picture;
1925
+ }
1926
+ }
1927
+ this.authenticationService.getOAuthProviders().subscribe(oap => this.oAuthProviders = oap);
1928
+ }
1929
+ ngOnInit() {
1930
+ }
1931
+ Logout() {
1932
+ this.showMenuUser = false;
1933
+ this.authenticationService.logout();
1934
+ this.router.navigate(['/']);
1935
+ }
1936
+ ChangePassword() {
1937
+ this.showMenuUser = true;
1938
+ const dialogConfig = new MatDialogConfig();
1939
+ dialogConfig.disableClose = true;
1940
+ dialogConfig.autoFocus = true;
1941
+ dialogConfig.closeOnNavigation = false;
1942
+ this.dialog.open(ChangePasswordDlgComponent, dialogConfig).afterClosed().subscribe(result => {
1943
+ if (result) {
1944
+ alert('Password Changed');
1945
+ }
1946
+ });
1947
+ }
1948
+ toggleMenuUser() {
1949
+ this.showMenuUser = !this.showMenuUser;
1950
+ }
1951
+ Configuration() {
1952
+ const dialogConfig = new MatDialogConfig();
1953
+ dialogConfig.disableClose = true;
1954
+ dialogConfig.autoFocus = true;
1955
+ dialogConfig.closeOnNavigation = false;
1956
+ this.dialog.open(SocialNetworkDlgComponent, dialogConfig).afterClosed().subscribe(result => {
1957
+ });
1958
+ }
1959
+ }
1960
+ UserMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: UserMenuComponent, deps: [{ token: AuthenticationService }, { token: i1$2.MatDialog }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component });
1961
+ UserMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: UserMenuComponent, selector: "gloww-user-menu", inputs: { size: "size", imageUser: "imageUser", loginpage: "loginpage" }, ngImport: i0, template: "<div *ngIf=\"connected\">\r\n <span (click)=\"toggleMenuUser()\">\r\n <img [src]=\"imageUser\" style=\"height:40px;float:left; padding-left:20px\" *ngIf=\"imageUser\" />\r\n <i [ngClass]=\"'fal fa-user '+size\" *ngIf=\"!imageUser\" style=\"float:left; padding-left:10px\">\r\n <!--[size]=\"size\"-->\r\n </i>\r\n </span>\r\n <div class=\"menuUser\" *ngIf=\"showMenuUser\">\r\n <ul class=\"menuSec\" style=\"border: solid lightgrey;\">\r\n <li (click)=\"ChangePassword()\">\r\n <i class=\"fal fa-key-skeleton\"></i>Change Password\r\n </li>\r\n <li (click)=\"Configuration()\" *ngIf=\"oAuthProviders && oAuthProviders.length\">\r\n <i class=\"fal fa-tools\"></i>Configuration\r\n </li>\r\n <li (click)=\"Logout()\">\r\n <i class=\"fal fa-sign-out\"></i>D\u00E9connexion\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n<div *ngIf=\"!connected && loginpage\">\r\n <span style=\"height:40px;float:left; padding-left:20px\" [routerLink]=\"loginpage\">Connexion</span>\r\n</div>\r\n", styles: [".menuUser{position:relative}.menuUser ul{text-align:left;position:absolute;top:30px;left:-115px;width:150px;padding:10px;z-index:20;background-color:#fff;font-size:13px;color:#000}.menuUser ul li{height:30px;list-style-type:none}.menuUser ul li i{padding-right:10px;height:30px}ul.menuSec li{cursor:pointer}\n"], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i2.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
1962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: UserMenuComponent, decorators: [{
1963
+ type: Component,
1964
+ args: [{ selector: 'gloww-user-menu', template: "<div *ngIf=\"connected\">\r\n <span (click)=\"toggleMenuUser()\">\r\n <img [src]=\"imageUser\" style=\"height:40px;float:left; padding-left:20px\" *ngIf=\"imageUser\" />\r\n <i [ngClass]=\"'fal fa-user '+size\" *ngIf=\"!imageUser\" style=\"float:left; padding-left:10px\">\r\n <!--[size]=\"size\"-->\r\n </i>\r\n </span>\r\n <div class=\"menuUser\" *ngIf=\"showMenuUser\">\r\n <ul class=\"menuSec\" style=\"border: solid lightgrey;\">\r\n <li (click)=\"ChangePassword()\">\r\n <i class=\"fal fa-key-skeleton\"></i>Change Password\r\n </li>\r\n <li (click)=\"Configuration()\" *ngIf=\"oAuthProviders && oAuthProviders.length\">\r\n <i class=\"fal fa-tools\"></i>Configuration\r\n </li>\r\n <li (click)=\"Logout()\">\r\n <i class=\"fal fa-sign-out\"></i>D\u00E9connexion\r\n </li>\r\n </ul>\r\n </div>\r\n</div>\r\n<div *ngIf=\"!connected && loginpage\">\r\n <span style=\"height:40px;float:left; padding-left:20px\" [routerLink]=\"loginpage\">Connexion</span>\r\n</div>\r\n", styles: [".menuUser{position:relative}.menuUser ul{text-align:left;position:absolute;top:30px;left:-115px;width:150px;padding:10px;z-index:20;background-color:#fff;font-size:13px;color:#000}.menuUser ul li{height:30px;list-style-type:none}.menuUser ul li i{padding-right:10px;height:30px}ul.menuSec li{cursor:pointer}\n"] }]
1965
+ }], ctorParameters: function () { return [{ type: AuthenticationService }, { type: i1$2.MatDialog }, { type: i2.Router }]; }, propDecorators: { size: [{
1966
+ type: Input
1967
+ }], imageUser: [{
1968
+ type: Input
1969
+ }], loginpage: [{
1970
+ type: Input
1971
+ }] } });
1972
+
1973
+ class StagingInterceptor {
1974
+ constructor() { }
1975
+ intercept(request, next) {
1976
+ // add authorization header with jwt token if available
1977
+ try {
1978
+ if (!request.url.match(/version\.json(\?|$)/ig)) {
1979
+ console.log(`Replace ${request.url}`);
1980
+ return next.handle(request.clone({ url: request.url.replace("__Staging", "") }));
1981
+ }
1982
+ }
1983
+ catch (e) {
1984
+ console.log(`staging interceptor ${e}`);
1985
+ }
1986
+ return next.handle(request);
1987
+ }
1988
+ }
1989
+ StagingInterceptor.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: StagingInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1990
+ StagingInterceptor.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: StagingInterceptor });
1991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: StagingInterceptor, decorators: [{
1992
+ type: Injectable
1993
+ }], ctorParameters: function () { return []; } });
1994
+
1995
+ class AuthGuard {
1996
+ constructor(router, authenticationService, platformLocation
1997
+ //@Inject(APP_BASE_HREF) baseHref: string
1998
+ ) {
1999
+ this.router = router;
2000
+ this.authenticationService = authenticationService;
2001
+ this.platformLocation = platformLocation;
2002
+ this.baseHref = null;
2003
+ this.baseHref = platformLocation.getBaseHrefFromDOM();
2004
+ }
2005
+ canActivate(route, state) {
2006
+ const currentUser = this.authenticationService.currentUserValue;
2007
+ if (currentUser) {
2008
+ // logged in so return true
2009
+ const jwtToken = jwt_decode(currentUser.Token);
2010
+ if (Date.now() < jwtToken.exp * 1000) {
2011
+ return true;
2012
+ }
2013
+ else {
2014
+ this.authenticationService.logout();
2015
+ }
2016
+ }
2017
+ const vd = window.location.pathname;
2018
+ if (vd.endsWith("/login")) {
2019
+ return true;
2020
+ }
2021
+ console.log(window.location);
2022
+ console.log(route);
2023
+ console.log(state);
2024
+ console.log(state.url);
2025
+ console.log(window.location.search);
2026
+ console.log(window.location.pathname);
2027
+ const returnUrl = window.location.pathname.substr(this.baseHref.length);
2028
+ //let application = window.location.pathname.substr(0, window.location.pathname.length - state.url.length);
2029
+ /*if (state.url === '/') {
2030
+ application = window.location.pathname.endsWith("/") ? application.substr(0, window.location.pathname.length - 1) : window.location.pathname;
2031
+ }
2032
+ if (!application) { application = '/'; }
2033
+ console.log(application);*/
2034
+ // not logged in so redirect to login page with the return url
2035
+ this.router.navigate(['/login'], { queryParams: { returnUrl: `${returnUrl}${window.location.search}`, application: `${this.baseHref}` } });
2036
+ return false;
2037
+ }
2038
+ }
2039
+ AuthGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthGuard, deps: [{ token: i2.Router }, { token: AuthenticationService }, { token: i3.PlatformLocation }], target: i0.ɵɵFactoryTarget.Injectable });
2040
+ AuthGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthGuard, providedIn: 'root' });
2041
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AuthGuard, decorators: [{
2042
+ type: Injectable,
2043
+ args: [{ providedIn: 'root' }]
2044
+ }], ctorParameters: function () { return [{ type: i2.Router }, { type: AuthenticationService }, { type: i3.PlatformLocation }]; } });
2045
+
2046
+ class AdministratorGuard {
2047
+ constructor(router, authenticationService, platformLocation
2048
+ //@Inject(APP_BASE_HREF) baseHref: string
2049
+ ) {
2050
+ this.router = router;
2051
+ this.authenticationService = authenticationService;
2052
+ this.platformLocation = platformLocation;
2053
+ }
2054
+ canActivate(route, state) {
2055
+ const currentUser = this.authenticationService.currentUserValue.UserInfo;
2056
+ return currentUser.IsAdministrator || currentUser.isAdministrator;
2057
+ }
2058
+ }
2059
+ AdministratorGuard.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AdministratorGuard, deps: [{ token: i2.Router }, { token: AuthenticationService }, { token: i3.PlatformLocation }], target: i0.ɵɵFactoryTarget.Injectable });
2060
+ AdministratorGuard.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AdministratorGuard, providedIn: 'root' });
2061
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: AdministratorGuard, decorators: [{
2062
+ type: Injectable,
2063
+ args: [{
2064
+ providedIn: 'root'
2065
+ }]
2066
+ }], ctorParameters: function () { return [{ type: i2.Router }, { type: AuthenticationService }, { type: i3.PlatformLocation }]; } });
2067
+
2068
+ class GlowwSecurityModule {
2069
+ static forRoot(authenticationServiceConfig) {
2070
+ /*
2071
+ var socialLoginProviders = {
2072
+ provide: 'SocialAuthServiceConfig',
2073
+ useValue: {
2074
+ autoLogin: false,
2075
+ providers: [
2076
+ ],
2077
+ onError: (err) => {
2078
+ console.error(err);
2079
+ }
2080
+ } as SocialAuthServiceConfig,
2081
+ };
2082
+
2083
+ if (authenticationServiceConfig.googleClientId) {
2084
+ socialLoginProviders.useValue.providers.push(
2085
+ {
2086
+ id: GoogleLoginProvider.PROVIDER_ID,
2087
+ provider: new GoogleLoginProvider(
2088
+ authenticationServiceConfig.googleClientId
2089
+ )
2090
+ }
2091
+ )
2092
+ }
2093
+ if (authenticationServiceConfig.facebookClientId) {
2094
+ socialLoginProviders.useValue.providers.push(
2095
+ {
2096
+ id: FacebookLoginProvider.PROVIDER_ID,
2097
+ provider: new FacebookLoginProvider(
2098
+ authenticationServiceConfig.facebookClientId
2099
+ )
2100
+ }
2101
+ )
2102
+ }
2103
+ if (authenticationServiceConfig.amazonClientId) {
2104
+ socialLoginProviders.useValue.providers.push(
2105
+ {
2106
+ id: AmazonLoginProvider.PROVIDER_ID,
2107
+ provider: new AmazonLoginProvider(
2108
+ authenticationServiceConfig.amazonClientId
2109
+ )
2110
+ }
2111
+ )
2112
+ }
2113
+ if (authenticationServiceConfig.microsoftClientId) {
2114
+ socialLoginProviders.useValue.providers.push(
2115
+ {
2116
+ id: MicrosoftLoginProvider.PROVIDER_ID,
2117
+ provider: new MicrosoftLoginProvider(
2118
+ authenticationServiceConfig.microsoftClientId
2119
+ )
2120
+ }
2121
+ )
2122
+ }
2123
+ */
2124
+ return {
2125
+ ngModule: GlowwSecurityModule,
2126
+ providers: [
2127
+ AuthenticationService,
2128
+ AuthenticationServiceConfig,
2129
+ { provide: AuthenticationServiceConfig, useValue: authenticationServiceConfig },
2130
+ { provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true },
2131
+ { provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true },
2132
+ //{ provide: HTTP_INTERCEPTORS, useClass: StagingInterceptor, multi: true },
2133
+ //socialLoginProviders
2134
+ ]
2135
+ };
2136
+ }
2137
+ }
2138
+ GlowwSecurityModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwSecurityModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2139
+ GlowwSecurityModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwSecurityModule, declarations: [LoginComponent,
2140
+ ChangePasswordDlgComponent,
2141
+ UserMenuComponent,
2142
+ SocialNetworkDlgComponent,
2143
+ SocialNetworkComponent], imports: [CommonModule,
2144
+ FormsModule,
2145
+ ReactiveFormsModule,
2146
+ BrowserModule,
2147
+ BrowserAnimationsModule,
2148
+ FlexLayoutModule,
2149
+ MatToolbarModule,
2150
+ MatButtonModule,
2151
+ MatSidenavModule,
2152
+ MatInputModule,
2153
+ MatFormFieldModule,
2154
+ MatCardModule,
2155
+ MatDialogModule,
2156
+ HttpClientModule,
2157
+ RouterModule], exports: [LoginComponent, RouterModule, UserMenuComponent] });
2158
+ GlowwSecurityModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwSecurityModule, providers: [], imports: [[
2159
+ CommonModule,
2160
+ FormsModule,
2161
+ ReactiveFormsModule,
2162
+ BrowserModule,
2163
+ BrowserAnimationsModule,
2164
+ FlexLayoutModule,
2165
+ MatToolbarModule,
2166
+ MatButtonModule,
2167
+ MatSidenavModule,
2168
+ MatInputModule,
2169
+ MatFormFieldModule,
2170
+ MatCardModule,
2171
+ MatDialogModule,
2172
+ HttpClientModule,
2173
+ RouterModule,
2174
+ ], RouterModule] });
2175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwSecurityModule, decorators: [{
2176
+ type: NgModule,
2177
+ args: [{
2178
+ declarations: [
2179
+ LoginComponent,
2180
+ ChangePasswordDlgComponent,
2181
+ UserMenuComponent,
2182
+ SocialNetworkDlgComponent,
2183
+ SocialNetworkComponent,
2184
+ ],
2185
+ imports: [
2186
+ CommonModule,
2187
+ FormsModule,
2188
+ ReactiveFormsModule,
2189
+ BrowserModule,
2190
+ BrowserAnimationsModule,
2191
+ FlexLayoutModule,
2192
+ MatToolbarModule,
2193
+ MatButtonModule,
2194
+ MatSidenavModule,
2195
+ MatInputModule,
2196
+ MatFormFieldModule,
2197
+ MatCardModule,
2198
+ MatDialogModule,
2199
+ HttpClientModule,
2200
+ RouterModule,
2201
+ ],
2202
+ providers: [],
2203
+ exports: [LoginComponent, RouterModule, UserMenuComponent]
2204
+ }]
2205
+ }] });
2206
+
2207
+ class HtmlEditorComponent {
2208
+ constructor(sanitizer, authenticationService, voiceRecognitionService, dialog) {
2209
+ this.sanitizer = sanitizer;
2210
+ this.authenticationService = authenticationService;
2211
+ this.voiceRecognitionService = voiceRecognitionService;
2212
+ this.dialog = dialog;
2213
+ //@Input() formControlName: string = "";
2214
+ this.placeHolder = "";
2215
+ this._value = null;
2216
+ this.onChange = () => { };
2217
+ this.onTouched = () => { };
2218
+ this.allowedStyles = ['text-align'];
2219
+ this.allowedTags = ['p', 'span', 'div', 'hr', 'br', 'b', 'i', 'u', 'sup', 'sub', 'strike', 'ol', 'ul', 'li'];
2220
+ this.editorConfig = {
2221
+ editable: true,
2222
+ spellcheck: true,
2223
+ height: 'auto',
2224
+ minHeight: '75px',
2225
+ maxHeight: 'auto',
2226
+ width: 'auto',
2227
+ minWidth: '0',
2228
+ translate: 'yes',
2229
+ enableToolbar: true,
2230
+ showToolbar: true,
2231
+ placeholder: 'Enter text here...',
2232
+ defaultParagraphSeparator: 'p',
2233
+ defaultFontName: '',
2234
+ defaultFontSize: '3',
2235
+ fonts: [
2236
+ { class: 'arial', name: 'Arial' }
2237
+ ],
2238
+ customClasses: [
2239
+ {
2240
+ name: 'quote',
2241
+ class: 'quote',
2242
+ }
2243
+ ],
2244
+ uploadUrl: 'v1/image',
2245
+ uploadWithCredentials: false,
2246
+ sanitize: (html) => this.sanitize(html),
2247
+ toolbarPosition: 'top',
2248
+ toolbarHiddenButtons: [
2249
+ ['insertImage', 'insertVideo', 'customClasses', 'heading', 'heading',
2250
+ 'fontName',
2251
+ 'fontSize',
2252
+ 'textColor',
2253
+ 'backgroundColor', !this.isAdministrator() ? 'toggleEditorMode' : '']
2254
+ ],
2255
+ additionalButtons: [
2256
+ {
2257
+ title: 'Speech Recognition',
2258
+ click: (tb, event) => {
2259
+ this.tb = tb;
2260
+ tb.focus();
2261
+ this.voiceRecognitionService.start();
2262
+ this.voiceRecognitionService.text = "";
2263
+ this.dialogRef = this.dialog.open(this.voiceRecognitionTemplate, {
2264
+ width: '550px'
2265
+ });
2266
+ },
2267
+ icon: 'fas fa-comment-plus'
2268
+ }
2269
+ ]
2270
+ };
2271
+ this.voiceRecognitionService.init();
2272
+ }
2273
+ cancel() {
2274
+ this.voiceRecognitionService.stop();
2275
+ this.tb = undefined;
2276
+ this.dialogRef?.close();
2277
+ }
2278
+ paste() {
2279
+ this.tb?.insertHtml(new HtmlFormatPipe().transform(this.voiceRecognitionService.text));
2280
+ this.voiceRecognitionService.stop();
2281
+ this.tb = undefined;
2282
+ this.dialogRef?.close();
2283
+ }
2284
+ get value() {
2285
+ return this._value;
2286
+ }
2287
+ set value(val) {
2288
+ this._value = val;
2289
+ this.onChange(val);
2290
+ this.onTouched();
2291
+ }
2292
+ writeValue(obj) {
2293
+ if (obj) {
2294
+ this.value = obj;
2295
+ }
2296
+ }
2297
+ registerOnChange(fn) {
2298
+ this.onChange = fn;
2299
+ }
2300
+ registerOnTouched(fn) {
2301
+ this.onTouched = fn;
2302
+ }
2303
+ sanitize(html) {
2304
+ let itres = this.sanitizer.sanitize(SecurityContext.STYLE, html)?.replace(new RegExp('\\</?[a-z]+:[a-z]+\\>', 'gi'), '').replace(/class="Mso[a-z]+"/ig, '');
2305
+ const matchTags = itres?.match(/<\s*\/?(?<tag>[a-z0-9]+)\s*[^>]*>/ig);
2306
+ matchTags?.forEach(m => {
2307
+ const matchTag = m.match(/<\s*\/?(?<tag>[a-z0-9]+)\s*[^>]*>/i);
2308
+ if (matchTag?.groups && this.allowedTags.indexOf(matchTag?.groups['tag']) < 0) {
2309
+ itres = itres?.replace(m, '');
2310
+ }
2311
+ });
2312
+ while (true) {
2313
+ const matchStyle = itres?.match(/style\s*=\s*"(?<style>[^"]+)"/i);
2314
+ if (!matchStyle || !matchStyle?.groups) {
2315
+ break;
2316
+ }
2317
+ const styles = matchStyle?.groups['style']?.replace(/&quot;/ig, '"');
2318
+ const smatches = styles.match(/(?<name>[^;:]+)\s*:\s*(?<value>[^;]+);*/ig);
2319
+ const newStyles = [];
2320
+ smatches?.forEach((v, i, a) => {
2321
+ const ssmatches = v.match(/(?<name>[^;:]+)\s*:\s*(?<value>[^;]+);*/i);
2322
+ if (ssmatches?.groups) {
2323
+ const name = ssmatches?.groups['name'];
2324
+ if (this.allowedStyles.indexOf(name) >= 0) {
2325
+ newStyles.push(v);
2326
+ }
2327
+ const value = ssmatches.groups['value'];
2328
+ console.log(`${name}=${value}`);
2329
+ }
2330
+ });
2331
+ let attr = '';
2332
+ if (newStyles.length) {
2333
+ attr = `stylenew="${newStyles.join(';')}"`;
2334
+ }
2335
+ itres = itres?.replace(matchStyle[0], attr);
2336
+ }
2337
+ return itres?.replace(/stylenew=/ig, 'style=') ?? "";
2338
+ }
2339
+ isAdministrator() {
2340
+ const currentUser = this.authenticationService.currentUserValue.UserInfo;
2341
+ return currentUser.IsAdministrator === 1 || currentUser.isAdministrator === 1;
2342
+ }
2343
+ }
2344
+ HtmlEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HtmlEditorComponent, deps: [{ token: i1$1.DomSanitizer }, { token: AuthenticationService }, { token: VoiceRecognitionService }, { token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2345
+ HtmlEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: HtmlEditorComponent, selector: "gloww-html-editor", inputs: { placeHolder: "placeHolder", _value: ["value", "_value"] }, providers: [
2346
+ {
2347
+ provide: NG_VALUE_ACCESSOR,
2348
+ multi: true,
2349
+ useExisting: HtmlEditorComponent
2350
+ }
2351
+ ], viewQueries: [{ propertyName: "voiceRecognitionTemplate", first: true, predicate: ["voiceRecognitionDlg"], descendants: true }], ngImport: i0, template: "<div>\r\n <angular-editor [(ngModel)]=\"value\" [config]=\"editorConfig\" [placeholder]=\"placeHolder\"></angular-editor>\r\n</div>\r\n<ng-template #voiceRecognitionDlg>\r\n <mat-dialog-content>\r\n <div>La reconnaissance vocale est activ\u00E9e. Veuillez dicter le texte \u00E0 ins\u00E9rer.</div>\r\n <div [innerHTML]=\"voiceRecognitionService.text | htmlFormat\" style=\"width:500px;height:300px;border:1px solid; border-color: blue;\"></div>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions>\r\n <button class=\"mat-raised-button\" (click)=\"cancel()\">Close</button>\r\n <button class=\"mat-raised-button mat-primary\" (click)=\"paste()\">Paste</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n", styles: [""], components: [{ type: i5$3.AngularEditorComponent, selector: "angular-editor", inputs: ["id", "config", "placeholder", "tabIndex"], outputs: ["html", "viewMode", "blur", "focus"] }], directives: [{ type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], pipes: { "htmlFormat": HtmlFormatPipe } });
2352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: HtmlEditorComponent, decorators: [{
2353
+ type: Component,
2354
+ args: [{ selector: 'gloww-html-editor', providers: [
2355
+ {
2356
+ provide: NG_VALUE_ACCESSOR,
2357
+ multi: true,
2358
+ useExisting: HtmlEditorComponent
2359
+ }
2360
+ ], template: "<div>\r\n <angular-editor [(ngModel)]=\"value\" [config]=\"editorConfig\" [placeholder]=\"placeHolder\"></angular-editor>\r\n</div>\r\n<ng-template #voiceRecognitionDlg>\r\n <mat-dialog-content>\r\n <div>La reconnaissance vocale est activ\u00E9e. Veuillez dicter le texte \u00E0 ins\u00E9rer.</div>\r\n <div [innerHTML]=\"voiceRecognitionService.text | htmlFormat\" style=\"width:500px;height:300px;border:1px solid; border-color: blue;\"></div>\r\n </mat-dialog-content>\r\n\r\n <mat-dialog-actions>\r\n <button class=\"mat-raised-button\" (click)=\"cancel()\">Close</button>\r\n <button class=\"mat-raised-button mat-primary\" (click)=\"paste()\">Paste</button>\r\n </mat-dialog-actions>\r\n</ng-template>\r\n", styles: [""] }]
2361
+ }], ctorParameters: function () { return [{ type: i1$1.DomSanitizer }, { type: AuthenticationService }, { type: VoiceRecognitionService }, { type: i1$2.MatDialog }]; }, propDecorators: { voiceRecognitionTemplate: [{
2362
+ type: ViewChild,
2363
+ args: ['voiceRecognitionDlg']
2364
+ }], placeHolder: [{
2365
+ type: Input
2366
+ }], _value: [{
2367
+ type: Input,
2368
+ args: ['value']
2369
+ }] } });
2370
+
2371
+ class FileEditComponent {
2372
+ constructor(formBuilder, dialogRef, definition) {
2373
+ this.formBuilder = formBuilder;
2374
+ this.dialogRef = dialogRef;
2375
+ this.modes = {
2376
+ ".txt": "null",
2377
+ ".cs": "clike",
2378
+ ".js": "javascript",
2379
+ ".json": { name: "javascript", json: true },
2380
+ ".css": "css",
2381
+ ".scss": "scss",
2382
+ ".htm": "html",
2383
+ ".html": "html",
2384
+ ".xml": "xml"
2385
+ };
2386
+ this.form = this.formBuilder.group({
2387
+ path: [null, Validators.required],
2388
+ content: [null]
2389
+ });
2390
+ if (definition) {
2391
+ this.form.patchValue(definition);
2392
+ try {
2393
+ this.ext = definition.path.match(/\.(txt|js|json|ts|cs|css|scss|xml|html|htm)$/ig)[0];
2394
+ }
2395
+ catch {
2396
+ this.ext = null;
2397
+ }
2398
+ }
2399
+ }
2400
+ getMode() {
2401
+ try {
2402
+ if (this.ext && this.modes[this.ext]) {
2403
+ return this.modes[this.ext];
2404
+ }
2405
+ else {
2406
+ return "null";
2407
+ }
2408
+ }
2409
+ catch {
2410
+ return "null";
2411
+ }
2412
+ }
2413
+ ngOnInit() {
2414
+ }
2415
+ cancel() {
2416
+ this.dialogRef.close();
2417
+ }
2418
+ save() {
2419
+ this.dialogRef.close(this.form.value);
2420
+ }
2421
+ }
2422
+ FileEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FileEditComponent, deps: [{ token: i1$3.FormBuilder }, { token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
2423
+ FileEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FileEditComponent, selector: "gloww-file-edit", ngImport: i0, template: "<h2 mat-dialog-title>Ajout/Edition d'un fichier</h2>\r\n\r\n<mat-dialog-content [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput [readonly]=\"true\" placeholder=\"Path\" formControlName=\"path\" style=\"width: calc(100% - 32px);\">\r\n </mat-form-field>\r\n <br />\r\n <ngx-codemirror formControlName=\"content\" [options]=\"{\r\n lineNumbers: true,\r\n theme: 'eclipse',\r\n\t\t\t\tindentWithTabs:true,\r\n\t\t\t\tindentUnit: 4,\r\n mode: getMode()\r\n }\"></ngx-codemirror>\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-raised-button (click)=\"cancel()\">Close</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"save()\">Save</button>\r\n</mat-dialog-actions>\r\n", styles: [".cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);background-position:right;background-repeat:no-repeat}\n"], components: [{ type: i7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { type: i1$4.CodemirrorComponent, selector: "ngx-codemirror", inputs: ["className", "name", "autoFocus", "options", "preserveScrollPosition"], outputs: ["cursorActivity", "focusChange", "scroll", "drop"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { type: i1$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i1$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
2424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FileEditComponent, decorators: [{
2425
+ type: Component,
2426
+ args: [{ selector: 'gloww-file-edit', template: "<h2 mat-dialog-title>Ajout/Edition d'un fichier</h2>\r\n\r\n<mat-dialog-content [formGroup]=\"form\">\r\n <mat-form-field>\r\n <input matInput [readonly]=\"true\" placeholder=\"Path\" formControlName=\"path\" style=\"width: calc(100% - 32px);\">\r\n </mat-form-field>\r\n <br />\r\n <ngx-codemirror formControlName=\"content\" [options]=\"{\r\n lineNumbers: true,\r\n theme: 'eclipse',\r\n\t\t\t\tindentWithTabs:true,\r\n\t\t\t\tindentUnit: 4,\r\n mode: getMode()\r\n }\"></ngx-codemirror>\r\n</mat-dialog-content>\r\n\r\n<mat-dialog-actions>\r\n <button mat-raised-button (click)=\"cancel()\">Close</button>\r\n <button mat-raised-button color=\"primary\" (click)=\"save()\">Save</button>\r\n</mat-dialog-actions>\r\n", styles: [".cm-tab{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAMCAYAAAAkuj5RAAAAAXNSR0IArs4c6QAAAGFJREFUSMft1LsRQFAQheHPowAKoACx3IgEKtaEHujDjORSgWTH/ZOdnZOcM/sgk/kFFWY0qV8foQwS4MKBCS3qR6ixBJvElOobYAtivseIE120FaowJPN75GMu8j/LfMwNjh4HUpwg4LUAAAAASUVORK5CYII=);background-position:right;background-repeat:no-repeat}\n"] }]
2427
+ }], ctorParameters: function () { return [{ type: i1$3.FormBuilder }, { type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
2428
+ type: Inject,
2429
+ args: [MAT_DIALOG_DATA]
2430
+ }] }]; } });
2431
+
2432
+ class FolderServiceConfig {
2433
+ constructor() {
2434
+ this.apiPath = '/';
2435
+ }
2436
+ static Create(t) {
2437
+ const res = new FolderServiceConfig();
2438
+ if (t) {
2439
+ Object.assign(res, t);
2440
+ }
2441
+ return res;
2442
+ }
2443
+ }
2444
+ FolderServiceConfig.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FolderServiceConfig, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2445
+ FolderServiceConfig.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FolderServiceConfig, providedIn: 'root' });
2446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FolderServiceConfig, decorators: [{
2447
+ type: Injectable,
2448
+ args: [{ providedIn: 'root' }]
2449
+ }] });
2450
+
2451
+ class FolderService {
2452
+ constructor(http, folderServiceConfig, apiServerUrl) {
2453
+ this.http = http;
2454
+ this.folderServiceConfig = folderServiceConfig;
2455
+ console.log(`folderServiceConfig ${folderServiceConfig.apiPath}`);
2456
+ console.log(`apiServierUrl ${apiServerUrl}`);
2457
+ }
2458
+ getDirectoryContent(path) {
2459
+ return this.http.get(`${this.folderServiceConfig.apiPath}Directories/${path ?? ""}`);
2460
+ }
2461
+ postDirectoryContent(path) {
2462
+ const formData = new FormData();
2463
+ return this.http.post(`${this.folderServiceConfig.apiPath}Directories/${path}`, formData, {});
2464
+ }
2465
+ getFileContent(path) {
2466
+ return this.http.get(`${this.folderServiceConfig.apiPath}Files/${(path ?? "").replace(/[\/\\]/g, '%2F')}`, {
2467
+ responseType: 'text'
2468
+ });
2469
+ }
2470
+ getFileContentBlob(path) {
2471
+ return this.http.get(`${this.folderServiceConfig.apiPath}Files/${(path ?? "").replace(/[\/\\]/g, '%2F')}`, {
2472
+ responseType: 'blob'
2473
+ });
2474
+ }
2475
+ postFileContent(path, formData) {
2476
+ return this.http.post(`${this.folderServiceConfig.apiPath}Files/${(path ?? "").replace(/[\/\\]/g, '%2F')}`, formData, {
2477
+ reportProgress: true,
2478
+ observe: 'events'
2479
+ });
2480
+ }
2481
+ }
2482
+ FolderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FolderService, deps: [{ token: i1.HttpClient }, { token: FolderServiceConfig }, { token: API_SERVER_URL, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
2483
+ FolderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FolderService, providedIn: 'root' });
2484
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FolderService, decorators: [{
2485
+ type: Injectable,
2486
+ args: [{
2487
+ providedIn: 'root'
2488
+ }]
2489
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: FolderServiceConfig }, { type: undefined, decorators: [{
2490
+ type: Optional
2491
+ }, {
2492
+ type: Inject,
2493
+ args: [API_SERVER_URL]
2494
+ }] }]; } });
2495
+
2496
+ class FoldersComponent {
2497
+ constructor(folderService, router, route, dialog) {
2498
+ //flowService.getDirectoryContent(route.snapshot.params.id).subscribe(r => this.directoryContent = r);
2499
+ this.folderService = folderService;
2500
+ this.router = router;
2501
+ this.route = route;
2502
+ this.dialog = dialog;
2503
+ this.router.events.subscribe((event) => {
2504
+ if (event instanceof NavigationEnd) {
2505
+ const urlParts = event.url.split('/');
2506
+ this.currentDir = urlParts.slice(2).join("/");
2507
+ this.directoryContent = null;
2508
+ folderService.getDirectoryContent(this.currentDir).subscribe(r => this.directoryContent = r);
2509
+ }
2510
+ });
2511
+ }
2512
+ ngOnInit() {
2513
+ }
2514
+ addFolder() {
2515
+ const dialogConfig = new MatDialogConfig();
2516
+ dialogConfig.disableClose = true;
2517
+ dialogConfig.autoFocus = true;
2518
+ dialogConfig.closeOnNavigation = false;
2519
+ dialogConfig.data = new PromptModel("New Folder", "Please give the name of the folder to create", "", true);
2520
+ this.dialog.open(PromptComponent, dialogConfig).afterClosed().subscribe(folder => {
2521
+ if (folder) {
2522
+ this.folderService.postDirectoryContent(this.currentDir + '/' + folder).subscribe(c => {
2523
+ this.router.navigate(this.getRouterLink(folder)),
2524
+ error => alert(error);
2525
+ });
2526
+ }
2527
+ });
2528
+ }
2529
+ addFile() {
2530
+ const dialogConfig = new MatDialogConfig();
2531
+ dialogConfig.disableClose = true;
2532
+ dialogConfig.autoFocus = true;
2533
+ dialogConfig.closeOnNavigation = false;
2534
+ dialogConfig.data = new PromptModel("New File", "Please give the name of the text file to create", "", true);
2535
+ this.dialog.open(PromptComponent, dialogConfig).afterClosed().subscribe(fileName => {
2536
+ if (fileName) {
2537
+ this.Edit(fileName);
2538
+ this.directoryContent = null;
2539
+ this.folderService.getDirectoryContent(this.currentDir).subscribe(r => this.directoryContent = r);
2540
+ }
2541
+ });
2542
+ }
2543
+ addFileUpload() {
2544
+ const dialogConfig = new MatDialogConfig();
2545
+ dialogConfig.disableClose = true;
2546
+ dialogConfig.autoFocus = true;
2547
+ dialogConfig.closeOnNavigation = false;
2548
+ dialogConfig.data = { acceptMime: 'image/*', multiple: true, allowAltFileName: true };
2549
+ this.dialog.open(UploadDocComponent, dialogConfig).afterClosed().subscribe(files => {
2550
+ if (files) {
2551
+ files.forEach(file => {
2552
+ const formData = new FormData();
2553
+ formData.append('file', file.data);
2554
+ this.UploadFile(this.currentDir + "/" + file.fileName, formData);
2555
+ this.directoryContent = null;
2556
+ this.folderService.getDirectoryContent(this.currentDir).subscribe(r => this.directoryContent = r);
2557
+ });
2558
+ }
2559
+ });
2560
+ }
2561
+ getRouterLink(directory) {
2562
+ if (!this.currentDir) {
2563
+ return ['/folders', directory];
2564
+ }
2565
+ if (!directory) {
2566
+ let res = ['/folders', ...this.currentDir.split("/")];
2567
+ res.pop();
2568
+ return res;
2569
+ }
2570
+ return ['/folders', ...this.currentDir.split("/"), directory];
2571
+ }
2572
+ getHref(f) {
2573
+ if (!this.currentDir) {
2574
+ return ['/FlowMgmt', 'folders', f].join('/');
2575
+ }
2576
+ return ['/FlowMgmt', 'folders', ...this.currentDir.split("/"), f].join('/');
2577
+ }
2578
+ dataURItoBlob(content) {
2579
+ const byteString = content;
2580
+ const arrayBuffer = new ArrayBuffer(byteString.length);
2581
+ const int8Array = new Uint8Array(arrayBuffer);
2582
+ for (let i = 0; i < byteString.length; i++) {
2583
+ int8Array[i] = byteString.charCodeAt(i);
2584
+ }
2585
+ const blob = new Blob([int8Array], { type: 'text/plain' });
2586
+ return blob;
2587
+ }
2588
+ isEditable(filename) {
2589
+ return filename.match(/\.(txt|js|json|ts|cs|css|scss|xml|html|htm|exp|sh|pwsh)$/ig) != null;
2590
+ }
2591
+ UploadFile(fileName, formData) {
2592
+ this.folderService.postFileContent(fileName, formData).pipe(map(event => {
2593
+ switch (event.type) {
2594
+ case HttpEventType.UploadProgress:
2595
+ //file.progress = Math.round(event.loaded * 100 / event.total);
2596
+ break;
2597
+ case HttpEventType.Response:
2598
+ return event.body;
2599
+ }
2600
+ }), catchError((error) => {
2601
+ //file.inProgress = false;
2602
+ return of(`${fileName} upload failed.`);
2603
+ })).subscribe((event) => {
2604
+ if (typeof (event) === 'object') {
2605
+ //obj.Logo = event.Logo;
2606
+ }
2607
+ });
2608
+ }
2609
+ Edit(fileName) {
2610
+ const dialogConfig = new MatDialogConfig();
2611
+ dialogConfig.disableClose = true;
2612
+ dialogConfig.autoFocus = true;
2613
+ dialogConfig.closeOnNavigation = false;
2614
+ let content;
2615
+ this.folderService.getFileContent(this.currentDir + '/' + fileName).subscribe(c => {
2616
+ dialogConfig.data = { path: this.currentDir + '/' + fileName, content: c };
2617
+ this.dialog.open(FileEditComponent, dialogConfig).afterClosed().subscribe(data => {
2618
+ if (data) {
2619
+ const formData = new FormData();
2620
+ const imageName = fileName;
2621
+ const imageBlob = this.dataURItoBlob(data.content);
2622
+ const file = new File([imageBlob], imageName, { type: 'text/plain' });
2623
+ formData.append('file', file);
2624
+ this.UploadFile(this.currentDir + '/' + fileName, formData);
2625
+ //file.inProgress = true;
2626
+ }
2627
+ });
2628
+ });
2629
+ }
2630
+ /*
2631
+ this.http.get(`${environment.apiUrl}`, {
2632
+ responseType: 'arraybuffer', headers: headers
2633
+ }
2634
+ ).subscribe(response => this.downLoadFile(response, "application/ms-excel"));*/
2635
+ downloadFile(fileName) {
2636
+ this.folderService.getFileContentBlob(this.currentDir + '/' + fileName).subscribe(blob => {
2637
+ this.downLoadFile2(blob, blob.type);
2638
+ });
2639
+ }
2640
+ /**
2641
+ * Method is use to download file.
2642
+ * @param data - Array Buffer data
2643
+ * @param type - type of the document.
2644
+ */
2645
+ downLoadFile2(data, type) {
2646
+ let blob = new Blob([data], { type: type });
2647
+ let url = window.URL.createObjectURL(blob);
2648
+ let pwa = window.open(url);
2649
+ if (!pwa || pwa.closed || typeof pwa.closed == 'undefined') {
2650
+ alert('Please disable your Pop-up blocker and try again.');
2651
+ }
2652
+ }
2653
+ }
2654
+ FoldersComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FoldersComponent, deps: [{ token: FolderService }, { token: i2.Router }, { token: i2.ActivatedRoute }, { token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2655
+ FoldersComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: FoldersComponent, selector: "gloww-folders", ngImport: i0, template: "<h1>\r\n <i class=\"fal fa-folder\" size=\"40px\"></i> /{{currentDir}}\r\n <i class=\"fal fa-level-up\" [routerLink]=\"getRouterLink()\" *ngIf=\"currentDir\"></i>\r\n</h1>\r\n<div *ngIf=\"directoryContent else Spinner\">\r\n <i class=\"fal fa-folder-plus\" (click)=\"addFolder()\" size=\"30px\"></i>\r\n <ul>\r\n <li *ngFor=\"let d of directoryContent.directories\">\r\n <i class=\"fal fa-folder\"></i><a [routerLink]=\"getRouterLink(d)\">{{d}}</a>\r\n </li>\r\n </ul>\r\n <i class=\"fal fa-file-plus\" (click)=\"addFile()\" size=\"30px\"></i>\r\n <i class=\"fal fa-file-upload\" (click)=\"addFileUpload()\" size=\"30px\"></i>\r\n <ul>\r\n <li *ngFor=\"let f of directoryContent.files\">\r\n <a (click)=\"Edit(f)\" href=\"javascript:void(0);\" *ngIf=\"isEditable(f); else notEditable\">\r\n <i class=\"fal fa-file\"></i> {{f}}\r\n </a>\r\n <ng-template #notEditable>\r\n <i class=\"fal fa-file fa-disabled\"></i> <a (click)=\"downloadFile(f)\" target=\"_blank\" href=\"javascript:void(0);\">{{f}}</a>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n</div>\r\n<ng-template #Spinner>\r\n <mat-spinner></mat-spinner>\r\n</ng-template>", styles: ["ul{list-style:none}.fa-disabled{opacity:.6;cursor:not-allowed}i{margin:5px;height:20px}\n"], components: [{ type: i14.MatSpinner, selector: "mat-spinner", inputs: ["color"] }], directives: [{ type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }] });
2656
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: FoldersComponent, decorators: [{
2657
+ type: Component,
2658
+ args: [{ selector: 'gloww-folders', template: "<h1>\r\n <i class=\"fal fa-folder\" size=\"40px\"></i> /{{currentDir}}\r\n <i class=\"fal fa-level-up\" [routerLink]=\"getRouterLink()\" *ngIf=\"currentDir\"></i>\r\n</h1>\r\n<div *ngIf=\"directoryContent else Spinner\">\r\n <i class=\"fal fa-folder-plus\" (click)=\"addFolder()\" size=\"30px\"></i>\r\n <ul>\r\n <li *ngFor=\"let d of directoryContent.directories\">\r\n <i class=\"fal fa-folder\"></i><a [routerLink]=\"getRouterLink(d)\">{{d}}</a>\r\n </li>\r\n </ul>\r\n <i class=\"fal fa-file-plus\" (click)=\"addFile()\" size=\"30px\"></i>\r\n <i class=\"fal fa-file-upload\" (click)=\"addFileUpload()\" size=\"30px\"></i>\r\n <ul>\r\n <li *ngFor=\"let f of directoryContent.files\">\r\n <a (click)=\"Edit(f)\" href=\"javascript:void(0);\" *ngIf=\"isEditable(f); else notEditable\">\r\n <i class=\"fal fa-file\"></i> {{f}}\r\n </a>\r\n <ng-template #notEditable>\r\n <i class=\"fal fa-file fa-disabled\"></i> <a (click)=\"downloadFile(f)\" target=\"_blank\" href=\"javascript:void(0);\">{{f}}</a>\r\n </ng-template>\r\n </li>\r\n </ul>\r\n</div>\r\n<ng-template #Spinner>\r\n <mat-spinner></mat-spinner>\r\n</ng-template>", styles: ["ul{list-style:none}.fa-disabled{opacity:.6;cursor:not-allowed}i{margin:5px;height:20px}\n"] }]
2659
+ }], ctorParameters: function () { return [{ type: FolderService }, { type: i2.Router }, { type: i2.ActivatedRoute }, { type: i1$2.MatDialog }]; } });
2660
+
2661
+ class DownloadProgressComponent {
2662
+ constructor(dialogRef, arg, httpClient) {
2663
+ this.dialogRef = dialogRef;
2664
+ this.httpClient = httpClient;
2665
+ this.done = -1;
2666
+ this.name = arg.name;
2667
+ this.files = arg.files;
2668
+ this.current = [];
2669
+ this.message = "Donwload des fichiers";
2670
+ this.percent = -1;
2671
+ }
2672
+ ngOnInit() {
2673
+ if (this.name) {
2674
+ this.downloadZip();
2675
+ }
2676
+ else {
2677
+ this.download();
2678
+ }
2679
+ }
2680
+ async getFile(url, callback) {
2681
+ const httpOptions = {
2682
+ observe: "events",
2683
+ reportProgress: true,
2684
+ responseType: "blob" //as 'json'
2685
+ };
2686
+ const res = await this.httpClient.get(url, httpOptions).pipe(map((event) => {
2687
+ console.log(event);
2688
+ /*if (event.type === HttpEventType.DownloadProgress) {
2689
+ console.log(`download progress ${(event as HttpEventType.DownloadProgress).valueOf}`);
2690
+ }
2691
+ if (event.type === HttpEventType.Response) {
2692
+ console.log("donwload completed");
2693
+ }*/
2694
+ if (event.type === 3) {
2695
+ callback(url, event.loaded, event.total);
2696
+ }
2697
+ if (event instanceof HttpResponse) {
2698
+ callback(url, -1, -1);
2699
+ }
2700
+ return event;
2701
+ }), filter((event) => event instanceof HttpResponse)).toPromise().catch((err) => {
2702
+ const error = err.error;
2703
+ return error;
2704
+ });
2705
+ return res.body;
2706
+ }
2707
+ callback(url, loaded, total) {
2708
+ const index = this.current.findIndex(c => c.url === url);
2709
+ if (total === -1) {
2710
+ this.done += 1;
2711
+ this.current.splice(index, 1);
2712
+ }
2713
+ else {
2714
+ if (index === -1) {
2715
+ this.current.push({ url, loaded, total });
2716
+ }
2717
+ else {
2718
+ this.current[index].loaded = loaded;
2719
+ }
2720
+ }
2721
+ }
2722
+ callback_zip(metadata) {
2723
+ this.percent = metadata.percent;
2724
+ }
2725
+ async downloadZip() {
2726
+ const zip = new JSZip();
2727
+ // tslint:disable-next-line:prefer-for-of
2728
+ this.done = 0;
2729
+ await Promise.all(this.files.map(async (file) => {
2730
+ let fileData;
2731
+ fileData = await this.getFile(file.url, this.callback.bind(this));
2732
+ const b = new Blob([fileData], { type: '' + fileData.type + '' });
2733
+ zip.file(file.name, b);
2734
+ }));
2735
+ this.message = "Génération du fichier Zip";
2736
+ this.done = -1;
2737
+ await zip.generateAsync({ type: 'blob' }, this.callback_zip.bind(this)).then((content) => {
2738
+ if (content) {
2739
+ FileSaver.saveAs(content, this.name);
2740
+ }
2741
+ });
2742
+ this.dialogRef.close();
2743
+ }
2744
+ async download() {
2745
+ const zip = new JSZip();
2746
+ // tslint:disable-next-line:prefer-for-of
2747
+ this.done = 0;
2748
+ await Promise.all(this.files.map(async (file) => {
2749
+ let fileData;
2750
+ fileData = await this.getFile(file.url, this.callback.bind(this));
2751
+ const b = new Blob([fileData], { type: '' + fileData.type + '' });
2752
+ FileSaver.saveAs(b, file.name);
2753
+ }));
2754
+ this.message = "Génération du fichier Zip";
2755
+ this.done = -1;
2756
+ this.dialogRef.close();
2757
+ }
2758
+ }
2759
+ DownloadProgressComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DownloadProgressComponent, deps: [{ token: i1$2.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Component });
2760
+ DownloadProgressComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: DownloadProgressComponent, selector: "gloww-download-progress", ngImport: i0, template: "<h2 mat-dialog-title>Progression Donwload</h2>\r\n\r\n<mat-dialog-content>\r\n <H3>{{message}}</H3>\r\n <mat-progress-bar [value]=\"percent\" *ngIf=\"percent>0\"></mat-progress-bar>\r\n <div *ngIf=\"done>=0\">\r\n <mat-progress-bar [value]=\"done*100/files.length\"></mat-progress-bar> {{done}}/{{files.length}}\r\n <br />\r\n <ul>\r\n <li *ngFor=\" let file of current; index as i\">\r\n <span id=\"file-label\">{{file.url}}</span>\r\n <mat-progress-bar [value]=\"file.loaded*100/file.total\"></mat-progress-bar>\r\n </li>\r\n </ul>\r\n </div>\r\n</mat-dialog-content>\r\n\r\n\r\n<mat-dialog-actions>\r\n <!--<button class=\"mat-raised-button\" (click)=\"cancel()\">Close</button>\r\n\t<button class=\"mat-raised-button mat-primary\" (click)=\"save()\">Save</button>-->\r\n</mat-dialog-actions>", styles: [""], components: [{ type: i2$1.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], directives: [{ type: i1$2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1$2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1$2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }] });
2761
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: DownloadProgressComponent, decorators: [{
2762
+ type: Component,
2763
+ args: [{ selector: 'gloww-download-progress', template: "<h2 mat-dialog-title>Progression Donwload</h2>\r\n\r\n<mat-dialog-content>\r\n <H3>{{message}}</H3>\r\n <mat-progress-bar [value]=\"percent\" *ngIf=\"percent>0\"></mat-progress-bar>\r\n <div *ngIf=\"done>=0\">\r\n <mat-progress-bar [value]=\"done*100/files.length\"></mat-progress-bar> {{done}}/{{files.length}}\r\n <br />\r\n <ul>\r\n <li *ngFor=\" let file of current; index as i\">\r\n <span id=\"file-label\">{{file.url}}</span>\r\n <mat-progress-bar [value]=\"file.loaded*100/file.total\"></mat-progress-bar>\r\n </li>\r\n </ul>\r\n </div>\r\n</mat-dialog-content>\r\n\r\n\r\n<mat-dialog-actions>\r\n <!--<button class=\"mat-raised-button\" (click)=\"cancel()\">Close</button>\r\n\t<button class=\"mat-raised-button mat-primary\" (click)=\"save()\">Save</button>-->\r\n</mat-dialog-actions>", styles: [""] }]
2764
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
2765
+ type: Inject,
2766
+ args: [MAT_DIALOG_DATA]
2767
+ }] }, { type: i1.HttpClient }]; } });
2768
+
2769
+ class SecureAComponent {
2770
+ constructor(dialog) {
2771
+ this.dialog = dialog;
2772
+ }
2773
+ ngOnInit() {
2774
+ }
2775
+ click() {
2776
+ const dialogConfig = new MatDialogConfig();
2777
+ dialogConfig.disableClose = true;
2778
+ dialogConfig.autoFocus = true;
2779
+ dialogConfig.closeOnNavigation = false;
2780
+ dialogConfig.data = { files: [{ url: this.href, name: this.name }] };
2781
+ this.dialog.open(DownloadProgressComponent, dialogConfig).afterClosed().subscribe();
2782
+ }
2783
+ }
2784
+ SecureAComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SecureAComponent, deps: [{ token: i1$2.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
2785
+ SecureAComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.2.3", type: SecureAComponent, selector: "gloww-secure-a", inputs: { href: "href", name: "name" }, ngImport: i0, template: "<a (click)=\"click()\" href=\"javascript:void(0);\">\r\n <ng-content></ng-content>\r\n</a>", styles: [""] });
2786
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: SecureAComponent, decorators: [{
2787
+ type: Component,
2788
+ args: [{ selector: 'gloww-secure-a', template: "<a (click)=\"click()\" href=\"javascript:void(0);\">\r\n <ng-content></ng-content>\r\n</a>", styles: [""] }]
2789
+ }], ctorParameters: function () { return [{ type: i1$2.MatDialog }]; }, propDecorators: { href: [{
2790
+ type: Input
2791
+ }], name: [{
2792
+ type: Input
2793
+ }] } });
2794
+
2795
+ class GlowwModule {
2796
+ static forRoot(folderServiceConfig) {
2797
+ console.log(`forRoot ${folderServiceConfig}`);
2798
+ return {
2799
+ ngModule: GlowwModule,
2800
+ providers: [
2801
+ VersionCheckService,
2802
+ NavService,
2803
+ VoiceRecognitionService,
2804
+ {
2805
+ provide: FolderServiceConfig,
2806
+ useValue: folderServiceConfig
2807
+ }
2808
+ ]
2809
+ };
2810
+ }
2811
+ }
2812
+ GlowwModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2813
+ GlowwModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwModule, declarations: [UploadDocComponent,
2814
+ SafeHtmlPipe,
2815
+ DisplayObjectsComponent,
2816
+ HeaderComponent,
2817
+ ResultTableComponent,
2818
+ SearchFormComponent,
2819
+ ConfirmationComponent,
2820
+ PromptComponent,
2821
+ SecurePipe,
2822
+ SecureImgComponent,
2823
+ MenuListItemComponent,
2824
+ CodeEditorComponent,
2825
+ HtmlEditorComponent,
2826
+ HtmlFormatPipe,
2827
+ UploadFileComponent,
2828
+ FileSinkDirective,
2829
+ FileEditComponent,
2830
+ FoldersComponent,
2831
+ DownloadProgressComponent,
2832
+ SecureAComponent], imports: [CommonModule,
2833
+ BrowserModule,
2834
+ RouterModule,
2835
+ FormsModule,
2836
+ ReactiveFormsModule,
2837
+ MatDialogModule,
2838
+ MatInputModule,
2839
+ MatIconModule,
2840
+ MatButtonModule,
2841
+ MatCardModule,
2842
+ MatProgressSpinnerModule,
2843
+ MatProgressBarModule,
2844
+ MatTableModule,
2845
+ MatSelectModule,
2846
+ MatPaginatorModule,
2847
+ MatSortModule,
2848
+ MatProgressSpinnerModule,
2849
+ CodemirrorModule,
2850
+ AngularEditorModule], exports: [SafeHtmlPipe,
2851
+ UploadDocComponent,
2852
+ UploadFileComponent,
2853
+ DisplayObjectsComponent,
2854
+ HeaderComponent,
2855
+ ResultTableComponent,
2856
+ SearchFormComponent,
2857
+ ConfirmationComponent,
2858
+ PromptComponent,
2859
+ SecurePipe,
2860
+ SecureImgComponent,
2861
+ MenuListItemComponent,
2862
+ CodeEditorComponent,
2863
+ HtmlEditorComponent,
2864
+ HtmlFormatPipe,
2865
+ FoldersComponent,
2866
+ DownloadProgressComponent,
2867
+ SecureAComponent] });
2868
+ GlowwModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwModule, providers: [], imports: [[
2869
+ CommonModule,
2870
+ BrowserModule,
2871
+ RouterModule,
2872
+ FormsModule,
2873
+ ReactiveFormsModule,
2874
+ MatDialogModule,
2875
+ MatInputModule,
2876
+ MatIconModule,
2877
+ MatButtonModule,
2878
+ MatCardModule,
2879
+ MatProgressSpinnerModule,
2880
+ MatProgressBarModule,
2881
+ MatTableModule,
2882
+ MatSelectModule,
2883
+ MatPaginatorModule,
2884
+ MatSortModule,
2885
+ MatProgressSpinnerModule,
2886
+ CodemirrorModule,
2887
+ AngularEditorModule
2888
+ ]] });
2889
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwModule, decorators: [{
2890
+ type: NgModule,
2891
+ args: [{
2892
+ declarations: [
2893
+ UploadDocComponent,
2894
+ SafeHtmlPipe,
2895
+ DisplayObjectsComponent,
2896
+ HeaderComponent,
2897
+ ResultTableComponent,
2898
+ SearchFormComponent,
2899
+ ConfirmationComponent,
2900
+ PromptComponent,
2901
+ SecurePipe,
2902
+ SecureImgComponent,
2903
+ MenuListItemComponent,
2904
+ CodeEditorComponent,
2905
+ HtmlEditorComponent,
2906
+ HtmlFormatPipe,
2907
+ UploadFileComponent,
2908
+ FileSinkDirective,
2909
+ FileEditComponent,
2910
+ FoldersComponent,
2911
+ DownloadProgressComponent,
2912
+ SecureAComponent,
2913
+ ],
2914
+ imports: [
2915
+ CommonModule,
2916
+ BrowserModule,
2917
+ RouterModule,
2918
+ FormsModule,
2919
+ ReactiveFormsModule,
2920
+ MatDialogModule,
2921
+ MatInputModule,
2922
+ MatIconModule,
2923
+ MatButtonModule,
2924
+ MatCardModule,
2925
+ MatProgressSpinnerModule,
2926
+ MatProgressBarModule,
2927
+ MatTableModule,
2928
+ MatSelectModule,
2929
+ MatPaginatorModule,
2930
+ MatSortModule,
2931
+ MatProgressSpinnerModule,
2932
+ CodemirrorModule,
2933
+ AngularEditorModule
2934
+ ],
2935
+ providers: [],
2936
+ exports: [
2937
+ SafeHtmlPipe,
2938
+ UploadDocComponent,
2939
+ UploadFileComponent,
2940
+ DisplayObjectsComponent,
2941
+ HeaderComponent,
2942
+ ResultTableComponent,
2943
+ SearchFormComponent,
2944
+ ConfirmationComponent,
2945
+ PromptComponent,
2946
+ SecurePipe,
2947
+ SecureImgComponent,
2948
+ MenuListItemComponent,
2949
+ CodeEditorComponent,
2950
+ HtmlEditorComponent,
2951
+ HtmlFormatPipe,
2952
+ FoldersComponent,
2953
+ DownloadProgressComponent,
2954
+ SecureAComponent
2955
+ ]
2956
+ }]
2957
+ }] });
2958
+
2959
+ class GlowwSecurityService {
2960
+ constructor() { }
2961
+ }
2962
+ GlowwSecurityService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwSecurityService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
2963
+ GlowwSecurityService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwSecurityService, providedIn: 'root' });
2964
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.2.3", ngImport: i0, type: GlowwSecurityService, decorators: [{
2965
+ type: Injectable,
2966
+ args: [{
2967
+ providedIn: 'root'
2968
+ }]
2969
+ }], ctorParameters: function () { return []; } });
2970
+
2971
+ /*
2972
+ * Public API Surface of gloww
2973
+ */
2974
+
2975
+ /**
2976
+ * Generated bundle index. Do not edit.
2977
+ */
2978
+
2979
+ export { API_SERVER_URL, AdministratorGuard, AuthGuard, AuthenticationService, AuthenticationServiceConfig, ChangePasswordDlgComponent, CodeEditorComponent, ConfirmationComponent, ConfirmationModel, DialogService, DisplayObjectsComponent, DownloadProgressComponent, ErrorInterceptor, FolderServiceConfig, FoldersComponent, GLOWW_APPLI, GlowwModule, GlowwSecurityModule, GlowwSecurityService, GlowwService, HeaderComponent, HtmlEditorComponent, HtmlFormatPipe, JwtInterceptor, LoginComponent, MenuListItemComponent, NavService, PromptComponent, PromptModel, ResultTableComponent, SafeHtmlPipe, SearchFormComponent, SecureAComponent, SecureImgComponent, SecurePipe, StagingInterceptor, UploadDocComponent, UploadFileComponent, UserMenuComponent, VersionCheckService, VoiceRecognitionService };
2980
+ //# sourceMappingURL=gloww-gloww.mjs.map