@iapps/ng-dhis2-ui 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +7 -0
  2. package/esm2022/iapps-ng-dhis2-ui.mjs +5 -0
  3. package/esm2022/index.mjs +5 -0
  4. package/esm2022/lib/modules/app-shell/app-shell.component.mjs +33 -0
  5. package/esm2022/lib/modules/app-shell/app-shell.module.mjs +19 -0
  6. package/esm2022/lib/modules/app-shell/index.mjs +6 -0
  7. package/esm2022/lib/modules/button/button.component.mjs +55 -0
  8. package/esm2022/lib/modules/button/button.module.mjs +19 -0
  9. package/esm2022/lib/modules/button/index.mjs +6 -0
  10. package/esm2022/lib/modules/header-bar/header-bar.component.mjs +39 -0
  11. package/esm2022/lib/modules/header-bar/header-bar.module.mjs +19 -0
  12. package/esm2022/lib/modules/header-bar/index.mjs +6 -0
  13. package/esm2022/lib/modules/header-bar/models/header-bar-app.model.mjs +20 -0
  14. package/esm2022/lib/modules/header-bar/models/header-bar-data.model.mjs +46 -0
  15. package/esm2022/lib/modules/header-bar/models/header-bar-notification.model.mjs +11 -0
  16. package/esm2022/lib/modules/header-bar/models/index.mjs +6 -0
  17. package/esm2022/lib/modules/header-bar/utils/apps.mjs +221 -0
  18. package/esm2022/lib/modules/header-bar/utils/debug-info/debug-info-menu-item.mjs +51 -0
  19. package/esm2022/lib/modules/header-bar/utils/debug-info/debug-info-modal.mjs +30 -0
  20. package/esm2022/lib/modules/header-bar/utils/debug-info/debug-info-table.mjs +39 -0
  21. package/esm2022/lib/modules/header-bar/utils/debug-info/use-debug-info.mjs +12 -0
  22. package/esm2022/lib/modules/header-bar/utils/header-bar-context.mjs +17 -0
  23. package/esm2022/lib/modules/header-bar/utils/header-bar.mjs +56 -0
  24. package/esm2022/lib/modules/header-bar/utils/join-path.mjs +5 -0
  25. package/esm2022/lib/modules/header-bar/utils/logo-image.mjs +52 -0
  26. package/esm2022/lib/modules/header-bar/utils/logo.mjs +35 -0
  27. package/esm2022/lib/modules/header-bar/utils/notification-icon.mjs +76 -0
  28. package/esm2022/lib/modules/header-bar/utils/notifications.mjs +35 -0
  29. package/esm2022/lib/modules/header-bar/utils/profile/use-on-doc-click.mjs +21 -0
  30. package/esm2022/lib/modules/header-bar/utils/profile-menu/index.mjs +2 -0
  31. package/esm2022/lib/modules/header-bar/utils/profile-menu/profile-header.mjs +95 -0
  32. package/esm2022/lib/modules/header-bar/utils/profile-menu/profile-menu.mjs +101 -0
  33. package/esm2022/lib/modules/header-bar/utils/profile-menu/update-notification.mjs +54 -0
  34. package/esm2022/lib/modules/header-bar/utils/profile.mjs +58 -0
  35. package/esm2022/lib/modules/header-bar/utils/title.mjs +22 -0
  36. package/esm2022/lib/ng-dhis2-ui.module.mjs +15 -0
  37. package/esm2022/lib/shared/components/index.mjs +7 -0
  38. package/esm2022/lib/shared/components/react-component-wrapper/react-wrapper.component.mjs +53 -0
  39. package/esm2022/lib/shared/shared.module.mjs +18 -0
  40. package/fesm2022/iapps-ng-dhis2-ui.mjs +1239 -0
  41. package/fesm2022/iapps-ng-dhis2-ui.mjs.map +1 -0
  42. package/index.d.ts +4 -0
  43. package/lib/modules/app-shell/app-shell.component.d.ts +8 -0
  44. package/lib/modules/app-shell/app-shell.module.d.ts +9 -0
  45. package/lib/modules/app-shell/index.d.ts +2 -0
  46. package/lib/modules/button/button.component.d.ts +19 -0
  47. package/lib/modules/button/button.module.d.ts +9 -0
  48. package/lib/modules/button/index.d.ts +2 -0
  49. package/lib/modules/header-bar/header-bar.component.d.ts +14 -0
  50. package/lib/modules/header-bar/header-bar.module.d.ts +9 -0
  51. package/lib/modules/header-bar/index.d.ts +2 -0
  52. package/lib/modules/header-bar/models/header-bar-app.model.d.ts +10 -0
  53. package/lib/modules/header-bar/models/header-bar-data.model.d.ts +16 -0
  54. package/lib/modules/header-bar/models/header-bar-notification.model.d.ts +5 -0
  55. package/lib/modules/header-bar/models/index.d.ts +2 -0
  56. package/lib/modules/header-bar/utils/apps.d.ts +16 -0
  57. package/lib/modules/header-bar/utils/debug-info/debug-info-menu-item.d.ts +15 -0
  58. package/lib/modules/header-bar/utils/debug-info/debug-info-modal.d.ts +8 -0
  59. package/lib/modules/header-bar/utils/debug-info/debug-info-table.d.ts +8 -0
  60. package/lib/modules/header-bar/utils/debug-info/use-debug-info.d.ts +7 -0
  61. package/lib/modules/header-bar/utils/header-bar-context.d.ts +14 -0
  62. package/lib/modules/header-bar/utils/header-bar.d.ts +19 -0
  63. package/lib/modules/header-bar/utils/join-path.d.ts +1 -0
  64. package/lib/modules/header-bar/utils/logo-image.d.ts +8 -0
  65. package/lib/modules/header-bar/utils/logo.d.ts +12 -0
  66. package/lib/modules/header-bar/utils/notification-icon.d.ts +21 -0
  67. package/lib/modules/header-bar/utils/notifications.d.ts +16 -0
  68. package/lib/modules/header-bar/utils/profile/use-on-doc-click.d.ts +1 -0
  69. package/lib/modules/header-bar/utils/profile-menu/index.d.ts +1 -0
  70. package/lib/modules/header-bar/utils/profile-menu/profile-header.d.ts +16 -0
  71. package/lib/modules/header-bar/utils/profile-menu/profile-menu.d.ts +13 -0
  72. package/lib/modules/header-bar/utils/profile-menu/update-notification.d.ts +14 -0
  73. package/lib/modules/header-bar/utils/profile.d.ts +18 -0
  74. package/lib/modules/header-bar/utils/title.d.ts +15 -0
  75. package/lib/ng-dhis2-ui.module.d.ts +7 -0
  76. package/lib/shared/components/index.d.ts +3 -0
  77. package/lib/shared/components/react-component-wrapper/react-wrapper.component.d.ts +19 -0
  78. package/lib/shared/shared.module.d.ts +7 -0
  79. package/package.json +38 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"iapps-ng-dhis2-ui.mjs","sources":["../../../ng-dhis2-ui/src/lib/ng-dhis2-ui.module.ts","../../../ng-dhis2-ui/src/lib/shared/components/react-component-wrapper/react-wrapper.component.tsx","../../../ng-dhis2-ui/src/lib/shared/components/index.ts","../../../ng-dhis2-ui/src/lib/shared/shared.module.ts","../../../ng-dhis2-ui/src/lib/modules/header-bar/models/header-bar-app.model.ts","../../../ng-dhis2-ui/src/lib/modules/header-bar/models/header-bar-notification.model.ts","../../../ng-dhis2-ui/src/lib/modules/header-bar/models/header-bar-data.model.ts","../../../ng-dhis2-ui/src/lib/modules/header-bar/models/index.ts","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/join-path.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/apps.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/logo-image.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/logo.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/notification-icon.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/notifications.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/debug-info/use-debug-info.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/debug-info/debug-info-table.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/debug-info/debug-info-modal.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/debug-info/debug-info-menu-item.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/profile-menu/profile-header.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/header-bar-context.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/profile-menu/update-notification.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/profile-menu/profile-menu.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/profile/use-on-doc-click.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/profile.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/title.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/utils/header-bar.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/header-bar.component.tsx","../../../ng-dhis2-ui/src/lib/modules/header-bar/header-bar.module.ts","../../../ng-dhis2-ui/src/lib/modules/header-bar/index.ts","../../../ng-dhis2-ui/src/lib/modules/button/button.component.tsx","../../../ng-dhis2-ui/src/lib/modules/button/button.module.ts","../../../ng-dhis2-ui/src/lib/modules/button/index.ts","../../../ng-dhis2-ui/src/lib/modules/app-shell/app-shell.component.tsx","../../../ng-dhis2-ui/src/lib/modules/app-shell/app-shell.module.ts","../../../ng-dhis2-ui/src/lib/modules/app-shell/index.ts","../../../ng-dhis2-ui/src/iapps-ng-dhis2-ui.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\n@NgModule({\n imports: [CommonModule],\n})\nexport class NgDhis2UiModule {}\n","import {\n AfterViewInit,\n Component,\n ContentChild,\n Directive,\n ElementRef,\n Input,\n OnChanges,\n OnDestroy,\n} from '@angular/core';\nimport parse from 'html-react-parser';\nimport * as React from 'react';\nimport { ComponentProps } from 'react';\nimport * as ReactDOM from 'react-dom/client';\n(window as any).React = React;\n\n@Directive({\n selector: 'ng-dhis2-ui-wrapper',\n})\nexport class ReactWrapperComponent\n implements OnChanges, OnDestroy, AfterViewInit\n{\n @Input() props?: ComponentProps<any>;\n @Input() component!: React.ElementType;\n\n @ContentChild('ngDhis2UiContent') content!: ElementRef<HTMLElement>;\n protected reactDomRoot?: ReactDOM.Root;\n\n constructor(protected elementRef: ElementRef<HTMLElement>) {}\n\n ngAfterViewInit() {\n if (!this.elementRef) throw new Error('No element ref');\n this.reactDomRoot = ReactDOM.createRoot(this.elementRef.nativeElement);\n this.render();\n }\n\n ngOnChanges(): void {\n if (this.elementRef) this.render();\n }\n\n ngOnDestroy() {\n this.reactDomRoot?.unmount();\n }\n\n protected render() {\n if (!this.component) throw new Error('React component must be supplied');\n\n if (!this.reactDomRoot) return;\n\n const jsxContent = this.content?.nativeElement?.outerHTML\n ? parse(this.content?.nativeElement?.outerHTML)\n : undefined;\n\n this.reactDomRoot.render(\n <this.component {...this.props}> {jsxContent || ''} </this.component>\n );\n }\n}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nimport { ReactWrapperComponent } from './react-component-wrapper/react-wrapper.component';\n\nexport const sharedComponents: any[] = [];\n\nexport { ReactWrapperComponent };\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { sharedComponents } from './components';\n\n@NgModule({\n imports: [CommonModule],\n declarations: [...sharedComponents],\n exports: [...sharedComponents],\n})\nexport class SharedDhis2UiModule {}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nexport class HeaderBarApp {\n name!: string;\n namespace!: string;\n defaultAction!: string;\n displayName!: string;\n icon!: string;\n description!: string;\n\n constructor(module: Record<string, unknown>) {\n this.name = module['name'] as string;\n this.namespace = module['namespace'] as string;\n this.defaultAction = this.getPath(module['defaultAction'] as string);\n this.icon = this.getPath(module['icon'] as string);\n this.displayName = module['displayName'] as string;\n this.description = module['description'] as string;\n }\n\n getPath(item: string) {\n if (item?.startsWith('../')) {\n return '../../' + item;\n }\n return item;\n }\n}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nexport class HeaderBarNotification {\n unreadInterpretations?: number;\n unreadMessageConversations?: number;\n\n constructor(notification: Record<string, number>) {\n this.unreadInterpretations = notification['unreadInterpretations'];\n this.unreadMessageConversations =\n notification['unreadMessageConversations'];\n }\n}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\nimport { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';\nimport { Observable, catchError, map, of, zip } from 'rxjs';\nimport { HeaderBarApp } from './header-bar-app.model';\nimport { HeaderBarNotification } from './header-bar-notification.model';\n\nexport class HeaderBarData {\n apps!: HeaderBarApp[];\n title!: string;\n help: any;\n notifications!: HeaderBarNotification;\n user!: Record<string, unknown>;\n\n constructor(private httpClient: NgxDhis2HttpClientService) {}\n\n getApps(): Observable<HeaderBarApp[]> {\n return this.httpClient\n .get('dhis-web-commons/menu/getModules.action', {\n useRootUrl: true,\n })\n .pipe(\n catchError(() =>\n of({\n modules: [],\n })\n ),\n map((result: { modules: Record<string, unknown>[] }) => {\n return (result?.modules || [])\n .map((module: Record<string, unknown>) => new HeaderBarApp(module))\n .filter((headerBarApp) => headerBarApp);\n })\n );\n }\n\n getNotifications(): Observable<HeaderBarNotification | null> {\n return this.httpClient\n .get('me/dashboard')\n .pipe(\n map((notifications: Record<string, number>) =>\n notifications ? new HeaderBarNotification(notifications) : null\n )\n );\n }\n\n get(): Observable<HeaderBarData | null> {\n return zip(\n this.getApps(),\n this.httpClient.get('systemSettings/helpPageLink'),\n this.httpClient.get('me/dashboard'),\n this.httpClient.get('systemSettings/applicationTitle'),\n this.httpClient.get(\n 'me.json?fields=authorities,avatar,email,name,settings'\n )\n ).pipe(\n map(\n (response: [HeaderBarApp[], any, HeaderBarNotification, any, any]) => {\n if (response) {\n const [apps, help, notifications, title, user] = response;\n this.apps = apps;\n this.help = help;\n this.notifications = notifications;\n this.title = title as string;\n this.user = user;\n\n return this;\n }\n\n return null;\n }\n ),\n catchError(() => {\n return of(null);\n })\n );\n }\n}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nexport * from './header-bar-data.model';\nexport * from './header-bar-app.model';\n","export const joinPath = (...parts: any[]) => {\n const realParts = parts.filter((part) => !!part)\n return realParts.map((part) => part.replace(/^\\/+|\\/+$/g, '')).join('/')\n}\n","import { Card } from '@dhis2-ui/card';\nimport { InputField } from '@dhis2-ui/input';\nimport { useConfig } from '@dhis2/app-runtime';\nimport { colors, spacers, theme } from '@dhis2/ui-constants';\nimport { IconApps24, IconSettings24 } from '@dhis2/ui-icons';\nimport PropTypes from 'prop-types';\nimport React, { useState, useEffect, useCallback, useRef } from 'react';\nimport { joinPath } from './join-path';\nimport i18n from '@dhis2/d2-i18n';\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n}\n\n/**\n * Copied from here:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping\n */\nfunction escapeRegExpCharacters(text: string) {\n return text.replace(/[/.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\nfunction Search({ value, onChange, baseUrl }: any) {\n return (\n <div className=\"headerbar-apps-search\">\n <span className=\"headerbar-apps-search-input\">\n <InputField\n value={value}\n name=\"filter\"\n placeholder={i18n.t('Search apps')}\n onChange={onChange}\n initialFocus\n />\n </span>\n\n <span className=\"headerbar-apps-search-icon\">\n <a href={joinPath(baseUrl, 'dhis-web-menu-management')}>\n <IconSettings24 color={colors.grey700} />\n </a>\n </span>\n\n <style jsx>{`\n .headerbar-apps-search {\n display: flex;\n flex-direction: row;\n flex-wrap: nowrap;\n height: 52px;\n margin: 8px;\n }\n\n .headerbar-apps-search-input {\n flex: 1 100%;\n }\n\n .headerbar-apps-search-icon {\n flex: 1 auto;\n margin: 8px;\n }\n `}</style>\n </div>\n );\n}\n\nSearch.propTypes = {\n value: PropTypes.string.isRequired,\n onChange: PropTypes.func.isRequired,\n baseUrl: PropTypes.string,\n};\n\nfunction Item({ name, path, img }: any) {\n return (\n <a className=\"headerbar-app-item\" href={path}>\n <img className=\"headerbar-app-item-logo\" src={img} alt=\"app logo\" />\n\n <div className=\"headerbar-app-item-title\">{name}</div>\n\n <style jsx>{`\n .headerbar-app-item {\n display: flex;\n flex-direction: column;\n -webkit-box-align: center;\n align-items: center;\n -webkit-box-pack: center;\n justify-content: center;\n width: 96px;\n margin: 8px;\n border-radius: 12px;\n text-decoration: none;\n cursor: pointer;\n }\n .headerbar-app-item-logo {\n display: inline-block;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n width: 96px;\n margin: 8px;\n border-radius: 12px;\n text-decoration: none;\n cursor: pointer;\n }\n\n .headerbar-app-item-logo:hover,\n .headerbar-app-item-logo:focus {\n background-color: ${theme.primary050};\n cursor: pointer;\n }\n\n .headerbar-app-item-logo:hover > div {\n font-weight: 500;\n cursor: pointer;\n }\n\n .headerbar-app-item-logo {\n width: 48px;\n height: 48px;\n margin: 8px;\n cursor: pointer;\n }\n\n .headerbar-app-item-title {\n overflow-wrap: anywhere;\n margin-top: 14px;\n color: rgba(0, 0, 0, 0.87);\n font-size: 12px;\n letter-spacing: 0.01em;\n line-height: 14px;\n text-align: center;\n cursor: pointer;\n }\n `}</style>\n </a>\n );\n}\n\nItem.propTypes = {\n img: PropTypes.string,\n name: PropTypes.string,\n path: PropTypes.string,\n};\n\nfunction List({ apps, filter }: any) {\n return (\n <div\n className=\"headerbar-apps-menu-list\"\n data-test=\"headerbar-apps-menu-list\"\n >\n {apps\n .filter(({ displayName, name }: any) => {\n const appName = displayName || name;\n const formattedAppName = appName.toLowerCase();\n const formattedFilter = escapeRegExpCharacters(filter).toLowerCase();\n\n return filter.length > 0\n ? formattedAppName.match(formattedFilter)\n : true;\n })\n .map(({ displayName, name, defaultAction, icon }: any, idx: string) => (\n <Item\n key={`app-${name}-${idx}`}\n name={displayName || name}\n path={defaultAction}\n img={icon}\n />\n ))}\n\n <style jsx>{`\n .headerbar-apps-menu-list {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n align-content: flex-start;\n align-items: flex-start;\n justify-content: flex-start;\n width: 30vw;\n min-width: 300px;\n max-width: 560px;\n\n min-height: 200px;\n max-height: 465px;\n margin: 0 8px 8px 8px;\n\n overflow: auto;\n overflow-x: hidden;\n }\n `}</style>\n </div>\n );\n}\nList.propTypes = {\n apps: PropTypes.array,\n filter: PropTypes.string,\n};\n\nconst AppMenu = ({ apps, filter, onFilterChange, baseUrl }: any) => (\n <div className=\"headerbar-apps-menu\" data-test=\"headerbar-apps-menu\">\n <Card>\n <Search value={filter} onChange={onFilterChange} baseUrl={baseUrl} />\n <List apps={apps} filter={filter} />\n </Card>\n\n <style jsx>{`\n .headerbar-apps-menu {\n z-index: 10000;\n position: absolute;\n right: -4px;\n }\n `}</style>\n </div>\n);\n\nAppMenu.propTypes = {\n apps: PropTypes.array.isRequired,\n onFilterChange: PropTypes.func.isRequired,\n filter: PropTypes.string,\n baseUrl: PropTypes.string,\n};\n\nconst Apps = ({ apps, baseUrl }: any) => {\n const [show, setShow] = useState(false);\n const [filter, setFilter] = useState('');\n\n const handleVisibilityToggle = useCallback(() => setShow(!show), [show]);\n const handleFilterChange = useCallback(\n ({ value }: any) => setFilter(value),\n []\n );\n\n const containerEl = useRef(null);\n const onDocClick = useCallback((evt: any) => {\n if (\n containerEl.current &&\n !(containerEl.current as any).contains(evt.target)\n ) {\n setShow(false);\n }\n }, []);\n useEffect(() => {\n document.addEventListener('click', onDocClick);\n return () => document.removeEventListener('click', onDocClick);\n }, [onDocClick]);\n\n return (\n <div\n className=\"headerbar-apps\"\n ref={containerEl}\n data-test=\"headerbar-apps\"\n >\n <button onClick={handleVisibilityToggle} data-test=\"headerbar-apps-icon\">\n <IconApps24 color={colors.white} />\n </button>\n\n {show ? (\n <AppMenu\n apps={apps}\n filter={filter}\n baseUrl={baseUrl}\n onFilterChange={handleFilterChange}\n />\n ) : null}\n\n <style jsx>{`\n .headerbar-apps button {\n display: block;\n background: transparent;\n padding: ${spacers.dp4} ${spacers.dp12} 0;\n border: 0;\n cursor: pointer;\n height: 100%;\n }\n .headerbar-apps button:focus {\n outline: 2px solid white;\n outline-offset: -2px;\n }\n .headerbar-apps button:focus:not(:focus-visible) {\n outline: none;\n }\n .headerbar-apps button:hover {\n background: #1a557f;\n }\n .headerbar-apps button:active {\n background: #104067;\n }\n\n .headerbar-apps {\n position: relative;\n height: 100%;\n }\n `}</style>\n </div>\n );\n};\n\nApps.propTypes = {\n apps: PropTypes.array.isRequired,\n baseUrl: PropTypes.string,\n};\n\nexport default Apps;\n","import { LogoIconWhite } from '@dhis2-ui/logo'\nimport { useDataQuery } from '@dhis2/app-runtime'\nimport React from 'react'\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n }\n\nconst query = {\n customLogo: {\n resource: 'staticContent/logo_banner',\n },\n}\n\nconst pathExists = (data: any) =>\n data &&\n data.customLogo &&\n data.customLogo.images &&\n data.customLogo.images.png\n\nexport const LogoImage = () => {\n const { loading, error, data } = useDataQuery(query) as any;\n\n \n if (loading) {\n return null\n }\n\n let Logo\n if (!error && pathExists(data)) {\n \n Logo = (\n <img\n alt=\"Headerbar Logo\"\n src={data.customLogo.images.png}\n \n />\n \n )\n } else {\n \n Logo = <LogoIconWhite />\n\n }\n\n return (\n <div className=\"header-bar-logo\">\n {Logo}\n <style jsx>{`\n .header-bar-logo {\n min-width: 48px;\n max-width: 250px;\n height: 48px;\n display: flex;\n -webkit-box-pack: center;\n justify-content: center;\n -webkit-box-align: center;\n align-items: center;\n overflow: hidden;\n }\n\n .header-bar-logo svg {\n height: 25px;\n width: 27px;\n }\n \n .header-bar-logo img {\n max-height: 100%;\n min-height: auto;\n width: auto;\n }\n `}</style>\n </div>\n )\n}\n","import { useConfig } from '@dhis2/app-runtime';\nimport React from 'react';\nimport { LogoImage } from './logo-image';\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n}\n\ninterface LogoProp {\n baseUrl: string;\n}\n\nexport const Logo = ({ baseUrl }: LogoProp) => {\n return (\n <div className=\"headerbar-logo\" data-test=\"headerbar-logo\">\n <a href={baseUrl}>\n <LogoImage />\n </a>\n\n <style jsx>{`\n .headerbar-logo {\n box-sizing: border-box;\n min-width: 49px;\n max-height: 48px;\n margin: 0 12px 0 0;\n border-right: 1px solid rgba(32, 32, 32, 0.15);\n }\n .headerbar-logo:hover {\n background-color: #1a557f;\n }\n\n .headerbar-logo a,\n .headerbar-logo a:hover,\n .headerbar-logo a:focus,\n .headerbar-logo a:active,\n .headerbar-logo a:visited {\n user-select: none;\n }\n .headerbar-logo a:focus {\n outline: 2px solid white;\n outline-offset: -2px;\n }\n .headerbar-logo a:focus:not(:focus-visible) {\n outline: none;\n }\n `}</style>\n </div>\n );\n};\n","import { colors, theme, spacers } from '@dhis2/ui-constants'\nimport { IconMessages24, IconMail24 } from '@dhis2/ui-icons'\nimport PropTypes from 'prop-types'\nimport React from 'react'\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n }\n\n\nfunction icon(kind: string) {\n if (kind === 'message') {\n return <IconMessages24 color={colors.white} />\n } else {\n return <IconMail24 color={colors.white} />\n }\n}\n\nexport const NotificationIcon = (params: any) => {\n const { count, href, kind, dataTestId } = params;\n const notificationClassName = \"headerbar-notification-icon \" + kind\n return (\n <a href={href} className={notificationClassName} data-test={dataTestId}>\n {icon(kind)}\n\n {count > 0 && <span data-test={`${dataTestId}-count`}>{count}</span>}\n\n <style jsx>{`\n .headerbar-notification-icon {\n position: relative;\n margin: 0;\n cursor: pointer;\n padding: 0 ${spacers.dp12};\n height: 100%;\n display: flex;\n align-items: center;\n }\n .headerbar-notification-icon:focus {\n outline: 2px solid white;\n outline-offset: -2px;\n }\n .headerbar-notification-icon:focus:not(:focus-visible) {\n outline: none;\n }\n .headerbar-notification-icon:hover {\n background: #1a557f;\n }\n .headerbar-notification-icon:active {\n background: #104067;\n }\n .headerbar-notification-icon span {\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1;\n position: absolute;\n top: 3px;\n right: 2px;\n min-width: 18px;\n min-height: 18px;\n border-radius: ${spacers.dp12};\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1),\n 0 1px 2px 0 rgba(0, 0, 0, 0.06);\n background-color: ${theme.secondary500};\n color: ${colors.white};\n font-size: 13px;\n font-weight: 600;\n line-height: 15px;\n text-align: center;\n cursor: inherit;\n padding: 0 ${spacers.dp4};\n }\n `}</style>\n </a>\n) }\n\nNotificationIcon.defaultProps = {\n count: 0,\n}\n\nNotificationIcon.propTypes = {\n href: PropTypes.string.isRequired,\n count: PropTypes.number,\n dataTestId: PropTypes.string,\n message: PropTypes.string,\n kind: PropTypes.oneOf(['interpretation', 'message']),\n}\n","import { useConfig } from '@dhis2/app-runtime'\nimport PropTypes from 'prop-types'\nimport React from 'react'\nimport { joinPath } from './join-path'\nimport { NotificationIcon } from './notification-icon'\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n }\n\n\n/*\n AUTHORITIES:\n - ALL: superuser\n - M_dhis-web-interpretation: access to interpretations app\n - M_dhis-web-messaging: access to messaging app\n */\n\nconst hasAuthority = (userAuthorities: any, authId: string) =>\n Array.isArray(userAuthorities) &&\n userAuthorities.some(\n (userAuthId) => userAuthId === 'ALL' || userAuthId === authId\n )\n\nexport const Notifications = (params: any) => {\n const {\n interpretations,\n messages,\n userAuthorities,\n } = params;\n const { baseUrl } = useConfig()\n\n return (\n <div className=\"headerbar-notifications\" data-test=\"headerbar-notifications\">\n {hasAuthority(userAuthorities, 'M_dhis-web-interpretation') && (\n <NotificationIcon\n count={interpretations}\n href={joinPath(baseUrl, 'dhis-web-interpretation')}\n kind=\"message\"\n dataTestId=\"headerbar-interpretations\"\n />\n )}\n\n {hasAuthority(userAuthorities, 'M_dhis-web-messaging') && (\n <NotificationIcon\n message=\"email\"\n count={messages}\n href={joinPath(baseUrl, 'dhis-web-messaging')}\n kind=\"interpretation\"\n dataTestId=\"headerbar-messages\"\n />\n )}\n\n <style jsx>{`\n .headerbar-notifications {\n user-select: none;\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 100%;\n }\n `}</style>\n </div>\n )\n}\n\nNotifications.propTypes = {\n interpretations: PropTypes.number,\n messages: PropTypes.number,\n userAuthorities: PropTypes.arrayOf(PropTypes.string),\n}\n","import { useConfig } from '@dhis2/app-runtime'\n\nexport const useDebugInfo = () => {\n const { appName, appVersion, systemInfo } = useConfig() as any\n\n return {\n app_name: appName || null,\n app_version: appVersion?.full || null,\n dhis2_version: systemInfo?.version || null,\n dhis2_revision: systemInfo?.revision || null,\n }\n}\n\nexport const useFormattedDebugInfo = () =>\n JSON.stringify(useDebugInfo(), undefined, 2)\n","import { colors } from '@dhis2/ui-constants';\nimport React from 'react';\nimport { useDebugInfo } from './use-debug-info';\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n}\n\nconst formatDebugInfoKey = (key: any) => {\n const tokens = key.split('_');\n return tokens\n .map((token: any) => {\n if (token.toLowerCase() === 'dhis2') {\n return 'DHIS2';\n } else {\n return token[0].toUpperCase() + token.substr(1).toLowerCase();\n }\n })\n .join(' ');\n};\n\nexport function DebugInfoTable() {\n const debugInfo = useDebugInfo() as any;\n return (\n <table {...{ 'data-test': 'dhis2-ui-headerbar-debuginfotable' }}>\n <tbody>\n {Object.keys(debugInfo).map((key) => (\n <tr key={key}>\n <td className=\"debug-info-key\">{formatDebugInfoKey(key)}</td>\n <td>{debugInfo[key]}</td>\n </tr>\n ))}\n </tbody>\n <style jsx>{`\n table {\n white-space: pre-wrap;\n font-size: 14px;\n line-height: 1.2;\n color: ${colors.grey700};\n font-famile: Menlo, Courier, monospace !important;\n }\n td {\n padding: 3px 16px 3px 0;\n }\n .debug-info-key {\n font-weight: bold;\n }\n `}</style>\n </table>\n );\n}\n","import { Button, ButtonStrip } from '@dhis2-ui/button'\nimport { Modal, ModalActions, ModalContent, ModalTitle } from '@dhis2-ui/modal'\nimport { useAlert } from '@dhis2/app-runtime'\nimport i18n from '@dhis2/d2-i18n'\nimport PropTypes from 'prop-types'\nimport React from 'react'\nimport { DebugInfoTable } from './debug-info-table'\nimport { useFormattedDebugInfo } from './use-debug-info'\n\nexport function DebugInfoModal(params: any) {\n const { onClose } = params;\n const debugInfo = useFormattedDebugInfo()\n const { show: showClipboardAlert } = useAlert(\n 'Debug information copied to clipboard',\n { duration: 3000 }\n )\n\n const copyDebugInfo = () => {\n navigator.clipboard.writeText(debugInfo)\n onClose()\n showClipboardAlert()\n }\n\n return (\n <Modal position=\"middle\" dataTest=\"dhis2-ui-headerbar-debuginfomodal\">\n <ModalTitle>{i18n.t('Debug info')}</ModalTitle>\n <ModalContent>\n <DebugInfoTable />\n </ModalContent>\n <ModalActions>\n <ButtonStrip end>\n <Button onClick={() => onClose()}>{i18n.t('Close')}</Button>\n <Button\n primary\n onClick={copyDebugInfo}\n dataTest=\"dhis2-ui-headerbar-debuginfomodal-copybutton\"\n >\n {i18n.t('Copy debug info')}\n </Button>\n </ButtonStrip>\n </ModalActions>\n </Modal>\n )\n}\n\nDebugInfoModal.propTypes = {\n onClose: PropTypes.func.isRequired,\n}\n","import { MenuItem } from '@dhis2-ui/menu';\nimport { colors } from '@dhis2/ui-constants';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport i18n from '@dhis2/d2-i18n';\nimport { useDebugInfo } from './use-debug-info';\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n}\n\nexport const DebugInfoMenuItem = (params: any) => {\n const { hideProfileMenu, showDebugInfoModal } = params;\n const debugInfo = useDebugInfo();\n\n const openDebugModal = () => {\n hideProfileMenu();\n showDebugInfoModal();\n };\n\n const debugInfoLabel = (\n <div className=\"root\">\n <div\n className=\"instance-info version\"\n data-test=\"dhis2-ui-headerbar-instanceinfo\"\n >\n {debugInfo.dhis2_version\n ? i18n.t('DHIS2 {{dhis2Version}}', {\n dhis2Version: debugInfo.dhis2_version,\n })\n : i18n.t('DHIS2 version unknown')}\n </div>\n <div className=\"version\" data-test=\"dhis2-ui-headerbar-appinfo\">\n {debugInfo.app_name\n ? debugInfo.app_version\n ? `${debugInfo.app_name} ${debugInfo.app_version}`\n : i18n.t('{{appName}} version unknown', {\n appName: debugInfo.app_name,\n })\n : debugInfo.app_version\n ? i18n.t('App {{appVersion}}', {\n appVersion: debugInfo.app_version,\n })\n : i18n.t('App version unknown')}\n {}\n </div>\n <style jsx>{`\n .root {\n color: ${colors.grey700};\n font-style: italic;\n font-size: 14px;\n line-height: 17px;\n }\n .instance-info {\n margin-bottom: 4px;\n }\n .version {\n white-space: no-wrap;\n }\n `}</style>\n </div>\n );\n\n return (\n <MenuItem\n dense\n onClick={openDebugModal}\n label={debugInfoLabel}\n dataTest=\"dhis2-ui-headerbar-debuginfo\"\n />\n );\n};\n\nDebugInfoMenuItem.propTypes = {\n hideProfileMenu: PropTypes.func.isRequired,\n showDebugInfoModal: PropTypes.func.isRequired,\n};\n","import { UserAvatar } from '@dhis2-ui/user-avatar'\nimport { useConfig } from '@dhis2/app-runtime'\nimport PropTypes from 'prop-types'\nimport React from 'react'\nimport { joinPath } from '../join-path'\nimport i18n from '@dhis2/d2-i18n'\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n }\n\nconst ProfileName = (params: any) => {\n const { children } = params;\n return (\n <div className=\"headerbar-profile-username\" data-test=\"headerbar-profile-username\">\n {children}\n\n <style jsx>{`\n .headerbar-profile-username {\n margin-bottom: 3px;\n font-size: 16px;\n line-height: 19px;\n }\n `}</style>\n </div>\n) }\nProfileName.propTypes = {\n children: PropTypes.string,\n}\n\nconst ProfileEmail = (params: any) => {\n const { children } = params;\n return (\n <div className=\"headerbar-profile-user-email\" data-test=\"headerbar-profile-user-email\">\n {children}\n \n <style jsx>{`\n .headerbar-profile-user-email {\n margin-bottom: 6px;\n font-size: 14px;\n line-height: 16px;\n }\n `}</style>\n </div>\n )\n}\nProfileEmail.propTypes = {\n children: PropTypes.string,\n}\n\nconst ProfileEdit = (params: any) => {\n const { children } = params;\n const { baseUrl } = useConfig()\n\n return (\n <a\n className=\"headerbar-profile-edit-profile-link\"\n href={joinPath(baseUrl, 'dhis-web-user-profile/#/profile')}\n data-test=\"headerbar-profile-edit-profile-link\"\n >\n {children}\n\n <style jsx>{`\n .headerbar-profile-edit-profile-link {\n color: rgba(0, 0, 0, 0.87);\n font-size: 12px;\n line-height: 14px;\n text-decoration: underline !important;\n cursor: pointer;\n }\n `}</style>\n </a>\n )\n}\n\nProfileEdit.propTypes = {\n children: PropTypes.string,\n}\n\nconst ProfileDetails = (params: any) => {\n const { name, email } = params;\n return (\n <div className=\"headerbar-profile-details\">\n <ProfileName>{name}</ProfileName>\n <ProfileEmail>{email}</ProfileEmail>\n <ProfileEdit>{i18n.t('Edit profile')}</ProfileEdit>\n \n <style jsx>{`\n .headerbar-profile-details {\n display: flex;\n flex-direction: column;\n margin-left: 20px;\n color: #000;\n font-size: 14px;\n font-weight: 400;\n }\n `}</style>\n </div>\n )\n}\n\nProfileDetails.propTypes = {\n email: PropTypes.string,\n name: PropTypes.string,\n}\n\nexport const ProfileHeader = (params: any) => {\n const { name, email, avatarId } = params;\n return (<div className=\"headerbar-profile-header\">\n <UserAvatar\n avatarId={avatarId}\n name={name}\n dataTest=\"headerbar-profile-menu-icon\"\n large\n />\n <ProfileDetails name={name} email={email} />\n\n <style jsx>{`\n .headerbar-profile-header {\n display: flex;\n flex-direction: row;\n margin-left: 24px;\n padding-top: 20px;\n }\n `}</style>\n </div>\n) }\n\nProfileHeader.propTypes = {\n avatarId: PropTypes.string,\n email: PropTypes.string,\n name: PropTypes.string,\n}\n","import PropTypes from 'prop-types'\nimport React, { createContext, useContext } from 'react'\n\nconst headerBarContext = createContext({\n updateAvailable: false,\n onApplyAvailableUpdate: () => {},\n})\n\nexport const HeaderBarContextProvider = (params: any) => {\n const {\n updateAvailable,\n onApplyAvailableUpdate,\n children,\n } = params;\n return (\n <headerBarContext.Provider\n value={{ updateAvailable, onApplyAvailableUpdate }}\n >\n {children}\n </headerBarContext.Provider>\n )\n}\nHeaderBarContextProvider.propTypes = {\n children: PropTypes.node,\n updateAvailable: PropTypes.bool,\n onApplyAvailableUpdate: PropTypes.func,\n}\n\nexport const useHeaderBarContext = () => useContext(headerBarContext)\n","import { MenuItem } from '@dhis2-ui/menu'\nimport { useConfig } from '@dhis2/app-runtime'\nimport { colors } from '@dhis2/ui-constants'\nimport PropTypes from 'prop-types'\nimport React from 'react'\nimport { useHeaderBarContext } from '../header-bar-context'\nimport i18n from '@dhis2/d2-i18n'\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n }\n\nexport function UpdateNotification(params: any) {\n const { hideProfileMenu } =params;\n const { appName } = useConfig()\n const { updateAvailable, onApplyAvailableUpdate } = useHeaderBarContext()\n const onClick = () => {\n hideProfileMenu()\n onApplyAvailableUpdate?.()\n }\n\n const updateNotificationLabel = (\n <div className=\"root\">\n <div className=\"badge\" />\n <div className=\"spacer\" />\n <div className=\"message\">\n {appName\n ? i18n.t('New {{appName}} version available', { appName })\n : i18n.t('New app version available')}\n <br />\n {i18n.t('Click to reload')}\n </div>\n <style jsx>{`\n .root {\n display: flex;\n flex-direction: row;\n align-items: center;\n font-size: 14px;\n line-height: 17px;\n }\n .badge {\n display: inline-block;\n width: 12px;\n height: 12px;\n margin: 0 8px;\n border-radius: 6px;\n background-color: ${colors.blue600};\n }\n .spacer {\n display: inline-block;\n width: 8px;\n }\n .message {\n display: inline-block;\n }\n `}</style>\n </div>\n )\n\n return updateAvailable ? (\n <MenuItem\n dense\n onClick={onClick}\n label={updateNotificationLabel}\n dataTest=\"dhis2-ui-headerbar-updatenotification\"\n />\n ) : null\n}\n\nUpdateNotification.propTypes = {\n hideProfileMenu: PropTypes.func.isRequired,\n}\n","import { Card } from '@dhis2-ui/card'\nimport { Center } from '@dhis2-ui/center'\nimport { Divider } from '@dhis2-ui/divider'\nimport { Layer } from '@dhis2-ui/layer'\nimport { CircularLoader } from '@dhis2-ui/loader'\nimport { MenuDivider, MenuItem } from '@dhis2-ui/menu'\nimport { clearSensitiveCaches, useConfig } from '@dhis2/app-runtime'\nimport { colors } from '@dhis2/ui-constants'\nimport {\n IconSettings24,\n IconInfo24,\n IconLogOut24,\n IconUser24,\n IconQuestion24,\n} from '@dhis2/ui-icons'\nimport PropTypes from 'prop-types'\nimport React, { useState } from 'react'\nimport { DebugInfoMenuItem } from '../debug-info/debug-info-menu-item'\nimport { joinPath } from '../join-path'\nimport i18n from '@dhis2/d2-i18n';\nimport { ProfileHeader } from './profile-header'\nimport { UpdateNotification } from './update-notification'\n\nconst LoadingMask = () => (\n <Layer\n translucent\n disablePortal\n dataTest=\"headerbar-profile-menu-loading-mask\"\n >\n <Center>\n <CircularLoader />\n </Center>\n </Layer>\n)\n\nconst ProfileContents = (params: any) => {\n const {\n name,\n email,\n avatarId,\n helpUrl,\n hideProfileMenu,\n showDebugInfoModal,\n } = params;\n const { baseUrl } = useConfig()\n const [loading, setLoading] = useState(false)\n\n return (\n <Card>\n <div className=\"headerbar-profile-contents\">\n <ProfileHeader name={name} email={email} avatarId={avatarId} />\n <Divider margin=\"13px 0 7px 0\" />\n <ul data-test=\"headerbar-profile-menu\">\n <MenuItem\n href={joinPath(\n baseUrl,\n 'dhis-web-user-profile/#/settings'\n )}\n label={i18n.t('Settings')}\n value=\"settings\"\n icon={<IconSettings24 color={colors.grey700} />}\n />\n <MenuItem\n href={joinPath(\n baseUrl,\n 'dhis-web-user-profile/#/account'\n )}\n label={i18n.t('Account')}\n value=\"account\"\n icon={<IconUser24 color={colors.grey700} />}\n />\n {helpUrl && (\n <MenuItem\n href={helpUrl}\n label={i18n.t('Help')}\n value=\"help\"\n icon={<IconQuestion24 color={colors.grey700} />}\n />\n )}\n <MenuItem\n href={joinPath(\n baseUrl,\n 'dhis-web-user-profile/#/aboutPage'\n )}\n label={i18n.t('About DHIS2')}\n value=\"about\"\n icon={<IconInfo24 color={colors.grey700} />}\n />\n <MenuItem\n href={joinPath(\n baseUrl,\n 'dhis-web-commons-security/logout.action'\n )}\n // NB: By MenuItem implementation, this callback\n // overwrites default navigation behavior but maintains\n // the href attribute\n onClick={async () => {\n setLoading(true)\n await clearSensitiveCaches()\n setLoading(false)\n window.location.assign(\n joinPath(\n baseUrl,\n 'dhis-web-commons-security/logout.action'\n )\n )\n }}\n label={i18n.t('Logout')}\n value=\"logout\"\n icon={<IconLogOut24 color={colors.grey700} />}\n />\n <MenuDivider dense />\n <DebugInfoMenuItem\n hideProfileMenu={hideProfileMenu}\n showDebugInfoModal={showDebugInfoModal}\n />\n <UpdateNotification hideProfileMenu={hideProfileMenu} />\n </ul>\n </div>\n\n {loading && <LoadingMask />}\n\n <style jsx>{`\n .headerbar-profile-contents {\n width: 100%;\n padding: 0;\n }\n\n .headerbar-profile-contents ul {\n padding: 0;\n margin: 0;\n }\n\n .headerbar-profile-contents a {\n display: inline-flex !important;\n }\n\n .headerbar-profile-contents a,\n .headerbar-profile-contents a:hover,\n .headerbar-profile-contents a:focus,\n .headerbar-profile-contents a:active,\n .headerbar-profile-contents a:visited {\n text-decoration: none;\n display: block;\n }\n `}</style>\n </Card>\n )\n}\n\nProfileContents.propTypes = {\n hideProfileMenu: PropTypes.func.isRequired,\n showDebugInfoModal: PropTypes.func.isRequired,\n avatarId: PropTypes.string,\n email: PropTypes.string,\n helpUrl: PropTypes.string,\n name: PropTypes.string,\n}\n\nexport const ProfileMenu = (params: any) => {\n const { ...props }=params;\n return (\n <div className=\"headerbar-profile-menu\" data-test=\"headerbar-profile-menu\">\n <ProfileContents {...props} />\n <style jsx>{`\n .headerbar-profile-menu {\n z-index: 10000;\n position: absolute;\n right: 4px;\n width: 320px;\n }\n `}</style>\n </div>\n )\n}\n\nProfileMenu.propTypes = {\n hideProfileMenu: PropTypes.func.isRequired,\n showDebugInfoModal: PropTypes.func.isRequired,\n avatarId: PropTypes.string,\n email: PropTypes.string,\n helpUrl: PropTypes.string,\n name: PropTypes.string,\n}\n","import { useEffect, useMemo } from 'react'\n\nexport const useOnDocClick = (containerRef: any, hide: any) => {\n const onDocClick = useMemo(() => {\n return (evt: any) => {\n if (!containerRef.current) {\n return null\n }\n\n if (!containerRef.current.contains(evt.target)) {\n hide()\n }\n\n return null;\n }\n }, [containerRef, hide])\n\n useEffect(() => {\n document.addEventListener('click', onDocClick)\n\n return () => {\n document.removeEventListener('click', onDocClick)\n }\n }, [onDocClick])\n}\n","import { UserAvatar } from '@dhis2-ui/user-avatar'\nimport PropTypes from 'prop-types'\nimport React, { useCallback, useRef, useState } from 'react'\nimport { DebugInfoModal } from './debug-info/debug-info-modal'\nimport { ProfileMenu } from './profile-menu'\nimport { useOnDocClick } from './profile/use-on-doc-click'\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n }\n\nconst Profile = (params: any) => {\n const { name, email, avatarId, helpUrl } = params;\n const [showProfileMenu, setShowProfileMenu] = useState(false)\n const [showDebugInfoModal, setShowDebugInfoModal] = useState(false)\n const hideProfileMenu = useCallback(\n () => setShowProfileMenu(false),\n [setShowProfileMenu]\n )\n const toggleProfileMenu = useCallback(\n () => setShowProfileMenu((show) => !show),\n [setShowProfileMenu]\n ) as any\n const containerRef = useRef(null)\n\n useOnDocClick(containerRef, hideProfileMenu)\n\n return (\n <div\n ref={containerRef}\n data-test=\"headerbar-profile\"\n className=\"headerbar-profile\"\n >\n <button\n className=\"headerbar-profile-btn\"\n onClick={toggleProfileMenu}\n >\n <UserAvatar\n avatarId={avatarId}\n name={name}\n dataTest=\"headerbar-profile-icon\"\n medium\n />\n </button>\n\n {showProfileMenu && (\n <ProfileMenu\n avatarId={avatarId}\n name={name}\n email={email}\n helpUrl={helpUrl}\n hideProfileMenu={hideProfileMenu}\n showDebugInfoModal={() => {\n setShowDebugInfoModal(true)\n }}\n />\n )}\n {showDebugInfoModal && (\n <DebugInfoModal\n onClose={() => {\n setShowDebugInfoModal(false)\n }}\n />\n )}\n\n <style jsx>{`\n .headerbar-profile {\n position: relative;\n height: 100%;\n }\n\n .headerbar-profile-btn {\n background: transparent;\n padding: 6px;\n border: 0;\n cursor: pointer;\n }\n .headerbar-profile-btn:focus {\n outline: 2px solid white;\n outline-offset: -2px;\n }\n .headerbar-profile-btn:focus:not(:focus-visible) {\n outline: none;\n }\n .headerbar-profile-btn:hover {\n background: #1a557f;\n }\n .headerbar-profile-btn:active {\n background: #104067;\n }\n `}</style>\n </div>\n )\n}\n\nProfile.propTypes = {\n name: PropTypes.string.isRequired,\n avatarId: PropTypes.string,\n email: PropTypes.string,\n helpUrl: PropTypes.string,\n}\n\nexport default Profile\n","import PropTypes from 'prop-types';\nimport React from 'react';\ndeclare module 'react' {\n interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {\n jsx?: boolean;\n global?: boolean;\n }\n}\n\nexport const Title = (params: any) => {\n const { app, instance } = params;\n return (\n <div className=\"headerbar-title\" data-test=\"headerbar-title\">\n {app ? `${instance} - ${app}` : `${instance}`}\n\n <style jsx>{`\n .headerbar-title {\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: 14px;\n font-weight: 500;\n letter-spacing: 0.01em;\n white-space: nowrap;\n }\n `}</style>\n </div>\n );\n};\nTitle.propTypes = {\n app: PropTypes.string,\n instance: PropTypes.string,\n};\n","import i18n from '@dhis2/d2-i18n';\nimport { colors } from '@dhis2/ui-constants';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { HeaderBarData } from '../models';\nimport Apps from './apps';\nimport { Logo } from './logo';\nimport { Notifications } from './notifications';\nimport Profile from './profile';\nimport { Title } from './title';\n\ninterface HeaderBarProp {\n appName: string;\n data: HeaderBarData;\n className?: string;\n}\n\nexport const HeaderBar = ({ appName, data, className }: HeaderBarProp) => {\n const loading = false;\n const error = null;\n\n // See https://jira.dhis2.org/browse/LIBS-180\n if (!loading && !error) {\n // TODO: This will run every render which is probably wrong!\n // Also, setting the global locale shouldn't be done in the headerbar\n const locale = (data.user['settings'] as any)['keyUiLocale'] || 'en';\n i18n.setDefaultNamespace('default');\n i18n.changeLanguage(locale);\n }\n\n {\n /* TODO: Find better way to attach base URL */\n }\n const baseUrl = '../../../';\n\n return (\n <header className={className}>\n <div className=\"main\">\n {!loading && !error && (\n <>\n <Logo baseUrl={baseUrl} />\n\n <Title\n app={appName}\n instance={(data.title as any)['applicationTitle']}\n />\n\n <div className=\"right-control-spacer\" />\n\n {/*TODO: Find better approach to handle PWA */}\n {/* {'pwaEnabled' && <OnlineStatus />} */}\n\n <Notifications\n interpretations={data.notifications.unreadInterpretations}\n messages={data.notifications.unreadMessageConversations}\n userAuthorities={data.user['authorities'] as any}\n />\n <Apps apps={data.apps} baseUrl={baseUrl} />\n\n <Profile\n name={data.user['name'] as string}\n email={data.user['email'] as string}\n avatarId={((data.user['avatar'] || {}) as any)['id']}\n helpUrl={data.help.helpPageLink}\n />\n </>\n )}\n </div>\n\n {/* {'pwaEnabled' && !loading && !error && <OnlineStatus dense />} */}\n\n <style jsx>{`\n .main {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: #2c6693;\n color: ${colors.white};\n height: 48px;\n }\n .right-control-spacer {\n margin-left: auto;\n }\n `}</style>\n </header>\n );\n};\n\nHeaderBar.propTypes = {\n appName: PropTypes.string,\n data: HeaderBarData,\n className: PropTypes.string,\n updateAvailable: PropTypes.bool,\n onApplyAvailableUpdate: PropTypes.func,\n};\n","import { Component, ElementRef, OnInit } from '@angular/core';\nimport { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';\nimport { Observable, firstValueFrom } from 'rxjs';\nimport { HeaderBarData } from './models';\nimport { ReactWrapperComponent } from '../../shared/components';\nimport { DataProvider } from '@dhis2/app-runtime';\nimport React from 'react';\nimport * as ReactDOM from 'react-dom/client';\nimport { HeaderBar } from './utils/header-bar';\n\n@Component({\n selector: 'ng-dhis2-ui-header-bar',\n template: `<ng-container *ngIf=\"data$ | async as data\"> </ng-container>`,\n})\nexport class HeaderBarComponent extends ReactWrapperComponent {\n data$!: Observable<HeaderBarData | null>;\n\n constructor(\n elementRef: ElementRef<HTMLElement>,\n private httpClient: NgxDhis2HttpClientService\n ) {\n super(elementRef);\n }\n\n override async ngAfterViewInit() {\n if (!this.elementRef) throw new Error('No element ref');\n this.reactDomRoot = ReactDOM.createRoot(this.elementRef.nativeElement);\n const manifest = await firstValueFrom(this.httpClient.manifest());\n const data = await firstValueFrom(new HeaderBarData(this.httpClient).get());\n\n this.component = data\n ? () => (\n <DataProvider>\n {<HeaderBar appName={manifest?.name} data={data} />}\n </DataProvider>\n )\n : () => <div>Something went wrong</div>;\n this.render();\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SharedDhis2UiModule } from '../../shared/shared.module';\nimport { HeaderBarComponent } from './header-bar.component';\n\n@NgModule({\n imports: [CommonModule, SharedDhis2UiModule],\n declarations: [HeaderBarComponent],\n exports: [HeaderBarComponent],\n})\nexport class HeaderBarModule {}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nexport * from './header-bar.module';\nexport * from './header-bar.component';\n","import { Component, EventEmitter, Input, Output } from '@angular/core';\n\nimport { Button } from '@dhis2/ui';\nimport { ReactWrapperComponent } from '../../shared/components';\n\n@Component({\n selector: 'ng-dhis2-ui-button',\n template: '<ng-content></ng-content>',\n\n})\nexport class ButtonComponent extends ReactWrapperComponent {\n @Input() label!: string;\n @Input() primary?: boolean;\n @Input() secondary?: boolean;\n @Input() destructive?: boolean;\n @Input() disabled?: boolean;\n @Input() small?: boolean;\n @Input() large?: boolean;\n\n @Output() buttonClick: EventEmitter<any> = new EventEmitter();\n\n override props: Record<string, unknown> = {\n onClick: (e: any) => {\n this.onButtonClick(e);\n },\n };\n\n override component = Button;\n\n\n ngOnInit() {\n this.props = {\n ...this.props,\n primary: this.primary,\n secondary: this.secondary,\n destructive: this.destructive,\n small: this.small,\n large: this.large,\n };\n }\n\n onButtonClick(event: any) {\n this.buttonClick.emit(event);\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SharedDhis2UiModule } from '../../shared/shared.module';\nimport { ButtonComponent } from './button.component';\n\n@NgModule({\n declarations: [ButtonComponent],\n exports: [ButtonComponent],\n imports: [CommonModule, SharedDhis2UiModule],\n})\nexport class ButtonModule {}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nexport * from './button.module';\nexport * from './button.component';\n","import { Component } from '@angular/core';\nimport { ReactWrapperComponent } from '../../shared/components';\nimport AppAdapter from '@dhis2/app-adapter'\nimport { Layer, layers, CenteredContent, CircularLoader } from '@dhis2/ui'\nimport React from 'react';\n\n@Component({\n selector: 'ng-dhis2-ui-app-shell',\n template: '<ng-content></ng-content>',\n})\nexport class AppShellComponent extends ReactWrapperComponent {\n appConfig = {\n // url: process.env.REACT_APP_DHIS2_BASE_URL,\n // appName: process.env.REACT_APP_DHIS2_APP_NAME || '',\n // appVersion: process.env.REACT_APP_DHIS2_APP_VERSION || '',\n // apiVersion: parseInt(process.env.REACT_APP_DHIS2_API_VERSION),\n // pwaEnabled: process.env.REACT_APP_DHIS2_APP_PWA_ENABLED === 'true',\n // plugin: process.env.REACT_APP_DHIS2_APP_PLUGIN === 'true',\n}\n override component = <AppAdapter {...this.appConfig}>\n <React.Suspense\n fallback={\n <Layer level={layers.alert}>\n <CenteredContent>\n <CircularLoader />\n </CenteredContent>\n </Layer>\n }\n >\n {/* <D2App config={appConfig} /> */}\n </React.Suspense>\n</AppAdapter> as any\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { SharedDhis2UiModule } from '../../shared/shared.module';\nimport { AppShellComponent } from './app-shell.component';\n\n@NgModule({\n declarations: [AppShellComponent],\n imports: [CommonModule, SharedDhis2UiModule],\n exports: [AppShellComponent],\n})\nexport class AppShellModule {}\n","// Copyright 2023 UDSM DHIS2 Lab. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\nexport * from './app-shell.component';\nexport * from './app-shell.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["React","Button","Layer","CircularLoader"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAMa,eAAe,CAAA;+GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;AAAf,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;AAEX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,YAFhB,YAAY,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAEX,eAAe,EAAA,UAAA,EAAA,CAAA;kBAH3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;AACxB,iBAAA,CAAA;;;ACSA,MAAc,CAAC,KAAK,GAAG,KAAK,CAAC;MAKjB,qBAAqB,CAAA;AAShC,IAAA,WAAA,CAAsB,UAAmC,EAAA;QAAnC,IAAU,CAAA,UAAA,GAAV,UAAU,CAAyB;KAAI;IAE7D,eAAe,GAAA;QACb,IAAI,CAAC,IAAI,CAAC,UAAU;AAAE,YAAA,MAAM,IAAI,KAAK,CAAC,gBAAgB,CAAC,CAAC;AACxD,QAAA,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;QACvE,IAAI,CAAC,MAAM,EAAE,CAAC;KACf;I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AY,EAAE,mBAAmB,aACjC,iBAAiB,CAAA,EAAA,CAAA,CAAA,EAAA;gHAEhB,cAAc,EAAA,OAAA,EAAA,CAHf,YAAY,EAAE,mBAAmB,CAAA,EAAA,CAAA,CAAA,EAAA;;4FAGhC,cAAc,EAAA,UAAA,EAAA,CAAA;kBAL1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,iBAAiB,CAAC;AACjC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,CAAC;oBAC5C,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA,CAAA;;;ACTD;AACA;AACA;;ACFA;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './lib/ng-dhis2-ui.module';
2
+ export * from './lib/modules/header-bar';
3
+ export * from './lib/modules/button';
4
+ export * from './lib/modules/app-shell';
@@ -0,0 +1,8 @@
1
+ import { ReactWrapperComponent } from '../../shared/components';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AppShellComponent extends ReactWrapperComponent {
4
+ appConfig: {};
5
+ component: any;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppShellComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<AppShellComponent, "ng-dhis2-ui-app-shell", never, {}, {}, never, ["*"], false, never>;
8
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./app-shell.component.tsx";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../../shared/shared.module";
5
+ export declare class AppShellModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppShellModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AppShellModule, [typeof i1.AppShellComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule], [typeof i1.AppShellComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<AppShellModule>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export * from './app-shell.component';
2
+ export * from './app-shell.module';
@@ -0,0 +1,19 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { ReactWrapperComponent } from '../../shared/components';
3
+ import * as i0 from "@angular/core";
4
+ export declare class ButtonComponent extends ReactWrapperComponent {
5
+ label: string;
6
+ primary?: boolean;
7
+ secondary?: boolean;
8
+ destructive?: boolean;
9
+ disabled?: boolean;
10
+ small?: boolean;
11
+ large?: boolean;
12
+ buttonClick: EventEmitter<any>;
13
+ props: Record<string, unknown>;
14
+ component: any;
15
+ ngOnInit(): void;
16
+ onButtonClick(event: any): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "ng-dhis2-ui-button", never, { "label": { "alias": "label"; "required": false; }; "primary": { "alias": "primary"; "required": false; }; "secondary": { "alias": "secondary"; "required": false; }; "destructive": { "alias": "destructive"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "small": { "alias": "small"; "required": false; }; "large": { "alias": "large"; "required": false; }; }, { "buttonClick": "buttonClick"; }, never, ["*"], false, never>;
19
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./button.component.tsx";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../../shared/shared.module";
5
+ export declare class ButtonModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ButtonModule, [typeof i1.ButtonComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule], [typeof i1.ButtonComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<ButtonModule>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export * from './button.module';
2
+ export * from './button.component';
@@ -0,0 +1,14 @@
1
+ import { ElementRef } from '@angular/core';
2
+ import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
3
+ import { Observable } from 'rxjs';
4
+ import { HeaderBarData } from './models';
5
+ import { ReactWrapperComponent } from '../../shared/components';
6
+ import * as i0 from "@angular/core";
7
+ export declare class HeaderBarComponent extends ReactWrapperComponent {
8
+ private httpClient;
9
+ data$: Observable<HeaderBarData | null>;
10
+ constructor(elementRef: ElementRef<HTMLElement>, httpClient: NgxDhis2HttpClientService);
11
+ ngAfterViewInit(): Promise<void>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeaderBarComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<HeaderBarComponent, "ng-dhis2-ui-header-bar", never, {}, {}, never, never, false, never>;
14
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./header-bar.component.tsx";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "../../shared/shared.module";
5
+ export declare class HeaderBarModule {
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<HeaderBarModule, never>;
7
+ static ɵmod: i0.ɵɵNgModuleDeclaration<HeaderBarModule, [typeof i1.HeaderBarComponent], [typeof i2.CommonModule, typeof i3.SharedDhis2UiModule], [typeof i1.HeaderBarComponent]>;
8
+ static ɵinj: i0.ɵɵInjectorDeclaration<HeaderBarModule>;
9
+ }
@@ -0,0 +1,2 @@
1
+ export * from './header-bar.module';
2
+ export * from './header-bar.component';
@@ -0,0 +1,10 @@
1
+ export declare class HeaderBarApp {
2
+ name: string;
3
+ namespace: string;
4
+ defaultAction: string;
5
+ displayName: string;
6
+ icon: string;
7
+ description: string;
8
+ constructor(module: Record<string, unknown>);
9
+ getPath(item: string): string;
10
+ }
@@ -0,0 +1,16 @@
1
+ import { NgxDhis2HttpClientService } from '@iapps/ngx-dhis2-http-client';
2
+ import { Observable } from 'rxjs';
3
+ import { HeaderBarApp } from './header-bar-app.model';
4
+ import { HeaderBarNotification } from './header-bar-notification.model';
5
+ export declare class HeaderBarData {
6
+ private httpClient;
7
+ apps: HeaderBarApp[];
8
+ title: string;
9
+ help: any;
10
+ notifications: HeaderBarNotification;
11
+ user: Record<string, unknown>;
12
+ constructor(httpClient: NgxDhis2HttpClientService);
13
+ getApps(): Observable<HeaderBarApp[]>;
14
+ getNotifications(): Observable<HeaderBarNotification | null>;
15
+ get(): Observable<HeaderBarData | null>;
16
+ }
@@ -0,0 +1,5 @@
1
+ export declare class HeaderBarNotification {
2
+ unreadInterpretations?: number;
3
+ unreadMessageConversations?: number;
4
+ constructor(notification: Record<string, number>);
5
+ }
@@ -0,0 +1,2 @@
1
+ export * from './header-bar-data.model';
2
+ export * from './header-bar-app.model';
@@ -0,0 +1,16 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ declare module 'react' {
4
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
5
+ jsx?: boolean;
6
+ global?: boolean;
7
+ }
8
+ }
9
+ declare const Apps: {
10
+ ({ apps, baseUrl }: any): React.JSX.Element;
11
+ propTypes: {
12
+ apps: PropTypes.Validator<any[]>;
13
+ baseUrl: PropTypes.Requireable<string>;
14
+ };
15
+ };
16
+ export default Apps;
@@ -0,0 +1,15 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ declare module 'react' {
4
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
5
+ jsx?: boolean;
6
+ global?: boolean;
7
+ }
8
+ }
9
+ export declare const DebugInfoMenuItem: {
10
+ (params: any): React.JSX.Element;
11
+ propTypes: {
12
+ hideProfileMenu: PropTypes.Validator<(...args: any[]) => any>;
13
+ showDebugInfoModal: PropTypes.Validator<(...args: any[]) => any>;
14
+ };
15
+ };
@@ -0,0 +1,8 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ export declare function DebugInfoModal(params: any): React.JSX.Element;
4
+ export declare namespace DebugInfoModal {
5
+ var propTypes: {
6
+ onClose: PropTypes.Validator<(...args: any[]) => any>;
7
+ };
8
+ }
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare module 'react' {
3
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
4
+ jsx?: boolean;
5
+ global?: boolean;
6
+ }
7
+ }
8
+ export declare function DebugInfoTable(): React.JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare const useDebugInfo: () => {
2
+ app_name: any;
3
+ app_version: any;
4
+ dhis2_version: any;
5
+ dhis2_revision: any;
6
+ };
7
+ export declare const useFormattedDebugInfo: () => string;
@@ -0,0 +1,14 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ export declare const HeaderBarContextProvider: {
4
+ (params: any): React.JSX.Element;
5
+ propTypes: {
6
+ children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
7
+ updateAvailable: PropTypes.Requireable<boolean>;
8
+ onApplyAvailableUpdate: PropTypes.Requireable<(...args: any[]) => any>;
9
+ };
10
+ };
11
+ export declare const useHeaderBarContext: () => {
12
+ updateAvailable: boolean;
13
+ onApplyAvailableUpdate: () => void;
14
+ };
@@ -0,0 +1,19 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ import { HeaderBarData } from '../models';
4
+ interface HeaderBarProp {
5
+ appName: string;
6
+ data: HeaderBarData;
7
+ className?: string;
8
+ }
9
+ export declare const HeaderBar: {
10
+ ({ appName, data, className }: HeaderBarProp): React.JSX.Element;
11
+ propTypes: {
12
+ appName: PropTypes.Requireable<string>;
13
+ data: typeof HeaderBarData;
14
+ className: PropTypes.Requireable<string>;
15
+ updateAvailable: PropTypes.Requireable<boolean>;
16
+ onApplyAvailableUpdate: PropTypes.Requireable<(...args: any[]) => any>;
17
+ };
18
+ };
19
+ export {};
@@ -0,0 +1 @@
1
+ export declare const joinPath: (...parts: any[]) => string;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ declare module 'react' {
3
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
4
+ jsx?: boolean;
5
+ global?: boolean;
6
+ }
7
+ }
8
+ export declare const LogoImage: () => React.JSX.Element;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ declare module 'react' {
3
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
4
+ jsx?: boolean;
5
+ global?: boolean;
6
+ }
7
+ }
8
+ interface LogoProp {
9
+ baseUrl: string;
10
+ }
11
+ export declare const Logo: ({ baseUrl }: LogoProp) => React.JSX.Element;
12
+ export {};
@@ -0,0 +1,21 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ declare module 'react' {
4
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
5
+ jsx?: boolean;
6
+ global?: boolean;
7
+ }
8
+ }
9
+ export declare const NotificationIcon: {
10
+ (params: any): React.JSX.Element;
11
+ defaultProps: {
12
+ count: number;
13
+ };
14
+ propTypes: {
15
+ href: PropTypes.Validator<string>;
16
+ count: PropTypes.Requireable<number>;
17
+ dataTestId: PropTypes.Requireable<string>;
18
+ message: PropTypes.Requireable<string>;
19
+ kind: PropTypes.Requireable<string>;
20
+ };
21
+ };
@@ -0,0 +1,16 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ declare module 'react' {
4
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
5
+ jsx?: boolean;
6
+ global?: boolean;
7
+ }
8
+ }
9
+ export declare const Notifications: {
10
+ (params: any): React.JSX.Element;
11
+ propTypes: {
12
+ interpretations: PropTypes.Requireable<number>;
13
+ messages: PropTypes.Requireable<number>;
14
+ userAuthorities: PropTypes.Requireable<string[]>;
15
+ };
16
+ };
@@ -0,0 +1 @@
1
+ export declare const useOnDocClick: (containerRef: any, hide: any) => void;
@@ -0,0 +1 @@
1
+ export * from './profile-menu';
@@ -0,0 +1,16 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ declare module 'react' {
4
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
5
+ jsx?: boolean;
6
+ global?: boolean;
7
+ }
8
+ }
9
+ export declare const ProfileHeader: {
10
+ (params: any): React.JSX.Element;
11
+ propTypes: {
12
+ avatarId: PropTypes.Requireable<string>;
13
+ email: PropTypes.Requireable<string>;
14
+ name: PropTypes.Requireable<string>;
15
+ };
16
+ };
@@ -0,0 +1,13 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ export declare const ProfileMenu: {
4
+ (params: any): React.JSX.Element;
5
+ propTypes: {
6
+ hideProfileMenu: PropTypes.Validator<(...args: any[]) => any>;
7
+ showDebugInfoModal: PropTypes.Validator<(...args: any[]) => any>;
8
+ avatarId: PropTypes.Requireable<string>;
9
+ email: PropTypes.Requireable<string>;
10
+ helpUrl: PropTypes.Requireable<string>;
11
+ name: PropTypes.Requireable<string>;
12
+ };
13
+ };
@@ -0,0 +1,14 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ declare module 'react' {
4
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
5
+ jsx?: boolean;
6
+ global?: boolean;
7
+ }
8
+ }
9
+ export declare function UpdateNotification(params: any): React.JSX.Element;
10
+ export declare namespace UpdateNotification {
11
+ var propTypes: {
12
+ hideProfileMenu: PropTypes.Validator<(...args: any[]) => any>;
13
+ };
14
+ }
@@ -0,0 +1,18 @@
1
+ import PropTypes from 'prop-types';
2
+ import React from 'react';
3
+ declare module 'react' {
4
+ interface StyleHTMLAttributes<T> extends React.HTMLAttributes<T> {
5
+ jsx?: boolean;
6
+ global?: boolean;
7
+ }
8
+ }
9
+ declare const Profile: {
10
+ (params: any): React.JSX.Element;
11
+ propTypes: {
12
+ name: PropTypes.Validator<string>;
13
+ avatarId: PropTypes.Requireable<string>;
14
+ email: PropTypes.Requireable<string>;
15
+ helpUrl: PropTypes.Requireable<string>;
16
+ };
17
+ };
18
+ export default Profile;