@jetbrains/ring-ui 5.1.23 → 5.1.25

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 (1211) hide show
  1. package/components/alert/alert.css +147 -0
  2. package/components/alert/alert.d.ts +113 -0
  3. package/components/alert/alert.js +186 -0
  4. package/components/alert/container.css +28 -0
  5. package/components/alert/container.d.ts +15 -0
  6. package/components/alert/container.js +30 -0
  7. package/components/alert-service/alert-service.d.ts +34 -0
  8. package/components/alert-service/alert-service.js +107 -0
  9. package/components/alert-service/alert-service.stories.css +20 -0
  10. package/components/analytics/analytics.d.ts +38 -0
  11. package/components/analytics/analytics.js +82 -0
  12. package/components/analytics/analytics__custom-plugin.d.ts +29 -0
  13. package/components/analytics/analytics__custom-plugin.js +61 -0
  14. package/components/analytics/analytics__fus-plugin.d.ts +52 -0
  15. package/components/analytics/analytics__fus-plugin.js +22 -0
  16. package/components/analytics/analytics__ga-plugin.d.ts +27 -0
  17. package/components/analytics/analytics__ga-plugin.js +89 -0
  18. package/components/analytics/analytics__plugin-utils.d.ts +31 -0
  19. package/components/analytics/analytics__plugin-utils.js +92 -0
  20. package/components/auth/auth.d.ts +3 -0
  21. package/components/auth/auth.js +42 -0
  22. package/components/auth/auth__core.d.ts +236 -0
  23. package/components/auth/auth__core.js +834 -0
  24. package/components/auth/background-flow.d.ts +31 -0
  25. package/components/auth/background-flow.js +97 -0
  26. package/components/auth/down-notification.css +17 -0
  27. package/components/auth/down-notification.d.ts +15 -0
  28. package/components/auth/down-notification.js +52 -0
  29. package/components/auth/iframe-flow.d.ts +20 -0
  30. package/components/auth/iframe-flow.js +81 -0
  31. package/components/auth/landing-entry.d.ts +3 -0
  32. package/components/auth/landing-entry.js +2 -0
  33. package/components/auth/landing.d.ts +2 -0
  34. package/components/auth/landing.html +12 -0
  35. package/components/auth/landing.js +26 -0
  36. package/components/auth/request-builder.d.ts +48 -0
  37. package/components/auth/request-builder.js +64 -0
  38. package/components/auth/response-parser.d.ts +70 -0
  39. package/components/auth/response-parser.js +99 -0
  40. package/components/auth/storage.d.ts +112 -0
  41. package/components/auth/storage.js +224 -0
  42. package/components/auth/token-validator.d.ts +93 -0
  43. package/components/auth/token-validator.js +169 -0
  44. package/components/auth/window-flow.d.ts +26 -0
  45. package/components/auth/window-flow.js +102 -0
  46. package/components/auth-dialog/auth-dialog.css +56 -0
  47. package/components/auth-dialog/auth-dialog.d.ts +60 -0
  48. package/components/auth-dialog/auth-dialog.js +93 -0
  49. package/components/auth-dialog-service/auth-dialog-service.d.ts +5 -0
  50. package/components/auth-dialog-service/auth-dialog-service.js +25 -0
  51. package/components/auth-ng/auth-ng.js +143 -0
  52. package/components/auth-ng/auth-ng.mock.js +28 -0
  53. package/components/auth-ng/auth-ng.stories.js +41 -0
  54. package/components/autofocus-ng/autofocus-ng.js +51 -0
  55. package/components/autofocus-ng/autofocus-ng.stories.js +41 -0
  56. package/components/autofocus-ng/autofocus-ng.test.js +49 -0
  57. package/components/avatar/avatar-example-datauri.d.ts +1 -0
  58. package/components/avatar/avatar-example-datauri.js +24 -0
  59. package/components/avatar/avatar.css +27 -0
  60. package/components/avatar/avatar.d.ts +52 -0
  61. package/components/avatar/avatar.js +98 -0
  62. package/components/avatar/fallback-avatar.d.ts +17 -0
  63. package/components/avatar/fallback-avatar.js +113 -0
  64. package/components/avatar-editor-ng/avatar-editor-ng.css +104 -0
  65. package/components/avatar-editor-ng/avatar-editor-ng.js +133 -0
  66. package/components/avatar-editor-ng/avatar-editor-ng.stories.js +41 -0
  67. package/components/avatar-editor-ng/avatar-editor-ng__template.js +28 -0
  68. package/components/avatar-ng/avatar-ng.js +7 -0
  69. package/components/avatar-ng/avatar-ng.stories.js +33 -0
  70. package/components/badge/badge.css +44 -0
  71. package/components/badge/badge.d.ts +24 -0
  72. package/components/badge/badge.js +35 -0
  73. package/components/badge-ng/badge-ng.js +8 -0
  74. package/components/badge-ng/badge-ng.stories.js +32 -0
  75. package/components/breadcrumb-ng/breadcrumb-ng.js +60 -0
  76. package/components/breadcrumb-ng/breadcrumb-ng.stories.js +33 -0
  77. package/components/breadcrumb-ng/breadcrumb.css +70 -0
  78. package/components/button/button.css +398 -0
  79. package/components/button/button.d.ts +67 -0
  80. package/components/button/button.js +70 -0
  81. package/components/button/button__classes.d.ts +2 -0
  82. package/components/button/button__classes.js +18 -0
  83. package/components/button-group/button-group.css +235 -0
  84. package/components/button-group/button-group.d.ts +18 -0
  85. package/components/button-group/button-group.js +21 -0
  86. package/components/button-group/caption.d.ts +8 -0
  87. package/components/button-group/caption.js +14 -0
  88. package/components/button-group-ng/button-group-ng.css +4 -0
  89. package/components/button-group-ng/button-group-ng.js +43 -0
  90. package/components/button-group-ng/button-group-ng.stories.js +30 -0
  91. package/components/button-ng/button-ng.css +23 -0
  92. package/components/button-ng/button-ng.js +192 -0
  93. package/components/button-ng/button-ng.stories.js +114 -0
  94. package/components/button-ng/button-ng.test.js +95 -0
  95. package/components/button-set/button-set.css +22 -0
  96. package/components/button-set/button-set.d.ts +16 -0
  97. package/components/button-set/button-set.js +22 -0
  98. package/components/button-set-ng/button-set-ng.js +22 -0
  99. package/components/button-set-ng/button-set-ng.stories.js +30 -0
  100. package/components/button-toolbar/button-toolbar.css +26 -0
  101. package/components/button-toolbar/button-toolbar.d.ts +16 -0
  102. package/components/button-toolbar/button-toolbar.js +20 -0
  103. package/components/button-toolbar-ng/button-toolbar-ng.js +23 -0
  104. package/components/button-toolbar-ng/button-toolbar-ng.stories.js +35 -0
  105. package/components/caret/caret.d.ts +66 -0
  106. package/components/caret/caret.js +216 -0
  107. package/components/checkbox/checkbox.css +146 -0
  108. package/components/checkbox/checkbox.d.ts +45 -0
  109. package/components/checkbox/checkbox.js +72 -0
  110. package/components/checkbox-ng/checkbox-ng.js +64 -0
  111. package/components/checkbox-ng/checkbox-ng.stories.js +80 -0
  112. package/components/checkbox-ng/checkbox-ng.test.js +61 -0
  113. package/components/clipboard/clipboard-fallback.d.ts +2 -0
  114. package/components/clipboard/clipboard-fallback.js +44 -0
  115. package/components/clipboard/clipboard.d.ts +5 -0
  116. package/components/clipboard/clipboard.js +41 -0
  117. package/components/code/code.css +31 -0
  118. package/components/code/code.d.ts +44 -0
  119. package/components/code/code.js +94 -0
  120. package/components/code/highlight.css +112 -0
  121. package/components/compiler-ng/compiler-ng.js +63 -0
  122. package/components/compiler-ng/compiler-ng.stories.js +32 -0
  123. package/components/compiler-ng/compiler-ng.test.js +207 -0
  124. package/components/confirm/confirm.css +9 -0
  125. package/components/confirm/confirm.d.ts +48 -0
  126. package/components/confirm/confirm.js +59 -0
  127. package/components/confirm-ng/confirm-ng.js +30 -0
  128. package/components/confirm-ng/confirm-ng.stories.js +43 -0
  129. package/components/confirm-service/confirm-service.d.ts +21 -0
  130. package/components/confirm-service/confirm-service.js +51 -0
  131. package/components/content-layout/content-layout.css +108 -0
  132. package/components/content-layout/content-layout.d.ts +26 -0
  133. package/components/content-layout/content-layout.js +45 -0
  134. package/components/content-layout/sidebar.d.ts +31 -0
  135. package/components/content-layout/sidebar.js +76 -0
  136. package/components/contenteditable/contenteditable.d.ts +47 -0
  137. package/components/contenteditable/contenteditable.js +47 -0
  138. package/components/control-label/control-label.css +23 -0
  139. package/components/control-label/control-label.d.ts +11 -0
  140. package/components/control-label/control-label.js +22 -0
  141. package/components/data-list/data-list.css +98 -0
  142. package/components/data-list/data-list.d.ts +85 -0
  143. package/components/data-list/data-list.js +119 -0
  144. package/components/data-list/data-list.mock.d.ts +16 -0
  145. package/components/data-list/data-list.mock.js +207 -0
  146. package/components/data-list/item.d.ts +50 -0
  147. package/components/data-list/item.js +114 -0
  148. package/components/data-list/selection.d.ts +16 -0
  149. package/components/data-list/selection.js +81 -0
  150. package/components/data-list/title.d.ts +26 -0
  151. package/components/data-list/title.js +65 -0
  152. package/components/data-list-ng/data-list-ng.js +7 -0
  153. package/components/data-list-ng/data-list-ng.stories.js +54 -0
  154. package/components/date-picker/consts.d.ts +102 -0
  155. package/components/date-picker/consts.js +56 -0
  156. package/components/date-picker/date-input.d.ts +47 -0
  157. package/components/date-picker/date-input.js +91 -0
  158. package/components/date-picker/date-picker.css +603 -0
  159. package/components/date-picker/date-picker.d.ts +77 -0
  160. package/components/date-picker/date-picker.js +218 -0
  161. package/components/date-picker/date-popup.d.ts +55 -0
  162. package/components/date-picker/date-popup.js +347 -0
  163. package/components/date-picker/day.d.ts +31 -0
  164. package/components/date-picker/day.js +90 -0
  165. package/components/date-picker/formats.d.ts +2 -0
  166. package/components/date-picker/formats.js +1 -0
  167. package/components/date-picker/month-names.d.ts +13 -0
  168. package/components/date-picker/month-names.js +62 -0
  169. package/components/date-picker/month-slider.d.ts +29 -0
  170. package/components/date-picker/month-slider.js +56 -0
  171. package/components/date-picker/month.d.ts +14 -0
  172. package/components/date-picker/month.js +35 -0
  173. package/components/date-picker/months.d.ts +11 -0
  174. package/components/date-picker/months.js +101 -0
  175. package/components/date-picker/weekdays.d.ts +13 -0
  176. package/components/date-picker/weekdays.js +24 -0
  177. package/components/date-picker/years.d.ts +25 -0
  178. package/components/date-picker/years.js +87 -0
  179. package/components/dialog/dialog.css +134 -0
  180. package/components/dialog/dialog.d.ts +64 -0
  181. package/components/dialog/dialog.js +128 -0
  182. package/components/dialog/dialog__body-scroll-preventer.d.ts +9 -0
  183. package/components/dialog/dialog__body-scroll-preventer.js +43 -0
  184. package/components/dialog-ng/dialog-ng.css +98 -0
  185. package/components/dialog-ng/dialog-ng.js +606 -0
  186. package/components/dialog-ng/dialog-ng.stories.js +240 -0
  187. package/components/dialog-ng/dialog-ng.test.js +829 -0
  188. package/components/dialog-ng/dialog-ng__template.js +70 -0
  189. package/components/docked-panel-ng/docked-panel-ng.css +28 -0
  190. package/components/docked-panel-ng/docked-panel-ng.js +169 -0
  191. package/components/docked-panel-ng/docked-panel-ng.stories.js +39 -0
  192. package/components/dropdown/anchor.d.ts +11 -0
  193. package/components/dropdown/anchor.js +16 -0
  194. package/components/dropdown/dropdown.css +18 -0
  195. package/components/dropdown/dropdown.d.ts +87 -0
  196. package/components/dropdown/dropdown.js +159 -0
  197. package/components/dropdown-menu/dropdown-menu.d.ts +26 -0
  198. package/components/dropdown-menu/dropdown-menu.js +56 -0
  199. package/components/editable-heading/editable-heading.css +200 -0
  200. package/components/editable-heading/editable-heading.d.ts +32 -0
  201. package/components/editable-heading/editable-heading.js +141 -0
  202. package/components/error-bubble/error-bubble-legacy.css +79 -0
  203. package/components/error-bubble/error-bubble.css +56 -0
  204. package/components/error-bubble/error-bubble.d.ts +18 -0
  205. package/components/error-bubble/error-bubble.js +28 -0
  206. package/components/error-message/error-message.css +37 -0
  207. package/components/error-message/error-message.d.ts +27 -0
  208. package/components/error-message/error-message.js +37 -0
  209. package/components/error-message-ng/error-message-ng.js +50 -0
  210. package/components/error-message-ng/error-message-ng.stories.js +33 -0
  211. package/components/error-page/error-page.css +24 -0
  212. package/components/error-page/error-page.gif +0 -0
  213. package/components/error-page-ng/error-page-ng.css +6 -0
  214. package/components/error-page-ng/error-page-ng.js +269 -0
  215. package/components/error-page-ng/error-page-ng.stories.js +31 -0
  216. package/components/error-page-ng/error-page-ng.test.js +138 -0
  217. package/components/footer/footer.css +85 -0
  218. package/components/footer/footer.d.ts +28 -0
  219. package/components/footer/footer.js +97 -0
  220. package/components/footer-ng/footer-ng.js +61 -0
  221. package/components/footer-ng/footer-ng.stories.js +35 -0
  222. package/components/footer-ng/footer-ng.test.js +41 -0
  223. package/components/form/form.css +268 -0
  224. package/components/form/form.stories.js +128 -0
  225. package/components/form-ng/error-bubble-ng.css +7 -0
  226. package/components/form-ng/form-ng.js +176 -0
  227. package/components/form-ng/form-ng.stories.js +73 -0
  228. package/components/global/angular-component-factory.js +93 -0
  229. package/components/global/angular-component-factory.test.js +138 -0
  230. package/components/global/compose.d.ts +7 -0
  231. package/components/global/compose.js +4 -0
  232. package/components/global/composeRefs.d.ts +3 -0
  233. package/components/global/composeRefs.js +8 -0
  234. package/components/global/controls-height.d.ts +9 -0
  235. package/components/global/controls-height.js +16 -0
  236. package/components/global/create-stateful-context.d.ts +27 -0
  237. package/components/global/create-stateful-context.js +38 -0
  238. package/components/global/data-tests.d.ts +3 -0
  239. package/components/global/data-tests.js +17 -0
  240. package/components/global/dom.d.ts +37 -0
  241. package/components/global/dom.js +83 -0
  242. package/components/global/focus-sensor-hoc.d.ts +19 -0
  243. package/components/global/focus-sensor-hoc.js +102 -0
  244. package/components/global/fuzzy-highlight.d.ts +11 -0
  245. package/components/global/fuzzy-highlight.js +58 -0
  246. package/components/global/get-event-key.d.ts +2 -0
  247. package/components/global/get-event-key.js +100 -0
  248. package/components/global/get-uid.d.ts +1 -0
  249. package/components/global/get-uid.js +16 -0
  250. package/components/global/global.css +107 -0
  251. package/components/global/inject-styles.d.ts +3 -0
  252. package/components/global/inject-styles.js +12 -0
  253. package/components/global/linear-function.d.ts +6 -0
  254. package/components/global/linear-function.js +13 -0
  255. package/components/global/listeners.d.ts +8 -0
  256. package/components/global/listeners.js +27 -0
  257. package/components/global/memoize.d.ts +1 -0
  258. package/components/global/memoize.js +15 -0
  259. package/components/global/normalize-indent.d.ts +1 -0
  260. package/components/global/normalize-indent.js +30 -0
  261. package/components/global/promise-with-timeout.d.ts +5 -0
  262. package/components/global/promise-with-timeout.js +11 -0
  263. package/components/global/prop-types.d.ts +4 -0
  264. package/components/global/prop-types.js +4 -0
  265. package/components/global/react-dom-renderer.d.ts +16 -0
  266. package/components/global/react-dom-renderer.js +25 -0
  267. package/components/global/react-render-adapter.d.ts +29 -0
  268. package/components/global/react-render-adapter.js +24 -0
  269. package/components/global/rerender-hoc.d.ts +41 -0
  270. package/components/global/rerender-hoc.js +28 -0
  271. package/components/global/ring-angular-component.js +13 -0
  272. package/components/global/ring-angular-component.test.js +32 -0
  273. package/components/global/schedule-raf.d.ts +1 -0
  274. package/components/global/schedule-raf.js +27 -0
  275. package/components/global/sniffer.d.ts +3 -0
  276. package/components/global/sniffer.js +4 -0
  277. package/components/global/theme.d.ts +21 -0
  278. package/components/global/theme.js +70 -0
  279. package/components/global/trivial-template-tag.d.ts +1 -0
  280. package/components/global/trivial-template-tag.js +9 -0
  281. package/components/global/typescript-utils.d.ts +2 -0
  282. package/components/global/typescript-utils.js +2 -0
  283. package/components/global/url.d.ts +57 -0
  284. package/components/global/url.js +136 -0
  285. package/components/global/use-event-callback.d.ts +1 -0
  286. package/components/global/use-event-callback.js +14 -0
  287. package/components/global/variables.css +180 -0
  288. package/components/global/variables.d.ts +90 -0
  289. package/components/global/variables.js +1 -0
  290. package/components/global/variables_dark.css +128 -0
  291. package/components/grid/col.d.ts +31 -0
  292. package/components/grid/col.js +49 -0
  293. package/components/grid/grid.css +915 -0
  294. package/components/grid/grid.d.ts +14 -0
  295. package/components/grid/grid.js +22 -0
  296. package/components/grid/row.d.ts +40 -0
  297. package/components/grid/row.js +51 -0
  298. package/components/group/group.css +9 -0
  299. package/components/group/group.d.ts +12 -0
  300. package/components/group/group.js +20 -0
  301. package/components/group-ng/group-ng.js +16 -0
  302. package/components/group-ng/group.stories.js +29 -0
  303. package/components/header/header.css +171 -0
  304. package/components/header/header.d.ts +34 -0
  305. package/components/header/header.js +46 -0
  306. package/components/header/logo.d.ts +14 -0
  307. package/components/header/logo.js +22 -0
  308. package/components/header/profile.d.ts +75 -0
  309. package/components/header/profile.js +119 -0
  310. package/components/header/services-link.d.ts +25 -0
  311. package/components/header/services-link.js +28 -0
  312. package/components/header/services.css +99 -0
  313. package/components/header/services.d.ts +33 -0
  314. package/components/header/services.js +62 -0
  315. package/components/header/smart-profile.d.ts +36 -0
  316. package/components/header/smart-profile.js +86 -0
  317. package/components/header/smart-services.d.ts +25 -0
  318. package/components/header/smart-services.js +49 -0
  319. package/components/header/tray-icon.d.ts +32 -0
  320. package/components/header/tray-icon.js +20 -0
  321. package/components/header/tray.d.ts +9 -0
  322. package/components/header/tray.js +18 -0
  323. package/components/heading/heading.css +50 -0
  324. package/components/heading/heading.d.ts +25 -0
  325. package/components/heading/heading.js +52 -0
  326. package/components/heading-ng/heading-ng.js +8 -0
  327. package/components/heading-ng/heading-ng.stories.js +29 -0
  328. package/components/http/http.d.ts +61 -0
  329. package/components/http/http.js +204 -0
  330. package/components/http/http.mock.d.ts +20 -0
  331. package/components/http/http.mock.js +52 -0
  332. package/components/hub-source/hub-source.d.ts +42 -0
  333. package/components/hub-source/hub-source.js +107 -0
  334. package/components/hub-source/hub-source__user.d.ts +4 -0
  335. package/components/hub-source/hub-source__user.js +20 -0
  336. package/components/hub-source/hub-source__users-groups.d.ts +24 -0
  337. package/components/hub-source/hub-source__users-groups.js +53 -0
  338. package/components/i18n/README.md +46 -0
  339. package/components/i18n/i18n-context.d.ts +13 -0
  340. package/components/i18n/i18n-context.js +14 -0
  341. package/components/i18n/i18n.d.ts +59 -0
  342. package/components/i18n/i18n.js +26 -0
  343. package/components/i18n/messages.json +53 -0
  344. package/components/icon/icon.css +102 -0
  345. package/components/icon/icon.d.ts +43 -0
  346. package/components/icon/icon.js +69 -0
  347. package/components/icon/icon__constants.d.ts +30 -0
  348. package/components/icon/icon__constants.js +32 -0
  349. package/components/icon/icon__svg.d.ts +15 -0
  350. package/components/icon/icon__svg.js +58 -0
  351. package/components/icon/index.d.ts +2 -0
  352. package/components/icon/index.js +2 -0
  353. package/components/icon-ng/icon-ng.js +89 -0
  354. package/components/icon-ng/icon-ng.stories.js +34 -0
  355. package/components/input/input-legacy.css +125 -0
  356. package/components/input/input.css +196 -0
  357. package/components/input/input.d.ts +77 -0
  358. package/components/input/input.js +165 -0
  359. package/components/input-ng/input-ng.css +7 -0
  360. package/components/input-ng/input-ng.js +160 -0
  361. package/components/input-ng/input-ng.stories.js +127 -0
  362. package/components/input-ng/input-ng.test.js +32 -0
  363. package/components/input-size/input-size.css +84 -0
  364. package/components/input-size/input-size.stories.js +219 -0
  365. package/components/island/adaptive-island-hoc.d.ts +61 -0
  366. package/components/island/adaptive-island-hoc.js +28 -0
  367. package/components/island/content.d.ts +43 -0
  368. package/components/island/content.js +100 -0
  369. package/components/island/header.d.ts +8 -0
  370. package/components/island/header.js +78 -0
  371. package/components/island/island.css +132 -0
  372. package/components/island/island.d.ts +78 -0
  373. package/components/island/island.js +31 -0
  374. package/components/island-legacy/content-legacy.d.ts +10 -0
  375. package/components/island-legacy/content-legacy.js +17 -0
  376. package/components/island-legacy/header-legacy.d.ts +10 -0
  377. package/components/island-legacy/header-legacy.js +19 -0
  378. package/components/island-legacy/island-legacy.css +100 -0
  379. package/components/island-legacy/island-legacy.d.ts +12 -0
  380. package/components/island-legacy/island-legacy.js +19 -0
  381. package/components/island-ng/island-content-ng.js +56 -0
  382. package/components/island-ng/island-header-ng.js +34 -0
  383. package/components/island-ng/island-ng-class-fixer.js +7 -0
  384. package/components/island-ng/island-ng.js +35 -0
  385. package/components/island-ng/island-ng.stories.js +54 -0
  386. package/components/line/line.css +16 -0
  387. package/components/link/clickableLink.d.ts +20 -0
  388. package/components/link/clickableLink.js +33 -0
  389. package/components/link/link.css +88 -0
  390. package/components/link/link.d.ts +148 -0
  391. package/components/link/link.js +73 -0
  392. package/components/link/link__legacy.css +29 -0
  393. package/components/link-ng/link-ng.js +26 -0
  394. package/components/link-ng/link-ng.stories.js +22 -0
  395. package/components/link-ng/link-ng.test.js +29 -0
  396. package/components/list/consts.d.ts +77 -0
  397. package/components/list/consts.js +29 -0
  398. package/components/list/list.css +301 -0
  399. package/components/list/list.d.ts +195 -0
  400. package/components/list/list.js +590 -0
  401. package/components/list/list.stories.css +3 -0
  402. package/components/list/list__custom.d.ts +6 -0
  403. package/components/list/list__custom.js +52 -0
  404. package/components/list/list__hint.d.ts +15 -0
  405. package/components/list/list__hint.js +16 -0
  406. package/components/list/list__item.d.ts +8 -0
  407. package/components/list/list__item.js +130 -0
  408. package/components/list/list__link.d.ts +9 -0
  409. package/components/list/list__link.js +43 -0
  410. package/components/list/list__separator.d.ts +5 -0
  411. package/components/list/list__separator.js +21 -0
  412. package/components/list/list__title.d.ts +5 -0
  413. package/components/list/list__title.js +28 -0
  414. package/components/list/list__users-groups-source.d.ts +27 -0
  415. package/components/list/list__users-groups-source.js +74 -0
  416. package/components/loader/loader.css +29 -0
  417. package/components/loader/loader.d.ts +28 -0
  418. package/components/loader/loader.js +44 -0
  419. package/components/loader/loader__core.d.ts +75 -0
  420. package/components/loader/loader__core.js +219 -0
  421. package/components/loader-inline/loader-inline.css +74 -0
  422. package/components/loader-inline/loader-inline.d.ts +18 -0
  423. package/components/loader-inline/loader-inline.js +27 -0
  424. package/components/loader-inline-ng/loader-inline-ng.js +17 -0
  425. package/components/loader-inline-ng/loader-inline-ng.stories.js +28 -0
  426. package/components/loader-inline-ng/loader-inline-ng.test.js +28 -0
  427. package/components/loader-ng/loader-ng.js +37 -0
  428. package/components/loader-ng/loader-ng.stories.js +27 -0
  429. package/components/loader-ng/loader-ng.test.js +41 -0
  430. package/components/loader-screen/loader-screen.css +29 -0
  431. package/components/loader-screen/loader-screen.d.ts +17 -0
  432. package/components/loader-screen/loader-screen.js +25 -0
  433. package/components/loader-screen-ng/loader-screen-ng.js +95 -0
  434. package/components/loader-screen-ng/loader-screen-ng.stories.js +30 -0
  435. package/components/login-dialog/login-dialog.css +25 -0
  436. package/components/login-dialog/login-dialog.d.ts +47 -0
  437. package/components/login-dialog/login-dialog.js +84 -0
  438. package/components/login-dialog/service.d.ts +2 -0
  439. package/components/login-dialog/service.js +23 -0
  440. package/components/markdown/code.d.ts +7 -0
  441. package/components/markdown/code.js +17 -0
  442. package/components/markdown/heading.d.ts +11 -0
  443. package/components/markdown/heading.js +9 -0
  444. package/components/markdown/link.d.ts +12 -0
  445. package/components/markdown/link.js +10 -0
  446. package/components/markdown/markdown.css +76 -0
  447. package/components/markdown/markdown.d.ts +15 -0
  448. package/components/markdown/markdown.js +44 -0
  449. package/components/message/message.css +64 -0
  450. package/components/message/message.d.ts +55 -0
  451. package/components/message/message.js +129 -0
  452. package/components/message-bundle-ng/message-bundle-ng.js +67 -0
  453. package/components/old-browsers-message/old-browsers-message.css +28 -0
  454. package/components/old-browsers-message/old-browsers-message.d.ts +2 -0
  455. package/components/old-browsers-message/old-browsers-message.js +83 -0
  456. package/components/old-browsers-message/old-browsers-message__stop.d.ts +1 -0
  457. package/components/old-browsers-message/old-browsers-message__stop.js +2 -0
  458. package/components/old-browsers-message/white-list.d.ts +2 -0
  459. package/components/old-browsers-message/white-list.js +25 -0
  460. package/components/pager/pager.css +21 -0
  461. package/components/pager/pager.d.ts +78 -0
  462. package/components/pager/pager.js +229 -0
  463. package/components/pager-ng/pager-ng.js +7 -0
  464. package/components/pager-ng/pager-ng.stories.js +37 -0
  465. package/components/palette/palette.css +216 -0
  466. package/components/palette/palette.stories.js +63 -0
  467. package/components/panel/panel.css +22 -0
  468. package/components/panel/panel.d.ts +12 -0
  469. package/components/panel/panel.js +20 -0
  470. package/components/panel-ng/panel-ng.js +20 -0
  471. package/components/permissions/permissions.d.ts +111 -0
  472. package/components/permissions/permissions.js +177 -0
  473. package/components/permissions/permissions__cache.d.ts +93 -0
  474. package/components/permissions/permissions__cache.js +228 -0
  475. package/components/permissions-ng/permissions-ng.css +5 -0
  476. package/components/permissions-ng/permissions-ng.js +246 -0
  477. package/components/permissions-ng/permissions-ng.stories.js +49 -0
  478. package/components/permissions-ng/permissions-ng.test.js +82 -0
  479. package/components/place-under-ng/place-under-ng.js +190 -0
  480. package/components/place-under-ng/place-under-ng.stories.js +94 -0
  481. package/components/place-under-ng/place-under-ng.test.js +182 -0
  482. package/components/popup/popup.consts.d.ts +37 -0
  483. package/components/popup/popup.consts.js +45 -0
  484. package/components/popup/popup.css +34 -0
  485. package/components/popup/popup.d.ts +147 -0
  486. package/components/popup/popup.js +312 -0
  487. package/components/popup/popup.target.d.ts +7 -0
  488. package/components/popup/popup.target.js +15 -0
  489. package/components/popup/position.d.ts +30 -0
  490. package/components/popup/position.js +202 -0
  491. package/components/popup-menu/popup-menu.d.ts +60 -0
  492. package/components/popup-menu/popup-menu.js +41 -0
  493. package/components/progress-bar/progress-bar.css +83 -0
  494. package/components/progress-bar/progress-bar.d.ts +64 -0
  495. package/components/progress-bar/progress-bar.js +76 -0
  496. package/components/progress-bar-ng/progress-bar-ng.js +7 -0
  497. package/components/progress-bar-ng/progress-bar-ng.stories.js +52 -0
  498. package/components/promised-click-ng/promised-click-ng.js +118 -0
  499. package/components/promised-click-ng/promised-click-ng.stories.js +42 -0
  500. package/components/promised-click-ng/promised-click-ng.test.js +166 -0
  501. package/components/proxy-attrs/proxy-attrs.js +24 -0
  502. package/components/proxy-attrs/proxy-attrs.test.js +102 -0
  503. package/components/query-assist/query-assist.css +276 -0
  504. package/components/query-assist/query-assist.d.ts +333 -0
  505. package/components/query-assist/query-assist.js +847 -0
  506. package/components/query-assist/query-assist__suggestions.d.ts +29 -0
  507. package/components/query-assist/query-assist__suggestions.js +60 -0
  508. package/components/query-assist-ng/query-assist-ng.js +7 -0
  509. package/components/query-assist-ng/query-assist-ng.stories.js +89 -0
  510. package/components/radio/radio.css +125 -0
  511. package/components/radio/radio.d.ts +18 -0
  512. package/components/radio/radio.js +27 -0
  513. package/components/radio/radio__item.d.ts +28 -0
  514. package/components/radio/radio__item.js +41 -0
  515. package/components/radio-ng/radio-ng.js +61 -0
  516. package/components/radio-ng/radio-ng.stories.js +31 -0
  517. package/components/radio-ng/radio-ng.test.js +55 -0
  518. package/components/save-field-ng/save-field-ng.css +13 -0
  519. package/components/save-field-ng/save-field-ng.js +358 -0
  520. package/components/save-field-ng/save-field-ng.stories.js +221 -0
  521. package/components/save-field-ng/save-field-ng__template.js +32 -0
  522. package/components/select/select-popup.css +105 -0
  523. package/components/select/select.css +236 -0
  524. package/components/select/select.d.ts +303 -0
  525. package/components/select/select.js +957 -0
  526. package/components/select/select__filter.d.ts +19 -0
  527. package/components/select/select__filter.js +49 -0
  528. package/components/select/select__popup.d.ts +166 -0
  529. package/components/select/select__popup.js +408 -0
  530. package/components/select-ng/select-ng.js +561 -0
  531. package/components/select-ng/select-ng.stories.js +483 -0
  532. package/components/select-ng/select-ng.test.js +620 -0
  533. package/components/select-ng/select-ng__lazy.js +83 -0
  534. package/components/select-ng/select-ng__lazy.test.js +81 -0
  535. package/components/select-ng/select-ng__options.js +147 -0
  536. package/components/shortcuts/core.d.ts +74 -0
  537. package/components/shortcuts/core.js +191 -0
  538. package/components/shortcuts/shortcut-title.d.ts +1 -0
  539. package/components/shortcuts/shortcut-title.js +50 -0
  540. package/components/shortcuts/shortcuts-hoc.d.ts +65 -0
  541. package/components/shortcuts/shortcuts-hoc.js +19 -0
  542. package/components/shortcuts/shortcuts.d.ts +28 -0
  543. package/components/shortcuts/shortcuts.js +50 -0
  544. package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +116 -0
  545. package/components/shortcuts-hint-ng/shortcuts-hint-ng.js +101 -0
  546. package/components/shortcuts-hint-ng/shortcuts-hint-ng.stories.js +126 -0
  547. package/components/shortcuts-hint-ng/shortcuts-hint-ng.test.js +113 -0
  548. package/components/shortcuts-hint-ng/shortcuts-hint-ng__template.js +48 -0
  549. package/components/shortcuts-ng/shortcuts-ng.js +285 -0
  550. package/components/sidebar/sidebar.css +159 -0
  551. package/components/sidebar-ng/sidebar-ng.js +99 -0
  552. package/components/sidebar-ng/sidebar-ng.stories.js +94 -0
  553. package/components/sidebar-ng/sidebar-ng.test.js +37 -0
  554. package/components/sidebar-ng/sidebar-ng__button-template.js +18 -0
  555. package/components/sidebar-ng/sidebar-ng__template.js +10 -0
  556. package/components/storage/storage.d.ts +18 -0
  557. package/components/storage/storage.js +22 -0
  558. package/components/storage/storage__fallback.d.ts +79 -0
  559. package/components/storage/storage__fallback.js +181 -0
  560. package/components/storage/storage__local.d.ts +38 -0
  561. package/components/storage/storage__local.js +119 -0
  562. package/components/tab-trap/tab-trap.css +6 -0
  563. package/components/tab-trap/tab-trap.d.ts +43 -0
  564. package/components/tab-trap/tab-trap.js +125 -0
  565. package/components/table/cell.d.ts +13 -0
  566. package/components/table/cell.js +16 -0
  567. package/components/table/disable-hover-hoc.d.ts +64 -0
  568. package/components/table/disable-hover-hoc.js +32 -0
  569. package/components/table/header-cell.d.ts +43 -0
  570. package/components/table/header-cell.js +56 -0
  571. package/components/table/header.d.ts +56 -0
  572. package/components/table/header.js +67 -0
  573. package/components/table/multitable.d.ts +25 -0
  574. package/components/table/multitable.js +81 -0
  575. package/components/table/row-with-focus-sensor.d.ts +18 -0
  576. package/components/table/row-with-focus-sensor.js +25 -0
  577. package/components/table/row.d.ts +59 -0
  578. package/components/table/row.js +154 -0
  579. package/components/table/selection-adapter.d.ts +5 -0
  580. package/components/table/selection-adapter.js +10 -0
  581. package/components/table/selection-shortcuts-hoc.d.ts +17 -0
  582. package/components/table/selection-shortcuts-hoc.js +146 -0
  583. package/components/table/selection.d.ts +47 -0
  584. package/components/table/selection.js +150 -0
  585. package/components/table/smart-table.d.ts +64 -0
  586. package/components/table/smart-table.js +40 -0
  587. package/components/table/table.css +261 -0
  588. package/components/table/table.d.ts +159 -0
  589. package/components/table/table.examples2.json +19 -0
  590. package/components/table/table.js +231 -0
  591. package/components/table/table.stories.json +45 -0
  592. package/components/table-legacy/table-legacy.css +348 -0
  593. package/components/table-legacy/table-legacy__toolbar.css +27 -0
  594. package/components/table-legacy-ng/table-legacy-ng.js +433 -0
  595. package/components/table-legacy-ng/table-legacy-ng.stories.js +192 -0
  596. package/components/table-legacy-ng/table-legacy-ng.test.js +296 -0
  597. package/components/table-legacy-ng/table-legacy-ng__pager.js +32 -0
  598. package/components/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +105 -0
  599. package/components/table-legacy-ng/table-legacy-ng__selection.js +165 -0
  600. package/components/table-legacy-ng/table-legacy-ng__toolbar.js +58 -0
  601. package/components/table-ng/smart-table-ng.js +7 -0
  602. package/components/table-ng/table-ng.js +7 -0
  603. package/components/table-ng/table-ng.stories.js +84 -0
  604. package/components/tabs/collapsible-more.d.ts +29 -0
  605. package/components/tabs/collapsible-more.js +97 -0
  606. package/components/tabs/collapsible-tab.d.ts +16 -0
  607. package/components/tabs/collapsible-tab.js +34 -0
  608. package/components/tabs/collapsible-tabs.d.ts +43 -0
  609. package/components/tabs/collapsible-tabs.js +196 -0
  610. package/components/tabs/custom-item.d.ts +9 -0
  611. package/components/tabs/custom-item.js +5 -0
  612. package/components/tabs/dumb-tabs.d.ts +35 -0
  613. package/components/tabs/dumb-tabs.js +56 -0
  614. package/components/tabs/smart-tabs.d.ts +20 -0
  615. package/components/tabs/smart-tabs.js +25 -0
  616. package/components/tabs/tab-link.d.ts +18 -0
  617. package/components/tabs/tab-link.js +24 -0
  618. package/components/tabs/tab.d.ts +27 -0
  619. package/components/tabs/tab.js +19 -0
  620. package/components/tabs/tabs.css +224 -0
  621. package/components/tabs/tabs.d.ts +7 -0
  622. package/components/tabs/tabs.js +7 -0
  623. package/components/tabs-ng/tabs-ng.js +206 -0
  624. package/components/tabs-ng/tabs-ng.stories.js +30 -0
  625. package/components/tabs-ng/tabs-ng.test.js +76 -0
  626. package/components/tabs-ng/tabs-ng__template.js +38 -0
  627. package/components/tag/tag.css +185 -0
  628. package/components/tag/tag.d.ts +64 -0
  629. package/components/tag/tag.js +130 -0
  630. package/components/tags-input/tags-input.css +101 -0
  631. package/components/tags-input/tags-input.d.ts +165 -0
  632. package/components/tags-input/tags-input.js +275 -0
  633. package/components/tags-input-ng/tags-input-ng.js +7 -0
  634. package/components/tags-input-ng/tags-input-ng.stories.js +41 -0
  635. package/components/tags-list/tags-list.d.ts +46 -0
  636. package/components/tags-list/tags-list.js +45 -0
  637. package/components/template-ng/template-ng.js +57 -0
  638. package/components/template-ng/template-ng.stories.js +32 -0
  639. package/components/template-ng/template-ng.test.js +97 -0
  640. package/components/text/text.css +21 -0
  641. package/components/text/text.d.ts +23 -0
  642. package/components/text/text.js +31 -0
  643. package/components/title-ng/title-ng.js +120 -0
  644. package/components/title-ng/title-ng.stories.js +30 -0
  645. package/components/title-ng/title-ng.test.js +47 -0
  646. package/components/toggle/toggle.css +201 -0
  647. package/components/toggle/toggle.d.ts +39 -0
  648. package/components/toggle/toggle.js +46 -0
  649. package/components/toggle-ng/toggle-ng.js +8 -0
  650. package/components/toggle-ng/toggle-ng.stories.js +22 -0
  651. package/components/tooltip/tooltip.css +19 -0
  652. package/components/tooltip/tooltip.d.ts +65 -0
  653. package/components/tooltip/tooltip.js +126 -0
  654. package/components/tooltip-ng/tooltip-ng.css +25 -0
  655. package/components/tooltip-ng/tooltip-ng.js +100 -0
  656. package/components/tooltip-ng/tooltip-ng.stories.js +36 -0
  657. package/components/tooltip-ng/tooltip-ng.test.js +69 -0
  658. package/components/user-agreement/service.d.ts +67 -0
  659. package/components/user-agreement/service.js +241 -0
  660. package/components/user-agreement/toolbox.eula.d.ts +2 -0
  661. package/components/user-agreement/toolbox.eula.js +160 -0
  662. package/components/user-agreement/user-agreement.css +29 -0
  663. package/components/user-agreement/user-agreement.d.ts +61 -0
  664. package/components/user-agreement/user-agreement.js +82 -0
  665. package/components/user-card/card.d.ts +71 -0
  666. package/components/user-card/card.js +89 -0
  667. package/components/user-card/smart-user-card-tooltip.d.ts +20 -0
  668. package/components/user-card/smart-user-card-tooltip.js +47 -0
  669. package/components/user-card/tooltip.d.ts +36 -0
  670. package/components/user-card/tooltip.js +43 -0
  671. package/components/user-card/user-card.css +125 -0
  672. package/components/user-card/user-card.d.ts +11 -0
  673. package/components/user-card/user-card.js +11 -0
  674. package/components/user-card-ng/user-card-ng.js +16 -0
  675. package/components/user-card-ng/user-card-ng.stories.js +66 -0
  676. package/dist/_helpers/_rollupPluginBabelHelpers.js +648 -0
  677. package/dist/_helpers/anchor.js +31 -0
  678. package/dist/_helpers/badge.js +3 -0
  679. package/dist/_helpers/button-group.js +3 -0
  680. package/dist/_helpers/button-set.js +3 -0
  681. package/dist/_helpers/button-toolbar.js +3 -0
  682. package/dist/_helpers/button__classes.js +34 -0
  683. package/dist/_helpers/card.js +132 -0
  684. package/dist/_helpers/checkbox.js +3 -0
  685. package/dist/_helpers/control-label.js +3 -0
  686. package/dist/_helpers/date-picker.js +3 -0
  687. package/dist/_helpers/dialog__body-scroll-preventer.js +54 -0
  688. package/dist/_helpers/error-message.js +3 -0
  689. package/dist/_helpers/footer.js +110 -0
  690. package/dist/_helpers/grid.js +3 -0
  691. package/dist/_helpers/group.js +3 -0
  692. package/dist/_helpers/header.js +3 -0
  693. package/dist/_helpers/icon.js +3 -0
  694. package/dist/_helpers/input.js +3 -0
  695. package/dist/_helpers/island.js +3 -0
  696. package/dist/_helpers/link.js +3 -0
  697. package/dist/_helpers/list.js +3 -0
  698. package/dist/_helpers/loader-inline.js +3 -0
  699. package/dist/_helpers/loader-screen.js +3 -0
  700. package/dist/_helpers/panel.js +3 -0
  701. package/dist/_helpers/query-assist__suggestions.js +102 -0
  702. package/dist/_helpers/radio.js +3 -0
  703. package/dist/_helpers/select__filter.js +94 -0
  704. package/dist/_helpers/services-link.js +50 -0
  705. package/dist/_helpers/sidebar.js +123 -0
  706. package/dist/_helpers/table.js +3 -0
  707. package/dist/_helpers/tabs.js +3 -0
  708. package/dist/_helpers/theme.js +95 -0
  709. package/dist/_helpers/title.js +103 -0
  710. package/dist/alert/alert.d.ts +113 -0
  711. package/dist/alert/alert.js +296 -0
  712. package/dist/alert/container.d.ts +15 -0
  713. package/dist/alert/container.js +52 -0
  714. package/dist/alert-service/alert-service.d.ts +34 -0
  715. package/dist/alert-service/alert-service.js +221 -0
  716. package/dist/analytics/analytics.d.ts +38 -0
  717. package/dist/analytics/analytics.js +108 -0
  718. package/dist/analytics/analytics__custom-plugin.d.ts +29 -0
  719. package/dist/analytics/analytics__custom-plugin.js +94 -0
  720. package/dist/analytics/analytics__fus-plugin.d.ts +52 -0
  721. package/dist/analytics/analytics__fus-plugin.js +38 -0
  722. package/dist/analytics/analytics__ga-plugin.d.ts +27 -0
  723. package/dist/analytics/analytics__ga-plugin.js +116 -0
  724. package/dist/analytics/analytics__plugin-utils.d.ts +31 -0
  725. package/dist/analytics/analytics__plugin-utils.js +100 -0
  726. package/dist/auth/auth.d.ts +3 -0
  727. package/dist/auth/auth.js +136 -0
  728. package/dist/auth/auth__core.d.ts +236 -0
  729. package/dist/auth/auth__core.js +1655 -0
  730. package/dist/auth/background-flow.d.ts +31 -0
  731. package/dist/auth/background-flow.js +147 -0
  732. package/dist/auth/down-notification.d.ts +15 -0
  733. package/dist/auth/down-notification.js +160 -0
  734. package/dist/auth/iframe-flow.d.ts +20 -0
  735. package/dist/auth/iframe-flow.js +198 -0
  736. package/dist/auth/landing-entry.d.ts +3 -0
  737. package/dist/auth/landing-entry.js +5 -0
  738. package/dist/auth/landing.d.ts +2 -0
  739. package/dist/auth/landing.js +158 -0
  740. package/dist/auth/request-builder.d.ts +48 -0
  741. package/dist/auth/request-builder.js +104 -0
  742. package/dist/auth/response-parser.d.ts +70 -0
  743. package/dist/auth/response-parser.js +138 -0
  744. package/dist/auth/storage.d.ts +112 -0
  745. package/dist/auth/storage.js +431 -0
  746. package/dist/auth/token-validator.d.ts +93 -0
  747. package/dist/auth/token-validator.js +269 -0
  748. package/dist/auth/window-flow.d.ts +26 -0
  749. package/dist/auth/window-flow.js +154 -0
  750. package/dist/auth-dialog/auth-dialog.d.ts +60 -0
  751. package/dist/auth-dialog/auth-dialog.js +221 -0
  752. package/dist/auth-dialog-service/auth-dialog-service.d.ts +5 -0
  753. package/dist/auth-dialog-service/auth-dialog-service.js +91 -0
  754. package/dist/auth-ng/auth-ng.js +232 -0
  755. package/dist/auth-ng/auth-ng.mock.js +29 -0
  756. package/dist/autofocus-ng/autofocus-ng.js +58 -0
  757. package/dist/avatar/avatar-example-datauri.d.ts +1 -0
  758. package/dist/avatar/avatar-example-datauri.js +4 -0
  759. package/dist/avatar/avatar.d.ts +52 -0
  760. package/dist/avatar/avatar.js +183 -0
  761. package/dist/avatar/fallback-avatar.d.ts +17 -0
  762. package/dist/avatar/fallback-avatar.js +151 -0
  763. package/dist/avatar-editor-ng/avatar-editor-ng.js +191 -0
  764. package/dist/avatar-editor-ng/avatar-editor-ng__template.js +3 -0
  765. package/dist/avatar-ng/avatar-ng.js +38 -0
  766. package/dist/badge/badge.d.ts +24 -0
  767. package/dist/badge/badge.js +59 -0
  768. package/dist/badge-ng/badge-ng.js +27 -0
  769. package/dist/breadcrumb-ng/breadcrumb-ng.js +46 -0
  770. package/dist/button/button.d.ts +67 -0
  771. package/dist/button/button.js +132 -0
  772. package/dist/button/button__classes.d.ts +2 -0
  773. package/dist/button/button__classes.js +2 -0
  774. package/dist/button-group/button-group.d.ts +18 -0
  775. package/dist/button-group/button-group.js +48 -0
  776. package/dist/button-group/caption.d.ts +8 -0
  777. package/dist/button-group/caption.js +30 -0
  778. package/dist/button-group-ng/button-group-ng.js +45 -0
  779. package/dist/button-ng/button-ng.js +201 -0
  780. package/dist/button-set/button-set.d.ts +16 -0
  781. package/dist/button-set/button-set.js +46 -0
  782. package/dist/button-set-ng/button-set-ng.js +17 -0
  783. package/dist/button-toolbar/button-toolbar.d.ts +16 -0
  784. package/dist/button-toolbar/button-toolbar.js +45 -0
  785. package/dist/button-toolbar-ng/button-toolbar-ng.js +23 -0
  786. package/dist/caret/caret.d.ts +66 -0
  787. package/dist/caret/caret.js +259 -0
  788. package/dist/checkbox/checkbox.d.ts +45 -0
  789. package/dist/checkbox/checkbox.js +130 -0
  790. package/dist/checkbox-ng/checkbox-ng.js +52 -0
  791. package/dist/clipboard/clipboard-fallback.d.ts +2 -0
  792. package/dist/clipboard/clipboard-fallback.js +42 -0
  793. package/dist/clipboard/clipboard.d.ts +5 -0
  794. package/dist/clipboard/clipboard.js +187 -0
  795. package/dist/code/code.d.ts +44 -0
  796. package/dist/code/code.js +191 -0
  797. package/dist/compiler-ng/compiler-ng.js +51 -0
  798. package/dist/confirm/confirm.d.ts +48 -0
  799. package/dist/confirm/confirm.js +155 -0
  800. package/dist/confirm-ng/confirm-ng.js +93 -0
  801. package/dist/confirm-service/confirm-service.d.ts +21 -0
  802. package/dist/confirm-service/confirm-service.js +142 -0
  803. package/dist/content-layout/content-layout.d.ts +26 -0
  804. package/dist/content-layout/content-layout.js +79 -0
  805. package/dist/content-layout/sidebar.d.ts +31 -0
  806. package/dist/content-layout/sidebar.js +7 -0
  807. package/dist/contenteditable/contenteditable.d.ts +47 -0
  808. package/dist/contenteditable/contenteditable.js +84 -0
  809. package/dist/control-label/control-label.d.ts +11 -0
  810. package/dist/control-label/control-label.js +35 -0
  811. package/dist/data-list/data-list.d.ts +85 -0
  812. package/dist/data-list/data-list.js +254 -0
  813. package/dist/data-list/data-list.mock.d.ts +16 -0
  814. package/dist/data-list/data-list.mock.js +197 -0
  815. package/dist/data-list/item.d.ts +50 -0
  816. package/dist/data-list/item.js +238 -0
  817. package/dist/data-list/selection.d.ts +16 -0
  818. package/dist/data-list/selection.js +148 -0
  819. package/dist/data-list/title.d.ts +26 -0
  820. package/dist/data-list/title.js +30 -0
  821. package/dist/data-list-ng/data-list-ng.js +84 -0
  822. package/dist/date-picker/consts.d.ts +102 -0
  823. package/dist/date-picker/consts.js +63 -0
  824. package/dist/date-picker/date-input.d.ts +47 -0
  825. package/dist/date-picker/date-input.js +182 -0
  826. package/dist/date-picker/date-picker.d.ts +77 -0
  827. package/dist/date-picker/date-picker.js +408 -0
  828. package/dist/date-picker/date-popup.d.ts +55 -0
  829. package/dist/date-picker/date-popup.js +493 -0
  830. package/dist/date-picker/day.d.ts +31 -0
  831. package/dist/date-picker/day.js +139 -0
  832. package/dist/date-picker/formats.d.ts +2 -0
  833. package/dist/date-picker/formats.js +3 -0
  834. package/dist/date-picker/month-names.d.ts +13 -0
  835. package/dist/date-picker/month-names.js +113 -0
  836. package/dist/date-picker/month-slider.d.ts +29 -0
  837. package/dist/date-picker/month-slider.js +96 -0
  838. package/dist/date-picker/month.d.ts +14 -0
  839. package/dist/date-picker/month.js +63 -0
  840. package/dist/date-picker/months.d.ts +11 -0
  841. package/dist/date-picker/months.js +136 -0
  842. package/dist/date-picker/weekdays.d.ts +13 -0
  843. package/dist/date-picker/weekdays.js +42 -0
  844. package/dist/date-picker/years.d.ts +25 -0
  845. package/dist/date-picker/years.js +137 -0
  846. package/dist/dialog/dialog.d.ts +64 -0
  847. package/dist/dialog/dialog.js +241 -0
  848. package/dist/dialog/dialog__body-scroll-preventer.d.ts +9 -0
  849. package/dist/dialog/dialog__body-scroll-preventer.js +6 -0
  850. package/dist/dialog-ng/dialog-ng.js +622 -0
  851. package/dist/dialog-ng/dialog-ng__template.js +3 -0
  852. package/dist/docked-panel-ng/docked-panel-ng.js +159 -0
  853. package/dist/dropdown/anchor.d.ts +11 -0
  854. package/dist/dropdown/anchor.js +25 -0
  855. package/dist/dropdown/dropdown.d.ts +87 -0
  856. package/dist/dropdown/dropdown.js +248 -0
  857. package/dist/dropdown-menu/dropdown-menu.d.ts +26 -0
  858. package/dist/dropdown-menu/dropdown-menu.js +201 -0
  859. package/dist/editable-heading/editable-heading.d.ts +32 -0
  860. package/dist/editable-heading/editable-heading.js +278 -0
  861. package/dist/error-bubble/error-bubble.d.ts +18 -0
  862. package/dist/error-bubble/error-bubble.js +88 -0
  863. package/dist/error-message/error-message.d.ts +27 -0
  864. package/dist/error-message/error-message.js +78 -0
  865. package/dist/error-message-ng/error-message-ng.js +41 -0
  866. package/dist/footer/footer.d.ts +28 -0
  867. package/dist/footer/footer.js +19 -0
  868. package/dist/footer-ng/footer-ng.js +86 -0
  869. package/dist/form-ng/form-ng.js +157 -0
  870. package/dist/global/angular-component-factory.js +99 -0
  871. package/dist/global/compose.d.ts +7 -0
  872. package/dist/global/compose.js +17 -0
  873. package/dist/global/composeRefs.d.ts +3 -0
  874. package/dist/global/composeRefs.js +19 -0
  875. package/dist/global/controls-height.d.ts +9 -0
  876. package/dist/global/controls-height.js +19 -0
  877. package/dist/global/create-stateful-context.d.ts +27 -0
  878. package/dist/global/create-stateful-context.js +49 -0
  879. package/dist/global/data-tests.d.ts +3 -0
  880. package/dist/global/data-tests.js +30 -0
  881. package/dist/global/dom.d.ts +37 -0
  882. package/dist/global/dom.js +151 -0
  883. package/dist/global/focus-sensor-hoc.d.ts +19 -0
  884. package/dist/global/focus-sensor-hoc.js +165 -0
  885. package/dist/global/fuzzy-highlight.d.ts +11 -0
  886. package/dist/global/fuzzy-highlight.js +90 -0
  887. package/dist/global/get-event-key.d.ts +2 -0
  888. package/dist/global/get-event-key.js +101 -0
  889. package/dist/global/get-uid.d.ts +1 -0
  890. package/dist/global/get-uid.js +22 -0
  891. package/dist/global/inject-styles.d.ts +3 -0
  892. package/dist/global/inject-styles.js +22 -0
  893. package/dist/global/linear-function.d.ts +6 -0
  894. package/dist/global/linear-function.js +15 -0
  895. package/dist/global/listeners.d.ts +8 -0
  896. package/dist/global/listeners.js +58 -0
  897. package/dist/global/memoize.d.ts +1 -0
  898. package/dist/global/memoize.js +23 -0
  899. package/dist/global/normalize-indent.d.ts +1 -0
  900. package/dist/global/normalize-indent.js +60 -0
  901. package/dist/global/promise-with-timeout.d.ts +5 -0
  902. package/dist/global/promise-with-timeout.js +19 -0
  903. package/dist/global/prop-types.d.ts +4 -0
  904. package/dist/global/prop-types.js +9 -0
  905. package/dist/global/react-dom-renderer.d.ts +16 -0
  906. package/dist/global/react-dom-renderer.js +54 -0
  907. package/dist/global/react-render-adapter.d.ts +29 -0
  908. package/dist/global/react-render-adapter.js +35 -0
  909. package/dist/global/rerender-hoc.d.ts +41 -0
  910. package/dist/global/rerender-hoc.js +57 -0
  911. package/dist/global/ring-angular-component.js +27 -0
  912. package/dist/global/schedule-raf.d.ts +1 -0
  913. package/dist/global/schedule-raf.js +28 -0
  914. package/dist/global/sniffer.d.ts +3 -0
  915. package/dist/global/sniffer.js +6 -0
  916. package/dist/global/theme.d.ts +21 -0
  917. package/dist/global/theme.js +42 -0
  918. package/dist/global/trivial-template-tag.d.ts +1 -0
  919. package/dist/global/trivial-template-tag.js +21 -0
  920. package/dist/global/typescript-utils.d.ts +2 -0
  921. package/dist/global/typescript-utils.js +8 -0
  922. package/dist/global/url.d.ts +57 -0
  923. package/dist/global/url.js +142 -0
  924. package/dist/global/use-event-callback.d.ts +1 -0
  925. package/dist/global/use-event-callback.js +17 -0
  926. package/dist/global/variables.d.ts +90 -0
  927. package/dist/global/variables.js +1 -0
  928. package/dist/grid/col.d.ts +31 -0
  929. package/dist/grid/col.js +80 -0
  930. package/dist/grid/grid.d.ts +14 -0
  931. package/dist/grid/grid.js +46 -0
  932. package/dist/grid/row.d.ts +40 -0
  933. package/dist/grid/row.js +75 -0
  934. package/dist/group/group.d.ts +12 -0
  935. package/dist/group/group.js +38 -0
  936. package/dist/group-ng/group-ng.js +11 -0
  937. package/dist/header/header.d.ts +34 -0
  938. package/dist/header/header.js +193 -0
  939. package/dist/header/logo.d.ts +14 -0
  940. package/dist/header/logo.js +52 -0
  941. package/dist/header/profile.d.ts +75 -0
  942. package/dist/header/profile.js +260 -0
  943. package/dist/header/services-link.d.ts +25 -0
  944. package/dist/header/services-link.js +18 -0
  945. package/dist/header/services.d.ts +33 -0
  946. package/dist/header/services.js +175 -0
  947. package/dist/header/smart-profile.d.ts +36 -0
  948. package/dist/header/smart-profile.js +307 -0
  949. package/dist/header/smart-services.d.ts +25 -0
  950. package/dist/header/smart-services.js +195 -0
  951. package/dist/header/tray-icon.d.ts +32 -0
  952. package/dist/header/tray-icon.js +58 -0
  953. package/dist/header/tray.d.ts +9 -0
  954. package/dist/header/tray.js +41 -0
  955. package/dist/heading/heading.d.ts +25 -0
  956. package/dist/heading/heading.js +70 -0
  957. package/dist/heading-ng/heading-ng.js +24 -0
  958. package/dist/http/http.d.ts +61 -0
  959. package/dist/http/http.js +398 -0
  960. package/dist/http/http.mock.d.ts +20 -0
  961. package/dist/http/http.mock.js +113 -0
  962. package/dist/hub-source/hub-source.d.ts +42 -0
  963. package/dist/hub-source/hub-source.js +217 -0
  964. package/dist/hub-source/hub-source__user.d.ts +4 -0
  965. package/dist/hub-source/hub-source__user.js +60 -0
  966. package/dist/hub-source/hub-source__users-groups.d.ts +24 -0
  967. package/dist/hub-source/hub-source__users-groups.js +86 -0
  968. package/dist/i18n/i18n-context.d.ts +13 -0
  969. package/dist/i18n/i18n-context.js +27 -0
  970. package/dist/i18n/i18n.d.ts +59 -0
  971. package/dist/i18n/i18n.js +139 -0
  972. package/dist/icon/icon.d.ts +43 -0
  973. package/dist/icon/icon.js +110 -0
  974. package/dist/icon/icon__constants.d.ts +30 -0
  975. package/dist/icon/icon__constants.js +34 -0
  976. package/dist/icon/icon__svg.d.ts +15 -0
  977. package/dist/icon/icon__svg.js +79 -0
  978. package/dist/icon/index.d.ts +2 -0
  979. package/dist/icon/index.js +18 -0
  980. package/dist/icon-ng/icon-ng.js +95 -0
  981. package/dist/input/input.d.ts +77 -0
  982. package/dist/input/input.js +255 -0
  983. package/dist/input-ng/input-ng.js +128 -0
  984. package/dist/island/adaptive-island-hoc.d.ts +61 -0
  985. package/dist/island/adaptive-island-hoc.js +53 -0
  986. package/dist/island/content.d.ts +43 -0
  987. package/dist/island/content.js +151 -0
  988. package/dist/island/header.d.ts +8 -0
  989. package/dist/island/header.js +100 -0
  990. package/dist/island/island.d.ts +78 -0
  991. package/dist/island/island.js +60 -0
  992. package/dist/island-legacy/content-legacy.d.ts +10 -0
  993. package/dist/island-legacy/content-legacy.js +34 -0
  994. package/dist/island-legacy/header-legacy.d.ts +10 -0
  995. package/dist/island-legacy/header-legacy.js +36 -0
  996. package/dist/island-legacy/island-legacy.d.ts +12 -0
  997. package/dist/island-legacy/island-legacy.js +36 -0
  998. package/dist/island-ng/island-content-ng.js +44 -0
  999. package/dist/island-ng/island-header-ng.js +29 -0
  1000. package/dist/island-ng/island-ng-class-fixer.js +12 -0
  1001. package/dist/island-ng/island-ng.js +27 -0
  1002. package/dist/link/clickableLink.d.ts +20 -0
  1003. package/dist/link/clickableLink.js +69 -0
  1004. package/dist/link/link.d.ts +148 -0
  1005. package/dist/link/link.js +126 -0
  1006. package/dist/link-ng/link-ng.js +21 -0
  1007. package/dist/list/consts.d.ts +77 -0
  1008. package/dist/list/consts.js +31 -0
  1009. package/dist/list/list.d.ts +195 -0
  1010. package/dist/list/list.js +804 -0
  1011. package/dist/list/list__custom.d.ts +6 -0
  1012. package/dist/list/list__custom.js +92 -0
  1013. package/dist/list/list__hint.d.ts +15 -0
  1014. package/dist/list/list__hint.js +33 -0
  1015. package/dist/list/list__item.d.ts +8 -0
  1016. package/dist/list/list__item.js +239 -0
  1017. package/dist/list/list__link.d.ts +9 -0
  1018. package/dist/list/list__link.js +81 -0
  1019. package/dist/list/list__separator.d.ts +5 -0
  1020. package/dist/list/list__separator.js +39 -0
  1021. package/dist/list/list__title.d.ts +5 -0
  1022. package/dist/list/list__title.js +48 -0
  1023. package/dist/list/list__users-groups-source.d.ts +27 -0
  1024. package/dist/list/list__users-groups-source.js +197 -0
  1025. package/dist/loader/loader.d.ts +28 -0
  1026. package/dist/loader/loader.js +93 -0
  1027. package/dist/loader/loader__core.d.ts +75 -0
  1028. package/dist/loader/loader__core.js +327 -0
  1029. package/dist/loader-inline/loader-inline.d.ts +18 -0
  1030. package/dist/loader-inline/loader-inline.js +49 -0
  1031. package/dist/loader-inline-ng/loader-inline-ng.js +14 -0
  1032. package/dist/loader-ng/loader-ng.js +60 -0
  1033. package/dist/loader-screen/loader-screen.d.ts +17 -0
  1034. package/dist/loader-screen/loader-screen.js +63 -0
  1035. package/dist/loader-screen-ng/loader-screen-ng.js +98 -0
  1036. package/dist/login-dialog/login-dialog.d.ts +47 -0
  1037. package/dist/login-dialog/login-dialog.js +218 -0
  1038. package/dist/login-dialog/service.d.ts +2 -0
  1039. package/dist/login-dialog/service.js +99 -0
  1040. package/dist/markdown/code.d.ts +7 -0
  1041. package/dist/markdown/code.js +52 -0
  1042. package/dist/markdown/heading.d.ts +11 -0
  1043. package/dist/markdown/heading.js +20 -0
  1044. package/dist/markdown/link.d.ts +12 -0
  1045. package/dist/markdown/link.js +34 -0
  1046. package/dist/markdown/markdown.d.ts +15 -0
  1047. package/dist/markdown/markdown.js +102 -0
  1048. package/dist/message/message.d.ts +55 -0
  1049. package/dist/message/message.js +268 -0
  1050. package/dist/message-bundle-ng/message-bundle-ng.js +151 -0
  1051. package/dist/old-browsers-message/old-browsers-message.d.ts +2 -0
  1052. package/dist/old-browsers-message/old-browsers-message.js +92 -0
  1053. package/dist/old-browsers-message/old-browsers-message__stop.d.ts +1 -0
  1054. package/dist/old-browsers-message/old-browsers-message__stop.js +11 -0
  1055. package/dist/old-browsers-message/white-list.d.ts +2 -0
  1056. package/dist/old-browsers-message/white-list.js +37 -0
  1057. package/dist/pager/pager.d.ts +78 -0
  1058. package/dist/pager/pager.js +402 -0
  1059. package/dist/pager-ng/pager-ng.js +131 -0
  1060. package/dist/panel/panel.d.ts +12 -0
  1061. package/dist/panel/panel.js +38 -0
  1062. package/dist/panel-ng/panel-ng.js +26 -0
  1063. package/dist/permissions/permissions.d.ts +111 -0
  1064. package/dist/permissions/permissions.js +221 -0
  1065. package/dist/permissions/permissions__cache.d.ts +93 -0
  1066. package/dist/permissions/permissions__cache.js +257 -0
  1067. package/dist/permissions-ng/permissions-ng.js +327 -0
  1068. package/dist/place-under-ng/place-under-ng.js +157 -0
  1069. package/dist/popup/popup.consts.d.ts +37 -0
  1070. package/dist/popup/popup.consts.js +44 -0
  1071. package/dist/popup/popup.d.ts +147 -0
  1072. package/dist/popup/popup.js +424 -0
  1073. package/dist/popup/popup.target.d.ts +7 -0
  1074. package/dist/popup/popup.target.js +24 -0
  1075. package/dist/popup/position.d.ts +30 -0
  1076. package/dist/popup/position.js +271 -0
  1077. package/dist/popup-menu/popup-menu.d.ts +60 -0
  1078. package/dist/popup-menu/popup-menu.js +143 -0
  1079. package/dist/progress-bar/progress-bar.d.ts +64 -0
  1080. package/dist/progress-bar/progress-bar.js +120 -0
  1081. package/dist/progress-bar-ng/progress-bar-ng.js +23 -0
  1082. package/dist/promised-click-ng/promised-click-ng.js +138 -0
  1083. package/dist/proxy-attrs/proxy-attrs.js +27 -0
  1084. package/dist/query-assist/query-assist.d.ts +333 -0
  1085. package/dist/query-assist/query-assist.js +1104 -0
  1086. package/dist/query-assist/query-assist__suggestions.d.ts +29 -0
  1087. package/dist/query-assist/query-assist__suggestions.js +77 -0
  1088. package/dist/query-assist-ng/query-assist-ng.js +117 -0
  1089. package/dist/radio/radio.d.ts +18 -0
  1090. package/dist/radio/radio.js +49 -0
  1091. package/dist/radio/radio__item.d.ts +28 -0
  1092. package/dist/radio/radio__item.js +87 -0
  1093. package/dist/radio-ng/radio-ng.js +47 -0
  1094. package/dist/save-field-ng/save-field-ng.js +323 -0
  1095. package/dist/save-field-ng/save-field-ng__template.js +3 -0
  1096. package/dist/select/select.d.ts +303 -0
  1097. package/dist/select/select.js +1316 -0
  1098. package/dist/select/select__filter.d.ts +19 -0
  1099. package/dist/select/select__filter.js +89 -0
  1100. package/dist/select/select__popup.d.ts +166 -0
  1101. package/dist/select/select__popup.js +636 -0
  1102. package/dist/select-ng/select-ng.js +625 -0
  1103. package/dist/select-ng/select-ng__lazy.js +203 -0
  1104. package/dist/select-ng/select-ng__options.js +144 -0
  1105. package/dist/shortcuts/core.d.ts +74 -0
  1106. package/dist/shortcuts/core.js +249 -0
  1107. package/dist/shortcuts/shortcut-title.d.ts +1 -0
  1108. package/dist/shortcuts/shortcut-title.js +56 -0
  1109. package/dist/shortcuts/shortcuts-hoc.d.ts +65 -0
  1110. package/dist/shortcuts/shortcuts-hoc.js +61 -0
  1111. package/dist/shortcuts/shortcuts.d.ts +28 -0
  1112. package/dist/shortcuts/shortcuts.js +92 -0
  1113. package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +155 -0
  1114. package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +3 -0
  1115. package/dist/shortcuts-ng/shortcuts-ng.js +263 -0
  1116. package/dist/sidebar-ng/sidebar-ng.js +128 -0
  1117. package/dist/sidebar-ng/sidebar-ng__button-template.js +3 -0
  1118. package/dist/sidebar-ng/sidebar-ng__template.js +3 -0
  1119. package/dist/storage/storage.d.ts +18 -0
  1120. package/dist/storage/storage.js +94 -0
  1121. package/dist/storage/storage__fallback.d.ts +79 -0
  1122. package/dist/storage/storage__fallback.js +254 -0
  1123. package/dist/storage/storage__local.d.ts +38 -0
  1124. package/dist/storage/storage__local.js +219 -0
  1125. package/dist/style.css +1 -0
  1126. package/dist/tab-trap/tab-trap.d.ts +43 -0
  1127. package/dist/tab-trap/tab-trap.js +180 -0
  1128. package/dist/table/cell.d.ts +13 -0
  1129. package/dist/table/cell.js +37 -0
  1130. package/dist/table/disable-hover-hoc.d.ts +64 -0
  1131. package/dist/table/disable-hover-hoc.js +62 -0
  1132. package/dist/table/header-cell.d.ts +43 -0
  1133. package/dist/table/header-cell.js +110 -0
  1134. package/dist/table/header.d.ts +56 -0
  1135. package/dist/table/header.js +153 -0
  1136. package/dist/table/multitable.d.ts +25 -0
  1137. package/dist/table/multitable.js +140 -0
  1138. package/dist/table/row-with-focus-sensor.d.ts +18 -0
  1139. package/dist/table/row-with-focus-sensor.js +119 -0
  1140. package/dist/table/row.d.ts +59 -0
  1141. package/dist/table/row.js +301 -0
  1142. package/dist/table/selection-adapter.d.ts +5 -0
  1143. package/dist/table/selection-adapter.js +14 -0
  1144. package/dist/table/selection-shortcuts-hoc.d.ts +17 -0
  1145. package/dist/table/selection-shortcuts-hoc.js +205 -0
  1146. package/dist/table/selection.d.ts +47 -0
  1147. package/dist/table/selection.js +257 -0
  1148. package/dist/table/smart-table.d.ts +64 -0
  1149. package/dist/table/smart-table.js +151 -0
  1150. package/dist/table/table.d.ts +159 -0
  1151. package/dist/table/table.js +465 -0
  1152. package/dist/table-legacy-ng/table-legacy-ng.js +485 -0
  1153. package/dist/table-legacy-ng/table-legacy-ng__pager.js +154 -0
  1154. package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +115 -0
  1155. package/dist/table-legacy-ng/table-legacy-ng__selection.js +195 -0
  1156. package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +65 -0
  1157. package/dist/table-ng/smart-table-ng.js +93 -0
  1158. package/dist/table-ng/table-ng.js +92 -0
  1159. package/dist/tabs/collapsible-more.d.ts +29 -0
  1160. package/dist/tabs/collapsible-more.js +226 -0
  1161. package/dist/tabs/collapsible-tab.d.ts +16 -0
  1162. package/dist/tabs/collapsible-tab.js +95 -0
  1163. package/dist/tabs/collapsible-tabs.d.ts +43 -0
  1164. package/dist/tabs/collapsible-tabs.js +357 -0
  1165. package/dist/tabs/custom-item.d.ts +9 -0
  1166. package/dist/tabs/custom-item.js +11 -0
  1167. package/dist/tabs/dumb-tabs.d.ts +35 -0
  1168. package/dist/tabs/dumb-tabs.js +193 -0
  1169. package/dist/tabs/smart-tabs.d.ts +20 -0
  1170. package/dist/tabs/smart-tabs.js +144 -0
  1171. package/dist/tabs/tab-link.d.ts +18 -0
  1172. package/dist/tabs/tab-link.js +48 -0
  1173. package/dist/tabs/tab.d.ts +27 -0
  1174. package/dist/tabs/tab.js +41 -0
  1175. package/dist/tabs/tabs.d.ts +7 -0
  1176. package/dist/tabs/tabs.js +102 -0
  1177. package/dist/tabs-ng/tabs-ng.js +187 -0
  1178. package/dist/tabs-ng/tabs-ng__template.js +3 -0
  1179. package/dist/tag/tag.d.ts +64 -0
  1180. package/dist/tag/tag.js +214 -0
  1181. package/dist/tags-input/tags-input.d.ts +165 -0
  1182. package/dist/tags-input/tags-input.js +540 -0
  1183. package/dist/tags-input-ng/tags-input-ng.js +125 -0
  1184. package/dist/tags-list/tags-list.d.ts +46 -0
  1185. package/dist/tags-list/tags-list.js +103 -0
  1186. package/dist/template-ng/template-ng.js +68 -0
  1187. package/dist/text/text.d.ts +23 -0
  1188. package/dist/text/text.js +57 -0
  1189. package/dist/title-ng/title-ng.js +108 -0
  1190. package/dist/toggle/toggle.d.ts +39 -0
  1191. package/dist/toggle/toggle.js +86 -0
  1192. package/dist/toggle-ng/toggle-ng.js +27 -0
  1193. package/dist/tooltip/tooltip.d.ts +65 -0
  1194. package/dist/tooltip/tooltip.js +229 -0
  1195. package/dist/tooltip-ng/tooltip-ng.js +120 -0
  1196. package/dist/user-agreement/service.d.ts +67 -0
  1197. package/dist/user-agreement/service.js +503 -0
  1198. package/dist/user-agreement/toolbox.eula.d.ts +2 -0
  1199. package/dist/user-agreement/toolbox.eula.js +3 -0
  1200. package/dist/user-agreement/user-agreement.d.ts +61 -0
  1201. package/dist/user-agreement/user-agreement.js +191 -0
  1202. package/dist/user-card/card.d.ts +71 -0
  1203. package/dist/user-card/card.js +82 -0
  1204. package/dist/user-card/smart-user-card-tooltip.d.ts +20 -0
  1205. package/dist/user-card/smart-user-card-tooltip.js +174 -0
  1206. package/dist/user-card/tooltip.d.ts +36 -0
  1207. package/dist/user-card/tooltip.js +146 -0
  1208. package/dist/user-card/user-card.d.ts +11 -0
  1209. package/dist/user-card/user-card.js +87 -0
  1210. package/dist/user-card-ng/user-card-ng.js +97 -0
  1211. package/package.json +1 -1
@@ -0,0 +1,1655 @@
1
+ import { _ as _defineProperty, d as _createClass, g as _objectSpread2, c as _classCallCheck, l as _toConsumableArray, h as _asyncToGenerator, i as _regeneratorRuntime } from '../_helpers/_rollupPluginBabelHelpers.js';
2
+ import 'core-js/modules/es.object.to-string.js';
3
+ import 'core-js/modules/es.promise.js';
4
+ import 'core-js/modules/es.array.filter.js';
5
+ import 'core-js/modules/es.array.iterator.js';
6
+ import 'core-js/modules/es.set.js';
7
+ import 'core-js/modules/web.dom-collections.iterator.js';
8
+ import 'core-js/modules/es.array.concat.js';
9
+ import 'core-js/modules/es.array.includes.js';
10
+ import 'core-js/modules/es.string.includes.js';
11
+ import 'core-js/modules/es.regexp.exec.js';
12
+ import 'core-js/modules/es.string.replace.js';
13
+ import 'core-js/modules/es.regexp.to-string.js';
14
+ import 'core-js/modules/web.url.js';
15
+ import 'core-js/modules/web.url-search-params.js';
16
+ import 'core-js/modules/es.string.search.js';
17
+ import { getAbsoluteBaseURL, fixUrl } from '../global/url.js';
18
+ import Listeners from '../global/listeners.js';
19
+ import HTTP from '../http/http.js';
20
+ import promiseWithTimeout from '../global/promise-with-timeout.js';
21
+ import { translate, getTranslationsWithFallback, getTranslations } from '../i18n/i18n.js';
22
+ import AuthStorage from './storage.js';
23
+ import AuthResponseParser from './response-parser.js';
24
+ import AuthRequestBuilder from './request-builder.js';
25
+ import BackgroundFlow from './background-flow.js';
26
+ import TokenValidator from './token-validator.js';
27
+ import 'core-js/modules/es.string.match.js';
28
+ import 'core-js/modules/es.array.index-of.js';
29
+ import 'core-js/modules/es.map.js';
30
+ import 'core-js/modules/es.array.map.js';
31
+ import 'core-js/modules/es.weak-map.js';
32
+ import 'core-js/modules/web.dom-collections.for-each.js';
33
+ import 'core-js/modules/es.object.entries.js';
34
+ import 'core-js/modules/es.reflect.delete-property.js';
35
+ import 'es6-error';
36
+ import 'core-js/modules/es.array.reduce.js';
37
+ import 'core-js/modules/es.array.sort.js';
38
+ import '../storage/storage.js';
39
+ import '../storage/storage__local.js';
40
+ import '../alert-service/alert-service.js';
41
+ import 'react';
42
+ import '../global/react-render-adapter.js';
43
+ import 'react-dom';
44
+ import '../global/get-uid.js';
45
+ import '../alert/alert.js';
46
+ import 'core-js/modules/es.object.values.js';
47
+ import 'classnames';
48
+ import 'prop-types';
49
+ import '@jetbrains/icons/exception';
50
+ import '@jetbrains/icons/checkmark';
51
+ import '@jetbrains/icons/warning';
52
+ import '@jetbrains/icons/close';
53
+ import '../icon/icon.js';
54
+ import 'util-deprecate';
55
+ import '../icon/icon__constants.js';
56
+ import '../_helpers/icon.js';
57
+ import '../icon/icon__svg.js';
58
+ import 'core-js/modules/es.string.starts-with.js';
59
+ import '../global/memoize.js';
60
+ import '../loader-inline/loader-inline.js';
61
+ import '../global/data-tests.js';
62
+ import '../_helpers/loader-inline.js';
63
+ import '../global/dom.js';
64
+ import 'core-js/modules/es.object.assign.js';
65
+ import 'core-js/modules/es.string.split.js';
66
+ import '../button/button.js';
67
+ import '@jetbrains/icons/chevron-10px';
68
+ import '../link/clickableLink.js';
69
+ import '../global/controls-height.js';
70
+ import '../_helpers/button__classes.js';
71
+ import '../_helpers/theme.js';
72
+ import '../popup/popup.target.js';
73
+ import '../popup/popup.js';
74
+ import '../global/schedule-raf.js';
75
+ import '../shortcuts/shortcuts.js';
76
+ import '../shortcuts/core.js';
77
+ import 'core-js/modules/es.array.slice.js';
78
+ import 'core-js/modules/es.array.splice.js';
79
+ import 'core-js/modules/es.array.find-index.js';
80
+ import 'combokeys';
81
+ import '../global/sniffer.js';
82
+ import 'sniffr';
83
+ import '../tab-trap/tab-trap.js';
84
+ import '../popup/position.js';
85
+ import '../popup/popup.consts.js';
86
+ import '../alert/container.js';
87
+ import '../storage/storage__fallback.js';
88
+ import 'deep-equal';
89
+ import 'simply-uuid';
90
+
91
+ /* eslint-disable @typescript-eslint/no-magic-numbers */
92
+ var DEFAULT_EXPIRES_TIMEOUT = 40 * 60;
93
+ var DEFAULT_BACKGROUND_TIMEOUT = 10 * 1000;
94
+ var DEFAULT_BACKEND_CHECK_TIMEOUT = 10 * 1000;
95
+ var BACKGROUND_REDIRECT_TIMEOUT = 20 * 1000;
96
+ var DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT = 5 * 1000;
97
+ /* eslint-enable @typescript-eslint/no-magic-numbers */
98
+ var USER_CHANGED_EVENT = 'userChange';
99
+ var DOMAIN_USER_CHANGED_EVENT = 'domainUser';
100
+ var LOGOUT_EVENT = 'logout';
101
+ var LOGOUT_POSTPONED_EVENT = 'logoutPostponed';
102
+ var USER_CHANGE_POSTPONED_EVENT = 'changePostponed';
103
+ function noop() {}
104
+ var DEFAULT_CONFIG = {
105
+ cacheCurrentUser: false,
106
+ reloadOnUserChange: true,
107
+ embeddedLogin: false,
108
+ EmbeddedLoginFlow: null,
109
+ clientId: '0-0-0-0-0',
110
+ redirectUri: getAbsoluteBaseURL(),
111
+ redirect: false,
112
+ requestCredentials: 'default',
113
+ backgroundRefreshTimeout: null,
114
+ scope: [],
115
+ userFields: ['guest', 'id', 'name', 'login', 'profile/avatar/url'],
116
+ cleanHash: true,
117
+ onLogout: noop,
118
+ onPostponeChangedUser: function onPostponeChangedUser() {},
119
+ onPostponeLogout: function onPostponeLogout() {},
120
+ enableBackendStatusCheck: true,
121
+ backendCheckTimeout: DEFAULT_BACKEND_CHECK_TIMEOUT,
122
+ checkBackendIsUp: function checkBackendIsUp() {
123
+ return Promise.resolve(null);
124
+ },
125
+ onBackendDown: function onBackendDown() {
126
+ return function () {};
127
+ },
128
+ defaultExpiresIn: DEFAULT_EXPIRES_TIMEOUT,
129
+ waitForRedirectTimeout: DEFAULT_WAIT_FOR_REDIRECT_TIMEOUT,
130
+ translations: null
131
+ };
132
+ var Auth = /*#__PURE__*/function () {
133
+ function Auth(config) {
134
+ var _this = this;
135
+ _classCallCheck(this, Auth);
136
+ _defineProperty(this, "config", void 0);
137
+ _defineProperty(this, "listeners", new Listeners());
138
+ _defineProperty(this, "http", void 0);
139
+ _defineProperty(this, "_service", {});
140
+ _defineProperty(this, "_storage", null);
141
+ _defineProperty(this, "_responseParser", new AuthResponseParser());
142
+ _defineProperty(this, "_requestBuilder", null);
143
+ _defineProperty(this, "_backgroundFlow", void 0);
144
+ _defineProperty(this, "_embeddedFlow", null);
145
+ _defineProperty(this, "_tokenValidator", null);
146
+ _defineProperty(this, "_postponed", false);
147
+ _defineProperty(this, "_backendCheckPromise", null);
148
+ _defineProperty(this, "_authDialogService", undefined);
149
+ _defineProperty(this, "_domainStorage", void 0);
150
+ _defineProperty(this, "user", null);
151
+ _defineProperty(this, "_initDeferred", void 0);
152
+ _defineProperty(this, "_isLoginWindowOpen", void 0);
153
+ if (!config) {
154
+ throw new Error('Config is required');
155
+ }
156
+ if (config.serverUri == null) {
157
+ throw new Error('\"serverUri\" property is required');
158
+ }
159
+ var unsupportedParams = ['redirect_uri', 'request_credentials', 'client_id'].filter(function (param) {
160
+ return config.hasOwnProperty(param);
161
+ });
162
+ if (unsupportedParams.length !== 0) {
163
+ throw new Error("The following parameters are no longer supported: ".concat(unsupportedParams.join(', '), ". Please change them from snake_case to camelCase."));
164
+ }
165
+ config.userFields = config.userFields || [];
166
+ this.config = _objectSpread2(_objectSpread2({}, Auth.DEFAULT_CONFIG), config);
167
+ var _this$config = this.config,
168
+ clientId = _this$config.clientId,
169
+ redirect = _this$config.redirect,
170
+ redirectUri = _this$config.redirectUri,
171
+ requestCredentials = _this$config.requestCredentials,
172
+ scope = _this$config.scope;
173
+ var serverUriLength = this.config.serverUri.length;
174
+ if (serverUriLength > 0 && this.config.serverUri.charAt(serverUriLength - 1) !== '/') {
175
+ this.config.serverUri += '/';
176
+ }
177
+ this.config.userParams = {
178
+ query: {
179
+ fields: _toConsumableArray(new Set(Auth.DEFAULT_CONFIG.userFields.concat(config.userFields))).join()
180
+ }
181
+ };
182
+ if (!scope.includes(Auth.DEFAULT_CONFIG.clientId)) {
183
+ scope.push(Auth.DEFAULT_CONFIG.clientId);
184
+ }
185
+ this._storage = new AuthStorage({
186
+ messagePrefix: "".concat(clientId, "-message-"),
187
+ stateKeyPrefix: "".concat(clientId, "-states-"),
188
+ tokenKey: "".concat(clientId, "-token"),
189
+ userKey: "".concat(clientId, "-user-")
190
+ });
191
+ this._domainStorage = new AuthStorage({
192
+ messagePrefix: 'domain-message-'
193
+ });
194
+ this._requestBuilder = new AuthRequestBuilder({
195
+ authorization: this.config.serverUri + Auth.API_PATH + Auth.API_AUTH_PATH,
196
+ clientId,
197
+ redirect,
198
+ redirectUri,
199
+ requestCredentials,
200
+ scopes: scope
201
+ }, this._storage);
202
+ var backgroundRefreshTimeout = this.config.backgroundRefreshTimeout;
203
+ if (!backgroundRefreshTimeout) {
204
+ backgroundRefreshTimeout = this.config.embeddedLogin ? DEFAULT_BACKGROUND_TIMEOUT : BACKGROUND_REDIRECT_TIMEOUT;
205
+ }
206
+ this._backgroundFlow = new BackgroundFlow(this._requestBuilder, this._storage, backgroundRefreshTimeout);
207
+ if (this.config.EmbeddedLoginFlow) {
208
+ var _this$config$translat;
209
+ this._embeddedFlow = new this.config.EmbeddedLoginFlow(this._requestBuilder, this._storage, (_this$config$translat = this.config.translations) !== null && _this$config$translat !== void 0 ? _this$config$translat : getTranslationsWithFallback());
210
+ }
211
+ var API_BASE = this.config.serverUri + Auth.API_PATH;
212
+ var fetchConfig = config.fetchCredentials ? {
213
+ credentials: config.fetchCredentials
214
+ } : undefined;
215
+ this.http = new HTTP(this, API_BASE, fetchConfig);
216
+ var getUser = /*#__PURE__*/function () {
217
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(token) {
218
+ var user;
219
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
220
+ while (1) switch (_context.prev = _context.next) {
221
+ case 0:
222
+ _context.next = 2;
223
+ return _this.getUser(token);
224
+ case 2:
225
+ user = _context.sent;
226
+ _this.user = user;
227
+ return _context.abrupt("return", user);
228
+ case 5:
229
+ case "end":
230
+ return _context.stop();
231
+ }
232
+ }, _callee);
233
+ }));
234
+ return function getUser(_x) {
235
+ return _ref.apply(this, arguments);
236
+ };
237
+ }();
238
+ this._tokenValidator = new TokenValidator(this.config, getUser, this._storage);
239
+ if (this.config.onLogout) {
240
+ this.addListener(LOGOUT_EVENT, this.config.onLogout);
241
+ }
242
+ if (this.config.reloadOnUserChange) {
243
+ this.addListener(USER_CHANGED_EVENT, function () {
244
+ return _this._reloadCurrentPage();
245
+ });
246
+ }
247
+ this.addListener(LOGOUT_POSTPONED_EVENT, function () {
248
+ return _this._setPostponed(true);
249
+ });
250
+ this.addListener(USER_CHANGE_POSTPONED_EVENT, function () {
251
+ return _this._setPostponed(true);
252
+ });
253
+ this.addListener(USER_CHANGED_EVENT, function () {
254
+ return _this._setPostponed(false);
255
+ });
256
+ this.addListener(USER_CHANGED_EVENT, function (user) {
257
+ if (user) {
258
+ _this._updateDomainUser(user.id);
259
+ }
260
+ });
261
+ if (this.config.cacheCurrentUser) {
262
+ this.addListener(LOGOUT_EVENT, function () {
263
+ var _this$_storage;
264
+ return (_this$_storage = _this._storage) === null || _this$_storage === void 0 ? void 0 : _this$_storage.wipeCachedCurrentUser();
265
+ });
266
+ this.addListener(USER_CHANGED_EVENT, function () {
267
+ var _this$_storage2;
268
+ return (_this$_storage2 = _this._storage) === null || _this$_storage2 === void 0 ? void 0 : _this$_storage2.onUserChanged();
269
+ });
270
+ }
271
+ this._createInitDeferred();
272
+ this.setUpPreconnect(config.serverUri);
273
+ }
274
+ _createClass(Auth, [{
275
+ key: "_setPostponed",
276
+ value: function _setPostponed() {
277
+ var postponed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
278
+ this._postponed = postponed;
279
+ }
280
+ }, {
281
+ key: "_updateDomainUser",
282
+ value: function _updateDomainUser(userID) {
283
+ this._domainStorage.sendMessage(DOMAIN_USER_CHANGED_EVENT, {
284
+ userID,
285
+ serviceID: this.config.clientId
286
+ });
287
+ }
288
+ }, {
289
+ key: "addListener",
290
+ value: function addListener(event, handler) {
291
+ this.listeners.add(event, handler);
292
+ }
293
+ }, {
294
+ key: "removeListener",
295
+ value: function removeListener(event, handler) {
296
+ this.listeners.remove(event, handler);
297
+ }
298
+ }, {
299
+ key: "setAuthDialogService",
300
+ value: function setAuthDialogService(authDialogService) {
301
+ this._authDialogService = authDialogService;
302
+ }
303
+ }, {
304
+ key: "setCurrentService",
305
+ value: function setCurrentService(service) {
306
+ this._service = service;
307
+ }
308
+ }, {
309
+ key: "_createInitDeferred",
310
+ value: function _createInitDeferred() {
311
+ var deferred = {};
312
+ deferred.promise = new Promise(function (resolve, reject) {
313
+ deferred.resolve = resolve;
314
+ deferred.reject = reject;
315
+ });
316
+ this._initDeferred = deferred;
317
+ }
318
+ /**
319
+ * @return {Promise.<string>} absolute URL promise that is resolved to a URL
320
+ * that should be restored after returning back from auth server.
321
+ */
322
+ }, {
323
+ key: "init",
324
+ value: (function () {
325
+ var _init = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
326
+ var _this$_storage3,
327
+ _this2 = this;
328
+ var state, _this$_tokenValidator, _this$_initDeferred, _this$_initDeferred$r, _state, message, _this$user, userID, serviceID, _this$_initDeferred2, _this$_initDeferred2$;
329
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
330
+ while (1) switch (_context3.prev = _context3.next) {
331
+ case 0:
332
+ (_this$_storage3 = this._storage) === null || _this$_storage3 === void 0 || _this$_storage3.onTokenChange( /*#__PURE__*/function () {
333
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(token) {
334
+ var isGuest;
335
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
336
+ while (1) switch (_context2.prev = _context2.next) {
337
+ case 0:
338
+ isGuest = _this2.user ? _this2.user.guest : false;
339
+ if (!(isGuest && !token)) {
340
+ _context2.next = 3;
341
+ break;
342
+ }
343
+ return _context2.abrupt("return");
344
+ case 3:
345
+ if (token) {
346
+ _context2.next = 7;
347
+ break;
348
+ }
349
+ _this2.logout();
350
+ _context2.next = 17;
351
+ break;
352
+ case 7:
353
+ _context2.prev = 7;
354
+ _context2.next = 10;
355
+ return _this2._detectUserChange(token.accessToken);
356
+ case 10:
357
+ _context2.next = 17;
358
+ break;
359
+ case 12:
360
+ _context2.prev = 12;
361
+ _context2.t0 = _context2["catch"](7);
362
+ if (_context2.t0 instanceof Error) {
363
+ _context2.next = 16;
364
+ break;
365
+ }
366
+ throw _context2.t0;
367
+ case 16:
368
+ if (_this2._canShowDialogs()) {
369
+ _this2._showAuthDialog({
370
+ nonInteractive: true,
371
+ error: _context2.t0
372
+ });
373
+ }
374
+ case 17:
375
+ case "end":
376
+ return _context2.stop();
377
+ }
378
+ }, _callee2, null, [[7, 12]]);
379
+ }));
380
+ return function (_x2) {
381
+ return _ref2.apply(this, arguments);
382
+ };
383
+ }());
384
+ this._domainStorage.onMessage(DOMAIN_USER_CHANGED_EVENT, function (message) {
385
+ var _ref3 = message || {},
386
+ userID = _ref3.userID,
387
+ serviceID = _ref3.serviceID;
388
+ if (serviceID === _this2.config.clientId) {
389
+ return;
390
+ }
391
+ if (_this2.user && userID === _this2.user.id) {
392
+ return;
393
+ }
394
+ _this2.forceTokenUpdate();
395
+ });
396
+ _context3.prev = 2;
397
+ _context3.next = 5;
398
+ return this._checkForAuthResponse();
399
+ case 5:
400
+ state = _context3.sent;
401
+ _context3.next = 11;
402
+ break;
403
+ case 8:
404
+ _context3.prev = 8;
405
+ _context3.t0 = _context3["catch"](2);
406
+ return _context3.abrupt("return", _context3.t0 instanceof Error ? this.handleInitError(_context3.t0) : undefined);
407
+ case 11:
408
+ if (!(state && state.nonRedirect)) {
409
+ _context3.next = 13;
410
+ break;
411
+ }
412
+ return _context3.abrupt("return", new Promise(noop));
413
+ case 13:
414
+ _context3.prev = 13;
415
+ _context3.next = 16;
416
+ return (_this$_tokenValidator = this._tokenValidator) === null || _this$_tokenValidator === void 0 ? void 0 : _this$_tokenValidator.validateToken();
417
+ case 16:
418
+ _context3.next = 18;
419
+ return this._domainStorage._messagesStorage.get("domain-message-".concat(DOMAIN_USER_CHANGED_EVENT));
420
+ case 18:
421
+ message = _context3.sent;
422
+ if (message) {
423
+ userID = message.userID, serviceID = message.serviceID;
424
+ if (serviceID !== this.config.clientId && (!userID || ((_this$user = this.user) === null || _this$user === void 0 ? void 0 : _this$user.id) !== userID)) {
425
+ this.forceTokenUpdate();
426
+ }
427
+ }
428
+ // Access token appears to be valid.
429
+ // We may resolve restoreLocation URL now
430
+ if (state) {
431
+ _context3.next = 24;
432
+ break;
433
+ }
434
+ _context3.next = 23;
435
+ return this._checkForStateRestoration();
436
+ case 23:
437
+ state = _context3.sent;
438
+ case 24:
439
+ (_this$_initDeferred = this._initDeferred) === null || _this$_initDeferred === void 0 || (_this$_initDeferred$r = _this$_initDeferred.resolve) === null || _this$_initDeferred$r === void 0 || _this$_initDeferred$r.call(_this$_initDeferred, state && state.restoreLocation);
440
+ return _context3.abrupt("return", (_state = state) === null || _state === void 0 ? void 0 : _state.restoreLocation);
441
+ case 28:
442
+ _context3.prev = 28;
443
+ _context3.t1 = _context3["catch"](13);
444
+ if (!Auth.storageIsUnavailable) {
445
+ _context3.next = 35;
446
+ break;
447
+ }
448
+ (_this$_initDeferred2 = this._initDeferred) === null || _this$_initDeferred2 === void 0 || (_this$_initDeferred2$ = _this$_initDeferred2.resolve) === null || _this$_initDeferred2$ === void 0 || _this$_initDeferred2$.call(_this$_initDeferred2); // No way to handle if cookies are disabled
449
+ _context3.next = 34;
450
+ return this.requestUser();
451
+ case 34:
452
+ return _context3.abrupt("return", null);
453
+ case 35:
454
+ return _context3.abrupt("return", _context3.t1 instanceof Error ? this.handleInitValidationError(_context3.t1) : undefined);
455
+ case 36:
456
+ case "end":
457
+ return _context3.stop();
458
+ }
459
+ }, _callee3, this, [[2, 8], [13, 28]]);
460
+ }));
461
+ function init() {
462
+ return _init.apply(this, arguments);
463
+ }
464
+ return init;
465
+ }())
466
+ }, {
467
+ key: "sendRedirect",
468
+ value: function () {
469
+ var _sendRedirect = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(error) {
470
+ var _this$_requestBuilder,
471
+ _this3 = this;
472
+ var authRequest;
473
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
474
+ while (1) switch (_context4.prev = _context4.next) {
475
+ case 0:
476
+ _context4.next = 2;
477
+ return (_this$_requestBuilder = this._requestBuilder) === null || _this$_requestBuilder === void 0 ? void 0 : _this$_requestBuilder.prepareAuthRequest();
478
+ case 2:
479
+ authRequest = _context4.sent;
480
+ if (authRequest != null) {
481
+ this._redirectCurrentPage(authRequest.url);
482
+ }
483
+ // HUB-10867 Since we already redirecting the page, there is no actual need to throw an error
484
+ // and scare user with flashing error
485
+ // But let's keep it just in case redirect was not successful
486
+ _context4.next = 6;
487
+ return new Promise(function (resolve) {
488
+ return setTimeout(resolve, _this3.config.waitForRedirectTimeout);
489
+ });
490
+ case 6:
491
+ throw error;
492
+ case 7:
493
+ case "end":
494
+ return _context4.stop();
495
+ }
496
+ }, _callee4, this);
497
+ }));
498
+ function sendRedirect(_x3) {
499
+ return _sendRedirect.apply(this, arguments);
500
+ }
501
+ return sendRedirect;
502
+ }()
503
+ }, {
504
+ key: "handleInitError",
505
+ value: function () {
506
+ var _handleInitError = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(error) {
507
+ var _this$_storage4, state, _this$_storage5;
508
+ return _regeneratorRuntime().wrap(function _callee5$(_context5) {
509
+ while (1) switch (_context5.prev = _context5.next) {
510
+ case 0:
511
+ if (!('stateId' in error && error.stateId)) {
512
+ _context5.next = 13;
513
+ break;
514
+ }
515
+ _context5.prev = 1;
516
+ _context5.next = 4;
517
+ return (_this$_storage4 = this._storage) === null || _this$_storage4 === void 0 ? void 0 : _this$_storage4.getState(error.stateId);
518
+ case 4:
519
+ state = _context5.sent;
520
+ if (!(state && state.nonRedirect)) {
521
+ _context5.next = 9;
522
+ break;
523
+ }
524
+ state.error = error;
525
+ (_this$_storage5 = this._storage) === null || _this$_storage5 === void 0 || _this$_storage5.saveState(error.stateId, state);
526
+ // Return endless promise in the background to avoid service start
527
+ return _context5.abrupt("return", new Promise(noop));
528
+ case 9:
529
+ _context5.next = 13;
530
+ break;
531
+ case 11:
532
+ _context5.prev = 11;
533
+ _context5.t0 = _context5["catch"](1);
534
+ case 13:
535
+ throw error;
536
+ case 14:
537
+ case "end":
538
+ return _context5.stop();
539
+ }
540
+ }, _callee5, this, [[1, 11]]);
541
+ }));
542
+ function handleInitError(_x4) {
543
+ return _handleInitError.apply(this, arguments);
544
+ }
545
+ return handleInitError;
546
+ }()
547
+ }, {
548
+ key: "handleInitValidationError",
549
+ value: function () {
550
+ var _handleInitValidationError = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(error) {
551
+ var _error$cause, _this$_initDeferred4, _this$_initDeferred4$;
552
+ var _this$_backgroundFlow, _this$_tokenValidator2, _this$_initDeferred3, _this$_initDeferred3$;
553
+ return _regeneratorRuntime().wrap(function _callee6$(_context6) {
554
+ while (1) switch (_context6.prev = _context6.next) {
555
+ case 0:
556
+ if (!('cause' in error && error.cause instanceof Error && ((_error$cause = error.cause) === null || _error$cause === void 0 ? void 0 : _error$cause.message) === 'invalid_client')) {
557
+ _context6.next = 5;
558
+ break;
559
+ }
560
+ // eslint-disable-next-line no-console
561
+ console.error('RingUI Auth: invalid client detected. Logging out', error);
562
+ _context6.next = 4;
563
+ return this.logout();
564
+ case 4:
565
+ return _context6.abrupt("return", undefined);
566
+ case 5:
567
+ if (!('authRedirect' in error && error.authRedirect && this.config.redirect)) {
568
+ _context6.next = 7;
569
+ break;
570
+ }
571
+ return _context6.abrupt("return", this.sendRedirect(error));
572
+ case 7:
573
+ if (!('authRedirect' in error && error.authRedirect && !this.config.redirect)) {
574
+ _context6.next = 20;
575
+ break;
576
+ }
577
+ _context6.prev = 8;
578
+ _context6.next = 11;
579
+ return (_this$_backgroundFlow = this._backgroundFlow) === null || _this$_backgroundFlow === void 0 ? void 0 : _this$_backgroundFlow.authorize();
580
+ case 11:
581
+ _context6.next = 13;
582
+ return (_this$_tokenValidator2 = this._tokenValidator) === null || _this$_tokenValidator2 === void 0 ? void 0 : _this$_tokenValidator2.validateToken();
583
+ case 13:
584
+ (_this$_initDeferred3 = this._initDeferred) === null || _this$_initDeferred3 === void 0 || (_this$_initDeferred3$ = _this$_initDeferred3.resolve) === null || _this$_initDeferred3$ === void 0 || _this$_initDeferred3$.call(_this$_initDeferred3);
585
+ return _context6.abrupt("return", undefined);
586
+ case 17:
587
+ _context6.prev = 17;
588
+ _context6.t0 = _context6["catch"](8);
589
+ return _context6.abrupt("return", _context6.t0 instanceof Error ? this.sendRedirect(_context6.t0) : undefined);
590
+ case 20:
591
+ (_this$_initDeferred4 = this._initDeferred) === null || _this$_initDeferred4 === void 0 || (_this$_initDeferred4$ = _this$_initDeferred4.reject) === null || _this$_initDeferred4$ === void 0 || _this$_initDeferred4$.call(_this$_initDeferred4, error);
592
+ throw error;
593
+ case 22:
594
+ case "end":
595
+ return _context6.stop();
596
+ }
597
+ }, _callee6, this, [[8, 17]]);
598
+ }));
599
+ function handleInitValidationError(_x5) {
600
+ return _handleInitValidationError.apply(this, arguments);
601
+ }
602
+ return handleInitValidationError;
603
+ }()
604
+ /**
605
+ * Get token from local storage or request it if necessary.
606
+ * Can redirect to login page.
607
+ * @return {Promise.<string>}
608
+ */
609
+ }, {
610
+ key: "requestToken",
611
+ value: (function () {
612
+ var _requestToken = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
613
+ var _this$_initDeferred5, _yield$this$_tokenVal, _this$_tokenValidator3;
614
+ return _regeneratorRuntime().wrap(function _callee7$(_context7) {
615
+ while (1) switch (_context7.prev = _context7.next) {
616
+ case 0:
617
+ if (!this._postponed) {
618
+ _context7.next = 2;
619
+ break;
620
+ }
621
+ throw new Error('You should log in to be able to make requests');
622
+ case 2:
623
+ _context7.prev = 2;
624
+ _context7.next = 5;
625
+ return (_this$_initDeferred5 = this._initDeferred) === null || _this$_initDeferred5 === void 0 ? void 0 : _this$_initDeferred5.promise;
626
+ case 5:
627
+ if (!Auth.storageIsUnavailable) {
628
+ _context7.next = 7;
629
+ break;
630
+ }
631
+ return _context7.abrupt("return", null);
632
+ case 7:
633
+ _context7.next = 9;
634
+ return (_this$_tokenValidator3 = this._tokenValidator) === null || _this$_tokenValidator3 === void 0 ? void 0 : _this$_tokenValidator3.validateTokenLocally();
635
+ case 9:
636
+ _context7.t1 = _yield$this$_tokenVal = _context7.sent;
637
+ _context7.t0 = _context7.t1 !== null;
638
+ if (!_context7.t0) {
639
+ _context7.next = 13;
640
+ break;
641
+ }
642
+ _context7.t0 = _yield$this$_tokenVal !== void 0;
643
+ case 13:
644
+ if (!_context7.t0) {
645
+ _context7.next = 17;
646
+ break;
647
+ }
648
+ _context7.t2 = _yield$this$_tokenVal;
649
+ _context7.next = 18;
650
+ break;
651
+ case 17:
652
+ _context7.t2 = null;
653
+ case 18:
654
+ return _context7.abrupt("return", _context7.t2);
655
+ case 21:
656
+ _context7.prev = 21;
657
+ _context7.t3 = _context7["catch"](2);
658
+ return _context7.abrupt("return", this.forceTokenUpdate());
659
+ case 24:
660
+ case "end":
661
+ return _context7.stop();
662
+ }
663
+ }, _callee7, this, [[2, 21]]);
664
+ }));
665
+ function requestToken() {
666
+ return _requestToken.apply(this, arguments);
667
+ }
668
+ return requestToken;
669
+ }()
670
+ /**
671
+ * Get new token in the background or redirect to the login page.
672
+ * @return {Promise.<string>}
673
+ */
674
+ )
675
+ }, {
676
+ key: "forceTokenUpdate",
677
+ value: (function () {
678
+ var _forceTokenUpdate = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
679
+ var _this4 = this;
680
+ var _yield$this$_backgrou, _this$_backgroundFlow2, _this$_requestBuilder2, authRequest;
681
+ return _regeneratorRuntime().wrap(function _callee9$(_context9) {
682
+ while (1) switch (_context9.prev = _context9.next) {
683
+ case 0:
684
+ _context9.prev = 0;
685
+ if (!this._backendCheckPromise) {
686
+ this._backendCheckPromise = this._checkBackendsStatusesIfEnabled();
687
+ }
688
+ _context9.next = 4;
689
+ return this._backendCheckPromise;
690
+ case 4:
691
+ _context9.next = 9;
692
+ break;
693
+ case 6:
694
+ _context9.prev = 6;
695
+ _context9.t0 = _context9["catch"](0);
696
+ throw new Error('Cannot refresh token: backend is not available. Postponed by user.');
697
+ case 9:
698
+ _context9.prev = 9;
699
+ this._backendCheckPromise = null;
700
+ return _context9.finish(9);
701
+ case 12:
702
+ _context9.prev = 12;
703
+ _context9.next = 15;
704
+ return (_this$_backgroundFlow2 = this._backgroundFlow) === null || _this$_backgroundFlow2 === void 0 ? void 0 : _this$_backgroundFlow2.authorize();
705
+ case 15:
706
+ _context9.t2 = _yield$this$_backgrou = _context9.sent;
707
+ _context9.t1 = _context9.t2 !== null;
708
+ if (!_context9.t1) {
709
+ _context9.next = 19;
710
+ break;
711
+ }
712
+ _context9.t1 = _yield$this$_backgrou !== void 0;
713
+ case 19:
714
+ if (!_context9.t1) {
715
+ _context9.next = 23;
716
+ break;
717
+ }
718
+ _context9.t3 = _yield$this$_backgrou;
719
+ _context9.next = 24;
720
+ break;
721
+ case 23:
722
+ _context9.t3 = null;
723
+ case 24:
724
+ return _context9.abrupt("return", _context9.t3);
725
+ case 27:
726
+ _context9.prev = 27;
727
+ _context9.t4 = _context9["catch"](12);
728
+ if (_context9.t4 instanceof Error) {
729
+ _context9.next = 31;
730
+ break;
731
+ }
732
+ return _context9.abrupt("return", null);
733
+ case 31:
734
+ if (!this._canShowDialogs()) {
735
+ _context9.next = 35;
736
+ break;
737
+ }
738
+ return _context9.abrupt("return", new Promise(function (resolve) {
739
+ var onTryAgain = /*#__PURE__*/function () {
740
+ var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
741
+ var _this4$_backgroundFlo, result;
742
+ return _regeneratorRuntime().wrap(function _callee8$(_context8) {
743
+ while (1) switch (_context8.prev = _context8.next) {
744
+ case 0:
745
+ _context8.prev = 0;
746
+ _context8.next = 3;
747
+ return (_this4$_backgroundFlo = _this4._backgroundFlow) === null || _this4$_backgroundFlo === void 0 ? void 0 : _this4$_backgroundFlo.authorize();
748
+ case 3:
749
+ result = _context8.sent;
750
+ resolve(result !== null && result !== void 0 ? result : null);
751
+ _context8.next = 11;
752
+ break;
753
+ case 7:
754
+ _context8.prev = 7;
755
+ _context8.t0 = _context8["catch"](0);
756
+ if (_context8.t0 instanceof Error) {
757
+ _this4._showAuthDialog({
758
+ nonInteractive: true,
759
+ error: _context8.t0,
760
+ onTryAgain
761
+ });
762
+ }
763
+ throw _context8.t0;
764
+ case 11:
765
+ case "end":
766
+ return _context8.stop();
767
+ }
768
+ }, _callee8, null, [[0, 7]]);
769
+ }));
770
+ return function onTryAgain() {
771
+ return _ref4.apply(this, arguments);
772
+ };
773
+ }();
774
+ _this4._showAuthDialog({
775
+ nonInteractive: true,
776
+ error: _context9.t4,
777
+ onTryAgain
778
+ });
779
+ }));
780
+ case 35:
781
+ _context9.next = 37;
782
+ return (_this$_requestBuilder2 = this._requestBuilder) === null || _this$_requestBuilder2 === void 0 ? void 0 : _this$_requestBuilder2.prepareAuthRequest();
783
+ case 37:
784
+ authRequest = _context9.sent;
785
+ if (authRequest != null) {
786
+ this._redirectCurrentPage(authRequest.url);
787
+ }
788
+ case 39:
789
+ throw new TokenValidator.TokenValidationError(_context9.t4.message);
790
+ case 40:
791
+ case "end":
792
+ return _context9.stop();
793
+ }
794
+ }, _callee9, this, [[0, 6, 9, 12], [12, 27]]);
795
+ }));
796
+ function forceTokenUpdate() {
797
+ return _forceTokenUpdate.apply(this, arguments);
798
+ }
799
+ return forceTokenUpdate;
800
+ }())
801
+ }, {
802
+ key: "loadCurrentService",
803
+ value: function () {
804
+ var _loadCurrentService = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
805
+ var _ref5, serviceName, serviceImage;
806
+ return _regeneratorRuntime().wrap(function _callee10$(_context10) {
807
+ while (1) switch (_context10.prev = _context10.next) {
808
+ case 0:
809
+ if (!this._service.serviceName) {
810
+ _context10.next = 2;
811
+ break;
812
+ }
813
+ return _context10.abrupt("return");
814
+ case 2:
815
+ _context10.prev = 2;
816
+ _context10.next = 5;
817
+ return this.http.get("oauth2/interactive/login/settings?client_id=".concat(this.config.clientId));
818
+ case 5:
819
+ _context10.t0 = _context10.sent;
820
+ if (_context10.t0) {
821
+ _context10.next = 8;
822
+ break;
823
+ }
824
+ _context10.t0 = {};
825
+ case 8:
826
+ _ref5 = _context10.t0;
827
+ serviceName = _ref5.serviceName;
828
+ serviceImage = _ref5.iconUrl;
829
+ this.setCurrentService({
830
+ serviceImage,
831
+ serviceName
832
+ });
833
+ _context10.next = 16;
834
+ break;
835
+ case 14:
836
+ _context10.prev = 14;
837
+ _context10.t1 = _context10["catch"](2);
838
+ case 16:
839
+ case "end":
840
+ return _context10.stop();
841
+ }
842
+ }, _callee10, this, [[2, 14]]);
843
+ }));
844
+ function loadCurrentService() {
845
+ return _loadCurrentService.apply(this, arguments);
846
+ }
847
+ return loadCurrentService;
848
+ }()
849
+ }, {
850
+ key: "getAPIPath",
851
+ value: function getAPIPath() {
852
+ return this.config.serverUri + Auth.API_PATH;
853
+ }
854
+ /**
855
+ * @return {Promise.<object>}
856
+ */
857
+ }, {
858
+ key: "getUser",
859
+ value: function getUser(accessToken) {
860
+ var _this5 = this;
861
+ if (this.config.cacheCurrentUser) {
862
+ var _this$_storage6;
863
+ return (_this$_storage6 = this._storage) === null || _this$_storage6 === void 0 ? void 0 : _this$_storage6.getCachedUser(function () {
864
+ return _this5.http.authorizedFetch(Auth.API_PROFILE_PATH, accessToken, _this5.config.userParams);
865
+ });
866
+ } else {
867
+ return this.http.authorizedFetch(Auth.API_PROFILE_PATH, accessToken, this.config.userParams);
868
+ }
869
+ }
870
+ /**
871
+ * @return {Promise.<object>}
872
+ */
873
+ }, {
874
+ key: "requestUser",
875
+ value: (function () {
876
+ var _requestUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
877
+ var accessToken, user;
878
+ return _regeneratorRuntime().wrap(function _callee11$(_context11) {
879
+ while (1) switch (_context11.prev = _context11.next) {
880
+ case 0:
881
+ if (!this.user) {
882
+ _context11.next = 2;
883
+ break;
884
+ }
885
+ return _context11.abrupt("return", this.user);
886
+ case 2:
887
+ _context11.next = 4;
888
+ return this.requestToken();
889
+ case 4:
890
+ accessToken = _context11.sent;
891
+ if (!this.user) {
892
+ _context11.next = 7;
893
+ break;
894
+ }
895
+ return _context11.abrupt("return", this.user);
896
+ case 7:
897
+ _context11.next = 9;
898
+ return this.getUser(accessToken);
899
+ case 9:
900
+ user = _context11.sent;
901
+ this.user = user;
902
+ return _context11.abrupt("return", user);
903
+ case 12:
904
+ case "end":
905
+ return _context11.stop();
906
+ }
907
+ }, _callee11, this);
908
+ }));
909
+ function requestUser() {
910
+ return _requestUser.apply(this, arguments);
911
+ }
912
+ return requestUser;
913
+ }())
914
+ }, {
915
+ key: "updateUser",
916
+ value: function () {
917
+ var _updateUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
918
+ var _this$_storage7;
919
+ var accessToken, user;
920
+ return _regeneratorRuntime().wrap(function _callee12$(_context12) {
921
+ while (1) switch (_context12.prev = _context12.next) {
922
+ case 0:
923
+ this._setPostponed(false);
924
+ _context12.next = 3;
925
+ return this.requestToken();
926
+ case 3:
927
+ accessToken = _context12.sent;
928
+ (_this$_storage7 = this._storage) === null || _this$_storage7 === void 0 || _this$_storage7.wipeCachedCurrentUser();
929
+ _context12.next = 7;
930
+ return this.getUser(accessToken);
931
+ case 7:
932
+ user = _context12.sent;
933
+ this.user = user;
934
+ this.listeners.trigger(USER_CHANGED_EVENT, user);
935
+ case 10:
936
+ case "end":
937
+ return _context12.stop();
938
+ }
939
+ }, _callee12, this);
940
+ }));
941
+ function updateUser() {
942
+ return _updateUser.apply(this, arguments);
943
+ }
944
+ return updateUser;
945
+ }()
946
+ }, {
947
+ key: "_detectUserChange",
948
+ value: function () {
949
+ var _detectUserChange2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(accessToken) {
950
+ var _this6 = this;
951
+ var windowWasOpen, user, onApply;
952
+ return _regeneratorRuntime().wrap(function _callee13$(_context13) {
953
+ while (1) switch (_context13.prev = _context13.next) {
954
+ case 0:
955
+ windowWasOpen = this._isLoginWindowOpen;
956
+ _context13.next = 3;
957
+ return this.getUser(accessToken);
958
+ case 3:
959
+ user = _context13.sent;
960
+ onApply = function onApply() {
961
+ _this6.user = user;
962
+ _this6.listeners.trigger(USER_CHANGED_EVENT, user);
963
+ };
964
+ if (!(user && this.user && this.user.id !== user.id)) {
965
+ _context13.next = 14;
966
+ break;
967
+ }
968
+ if (!(!this._canShowDialogs() || this.user.guest || windowWasOpen)) {
969
+ _context13.next = 9;
970
+ break;
971
+ }
972
+ onApply();
973
+ return _context13.abrupt("return");
974
+ case 9:
975
+ if (!user.guest) {
976
+ _context13.next = 12;
977
+ break;
978
+ }
979
+ this._showAuthDialog({
980
+ nonInteractive: true
981
+ });
982
+ return _context13.abrupt("return");
983
+ case 12:
984
+ _context13.next = 14;
985
+ return this._showUserChangedDialog({
986
+ newUser: user,
987
+ onApply,
988
+ onPostpone: function onPostpone() {
989
+ _this6.listeners.trigger(USER_CHANGE_POSTPONED_EVENT);
990
+ _this6.config.onPostponeChangedUser(_this6.user, user);
991
+ }
992
+ });
993
+ case 14:
994
+ case "end":
995
+ return _context13.stop();
996
+ }
997
+ }, _callee13, this);
998
+ }));
999
+ function _detectUserChange(_x6) {
1000
+ return _detectUserChange2.apply(this, arguments);
1001
+ }
1002
+ return _detectUserChange;
1003
+ }()
1004
+ }, {
1005
+ key: "_beforeLogout",
1006
+ value: function _beforeLogout(params) {
1007
+ if (this._canShowDialogs()) {
1008
+ this._showAuthDialog(params);
1009
+ return;
1010
+ }
1011
+ this.logout();
1012
+ }
1013
+ }, {
1014
+ key: "_showAuthDialog",
1015
+ value: function _showAuthDialog() {
1016
+ var _this$user2,
1017
+ _this7 = this,
1018
+ _this$_authDialogServ,
1019
+ _this$_storage8,
1020
+ _this$_storage9;
1021
+ var _ref6 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1022
+ nonInteractive = _ref6.nonInteractive,
1023
+ error = _ref6.error,
1024
+ canCancel = _ref6.canCancel,
1025
+ onTryAgain = _ref6.onTryAgain;
1026
+ var _this$config2 = this.config,
1027
+ embeddedLogin = _this$config2.embeddedLogin,
1028
+ onPostponeLogout = _this$config2.onPostponeLogout,
1029
+ translations = _this$config2.translations;
1030
+ var cancelable = ((_this$user2 = this.user) === null || _this$user2 === void 0 ? void 0 : _this$user2.guest) || canCancel;
1031
+ var actualTranslations = translations !== null && translations !== void 0 ? translations : getTranslations();
1032
+ this._createInitDeferred();
1033
+ var closeDialog = function closeDialog() {
1034
+ /* eslint-disable @typescript-eslint/no-use-before-define */
1035
+ stopTokenListening === null || stopTokenListening === void 0 || stopTokenListening();
1036
+ stopMessageListening === null || stopMessageListening === void 0 || stopMessageListening();
1037
+ hide === null || hide === void 0 || hide();
1038
+ /* eslint-enable @typescript-eslint/no-use-before-define */
1039
+ };
1040
+ var onConfirm = function onConfirm() {
1041
+ if (!embeddedLogin) {
1042
+ closeDialog();
1043
+ _this7.logout();
1044
+ return;
1045
+ }
1046
+ _this7._runEmbeddedLogin();
1047
+ };
1048
+ var onCancel = function onCancel() {
1049
+ var _this7$_embeddedFlow, _this7$_storage, _this7$user;
1050
+ (_this7$_embeddedFlow = _this7._embeddedFlow) === null || _this7$_embeddedFlow === void 0 || _this7$_embeddedFlow.stop();
1051
+ (_this7$_storage = _this7._storage) === null || _this7$_storage === void 0 || _this7$_storage.sendMessage(Auth.CLOSE_WINDOW_MESSAGE, Date.now());
1052
+ closeDialog();
1053
+ if (!cancelable) {
1054
+ var _this7$_initDeferred, _this7$_initDeferred$;
1055
+ (_this7$_initDeferred = _this7._initDeferred) === null || _this7$_initDeferred === void 0 || (_this7$_initDeferred$ = _this7$_initDeferred.resolve) === null || _this7$_initDeferred$ === void 0 || _this7$_initDeferred$.call(_this7$_initDeferred);
1056
+ _this7.listeners.trigger(LOGOUT_POSTPONED_EVENT);
1057
+ onPostponeLogout();
1058
+ return;
1059
+ }
1060
+ if ((_this7$user = _this7.user) !== null && _this7$user !== void 0 && _this7$user.guest && nonInteractive) {
1061
+ _this7.forceTokenUpdate();
1062
+ } else {
1063
+ var _this7$_initDeferred2, _this7$_initDeferred3;
1064
+ (_this7$_initDeferred2 = _this7._initDeferred) === null || _this7$_initDeferred2 === void 0 || (_this7$_initDeferred3 = _this7$_initDeferred2.resolve) === null || _this7$_initDeferred3 === void 0 || _this7$_initDeferred3.call(_this7$_initDeferred2);
1065
+ }
1066
+ };
1067
+ var onTryAgainClick = /*#__PURE__*/function () {
1068
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
1069
+ return _regeneratorRuntime().wrap(function _callee14$(_context14) {
1070
+ while (1) switch (_context14.prev = _context14.next) {
1071
+ case 0:
1072
+ _context14.next = 2;
1073
+ return onTryAgain === null || onTryAgain === void 0 ? void 0 : onTryAgain();
1074
+ case 2:
1075
+ closeDialog();
1076
+ case 3:
1077
+ case "end":
1078
+ return _context14.stop();
1079
+ }
1080
+ }, _callee14);
1081
+ }));
1082
+ return function onTryAgainClick() {
1083
+ return _ref7.apply(this, arguments);
1084
+ };
1085
+ }();
1086
+ var hide = (_this$_authDialogServ = this._authDialogService) === null || _this$_authDialogServ === void 0 ? void 0 : _this$_authDialogServ.call(this, _objectSpread2(_objectSpread2({}, this._service), {}, {
1087
+ loginCaption: actualTranslations.login,
1088
+ loginToCaption: actualTranslations.loginTo,
1089
+ confirmLabel: actualTranslations.login,
1090
+ tryAgainLabel: actualTranslations.tryAgainLabel,
1091
+ cancelLabel: cancelable ? actualTranslations.cancel : actualTranslations.postpone,
1092
+ errorMessage: this._extractErrorMessage(error, true),
1093
+ onConfirm,
1094
+ onCancel,
1095
+ onTryAgain: onTryAgain ? onTryAgainClick : undefined
1096
+ }));
1097
+ var stopTokenListening = (_this$_storage8 = this._storage) === null || _this$_storage8 === void 0 ? void 0 : _this$_storage8.onTokenChange(function (token) {
1098
+ if (token) {
1099
+ var _this7$_initDeferred4, _this7$_initDeferred5;
1100
+ closeDialog();
1101
+ (_this7$_initDeferred4 = _this7._initDeferred) === null || _this7$_initDeferred4 === void 0 || (_this7$_initDeferred5 = _this7$_initDeferred4.resolve) === null || _this7$_initDeferred5 === void 0 || _this7$_initDeferred5.call(_this7$_initDeferred4);
1102
+ }
1103
+ });
1104
+ var stopMessageListening = (_this$_storage9 = this._storage) === null || _this$_storage9 === void 0 ? void 0 : _this$_storage9.onMessage(Auth.CLOSE_WINDOW_MESSAGE, function () {
1105
+ var _this7$_embeddedFlow2;
1106
+ return (_this7$_embeddedFlow2 = _this7._embeddedFlow) === null || _this7$_embeddedFlow2 === void 0 ? void 0 : _this7$_embeddedFlow2.stop();
1107
+ });
1108
+ }
1109
+ }, {
1110
+ key: "_showUserChangedDialog",
1111
+ value: function _showUserChangedDialog(_ref8) {
1112
+ var _this8 = this,
1113
+ _this$_authDialogServ2,
1114
+ _translations$youHave,
1115
+ _newUser$name,
1116
+ _newUser$name2,
1117
+ _translations$login,
1118
+ _translations$loginTo,
1119
+ _translations$applyCh,
1120
+ _translations$tryAgai,
1121
+ _translations$postpon;
1122
+ var newUser = _ref8.newUser,
1123
+ onApply = _ref8.onApply,
1124
+ onPostpone = _ref8.onPostpone;
1125
+ var translations = this.config.translations;
1126
+ this._createInitDeferred();
1127
+ var done = function done() {
1128
+ var _this8$_initDeferred, _this8$_initDeferred$;
1129
+ (_this8$_initDeferred = _this8._initDeferred) === null || _this8$_initDeferred === void 0 || (_this8$_initDeferred$ = _this8$_initDeferred.resolve) === null || _this8$_initDeferred$ === void 0 || _this8$_initDeferred$.call(_this8$_initDeferred);
1130
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
1131
+ hide === null || hide === void 0 || hide();
1132
+ };
1133
+ var hide = (_this$_authDialogServ2 = this._authDialogService) === null || _this$_authDialogServ2 === void 0 ? void 0 : _this$_authDialogServ2.call(this, _objectSpread2(_objectSpread2({}, this._service), {}, {
1134
+ title: (_translations$youHave = translations === null || translations === void 0 ? void 0 : translations.youHaveLoggedInAs) !== null && _translations$youHave !== void 0 ? _translations$youHave : translate('youHaveLoggedInAs').replace('%userName%', (_newUser$name = newUser.name) !== null && _newUser$name !== void 0 ? _newUser$name : '').replace('{{userName}}', (_newUser$name2 = newUser.name) !== null && _newUser$name2 !== void 0 ? _newUser$name2 : ''),
1135
+ loginCaption: (_translations$login = translations === null || translations === void 0 ? void 0 : translations.login) !== null && _translations$login !== void 0 ? _translations$login : translate('login'),
1136
+ loginToCaption: (_translations$loginTo = translations === null || translations === void 0 ? void 0 : translations.loginTo) !== null && _translations$loginTo !== void 0 ? _translations$loginTo : translate('loginTo'),
1137
+ confirmLabel: (_translations$applyCh = translations === null || translations === void 0 ? void 0 : translations.applyChange) !== null && _translations$applyCh !== void 0 ? _translations$applyCh : translate('applyChange'),
1138
+ tryAgainLabel: (_translations$tryAgai = translations === null || translations === void 0 ? void 0 : translations.tryAgainLabel) !== null && _translations$tryAgai !== void 0 ? _translations$tryAgai : translate('tryAgainLabel'),
1139
+ cancelLabel: (_translations$postpon = translations === null || translations === void 0 ? void 0 : translations.postpone) !== null && _translations$postpon !== void 0 ? _translations$postpon : translate('postpone'),
1140
+ onConfirm: function onConfirm() {
1141
+ done();
1142
+ onApply();
1143
+ },
1144
+ onCancel: function onCancel() {
1145
+ done();
1146
+ onPostpone();
1147
+ }
1148
+ }));
1149
+ }
1150
+ }, {
1151
+ key: "_extractErrorMessage",
1152
+ value: function _extractErrorMessage(error) {
1153
+ var logError = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
1154
+ if (!error) {
1155
+ return null;
1156
+ }
1157
+ if (logError) {
1158
+ // eslint-disable-next-line no-console
1159
+ console.error('RingUI Auth error', error);
1160
+ }
1161
+ try {
1162
+ // We've got some error from this list
1163
+ // https://www.jetbrains.com/help/youtrack/devportal/OAuth-2.0-Errors.html
1164
+ if ('code' in error && error.code && typeof error.code === 'object' && 'code' in error.code && typeof error.code.code === 'string') {
1165
+ var readableCode = error.code.code.split('_').join(' ');
1166
+ return "Authorization error: ".concat(readableCode);
1167
+ }
1168
+ } catch (_unused) {
1169
+ // noop
1170
+ }
1171
+ return error.toString ? error.toString() : null;
1172
+ }
1173
+ }, {
1174
+ key: "_showBackendDownDialog",
1175
+ value: function _showBackendDownDialog(backendError) {
1176
+ var _this9 = this;
1177
+ var _this$config3 = this.config,
1178
+ onBackendDown = _this$config3.onBackendDown,
1179
+ translations = _this$config3.translations;
1180
+ var REPEAT_TIMEOUT = 5000;
1181
+ var timerId;
1182
+ return new Promise(function (resolve, reject) {
1183
+ var _this9$_storage2;
1184
+ var done = function done() {
1185
+ var _this9$_storage;
1186
+ /* eslint-disable @typescript-eslint/no-use-before-define */
1187
+ hide();
1188
+ window.removeEventListener('online', onCheckAgain);
1189
+ stopListeningCloseMessage === null || stopListeningCloseMessage === void 0 || stopListeningCloseMessage();
1190
+ /* eslint-enable @typescript-eslint/no-use-before-define */
1191
+ (_this9$_storage = _this9._storage) === null || _this9$_storage === void 0 || _this9$_storage.sendMessage(Auth.CLOSE_BACKEND_DOWN_MESSAGE, Date.now());
1192
+ clearTimeout(timerId);
1193
+ };
1194
+ var stopListeningCloseMessage = (_this9$_storage2 = _this9._storage) === null || _this9$_storage2 === void 0 ? void 0 : _this9$_storage2.onMessage(Auth.CLOSE_BACKEND_DOWN_MESSAGE, function () {
1195
+ stopListeningCloseMessage === null || stopListeningCloseMessage === void 0 || stopListeningCloseMessage();
1196
+ done();
1197
+ resolve();
1198
+ });
1199
+ var onCheckAgain = /*#__PURE__*/function () {
1200
+ var _ref9 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
1201
+ return _regeneratorRuntime().wrap(function _callee15$(_context15) {
1202
+ while (1) switch (_context15.prev = _context15.next) {
1203
+ case 0:
1204
+ _context15.next = 2;
1205
+ return _this9._checkBackendsAreUp();
1206
+ case 2:
1207
+ done();
1208
+ resolve();
1209
+ case 4:
1210
+ case "end":
1211
+ return _context15.stop();
1212
+ }
1213
+ }, _callee15);
1214
+ }));
1215
+ return function onCheckAgain() {
1216
+ return _ref9.apply(this, arguments);
1217
+ };
1218
+ }();
1219
+ var onPostpone = function onPostpone() {
1220
+ done();
1221
+ reject(new Error('Auth(@jetbrains/ring-ui): postponed by user'));
1222
+ };
1223
+ var hide = onBackendDown({
1224
+ onCheckAgain,
1225
+ onPostpone,
1226
+ backendError,
1227
+ translations: translations !== null && translations !== void 0 ? translations : getTranslationsWithFallback()
1228
+ });
1229
+ window.addEventListener('online', onCheckAgain);
1230
+ function networkWatchdog() {
1231
+ if (navigator && navigator.onLine) {
1232
+ onCheckAgain();
1233
+ }
1234
+ timerId = window.setTimeout(networkWatchdog, REPEAT_TIMEOUT);
1235
+ }
1236
+ timerId = window.setTimeout(networkWatchdog, REPEAT_TIMEOUT);
1237
+ });
1238
+ }
1239
+ /**
1240
+ * Wipe accessToken and redirect to auth page with required authorization
1241
+ */
1242
+ }, {
1243
+ key: "logout",
1244
+ value: (function () {
1245
+ var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(extraParams) {
1246
+ var _this$_storage10, _this$_requestBuilder3;
1247
+ var requestParams, authRequest;
1248
+ return _regeneratorRuntime().wrap(function _callee16$(_context16) {
1249
+ while (1) switch (_context16.prev = _context16.next) {
1250
+ case 0:
1251
+ requestParams = _objectSpread2({
1252
+ // eslint-disable-next-line camelcase
1253
+ request_credentials: 'required'
1254
+ }, extraParams);
1255
+ _context16.next = 3;
1256
+ return this._checkBackendsStatusesIfEnabled();
1257
+ case 3:
1258
+ _context16.next = 5;
1259
+ return this.listeners.trigger('logout');
1260
+ case 5:
1261
+ this._updateDomainUser(null);
1262
+ _context16.next = 8;
1263
+ return (_this$_storage10 = this._storage) === null || _this$_storage10 === void 0 ? void 0 : _this$_storage10.wipeToken();
1264
+ case 8:
1265
+ _context16.next = 10;
1266
+ return (_this$_requestBuilder3 = this._requestBuilder) === null || _this$_requestBuilder3 === void 0 ? void 0 : _this$_requestBuilder3.prepareAuthRequest(requestParams);
1267
+ case 10:
1268
+ authRequest = _context16.sent;
1269
+ if (authRequest != null) {
1270
+ this._redirectCurrentPage(authRequest.url);
1271
+ }
1272
+ case 12:
1273
+ case "end":
1274
+ return _context16.stop();
1275
+ }
1276
+ }, _callee16, this);
1277
+ }));
1278
+ function logout(_x7) {
1279
+ return _logout.apply(this, arguments);
1280
+ }
1281
+ return logout;
1282
+ }())
1283
+ }, {
1284
+ key: "_runEmbeddedLogin",
1285
+ value: function () {
1286
+ var _runEmbeddedLogin2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
1287
+ var _this$_storage11;
1288
+ var _this$_embeddedFlow;
1289
+ return _regeneratorRuntime().wrap(function _callee17$(_context17) {
1290
+ while (1) switch (_context17.prev = _context17.next) {
1291
+ case 0:
1292
+ (_this$_storage11 = this._storage) === null || _this$_storage11 === void 0 || _this$_storage11.sendMessage(Auth.CLOSE_WINDOW_MESSAGE, Date.now());
1293
+ _context17.prev = 1;
1294
+ this._isLoginWindowOpen = true;
1295
+ _context17.next = 5;
1296
+ return (_this$_embeddedFlow = this._embeddedFlow) === null || _this$_embeddedFlow === void 0 ? void 0 : _this$_embeddedFlow.authorize();
1297
+ case 5:
1298
+ return _context17.abrupt("return", _context17.sent);
1299
+ case 8:
1300
+ _context17.prev = 8;
1301
+ _context17.t0 = _context17["catch"](1);
1302
+ throw _context17.t0;
1303
+ case 11:
1304
+ _context17.prev = 11;
1305
+ this._isLoginWindowOpen = false;
1306
+ return _context17.finish(11);
1307
+ case 14:
1308
+ case "end":
1309
+ return _context17.stop();
1310
+ }
1311
+ }, _callee17, this, [[1, 8, 11, 14]]);
1312
+ }));
1313
+ function _runEmbeddedLogin() {
1314
+ return _runEmbeddedLogin2.apply(this, arguments);
1315
+ }
1316
+ return _runEmbeddedLogin;
1317
+ }()
1318
+ /**
1319
+ * Wipe accessToken and redirect to auth page to obtain authorization data
1320
+ * if user is logged in or log her in otherwise
1321
+ */
1322
+ }, {
1323
+ key: "login",
1324
+ value: (function () {
1325
+ var _login = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
1326
+ var _this$_backgroundFlow3, accessToken, _user;
1327
+ return _regeneratorRuntime().wrap(function _callee18$(_context18) {
1328
+ while (1) switch (_context18.prev = _context18.next) {
1329
+ case 0:
1330
+ if (!this.config.embeddedLogin) {
1331
+ _context18.next = 4;
1332
+ break;
1333
+ }
1334
+ _context18.next = 3;
1335
+ return this._runEmbeddedLogin();
1336
+ case 3:
1337
+ return _context18.abrupt("return");
1338
+ case 4:
1339
+ _context18.next = 6;
1340
+ return this._checkBackendsStatusesIfEnabled();
1341
+ case 6:
1342
+ _context18.prev = 6;
1343
+ _context18.next = 9;
1344
+ return (_this$_backgroundFlow3 = this._backgroundFlow) === null || _this$_backgroundFlow3 === void 0 ? void 0 : _this$_backgroundFlow3.authorize();
1345
+ case 9:
1346
+ accessToken = _context18.sent;
1347
+ _context18.next = 12;
1348
+ return this.getUser(accessToken);
1349
+ case 12:
1350
+ _user = _context18.sent;
1351
+ if (_user.guest) {
1352
+ this._beforeLogout();
1353
+ } else {
1354
+ this.user = _user;
1355
+ this.listeners.trigger(USER_CHANGED_EVENT, _user);
1356
+ }
1357
+ _context18.next = 19;
1358
+ break;
1359
+ case 16:
1360
+ _context18.prev = 16;
1361
+ _context18.t0 = _context18["catch"](6);
1362
+ this._beforeLogout();
1363
+ case 19:
1364
+ case "end":
1365
+ return _context18.stop();
1366
+ }
1367
+ }, _callee18, this, [[6, 16]]);
1368
+ }));
1369
+ function login() {
1370
+ return _login.apply(this, arguments);
1371
+ }
1372
+ return login;
1373
+ }())
1374
+ }, {
1375
+ key: "switchUser",
1376
+ value: function () {
1377
+ var _switchUser = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
1378
+ return _regeneratorRuntime().wrap(function _callee19$(_context19) {
1379
+ while (1) switch (_context19.prev = _context19.next) {
1380
+ case 0:
1381
+ if (this.config.embeddedLogin) {
1382
+ _context19.next = 2;
1383
+ break;
1384
+ }
1385
+ throw new Error('Auth: switchUser only supported for "embeddedLogin" mode');
1386
+ case 2:
1387
+ _context19.next = 4;
1388
+ return this._runEmbeddedLogin();
1389
+ case 4:
1390
+ case "end":
1391
+ return _context19.stop();
1392
+ }
1393
+ }, _callee19, this);
1394
+ }));
1395
+ function switchUser() {
1396
+ return _switchUser.apply(this, arguments);
1397
+ }
1398
+ return switchUser;
1399
+ }()
1400
+ }, {
1401
+ key: "_makeStateFromResponse",
1402
+ value: function _makeStateFromResponse(authResponse) {
1403
+ var state = authResponse.state;
1404
+ if (!state) {
1405
+ return {};
1406
+ }
1407
+ var defaultScope = this.config.scope;
1408
+ try {
1409
+ var urlFromState = new URL(state); // checking if state contains valid URL on same origin, see HUB-11514
1410
+ if (urlFromState.origin !== window.location.origin) {
1411
+ return {};
1412
+ }
1413
+ return {
1414
+ restoreLocation: state,
1415
+ created: Date.now(),
1416
+ scopes: defaultScope
1417
+ };
1418
+ } catch (e) {
1419
+ return {};
1420
+ }
1421
+ }
1422
+ /**
1423
+ * Check if the hash contains an access token.
1424
+ * If it does, extract the state, compare with
1425
+ * config, and store the auth response for later use.
1426
+ *
1427
+ * @return {Promise} promise that is resolved to restoreLocation URL, or rejected
1428
+ * @private
1429
+ */
1430
+ }, {
1431
+ key: "_checkForAuthResponse",
1432
+ value: (function () {
1433
+ var _checkForAuthResponse2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
1434
+ var _this$_storage12;
1435
+ var authResponse, _this$config4, defaultScope, defaultExpiresIn, cleanHash, stateId, scope, expiresIn, accessToken, newState, scopes, effectiveExpiresIn, expires, _this$_storage13;
1436
+ return _regeneratorRuntime().wrap(function _callee20$(_context20) {
1437
+ while (1) switch (_context20.prev = _context20.next) {
1438
+ case 0:
1439
+ // getAuthResponseURL may throw an exception
1440
+ authResponse = this._responseParser.getAuthResponseFromURL();
1441
+ _this$config4 = this.config, defaultScope = _this$config4.scope, defaultExpiresIn = _this$config4.defaultExpiresIn, cleanHash = _this$config4.cleanHash;
1442
+ if (authResponse && cleanHash) {
1443
+ this.setHash('');
1444
+ }
1445
+ if (authResponse) {
1446
+ _context20.next = 5;
1447
+ break;
1448
+ }
1449
+ return _context20.abrupt("return", undefined);
1450
+ case 5:
1451
+ stateId = authResponse.state, scope = authResponse.scope, expiresIn = authResponse.expiresIn, accessToken = authResponse.accessToken;
1452
+ _context20.next = 8;
1453
+ return stateId && ((_this$_storage12 = this._storage) === null || _this$_storage12 === void 0 ? void 0 : _this$_storage12.getState(stateId));
1454
+ case 8:
1455
+ _context20.t0 = _context20.sent;
1456
+ if (_context20.t0) {
1457
+ _context20.next = 11;
1458
+ break;
1459
+ }
1460
+ _context20.t0 = this._makeStateFromResponse(authResponse);
1461
+ case 11:
1462
+ newState = _context20.t0;
1463
+ scopes = scope ? scope.split(' ') : newState.scopes || defaultScope || [];
1464
+ effectiveExpiresIn = expiresIn ? parseInt(expiresIn, 10) : defaultExpiresIn;
1465
+ expires = TokenValidator._epoch() + effectiveExpiresIn;
1466
+ if (!(accessToken != null)) {
1467
+ _context20.next = 18;
1468
+ break;
1469
+ }
1470
+ _context20.next = 18;
1471
+ return (_this$_storage13 = this._storage) === null || _this$_storage13 === void 0 ? void 0 : _this$_storage13.saveToken({
1472
+ accessToken,
1473
+ scopes,
1474
+ expires,
1475
+ lifeTime: effectiveExpiresIn
1476
+ });
1477
+ case 18:
1478
+ return _context20.abrupt("return", newState);
1479
+ case 19:
1480
+ case "end":
1481
+ return _context20.stop();
1482
+ }
1483
+ }, _callee20, this);
1484
+ }));
1485
+ function _checkForAuthResponse() {
1486
+ return _checkForAuthResponse2.apply(this, arguments);
1487
+ }
1488
+ return _checkForAuthResponse;
1489
+ }())
1490
+ }, {
1491
+ key: "_checkForStateRestoration",
1492
+ value: function () {
1493
+ var _checkForStateRestoration2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
1494
+ var _this$_storage14;
1495
+ var authResponse, stateId;
1496
+ return _regeneratorRuntime().wrap(function _callee21$(_context21) {
1497
+ while (1) switch (_context21.prev = _context21.next) {
1498
+ case 0:
1499
+ authResponse = this._responseParser._authResponse;
1500
+ if (authResponse && this.config.cleanHash) {
1501
+ this.setHash('');
1502
+ }
1503
+ stateId = authResponse === null || authResponse === void 0 ? void 0 : authResponse.restoreAuthState;
1504
+ _context21.next = 5;
1505
+ return stateId && ((_this$_storage14 = this._storage) === null || _this$_storage14 === void 0 ? void 0 : _this$_storage14.getState(stateId));
1506
+ case 5:
1507
+ _context21.t0 = _context21.sent;
1508
+ if (_context21.t0) {
1509
+ _context21.next = 8;
1510
+ break;
1511
+ }
1512
+ _context21.t0 = {};
1513
+ case 8:
1514
+ return _context21.abrupt("return", _context21.t0);
1515
+ case 9:
1516
+ case "end":
1517
+ return _context21.stop();
1518
+ }
1519
+ }, _callee21, this);
1520
+ }));
1521
+ function _checkForStateRestoration() {
1522
+ return _checkForStateRestoration2.apply(this, arguments);
1523
+ }
1524
+ return _checkForStateRestoration;
1525
+ }()
1526
+ }, {
1527
+ key: "_checkBackendsAreUp",
1528
+ value: function _checkBackendsAreUp() {
1529
+ var abortCtrl = new AbortController();
1530
+ var backendCheckTimeout = this.config.backendCheckTimeout;
1531
+ return Promise.all([promiseWithTimeout(this.http.fetch('settings/public?fields=id', {
1532
+ signal: abortCtrl.signal
1533
+ }), backendCheckTimeout, {
1534
+ error: new Error('The authorization server is taking too long to respond. Please try again later.'),
1535
+ onTimeout: function onTimeout() {
1536
+ return abortCtrl.abort();
1537
+ }
1538
+ }), this.config.checkBackendIsUp()]).catch(function (err) {
1539
+ if (err instanceof TypeError) {
1540
+ throw new TypeError('Could not connect to the server due to network error. Please check your connection and try again.');
1541
+ }
1542
+ throw err;
1543
+ });
1544
+ }
1545
+ }, {
1546
+ key: "_checkBackendsStatusesIfEnabled",
1547
+ value: function () {
1548
+ var _checkBackendsStatusesIfEnabled2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
1549
+ return _regeneratorRuntime().wrap(function _callee22$(_context22) {
1550
+ while (1) switch (_context22.prev = _context22.next) {
1551
+ case 0:
1552
+ if (this.config.enableBackendStatusCheck) {
1553
+ _context22.next = 2;
1554
+ break;
1555
+ }
1556
+ return _context22.abrupt("return");
1557
+ case 2:
1558
+ _context22.prev = 2;
1559
+ _context22.next = 5;
1560
+ return this._checkBackendsAreUp();
1561
+ case 5:
1562
+ _context22.next = 12;
1563
+ break;
1564
+ case 7:
1565
+ _context22.prev = 7;
1566
+ _context22.t0 = _context22["catch"](2);
1567
+ if (!(_context22.t0 instanceof Error)) {
1568
+ _context22.next = 12;
1569
+ break;
1570
+ }
1571
+ _context22.next = 12;
1572
+ return this._showBackendDownDialog(_context22.t0);
1573
+ case 12:
1574
+ case "end":
1575
+ return _context22.stop();
1576
+ }
1577
+ }, _callee22, this, [[2, 7]]);
1578
+ }));
1579
+ function _checkBackendsStatusesIfEnabled() {
1580
+ return _checkBackendsStatusesIfEnabled2.apply(this, arguments);
1581
+ }
1582
+ return _checkBackendsStatusesIfEnabled;
1583
+ }()
1584
+ /**
1585
+ * Adds preconnect tag to help browser to establish connection to URL.
1586
+ * See https://w3c.github.io/resource-hints/
1587
+ * @param url Url to preconnect to.
1588
+ */
1589
+ }, {
1590
+ key: "setUpPreconnect",
1591
+ value: function setUpPreconnect(url) {
1592
+ var linkNode = document.createElement('link');
1593
+ linkNode.rel = 'preconnect';
1594
+ linkNode.href = url;
1595
+ linkNode.pr = '1.0';
1596
+ linkNode.crossOrigin = 'use-credentials';
1597
+ document.head.appendChild(linkNode);
1598
+ }
1599
+ /**
1600
+ * Redirects current page to the given URL
1601
+ * @param {string} url
1602
+ * @private
1603
+ */
1604
+ }, {
1605
+ key: "_redirectCurrentPage",
1606
+ value: function _redirectCurrentPage(url) {
1607
+ {
1608
+ window.location.href = fixUrl(url);
1609
+ }
1610
+ }
1611
+ /**
1612
+ * Reloads current page
1613
+ */
1614
+ }, {
1615
+ key: "_reloadCurrentPage",
1616
+ value: function _reloadCurrentPage() {
1617
+ this._redirectCurrentPage(window.location.href);
1618
+ }
1619
+ }, {
1620
+ key: "_canShowDialogs",
1621
+ value: function _canShowDialogs() {
1622
+ return this.config.embeddedLogin && this._authDialogService;
1623
+ }
1624
+ /**
1625
+ * Sets the location hash
1626
+ * @param {string} hash
1627
+ */
1628
+ }, {
1629
+ key: "setHash",
1630
+ value: function setHash(hash) {
1631
+ if (history.replaceState) {
1632
+ // NB! History.replaceState is used here, because Firefox saves
1633
+ // a record in history.
1634
+ // NB! URL to redirect is formed manually because baseURI could be messed up,
1635
+ // in which case it's not obvious where redirect will lead.
1636
+ var cleanedUrl = [window.location.pathname, window.location.search].join('');
1637
+ var hashIfExist = hash ? "#".concat(hash) : '';
1638
+ history.replaceState(undefined, '', "".concat(cleanedUrl).concat(hashIfExist));
1639
+ } else {
1640
+ window.location.hash = hash;
1641
+ }
1642
+ }
1643
+ }]);
1644
+ return Auth;
1645
+ }();
1646
+ _defineProperty(Auth, "DEFAULT_CONFIG", DEFAULT_CONFIG);
1647
+ _defineProperty(Auth, "API_PATH", 'api/rest/');
1648
+ _defineProperty(Auth, "API_AUTH_PATH", 'oauth2/auth');
1649
+ _defineProperty(Auth, "API_PROFILE_PATH", 'users/me');
1650
+ _defineProperty(Auth, "CLOSE_BACKEND_DOWN_MESSAGE", 'backend-check-succeeded');
1651
+ _defineProperty(Auth, "CLOSE_WINDOW_MESSAGE", 'close-login-window');
1652
+ _defineProperty(Auth, "shouldRefreshToken", TokenValidator.shouldRefreshToken);
1653
+ _defineProperty(Auth, "storageIsUnavailable", !navigator.cookieEnabled);
1654
+
1655
+ export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT, Auth as default };